diff options
| author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2014-02-01 19:49:33 +0000 |
|---|---|---|
| committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2014-02-01 19:49:33 +0000 |
| commit | 404ae0f284a3b2d41fcdb53826550e4dfec5c65c (patch) | |
| tree | cc446af26234e4465b8cc168b720ec44816ff5ab /src | |
| download | colm-tarball-master.tar.gz | |
colm-0.12.0HEADcolm-0.12.0master
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile.am | 116 | ||||
| -rw-r--r-- | src/Makefile.in | 1754 | ||||
| -rw-r--r-- | src/buffer.h | 55 | ||||
| -rw-r--r-- | src/bytecode.c | 3702 | ||||
| -rw-r--r-- | src/bytecode.h | 513 | ||||
| -rw-r--r-- | src/closure.cc | 458 | ||||
| -rw-r--r-- | src/codegen.cc | 49 | ||||
| -rw-r--r-- | src/codevect.c | 183 | ||||
| -rw-r--r-- | src/colm.h | 82 | ||||
| -rw-r--r-- | src/colm.lm | 765 | ||||
| -rw-r--r-- | src/compiler.cc | 1170 | ||||
| -rw-r--r-- | src/config.h | 72 | ||||
| -rw-r--r-- | src/config.h.in | 71 | ||||
| -rw-r--r-- | src/consinit.cc | 856 | ||||
| -rw-r--r-- | src/consinit.h | 103 | ||||
| -rw-r--r-- | src/cstring.h | 861 | ||||
| -rw-r--r-- | src/ctinput.cc | 497 | ||||
| -rw-r--r-- | src/debug.c | 78 | ||||
| -rw-r--r-- | src/debug.h | 59 | ||||
| -rw-r--r-- | src/declare.cc | 1255 | ||||
| -rw-r--r-- | src/defs.h | 31 | ||||
| -rw-r--r-- | src/defs.h.in | 30 | ||||
| -rw-r--r-- | src/dotgen.cc | 115 | ||||
| -rw-r--r-- | src/dotgen.h | 51 | ||||
| -rw-r--r-- | src/exports.cc | 316 | ||||
| -rw-r--r-- | src/fsmap.cc | 804 | ||||
| -rw-r--r-- | src/fsmattach.cc | 425 | ||||
| -rw-r--r-- | src/fsmbase.cc | 602 | ||||
| -rw-r--r-- | src/fsmcodegen.cc | 931 | ||||
| -rw-r--r-- | src/fsmcodegen.h | 206 | ||||
| -rw-r--r-- | src/fsmexec.cc | 223 | ||||
| -rw-r--r-- | src/fsmgraph.cc | 982 | ||||
| -rw-r--r-- | src/fsmgraph.h | 1317 | ||||
| -rw-r--r-- | src/fsmmin.cc | 732 | ||||
| -rw-r--r-- | src/fsmstate.cc | 437 | ||||
| -rw-r--r-- | src/global.h | 104 | ||||
| -rw-r--r-- | src/if1.cc | 101 | ||||
| -rw-r--r-- | src/if1.h | 1148 | ||||
| -rw-r--r-- | src/if2.cc | 1091 | ||||
| -rw-r--r-- | src/if2.h | 6965 | ||||
| -rw-r--r-- | src/input.c | 1005 | ||||
| -rw-r--r-- | src/input.h | 175 | ||||
| -rw-r--r-- | src/iter.c | 490 | ||||
| -rw-r--r-- | src/keyops.h | 196 | ||||
| -rw-r--r-- | src/list.c | 105 | ||||
| -rw-r--r-- | src/loadcolm.cc | 2341 | ||||
| -rw-r--r-- | src/loadcolm.h | 24 | ||||
| -rw-r--r-- | src/loadinit.cc | 386 | ||||
| -rw-r--r-- | src/loadinit.h | 68 | ||||
| -rw-r--r-- | src/lookup.cc | 243 | ||||
| -rw-r--r-- | src/main.cc | 670 | ||||
| -rw-r--r-- | src/map.c | 763 | ||||
| -rw-r--r-- | src/map.h | 97 | ||||
| -rw-r--r-- | src/parse1.c | 2329 | ||||
| -rw-r--r-- | src/parse2.c | 30258 | ||||
| -rw-r--r-- | src/parsedata.h | 1022 | ||||
| -rw-r--r-- | src/parser.cc | 947 | ||||
| -rw-r--r-- | src/parser.h | 150 | ||||
| -rw-r--r-- | src/parsetree.cc | 1491 | ||||
| -rw-r--r-- | src/parsetree.h | 3191 | ||||
| -rw-r--r-- | src/pcheck.cc | 154 | ||||
| -rw-r--r-- | src/pcheck.h | 48 | ||||
| -rw-r--r-- | src/pdabuild.cc | 2099 | ||||
| -rw-r--r-- | src/pdacodegen.cc | 642 | ||||
| -rw-r--r-- | src/pdacodegen.h | 105 | ||||
| -rw-r--r-- | src/pdagraph.cc | 533 | ||||
| -rw-r--r-- | src/pdagraph.h | 515 | ||||
| -rw-r--r-- | src/pdarun.c | 2201 | ||||
| -rw-r--r-- | src/pdarun.h | 467 | ||||
| -rw-r--r-- | src/pool.c | 307 | ||||
| -rw-r--r-- | src/pool.h | 83 | ||||
| -rw-r--r-- | src/program.c | 379 | ||||
| -rw-r--r-- | src/program.h | 148 | ||||
| -rw-r--r-- | src/redbuild.cc | 559 | ||||
| -rw-r--r-- | src/redbuild.h | 158 | ||||
| -rw-r--r-- | src/redfsm.cc | 1043 | ||||
| -rw-r--r-- | src/redfsm.h | 475 | ||||
| -rw-r--r-- | src/resolve.cc | 799 | ||||
| -rw-r--r-- | src/rtvector.h | 34 | ||||
| -rw-r--r-- | src/string.c | 246 | ||||
| -rw-r--r-- | src/synthesis.cc | 2687 | ||||
| -rw-r--r-- | src/tree.c | 2263 | ||||
| -rw-r--r-- | src/tree.h | 361 | ||||
| -rw-r--r-- | src/version.h | 2 |
84 files changed, 91569 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..c39371b --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,116 @@ +# +# Copyright 2007-2013 Adrian Thurston <thurston@complang.org> +# + +# This file is part of Colm. +# +# Colm 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 2 of the License, or +# (at your option) any later version. +# +# Colm 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 Colm; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +INCLUDES = -I$(top_srcdir)/aapl + +bin_PROGRAMS = colm +noinst_PROGRAMS = bootstrap0 bootstrap1 + +RUNTIME_SRC = \ + map.c pdarun.c list.c input.c debug.c \ + codevect.c pool.c string.c tree.c iter.c \ + bytecode.c program.c + +RUNTIME_HDR = \ + bytecode.h config.h defs.h debug.h pool.h input.h \ + pdarun.h map.h tree.h program.h colm.h + +lib_LIBRARIES = libcolmp.a libcolmd.a + +noinst_LIBRARIES = libprog.a + +libcolmp_a_SOURCES = $(RUNTIME_SRC) +libcolmp_a_CFLAGS = -Iinclude + +libcolmd_a_SOURCES = $(RUNTIME_SRC) +libcolmd_a_CFLAGS = -Iinclude + +common_CFLAGS = \ + -Wall \ + -DPREFIX='"$(prefix)"' \ + -Iinclude + +libprog_a_SOURCES = \ + buffer.h bytecode.h colm.h debug.h dotgen.h fsmcodegen.h fsmgraph.h \ + input.h keyops.h map.h parsedata.h \ + parsetree.h pcheck.h pdacodegen.h pdagraph.h pdarun.h pool.h redbuild.h \ + redfsm.h rtvector.h tree.h version.h global.h colm.h parser.h cstring.h \ + \ + resolve.cc lookup.cc synthesis.cc parsetree.cc \ + fsmstate.cc fsmbase.cc fsmattach.cc fsmmin.cc \ + fsmgraph.cc pdagraph.cc pdabuild.cc pdacodegen.cc fsmcodegen.cc \ + redfsm.cc fsmexec.cc redbuild.cc closure.cc fsmap.cc \ + dotgen.cc pcheck.cc ctinput.cc declare.cc codegen.cc \ + exports.cc compiler.cc parser.cc + +libprog_a_CXXFLAGS = $(common_CFLAGS) + +bootstrap0_CXXFLAGS = $(common_CFLAGS) -DCONS_INIT +bootstrap0_SOURCES = consinit.cc consinit.h main.cc +bootstrap0_LDADD = libprog.a libcolmd.a + +bootstrap1_CXXFLAGS = $(common_CFLAGS) -DLOAD_INIT +bootstrap1_CFLAGS = $(common_CFLAGS) +bootstrap1_SOURCES = \ + loadinit.h loadinit.cc \ + if1.h if1.cc parse1.c \ + main.cc +bootstrap1_LDADD = libprog.a libcolmd.a + +colm_CXXFLAGS = $(common_CFLAGS) -DLOAD_COLM +colm_CFLAGS = $(common_CFLAGS) +colm_SOURCES = \ + loadcolm.h loadcolm.cc \ + if2.h if2.cc parse2.c \ + main.cc +colm_LDADD = libprog.a libcolmd.a + +colmincdir = $(includedir)/colm + +colminc_HEADERS = $(RUNTIME_HDR) + +parse1.c: bootstrap0 + $(builddir)/bootstrap0 -c -o parse1.c -e if1.h -x if1.cc +if1.h: parse1.c +if1.cc: parse1.c + +parse2.c: bootstrap1 colm.lm + $(builddir)/bootstrap1 -c -o parse2.c -e if2.h -x if2.cc colm.lm +if2.h: parse2.c +if2.cc: parse2.c + +bootstrap1-if1.$(OBJEXT): if1.h if1.cc parse1.c +bootstrap1-loadinit.$(OBJEXT): if1.h if1.cc parse1.c + +colm-if2.$(OBJEXT): if2.h if2.cc parse2.c +colm-loadcolm.$(OBJEXT): if2.h if2.cc parse2.c + +BUILT_SOURCES = version.h include/colm + +include/colm: + mkdir -p include + ln -s .. include/colm + +version.h: Makefile + echo '#define VERSION "$(PACKAGE_VERSION)"' > version.h + echo '#define PUBDATE "$(PUBDATE)"' >> version.h + +CLEANFILES = $(BUILT_SOURCES) +EXTRA_DIST = colm.lm diff --git a/src/Makefile.in b/src/Makefile.in new file mode 100644 index 0000000..3c932d7 --- /dev/null +++ b/src/Makefile.in @@ -0,0 +1,1754 @@ +# Makefile.in generated by automake 1.11.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Copyright 2007-2013 Adrian Thurston <thurston@complang.org> +# + +# This file is part of Colm. +# +# Colm 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 2 of the License, or +# (at your option) any later version. +# +# Colm 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 Colm; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = colm$(EXEEXT) +noinst_PROGRAMS = bootstrap0$(EXEEXT) bootstrap1$(EXEEXT) +subdir = src +DIST_COMMON = $(colminc_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/defs.h.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h defs.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(colmincdir)" +LIBRARIES = $(lib_LIBRARIES) $(noinst_LIBRARIES) +ARFLAGS = cru +libcolmd_a_AR = $(AR) $(ARFLAGS) +libcolmd_a_LIBADD = +am__objects_1 = libcolmd_a-map.$(OBJEXT) libcolmd_a-pdarun.$(OBJEXT) \ + libcolmd_a-list.$(OBJEXT) libcolmd_a-input.$(OBJEXT) \ + libcolmd_a-debug.$(OBJEXT) libcolmd_a-codevect.$(OBJEXT) \ + libcolmd_a-pool.$(OBJEXT) libcolmd_a-string.$(OBJEXT) \ + libcolmd_a-tree.$(OBJEXT) libcolmd_a-iter.$(OBJEXT) \ + libcolmd_a-bytecode.$(OBJEXT) libcolmd_a-program.$(OBJEXT) +am_libcolmd_a_OBJECTS = $(am__objects_1) +libcolmd_a_OBJECTS = $(am_libcolmd_a_OBJECTS) +libcolmp_a_AR = $(AR) $(ARFLAGS) +libcolmp_a_LIBADD = +am__objects_2 = libcolmp_a-map.$(OBJEXT) libcolmp_a-pdarun.$(OBJEXT) \ + libcolmp_a-list.$(OBJEXT) libcolmp_a-input.$(OBJEXT) \ + libcolmp_a-debug.$(OBJEXT) libcolmp_a-codevect.$(OBJEXT) \ + libcolmp_a-pool.$(OBJEXT) libcolmp_a-string.$(OBJEXT) \ + libcolmp_a-tree.$(OBJEXT) libcolmp_a-iter.$(OBJEXT) \ + libcolmp_a-bytecode.$(OBJEXT) libcolmp_a-program.$(OBJEXT) +am_libcolmp_a_OBJECTS = $(am__objects_2) +libcolmp_a_OBJECTS = $(am_libcolmp_a_OBJECTS) +libprog_a_AR = $(AR) $(ARFLAGS) +libprog_a_LIBADD = +am_libprog_a_OBJECTS = libprog_a-resolve.$(OBJEXT) \ + libprog_a-lookup.$(OBJEXT) libprog_a-synthesis.$(OBJEXT) \ + libprog_a-parsetree.$(OBJEXT) libprog_a-fsmstate.$(OBJEXT) \ + libprog_a-fsmbase.$(OBJEXT) libprog_a-fsmattach.$(OBJEXT) \ + libprog_a-fsmmin.$(OBJEXT) libprog_a-fsmgraph.$(OBJEXT) \ + libprog_a-pdagraph.$(OBJEXT) libprog_a-pdabuild.$(OBJEXT) \ + libprog_a-pdacodegen.$(OBJEXT) libprog_a-fsmcodegen.$(OBJEXT) \ + libprog_a-redfsm.$(OBJEXT) libprog_a-fsmexec.$(OBJEXT) \ + libprog_a-redbuild.$(OBJEXT) libprog_a-closure.$(OBJEXT) \ + libprog_a-fsmap.$(OBJEXT) libprog_a-dotgen.$(OBJEXT) \ + libprog_a-pcheck.$(OBJEXT) libprog_a-ctinput.$(OBJEXT) \ + libprog_a-declare.$(OBJEXT) libprog_a-codegen.$(OBJEXT) \ + libprog_a-exports.$(OBJEXT) libprog_a-compiler.$(OBJEXT) \ + libprog_a-parser.$(OBJEXT) +libprog_a_OBJECTS = $(am_libprog_a_OBJECTS) +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) +am_bootstrap0_OBJECTS = bootstrap0-consinit.$(OBJEXT) \ + bootstrap0-main.$(OBJEXT) +bootstrap0_OBJECTS = $(am_bootstrap0_OBJECTS) +bootstrap0_DEPENDENCIES = libprog.a libcolmd.a +bootstrap0_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(bootstrap0_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_bootstrap1_OBJECTS = bootstrap1-loadinit.$(OBJEXT) \ + bootstrap1-if1.$(OBJEXT) bootstrap1-parse1.$(OBJEXT) \ + bootstrap1-main.$(OBJEXT) +bootstrap1_OBJECTS = $(am_bootstrap1_OBJECTS) +bootstrap1_DEPENDENCIES = libprog.a libcolmd.a +bootstrap1_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(bootstrap1_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_colm_OBJECTS = colm-loadcolm.$(OBJEXT) colm-if2.$(OBJEXT) \ + colm-parse2.$(OBJEXT) colm-main.$(OBJEXT) +colm_OBJECTS = $(am_colm_OBJECTS) +colm_DEPENDENCIES = libprog.a libcolmd.a +colm_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(colm_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libcolmd_a_SOURCES) $(libcolmp_a_SOURCES) \ + $(libprog_a_SOURCES) $(bootstrap0_SOURCES) \ + $(bootstrap1_SOURCES) $(colm_SOURCES) +DIST_SOURCES = $(libcolmd_a_SOURCES) $(libcolmp_a_SOURCES) \ + $(libprog_a_SOURCES) $(bootstrap0_SOURCES) \ + $(bootstrap1_SOURCES) $(colm_SOURCES) +HEADERS = $(colminc_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PUBDATE = @PUBDATE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -I$(top_srcdir)/aapl +RUNTIME_SRC = \ + map.c pdarun.c list.c input.c debug.c \ + codevect.c pool.c string.c tree.c iter.c \ + bytecode.c program.c + +RUNTIME_HDR = \ + bytecode.h config.h defs.h debug.h pool.h input.h \ + pdarun.h map.h tree.h program.h colm.h + +lib_LIBRARIES = libcolmp.a libcolmd.a +noinst_LIBRARIES = libprog.a +libcolmp_a_SOURCES = $(RUNTIME_SRC) +libcolmp_a_CFLAGS = -Iinclude +libcolmd_a_SOURCES = $(RUNTIME_SRC) +libcolmd_a_CFLAGS = -Iinclude +common_CFLAGS = \ + -Wall \ + -DPREFIX='"$(prefix)"' \ + -Iinclude + +libprog_a_SOURCES = \ + buffer.h bytecode.h colm.h debug.h dotgen.h fsmcodegen.h fsmgraph.h \ + input.h keyops.h map.h parsedata.h \ + parsetree.h pcheck.h pdacodegen.h pdagraph.h pdarun.h pool.h redbuild.h \ + redfsm.h rtvector.h tree.h version.h global.h colm.h parser.h cstring.h \ + \ + resolve.cc lookup.cc synthesis.cc parsetree.cc \ + fsmstate.cc fsmbase.cc fsmattach.cc fsmmin.cc \ + fsmgraph.cc pdagraph.cc pdabuild.cc pdacodegen.cc fsmcodegen.cc \ + redfsm.cc fsmexec.cc redbuild.cc closure.cc fsmap.cc \ + dotgen.cc pcheck.cc ctinput.cc declare.cc codegen.cc \ + exports.cc compiler.cc parser.cc + +libprog_a_CXXFLAGS = $(common_CFLAGS) +bootstrap0_CXXFLAGS = $(common_CFLAGS) -DCONS_INIT +bootstrap0_SOURCES = consinit.cc consinit.h main.cc +bootstrap0_LDADD = libprog.a libcolmd.a +bootstrap1_CXXFLAGS = $(common_CFLAGS) -DLOAD_INIT +bootstrap1_CFLAGS = $(common_CFLAGS) +bootstrap1_SOURCES = \ + loadinit.h loadinit.cc \ + if1.h if1.cc parse1.c \ + main.cc + +bootstrap1_LDADD = libprog.a libcolmd.a +colm_CXXFLAGS = $(common_CFLAGS) -DLOAD_COLM +colm_CFLAGS = $(common_CFLAGS) +colm_SOURCES = \ + loadcolm.h loadcolm.cc \ + if2.h if2.cc parse2.c \ + main.cc + +colm_LDADD = libprog.a libcolmd.a +colmincdir = $(includedir)/colm +colminc_HEADERS = $(RUNTIME_HDR) +BUILT_SOURCES = version.h include/colm +CLEANFILES = $(BUILT_SOURCES) +EXTRA_DIST = colm.lm +all: $(BUILT_SOURCES) config.h defs.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .cc .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status src/config.h +$(srcdir)/config.h.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +defs.h: stamp-h2 + @if test ! -f $@; then rm -f stamp-h2; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h2; else :; fi + +stamp-h2: $(srcdir)/defs.h.in $(top_builddir)/config.status + @rm -f stamp-h2 + cd $(top_builddir) && $(SHELL) ./config.status src/defs.h + +distclean-hdr: + -rm -f config.h stamp-h1 defs.h stamp-h2 +install-libLIBRARIES: $(lib_LIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } + @$(POST_INSTALL) + @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + if test -f $$p; then \ + $(am__strip_dir) \ + echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ + ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ + else :; fi; \ + done + +uninstall-libLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) + +clean-libLIBRARIES: + -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libcolmd.a: $(libcolmd_a_OBJECTS) $(libcolmd_a_DEPENDENCIES) $(EXTRA_libcolmd_a_DEPENDENCIES) + -rm -f libcolmd.a + $(libcolmd_a_AR) libcolmd.a $(libcolmd_a_OBJECTS) $(libcolmd_a_LIBADD) + $(RANLIB) libcolmd.a +libcolmp.a: $(libcolmp_a_OBJECTS) $(libcolmp_a_DEPENDENCIES) $(EXTRA_libcolmp_a_DEPENDENCIES) + -rm -f libcolmp.a + $(libcolmp_a_AR) libcolmp.a $(libcolmp_a_OBJECTS) $(libcolmp_a_LIBADD) + $(RANLIB) libcolmp.a +libprog.a: $(libprog_a_OBJECTS) $(libprog_a_DEPENDENCIES) $(EXTRA_libprog_a_DEPENDENCIES) + -rm -f libprog.a + $(libprog_a_AR) libprog.a $(libprog_a_OBJECTS) $(libprog_a_LIBADD) + $(RANLIB) libprog.a +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +bootstrap0$(EXEEXT): $(bootstrap0_OBJECTS) $(bootstrap0_DEPENDENCIES) $(EXTRA_bootstrap0_DEPENDENCIES) + @rm -f bootstrap0$(EXEEXT) + $(bootstrap0_LINK) $(bootstrap0_OBJECTS) $(bootstrap0_LDADD) $(LIBS) +bootstrap1$(EXEEXT): $(bootstrap1_OBJECTS) $(bootstrap1_DEPENDENCIES) $(EXTRA_bootstrap1_DEPENDENCIES) + @rm -f bootstrap1$(EXEEXT) + $(bootstrap1_LINK) $(bootstrap1_OBJECTS) $(bootstrap1_LDADD) $(LIBS) +colm$(EXEEXT): $(colm_OBJECTS) $(colm_DEPENDENCIES) $(EXTRA_colm_DEPENDENCIES) + @rm -f colm$(EXEEXT) + $(colm_LINK) $(colm_OBJECTS) $(colm_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootstrap0-consinit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootstrap0-main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootstrap1-if1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootstrap1-loadinit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootstrap1-main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootstrap1-parse1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colm-if2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colm-loadcolm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colm-main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colm-parse2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-bytecode.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-codevect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-debug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-input.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-iter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-list.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-map.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-pdarun.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-pool.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-program.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-string.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-tree.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-bytecode.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-codevect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-debug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-input.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-iter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-list.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-map.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-pdarun.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-pool.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-program.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-string.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-tree.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-closure.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-codegen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-compiler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-ctinput.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-declare.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-dotgen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-exports.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmattach.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmbase.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmcodegen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmexec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmgraph.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmmin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmstate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-lookup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-parsetree.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-pcheck.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-pdabuild.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-pdacodegen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-pdagraph.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-redbuild.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-redfsm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-resolve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-synthesis.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libcolmd_a-map.o: map.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-map.o -MD -MP -MF $(DEPDIR)/libcolmd_a-map.Tpo -c -o libcolmd_a-map.o `test -f 'map.c' || echo '$(srcdir)/'`map.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-map.Tpo $(DEPDIR)/libcolmd_a-map.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='map.c' object='libcolmd_a-map.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-map.o `test -f 'map.c' || echo '$(srcdir)/'`map.c + +libcolmd_a-map.obj: map.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-map.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-map.Tpo -c -o libcolmd_a-map.obj `if test -f 'map.c'; then $(CYGPATH_W) 'map.c'; else $(CYGPATH_W) '$(srcdir)/map.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-map.Tpo $(DEPDIR)/libcolmd_a-map.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='map.c' object='libcolmd_a-map.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-map.obj `if test -f 'map.c'; then $(CYGPATH_W) 'map.c'; else $(CYGPATH_W) '$(srcdir)/map.c'; fi` + +libcolmd_a-pdarun.o: pdarun.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-pdarun.o -MD -MP -MF $(DEPDIR)/libcolmd_a-pdarun.Tpo -c -o libcolmd_a-pdarun.o `test -f 'pdarun.c' || echo '$(srcdir)/'`pdarun.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-pdarun.Tpo $(DEPDIR)/libcolmd_a-pdarun.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdarun.c' object='libcolmd_a-pdarun.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-pdarun.o `test -f 'pdarun.c' || echo '$(srcdir)/'`pdarun.c + +libcolmd_a-pdarun.obj: pdarun.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-pdarun.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-pdarun.Tpo -c -o libcolmd_a-pdarun.obj `if test -f 'pdarun.c'; then $(CYGPATH_W) 'pdarun.c'; else $(CYGPATH_W) '$(srcdir)/pdarun.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-pdarun.Tpo $(DEPDIR)/libcolmd_a-pdarun.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdarun.c' object='libcolmd_a-pdarun.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-pdarun.obj `if test -f 'pdarun.c'; then $(CYGPATH_W) 'pdarun.c'; else $(CYGPATH_W) '$(srcdir)/pdarun.c'; fi` + +libcolmd_a-list.o: list.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-list.o -MD -MP -MF $(DEPDIR)/libcolmd_a-list.Tpo -c -o libcolmd_a-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-list.Tpo $(DEPDIR)/libcolmd_a-list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='libcolmd_a-list.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c + +libcolmd_a-list.obj: list.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-list.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-list.Tpo -c -o libcolmd_a-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-list.Tpo $(DEPDIR)/libcolmd_a-list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='libcolmd_a-list.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi` + +libcolmd_a-input.o: input.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-input.o -MD -MP -MF $(DEPDIR)/libcolmd_a-input.Tpo -c -o libcolmd_a-input.o `test -f 'input.c' || echo '$(srcdir)/'`input.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-input.Tpo $(DEPDIR)/libcolmd_a-input.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='input.c' object='libcolmd_a-input.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-input.o `test -f 'input.c' || echo '$(srcdir)/'`input.c + +libcolmd_a-input.obj: input.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-input.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-input.Tpo -c -o libcolmd_a-input.obj `if test -f 'input.c'; then $(CYGPATH_W) 'input.c'; else $(CYGPATH_W) '$(srcdir)/input.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-input.Tpo $(DEPDIR)/libcolmd_a-input.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='input.c' object='libcolmd_a-input.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-input.obj `if test -f 'input.c'; then $(CYGPATH_W) 'input.c'; else $(CYGPATH_W) '$(srcdir)/input.c'; fi` + +libcolmd_a-debug.o: debug.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-debug.o -MD -MP -MF $(DEPDIR)/libcolmd_a-debug.Tpo -c -o libcolmd_a-debug.o `test -f 'debug.c' || echo '$(srcdir)/'`debug.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-debug.Tpo $(DEPDIR)/libcolmd_a-debug.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='debug.c' object='libcolmd_a-debug.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-debug.o `test -f 'debug.c' || echo '$(srcdir)/'`debug.c + +libcolmd_a-debug.obj: debug.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-debug.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-debug.Tpo -c -o libcolmd_a-debug.obj `if test -f 'debug.c'; then $(CYGPATH_W) 'debug.c'; else $(CYGPATH_W) '$(srcdir)/debug.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-debug.Tpo $(DEPDIR)/libcolmd_a-debug.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='debug.c' object='libcolmd_a-debug.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-debug.obj `if test -f 'debug.c'; then $(CYGPATH_W) 'debug.c'; else $(CYGPATH_W) '$(srcdir)/debug.c'; fi` + +libcolmd_a-codevect.o: codevect.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-codevect.o -MD -MP -MF $(DEPDIR)/libcolmd_a-codevect.Tpo -c -o libcolmd_a-codevect.o `test -f 'codevect.c' || echo '$(srcdir)/'`codevect.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-codevect.Tpo $(DEPDIR)/libcolmd_a-codevect.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codevect.c' object='libcolmd_a-codevect.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-codevect.o `test -f 'codevect.c' || echo '$(srcdir)/'`codevect.c + +libcolmd_a-codevect.obj: codevect.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-codevect.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-codevect.Tpo -c -o libcolmd_a-codevect.obj `if test -f 'codevect.c'; then $(CYGPATH_W) 'codevect.c'; else $(CYGPATH_W) '$(srcdir)/codevect.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-codevect.Tpo $(DEPDIR)/libcolmd_a-codevect.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codevect.c' object='libcolmd_a-codevect.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-codevect.obj `if test -f 'codevect.c'; then $(CYGPATH_W) 'codevect.c'; else $(CYGPATH_W) '$(srcdir)/codevect.c'; fi` + +libcolmd_a-pool.o: pool.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-pool.o -MD -MP -MF $(DEPDIR)/libcolmd_a-pool.Tpo -c -o libcolmd_a-pool.o `test -f 'pool.c' || echo '$(srcdir)/'`pool.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-pool.Tpo $(DEPDIR)/libcolmd_a-pool.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pool.c' object='libcolmd_a-pool.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-pool.o `test -f 'pool.c' || echo '$(srcdir)/'`pool.c + +libcolmd_a-pool.obj: pool.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-pool.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-pool.Tpo -c -o libcolmd_a-pool.obj `if test -f 'pool.c'; then $(CYGPATH_W) 'pool.c'; else $(CYGPATH_W) '$(srcdir)/pool.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-pool.Tpo $(DEPDIR)/libcolmd_a-pool.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pool.c' object='libcolmd_a-pool.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-pool.obj `if test -f 'pool.c'; then $(CYGPATH_W) 'pool.c'; else $(CYGPATH_W) '$(srcdir)/pool.c'; fi` + +libcolmd_a-string.o: string.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-string.o -MD -MP -MF $(DEPDIR)/libcolmd_a-string.Tpo -c -o libcolmd_a-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-string.Tpo $(DEPDIR)/libcolmd_a-string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string.c' object='libcolmd_a-string.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c + +libcolmd_a-string.obj: string.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-string.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-string.Tpo -c -o libcolmd_a-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-string.Tpo $(DEPDIR)/libcolmd_a-string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string.c' object='libcolmd_a-string.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi` + +libcolmd_a-tree.o: tree.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-tree.o -MD -MP -MF $(DEPDIR)/libcolmd_a-tree.Tpo -c -o libcolmd_a-tree.o `test -f 'tree.c' || echo '$(srcdir)/'`tree.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-tree.Tpo $(DEPDIR)/libcolmd_a-tree.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tree.c' object='libcolmd_a-tree.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-tree.o `test -f 'tree.c' || echo '$(srcdir)/'`tree.c + +libcolmd_a-tree.obj: tree.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-tree.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-tree.Tpo -c -o libcolmd_a-tree.obj `if test -f 'tree.c'; then $(CYGPATH_W) 'tree.c'; else $(CYGPATH_W) '$(srcdir)/tree.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-tree.Tpo $(DEPDIR)/libcolmd_a-tree.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tree.c' object='libcolmd_a-tree.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-tree.obj `if test -f 'tree.c'; then $(CYGPATH_W) 'tree.c'; else $(CYGPATH_W) '$(srcdir)/tree.c'; fi` + +libcolmd_a-iter.o: iter.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-iter.o -MD -MP -MF $(DEPDIR)/libcolmd_a-iter.Tpo -c -o libcolmd_a-iter.o `test -f 'iter.c' || echo '$(srcdir)/'`iter.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-iter.Tpo $(DEPDIR)/libcolmd_a-iter.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iter.c' object='libcolmd_a-iter.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-iter.o `test -f 'iter.c' || echo '$(srcdir)/'`iter.c + +libcolmd_a-iter.obj: iter.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-iter.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-iter.Tpo -c -o libcolmd_a-iter.obj `if test -f 'iter.c'; then $(CYGPATH_W) 'iter.c'; else $(CYGPATH_W) '$(srcdir)/iter.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-iter.Tpo $(DEPDIR)/libcolmd_a-iter.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iter.c' object='libcolmd_a-iter.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-iter.obj `if test -f 'iter.c'; then $(CYGPATH_W) 'iter.c'; else $(CYGPATH_W) '$(srcdir)/iter.c'; fi` + +libcolmd_a-bytecode.o: bytecode.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-bytecode.o -MD -MP -MF $(DEPDIR)/libcolmd_a-bytecode.Tpo -c -o libcolmd_a-bytecode.o `test -f 'bytecode.c' || echo '$(srcdir)/'`bytecode.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-bytecode.Tpo $(DEPDIR)/libcolmd_a-bytecode.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bytecode.c' object='libcolmd_a-bytecode.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-bytecode.o `test -f 'bytecode.c' || echo '$(srcdir)/'`bytecode.c + +libcolmd_a-bytecode.obj: bytecode.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-bytecode.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-bytecode.Tpo -c -o libcolmd_a-bytecode.obj `if test -f 'bytecode.c'; then $(CYGPATH_W) 'bytecode.c'; else $(CYGPATH_W) '$(srcdir)/bytecode.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-bytecode.Tpo $(DEPDIR)/libcolmd_a-bytecode.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bytecode.c' object='libcolmd_a-bytecode.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-bytecode.obj `if test -f 'bytecode.c'; then $(CYGPATH_W) 'bytecode.c'; else $(CYGPATH_W) '$(srcdir)/bytecode.c'; fi` + +libcolmd_a-program.o: program.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-program.o -MD -MP -MF $(DEPDIR)/libcolmd_a-program.Tpo -c -o libcolmd_a-program.o `test -f 'program.c' || echo '$(srcdir)/'`program.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-program.Tpo $(DEPDIR)/libcolmd_a-program.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='program.c' object='libcolmd_a-program.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-program.o `test -f 'program.c' || echo '$(srcdir)/'`program.c + +libcolmd_a-program.obj: program.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-program.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-program.Tpo -c -o libcolmd_a-program.obj `if test -f 'program.c'; then $(CYGPATH_W) 'program.c'; else $(CYGPATH_W) '$(srcdir)/program.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-program.Tpo $(DEPDIR)/libcolmd_a-program.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='program.c' object='libcolmd_a-program.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-program.obj `if test -f 'program.c'; then $(CYGPATH_W) 'program.c'; else $(CYGPATH_W) '$(srcdir)/program.c'; fi` + +libcolmp_a-map.o: map.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-map.o -MD -MP -MF $(DEPDIR)/libcolmp_a-map.Tpo -c -o libcolmp_a-map.o `test -f 'map.c' || echo '$(srcdir)/'`map.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-map.Tpo $(DEPDIR)/libcolmp_a-map.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='map.c' object='libcolmp_a-map.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-map.o `test -f 'map.c' || echo '$(srcdir)/'`map.c + +libcolmp_a-map.obj: map.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-map.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-map.Tpo -c -o libcolmp_a-map.obj `if test -f 'map.c'; then $(CYGPATH_W) 'map.c'; else $(CYGPATH_W) '$(srcdir)/map.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-map.Tpo $(DEPDIR)/libcolmp_a-map.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='map.c' object='libcolmp_a-map.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-map.obj `if test -f 'map.c'; then $(CYGPATH_W) 'map.c'; else $(CYGPATH_W) '$(srcdir)/map.c'; fi` + +libcolmp_a-pdarun.o: pdarun.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-pdarun.o -MD -MP -MF $(DEPDIR)/libcolmp_a-pdarun.Tpo -c -o libcolmp_a-pdarun.o `test -f 'pdarun.c' || echo '$(srcdir)/'`pdarun.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-pdarun.Tpo $(DEPDIR)/libcolmp_a-pdarun.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdarun.c' object='libcolmp_a-pdarun.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-pdarun.o `test -f 'pdarun.c' || echo '$(srcdir)/'`pdarun.c + +libcolmp_a-pdarun.obj: pdarun.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-pdarun.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-pdarun.Tpo -c -o libcolmp_a-pdarun.obj `if test -f 'pdarun.c'; then $(CYGPATH_W) 'pdarun.c'; else $(CYGPATH_W) '$(srcdir)/pdarun.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-pdarun.Tpo $(DEPDIR)/libcolmp_a-pdarun.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdarun.c' object='libcolmp_a-pdarun.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-pdarun.obj `if test -f 'pdarun.c'; then $(CYGPATH_W) 'pdarun.c'; else $(CYGPATH_W) '$(srcdir)/pdarun.c'; fi` + +libcolmp_a-list.o: list.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-list.o -MD -MP -MF $(DEPDIR)/libcolmp_a-list.Tpo -c -o libcolmp_a-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-list.Tpo $(DEPDIR)/libcolmp_a-list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='libcolmp_a-list.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c + +libcolmp_a-list.obj: list.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-list.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-list.Tpo -c -o libcolmp_a-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-list.Tpo $(DEPDIR)/libcolmp_a-list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='libcolmp_a-list.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi` + +libcolmp_a-input.o: input.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-input.o -MD -MP -MF $(DEPDIR)/libcolmp_a-input.Tpo -c -o libcolmp_a-input.o `test -f 'input.c' || echo '$(srcdir)/'`input.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-input.Tpo $(DEPDIR)/libcolmp_a-input.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='input.c' object='libcolmp_a-input.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-input.o `test -f 'input.c' || echo '$(srcdir)/'`input.c + +libcolmp_a-input.obj: input.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-input.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-input.Tpo -c -o libcolmp_a-input.obj `if test -f 'input.c'; then $(CYGPATH_W) 'input.c'; else $(CYGPATH_W) '$(srcdir)/input.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-input.Tpo $(DEPDIR)/libcolmp_a-input.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='input.c' object='libcolmp_a-input.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-input.obj `if test -f 'input.c'; then $(CYGPATH_W) 'input.c'; else $(CYGPATH_W) '$(srcdir)/input.c'; fi` + +libcolmp_a-debug.o: debug.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-debug.o -MD -MP -MF $(DEPDIR)/libcolmp_a-debug.Tpo -c -o libcolmp_a-debug.o `test -f 'debug.c' || echo '$(srcdir)/'`debug.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-debug.Tpo $(DEPDIR)/libcolmp_a-debug.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='debug.c' object='libcolmp_a-debug.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-debug.o `test -f 'debug.c' || echo '$(srcdir)/'`debug.c + +libcolmp_a-debug.obj: debug.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-debug.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-debug.Tpo -c -o libcolmp_a-debug.obj `if test -f 'debug.c'; then $(CYGPATH_W) 'debug.c'; else $(CYGPATH_W) '$(srcdir)/debug.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-debug.Tpo $(DEPDIR)/libcolmp_a-debug.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='debug.c' object='libcolmp_a-debug.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-debug.obj `if test -f 'debug.c'; then $(CYGPATH_W) 'debug.c'; else $(CYGPATH_W) '$(srcdir)/debug.c'; fi` + +libcolmp_a-codevect.o: codevect.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-codevect.o -MD -MP -MF $(DEPDIR)/libcolmp_a-codevect.Tpo -c -o libcolmp_a-codevect.o `test -f 'codevect.c' || echo '$(srcdir)/'`codevect.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-codevect.Tpo $(DEPDIR)/libcolmp_a-codevect.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codevect.c' object='libcolmp_a-codevect.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-codevect.o `test -f 'codevect.c' || echo '$(srcdir)/'`codevect.c + +libcolmp_a-codevect.obj: codevect.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-codevect.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-codevect.Tpo -c -o libcolmp_a-codevect.obj `if test -f 'codevect.c'; then $(CYGPATH_W) 'codevect.c'; else $(CYGPATH_W) '$(srcdir)/codevect.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-codevect.Tpo $(DEPDIR)/libcolmp_a-codevect.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codevect.c' object='libcolmp_a-codevect.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-codevect.obj `if test -f 'codevect.c'; then $(CYGPATH_W) 'codevect.c'; else $(CYGPATH_W) '$(srcdir)/codevect.c'; fi` + +libcolmp_a-pool.o: pool.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-pool.o -MD -MP -MF $(DEPDIR)/libcolmp_a-pool.Tpo -c -o libcolmp_a-pool.o `test -f 'pool.c' || echo '$(srcdir)/'`pool.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-pool.Tpo $(DEPDIR)/libcolmp_a-pool.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pool.c' object='libcolmp_a-pool.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-pool.o `test -f 'pool.c' || echo '$(srcdir)/'`pool.c + +libcolmp_a-pool.obj: pool.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-pool.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-pool.Tpo -c -o libcolmp_a-pool.obj `if test -f 'pool.c'; then $(CYGPATH_W) 'pool.c'; else $(CYGPATH_W) '$(srcdir)/pool.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-pool.Tpo $(DEPDIR)/libcolmp_a-pool.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pool.c' object='libcolmp_a-pool.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-pool.obj `if test -f 'pool.c'; then $(CYGPATH_W) 'pool.c'; else $(CYGPATH_W) '$(srcdir)/pool.c'; fi` + +libcolmp_a-string.o: string.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-string.o -MD -MP -MF $(DEPDIR)/libcolmp_a-string.Tpo -c -o libcolmp_a-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-string.Tpo $(DEPDIR)/libcolmp_a-string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string.c' object='libcolmp_a-string.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c + +libcolmp_a-string.obj: string.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-string.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-string.Tpo -c -o libcolmp_a-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-string.Tpo $(DEPDIR)/libcolmp_a-string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string.c' object='libcolmp_a-string.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi` + +libcolmp_a-tree.o: tree.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-tree.o -MD -MP -MF $(DEPDIR)/libcolmp_a-tree.Tpo -c -o libcolmp_a-tree.o `test -f 'tree.c' || echo '$(srcdir)/'`tree.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-tree.Tpo $(DEPDIR)/libcolmp_a-tree.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tree.c' object='libcolmp_a-tree.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-tree.o `test -f 'tree.c' || echo '$(srcdir)/'`tree.c + +libcolmp_a-tree.obj: tree.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-tree.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-tree.Tpo -c -o libcolmp_a-tree.obj `if test -f 'tree.c'; then $(CYGPATH_W) 'tree.c'; else $(CYGPATH_W) '$(srcdir)/tree.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-tree.Tpo $(DEPDIR)/libcolmp_a-tree.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tree.c' object='libcolmp_a-tree.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-tree.obj `if test -f 'tree.c'; then $(CYGPATH_W) 'tree.c'; else $(CYGPATH_W) '$(srcdir)/tree.c'; fi` + +libcolmp_a-iter.o: iter.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-iter.o -MD -MP -MF $(DEPDIR)/libcolmp_a-iter.Tpo -c -o libcolmp_a-iter.o `test -f 'iter.c' || echo '$(srcdir)/'`iter.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-iter.Tpo $(DEPDIR)/libcolmp_a-iter.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iter.c' object='libcolmp_a-iter.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-iter.o `test -f 'iter.c' || echo '$(srcdir)/'`iter.c + +libcolmp_a-iter.obj: iter.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-iter.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-iter.Tpo -c -o libcolmp_a-iter.obj `if test -f 'iter.c'; then $(CYGPATH_W) 'iter.c'; else $(CYGPATH_W) '$(srcdir)/iter.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-iter.Tpo $(DEPDIR)/libcolmp_a-iter.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iter.c' object='libcolmp_a-iter.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-iter.obj `if test -f 'iter.c'; then $(CYGPATH_W) 'iter.c'; else $(CYGPATH_W) '$(srcdir)/iter.c'; fi` + +libcolmp_a-bytecode.o: bytecode.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-bytecode.o -MD -MP -MF $(DEPDIR)/libcolmp_a-bytecode.Tpo -c -o libcolmp_a-bytecode.o `test -f 'bytecode.c' || echo '$(srcdir)/'`bytecode.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-bytecode.Tpo $(DEPDIR)/libcolmp_a-bytecode.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bytecode.c' object='libcolmp_a-bytecode.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-bytecode.o `test -f 'bytecode.c' || echo '$(srcdir)/'`bytecode.c + +libcolmp_a-bytecode.obj: bytecode.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-bytecode.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-bytecode.Tpo -c -o libcolmp_a-bytecode.obj `if test -f 'bytecode.c'; then $(CYGPATH_W) 'bytecode.c'; else $(CYGPATH_W) '$(srcdir)/bytecode.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-bytecode.Tpo $(DEPDIR)/libcolmp_a-bytecode.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bytecode.c' object='libcolmp_a-bytecode.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-bytecode.obj `if test -f 'bytecode.c'; then $(CYGPATH_W) 'bytecode.c'; else $(CYGPATH_W) '$(srcdir)/bytecode.c'; fi` + +libcolmp_a-program.o: program.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-program.o -MD -MP -MF $(DEPDIR)/libcolmp_a-program.Tpo -c -o libcolmp_a-program.o `test -f 'program.c' || echo '$(srcdir)/'`program.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-program.Tpo $(DEPDIR)/libcolmp_a-program.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='program.c' object='libcolmp_a-program.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-program.o `test -f 'program.c' || echo '$(srcdir)/'`program.c + +libcolmp_a-program.obj: program.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-program.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-program.Tpo -c -o libcolmp_a-program.obj `if test -f 'program.c'; then $(CYGPATH_W) 'program.c'; else $(CYGPATH_W) '$(srcdir)/program.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-program.Tpo $(DEPDIR)/libcolmp_a-program.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='program.c' object='libcolmp_a-program.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-program.obj `if test -f 'program.c'; then $(CYGPATH_W) 'program.c'; else $(CYGPATH_W) '$(srcdir)/program.c'; fi` + +bootstrap1-parse1.o: parse1.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CFLAGS) $(CFLAGS) -MT bootstrap1-parse1.o -MD -MP -MF $(DEPDIR)/bootstrap1-parse1.Tpo -c -o bootstrap1-parse1.o `test -f 'parse1.c' || echo '$(srcdir)/'`parse1.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-parse1.Tpo $(DEPDIR)/bootstrap1-parse1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse1.c' object='bootstrap1-parse1.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CFLAGS) $(CFLAGS) -c -o bootstrap1-parse1.o `test -f 'parse1.c' || echo '$(srcdir)/'`parse1.c + +bootstrap1-parse1.obj: parse1.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CFLAGS) $(CFLAGS) -MT bootstrap1-parse1.obj -MD -MP -MF $(DEPDIR)/bootstrap1-parse1.Tpo -c -o bootstrap1-parse1.obj `if test -f 'parse1.c'; then $(CYGPATH_W) 'parse1.c'; else $(CYGPATH_W) '$(srcdir)/parse1.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-parse1.Tpo $(DEPDIR)/bootstrap1-parse1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse1.c' object='bootstrap1-parse1.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CFLAGS) $(CFLAGS) -c -o bootstrap1-parse1.obj `if test -f 'parse1.c'; then $(CYGPATH_W) 'parse1.c'; else $(CYGPATH_W) '$(srcdir)/parse1.c'; fi` + +colm-parse2.o: parse2.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CFLAGS) $(CFLAGS) -MT colm-parse2.o -MD -MP -MF $(DEPDIR)/colm-parse2.Tpo -c -o colm-parse2.o `test -f 'parse2.c' || echo '$(srcdir)/'`parse2.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/colm-parse2.Tpo $(DEPDIR)/colm-parse2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse2.c' object='colm-parse2.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CFLAGS) $(CFLAGS) -c -o colm-parse2.o `test -f 'parse2.c' || echo '$(srcdir)/'`parse2.c + +colm-parse2.obj: parse2.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CFLAGS) $(CFLAGS) -MT colm-parse2.obj -MD -MP -MF $(DEPDIR)/colm-parse2.Tpo -c -o colm-parse2.obj `if test -f 'parse2.c'; then $(CYGPATH_W) 'parse2.c'; else $(CYGPATH_W) '$(srcdir)/parse2.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/colm-parse2.Tpo $(DEPDIR)/colm-parse2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse2.c' object='colm-parse2.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CFLAGS) $(CFLAGS) -c -o colm-parse2.obj `if test -f 'parse2.c'; then $(CYGPATH_W) 'parse2.c'; else $(CYGPATH_W) '$(srcdir)/parse2.c'; fi` + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +libprog_a-resolve.o: resolve.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-resolve.o -MD -MP -MF $(DEPDIR)/libprog_a-resolve.Tpo -c -o libprog_a-resolve.o `test -f 'resolve.cc' || echo '$(srcdir)/'`resolve.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-resolve.Tpo $(DEPDIR)/libprog_a-resolve.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='resolve.cc' object='libprog_a-resolve.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-resolve.o `test -f 'resolve.cc' || echo '$(srcdir)/'`resolve.cc + +libprog_a-resolve.obj: resolve.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-resolve.obj -MD -MP -MF $(DEPDIR)/libprog_a-resolve.Tpo -c -o libprog_a-resolve.obj `if test -f 'resolve.cc'; then $(CYGPATH_W) 'resolve.cc'; else $(CYGPATH_W) '$(srcdir)/resolve.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-resolve.Tpo $(DEPDIR)/libprog_a-resolve.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='resolve.cc' object='libprog_a-resolve.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-resolve.obj `if test -f 'resolve.cc'; then $(CYGPATH_W) 'resolve.cc'; else $(CYGPATH_W) '$(srcdir)/resolve.cc'; fi` + +libprog_a-lookup.o: lookup.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-lookup.o -MD -MP -MF $(DEPDIR)/libprog_a-lookup.Tpo -c -o libprog_a-lookup.o `test -f 'lookup.cc' || echo '$(srcdir)/'`lookup.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-lookup.Tpo $(DEPDIR)/libprog_a-lookup.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lookup.cc' object='libprog_a-lookup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-lookup.o `test -f 'lookup.cc' || echo '$(srcdir)/'`lookup.cc + +libprog_a-lookup.obj: lookup.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-lookup.obj -MD -MP -MF $(DEPDIR)/libprog_a-lookup.Tpo -c -o libprog_a-lookup.obj `if test -f 'lookup.cc'; then $(CYGPATH_W) 'lookup.cc'; else $(CYGPATH_W) '$(srcdir)/lookup.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-lookup.Tpo $(DEPDIR)/libprog_a-lookup.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lookup.cc' object='libprog_a-lookup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-lookup.obj `if test -f 'lookup.cc'; then $(CYGPATH_W) 'lookup.cc'; else $(CYGPATH_W) '$(srcdir)/lookup.cc'; fi` + +libprog_a-synthesis.o: synthesis.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-synthesis.o -MD -MP -MF $(DEPDIR)/libprog_a-synthesis.Tpo -c -o libprog_a-synthesis.o `test -f 'synthesis.cc' || echo '$(srcdir)/'`synthesis.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-synthesis.Tpo $(DEPDIR)/libprog_a-synthesis.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='synthesis.cc' object='libprog_a-synthesis.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-synthesis.o `test -f 'synthesis.cc' || echo '$(srcdir)/'`synthesis.cc + +libprog_a-synthesis.obj: synthesis.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-synthesis.obj -MD -MP -MF $(DEPDIR)/libprog_a-synthesis.Tpo -c -o libprog_a-synthesis.obj `if test -f 'synthesis.cc'; then $(CYGPATH_W) 'synthesis.cc'; else $(CYGPATH_W) '$(srcdir)/synthesis.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-synthesis.Tpo $(DEPDIR)/libprog_a-synthesis.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='synthesis.cc' object='libprog_a-synthesis.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-synthesis.obj `if test -f 'synthesis.cc'; then $(CYGPATH_W) 'synthesis.cc'; else $(CYGPATH_W) '$(srcdir)/synthesis.cc'; fi` + +libprog_a-parsetree.o: parsetree.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-parsetree.o -MD -MP -MF $(DEPDIR)/libprog_a-parsetree.Tpo -c -o libprog_a-parsetree.o `test -f 'parsetree.cc' || echo '$(srcdir)/'`parsetree.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-parsetree.Tpo $(DEPDIR)/libprog_a-parsetree.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parsetree.cc' object='libprog_a-parsetree.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-parsetree.o `test -f 'parsetree.cc' || echo '$(srcdir)/'`parsetree.cc + +libprog_a-parsetree.obj: parsetree.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-parsetree.obj -MD -MP -MF $(DEPDIR)/libprog_a-parsetree.Tpo -c -o libprog_a-parsetree.obj `if test -f 'parsetree.cc'; then $(CYGPATH_W) 'parsetree.cc'; else $(CYGPATH_W) '$(srcdir)/parsetree.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-parsetree.Tpo $(DEPDIR)/libprog_a-parsetree.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parsetree.cc' object='libprog_a-parsetree.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-parsetree.obj `if test -f 'parsetree.cc'; then $(CYGPATH_W) 'parsetree.cc'; else $(CYGPATH_W) '$(srcdir)/parsetree.cc'; fi` + +libprog_a-fsmstate.o: fsmstate.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmstate.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmstate.Tpo -c -o libprog_a-fsmstate.o `test -f 'fsmstate.cc' || echo '$(srcdir)/'`fsmstate.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmstate.Tpo $(DEPDIR)/libprog_a-fsmstate.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmstate.cc' object='libprog_a-fsmstate.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmstate.o `test -f 'fsmstate.cc' || echo '$(srcdir)/'`fsmstate.cc + +libprog_a-fsmstate.obj: fsmstate.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmstate.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmstate.Tpo -c -o libprog_a-fsmstate.obj `if test -f 'fsmstate.cc'; then $(CYGPATH_W) 'fsmstate.cc'; else $(CYGPATH_W) '$(srcdir)/fsmstate.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmstate.Tpo $(DEPDIR)/libprog_a-fsmstate.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmstate.cc' object='libprog_a-fsmstate.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmstate.obj `if test -f 'fsmstate.cc'; then $(CYGPATH_W) 'fsmstate.cc'; else $(CYGPATH_W) '$(srcdir)/fsmstate.cc'; fi` + +libprog_a-fsmbase.o: fsmbase.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmbase.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmbase.Tpo -c -o libprog_a-fsmbase.o `test -f 'fsmbase.cc' || echo '$(srcdir)/'`fsmbase.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmbase.Tpo $(DEPDIR)/libprog_a-fsmbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmbase.cc' object='libprog_a-fsmbase.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmbase.o `test -f 'fsmbase.cc' || echo '$(srcdir)/'`fsmbase.cc + +libprog_a-fsmbase.obj: fsmbase.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmbase.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmbase.Tpo -c -o libprog_a-fsmbase.obj `if test -f 'fsmbase.cc'; then $(CYGPATH_W) 'fsmbase.cc'; else $(CYGPATH_W) '$(srcdir)/fsmbase.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmbase.Tpo $(DEPDIR)/libprog_a-fsmbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmbase.cc' object='libprog_a-fsmbase.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmbase.obj `if test -f 'fsmbase.cc'; then $(CYGPATH_W) 'fsmbase.cc'; else $(CYGPATH_W) '$(srcdir)/fsmbase.cc'; fi` + +libprog_a-fsmattach.o: fsmattach.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmattach.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmattach.Tpo -c -o libprog_a-fsmattach.o `test -f 'fsmattach.cc' || echo '$(srcdir)/'`fsmattach.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmattach.Tpo $(DEPDIR)/libprog_a-fsmattach.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmattach.cc' object='libprog_a-fsmattach.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmattach.o `test -f 'fsmattach.cc' || echo '$(srcdir)/'`fsmattach.cc + +libprog_a-fsmattach.obj: fsmattach.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmattach.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmattach.Tpo -c -o libprog_a-fsmattach.obj `if test -f 'fsmattach.cc'; then $(CYGPATH_W) 'fsmattach.cc'; else $(CYGPATH_W) '$(srcdir)/fsmattach.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmattach.Tpo $(DEPDIR)/libprog_a-fsmattach.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmattach.cc' object='libprog_a-fsmattach.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmattach.obj `if test -f 'fsmattach.cc'; then $(CYGPATH_W) 'fsmattach.cc'; else $(CYGPATH_W) '$(srcdir)/fsmattach.cc'; fi` + +libprog_a-fsmmin.o: fsmmin.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmmin.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmmin.Tpo -c -o libprog_a-fsmmin.o `test -f 'fsmmin.cc' || echo '$(srcdir)/'`fsmmin.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmmin.Tpo $(DEPDIR)/libprog_a-fsmmin.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmmin.cc' object='libprog_a-fsmmin.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmmin.o `test -f 'fsmmin.cc' || echo '$(srcdir)/'`fsmmin.cc + +libprog_a-fsmmin.obj: fsmmin.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmmin.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmmin.Tpo -c -o libprog_a-fsmmin.obj `if test -f 'fsmmin.cc'; then $(CYGPATH_W) 'fsmmin.cc'; else $(CYGPATH_W) '$(srcdir)/fsmmin.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmmin.Tpo $(DEPDIR)/libprog_a-fsmmin.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmmin.cc' object='libprog_a-fsmmin.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmmin.obj `if test -f 'fsmmin.cc'; then $(CYGPATH_W) 'fsmmin.cc'; else $(CYGPATH_W) '$(srcdir)/fsmmin.cc'; fi` + +libprog_a-fsmgraph.o: fsmgraph.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmgraph.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmgraph.Tpo -c -o libprog_a-fsmgraph.o `test -f 'fsmgraph.cc' || echo '$(srcdir)/'`fsmgraph.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmgraph.Tpo $(DEPDIR)/libprog_a-fsmgraph.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmgraph.cc' object='libprog_a-fsmgraph.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmgraph.o `test -f 'fsmgraph.cc' || echo '$(srcdir)/'`fsmgraph.cc + +libprog_a-fsmgraph.obj: fsmgraph.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmgraph.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmgraph.Tpo -c -o libprog_a-fsmgraph.obj `if test -f 'fsmgraph.cc'; then $(CYGPATH_W) 'fsmgraph.cc'; else $(CYGPATH_W) '$(srcdir)/fsmgraph.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmgraph.Tpo $(DEPDIR)/libprog_a-fsmgraph.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmgraph.cc' object='libprog_a-fsmgraph.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmgraph.obj `if test -f 'fsmgraph.cc'; then $(CYGPATH_W) 'fsmgraph.cc'; else $(CYGPATH_W) '$(srcdir)/fsmgraph.cc'; fi` + +libprog_a-pdagraph.o: pdagraph.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pdagraph.o -MD -MP -MF $(DEPDIR)/libprog_a-pdagraph.Tpo -c -o libprog_a-pdagraph.o `test -f 'pdagraph.cc' || echo '$(srcdir)/'`pdagraph.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pdagraph.Tpo $(DEPDIR)/libprog_a-pdagraph.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pdagraph.cc' object='libprog_a-pdagraph.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pdagraph.o `test -f 'pdagraph.cc' || echo '$(srcdir)/'`pdagraph.cc + +libprog_a-pdagraph.obj: pdagraph.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pdagraph.obj -MD -MP -MF $(DEPDIR)/libprog_a-pdagraph.Tpo -c -o libprog_a-pdagraph.obj `if test -f 'pdagraph.cc'; then $(CYGPATH_W) 'pdagraph.cc'; else $(CYGPATH_W) '$(srcdir)/pdagraph.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pdagraph.Tpo $(DEPDIR)/libprog_a-pdagraph.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pdagraph.cc' object='libprog_a-pdagraph.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pdagraph.obj `if test -f 'pdagraph.cc'; then $(CYGPATH_W) 'pdagraph.cc'; else $(CYGPATH_W) '$(srcdir)/pdagraph.cc'; fi` + +libprog_a-pdabuild.o: pdabuild.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pdabuild.o -MD -MP -MF $(DEPDIR)/libprog_a-pdabuild.Tpo -c -o libprog_a-pdabuild.o `test -f 'pdabuild.cc' || echo '$(srcdir)/'`pdabuild.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pdabuild.Tpo $(DEPDIR)/libprog_a-pdabuild.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pdabuild.cc' object='libprog_a-pdabuild.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pdabuild.o `test -f 'pdabuild.cc' || echo '$(srcdir)/'`pdabuild.cc + +libprog_a-pdabuild.obj: pdabuild.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pdabuild.obj -MD -MP -MF $(DEPDIR)/libprog_a-pdabuild.Tpo -c -o libprog_a-pdabuild.obj `if test -f 'pdabuild.cc'; then $(CYGPATH_W) 'pdabuild.cc'; else $(CYGPATH_W) '$(srcdir)/pdabuild.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pdabuild.Tpo $(DEPDIR)/libprog_a-pdabuild.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pdabuild.cc' object='libprog_a-pdabuild.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pdabuild.obj `if test -f 'pdabuild.cc'; then $(CYGPATH_W) 'pdabuild.cc'; else $(CYGPATH_W) '$(srcdir)/pdabuild.cc'; fi` + +libprog_a-pdacodegen.o: pdacodegen.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pdacodegen.o -MD -MP -MF $(DEPDIR)/libprog_a-pdacodegen.Tpo -c -o libprog_a-pdacodegen.o `test -f 'pdacodegen.cc' || echo '$(srcdir)/'`pdacodegen.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pdacodegen.Tpo $(DEPDIR)/libprog_a-pdacodegen.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pdacodegen.cc' object='libprog_a-pdacodegen.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pdacodegen.o `test -f 'pdacodegen.cc' || echo '$(srcdir)/'`pdacodegen.cc + +libprog_a-pdacodegen.obj: pdacodegen.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pdacodegen.obj -MD -MP -MF $(DEPDIR)/libprog_a-pdacodegen.Tpo -c -o libprog_a-pdacodegen.obj `if test -f 'pdacodegen.cc'; then $(CYGPATH_W) 'pdacodegen.cc'; else $(CYGPATH_W) '$(srcdir)/pdacodegen.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pdacodegen.Tpo $(DEPDIR)/libprog_a-pdacodegen.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pdacodegen.cc' object='libprog_a-pdacodegen.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pdacodegen.obj `if test -f 'pdacodegen.cc'; then $(CYGPATH_W) 'pdacodegen.cc'; else $(CYGPATH_W) '$(srcdir)/pdacodegen.cc'; fi` + +libprog_a-fsmcodegen.o: fsmcodegen.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmcodegen.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmcodegen.Tpo -c -o libprog_a-fsmcodegen.o `test -f 'fsmcodegen.cc' || echo '$(srcdir)/'`fsmcodegen.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmcodegen.Tpo $(DEPDIR)/libprog_a-fsmcodegen.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmcodegen.cc' object='libprog_a-fsmcodegen.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmcodegen.o `test -f 'fsmcodegen.cc' || echo '$(srcdir)/'`fsmcodegen.cc + +libprog_a-fsmcodegen.obj: fsmcodegen.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmcodegen.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmcodegen.Tpo -c -o libprog_a-fsmcodegen.obj `if test -f 'fsmcodegen.cc'; then $(CYGPATH_W) 'fsmcodegen.cc'; else $(CYGPATH_W) '$(srcdir)/fsmcodegen.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmcodegen.Tpo $(DEPDIR)/libprog_a-fsmcodegen.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmcodegen.cc' object='libprog_a-fsmcodegen.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmcodegen.obj `if test -f 'fsmcodegen.cc'; then $(CYGPATH_W) 'fsmcodegen.cc'; else $(CYGPATH_W) '$(srcdir)/fsmcodegen.cc'; fi` + +libprog_a-redfsm.o: redfsm.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-redfsm.o -MD -MP -MF $(DEPDIR)/libprog_a-redfsm.Tpo -c -o libprog_a-redfsm.o `test -f 'redfsm.cc' || echo '$(srcdir)/'`redfsm.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-redfsm.Tpo $(DEPDIR)/libprog_a-redfsm.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redfsm.cc' object='libprog_a-redfsm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-redfsm.o `test -f 'redfsm.cc' || echo '$(srcdir)/'`redfsm.cc + +libprog_a-redfsm.obj: redfsm.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-redfsm.obj -MD -MP -MF $(DEPDIR)/libprog_a-redfsm.Tpo -c -o libprog_a-redfsm.obj `if test -f 'redfsm.cc'; then $(CYGPATH_W) 'redfsm.cc'; else $(CYGPATH_W) '$(srcdir)/redfsm.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-redfsm.Tpo $(DEPDIR)/libprog_a-redfsm.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redfsm.cc' object='libprog_a-redfsm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-redfsm.obj `if test -f 'redfsm.cc'; then $(CYGPATH_W) 'redfsm.cc'; else $(CYGPATH_W) '$(srcdir)/redfsm.cc'; fi` + +libprog_a-fsmexec.o: fsmexec.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmexec.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmexec.Tpo -c -o libprog_a-fsmexec.o `test -f 'fsmexec.cc' || echo '$(srcdir)/'`fsmexec.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmexec.Tpo $(DEPDIR)/libprog_a-fsmexec.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmexec.cc' object='libprog_a-fsmexec.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmexec.o `test -f 'fsmexec.cc' || echo '$(srcdir)/'`fsmexec.cc + +libprog_a-fsmexec.obj: fsmexec.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmexec.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmexec.Tpo -c -o libprog_a-fsmexec.obj `if test -f 'fsmexec.cc'; then $(CYGPATH_W) 'fsmexec.cc'; else $(CYGPATH_W) '$(srcdir)/fsmexec.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmexec.Tpo $(DEPDIR)/libprog_a-fsmexec.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmexec.cc' object='libprog_a-fsmexec.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmexec.obj `if test -f 'fsmexec.cc'; then $(CYGPATH_W) 'fsmexec.cc'; else $(CYGPATH_W) '$(srcdir)/fsmexec.cc'; fi` + +libprog_a-redbuild.o: redbuild.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-redbuild.o -MD -MP -MF $(DEPDIR)/libprog_a-redbuild.Tpo -c -o libprog_a-redbuild.o `test -f 'redbuild.cc' || echo '$(srcdir)/'`redbuild.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-redbuild.Tpo $(DEPDIR)/libprog_a-redbuild.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redbuild.cc' object='libprog_a-redbuild.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-redbuild.o `test -f 'redbuild.cc' || echo '$(srcdir)/'`redbuild.cc + +libprog_a-redbuild.obj: redbuild.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-redbuild.obj -MD -MP -MF $(DEPDIR)/libprog_a-redbuild.Tpo -c -o libprog_a-redbuild.obj `if test -f 'redbuild.cc'; then $(CYGPATH_W) 'redbuild.cc'; else $(CYGPATH_W) '$(srcdir)/redbuild.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-redbuild.Tpo $(DEPDIR)/libprog_a-redbuild.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redbuild.cc' object='libprog_a-redbuild.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-redbuild.obj `if test -f 'redbuild.cc'; then $(CYGPATH_W) 'redbuild.cc'; else $(CYGPATH_W) '$(srcdir)/redbuild.cc'; fi` + +libprog_a-closure.o: closure.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-closure.o -MD -MP -MF $(DEPDIR)/libprog_a-closure.Tpo -c -o libprog_a-closure.o `test -f 'closure.cc' || echo '$(srcdir)/'`closure.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-closure.Tpo $(DEPDIR)/libprog_a-closure.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='closure.cc' object='libprog_a-closure.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-closure.o `test -f 'closure.cc' || echo '$(srcdir)/'`closure.cc + +libprog_a-closure.obj: closure.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-closure.obj -MD -MP -MF $(DEPDIR)/libprog_a-closure.Tpo -c -o libprog_a-closure.obj `if test -f 'closure.cc'; then $(CYGPATH_W) 'closure.cc'; else $(CYGPATH_W) '$(srcdir)/closure.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-closure.Tpo $(DEPDIR)/libprog_a-closure.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='closure.cc' object='libprog_a-closure.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-closure.obj `if test -f 'closure.cc'; then $(CYGPATH_W) 'closure.cc'; else $(CYGPATH_W) '$(srcdir)/closure.cc'; fi` + +libprog_a-fsmap.o: fsmap.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmap.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmap.Tpo -c -o libprog_a-fsmap.o `test -f 'fsmap.cc' || echo '$(srcdir)/'`fsmap.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmap.Tpo $(DEPDIR)/libprog_a-fsmap.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmap.cc' object='libprog_a-fsmap.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmap.o `test -f 'fsmap.cc' || echo '$(srcdir)/'`fsmap.cc + +libprog_a-fsmap.obj: fsmap.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmap.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmap.Tpo -c -o libprog_a-fsmap.obj `if test -f 'fsmap.cc'; then $(CYGPATH_W) 'fsmap.cc'; else $(CYGPATH_W) '$(srcdir)/fsmap.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmap.Tpo $(DEPDIR)/libprog_a-fsmap.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmap.cc' object='libprog_a-fsmap.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmap.obj `if test -f 'fsmap.cc'; then $(CYGPATH_W) 'fsmap.cc'; else $(CYGPATH_W) '$(srcdir)/fsmap.cc'; fi` + +libprog_a-dotgen.o: dotgen.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-dotgen.o -MD -MP -MF $(DEPDIR)/libprog_a-dotgen.Tpo -c -o libprog_a-dotgen.o `test -f 'dotgen.cc' || echo '$(srcdir)/'`dotgen.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-dotgen.Tpo $(DEPDIR)/libprog_a-dotgen.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dotgen.cc' object='libprog_a-dotgen.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-dotgen.o `test -f 'dotgen.cc' || echo '$(srcdir)/'`dotgen.cc + +libprog_a-dotgen.obj: dotgen.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-dotgen.obj -MD -MP -MF $(DEPDIR)/libprog_a-dotgen.Tpo -c -o libprog_a-dotgen.obj `if test -f 'dotgen.cc'; then $(CYGPATH_W) 'dotgen.cc'; else $(CYGPATH_W) '$(srcdir)/dotgen.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-dotgen.Tpo $(DEPDIR)/libprog_a-dotgen.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dotgen.cc' object='libprog_a-dotgen.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-dotgen.obj `if test -f 'dotgen.cc'; then $(CYGPATH_W) 'dotgen.cc'; else $(CYGPATH_W) '$(srcdir)/dotgen.cc'; fi` + +libprog_a-pcheck.o: pcheck.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pcheck.o -MD -MP -MF $(DEPDIR)/libprog_a-pcheck.Tpo -c -o libprog_a-pcheck.o `test -f 'pcheck.cc' || echo '$(srcdir)/'`pcheck.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pcheck.Tpo $(DEPDIR)/libprog_a-pcheck.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pcheck.cc' object='libprog_a-pcheck.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pcheck.o `test -f 'pcheck.cc' || echo '$(srcdir)/'`pcheck.cc + +libprog_a-pcheck.obj: pcheck.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pcheck.obj -MD -MP -MF $(DEPDIR)/libprog_a-pcheck.Tpo -c -o libprog_a-pcheck.obj `if test -f 'pcheck.cc'; then $(CYGPATH_W) 'pcheck.cc'; else $(CYGPATH_W) '$(srcdir)/pcheck.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pcheck.Tpo $(DEPDIR)/libprog_a-pcheck.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pcheck.cc' object='libprog_a-pcheck.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pcheck.obj `if test -f 'pcheck.cc'; then $(CYGPATH_W) 'pcheck.cc'; else $(CYGPATH_W) '$(srcdir)/pcheck.cc'; fi` + +libprog_a-ctinput.o: ctinput.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-ctinput.o -MD -MP -MF $(DEPDIR)/libprog_a-ctinput.Tpo -c -o libprog_a-ctinput.o `test -f 'ctinput.cc' || echo '$(srcdir)/'`ctinput.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-ctinput.Tpo $(DEPDIR)/libprog_a-ctinput.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ctinput.cc' object='libprog_a-ctinput.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-ctinput.o `test -f 'ctinput.cc' || echo '$(srcdir)/'`ctinput.cc + +libprog_a-ctinput.obj: ctinput.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-ctinput.obj -MD -MP -MF $(DEPDIR)/libprog_a-ctinput.Tpo -c -o libprog_a-ctinput.obj `if test -f 'ctinput.cc'; then $(CYGPATH_W) 'ctinput.cc'; else $(CYGPATH_W) '$(srcdir)/ctinput.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-ctinput.Tpo $(DEPDIR)/libprog_a-ctinput.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ctinput.cc' object='libprog_a-ctinput.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-ctinput.obj `if test -f 'ctinput.cc'; then $(CYGPATH_W) 'ctinput.cc'; else $(CYGPATH_W) '$(srcdir)/ctinput.cc'; fi` + +libprog_a-declare.o: declare.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-declare.o -MD -MP -MF $(DEPDIR)/libprog_a-declare.Tpo -c -o libprog_a-declare.o `test -f 'declare.cc' || echo '$(srcdir)/'`declare.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-declare.Tpo $(DEPDIR)/libprog_a-declare.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='declare.cc' object='libprog_a-declare.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-declare.o `test -f 'declare.cc' || echo '$(srcdir)/'`declare.cc + +libprog_a-declare.obj: declare.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-declare.obj -MD -MP -MF $(DEPDIR)/libprog_a-declare.Tpo -c -o libprog_a-declare.obj `if test -f 'declare.cc'; then $(CYGPATH_W) 'declare.cc'; else $(CYGPATH_W) '$(srcdir)/declare.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-declare.Tpo $(DEPDIR)/libprog_a-declare.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='declare.cc' object='libprog_a-declare.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-declare.obj `if test -f 'declare.cc'; then $(CYGPATH_W) 'declare.cc'; else $(CYGPATH_W) '$(srcdir)/declare.cc'; fi` + +libprog_a-codegen.o: codegen.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-codegen.o -MD -MP -MF $(DEPDIR)/libprog_a-codegen.Tpo -c -o libprog_a-codegen.o `test -f 'codegen.cc' || echo '$(srcdir)/'`codegen.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-codegen.Tpo $(DEPDIR)/libprog_a-codegen.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='codegen.cc' object='libprog_a-codegen.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-codegen.o `test -f 'codegen.cc' || echo '$(srcdir)/'`codegen.cc + +libprog_a-codegen.obj: codegen.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-codegen.obj -MD -MP -MF $(DEPDIR)/libprog_a-codegen.Tpo -c -o libprog_a-codegen.obj `if test -f 'codegen.cc'; then $(CYGPATH_W) 'codegen.cc'; else $(CYGPATH_W) '$(srcdir)/codegen.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-codegen.Tpo $(DEPDIR)/libprog_a-codegen.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='codegen.cc' object='libprog_a-codegen.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-codegen.obj `if test -f 'codegen.cc'; then $(CYGPATH_W) 'codegen.cc'; else $(CYGPATH_W) '$(srcdir)/codegen.cc'; fi` + +libprog_a-exports.o: exports.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-exports.o -MD -MP -MF $(DEPDIR)/libprog_a-exports.Tpo -c -o libprog_a-exports.o `test -f 'exports.cc' || echo '$(srcdir)/'`exports.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-exports.Tpo $(DEPDIR)/libprog_a-exports.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='exports.cc' object='libprog_a-exports.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-exports.o `test -f 'exports.cc' || echo '$(srcdir)/'`exports.cc + +libprog_a-exports.obj: exports.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-exports.obj -MD -MP -MF $(DEPDIR)/libprog_a-exports.Tpo -c -o libprog_a-exports.obj `if test -f 'exports.cc'; then $(CYGPATH_W) 'exports.cc'; else $(CYGPATH_W) '$(srcdir)/exports.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-exports.Tpo $(DEPDIR)/libprog_a-exports.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='exports.cc' object='libprog_a-exports.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-exports.obj `if test -f 'exports.cc'; then $(CYGPATH_W) 'exports.cc'; else $(CYGPATH_W) '$(srcdir)/exports.cc'; fi` + +libprog_a-compiler.o: compiler.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-compiler.o -MD -MP -MF $(DEPDIR)/libprog_a-compiler.Tpo -c -o libprog_a-compiler.o `test -f 'compiler.cc' || echo '$(srcdir)/'`compiler.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-compiler.Tpo $(DEPDIR)/libprog_a-compiler.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='compiler.cc' object='libprog_a-compiler.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-compiler.o `test -f 'compiler.cc' || echo '$(srcdir)/'`compiler.cc + +libprog_a-compiler.obj: compiler.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-compiler.obj -MD -MP -MF $(DEPDIR)/libprog_a-compiler.Tpo -c -o libprog_a-compiler.obj `if test -f 'compiler.cc'; then $(CYGPATH_W) 'compiler.cc'; else $(CYGPATH_W) '$(srcdir)/compiler.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-compiler.Tpo $(DEPDIR)/libprog_a-compiler.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='compiler.cc' object='libprog_a-compiler.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-compiler.obj `if test -f 'compiler.cc'; then $(CYGPATH_W) 'compiler.cc'; else $(CYGPATH_W) '$(srcdir)/compiler.cc'; fi` + +libprog_a-parser.o: parser.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-parser.o -MD -MP -MF $(DEPDIR)/libprog_a-parser.Tpo -c -o libprog_a-parser.o `test -f 'parser.cc' || echo '$(srcdir)/'`parser.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-parser.Tpo $(DEPDIR)/libprog_a-parser.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parser.cc' object='libprog_a-parser.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-parser.o `test -f 'parser.cc' || echo '$(srcdir)/'`parser.cc + +libprog_a-parser.obj: parser.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-parser.obj -MD -MP -MF $(DEPDIR)/libprog_a-parser.Tpo -c -o libprog_a-parser.obj `if test -f 'parser.cc'; then $(CYGPATH_W) 'parser.cc'; else $(CYGPATH_W) '$(srcdir)/parser.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-parser.Tpo $(DEPDIR)/libprog_a-parser.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parser.cc' object='libprog_a-parser.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-parser.obj `if test -f 'parser.cc'; then $(CYGPATH_W) 'parser.cc'; else $(CYGPATH_W) '$(srcdir)/parser.cc'; fi` + +bootstrap0-consinit.o: consinit.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -MT bootstrap0-consinit.o -MD -MP -MF $(DEPDIR)/bootstrap0-consinit.Tpo -c -o bootstrap0-consinit.o `test -f 'consinit.cc' || echo '$(srcdir)/'`consinit.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap0-consinit.Tpo $(DEPDIR)/bootstrap0-consinit.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='consinit.cc' object='bootstrap0-consinit.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap0-consinit.o `test -f 'consinit.cc' || echo '$(srcdir)/'`consinit.cc + +bootstrap0-consinit.obj: consinit.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -MT bootstrap0-consinit.obj -MD -MP -MF $(DEPDIR)/bootstrap0-consinit.Tpo -c -o bootstrap0-consinit.obj `if test -f 'consinit.cc'; then $(CYGPATH_W) 'consinit.cc'; else $(CYGPATH_W) '$(srcdir)/consinit.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap0-consinit.Tpo $(DEPDIR)/bootstrap0-consinit.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='consinit.cc' object='bootstrap0-consinit.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap0-consinit.obj `if test -f 'consinit.cc'; then $(CYGPATH_W) 'consinit.cc'; else $(CYGPATH_W) '$(srcdir)/consinit.cc'; fi` + +bootstrap0-main.o: main.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -MT bootstrap0-main.o -MD -MP -MF $(DEPDIR)/bootstrap0-main.Tpo -c -o bootstrap0-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap0-main.Tpo $(DEPDIR)/bootstrap0-main.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='bootstrap0-main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap0-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc + +bootstrap0-main.obj: main.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -MT bootstrap0-main.obj -MD -MP -MF $(DEPDIR)/bootstrap0-main.Tpo -c -o bootstrap0-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap0-main.Tpo $(DEPDIR)/bootstrap0-main.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='bootstrap0-main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap0-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi` + +bootstrap1-loadinit.o: loadinit.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -MT bootstrap1-loadinit.o -MD -MP -MF $(DEPDIR)/bootstrap1-loadinit.Tpo -c -o bootstrap1-loadinit.o `test -f 'loadinit.cc' || echo '$(srcdir)/'`loadinit.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-loadinit.Tpo $(DEPDIR)/bootstrap1-loadinit.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loadinit.cc' object='bootstrap1-loadinit.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap1-loadinit.o `test -f 'loadinit.cc' || echo '$(srcdir)/'`loadinit.cc + +bootstrap1-loadinit.obj: loadinit.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -MT bootstrap1-loadinit.obj -MD -MP -MF $(DEPDIR)/bootstrap1-loadinit.Tpo -c -o bootstrap1-loadinit.obj `if test -f 'loadinit.cc'; then $(CYGPATH_W) 'loadinit.cc'; else $(CYGPATH_W) '$(srcdir)/loadinit.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-loadinit.Tpo $(DEPDIR)/bootstrap1-loadinit.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loadinit.cc' object='bootstrap1-loadinit.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap1-loadinit.obj `if test -f 'loadinit.cc'; then $(CYGPATH_W) 'loadinit.cc'; else $(CYGPATH_W) '$(srcdir)/loadinit.cc'; fi` + +bootstrap1-if1.o: if1.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -MT bootstrap1-if1.o -MD -MP -MF $(DEPDIR)/bootstrap1-if1.Tpo -c -o bootstrap1-if1.o `test -f 'if1.cc' || echo '$(srcdir)/'`if1.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-if1.Tpo $(DEPDIR)/bootstrap1-if1.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='if1.cc' object='bootstrap1-if1.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap1-if1.o `test -f 'if1.cc' || echo '$(srcdir)/'`if1.cc + +bootstrap1-if1.obj: if1.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -MT bootstrap1-if1.obj -MD -MP -MF $(DEPDIR)/bootstrap1-if1.Tpo -c -o bootstrap1-if1.obj `if test -f 'if1.cc'; then $(CYGPATH_W) 'if1.cc'; else $(CYGPATH_W) '$(srcdir)/if1.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-if1.Tpo $(DEPDIR)/bootstrap1-if1.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='if1.cc' object='bootstrap1-if1.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap1-if1.obj `if test -f 'if1.cc'; then $(CYGPATH_W) 'if1.cc'; else $(CYGPATH_W) '$(srcdir)/if1.cc'; fi` + +bootstrap1-main.o: main.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -MT bootstrap1-main.o -MD -MP -MF $(DEPDIR)/bootstrap1-main.Tpo -c -o bootstrap1-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-main.Tpo $(DEPDIR)/bootstrap1-main.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='bootstrap1-main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap1-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc + +bootstrap1-main.obj: main.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -MT bootstrap1-main.obj -MD -MP -MF $(DEPDIR)/bootstrap1-main.Tpo -c -o bootstrap1-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-main.Tpo $(DEPDIR)/bootstrap1-main.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='bootstrap1-main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap1-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi` + +colm-loadcolm.o: loadcolm.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -MT colm-loadcolm.o -MD -MP -MF $(DEPDIR)/colm-loadcolm.Tpo -c -o colm-loadcolm.o `test -f 'loadcolm.cc' || echo '$(srcdir)/'`loadcolm.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/colm-loadcolm.Tpo $(DEPDIR)/colm-loadcolm.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loadcolm.cc' object='colm-loadcolm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -c -o colm-loadcolm.o `test -f 'loadcolm.cc' || echo '$(srcdir)/'`loadcolm.cc + +colm-loadcolm.obj: loadcolm.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -MT colm-loadcolm.obj -MD -MP -MF $(DEPDIR)/colm-loadcolm.Tpo -c -o colm-loadcolm.obj `if test -f 'loadcolm.cc'; then $(CYGPATH_W) 'loadcolm.cc'; else $(CYGPATH_W) '$(srcdir)/loadcolm.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/colm-loadcolm.Tpo $(DEPDIR)/colm-loadcolm.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loadcolm.cc' object='colm-loadcolm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -c -o colm-loadcolm.obj `if test -f 'loadcolm.cc'; then $(CYGPATH_W) 'loadcolm.cc'; else $(CYGPATH_W) '$(srcdir)/loadcolm.cc'; fi` + +colm-if2.o: if2.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -MT colm-if2.o -MD -MP -MF $(DEPDIR)/colm-if2.Tpo -c -o colm-if2.o `test -f 'if2.cc' || echo '$(srcdir)/'`if2.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/colm-if2.Tpo $(DEPDIR)/colm-if2.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='if2.cc' object='colm-if2.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -c -o colm-if2.o `test -f 'if2.cc' || echo '$(srcdir)/'`if2.cc + +colm-if2.obj: if2.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -MT colm-if2.obj -MD -MP -MF $(DEPDIR)/colm-if2.Tpo -c -o colm-if2.obj `if test -f 'if2.cc'; then $(CYGPATH_W) 'if2.cc'; else $(CYGPATH_W) '$(srcdir)/if2.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/colm-if2.Tpo $(DEPDIR)/colm-if2.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='if2.cc' object='colm-if2.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -c -o colm-if2.obj `if test -f 'if2.cc'; then $(CYGPATH_W) 'if2.cc'; else $(CYGPATH_W) '$(srcdir)/if2.cc'; fi` + +colm-main.o: main.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -MT colm-main.o -MD -MP -MF $(DEPDIR)/colm-main.Tpo -c -o colm-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/colm-main.Tpo $(DEPDIR)/colm-main.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='colm-main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -c -o colm-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc + +colm-main.obj: main.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -MT colm-main.obj -MD -MP -MF $(DEPDIR)/colm-main.Tpo -c -o colm-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/colm-main.Tpo $(DEPDIR)/colm-main.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='colm-main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -c -o colm-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-colmincHEADERS: $(colminc_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(colmincdir)" || $(MKDIR_P) "$(DESTDIR)$(colmincdir)" + @list='$(colminc_HEADERS)'; test -n "$(colmincdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(colmincdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(colmincdir)" || exit $$?; \ + done + +uninstall-colmincHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(colminc_HEADERS)'; test -n "$(colmincdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(colmincdir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) config.h.in defs.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in defs.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) config.h.in defs.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) config.h.in defs.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) config.h defs.h +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(colmincdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libLIBRARIES \ + clean-libtool clean-noinstLIBRARIES clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-colmincHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-libLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-colmincHEADERS \ + uninstall-libLIBRARIES + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libLIBRARIES clean-libtool \ + clean-noinstLIBRARIES clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-colmincHEADERS install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-libLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-colmincHEADERS uninstall-libLIBRARIES + + +parse1.c: bootstrap0 + $(builddir)/bootstrap0 -c -o parse1.c -e if1.h -x if1.cc +if1.h: parse1.c +if1.cc: parse1.c + +parse2.c: bootstrap1 colm.lm + $(builddir)/bootstrap1 -c -o parse2.c -e if2.h -x if2.cc colm.lm +if2.h: parse2.c +if2.cc: parse2.c + +bootstrap1-if1.$(OBJEXT): if1.h if1.cc parse1.c +bootstrap1-loadinit.$(OBJEXT): if1.h if1.cc parse1.c + +colm-if2.$(OBJEXT): if2.h if2.cc parse2.c +colm-loadcolm.$(OBJEXT): if2.h if2.cc parse2.c + +include/colm: + mkdir -p include + ln -s .. include/colm + +version.h: Makefile + echo '#define VERSION "$(PACKAGE_VERSION)"' > version.h + echo '#define PUBDATE "$(PUBDATE)"' >> version.h + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/buffer.h b/src/buffer.h new file mode 100644 index 0000000..9039ad4 --- /dev/null +++ b/src/buffer.h @@ -0,0 +1,55 @@ +/* + * Copyright 2003 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _BUFFER_H +#define _BUFFER_H + +#define BUFFER_INITIAL_SIZE 4096 + +/* An automatically grown buffer for collecting tokens. Always reuses space; + * never down resizes. */ +struct Buffer +{ + Buffer() + { + data = (char*) malloc( BUFFER_INITIAL_SIZE ); + allocated = BUFFER_INITIAL_SIZE; + length = 0; + } + ~Buffer() { free(data); } + + void append( char p ) + { + if ( length == allocated ) { + allocated *= 2; + data = (char*) realloc( data, allocated ); + } + data[length++] = p; + } + + void clear() { length = 0; } + + char *data; + int allocated; + int length; +}; + +#endif /* _BUFFER_H */ diff --git a/src/bytecode.c b/src/bytecode.c new file mode 100644 index 0000000..4aa5b10 --- /dev/null +++ b/src/bytecode.c @@ -0,0 +1,3702 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <colm/pdarun.h> +#include <colm/tree.h> +#include <colm/bytecode.h> +#include <colm/pool.h> +#include <colm/debug.h> +#include <colm/config.h> + +#include <alloca.h> +#include <sys/mman.h> +#include <string.h> +#include <assert.h> +#include <stdlib.h> + +#if SIZEOF_LONG != 4 && SIZEOF_LONG != 8 + #error "SIZEOF_LONG contained an unexpected value" +#endif + +#define true 1 +#define false 0 + +#define read_byte( i ) do { \ + i = ((uchar) *instr++); \ +} while(0) + +#define consume_byte( ) do { \ + instr += 1; \ +} while(0) + + +#define read_word_p( i, p ) do { \ + i = ((Word) p[0]); \ + i |= ((Word) p[1]) << 8; \ + i |= ((Word) p[2]) << 16; \ + i |= ((Word) p[3]) << 24; \ +} while(0) + +/* There are better ways. */ +#if SIZEOF_LONG == 4 + #define read_word( i ) do { \ + i = ((Word) *instr++); \ + i |= ((Word) *instr++) << 8; \ + i |= ((Word) *instr++) << 16; \ + i |= ((Word) *instr++) << 24; \ + } while(0) +#else + #define read_word( i ) do { \ + i = ((Word) *instr++); \ + i |= ((Word) *instr++) << 8; \ + i |= ((Word) *instr++) << 16; \ + i |= ((Word) *instr++) << 24; \ + i |= ((Word) *instr++) << 32; \ + i |= ((Word) *instr++) << 40; \ + i |= ((Word) *instr++) << 48; \ + i |= ((Word) *instr++) << 56; \ + } while(0) +#endif + +/* There are better ways. */ +#if SIZEOF_LONG == 4 + #define read_tree( i ) do { \ + Word w; \ + w = ((Word) *instr++); \ + w |= ((Word) *instr++) << 8; \ + w |= ((Word) *instr++) << 16; \ + w |= ((Word) *instr++) << 24; \ + i = (Tree*) w; \ + } while(0) + + #define read_word_type( Type, i ) do { \ + Word w; \ + w = ((Word) *instr++); \ + w |= ((Word) *instr++) << 8; \ + w |= ((Word) *instr++) << 16; \ + w |= ((Word) *instr++) << 24; \ + i = (Type) w; \ + } while(0) + + #define consume_word( ) do { \ + instr += 4; \ + } while(0) +#else + #define read_tree( i ) do { \ + Word w; \ + w = ((Word) *instr++); \ + w |= ((Word) *instr++) << 8; \ + w |= ((Word) *instr++) << 16; \ + w |= ((Word) *instr++) << 24; \ + w |= ((Word) *instr++) << 32; \ + w |= ((Word) *instr++) << 40; \ + w |= ((Word) *instr++) << 48; \ + w |= ((Word) *instr++) << 56; \ + i = (Tree*) w; \ + } while(0) + + #define read_word_type( Type, i ) do { \ + Word w; \ + w = ((Word) *instr++); \ + w |= ((Word) *instr++) << 8; \ + w |= ((Word) *instr++) << 16; \ + w |= ((Word) *instr++) << 24; \ + w |= ((Word) *instr++) << 32; \ + w |= ((Word) *instr++) << 40; \ + w |= ((Word) *instr++) << 48; \ + w |= ((Word) *instr++) << 56; \ + i = (Type) w; \ + } while(0) + + #define consume_word( ) do { \ + instr += 8; \ + } while(0) +#endif + +#define read_half( i ) do { \ + i = ((Word) *instr++); \ + i |= ((Word) *instr++) << 8; \ +} while(0) + +void parserSetContext( Program *prg, Tree **sp, Parser *parser, Tree *val ) +{ + parser->pdaRun->context = splitTree( prg, val ); +} + +static Head *treeToStr( Program *prg, Tree **sp, Tree *tree, int trim ) +{ + /* Collect the tree data. */ + StrCollect collect; + initStrCollect( &collect ); + + printTreeCollect( prg, sp, &collect, tree, trim ); + + /* Set up the input stream. */ + Head *ret = stringAllocFull( prg, collect.data, collect.length ); + + strCollectDestroy( &collect ); + + return ret; +} + +Word streamAppend( Program *prg, Tree **sp, Tree *input, StreamImpl *is ) +{ + long length = 0; + + if ( input->id == LEL_ID_STR ) { + /* Collect the tree data. */ + StrCollect collect; + initStrCollect( &collect ); + printTreeCollect( prg, sp, &collect, input, false ); + + /* Load it into the input. */ + is->funcs->appendData( is, collect.data, collect.length ); + length = collect.length; + strCollectDestroy( &collect ); + } + else if ( input->id == LEL_ID_STREAM ) { + treeUpref( input ); + is->funcs->appendStream( is, input ); + } + else { + treeUpref( input ); + is->funcs->appendTree( is, input ); + } + + return length; +} + +long parseFrag( Program *prg, Tree **sp, Parser *parser, long stopId, long entry ) +{ +switch ( entry ) { +case PcrStart: + + if ( ! parser->pdaRun->parseError ) { + parser->pdaRun->stopTarget = stopId; + + long pcr = parseLoop( prg, sp, parser->pdaRun, parser->input->in, entry ); + + while ( pcr != PcrDone ) { + +return pcr; +case PcrReduction: +case PcrGeneration: +case PcrPreEof: +case PcrReverse: + + pcr = parseLoop( prg, sp, parser->pdaRun, parser->input->in, entry ); + } + } + +case PcrDone: +break; } + + return PcrDone; +} + +long parseFinish( Tree **result, Program *prg, Tree **sp, + Parser *parser, int revertOn, long entry ) +{ +switch ( entry ) { +case PcrStart: + + if ( parser->pdaRun->stopTarget <= 0 ) { + parser->input->in->funcs->setEof( parser->input->in ); + + if ( ! parser->pdaRun->parseError ) { + long pcr = parseLoop( prg, sp, parser->pdaRun, parser->input->in, entry ); + + while ( pcr != PcrDone ) { + +return pcr; +case PcrReduction: +case PcrGeneration: +case PcrPreEof: +case PcrReverse: + + pcr = parseLoop( prg, sp, parser->pdaRun, parser->input->in, entry ); + } + } + } + + /* FIXME: need something here to check that we are not stopped waiting for + * more data when we are actually expected to finish. This check doesn't + * work (at time of writing). */ + //assert( (parser->pdaRun->stopTarget > 0 && parser->pdaRun->stopParsing) || parser->input->in->eofSent ); + + if ( !revertOn ) + commitFull( prg, sp, parser->pdaRun, 0 ); + + Tree *tree = getParsedRoot( parser->pdaRun, parser->pdaRun->stopTarget > 0 ); + treeUpref( tree ); + + *result = tree; + +case PcrDone: +break; } + + return PcrDone; +} + +long undoParseFrag( Program *prg, Tree **sp, Parser *parser, long steps, long entry ) +{ + StreamImpl *is = parser->input->in; + PdaRun *pdaRun = parser->pdaRun; + + debug( prg, REALM_PARSE, "undo parse frag, target steps: %ld, pdarun steps: %ld\n", steps, pdaRun->steps ); + + resetToken( pdaRun ); + +switch ( entry ) { +case PcrStart: + + if ( steps < pdaRun->steps ) { + /* Setup environment for going backwards until we reduced steps to + * what we want. */ + pdaRun->numRetry += 1; + pdaRun->targetSteps = steps; + pdaRun->triggerUndo = 1; + + /* The parse loop will recognise the situation. */ + long pcr = parseLoop( prg, sp, pdaRun, is, entry ); + while ( pcr != PcrDone ) { + +return pcr; +case PcrReduction: +case PcrGeneration: +case PcrPreEof: +case PcrReverse: + + pcr = parseLoop( prg, sp, pdaRun, is, entry ); + } + + /* Reset environment. */ + pdaRun->triggerUndo = 0; + pdaRun->targetSteps = -1; + pdaRun->numRetry -= 1; + } + +case PcrDone: +break; } + + return PcrDone; +} + +Tree *streamPullBc( Program *prg, PdaRun *pdaRun, StreamImpl *in, Tree *length ) +{ + long len = ((Int*)length)->value; + Head *tokdata = streamPull( prg, pdaRun, in, len ); + return constructString( prg, tokdata ); +} + +void undoPull( Program *prg, StreamImpl *in, Tree *str ) +{ + const char *data = stringData( ( (Str*)str )->value ); + long length = stringLength( ( (Str*)str )->value ); + undoStreamPull( in, data, length ); +} + +static long streamPush( Program *prg, Tree **sp, StreamImpl *in, Tree *tree, int ignore ) +{ + if ( tree->id == LEL_ID_STR ) { + /* This should become a compile error. If it's text, it's up to the + * scanner to decide. Want to force it then send a token. */ + assert( !ignore ); + + /* Collect the tree data. */ + StrCollect collect; + initStrCollect( &collect ); + printTreeCollect( prg, sp, &collect, tree, false ); + + streamPushText( in, collect.data, collect.length ); + long length = collect.length; + strCollectDestroy( &collect ); + + return length; + } + else if ( tree->id == LEL_ID_STREAM ) { + treeUpref( tree ); + streamPushStream( in, tree ); + return -1; + } + else { + treeUpref( tree ); + streamPushTree( in, tree, ignore ); + return -1; + } +} + +void setLocal( Tree **frame, long field, Tree *tree ) +{ + if ( tree != 0 ) + assert( tree->refs >= 1 ); + frame[field] = tree; +} + +Tree *getLocalSplit( Program *prg, Tree **frame, long field ) +{ + Tree *val = frame[field]; + Tree *split = splitTree( prg, val ); + frame[field] = split; + return split; +} + +static void downrefLocalTrees( Program *prg, Tree **sp, Tree **frame, LocalInfo *locals, long localsLen ) +{ + long i; + for ( i = localsLen-1; i >= 0; i-- ) { + if ( locals[i].type == LI_Tree ) { + debug( prg, REALM_BYTECODE, "local tree downref: %ld\n", (long)locals[i].offset ); + + Tree *tree = (Tree*) frame[(long)locals[i].offset]; + treeDownref( prg, sp, tree ); + } + } +} + +static void downrefLocals( Program *prg, Tree ***psp, Tree **frame, LocalInfo *locals, long localsLen ) +{ + long i; + for ( i = localsLen-1; i >= 0; i-- ) { + switch ( locals[i].type ) { + case LI_Tree: { + debug( prg, REALM_BYTECODE, "local tree downref: %ld\n", (long)locals[i].offset ); + Tree *tree = (Tree*) frame[(long)locals[i].offset]; + treeDownref( prg, *psp, tree ); + break; + } + case LI_Iter: { + debug( prg, REALM_BYTECODE, "local iter downref: %ld\n", (long)locals[i].offset ); + TreeIter *iter = (TreeIter*) &frame[(long)locals[i].offset]; + treeIterDestroy( prg, psp, iter ); + break; + } + case LI_RevIter: { + debug( prg, REALM_BYTECODE, "local rev iter downref: %ld\n", (long)locals[i].offset ); + RevTreeIter *riter = (RevTreeIter*) &frame[(long)locals[i].offset]; + revTreeIterDestroy( prg, psp, riter ); + break; + } + case LI_UserIter: { + debug( prg, REALM_BYTECODE, "local user iter downref: %ld\n", (long)locals[i].offset ); + UserIter *uiter = (UserIter*) frame[locals[i].offset]; + userIterDestroy2( prg, psp, uiter ); + break; + } + } + } +} + +Tree *constructArgv( Program *prg, int argc, const char **argv ) +{ + Tree *list = createGeneric( prg, prg->rtd->argvGenericId ); + treeUpref( list ); + int i; + for ( i = 0; i < argc; i++ ) { + Head *head = stringAllocPointer( prg, argv[i], strlen(argv[i]) ); + Tree *arg = constructString( prg, head ); + treeUpref( arg ); + listAppend2( prg, (List*)list, arg ); + } + return list; +} + +/* + * Execution environment + */ + +void rcodeDownrefAll( Program *prg, Tree **sp, RtCodeVect *rev ) +{ + while ( rev->tabLen > 0 ) { + /* Read the length */ + Code *prcode = rev->data + rev->tabLen - SIZEOF_WORD; + Word len; + read_word_p( len, prcode ); + + /* Find the start of block. */ + long start = rev->tabLen - len - SIZEOF_WORD; + prcode = rev->data + start; + + /* Execute it. */ + rcodeDownref( prg, sp, prcode ); + + /* Backup over it. */ + rev->tabLen -= len + SIZEOF_WORD; + } +} + +void rcodeDownref( Program *prg, Tree **sp, Code *instr ) +{ +again: + switch ( *instr++ ) { + case IN_PARSE_SAVE_STEPS: { + debug( prg, REALM_BYTECODE, "IN_PARSE_SAVE_STEPS\n" ); + break; + } + case IN_PARSE_INIT_BKT: { + Tree *parser; + Word pcr; + Word steps; + + debug( prg, REALM_BYTECODE, "IN_PARSE_INIT_BKT\n" ); + + read_tree( parser ); + read_word( pcr ); + read_word( steps ); + + treeDownref( prg, sp, (Tree*)parser ); + break; + } + + case IN_LOAD_TREE: { + Word w; + read_word( w ); + debug( prg, REALM_BYTECODE, "IN_LOAD_TREE %p\n", (Tree*)w ); + treeDownref( prg, sp, (Tree*)w ); + break; + } + case IN_LOAD_WORD: { + Word w; + read_word( w ); + debug( prg, REALM_BYTECODE, "IN_LOAD_WORD\n" ); + break; + } + case IN_RESTORE_LHS: { + Tree *restore; + read_tree( restore ); + debug( prg, REALM_BYTECODE, "IN_RESTORE_LHS\n" ); + treeDownref( prg, sp, restore ); + break; + } + + case IN_PARSE_FRAG_BKT: { + Half stopId; + read_half( stopId ); + debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_BKT\n" ); + break; + } + case IN_PARSE_FRAG_EXIT_BKT: { + debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_EXIT_BKT\n" ); + break; + } + case IN_PARSE_FINISH_BKT: { + Half stopId; + read_half( stopId ); + debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_BKT\n" ); + break; + } + case IN_PARSE_FINISH_EXIT_BKT: { + debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_EXIT_BKT\n" ); + break; + } + case IN_PCR_CALL: { + debug( prg, REALM_BYTECODE, "IN_PCR_CALL\n" ); + break; + } + case IN_PCR_RET: { + debug( prg, REALM_BYTECODE, "IN_PCR_RET\n" ); + return; + } + case IN_PCR_END_DECK: { + debug( prg, REALM_BYTECODE, "IN_PCR_END_DECK\n" ); + return; + } + case IN_INPUT_APPEND_BKT: { + Tree *parser; + Tree *input; + Word len; + read_tree( parser ); + read_tree( input ); + read_word( len ); + + debug( prg, REALM_BYTECODE, "IN_INPUT_APPEND_BKT\n" ); + + treeDownref( prg, sp, parser ); + treeDownref( prg, sp, input ); + break; + } + case IN_INPUT_PULL_BKT: { + Tree *string; + read_tree( string ); + + debug( prg, REALM_BYTECODE, "IN_INPUT_PULL_BKT\n" ); + + treeDownref( prg, sp, string ); + break; + } + case IN_INPUT_PUSH_BKT: { + Word len; + read_word( len ); + + debug( prg, REALM_BYTECODE, "IN_INPUT_PUSH_BKT\n" ); + break; + } + case IN_LOAD_GLOBAL_BKT: { + debug( prg, REALM_BYTECODE, "IN_LOAD_GLOBAL_BKT\n" ); + break; + } + case IN_LOAD_CONTEXT_BKT: { + debug( prg, REALM_BYTECODE, "IN_LOAD_CONTEXT_BKT\n" ); + break; + } + case IN_LOAD_PARSER_BKT: { + /* Tree *parser; */ + consume_word(); + debug( prg, REALM_BYTECODE, "IN_LOAD_PARSER_BKT\n" ); + break; + } + case IN_LOAD_INPUT_BKT: { + /* Tree *input; */ + consume_word(); + debug( prg, REALM_BYTECODE, "IN_LOAD_INPUT_BKT\n" ); + break; + } + case IN_GET_FIELD_BKT: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_FIELD_BKT %hd\n", field ); + break; + } + case IN_SET_FIELD_BKT: { + short field; + Tree *val; + read_half( field ); + read_tree( val ); + + debug( prg, REALM_BYTECODE, "IN_SET_FIELD_BKT %hd\n", field ); + + treeDownref( prg, sp, val ); + break; + } + case IN_PTR_DEREF_BKT: { + Tree *ptr; + read_tree( ptr ); + + debug( prg, REALM_BYTECODE, "IN_PTR_DEREF_BKT\n" ); + + treeDownref( prg, sp, ptr ); + break; + } + case IN_SET_TOKEN_DATA_BKT: { + Word oldval; + read_word( oldval ); + + debug( prg, REALM_BYTECODE, "IN_SET_TOKEN_DATA_BKT\n" ); + + Head *head = (Head*)oldval; + stringFree( prg, head ); + break; + } + case IN_LIST_APPEND_BKT: { + debug( prg, REALM_BYTECODE, "IN_LIST_APPEND_BKT\n" ); + break; + } + case IN_LIST_REMOVE_END_BKT: { + Tree *val; + read_tree( val ); + + debug( prg, REALM_BYTECODE, "IN_LIST_REMOVE_END_BKT\n" ); + + treeDownref( prg, sp, val ); + break; + } + case IN_GET_LIST_MEM_BKT: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_LIST_MEM_BKT %hd\n", field ); + break; + } + case IN_SET_LIST_MEM_BKT: { + Half field; + Tree *val; + read_half( field ); + read_tree( val ); + + debug( prg, REALM_BYTECODE, "IN_SET_LIST_MEM_BKT %hd\n", field ); + + treeDownref( prg, sp, val ); + break; + } + case IN_MAP_INSERT_BKT: { + /* uchar inserted; */ + Tree *key; + consume_byte(); + read_tree( key ); + + debug( prg, REALM_BYTECODE, "IN_MAP_INSERT_BKT\n" ); + + treeDownref( prg, sp, key ); + break; + } + case IN_MAP_STORE_BKT: { + Tree *key, *val; + read_tree( key ); + read_tree( val ); + + debug( prg, REALM_BYTECODE,"IN_MAP_STORE_BKT\n" ); + + treeDownref( prg, sp, key ); + treeDownref( prg, sp, val ); + break; + } + case IN_MAP_REMOVE_BKT: { + Tree *key, *val; + read_tree( key ); + read_tree( val ); + + debug( prg, REALM_BYTECODE, "IN_MAP_REMOVE_BKT\n" ); + + treeDownref( prg, sp, key ); + treeDownref( prg, sp, val ); + break; + } + case IN_STOP: { + return; + } + default: { + fatal( "UNKNOWN INSTRUCTION 0x%2x: -- reverse code downref\n", *(instr-1)); + assert(false); + break; + } + } + goto again; +} + +void mainExecution( Program *prg, Execution *exec, Code *code ) +{ + Tree **sp = prg->stackRoot; + + FrameInfo *fi = &prg->rtd->frameInfo[prg->rtd->rootFrameId]; + long stretch = fi->argSize + 4 + fi->frameSize; + vm_contiguous( stretch ); + + /* Set up the stack as if we have called. We allow a return value. */ + vm_push( 0 ); + vm_push( 0 ); + vm_push( 0 ); + vm_push( 0 ); + + /* Execution loop. */ + executeCode( prg, exec, sp, code ); + + vm_pop_ignore(); + vm_pop_ignore(); + treeDownref( prg, sp, prg->returnVal ); + prg->returnVal = vm_pop(); + vm_pop_ignore(); + + prg->stackRoot = sp; +} + +int makeReverseCode( PdaRun *pdaRun ) +{ + RtCodeVect *reverseCode = &pdaRun->reverseCode; + RtCodeVect *rcodeCollect = &pdaRun->rcodeCollect; + + /* Do we need to revert the left hand side? */ + + /* Check if there was anything generated. */ + if ( rcodeCollect->tabLen == 0 ) + return false; + + if ( pdaRun->rcBlockCount == 0 ) { + /* One reverse code run for the DECK terminator. */ + appendCode( reverseCode, IN_PCR_END_DECK ); + appendCode( reverseCode, IN_PCR_RET ); + appendWord( reverseCode, 2 ); + pdaRun->rcBlockCount += 1; + incrementSteps( pdaRun ); + } + + long startLength = reverseCode->tabLen; + + /* Go backwards, group by group, through the reverse code. Push each group + * to the global reverse code stack. */ + Code *p = rcodeCollect->data + rcodeCollect->tabLen; + while ( p != rcodeCollect->data ) { + p--; + long len = *p; + p = p - len; + appendCode2( reverseCode, p, len ); + } + + /* Stop, then place a total length in the global stack. */ + appendCode( reverseCode, IN_PCR_RET ); + long length = reverseCode->tabLen - startLength; + appendWord( reverseCode, length ); + + /* Clear the revere code buffer. */ + rcodeCollect->tabLen = 0; + + pdaRun->rcBlockCount += 1; + incrementSteps( pdaRun ); + + return true; +} + +void transferReverseCode( PdaRun *pdaRun, ParseTree *parseTree ) +{ + if ( pdaRun->rcBlockCount > 0 ) { + //debug( REALM_PARSE, "attaching reverse code to token\n" ); + parseTree->flags |= PF_HAS_RCODE; + pdaRun->rcBlockCount = 0; + } +} + +void rcodeUnitTerm( Execution *exec ) +{ + appendCode( &exec->parser->pdaRun->rcodeCollect, exec->rcodeUnitLen ); + exec->rcodeUnitLen = 0; +} + +void rcodeUnitStart( Execution *exec ) +{ + exec->rcodeUnitLen = 0; +} + +void rcodeCode( Execution *exec, const Code code ) +{ + appendCode( &exec->parser->pdaRun->rcodeCollect, code ); + exec->rcodeUnitLen += SIZEOF_CODE; +} + +void rcodeHalf( Execution *exec, const Half half ) +{ + appendHalf( &exec->parser->pdaRun->rcodeCollect, half ); + exec->rcodeUnitLen += SIZEOF_HALF; +} + +void rcodeWord( Execution *exec, const Word word ) +{ + appendWord( &exec->parser->pdaRun->rcodeCollect, word ); + exec->rcodeUnitLen += SIZEOF_WORD; +} + +Code *popReverseCode( RtCodeVect *allRev ) +{ + /* Read the length */ + Code *prcode = allRev->data + allRev->tabLen - SIZEOF_WORD; + Word len; + read_word_p( len, prcode ); + + /* Find the start of block. */ + long start = allRev->tabLen - len - SIZEOF_WORD; + prcode = allRev->data + start; + + /* Backup over it. */ + allRev->tabLen -= len + SIZEOF_WORD; + return prcode; +} + +Tree **executeCode( Program *prg, Execution *exec, Tree **sp, Code *instr ) +{ + /* When we exit we are going to verify that we did not eat up any stack + * space. */ + Tree **root = sp; + Code c; + +again: + c = *instr++; + //debug( REALM_BYTECODE, "--in 0x%x\n", c ); + + switch ( c ) { + case IN_RESTORE_LHS: { + Tree *restore; + read_tree( restore ); + + debug( prg, REALM_BYTECODE, "IN_RESTORE_LHS\n" ); + treeDownref( prg, sp, exec->parser->pdaRun->parseInput->shadow->tree ); + exec->parser->pdaRun->parseInput->shadow->tree = restore; + break; + } + case IN_LOAD_NIL: { + debug( prg, REALM_BYTECODE, "IN_LOAD_NIL\n" ); + vm_push( 0 ); + break; + } + case IN_LOAD_TREE: { + Tree *tree; + read_tree( tree ); + vm_push( tree ); + debug( prg, REALM_BYTECODE, "IN_LOAD_TREE %p id: %d refs: %d\n", tree, tree->id, tree->refs ); + break; + } + case IN_LOAD_WORD: { + debug( prg, REALM_BYTECODE, "IN_LOAD_WORD\n" ); + Word w; + read_word( w ); + vm_push( (SW)w ); + break; + } + case IN_LOAD_TRUE: { + debug( prg, REALM_BYTECODE, "IN_LOAD_TRUE\n" ); + treeUpref( prg->trueVal ); + vm_push( prg->trueVal ); + break; + } + case IN_LOAD_FALSE: { + debug( prg, REALM_BYTECODE, "IN_LOAD_FALSE\n" ); + treeUpref( prg->falseVal ); + vm_push( prg->falseVal ); + break; + } + case IN_LOAD_INT: { + Word i; + read_word( i ); + + debug( prg, REALM_BYTECODE, "IN_LOAD_INT %d\n", i ); + + Tree *tree = constructInteger( prg, i ); + treeUpref( tree ); + vm_push( tree ); + break; + } + case IN_LOAD_STR: { + Word offset; + read_word( offset ); + + debug( prg, REALM_BYTECODE, "IN_LOAD_STR %d\n", offset ); + + Head *lit = makeLiteral( prg, offset ); + Tree *tree = constructString( prg, lit ); + treeUpref( tree ); + vm_push( tree ); + break; + } + case IN_PRINT: { + int n, i; + read_byte( n ); + debug( prg, REALM_BYTECODE, "IN_PRINT %d\n", n ); + + Tree *arg[n]; + for ( i = n-1; i >= 0; i-- ) + arg[i] = vm_pop(); + + for ( i = 0; i < n; i++ ) + printTreeFile( prg, sp, stdout, arg[i], false ); + + for ( i = 0; i < n; i++ ) + treeDownref( prg, sp, arg[i] ); + break; + } + case IN_PRINT_STREAM: { + int n, i; + read_byte( n ); + debug( prg, REALM_BYTECODE, "IN_PRINT_STREAM\n" ); + + Tree *arg[n]; + for ( i = n-1; i >= 0; i-- ) + arg[i] = vm_pop(); + Stream *stream = (Stream*)vm_pop(); + + for ( i = 0; i < n; i++ ) { + if ( stream->in->file != 0 ) + printTreeFile( prg, sp, stream->in->file, arg[i], false ); + else + printTreeFd( prg, sp, stream->in->fd, arg[i], false ); + } + + for ( i = 0; i < n; i++ ) + treeDownref( prg, sp, arg[i] ); + treeDownref( prg, sp, (Tree*)stream ); + break; + } + case IN_PRINT_XML_AC: { + int n, i; + read_byte( n ); + + debug( prg, REALM_BYTECODE, "IN_PRINT_XML_AC %d\n", n ); + + Tree *arg[n]; + for ( i = n-1; i >= 0; i-- ) + arg[i] = vm_pop(); + + for ( i = 0; i < n; i++ ) + printXmlStdout( prg, sp, arg[i], true, true ); + + for ( i = 0; i < n; i++ ) + treeDownref( prg, sp, arg[i] ); + break; + } + case IN_PRINT_XML: { + int n, i; + read_byte( n ); + debug( prg, REALM_BYTECODE, "IN_PRINT_XML %d", n ); + + Tree *arg[n]; + for ( i = n-1; i >= 0; i-- ) + arg[i] = vm_pop(); + + for ( i = 0; i < n; i++ ) + printXmlStdout( prg, sp, arg[i], false, true ); + + for ( i = 0; i < n; i++ ) + treeDownref( prg, sp, arg[i] ); + break; + } + case IN_LOAD_CONTEXT_R: { + debug( prg, REALM_BYTECODE, "IN_LOAD_CONTEXT_R\n" ); + + treeUpref( exec->parser->pdaRun->context ); + vm_push( exec->parser->pdaRun->context ); + break; + } + case IN_LOAD_CONTEXT_WV: { + debug( prg, REALM_BYTECODE, "IN_LOAD_CONTEXT_WV\n" ); + + treeUpref( exec->parser->pdaRun->context ); + vm_push( exec->parser->pdaRun->context ); + + /* Set up the reverse instruction. */ + rcodeUnitStart( exec ); + rcodeCode( exec, IN_LOAD_CONTEXT_BKT ); + break; + } + case IN_LOAD_CONTEXT_WC: { + debug( prg, REALM_BYTECODE, "IN_LOAD_CONTEXT_WC\n" ); + + /* This is identical to the _R version, but using it for writing + * would be confusing. */ + treeUpref( exec->parser->pdaRun->context ); + vm_push( exec->parser->pdaRun->context ); + break; + } + case IN_LOAD_CONTEXT_BKT: { + debug( prg, REALM_BYTECODE, "IN_LOAD_CONTEXT_BKT\n" ); + + treeUpref( exec->parser->pdaRun->context ); + vm_push( exec->parser->pdaRun->context ); + break; + } + case IN_LOAD_GLOBAL_R: { + debug( prg, REALM_BYTECODE, "IN_LOAD_GLOBAL_R\n" ); + + treeUpref( prg->global ); + vm_push( prg->global ); + break; + } + case IN_LOAD_GLOBAL_WV: { + debug( prg, REALM_BYTECODE, "IN_LOAD_GLOBAL_WV\n" ); + + treeUpref( prg->global ); + vm_push( prg->global ); + + /* Set up the reverse instruction. */ + rcodeUnitStart( exec ); + rcodeCode( exec, IN_LOAD_GLOBAL_BKT ); + break; + } + case IN_LOAD_GLOBAL_WC: { + debug( prg, REALM_BYTECODE, "IN_LOAD_GLOBAL_WC\n" ); + + /* This is identical to the _R version, but using it for writing + * would be confusing. */ + treeUpref( prg->global ); + vm_push( prg->global ); + break; + } + case IN_LOAD_GLOBAL_BKT: { + debug( prg, REALM_BYTECODE, "IN_LOAD_GLOBAL_BKT\n" ); + + treeUpref( prg->global ); + vm_push( prg->global ); + break; + } + case IN_LOAD_PARSER_R: { + debug( prg, REALM_BYTECODE, "IN_LOAD_PARSER_R\n" ); + + treeUpref( (Tree*)exec->parser ); + vm_push( (Tree*)exec->parser ); + assert( exec->parser != 0 ); + break; + } + case IN_LOAD_PARSER_WV: { + debug( prg, REALM_BYTECODE, "IN_LOAD_PARSER_WV\n" ); + + treeUpref( (Tree*)exec->parser ); + vm_push( (Tree*)exec->parser ); + assert( exec->parser != 0 ); + + /* Set up the reverse instruction. */ + rcodeUnitStart( exec ); + rcodeCode( exec, IN_LOAD_PARSER_BKT ); + rcodeWord( exec, (Word)exec->parser ); + break; + } + case IN_LOAD_PARSER_WC: { + debug( prg, REALM_BYTECODE, "IN_LOAD_PARSER_WC\n" ); + + /* This is identical to the _R version, but using it for writing + * would be confusing. */ + treeUpref( (Tree*)exec->parser ); + vm_push( (Tree*)exec->parser ); + assert( exec->parser != 0 ); + break; + } + case IN_LOAD_PARSER_BKT: { + Tree *parser; + read_tree( parser ); + + debug( prg, REALM_BYTECODE, "IN_LOAD_PARSER_BKT\n" ); + + treeUpref( parser ); + vm_push( parser ); + break; + } + case IN_LOAD_INPUT_R: { + debug( prg, REALM_BYTECODE, "IN_LOAD_INPUT_R\n" ); + + assert( exec->parser != 0 ); + treeUpref( (Tree*)exec->parser->input ); + vm_push( (Tree*)exec->parser->input ); + break; + } + case IN_LOAD_INPUT_WV: { + debug( prg, REALM_BYTECODE, "IN_LOAD_INPUT_WV\n" ); + + assert( exec->parser != 0 ); + treeUpref( (Tree*)exec->parser->input ); + vm_push( (Tree*)exec->parser->input ); + + /* Set up the reverse instruction. */ + rcodeUnitStart( exec ); + rcodeCode( exec, IN_LOAD_INPUT_BKT ); + rcodeWord( exec, (Word)exec->parser->input ); + break; + } + case IN_LOAD_INPUT_WC: { + debug( prg, REALM_BYTECODE, "IN_LOAD_INPUT_WC\n" ); + + /* This is identical to the _R version, but using it for writing + * would be confusing. */ + assert( exec->parser != 0 ); + treeUpref( (Tree*)exec->parser->input ); + vm_push( (Tree*)exec->parser->input ); + break; + } + case IN_LOAD_INPUT_BKT: { + Tree *accumStream; + read_tree( accumStream ); + + debug( prg, REALM_BYTECODE, "IN_LOAD_INPUT_BKT\n" ); + + treeUpref( accumStream ); + vm_push( accumStream ); + break; + } + case IN_LOAD_CTX_R: { + debug( prg, REALM_BYTECODE, "IN_LOAD_CTX_R\n" ); + + treeUpref( exec->parser->pdaRun->context ); + vm_push( exec->parser->pdaRun->context ); + break; + } + case IN_LOAD_CTX_WV: { + debug( prg, REALM_BYTECODE, "IN_LOAD_CTX_WV\n" ); + + treeUpref( exec->parser->pdaRun->context ); + vm_push( exec->parser->pdaRun->context ); + + /* Set up the reverse instruction. */ + rcodeUnitStart( exec ); + rcodeCode( exec, IN_LOAD_PARSER_BKT ); + rcodeWord( exec, (Word)exec->parser ); + break; + } + case IN_LOAD_CTX_WC: { + debug( prg, REALM_BYTECODE, "IN_LOAD_CTX_WC\n" ); + + /* This is identical to the _R version, but using it for writing + * would be confusing. */ + treeUpref( exec->parser->pdaRun->context ); + vm_push( exec->parser->pdaRun->context ); + break; + } + case IN_LOAD_CTX_BKT: { + debug( prg, REALM_BYTECODE, "IN_LOAD_CTX_BKT\n" ); + + treeUpref( exec->parser->pdaRun->context ); + vm_push( exec->parser->pdaRun->context ); + break; + } + case IN_INIT_CAPTURES: { + /* uchar ncaps; */ + consume_byte(); + + debug( prg, REALM_BYTECODE, "IN_INIT_CAPTURES\n" ); + + /* If there are captures (this is a translate block) then copy them into + * the local frame now. */ + LangElInfo *lelInfo = prg->rtd->lelInfo; + char **mark = exec->parser->pdaRun->fsmRun->mark; + + int i; + for ( i = 0; i < lelInfo[exec->parser->pdaRun->tokenId].numCaptureAttr; i++ ) { + CaptureAttr *ca = &prg->rtd->captureAttr[lelInfo[exec->parser->pdaRun->tokenId].captureAttr + i]; + Head *data = stringAllocFull( prg, + mark[ca->mark_enter], mark[ca->mark_leave] - mark[ca->mark_enter] ); + Tree *string = constructString( prg, data ); + treeUpref( string ); + setLocal( exec->framePtr, -1 - i, string ); + } + break; + } + case IN_INIT_RHS_EL: { + Half position; + short field; + read_half( position ); + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_INIT_RHS_EL %hd\n", field ); + + Tree *val = getRhsEl( prg, exec->parser->pdaRun->redLel->shadow->tree, position ); + treeUpref( val ); + vm_local(field) = val; + break; + } + + case IN_INIT_LHS_EL: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_INIT_LHS_EL %hd\n", field ); + + /* We transfer it to to the local field. Possibly take a copy. */ + Tree *val = exec->parser->pdaRun->redLel->shadow->tree; + + /* Save it. */ + treeUpref( val ); + exec->parser->pdaRun->parsed = val; + + exec->parser->pdaRun->redLel->shadow->tree = 0; + vm_local(field) = val; + break; + } + case IN_STORE_LHS_EL: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_STORE_LHS_EL %hd\n", field ); + + Tree *val = vm_local(field); + vm_local(field) = 0; + exec->parser->pdaRun->redLel->shadow->tree = val; + break; + } + case IN_UITER_ADVANCE: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_UITER_ADVANCE\n" ); + + /* Get the iterator. */ + UserIter *uiter = (UserIter*) vm_local(field); + + long yieldSize = vm_ssize() - uiter->rootSize; + assert( uiter->yieldSize == yieldSize ); + + /* Fix the return instruction pointer. */ + uiter->stackRoot[-IFR_AA + IFR_RIN] = (SW)instr; + + instr = uiter->resume; + exec->framePtr = uiter->frame; + exec->iframePtr = &uiter->stackRoot[-IFR_AA]; + break; + } + case IN_UITER_GET_CUR_R: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_UITER_GET_CUR_R\n" ); + + UserIter *uiter = (UserIter*) vm_local(field); + Tree *val = uiter->ref.kid->tree; + treeUpref( val ); + vm_push( val ); + break; + } + case IN_UITER_GET_CUR_WC: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_UITER_GET_CUR_WC\n" ); + + UserIter *uiter = (UserIter*) vm_local(field); + splitRef( prg, &sp, &uiter->ref ); + Tree *split = uiter->ref.kid->tree; + treeUpref( split ); + vm_push( split ); + break; + } + case IN_UITER_SET_CUR_WC: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_UITER_SET_CUR_WC\n" ); + + Tree *t = vm_pop(); + UserIter *uiter = (UserIter*) vm_local(field); + splitRef( prg, &sp, &uiter->ref ); + Tree *old = uiter->ref.kid->tree; + setUiterCur( prg, uiter, t ); + treeDownref( prg, sp, old ); + break; + } + case IN_GET_LOCAL_R: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_LOCAL_R %hd\n", field ); + + Tree *val = vm_local(field); + treeUpref( val ); + vm_push( val ); + break; + } + case IN_GET_LOCAL_WC: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_LOCAL_WC %hd\n", field ); + + Tree *split = getLocalSplit( prg, exec->framePtr, field ); + treeUpref( split ); + vm_push( split ); + break; + } + case IN_SET_LOCAL_WC: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_SET_LOCAL_WC %hd\n", field ); + + Tree *val = vm_pop(); + treeDownref( prg, sp, vm_local(field) ); + setLocal( exec->framePtr, field, val ); + break; + } + case IN_SAVE_RET: { + debug( prg, REALM_BYTECODE, "IN_SAVE_RET\n" ); + + Tree *val = vm_pop(); + vm_local(FR_RV) = val; + break; + } + case IN_GET_LOCAL_REF_R: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_LOCAL_REF_R\n" ); + + Ref *ref = (Ref*) vm_plocal(field); + Tree *val = ref->kid->tree; + treeUpref( val ); + vm_push( val ); + break; + } + case IN_GET_LOCAL_REF_WC: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_LOCAL_REF_WC\n" ); + + Ref *ref = (Ref*) vm_plocal(field); + splitRef( prg, &sp, ref ); + Tree *val = ref->kid->tree; + treeUpref( val ); + vm_push( val ); + break; + } + case IN_SET_LOCAL_REF_WC: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_SET_LOCAL_REF_WC\n" ); + + Tree *val = vm_pop(); + Ref *ref = (Ref*) vm_plocal(field); + splitRef( prg, &sp, ref ); + refSetValue( prg, sp, ref, val ); + break; + } + case IN_GET_FIELD_R: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_FIELD_R %d\n", field ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *val = getField( obj, field ); + treeUpref( val ); + vm_push( val ); + break; + } + case IN_GET_FIELD_WC: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_FIELD_WC %d\n", field ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *split = getFieldSplit( prg, obj, field ); + treeUpref( split ); + vm_push( split ); + break; + } + case IN_GET_FIELD_WV: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_FIELD_WV\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *split = getFieldSplit( prg, obj, field ); + treeUpref( split ); + vm_push( split ); + + /* Set up the reverse instruction. */ + rcodeCode( exec, IN_GET_FIELD_BKT ); + rcodeHalf( exec, field ); + break; + } + case IN_GET_FIELD_BKT: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_FIELD_BKT\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *split = getFieldSplit( prg, obj, field ); + treeUpref( split ); + vm_push( split ); + break; + } + case IN_SET_FIELD_WC: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_SET_FIELD_WC %d\n", field ); + + Tree *obj = vm_pop(); + Tree *val = vm_pop(); + treeDownref( prg, sp, obj ); + + /* Downref the old value. */ + Tree *prev = getField( obj, field ); + treeDownref( prg, sp, prev ); + + setField( prg, obj, field, val ); + break; + } + case IN_SET_FIELD_WV: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_SET_FIELD_WV %d\n", field ); + + Tree *obj = vm_pop(); + Tree *val = vm_pop(); + treeDownref( prg, sp, obj ); + + /* Save the old value, then set the field. */ + Tree *prev = getField( obj, field ); + setField( prg, obj, field, val ); + + /* Set up the reverse instruction. */ + rcodeCode( exec, IN_SET_FIELD_BKT ); + rcodeHalf( exec, field ); + rcodeWord( exec, (Word)prev ); + rcodeUnitTerm( exec ); + break; + } + case IN_SET_FIELD_BKT: { + short field; + Tree *val; + read_half( field ); + read_tree( val ); + + debug( prg, REALM_BYTECODE, "IN_SET_FIELD_BKT\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + /* Downref the old value. */ + Tree *prev = getField( obj, field ); + treeDownref( prg, sp, prev ); + + setField( prg, obj, field, val ); + break; + } + case IN_SET_FIELD_LEAVE_WC: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_SET_FIELD_LEAVE_WC\n" ); + + /* Note that we don't downref the object here because we are + * leaving it on the stack. */ + Tree *obj = vm_pop(); + Tree *val = vm_pop(); + + /* Downref the old value. */ + Tree *prev = getField( obj, field ); + treeDownref( prg, sp, prev ); + + /* Set the field. */ + setField( prg, obj, field, val ); + + /* Leave the object on the top of the stack. */ + vm_push( obj ); + break; + } + case IN_GET_RHS_VAL_R: { + debug( prg, REALM_BYTECODE, "IN_GET_RHS_VAL_R\n" ); + int i, done = 0; + uchar len; + + Tree *obj = vm_pop(), *val = 0; + treeDownref( prg, sp, obj ); + + read_byte( len ); + for ( i = 0; i < len; i++ ) { + uchar prodNum, childNum; + read_byte( prodNum ); + read_byte( childNum ); + if ( !done && obj->prodNum == prodNum ) { + val = getRhsEl( prg, obj, childNum ); + done = 1; + } + } + + treeUpref( val ); + vm_push( val ); + break; + } + case IN_POP: { + debug( prg, REALM_BYTECODE, "IN_POP\n" ); + + Tree *val = vm_pop(); + treeDownref( prg, sp, val ); + break; + } + case IN_POP_N_WORDS: { + short n; + read_half( n ); + + debug( prg, REALM_BYTECODE, "IN_POP_N_WORDS %hd\n", n ); + + vm_popn( n ); + break; + } + case IN_SPRINTF: { + debug( prg, REALM_BYTECODE, "IN_SPRINTF\n" ); + + Tree *f = vm_pop(); + f++; + Tree *integer = vm_pop(); + Tree *format = vm_pop(); + Head *res = stringSprintf( prg, (Str*)format, (Int*)integer ); + Tree *str = constructString( prg, res ); + treeUpref( str ); + vm_push( str ); + treeDownref( prg, sp, integer ); + treeDownref( prg, sp, format ); + break; + } + case IN_STR_ATOI: { + debug( prg, REALM_BYTECODE, "IN_STR_ATOI\n" ); + + Str *str = (Str*)vm_pop(); + Word res = strAtoi( str->value ); + Tree *integer = constructInteger( prg, res ); + treeUpref( integer ); + vm_push( integer ); + treeDownref( prg, sp, (Tree*)str ); + break; + } + case IN_INT_TO_STR: { + debug( prg, REALM_BYTECODE, "IN_INT_TO_STR\n" ); + + Int *i = (Int*)vm_pop(); + Head *res = intToStr( prg, i->value ); + Tree *str = constructString( prg, res ); + treeUpref( str ); + vm_push( str ); + treeDownref( prg, sp, (Tree*) i ); + break; + } + case IN_TREE_TO_STR: { + debug( prg, REALM_BYTECODE, "IN_TREE_TO_STR\n" ); + + Tree *tree = vm_pop(); + Head *res = treeToStr( prg, sp, tree, false ); + Tree *str = constructString( prg, res ); + treeUpref( str ); + vm_push( str ); + treeDownref( prg, sp, tree ); + break; + } + case IN_TREE_TO_STR_TRIM: { + debug( prg, REALM_BYTECODE, "IN_TREE_TO_STR_TRIM\n" ); + + Tree *tree = vm_pop(); + Head *res = treeToStr( prg, sp, tree, true ); + Tree *str = constructString( prg, res ); + treeUpref( str ); + vm_push( str ); + treeDownref( prg, sp, tree ); + break; + } + case IN_TREE_TRIM: { + debug( prg, REALM_BYTECODE, "IN_TREE_TRIM\n" ); + + Tree *tree = vm_pop(); + Tree *trimmed = treeTrim( prg, sp, tree ); + vm_push( trimmed ); + break; + } + case IN_CONCAT_STR: { + debug( prg, REALM_BYTECODE, "IN_CONCAT_STR\n" ); + + Str *s2 = (Str*)vm_pop(); + Str *s1 = (Str*)vm_pop(); + Head *res = concatStr( s1->value, s2->value ); + Tree *str = constructString( prg, res ); + treeUpref( str ); + treeDownref( prg, sp, (Tree*)s1 ); + treeDownref( prg, sp, (Tree*)s2 ); + vm_push( str ); + break; + } + case IN_STR_UORD8: { + debug( prg, REALM_BYTECODE, "IN_STR_UORD8\n" ); + + Str *str = (Str*)vm_pop(); + Word res = strUord8( str->value ); + Tree *tree = constructInteger( prg, res ); + treeUpref( tree ); + vm_push( tree ); + treeDownref( prg, sp, (Tree*)str ); + break; + } + case IN_STR_UORD16: { + debug( prg, REALM_BYTECODE, "IN_STR_UORD16\n" ); + + Str *str = (Str*)vm_pop(); + Word res = strUord16( str->value ); + Tree *tree = constructInteger( prg, res ); + treeUpref( tree ); + vm_push( tree ); + treeDownref( prg, sp, (Tree*)str ); + break; + } + + case IN_STR_LENGTH: { + debug( prg, REALM_BYTECODE, "IN_STR_LENGTH\n" ); + + Str *str = (Str*)vm_pop(); + long len = stringLength( str->value ); + Tree *res = constructInteger( prg, len ); + treeUpref( res ); + vm_push( res ); + treeDownref( prg, sp, (Tree*)str ); + break; + } + case IN_JMP_FALSE: { + short dist; + read_half( dist ); + + debug( prg, REALM_BYTECODE, "IN_JMP_FALSE %d\n", dist ); + + Tree *tree = vm_pop(); + if ( testFalse( prg, tree ) ) + instr += dist; + treeDownref( prg, sp, tree ); + break; + } + case IN_JMP_TRUE: { + short dist; + read_half( dist ); + + debug( prg, REALM_BYTECODE, "IN_JMP_TRUE %d\n", dist ); + + Tree *tree = vm_pop(); + if ( !testFalse( prg, tree ) ) + instr += dist; + treeDownref( prg, sp, tree ); + break; + } + case IN_JMP: { + short dist; + read_half( dist ); + + debug( prg, REALM_BYTECODE, "IN_JMP\n" ); + + instr += dist; + break; + } + case IN_REJECT: { + debug( prg, REALM_BYTECODE, "IN_REJECT\n" ); + exec->parser->pdaRun->reject = true; + break; + } + + /* + * Binary comparison operators. + */ + case IN_TST_EQL: { + debug( prg, REALM_BYTECODE, "IN_TST_EQL\n" ); + + Tree *o2 = vm_pop(); + Tree *o1 = vm_pop(); + long r = cmpTree( prg, o1, o2 ); + Tree *val = r ? prg->falseVal : prg->trueVal; + treeUpref( val ); + vm_push( val ); + treeDownref( prg, sp, o1 ); + treeDownref( prg, sp, o2 ); + break; + } + case IN_TST_NOT_EQL: { + debug( prg, REALM_BYTECODE, "IN_TST_NOT_EQL\n" ); + + Tree *o2 = vm_pop(); + Tree *o1 = vm_pop(); + long r = cmpTree( prg, o1, o2 ); + Tree *val = r ? prg->trueVal : prg->falseVal; + treeUpref( val ); + vm_push( val ); + treeDownref( prg, sp, o1 ); + treeDownref( prg, sp, o2 ); + break; + } + case IN_TST_LESS: { + debug( prg, REALM_BYTECODE, "IN_TST_LESS\n" ); + + Tree *o2 = vm_pop(); + Tree *o1 = vm_pop(); + long r = cmpTree( prg, o1, o2 ); + Tree *val = r < 0 ? prg->trueVal : prg->falseVal; + treeUpref( val ); + vm_push( val ); + treeDownref( prg, sp, o1 ); + treeDownref( prg, sp, o2 ); + break; + } + case IN_TST_LESS_EQL: { + debug( prg, REALM_BYTECODE, "IN_TST_LESS_EQL\n" ); + + Tree *o2 = vm_pop(); + Tree *o1 = vm_pop(); + long r = cmpTree( prg, o1, o2 ); + Tree *val = r <= 0 ? prg->trueVal : prg->falseVal; + treeUpref( val ); + vm_push( val ); + treeDownref( prg, sp, o1 ); + treeDownref( prg, sp, o2 ); + } + case IN_TST_GRTR: { + debug( prg, REALM_BYTECODE, "IN_TST_GRTR\n" ); + + Tree *o2 = vm_pop(); + Tree *o1 = vm_pop(); + long r = cmpTree( prg, o1, o2 ); + Tree *val = r > 0 ? prg->trueVal : prg->falseVal; + treeUpref( val ); + vm_push( val ); + treeDownref( prg, sp, o1 ); + treeDownref( prg, sp, o2 ); + break; + } + case IN_TST_GRTR_EQL: { + debug( prg, REALM_BYTECODE, "IN_TST_GRTR_EQL\n" ); + + Tree *o2 = (Tree*)vm_pop(); + Tree *o1 = (Tree*)vm_pop(); + long r = cmpTree( prg, o1, o2 ); + Tree *val = r >= 0 ? prg->trueVal : prg->falseVal; + treeUpref( val ); + vm_push( val ); + treeDownref( prg, sp, o1 ); + treeDownref( prg, sp, o2 ); + break; + } + case IN_TST_LOGICAL_AND: { + debug( prg, REALM_BYTECODE, "IN_TST_LOGICAL_AND\n" ); + + Tree *o2 = vm_pop(); + Tree *o1 = vm_pop(); + long v2 = !testFalse( prg, o2 ); + long v1 = !testFalse( prg, o1 ); + Word r = v1 && v2; + Tree *val = r ? prg->trueVal : prg->falseVal; + treeUpref( val ); + vm_push( val ); + treeDownref( prg, sp, o1 ); + treeDownref( prg, sp, o2 ); + break; + } + case IN_TST_LOGICAL_OR: { + debug( prg, REALM_BYTECODE, "IN_TST_LOGICAL_OR\n" ); + + Tree *o2 = vm_pop(); + Tree *o1 = vm_pop(); + long v2 = !testFalse( prg, o2 ); + long v1 = !testFalse( prg, o1 ); + Word r = v1 || v2; + Tree *val = r ? prg->trueVal : prg->falseVal; + treeUpref( val ); + vm_push( val ); + treeDownref( prg, sp, o1 ); + treeDownref( prg, sp, o2 ); + break; + } + case IN_NOT: { + debug( prg, REALM_BYTECODE, "IN_NOT\n" ); + + Tree *tree = (Tree*)vm_pop(); + long r = testFalse( prg, tree ); + Tree *val = r ? prg->trueVal : prg->falseVal; + treeUpref( val ); + vm_push( val ); + treeDownref( prg, sp, tree ); + break; + } + + case IN_ADD_INT: { + debug( prg, REALM_BYTECODE, "IN_ADD_INT\n" ); + + Int *o2 = (Int*)vm_pop(); + Int *o1 = (Int*)vm_pop(); + long r = o1->value + o2->value; + Tree *tree = constructInteger( prg, r ); + treeUpref( tree ); + vm_push( tree ); + treeDownref( prg, sp, (Tree*)o1 ); + treeDownref( prg, sp, (Tree*)o2 ); + break; + } + case IN_MULT_INT: { + debug( prg, REALM_BYTECODE, "IN_MULT_INT\n" ); + + Int *o2 = (Int*)vm_pop(); + Int *o1 = (Int*)vm_pop(); + long r = o1->value * o2->value; + Tree *tree = constructInteger( prg, r ); + treeUpref( tree ); + vm_push( tree ); + treeDownref( prg, sp, (Tree*)o1 ); + treeDownref( prg, sp, (Tree*)o2 ); + break; + } + case IN_DIV_INT: { + debug( prg, REALM_BYTECODE, "IN_DIV_INT\n" ); + + Int *o2 = (Int*)vm_pop(); + Int *o1 = (Int*)vm_pop(); + long r = o1->value / o2->value; + Tree *tree = constructInteger( prg, r ); + treeUpref( tree ); + vm_push( tree ); + treeDownref( prg, sp, (Tree*)o1 ); + treeDownref( prg, sp, (Tree*)o2 ); + break; + } + case IN_SUB_INT: { + debug( prg, REALM_BYTECODE, "IN_SUB_INT\n" ); + + Int *o2 = (Int*)vm_pop(); + Int *o1 = (Int*)vm_pop(); + long r = o1->value - o2->value; + Tree *tree = constructInteger( prg, r ); + treeUpref( tree ); + vm_push( tree ); + treeDownref( prg, sp, (Tree*)o1 ); + treeDownref( prg, sp, (Tree*)o2 ); + break; + } + case IN_TOP_SWAP: { + debug( prg, REALM_BYTECODE, "IN_TOP_SWAP\n" ); + + Tree *v1 = vm_pop(); + Tree *v2 = vm_pop(); + vm_push( v1 ); + vm_push( v2 ); + break; + } + case IN_DUP_TOP: { + debug( prg, REALM_BYTECODE, "IN_DUP_TOP\n" ); + + Tree *val = vm_top(); + treeUpref( val ); + vm_push( val ); + break; + } + case IN_TRITER_FROM_REF: { + short field; + Half searchTypeId; + read_half( field ); + read_half( searchTypeId ); + + debug( prg, REALM_BYTECODE, "IN_TRITER_FROM_REF\n" ); + + Ref rootRef; + rootRef.kid = (Kid*)vm_pop(); + rootRef.next = (Ref*)vm_pop(); + void *mem = vm_plocal(field); + + Tree **stackRoot = vm_ptop(); + long rootSize = vm_ssize(); + + initTreeIter( (TreeIter*)mem, stackRoot, rootSize, &rootRef, searchTypeId ); + break; + } + case IN_TRITER_DESTROY: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_TRITER_DESTROY\n" ); + + TreeIter *iter = (TreeIter*) vm_plocal(field); + treeIterDestroy( prg, &sp, iter ); + break; + } + case IN_REV_TRITER_FROM_REF: { + short field; + Half searchTypeId; + read_half( field ); + read_half( searchTypeId ); + + debug( prg, REALM_BYTECODE, "IN_REV_TRITER_FROM_REF\n" ); + + Ref rootRef; + rootRef.kid = (Kid*)vm_pop(); + rootRef.next = (Ref*)vm_pop(); + + Tree **stackRoot = vm_ptop(); + long rootSize = vm_ssize(); + + int children = 0; + Kid *kid = treeChild( prg, rootRef.kid->tree ); + while ( kid != 0 ) { + vm_push( (SW)kid ); + kid = kid->next; + children++; + } + + void *mem = vm_plocal(field); + initRevTreeIter( (RevTreeIter*)mem, stackRoot, rootSize, &rootRef, searchTypeId, children ); + break; + } + case IN_REV_TRITER_DESTROY: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_REV_TRITER_DESTROY\n" ); + + RevTreeIter *iter = (RevTreeIter*) vm_plocal(field); + revTreeIterDestroy( prg, &sp, iter ); + break; + } + case IN_TREE_SEARCH: { + Word id; + read_word( id ); + + debug( prg, REALM_BYTECODE, "IN_TREE_SEARCH\n" ); + + Tree *tree = vm_pop(); + Tree *res = treeSearch( prg, tree, id ); + treeUpref( res ); + vm_push( res ); + treeDownref( prg, sp, tree ); + break; + } + case IN_TRITER_ADVANCE: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_TRITER_ADVANCE\n" ); + + TreeIter *iter = (TreeIter*) vm_plocal(field); + Tree *res = treeIterAdvance( prg, &sp, iter ); + treeUpref( res ); + vm_push( res ); + break; + } + case IN_TRITER_NEXT_CHILD: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_TRITER_NEXT_CHILD\n" ); + + TreeIter *iter = (TreeIter*) vm_plocal(field); + Tree *res = treeIterNextChild( prg, &sp, iter ); + treeUpref( res ); + vm_push( res ); + break; + } + case IN_REV_TRITER_PREV_CHILD: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_REV_TRITER_PREV_CHILD\n" ); + + RevTreeIter *iter = (RevTreeIter*) vm_plocal(field); + Tree *res = treeRevIterPrevChild( prg, &sp, iter ); + treeUpref( res ); + vm_push( res ); + break; + } + case IN_TRITER_NEXT_REPEAT: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_TRITER_NEXT_REPEAT\n" ); + + TreeIter *iter = (TreeIter*) vm_plocal(field); + Tree *res = treeIterNextRepeat( prg, &sp, iter ); + treeUpref( res ); + vm_push( res ); + break; + } + case IN_TRITER_PREV_REPEAT: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_TRITER_PREV_REPEAT\n" ); + + TreeIter *iter = (TreeIter*) vm_plocal(field); + Tree *res = treeIterPrevRepeat( prg, &sp, iter ); + treeUpref( res ); + vm_push( res ); + break; + } + case IN_TRITER_GET_CUR_R: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_TRITER_GET_CUR_R\n" ); + + TreeIter *iter = (TreeIter*) vm_plocal(field); + Tree *tree = treeIterDerefCur( iter ); + treeUpref( tree ); + vm_push( tree ); + break; + } + case IN_TRITER_GET_CUR_WC: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_TRITER_GET_CUR_WC\n" ); + + TreeIter *iter = (TreeIter*) vm_plocal(field); + splitIterCur( prg, &sp, iter ); + Tree *tree = treeIterDerefCur( iter ); + treeUpref( tree ); + vm_push( tree ); + break; + } + case IN_TRITER_SET_CUR_WC: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_TRITER_SET_CUR_WC\n" ); + + Tree *tree = vm_pop(); + TreeIter *iter = (TreeIter*) vm_plocal(field); + splitIterCur( prg, &sp, iter ); + Tree *old = treeIterDerefCur( iter ); + setTriterCur( prg, iter, tree ); + treeDownref( prg, sp, old ); + break; + } + case IN_MATCH: { + Half patternId; + read_half( patternId ); + + debug( prg, REALM_BYTECODE, "IN_MATCH\n" ); + + Tree *tree = vm_pop(); + + /* Run the match, push the result. */ + int rootNode = prg->rtd->patReplInfo[patternId].offset; + + /* Bindings are indexed starting at 1. Zero bindId to represent no + * binding. We make a space for it here rather than do math at + * access them. */ + long numBindings = prg->rtd->patReplInfo[patternId].numBindings; + Tree *bindings[1+numBindings]; + memset( bindings, 0, sizeof(Tree*)*(1+numBindings) ); + + Kid kid; + kid.tree = tree; + kid.next = 0; + int matched = matchPattern( bindings, prg, rootNode, &kid, false ); + + if ( !matched ) + memset( bindings, 0, sizeof(Tree*)*(1+numBindings) ); + else { + int b; + for ( b = 1; b <= numBindings; b++ ) + assert( bindings[b] != 0 ); + } + + Tree *result = matched ? tree : 0; + treeUpref( result ); + vm_push( result ? tree : 0 ); + int b; + for ( b = 1; b <= numBindings; b++ ) { + treeUpref( bindings[b] ); + vm_push( bindings[b] ); + } + + treeDownref( prg, sp, tree ); + break; + } + + case IN_GET_PARSER_CTX_R: { + debug( prg, REALM_BYTECODE, "IN_GET_PARSER_CTX_R\n" ); + + Tree *obj = vm_pop(); + Tree *ctx = ((Parser*)obj)->pdaRun->context; + treeUpref( ctx ); + vm_push( ctx ); + treeDownref( prg, sp, obj ); + break; + } + + case IN_SET_PARSER_CTX_WC: { + debug( prg, REALM_BYTECODE, "IN_SET_PARSER_CTX_WC\n" ); + + Tree *parser = vm_pop(); + Tree *val = vm_pop(); + parserSetContext( prg, sp, (Parser*)parser, val ); + treeDownref( prg, sp, parser ); + break; + } + +// case IN_GET_PARSER_CTX_WC: +// case IN_GET_PARSER_CTX_WV: +// case IN_SET_PARSER_CTX_WC: +// case IN_SET_PARSER_CTX_WV: +// break; + + case IN_INPUT_APPEND_WC: { + debug( prg, REALM_BYTECODE, "IN_INPUT_APPEND_WC \n" ); + + Stream *accumStream = (Stream*)vm_pop(); + Tree *input = vm_pop(); + streamAppend( prg, sp, input, accumStream->in ); + + vm_push( (Tree*)accumStream ); + treeDownref( prg, sp, input ); + break; + } + case IN_INPUT_APPEND_WV: { + debug( prg, REALM_BYTECODE, "IN_INPUT_APPEND_WV \n" ); + + Stream *accumStream = (Stream*)vm_pop(); + Tree *input = vm_pop(); + Word len = streamAppend( prg, sp, input, accumStream->in ); + + treeUpref( (Tree*)accumStream ); + vm_push( (Tree*)accumStream ); + + rcodeUnitStart( exec ); + rcodeCode( exec, IN_INPUT_APPEND_BKT ); + rcodeWord( exec, (Word) accumStream ); + rcodeWord( exec, (Word) input ); + rcodeWord( exec, (Word) len ); + rcodeUnitTerm( exec ); + break; + } + + case IN_INPUT_APPEND_BKT: { + Tree *accumStream; + Tree *input; + Word len; + read_tree( accumStream ); + read_tree( input ); + read_word( len ); + + debug( prg, REALM_BYTECODE, "IN_INPUT_APPEND_BKT\n" ); + + undoStreamAppend( prg, sp, ((Stream*)accumStream)->in, input, len ); + treeDownref( prg, sp, accumStream ); + treeDownref( prg, sp, input ); + break; + } + + case IN_SET_ERROR: { + debug( prg, REALM_BYTECODE, "IN_SET_ERROR\n" ); + + Tree *error = vm_pop(); + treeDownref( prg, sp, prg->error ); + prg->error = error; + break; + } + + case IN_GET_ERROR: { + debug( prg, REALM_BYTECODE, "IN_GET_ERROR\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + treeUpref( (Tree*)prg->error ); + vm_push( (Tree*)prg->error ); + break; + } + + case IN_PARSE_SAVE_STEPS: { + debug( prg, REALM_BYTECODE, "IN_PARSE_SAVE_STEPS\n" ); + + Parser *parser = (Parser*)vm_pop(); + long steps = parser->pdaRun->steps; + + vm_push( (SW)exec->parser ); + vm_push( (SW)exec->pcr ); + vm_push( (SW)exec->steps ); + + exec->parser = parser; + exec->steps = steps; + exec->pcr = PcrStart; + break; + } + + case IN_PARSE_INIT_BKT: { + debug( prg, REALM_BYTECODE, "IN_PARSE_INIT_BKT\n" ); + + Tree *parser; + Word pcr; + Word steps; + + read_tree( parser ); + read_word( pcr ); + read_word( steps ); + + vm_push( (SW)exec->parser ); + vm_push( (SW)exec->pcr ); + vm_push( (SW)exec->steps ); + + exec->parser = (Parser*)parser; + exec->steps = steps; + exec->pcr = pcr; + break; + } + + case IN_PCR_CALL: { + debug( prg, REALM_BYTECODE, "IN_PCR_CALL\n" ); + + FrameInfo *fi = &prg->rtd->frameInfo[exec->parser->pdaRun->frameId]; + long stretch = fi->argSize + 4 + fi->frameSize; + vm_contiguous( stretch ); + + vm_push( (SW)exec->framePtr ); + vm_push( (SW)exec->iframePtr ); + vm_push( (SW)exec->frameId ); + + /* Return location one instruction back. Depends on the size of of the frag/finish. */ + Code *returnTo = instr - ( SIZEOF_CODE + SIZEOF_CODE + SIZEOF_HALF ); + vm_push( (SW)returnTo ); + + exec->framePtr = 0; + exec->iframePtr = 0; + exec->frameId = 0; + + exec->frameId = exec->parser->pdaRun->frameId; + + instr = exec->parser->pdaRun->code; + break; + } + + case IN_PCR_RET: { + debug( prg, REALM_BYTECODE, "IN_PCR_RET\n" ); + + FrameInfo *fi = &prg->rtd->frameInfo[exec->frameId]; + downrefLocalTrees( prg, sp, exec->framePtr, fi->locals, fi->localsLen ); + debug( prg, REALM_BYTECODE, "RET: %d\n", fi->frameSize ); + vm_popn( fi->frameSize ); + + instr = (Code*) vm_pop(); + exec->frameId = ( long ) vm_pop(); + exec->iframePtr = ( Tree ** ) vm_pop(); + exec->framePtr = ( Tree ** ) vm_pop(); + + if ( instr == 0 ) { + fflush( stdout ); + goto out; + } + break; + } + + case IN_PCR_END_DECK: { + debug( prg, REALM_BYTECODE, "IN_PCR_END_DECK\n" ); + exec->parser->pdaRun->onDeck = false; + break; + } + + case IN_PARSE_FRAG_WC: { + Half stopId; + read_half( stopId ); + + debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_WC %hd\n", stopId ); + + exec->pcr = parseFrag( prg, sp, exec->parser, stopId, exec->pcr ); + + /* If done, jump to the terminating instruction, otherwise fall + * through to call some code, then jump back here. */ + if ( exec->pcr == PcrDone ) + instr += SIZEOF_CODE; + break; + } + + case IN_PARSE_FRAG_EXIT_WC: { + debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_EXIT_WC\n" ); + + Parser *parser = exec->parser; + + exec->steps = (long)vm_pop(); + exec->pcr = (long)vm_pop(); + exec->parser = (Parser*) vm_pop(); + + treeDownref( prg, sp, (Tree*)parser ); + + if ( prg->induceExit ) + goto out; + + break; + } + + case IN_PARSE_FRAG_WV: { + Half stopId; + read_half( stopId ); + + debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_WV %hd\n", stopId ); + + exec->pcr = parseFrag( prg, sp, exec->parser, stopId, exec->pcr ); + + /* If done, jump to the terminating instruction, otherwise fall + * through to call some code, then jump back here. */ + if ( exec->pcr == PcrDone ) + instr += SIZEOF_CODE; + break; + } + + case IN_PARSE_FRAG_EXIT_WV: { + debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_EXIT_WV \n" ); + + Parser *parser = exec->parser; + long steps = exec->steps; + + exec->steps = (long)vm_pop(); + exec->pcr = (long)vm_pop(); + exec->parser = (Parser*)vm_pop(); + + rcodeUnitStart( exec ); + rcodeCode( exec, IN_PARSE_INIT_BKT ); + rcodeWord( exec, (Word)parser ); + rcodeWord( exec, (Word)PcrStart ); + rcodeWord( exec, steps ); + rcodeCode( exec, IN_PARSE_FRAG_BKT ); + rcodeHalf( exec, 0 ); + rcodeCode( exec, IN_PCR_CALL ); + rcodeCode( exec, IN_PARSE_FRAG_EXIT_BKT ); + rcodeUnitTerm( exec ); + + if ( prg->induceExit ) + goto out; + break; + } + + case IN_PARSE_FRAG_BKT: { + Half stopId; + read_half( stopId ); + + debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_BKT %hd\n", stopId ); + + exec->pcr = undoParseFrag( prg, sp, exec->parser, exec->steps, exec->pcr ); + + if ( exec->pcr == PcrDone ) + instr += SIZEOF_CODE; + break; + } + + case IN_PARSE_FRAG_EXIT_BKT: { + debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_EXIT_BKT\n" ); + + Parser *parser = exec->parser; + + exec->steps = (long)vm_pop(); + exec->pcr = (long)vm_pop(); + exec->parser = (Parser*)vm_pop(); + + treeDownref( prg, sp, (Tree*)parser ); + break; + } + + case IN_PARSE_FINISH_WC: { + Half stopId; + read_half( stopId ); + + debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_WC %hd\n", stopId ); + + exec->parser->result = 0; + exec->pcr = parseFinish( &exec->parser->result, prg, sp, exec->parser, false, exec->pcr ); + + /* If done, jump to the terminating instruction, otherwise fall + * through to call some code, then jump back here. */ + if ( exec->pcr == PcrDone ) + instr += SIZEOF_CODE; + break; + } + + case IN_PARSE_FINISH_EXIT_WC: { + debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_EXIT_WC\n" ); + + Parser *parser = exec->parser; + + exec->steps = (long)vm_pop(); + exec->pcr = (long)vm_pop(); + exec->parser = (Parser*)vm_pop(); + + vm_push( parser->result ); + treeDownref( prg, sp, (Tree*)parser ); + if ( prg->induceExit ) + goto out; + + break; + } + + case IN_PARSE_FINISH_WV: { + Half stopId; + read_half( stopId ); + + debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_WV %hd\n", stopId ); + + exec->parser->result = 0; + exec->pcr = parseFinish( &exec->parser->result, prg, sp, exec->parser, true, exec->pcr ); + + if ( exec->pcr == PcrDone ) + instr += SIZEOF_CODE; + break; + } + + case IN_PARSE_FINISH_EXIT_WV: { + debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_EXIT_WV\n" ); + + Parser *parser = exec->parser; + long steps = exec->steps; + + exec->steps = (long)vm_pop(); + exec->pcr = (long)vm_pop(); + exec->parser = (Parser *) vm_pop(); + + vm_push( parser->result ); + + rcodeUnitStart( exec ); + rcodeCode( exec, IN_PARSE_INIT_BKT ); + rcodeWord( exec, (Word)parser ); + rcodeWord( exec, (Word)PcrStart ); + rcodeWord( exec, steps ); + rcodeCode( exec, IN_PARSE_FINISH_BKT ); + rcodeHalf( exec, 0 ); + rcodeCode( exec, IN_PCR_CALL ); + rcodeCode( exec, IN_PARSE_FINISH_EXIT_BKT ); + rcodeUnitTerm( exec ); + + if ( prg->induceExit ) + goto out; + + break; + } + + case IN_PARSE_FINISH_BKT: { + Half stopId; + read_half( stopId ); + + debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_BKT %hd\n", stopId ); + + exec->pcr = undoParseFrag( prg, sp, exec->parser, exec->steps, exec->pcr ); + + if ( exec->pcr == PcrDone ) + instr += SIZEOF_CODE; + break; + } + + case IN_PARSE_FINISH_EXIT_BKT: { + debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_EXIT_BKT\n" ); + + Parser *parser = exec->parser; + + exec->steps = (long)vm_pop(); + exec->pcr = (long)vm_pop(); + exec->parser = (Parser*)vm_pop(); + + parser->input->in->funcs->unsetEof( parser->input->in ); + treeDownref( prg, sp, (Tree*)parser ); + break; + } + + case IN_INPUT_PULL_WV: { + debug( prg, REALM_BYTECODE, "IN_INPUT_PULL_WV\n" ); + + Stream *accumStream = (Stream*)vm_pop(); + Tree *len = vm_pop(); + PdaRun *pdaRun = exec->parser != 0 ? exec->parser->pdaRun : 0; + Tree *string = streamPullBc( prg, pdaRun, accumStream->in, len ); + treeUpref( string ); + vm_push( string ); + + /* Single unit. */ + treeUpref( string ); + rcodeCode( exec, IN_INPUT_PULL_BKT ); + rcodeWord( exec, (Word) string ); + rcodeUnitTerm( exec ); + + treeDownref( prg, sp, (Tree*)accumStream ); + treeDownref( prg, sp, len ); + break; + } + + case IN_INPUT_PULL_WC: { + debug( prg, REALM_BYTECODE, "IN_INPUT_PULL_WC\n" ); + + Stream *accumStream = (Stream*)vm_pop(); + Tree *len = vm_pop(); + PdaRun *pdaRun = exec->parser != 0 ? exec->parser->pdaRun : 0; + Tree *string = streamPullBc( prg, pdaRun, accumStream->in, len ); + treeUpref( string ); + vm_push( string ); + + treeDownref( prg, sp, (Tree*)accumStream ); + treeDownref( prg, sp, len ); + break; + } + case IN_INPUT_PULL_BKT: { + Tree *string; + read_tree( string ); + + Tree *accumStream = vm_pop(); + + debug( prg, REALM_BYTECODE, "IN_INPUT_PULL_BKT\n" ); + + undoPull( prg, ((Stream*)accumStream)->in, string ); + treeDownref( prg, sp, accumStream ); + treeDownref( prg, sp, string ); + break; + } + case IN_INPUT_PUSH_WV: { + debug( prg, REALM_BYTECODE, "IN_INPUT_PUSH_WV\n" ); + + Stream *input = (Stream*)vm_pop(); + Tree *tree = vm_pop(); + long len = streamPush( prg, sp, input->in, tree, false ); + vm_push( 0 ); + + /* Single unit. */ + rcodeCode( exec, IN_INPUT_PUSH_BKT ); + rcodeWord( exec, len ); + rcodeUnitTerm( exec ); + + treeDownref( prg, sp, (Tree*)input ); + treeDownref( prg, sp, tree ); + break; + } + case IN_INPUT_PUSH_IGNORE_WV: { + debug( prg, REALM_BYTECODE, "IN_INPUT_PUSH_IGNORE_WV\n" ); + + Stream *input = (Stream*)vm_pop(); + Tree *tree = vm_pop(); + long len = streamPush( prg, sp, input->in, tree, true ); + vm_push( 0 ); + + /* Single unit. */ + rcodeCode( exec, IN_INPUT_PUSH_BKT ); + rcodeWord( exec, len ); + rcodeUnitTerm( exec ); + + treeDownref( prg, sp, (Tree*)input ); + treeDownref( prg, sp, tree ); + break; + } + case IN_INPUT_PUSH_BKT: { + Word len; + read_word( len ); + + Stream *input = (Stream*)vm_pop(); + + debug( prg, REALM_BYTECODE, "IN_INPUT_PUSH_BKT\n" ); + + undoStreamPush( prg, sp, input->in, len ); + treeDownref( prg, sp, (Tree*)input ); + break; + } + case IN_CONSTRUCT: { + Half patternId; + read_half( patternId ); + + debug( prg, REALM_BYTECODE, "IN_CONSTRUCT\n" ); + + int rootNode = prg->rtd->patReplInfo[patternId].offset; + + /* Note that bindIds are indexed at one. Add one spot for them. */ + int numBindings = prg->rtd->patReplInfo[patternId].numBindings; + Tree *bindings[1+numBindings]; + + int b; + for ( b = 1; b <= numBindings; b++ ) { + bindings[b] = vm_pop(); + assert( bindings[b] != 0 ); + } + + Tree *replTree = 0; + PatConsNode *nodes = prg->rtd->patReplNodes; + LangElInfo *lelInfo = prg->rtd->lelInfo; + long genericId = lelInfo[nodes[rootNode].id].genericId; + if ( genericId > 0 ) { + replTree = createGeneric( prg, genericId ); + treeUpref( replTree ); + } + else { + replTree = constructReplacementTree( 0, bindings, + prg, rootNode ); + } + + vm_push( replTree ); + break; + } + case IN_CONSTRUCT_INPUT: { + debug( prg, REALM_BYTECODE, "IN_CONSTRUCT_INPUT\n" ); + + Tree *input = constructStream( prg ); + treeUpref( input ); + vm_push( input ); + break; + } + case IN_GET_INPUT: { + debug( prg, REALM_BYTECODE, "IN_GET_INPUT\n" ); + + Parser *parser = (Parser*)vm_pop(); + treeUpref( (Tree*)parser->input ); + vm_push( (Tree*)parser->input ); + treeDownref( prg, sp, (Tree*)parser ); + break; + } + case IN_SET_INPUT: { + debug( prg, REALM_BYTECODE, "IN_SET_INPUT\n" ); + + Parser *parser = (Parser*)vm_pop(); + Stream *accumStream = (Stream*)vm_pop(); + parser->input = accumStream; + treeUpref( (Tree*)accumStream ); + treeDownref( prg, sp, (Tree*)parser ); + treeDownref( prg, sp, (Tree*)accumStream ); + break; + } + case IN_CONSTRUCT_TERM: { + Half tokenId; + read_half( tokenId ); + + debug( prg, REALM_BYTECODE, "IN_CONSTRUCT_TERM\n" ); + + /* Pop the string we are constructing the token from. */ + Str *str = (Str*)vm_pop(); + Tree *res = constructTerm( prg, tokenId, str->value ); + treeUpref( res ); + vm_push( res ); + break; + } + case IN_MAKE_TOKEN: { + uchar nargs; + int i; + read_byte( nargs ); + + debug( prg, REALM_BYTECODE, "IN_MAKE_TOKEN\n" ); + + Tree *arg[nargs]; + for ( i = nargs-1; i >= 0; i-- ) + arg[i] = vm_pop(); + + Tree *result = constructToken( prg, arg, nargs ); + for ( i = 0; i < nargs; i++ ) + treeDownref( prg, sp, arg[i] ); + vm_push( result ); + break; + } + case IN_MAKE_TREE: { + uchar nargs; + int i; + read_byte( nargs ); + + debug( prg, REALM_BYTECODE, "IN_MAKE_TREE\n" ); + + Tree *arg[nargs]; + for ( i = nargs-1; i >= 0; i-- ) + arg[i] = vm_pop(); + + Tree *result = makeTree( prg, arg, nargs ); + for ( i = 0; i < nargs; i++ ) + treeDownref( prg, sp, arg[i] ); + + vm_push( result ); + break; + } + case IN_TREE_CAST: { + Half langElId; + read_half( langElId ); + + debug( prg, REALM_BYTECODE, "IN_TREE_CAST %hd\n", langElId ); + + Tree *tree = vm_pop(); + Tree *res = castTree( prg, langElId, tree ); + treeUpref( res ); + treeDownref( prg, sp, tree ); + vm_push( res ); + break; + } + case IN_TREE_NEW: { + debug( prg, REALM_BYTECODE, "IN_TREE_NEW \n" ); + + Tree *tree = vm_pop(); + Tree *res = constructPointer( prg, tree ); + treeUpref( res ); + vm_push( res ); + break; + } + case IN_PTR_DEREF_R: { + debug( prg, REALM_BYTECODE, "IN_PTR_DEREF_R\n" ); + + Pointer *ptr = (Pointer*)vm_pop(); + treeDownref( prg, sp, (Tree*)ptr ); + + Tree *dval = getPtrVal( ptr ); + treeUpref( dval ); + vm_push( dval ); + break; + } + case IN_PTR_DEREF_WC: { + debug( prg, REALM_BYTECODE, "IN_PTR_DEREF_WC\n" ); + + Pointer *ptr = (Pointer*)vm_pop(); + treeDownref( prg, sp, (Tree*)ptr ); + + Tree *dval = getPtrValSplit( prg, ptr ); + treeUpref( dval ); + vm_push( dval ); + break; + } + case IN_PTR_DEREF_WV: { + debug( prg, REALM_BYTECODE, "IN_PTR_DEREF_WV\n" ); + + Pointer *ptr = (Pointer*)vm_pop(); + /* Don't downref the pointer since it is going into the reverse + * instruction. */ + + Tree *dval = getPtrValSplit( prg, ptr ); + treeUpref( dval ); + vm_push( dval ); + + /* This is an initial global load. Need to reverse execute it. */ + rcodeUnitStart( exec ); + rcodeCode( exec, IN_PTR_DEREF_BKT ); + rcodeWord( exec, (Word) ptr ); + break; + } + case IN_PTR_DEREF_BKT: { + Word p; + read_word( p ); + + debug( prg, REALM_BYTECODE, "IN_PTR_DEREF_BKT\n" ); + + Pointer *ptr = (Pointer*)p; + + Tree *dval = getPtrValSplit( prg, ptr ); + treeUpref( dval ); + vm_push( dval ); + + treeDownref( prg, sp, (Tree*)ptr ); + break; + } + case IN_REF_FROM_LOCAL: { + short int field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_REF_FROM_LOCAL %hd\n", field ); + + /* First push the null next pointer, then the kid pointer. */ + Tree **ptr = vm_plocal(field); + vm_contiguous( 2 ); + vm_push( 0 ); + vm_push( (SW)ptr ); + break; + } + case IN_REF_FROM_REF: { + short int field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_REF_FROM_REF\n" ); + + Ref *ref = (Ref*)vm_plocal(field); + vm_contiguous( 2 ); + vm_push( (SW)ref ); + vm_push( (SW)ref->kid ); + break; + } + case IN_REF_FROM_QUAL_REF: { + short int back; + short int field; + read_half( back ); + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_REF_FROM_QUAL_REF\n" ); + + Ref *ref = (Ref*)(sp + back); + + Tree *obj = ref->kid->tree; + Kid *attr_kid = getFieldKid( obj, field ); + + vm_contiguous( 2 ); + vm_push( (SW)ref ); + vm_push( (SW)attr_kid ); + break; + } + case IN_REF_FROM_BACK: { + short int back; + read_half( back ); + + debug( prg, REALM_BYTECODE, "IN_REF_FROM_BACK %hd\n", back ); + + Tree **ptr = (Tree**)(sp + back); + + vm_contiguous( 2 ); + vm_push( 0 ); + vm_push( (SW)ptr ); + break; + } + case IN_TRITER_REF_FROM_CUR: { + short int field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_TRITER_REF_FROM_CUR\n" ); + + /* Push the next pointer first, then the kid. */ + TreeIter *iter = (TreeIter*) vm_plocal(field); + Ref *ref = &iter->ref; + vm_contiguous( 2 ); + vm_push( (SW)ref ); + vm_push( (SW)iter->ref.kid ); + break; + } + case IN_UITER_REF_FROM_CUR: { + short int field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_UITER_REF_FROM_CUR\n" ); + + /* Push the next pointer first, then the kid. */ + UserIter *uiter = (UserIter*) vm_local(field); + vm_contiguous( 2 ); + vm_push( (SW)uiter->ref.next ); + vm_push( (SW)uiter->ref.kid ); + break; + } + case IN_GET_TOKEN_DATA_R: { + debug( prg, REALM_BYTECODE, "IN_GET_TOKEN_DATA_R\n" ); + + Tree *tree = (Tree*) vm_pop(); + Head *data = stringCopy( prg, tree->tokdata ); + Tree *str = constructString( prg, data ); + treeUpref( str ); + vm_push( str ); + treeDownref( prg, sp, tree ); + break; + } + case IN_SET_TOKEN_DATA_WC: { + debug( prg, REALM_BYTECODE, "IN_SET_TOKEN_DATA_WC\n" ); + + Tree *tree = vm_pop(); + Tree *val = vm_pop(); + Head *head = stringCopy( prg, ((Str*)val)->value ); + stringFree( prg, tree->tokdata ); + tree->tokdata = head; + + treeDownref( prg, sp, tree ); + treeDownref( prg, sp, val ); + break; + } + case IN_SET_TOKEN_DATA_WV: { + debug( prg, REALM_BYTECODE, "IN_SET_TOKEN_DATA_WV\n" ); + + Tree *tree = vm_pop(); + Tree *val = vm_pop(); + + Head *oldval = tree->tokdata; + Head *head = stringCopy( prg, ((Str*)val)->value ); + tree->tokdata = head; + + /* Set up reverse code. Needs no args. */ + rcodeCode( exec, IN_SET_TOKEN_DATA_BKT ); + rcodeWord( exec, (Word)oldval ); + rcodeUnitTerm( exec ); + + treeDownref( prg, sp, tree ); + treeDownref( prg, sp, val ); + break; + } + case IN_SET_TOKEN_DATA_BKT: { + debug( prg, REALM_BYTECODE, "IN_SET_TOKEN_DATA_BKT \n" ); + + Word oldval; + read_word( oldval ); + + Tree *tree = vm_pop(); + Head *head = (Head*)oldval; + stringFree( prg, tree->tokdata ); + tree->tokdata = head; + treeDownref( prg, sp, tree ); + break; + } + case IN_GET_TOKEN_POS_R: { + debug( prg, REALM_BYTECODE, "IN_GET_TOKEN_POS_R\n" ); + + Tree *tree = (Tree*) vm_pop(); + Tree *integer = 0; + if ( tree->tokdata->location ) { + integer = constructInteger( prg, tree->tokdata->location->byte ); + treeUpref( integer ); + } + vm_push( integer ); + treeDownref( prg, sp, tree ); + break; + } + case IN_GET_TOKEN_LINE_R: { + debug( prg, REALM_BYTECODE, "IN_GET_TOKEN_LINE_R\n" ); + + Tree *tree = (Tree*) vm_pop(); + Tree *integer = 0; + if ( tree->tokdata->location ) { + integer = constructInteger( prg, tree->tokdata->location->line ); + treeUpref( integer ); + } + vm_push( integer ); + treeDownref( prg, sp, tree ); + break; + } + case IN_GET_MATCH_LENGTH_R: { + debug( prg, REALM_BYTECODE, "IN_GET_MATCH_LENGTH_R\n" ); + + Tree *integer = constructInteger( prg, stringLength(exec->parser->pdaRun->tokdata) ); + treeUpref( integer ); + vm_push( integer ); + break; + } + case IN_GET_MATCH_TEXT_R: { + debug( prg, REALM_BYTECODE, "IN_GET_MATCH_TEXT_R\n" ); + + Head *s = stringCopy( prg, exec->parser->pdaRun->tokdata ); + Tree *tree = constructString( prg, s ); + treeUpref( tree ); + vm_push( tree ); + break; + } + case IN_LIST_LENGTH: { + debug( prg, REALM_BYTECODE, "IN_LIST_LENGTH\n" ); + + List *list = (List*) vm_pop(); + long len = listLength( list ); + Tree *res = constructInteger( prg, len ); + treeDownref( prg, sp, (Tree*)list ); + treeUpref( res ); + vm_push( res ); + break; + } + case IN_LIST_APPEND_WV: { + debug( prg, REALM_BYTECODE, "IN_LIST_APPEND_WV\n" ); + + Tree *obj = vm_pop(); + Tree *val = vm_pop(); + + treeDownref( prg, sp, obj ); + + listAppend2( prg, (List*)obj, val ); + treeUpref( prg->trueVal ); + vm_push( prg->trueVal ); + + /* Set up reverse code. Needs no args. */ + rcodeCode( exec, IN_LIST_APPEND_BKT ); + rcodeUnitTerm( exec ); + break; + } + case IN_LIST_APPEND_WC: { + debug( prg, REALM_BYTECODE, "IN_LIST_APPEND_WC\n" ); + + Tree *obj = vm_pop(); + Tree *val = vm_pop(); + + treeDownref( prg, sp, obj ); + + listAppend2( prg, (List*)obj, val ); + treeUpref( prg->trueVal ); + vm_push( prg->trueVal ); + break; + } + case IN_LIST_APPEND_BKT: { + debug( prg, REALM_BYTECODE, "IN_LIST_APPEND_BKT\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *tree = listRemoveEnd( prg, (List*)obj ); + treeDownref( prg, sp, tree ); + break; + } + case IN_LIST_REMOVE_END_WC: { + debug( prg, REALM_BYTECODE, "IN_LIST_REMOVE_END_WC\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *end = listRemoveEnd( prg, (List*)obj ); + vm_push( end ); + break; + } + case IN_LIST_REMOVE_END_WV: { + debug( prg, REALM_BYTECODE, "IN_LIST_REMOVE_END_WV\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *end = listRemoveEnd( prg, (List*)obj ); + vm_push( end ); + + /* Set up reverse. The result comes off the list downrefed. + * Need it up referenced for the reverse code too. */ + treeUpref( end ); + rcodeCode( exec, IN_LIST_REMOVE_END_BKT ); + rcodeWord( exec, (Word)end ); + rcodeUnitTerm( exec ); + break; + } + case IN_LIST_REMOVE_END_BKT: { + debug( prg, REALM_BYTECODE, "IN_LIST_REMOVE_END_BKT\n" ); + + Tree *val; + read_tree( val ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + listAppend2( prg, (List*)obj, val ); + break; + } + case IN_GET_LIST_MEM_R: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_LIST_MEM_R\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *val = getListMem( (List*)obj, field ); + treeUpref( val ); + vm_push( val ); + break; + } + case IN_GET_LIST_MEM_WC: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_LIST_MEM_WC\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *val = getListMemSplit( prg, (List*)obj, field ); + treeUpref( val ); + vm_push( val ); + break; + } + case IN_GET_LIST_MEM_WV: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_LIST_MEM_WV\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *val = getListMemSplit( prg, (List*)obj, field ); + treeUpref( val ); + vm_push( val ); + + /* Set up the reverse instruction. */ + rcodeCode( exec, IN_GET_LIST_MEM_BKT ); + rcodeHalf( exec, field ); + break; + } + case IN_GET_LIST_MEM_BKT: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_LIST_MEM_BKT\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *res = getListMemSplit( prg, (List*)obj, field ); + treeUpref( res ); + vm_push( res ); + break; + } + case IN_SET_LIST_MEM_WC: { + Half field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_SET_LIST_MEM_WC\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *val = vm_pop(); + Tree *existing = setListMem( (List*)obj, field, val ); + treeDownref( prg, sp, existing ); + break; + } + case IN_SET_LIST_MEM_WV: { + Half field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_SET_LIST_MEM_WV\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *val = vm_pop(); + Tree *existing = setListMem( (List*)obj, field, val ); + + /* Set up the reverse instruction. */ + rcodeCode( exec, IN_SET_LIST_MEM_BKT ); + rcodeHalf( exec, field ); + rcodeWord( exec, (Word)existing ); + rcodeUnitTerm( exec ); + break; + } + case IN_SET_LIST_MEM_BKT: { + Half field; + Tree *val; + read_half( field ); + read_tree( val ); + + debug( prg, REALM_BYTECODE, "IN_SET_LIST_MEM_BKT\n" ); + + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + + Tree *undid = setListMem( (List*)obj, field, val ); + treeDownref( prg, sp, undid ); + break; + } + case IN_GET_PARSER_MEM_R: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_GET_PARSER_MEM_R %hd\n", field ); + + Tree *obj = vm_pop(); + Tree *val = getParserMem( (Parser*)obj, field ); + treeUpref( val ); + + /* In at least one case we extract the result on a parser with ref + * one. Do it after. */ + treeDownref( prg, sp, obj ); + vm_push( val ); + break; + } + case IN_MAP_INSERT_WV: { + debug( prg, REALM_BYTECODE, "IN_MAP_INSERT_WV\n" ); + + Tree *obj = vm_pop(); + Tree *val = vm_pop(); + Tree *key = vm_pop(); + + treeDownref( prg, sp, obj ); + + int inserted = mapInsert( prg, (Map*)obj, key, val ); + Tree *result = inserted ? prg->trueVal : prg->falseVal; + treeUpref( result ); + vm_push( result ); + + /* Set up the reverse instruction. If the insert fails still need + * to pop the loaded map object. Just use the reverse instruction + * since it's nice to see it in the logs. */ + + /* Need to upref key for storage in reverse code. */ + treeUpref( key ); + rcodeCode( exec, IN_MAP_INSERT_BKT ); + rcodeCode( exec, inserted ); + rcodeWord( exec, (Word)key ); + rcodeUnitTerm( exec ); + + if ( ! inserted ) { + treeDownref( prg, sp, key ); + treeDownref( prg, sp, val ); + } + break; + } + case IN_MAP_INSERT_WC: { + debug( prg, REALM_BYTECODE, "IN_MAP_INSERT_WC\n" ); + + Tree *obj = vm_pop(); + Tree *val = vm_pop(); + Tree *key = vm_pop(); + + treeDownref( prg, sp, obj ); + + int inserted = mapInsert( prg, (Map*)obj, key, val ); + Tree *result = inserted ? prg->trueVal : prg->falseVal; + treeUpref( result ); + vm_push( result ); + + if ( ! inserted ) { + treeDownref( prg, sp, key ); + treeDownref( prg, sp, val ); + } + break; + } + case IN_MAP_INSERT_BKT: { + uchar inserted; + Tree *key; + read_byte( inserted ); + read_tree( key ); + + debug( prg, REALM_BYTECODE, "IN_MAP_INSERT_BKT\n" ); + + Tree *obj = vm_pop(); + if ( inserted ) { + Tree *val = mapUninsert( prg, (Map*)obj, key ); + treeDownref( prg, sp, key ); + treeDownref( prg, sp, val ); + } + + treeDownref( prg, sp, obj ); + treeDownref( prg, sp, key ); + break; + } + case IN_MAP_STORE_WC: { + debug( prg, REALM_BYTECODE, "IN_MAP_STORE_WC\n" ); + + Tree *obj = vm_pop(); + Tree *element = vm_pop(); + Tree *key = vm_pop(); + + Tree *existing = mapStore( prg, (Map*)obj, key, element ); + Tree *result = existing == 0 ? prg->trueVal : prg->falseVal; + treeUpref( result ); + vm_push( result ); + + treeDownref( prg, sp, obj ); + if ( existing != 0 ) { + treeDownref( prg, sp, key ); + treeDownref( prg, sp, existing ); + } + break; + } + case IN_MAP_STORE_WV: { + debug( prg, REALM_BYTECODE, "IN_MAP_STORE_WV\n" ); + + Tree *obj = vm_pop(); + Tree *element = vm_pop(); + Tree *key = vm_pop(); + + Tree *existing = mapStore( prg, (Map*)obj, key, element ); + Tree *result = existing == 0 ? prg->trueVal : prg->falseVal; + treeUpref( result ); + vm_push( result ); + + /* Set up the reverse instruction. */ + treeUpref( key ); + treeUpref( existing ); + rcodeCode( exec, IN_MAP_STORE_BKT ); + rcodeWord( exec, (Word)key ); + rcodeWord( exec, (Word)existing ); + rcodeUnitTerm( exec ); + + treeDownref( prg, sp, obj ); + if ( existing != 0 ) { + treeDownref( prg, sp, key ); + treeDownref( prg, sp, existing ); + } + break; + } + case IN_MAP_STORE_BKT: { + Tree *key, *val; + read_tree( key ); + read_tree( val ); + + debug( prg, REALM_BYTECODE, "IN_MAP_STORE_BKT\n" ); + + Tree *obj = vm_pop(); + Tree *stored = mapUnstore( prg, (Map*)obj, key, val ); + + treeDownref( prg, sp, stored ); + if ( val == 0 ) + treeDownref( prg, sp, key ); + + treeDownref( prg, sp, obj ); + treeDownref( prg, sp, key ); + break; + } + case IN_MAP_REMOVE_WC: { + debug( prg, REALM_BYTECODE, "IN_MAP_REMOVE_WC\n" ); + + Tree *obj = vm_pop(); + Tree *key = vm_pop(); + TreePair pair = mapRemove( prg, (Map*)obj, key ); + + vm_push( pair.val ); + + treeDownref( prg, sp, obj ); + treeDownref( prg, sp, key ); + treeDownref( prg, sp, pair.key ); + break; + } + case IN_MAP_REMOVE_WV: { + debug( prg, REALM_BYTECODE, "IN_MAP_REMOVE_WV\n" ); + + Tree *obj = vm_pop(); + Tree *key = vm_pop(); + TreePair pair = mapRemove( prg, (Map*)obj, key ); + + treeUpref( pair.val ); + vm_push( pair.val ); + + /* Reverse instruction. */ + rcodeCode( exec, IN_MAP_REMOVE_BKT ); + rcodeWord( exec, (Word)pair.key ); + rcodeWord( exec, (Word)pair.val ); + rcodeUnitTerm( exec ); + + treeDownref( prg, sp, obj ); + treeDownref( prg, sp, key ); + break; + } + case IN_MAP_REMOVE_BKT: { + Tree *key, *val; + read_tree( key ); + read_tree( val ); + + debug( prg, REALM_BYTECODE, "IN_MAP_REMOVE_BKT\n" ); + + /* Either both or neither. */ + assert( ( key == 0 ) ^ ( val != 0 ) ); + + Tree *obj = vm_pop(); + if ( key != 0 ) + mapUnremove( prg, (Map*)obj, key, val ); + + treeDownref( prg, sp, obj ); + break; + } + case IN_MAP_LENGTH: { + debug( prg, REALM_BYTECODE, "IN_MAP_LENGTH\n" ); + + Tree *obj = vm_pop(); + long len = mapLength( (Map*)obj ); + Tree *res = constructInteger( prg, len ); + treeUpref( res ); + vm_push( res ); + + treeDownref( prg, sp, obj ); + break; + } + case IN_MAP_FIND: { + debug( prg, REALM_BYTECODE, "IN_MAP_FIND\n" ); + + Tree *obj = vm_pop(); + Tree *key = vm_pop(); + Tree *result = mapFind( prg, (Map*)obj, key ); + treeUpref( result ); + vm_push( result ); + + treeDownref( prg, sp, obj ); + treeDownref( prg, sp, key ); + break; + } + case IN_CONTIGUOUS: { + Half size; + read_half( size ); + debug( prg, REALM_BYTECODE, "IN_CONTIGUOUS %hd\n", size ); + vm_contiguous( size ); + vm_push( 0 ); + break; + } + case IN_INIT_LOCALS: { + Half size; + read_half( size ); + + debug( prg, REALM_BYTECODE, "IN_INIT_LOCALS %hd\n", size ); + + exec->framePtr = vm_ptop(); + vm_pushn( size ); + memset( vm_ptop(), 0, sizeof(Word) * size ); + break; + } + case IN_CALL_WV: { + Half funcId; + read_half( funcId ); + + FunctionInfo *fi = &prg->rtd->functionInfo[funcId]; + + debug( prg, REALM_BYTECODE, "IN_CALL_WV %s\n", fi->name ); + + vm_push( 0 ); /* Return value. */ + vm_push( (SW)instr ); + vm_push( (SW)exec->framePtr ); + vm_push( (SW)exec->frameId ); + + instr = prg->rtd->frameInfo[fi->frameId].codeWV; + exec->framePtr = vm_ptop(); + exec->frameId = fi->frameId; + break; + } + case IN_CALL_WC: { + Half funcId; + read_half( funcId ); + + FunctionInfo *fi = &prg->rtd->functionInfo[funcId]; + + debug( prg, REALM_BYTECODE, "IN_CALL_WC %s\n", fi->name ); + + vm_push( 0 ); /* Return value. */ + vm_push( (SW)instr ); + vm_push( (SW)exec->framePtr ); + vm_push( (SW)exec->frameId ); + + instr = prg->rtd->frameInfo[fi->frameId].codeWC; + exec->framePtr = vm_ptop(); + exec->frameId = fi->frameId; + break; + } + case IN_YIELD: { + debug( prg, REALM_BYTECODE, "IN_YIELD\n" ); + + Kid *kid = (Kid*)vm_pop(); + Ref *next = (Ref*)vm_pop(); + UserIter *uiter = (UserIter*) vm_plocal_iframe( IFR_AA ); + + if ( kid == 0 || kid->tree == 0 || + kid->tree->id == uiter->searchId || + uiter->searchId == prg->rtd->anyId ) + { + /* Store the yeilded value. */ + uiter->ref.kid = kid; + uiter->ref.next = next; + uiter->yieldSize = vm_ssize() - uiter->rootSize; + uiter->resume = instr; + uiter->frame = exec->framePtr; + + /* Restore the instruction and frame pointer. */ + instr = (Code*) vm_local_iframe(IFR_RIN); + exec->framePtr = (Tree**) vm_local_iframe(IFR_RFR); + exec->iframePtr = (Tree**) vm_local_iframe(IFR_RIF); + + /* Return the yield result on the top of the stack. */ + Tree *result = uiter->ref.kid != 0 ? prg->trueVal : prg->falseVal; + treeUpref( result ); + vm_push( result ); + } + break; + } + case IN_UITER_CREATE_WV: { + short field; + Half funcId, searchId; + read_half( field ); + read_half( funcId ); + read_half( searchId ); + + debug( prg, REALM_BYTECODE, "IN_UITER_CREATE_WV\n" ); + + FunctionInfo *fi = prg->rtd->functionInfo + funcId; + UserIter *uiter = uiterCreate( prg, &sp, fi, searchId ); + vm_local(field) = (SW) uiter; + + /* This is a setup similar to as a call, only the frame structure + * is slightly different for user iterators. We aren't going to do + * the call. We don't need to set up the return ip because the + * uiter advance will set it. The frame we need to do because it + * is set once for the lifetime of the iterator. */ + vm_push( 0 ); /* Return instruction pointer, */ + vm_push( (SW)exec->iframePtr ); /* Return iframe. */ + vm_push( (SW)exec->framePtr ); /* Return frame. */ + + uiterInit( prg, sp, uiter, fi, true ); + break; + } + case IN_UITER_CREATE_WC: { + short field; + Half funcId, searchId; + read_half( field ); + read_half( funcId ); + read_half( searchId ); + + debug( prg, REALM_BYTECODE, "IN_UITER_CREATE_WC\n" ); + + FunctionInfo *fi = prg->rtd->functionInfo + funcId; + UserIter *uiter = uiterCreate( prg, &sp, fi, searchId ); + vm_local(field) = (SW) uiter; + + /* This is a setup similar to as a call, only the frame structure + * is slightly different for user iterators. We aren't going to do + * the call. We don't need to set up the return ip because the + * uiter advance will set it. The frame we need to do because it + * is set once for the lifetime of the iterator. */ + vm_push( 0 ); /* Return instruction pointer, */ + vm_push( (SW)exec->iframePtr ); /* Return iframe. */ + vm_push( (SW)exec->framePtr ); /* Return frame. */ + + uiterInit( prg, sp, uiter, fi, false ); + break; + } + case IN_UITER_DESTROY: { + short field; + read_half( field ); + + debug( prg, REALM_BYTECODE, "IN_UITER_DESTROY\n" ); + + UserIter *uiter = (UserIter*) vm_local(field); + userIterDestroy( prg, &sp, uiter ); + break; + } + case IN_RET: { + debug( prg, REALM_BYTECODE, "IN_RET\n" ); + + FrameInfo *fi = &prg->rtd->frameInfo[exec->frameId]; + downrefLocalTrees( prg, sp, exec->framePtr, fi->locals, fi->localsLen ); + vm_popn( fi->frameSize ); + + exec->frameId = (long) vm_pop(); + exec->framePtr = (Tree**) vm_pop(); + instr = (Code*) vm_pop(); + Tree *retVal = vm_pop(); + vm_popn( fi->argSize ); + vm_push( retVal ); + + /* This if for direct calls of functions. */ + if ( instr == 0 ){ + //assert( sp == root ); + return sp; + } + + break; + } + case IN_TO_UPPER: { + debug( prg, REALM_BYTECODE, "IN_TO_UPPER\n" ); + + Tree *in = vm_pop(); + Head *head = stringToUpper( in->tokdata ); + Tree *upper = constructString( prg, head ); + treeUpref( upper ); + vm_push( upper ); + treeDownref( prg, sp, in ); + break; + } + case IN_TO_LOWER: { + debug( prg, REALM_BYTECODE, "IN_TO_LOWER\n" ); + + Tree *in = vm_pop(); + Head *head = stringToLower( in->tokdata ); + Tree *lower = constructString( prg, head ); + treeUpref( lower ); + vm_push( lower ); + treeDownref( prg, sp, in ); + break; + } + case IN_OPEN_FILE: { + debug( prg, REALM_BYTECODE, "IN_OPEN_FILE\n" ); + + Tree *mode = vm_pop(); + Tree *name = vm_pop(); + Tree *res = (Tree*)openFile( prg, name, mode ); + treeUpref( res ); + vm_push( res ); + treeDownref( prg, sp, name ); + treeDownref( prg, sp, mode ); + break; + } + case IN_GET_STDIN: { + debug( prg, REALM_BYTECODE, "IN_GET_STDIN\n" ); + + /* Pop the root object. */ + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + if ( prg->stdinVal == 0 ) { + prg->stdinVal = openStreamFd( prg, "<stdin>", 0 ); + treeUpref( (Tree*)prg->stdinVal ); + } + + treeUpref( (Tree*)prg->stdinVal ); + vm_push( (Tree*)prg->stdinVal ); + break; + } + case IN_GET_STDOUT: { + debug( prg, REALM_BYTECODE, "IN_GET_STDOUT\n" ); + + /* Pop the root object. */ + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + if ( prg->stdoutVal == 0 ) { + prg->stdoutVal = openStreamFd( prg, "<stdout>", 1 ); + treeUpref( (Tree*)prg->stdoutVal ); + } + + treeUpref( (Tree*)prg->stdoutVal ); + vm_push( (Tree*)prg->stdoutVal ); + break; + } + case IN_GET_STDERR: { + debug( prg, REALM_BYTECODE, "IN_GET_STDERR\n" ); + + /* Pop the root object. */ + Tree *obj = vm_pop(); + treeDownref( prg, sp, obj ); + if ( prg->stderrVal == 0 ) { + prg->stderrVal = openStreamFd( prg, "<stderr>", 2 ); + treeUpref( (Tree*)prg->stderrVal ); + } + + treeUpref( (Tree*)prg->stderrVal ); + vm_push( (Tree*)prg->stderrVal ); + break; + } + case IN_LOAD_ARGV: { + Half field; + read_half( field ); + debug( prg, REALM_BYTECODE, "IN_LOAD_ARGV %lu\n", field ); + + /* Tree comes back upreffed. */ + Tree *tree = constructArgv( prg, prg->argc, prg->argv ); + setField( prg, prg->global, field, tree ); + break; + } + + case IN_SYSTEM: { + debug( prg, REALM_BYTECODE, "IN_SYSTEM\n" ); + + Tree *global = vm_pop(); + Str *cmd = (Str*)vm_pop(); + + char *cmd0 = malloc( cmd->value->length + 1 ); + memcpy( cmd0, cmd->value->data, cmd->value->length ); + cmd0[cmd->value->length] = 0; + + int r = system( cmd0 ); + + treeDownref( prg, sp, global ); + treeDownref( prg, sp, (Tree*)cmd ); + + Tree *result = constructInteger( prg, r ); + treeUpref( result ); + vm_push( result ); + break; + } + + case IN_EXIT: { + debug( prg, REALM_BYTECODE, "IN_EXIT\n" ); + + Tree *global = vm_pop(); + Int *status = (Int*)vm_pop(); + prg->exitStatus = status->value; + prg->induceExit = 1; + treeDownref( prg, sp, global ); + treeDownref( prg, sp, (Tree*)status ); + + while ( true ) { + FrameInfo *fi = &prg->rtd->frameInfo[exec->frameId]; + int frameId = exec->frameId; + + downrefLocals( prg, &sp, exec->framePtr, fi->locals, fi->localsLen ); + + vm_popn( fi->frameSize ); + + /* We stop on the root, leaving the psuedo-call setup on the + * stack. Note we exclude the local data. */ + if ( frameId == prg->rtd->rootFrameId ) + break; + + /* Call layout. */ + exec->frameId = (long) vm_pop(); + exec->framePtr = (Tree**) vm_pop(); + instr = (Code*) vm_pop(); + Tree *retVal = vm_pop(); + vm_popn( fi->argSize ); + vm_pop(); + + treeDownref( prg, sp, retVal ); + } + + goto out; + } + + case IN_STOP: { + debug( prg, REALM_BYTECODE, "IN_STOP\n" ); + + FrameInfo *fi = &prg->rtd->frameInfo[exec->frameId]; + downrefLocalTrees( prg, sp, exec->framePtr, fi->locals, fi->localsLen ); + vm_popn( fi->frameSize ); + + fflush( stdout ); + goto out; + } + + /* Halt is a default instruction given by the compiler when it is + * asked to generate and instruction it doesn't have. It is deliberate + * and can represent "not implemented" or "compiler error" because a + * variable holding instructions was not properly initialize. */ + case IN_HALT: { + fatal( "IN_HALT -- compiler did something wrong\n" ); + exit(1); + break; + } + default: { + fatal( "UNKNOWN INSTRUCTION: 0x%2x -- something is wrong\n", *(instr-1) ); + assert(false); + break; + } + } + goto again; + +out: + if ( ! prg->induceExit ) + assert( sp == root ); + return sp; +} + diff --git a/src/bytecode.h b/src/bytecode.h new file mode 100644 index 0000000..bfc7eb4 --- /dev/null +++ b/src/bytecode.h @@ -0,0 +1,513 @@ +/* + * Copyright 2007-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _BYTECODE_H +#define _BYTECODE_H + +#include <colm/pdarun.h> +#include <colm/tree.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#if SIZEOF_LONG != 4 && SIZEOF_LONG != 8 + #error "SIZEOF_LONG contained an unexpected value" +#endif + +typedef unsigned long ulong; +typedef unsigned char uchar; + +#define IN_LOAD_INT 0x01 +#define IN_LOAD_STR 0x02 +#define IN_LOAD_NIL 0x03 +#define IN_LOAD_TRUE 0x04 +#define IN_LOAD_FALSE 0x05 +#define IN_LOAD_TREE 0x06 +#define IN_LOAD_WORD 0x07 + +#define IN_ADD_INT 0x08 +#define IN_SUB_INT 0x09 +#define IN_MULT_INT 0x0a +#define IN_DIV_INT 0x0b + +#define IN_TST_EQL 0x0c +#define IN_TST_NOT_EQL 0x0d +#define IN_TST_LESS 0x0e +#define IN_TST_GRTR 0x0f +#define IN_TST_LESS_EQL 0x10 +#define IN_TST_GRTR_EQL 0x11 +#define IN_TST_LOGICAL_AND 0x12 +#define IN_TST_LOGICAL_OR 0x13 + +#define IN_NOT 0x14 + +#define IN_JMP 0x15 +#define IN_JMP_FALSE 0x16 +#define IN_JMP_TRUE 0x17 + +#define IN_STR_ATOI 0x18 +#define IN_STR_LENGTH 0x19 +#define IN_CONCAT_STR 0x1a +#define IN_TREE_TRIM 0x1b + +#define IN_INIT_LOCALS 0x1c +#define IN_POP 0x1d +#define IN_POP_N_WORDS 0x1e +#define IN_DUP_TOP 0x1f +#define IN_TOP_SWAP 0x20 + +#define IN_REJECT 0x21 +#define IN_MATCH 0x22 +#define IN_CONSTRUCT 0x23 +#define IN_TREE_NEW 0x24 +#define IN_TREE_CAST 0xe4 + +#define IN_GET_LOCAL_R 0x25 +#define IN_GET_LOCAL_WC 0x26 +#define IN_SET_LOCAL_WC 0x27 + +#define IN_GET_LOCAL_REF_R 0x28 +#define IN_GET_LOCAL_REF_WC 0x29 +#define IN_SET_LOCAL_REF_WC 0x2a + +#define IN_SAVE_RET 0x2b + +#define IN_GET_FIELD_R 0x2c +#define IN_GET_FIELD_WC 0x2d +#define IN_GET_FIELD_WV 0x2e +#define IN_GET_FIELD_BKT 0x2f + +#define IN_SET_FIELD_WV 0x30 +#define IN_SET_FIELD_WC 0x31 +#define IN_SET_FIELD_BKT 0x32 +#define IN_SET_FIELD_LEAVE_WC 0x33 + +#define IN_GET_MATCH_LENGTH_R 0x34 +#define IN_GET_MATCH_TEXT_R 0x35 + +#define IN_GET_TOKEN_DATA_R 0x36 +#define IN_SET_TOKEN_DATA_WC 0x37 +#define IN_SET_TOKEN_DATA_WV 0x38 +#define IN_SET_TOKEN_DATA_BKT 0x39 + +#define IN_GET_TOKEN_POS_R 0x3a +#define IN_GET_TOKEN_LINE_R 0x3b + +#define IN_INIT_RHS_EL 0x3c +#define IN_INIT_LHS_EL 0x3d +#define IN_INIT_CAPTURES 0x3e +#define IN_STORE_LHS_EL 0x3f +#define IN_RESTORE_LHS 0x40 + +#define IN_TRITER_FROM_REF 0x41 +#define IN_TRITER_ADVANCE 0x42 +#define IN_TRITER_NEXT_CHILD 0x43 +#define IN_TRITER_GET_CUR_R 0x44 +#define IN_TRITER_GET_CUR_WC 0x45 +#define IN_TRITER_SET_CUR_WC 0x46 +#define IN_TRITER_DESTROY 0x47 +#define IN_TRITER_NEXT_REPEAT 0x48 +#define IN_TRITER_PREV_REPEAT 0x49 + +#define IN_REV_TRITER_FROM_REF 0x4a +#define IN_REV_TRITER_DESTROY 0x4b +#define IN_REV_TRITER_PREV_CHILD 0x4c + +#define IN_UITER_DESTROY 0x4d +#define IN_UITER_CREATE_WV 0x4e +#define IN_UITER_CREATE_WC 0x4f +#define IN_UITER_ADVANCE 0x50 +#define IN_UITER_GET_CUR_R 0x51 +#define IN_UITER_GET_CUR_WC 0x52 +#define IN_UITER_SET_CUR_WC 0x53 + +#define IN_TREE_SEARCH 0x54 + +#define IN_LOAD_GLOBAL_R 0x55 +#define IN_LOAD_GLOBAL_WV 0x56 +#define IN_LOAD_GLOBAL_WC 0x57 +#define IN_LOAD_GLOBAL_BKT 0x58 + +#define IN_PTR_DEREF_R 0x59 +#define IN_PTR_DEREF_WV 0x5a +#define IN_PTR_DEREF_WC 0x60 +#define IN_PTR_DEREF_BKT 0x61 + +#define IN_REF_FROM_LOCAL 0x62 +#define IN_REF_FROM_REF 0x63 +#define IN_REF_FROM_QUAL_REF 0x64 +#define IN_REF_FROM_BACK 0xe3 +#define IN_TRITER_REF_FROM_CUR 0x65 +#define IN_UITER_REF_FROM_CUR 0x66 + +#define IN_MAP_LENGTH 0x67 +#define IN_MAP_FIND 0x68 +#define IN_MAP_INSERT_WV 0x69 +#define IN_MAP_INSERT_WC 0x6a +#define IN_MAP_INSERT_BKT 0x6b +#define IN_MAP_STORE_WV 0x6c +#define IN_MAP_STORE_WC 0x6d +#define IN_MAP_STORE_BKT 0x6e +#define IN_MAP_REMOVE_WV 0x6f +#define IN_MAP_REMOVE_WC 0x70 +#define IN_MAP_REMOVE_BKT 0x71 + +#define IN_LIST_LENGTH 0x72 +#define IN_LIST_APPEND_WV 0x73 +#define IN_LIST_APPEND_WC 0x74 +#define IN_LIST_APPEND_BKT 0x75 +#define IN_LIST_REMOVE_END_WV 0x76 +#define IN_LIST_REMOVE_END_WC 0x77 +#define IN_LIST_REMOVE_END_BKT 0x78 + +#define IN_GET_LIST_MEM_R 0x79 +#define IN_GET_LIST_MEM_WC 0x7a +#define IN_GET_LIST_MEM_WV 0x7b +#define IN_GET_LIST_MEM_BKT 0x7c +#define IN_SET_LIST_MEM_WV 0x7d +#define IN_SET_LIST_MEM_WC 0x7e +#define IN_SET_LIST_MEM_BKT 0x7f + +#define IN_VECTOR_LENGTH 0x80 +#define IN_VECTOR_APPEND_WV 0x81 +#define IN_VECTOR_APPEND_WC 0x82 +#define IN_VECTOR_APPEND_BKT 0x83 +#define IN_VECTOR_INSERT_WV 0x84 +#define IN_VECTOR_INSERT_WC 0x85 +#define IN_VECTOR_INSERT_BKT 0x86 + +#define IN_PRINT 0x87 +#define IN_PRINT_XML_AC 0x88 +#define IN_PRINT_XML 0x89 +#define IN_PRINT_STREAM 0x8a + +#define IN_HALT 0x8b + +#define IN_CALL_WC 0x8c +#define IN_CALL_WV 0x8d +#define IN_RET 0x8e +#define IN_YIELD 0x8f +#define IN_STOP 0x90 + +#define IN_STR_UORD8 0x91 +#define IN_STR_SORD8 0x92 +#define IN_STR_UORD16 0x93 +#define IN_STR_SORD16 0x94 +#define IN_STR_UORD32 0x95 +#define IN_STR_SORD32 0x96 + +#define IN_INT_TO_STR 0x97 +#define IN_TREE_TO_STR 0x98 +#define IN_TREE_TO_STR_TRIM 0x99 + +#define IN_CREATE_TOKEN 0x9a +#define IN_MAKE_TOKEN 0x9b +#define IN_MAKE_TREE 0x9c +#define IN_CONSTRUCT_TERM 0x9d + +#define IN_INPUT_PULL_WV 0x9e +#define IN_INPUT_PULL_WC 0xe1 +#define IN_INPUT_PULL_BKT 0x9f + +#define IN_PARSE_SAVE_STEPS 0xa0 +#define IN_PARSE_INIT_BKT 0xa1 + +#define IN_PARSE_FRAG_WC 0xa2 +#define IN_PARSE_FRAG_EXIT_WC 0xa3 + +#define IN_PARSE_FRAG_WV 0xa4 +#define IN_PARSE_FRAG_EXIT_WV 0xa5 + +#define IN_PARSE_FRAG_BKT 0xa6 +#define IN_PARSE_FRAG_EXIT_BKT 0xa7 + +#define IN_INPUT_APPEND_WC 0xa8 +#define IN_INPUT_APPEND_WV 0xa9 +#define IN_INPUT_APPEND_BKT 0xaa + +#define IN_PARSE_FINISH_WC 0xab +#define IN_PARSE_FINISH_EXIT_WC 0xac + +#define IN_PARSE_FINISH_WV 0xad +#define IN_PARSE_FINISH_EXIT_WV 0xae + +#define IN_PARSE_FINISH_BKT 0xaf +#define IN_PARSE_FINISH_EXIT_BKT 0xb0 + +#define IN_PCR_CALL 0xb1 +#define IN_PCR_RET 0xb2 +#define IN_PCR_END_DECK 0xb3 +#define IN_CONTIGUOUS 0x5c + +#define IN_OPEN_FILE 0xb4 +#define IN_GET_STDIN 0xb5 +#define IN_GET_STDOUT 0xb6 +#define IN_GET_STDERR 0xb7 +#define IN_LOAD_ARGV 0xb8 +#define IN_TO_UPPER 0xb9 +#define IN_TO_LOWER 0xba +#define IN_EXIT 0xbb + +#define IN_LOAD_PARSER_R 0xbd +#define IN_LOAD_PARSER_WV 0xbe +#define IN_LOAD_PARSER_WC 0xbf +#define IN_LOAD_PARSER_BKT 0xc0 + +#define IN_LOAD_INPUT_R 0xc1 +#define IN_LOAD_INPUT_WV 0xc2 +#define IN_LOAD_INPUT_WC 0xc3 +#define IN_LOAD_INPUT_BKT 0xc4 + +#define IN_INPUT_PUSH_WV 0xc5 +#define IN_INPUT_PUSH_BKT 0xc6 +#define IN_INPUT_PUSH_IGNORE_WV 0xc7 + +#define IN_LOAD_CONTEXT_R 0xc8 +#define IN_LOAD_CONTEXT_WV 0xc9 +#define IN_LOAD_CONTEXT_WC 0xca +#define IN_LOAD_CONTEXT_BKT 0xcb + +#define IN_GET_PARSER_CTX_R 0xcd +#define IN_GET_PARSER_CTX_WC 0xce +#define IN_GET_PARSER_CTX_WV 0xcf +#define IN_SET_PARSER_CTX_WC 0xd0 +#define IN_SET_PARSER_CTX_WV 0xd1 + +#define IN_LOAD_CTX_R 0xd2 +#define IN_LOAD_CTX_WC 0xd3 +#define IN_LOAD_CTX_WV 0xd4 +#define IN_LOAD_CTX_BKT 0xd5 + +#define IN_SPRINTF 0xd6 + +#define IN_GET_RHS_VAL_R 0xd7 +#define IN_GET_RHS_VAL_WC 0xd8 +#define IN_GET_RHS_VAL_WV 0xd9 +#define IN_GET_RHS_VAL_BKT 0xda +#define IN_SET_RHS_VAL_WC 0xdb +#define IN_SET_RHS_VAL_WV 0xdc +#define IN_SET_RHS_VAL_BKT 0xdd + +#define IN_CONSTRUCT_INPUT 0xde +#define IN_SET_INPUT 0xdf +#define IN_GET_INPUT 0xe0 + +#define IN_GET_PARSER_MEM_R 0x5b +#define IN_GET_PARSER_MEM_WC 0x00 +#define IN_GET_PARSER_MEM_WV 0x00 +#define IN_GET_PARSER_MEM_BKT 0x00 +#define IN_SET_PARSER_MEM_WC 0x00 +#define IN_SET_PARSER_MEM_WV 0x00 +#define IN_SET_PARSER_MEM_BKT 0x00 + +#define IN_GET_ERROR 0xcc +#define IN_SET_ERROR 0xe2 + +#define IN_SYSTEM 0xe5 + + +/* Types */ +#define TYPE_NIL 0x01 +#define TYPE_TREE 0x02 +#define TYPE_REF 0x03 +#define TYPE_PTR 0x04 +#define TYPE_ITER 0x05 +#define TYPE_IGNORE_LIST 0x06 + +/* Types of Generics. */ +#define GEN_LIST 0x10 +#define GEN_MAP 0x11 +#define GEN_VECTOR 0x12 +#define GEN_PARSER 0x13 + +/* Known language element ids. */ +#define LEL_ID_PTR 1 +#define LEL_ID_VOID 2 +#define LEL_ID_BOOL 3 +#define LEL_ID_INT 4 +#define LEL_ID_STR 5 +#define LEL_ID_STREAM 6 +#define LEL_ID_IGNORE 7 + +/* + * Flags + */ + +/* A tree that has been generated by a termDup. */ +#define PF_TERM_DUP 0x0001 + +/* Has been processed by the commit function. All children have also been + * processed. */ +#define PF_COMMITTED 0x0002 + +/* Created by a token generation action, not made from the input. */ +#define PF_ARTIFICIAL 0x0004 + +/* Named node from a pattern or constructor. */ +#define PF_NAMED 0x0008 + +/* There is reverse code associated with this tree node. */ +#define PF_HAS_RCODE 0x0010 + +#define PF_RIGHT_IGNORE 0x0020 + +#define PF_LEFT_IL_ATTACHED 0x0400 +#define PF_RIGHT_IL_ATTACHED 0x0800 + +#define AF_LEFT_IGNORE 0x0100 +#define AF_RIGHT_IGNORE 0x0200 + +#define AF_SUPPRESS_LEFT 0x4000 +#define AF_SUPPRESS_RIGHT 0x8000 + +/* + * Call stack. + */ + +/* Number of spots in the frame, after the args. */ +#define FR_AA 4 + +/* Positions relative to the frame pointer. */ +#define FR_RV 3 /* return value */ +#define FR_RI 2 /* return instruction */ +#define FR_RFP 1 /* return frame pointer */ +#define FR_RFD 0 /* return frame id. */ + +/* + * Calling Convention: + * a1 + * a2 + * a3 + * ... + * return value FR_RV + * return instr FR_RI + * return frame ptr FR_RFP + * return frame id FR_RFD + */ + +/* + * User iterator call stack. + * Adds an iframe pointer, removes the return value. + */ + +/* Number of spots in the frame, after the args. */ +#define IFR_AA 3 + +/* Positions relative to the frame pointer. */ +#define IFR_RIN 2 /* return instruction */ +#define IFR_RIF 1 /* return iframe pointer */ +#define IFR_RFR 0 /* return frame pointer */ + +/* Exported to modules other than bytecode.c */ +#define vm_push(i) ( ( sp == prg->sb_beg ? (sp = vm_bs_add(prg, sp, 1)) : 0 ), (*(--sp) = (i)) ) +#define vm_pushn(n) ( ( (sp-(n)) < prg->sb_beg ? (sp = vm_bs_add(prg, sp, n)) : 0 ), (sp -= (n)) ) + +#define vm_pop() ({ SW r = *sp; (sp+1) >= prg->sb_end ? (sp = vm_bs_pop(prg, sp, 1)) : (sp += 1); r; }) +#define vm_pop_ignore() ({ (sp+1) >= prg->sb_end ? (sp = vm_bs_pop(prg, sp, 1)) : (sp += 1); }) +#define vm_popn(n) ({ (sp+(n)) >= prg->sb_end ? (sp = vm_bs_pop(prg, sp, n)) : (sp += (n)); }) + +#define vm_contiguous(n) ( ( (sp-(n)) < prg->sb_beg ? (sp = vm_bs_add(prg, sp, n)) : 0 ) ) + +#define vm_top() (*sp) +#define vm_ptop() (sp) + +#define vm_ssize() ( prg->sb_total + (prg->sb_end - sp) ) + +#define vm_local(o) (exec->framePtr[o]) +#define vm_plocal(o) (&exec->framePtr[o]) +#define vm_local_iframe(o) (exec->iframePtr[o]) +#define vm_plocal_iframe(o) (&exec->iframePtr[o]) + +void vm_init( struct colm_program * ); +Tree** vm_bs_add( struct colm_program *, Tree **, int ); +Tree** vm_bs_pop( struct colm_program *, Tree **, int ); +void vm_clear( struct colm_program * ); + +typedef Tree *SW; +typedef Tree **StackPtr; + +/* Can't use sizeof() because we have used types that are bigger than the + * serial representation. */ +#define SIZEOF_CODE 1 +#define SIZEOF_HALF 2 +#define SIZEOF_WORD sizeof(Word) + +typedef struct _Execution +{ + Tree **framePtr; + Tree **iframePtr; + long frameId; + + long rcodeUnitLen; + + Parser *parser; + long steps; + long pcr; +} Execution; + +long stringLength( Head *str ); +const char *stringData( Head *str ); +Head *stringAllocFull( struct colm_program *prg, const char *data, long length ); +Head *initStrSpace( long length ); +Head *stringCopy( struct colm_program *prg, Head *head ); +void stringFree( struct colm_program *prg, Head *head ); +void stringShorten( Head *tokdata, long newlen ); +Head *concatStr( Head *s1, Head *s2 ); +Word strAtoi( Head *str ); +Word strUord16( Head *head ); +Word strUord8( Head *head ); +Word cmpString( Head *s1, Head *s2 ); +Head *stringToUpper( Head *s ); +Head *stringToLower( Head *s ); +Head *stringSprintf( struct colm_program *prg, Str *format, Int *integer ); + +Head *makeLiteral( struct colm_program *prg, long litoffset ); +Head *intToStr( struct colm_program *prg, Word i ); + +Tree *constructString( struct colm_program *prg, Head *s ); + +void mainExecution( struct colm_program *prg, Execution *exec, Code *code ); +void reductionExecution( Execution *exec, Tree **sp ); +void generationExecution( Execution *exec, Tree **sp ); +void reverseExecution( Execution *exec, Tree **sp, RtCodeVect *allRev ); + +Kid *allocAttrs( struct colm_program *prg, long length ); +void freeAttrs( struct colm_program *prg, Kid *attrs ); +void setAttr( Tree *tree, long pos, Tree *val ); +Kid *getAttrKid( Tree *tree, long pos ); + +Tree *splitTree( struct colm_program *prg, Tree *t ); +void rcodeDownrefAll( struct colm_program *prg, Tree **sp, RtCodeVect *cv ); +void commitFull( struct colm_program *prg, Tree **sp, PdaRun *pdaRun, long commitReduce ); +Tree *getParsedRoot( PdaRun *pdaRun, int stop ); +void splitRef( struct colm_program *prg, Tree ***sp, Ref *fromRef ); + +void allocGlobal( struct colm_program *prg ); +Tree **executeCode( struct colm_program *prg, Execution *exec, Tree **sp, Code *instr ); +void rcodeDownref( struct colm_program *prg, Tree **sp, Code *instr ); +Code *popReverseCode( RtCodeVect *allRev ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/closure.cc b/src/closure.cc new file mode 100644 index 0000000..f587ea0 --- /dev/null +++ b/src/closure.cc @@ -0,0 +1,458 @@ +/* + * Copyright 2005-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "global.h" +#include "parsedata.h" + +#include "vector.h" +#include <assert.h> +#include <string.h> +#include <iostream> + +using std::endl; +using std::cerr; + +void Compiler::lr0BringInItem( PdaGraph *pdaGraph, PdaState *dest, PdaState *prodState, + PdaTrans *expandFrom, Production *prod ) +{ + /* We use dot sets for finding unique states. In the future, should merge + * dots sets with the stateSet pointer (only need one of these). */ + assert( dest != prodState ); + dest->dotSet.insert( prodState->dotSet ); + + /* Get the epsilons, context, out priorities. */ + dest->pendingCommits.insert( prodState->pendingCommits ); + //if ( prodState->pendingCommits.length() > 0 ) + // cerr << "THERE ARE PENDING COMMITS DRAWN IN" << endl; + + if ( prodState->transMap.length() > 0 ) { + assert( prodState->transMap.length() == 1 ); + PdaTrans *srcTrans = prodState->transMap[0].value; + + /* Look for the source in the destination. */ + TransMapEl *destTel = dest->transMap.find( srcTrans->lowKey ); + if ( destTel == 0 ) { + /* Make a new state and transition to it. */ + PdaState *newState = pdaGraph->addState(); + PdaTrans *newTrans = new PdaTrans(); + + /* Attach the new transition to the new state. */ + newTrans->lowKey = srcTrans->lowKey; + pdaGraph->attachTrans( dest, newState, newTrans ); + pdaGraph->addInTrans( newTrans, srcTrans ); + + /* The transitions we make during lr0 closure are all shifts. */ + assert( newTrans->isShift ); + assert( srcTrans->isShift ); + + /* The new state must have its state set setup. */ + newState->stateSet = new PdaStateSet; + newState->stateSet->insert( srcTrans->toState ); + + /* Insert the transition into the map. Be sure to set destTel, it + * is needed below. */ + dest->transMap.insert( srcTrans->lowKey, newTrans, &destTel ); + + /* If the item is a non-term, queue it for closure. */ + LangEl *langEl = langElIndex[srcTrans->lowKey]; + if ( langEl != 0 && langEl->type == LangEl::NonTerm ) { + pdaGraph->transClosureQueue.append( newTrans ); + //cerr << "put to trans closure queue" << endl; + } + } + else { + //cerr << "merging transitions" << endl; + destTel->value->toState->stateSet->insert( srcTrans->toState ); + pdaGraph->addInTrans( destTel->value, srcTrans ); + } + + /* If this is an expansion then we may need to bring in commits. */ + if ( expandFrom != 0 && expandFrom->commits.length() > 0 ) { + //cerr << "SETTING COMMIT ON CLOSURE ROUND" << endl; + destTel->value->commits.insert( expandFrom->commits ); + + expandFrom->commits.empty(); + } + } + else { + /* ProdState does not have any transitions out. It is at the end of a + * production. */ + if ( expandFrom != 0 && expandFrom->commits.length() > 0 ) { + //cerr << "SETTING COMMIT IN PENDING LOOKAHEAD" << endl; + for ( LongSet::Iter len = expandFrom->commits; len.lte(); len++ ) + dest->pendingCommits.insert( ProdIdPair( prod->prodId, *len ) ); + + expandFrom->commits.empty(); + } + } +} + +void Compiler::lr0InvokeClosure( PdaGraph *pdaGraph, PdaState *state ) +{ + /* State should not already be closed. */ + assert( !state->inClosedMap ); + + /* This is used each time we invoke closure, it must be cleared. */ + pdaGraph->transClosureQueue.abandon(); + + /* Drag in the core items. */ + for ( PdaStateSet::Iter ssi = *state->stateSet; ssi.lte(); ssi++ ) + lr0BringInItem( pdaGraph, state, *ssi, 0, 0 ); + + /* Now bring in the derived items. */ + while ( pdaGraph->transClosureQueue.length() > 0 ) { + PdaTrans *toClose = pdaGraph->transClosureQueue.detachFirst(); + //cerr << "have a transition to derive" << endl; + + /* Get the langEl. */ + LangEl *langEl = langElIndex[toClose->lowKey]; + + /* Make graphs for all of the productions that the non + * terminal goes to that are not already in the state's dotSet. */ + for ( LelDefList::Iter prod = langEl->defList; prod.lte(); prod++ ) { + /* Bring in the start state of the production. */ + lr0BringInItem( pdaGraph, state, prod->fsm->startState, toClose, prod ); + } + } + + /* Try and insert into the closed dict. */ + DotSetMapEl *lastFound; + if ( pdaGraph->closedMap.insert( state, &lastFound ) ) { + /* Insertion into closed dict succeeded. There is no state with the + * same dot set. The state is now closed. It is guaranteed a spot in + * the closed dict and it will never go away (states never deleted + * during closure). */ + pdaGraph->stateClosedList.append( state ); + state->inClosedMap = true; + + /* Add all of the states in the out transitions to the closure queue. + * This will give us a depth first search of the graph. */ + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + /* Get the state the transEl goes to. */ + PdaState *targ = trans->value->toState; + + /* If the state on this tranisition has not already been slated + * for closure, then add it to the queue. */ + if ( !targ->onClosureQueue && !targ->inClosedMap ) { + pdaGraph->stateClosureQueue.append( targ ); + targ->onClosureQueue = true; + } + } + } + else { + /* Insertion into closed dict failed. There is an existing state + * with the same dot set. Get the existing state. */ + pdaGraph->inTransMove( lastFound, state ); + for ( TransMap::Iter tel = state->transMap; tel.lte(); tel++ ) { + pdaGraph->stateList.detach( tel->value->toState ); + delete tel->value->toState; + delete tel->value; + } + pdaGraph->stateList.detach( state ); + delete state; + } +} + +/* Invoke cloure on the graph. We use a queue here to achieve a breadth + * first search of the tree we build. Note, there are back edges in this + * tree. They are the edges made when upon closure, a dot set exists + * already. */ +void Compiler::lr0CloseAllStates( PdaGraph *pdaGraph ) +{ + /* While there are items on the closure queue. */ + while ( pdaGraph->stateClosureQueue.length() > 0 ) { + /* Pop the first item off. */ + PdaState *state = pdaGraph->stateClosureQueue.detachFirst(); + state->onClosureQueue = false; + + /* Invoke closure upon the state. */ + lr0InvokeClosure( pdaGraph, state ); + } +} + +void Compiler::transferCommits( PdaGraph *pdaGraph, PdaTrans *trans, + PdaState *state, long prodId ) +{ + ProdIdPairSet &pendingCommits = state->pendingCommits; + for ( ProdIdPairSet::Iter pi = pendingCommits; pi.lte(); pi++ ) { + if ( pi->onReduce == prodId ) + trans->commits.insert( pi->length ); + } +} + +void Compiler::lalr1AddFollow2( PdaGraph *pdaGraph, PdaTrans *trans, FollowToAdd &followKeys ) +{ + for ( ExpandToSet::Iter ets = trans->expandTo; ets.lte(); ets++ ) { + int prodId = ets->prodId; + PdaState *expandTo = ets->state; + + for ( FollowToAdd::Iter fkey = followKeys; fkey.lte(); fkey++ ) { + TransMapEl *transEl = expandTo->transMap.find( fkey->key ); + + if ( transEl != 0 ) { + /* Set up the follow transition. */ + PdaTrans *destTrans = transEl->value; + + transferCommits( pdaGraph, destTrans, expandTo, prodId ); + + pdaGraph->addInReduction( destTrans, prodId, fkey->value ); + } + else { + /* Set up the follow transition. */ + PdaTrans *followTrans = new PdaTrans; + followTrans->lowKey = fkey->key; + followTrans->isShift = false; + followTrans->reductions.insert( prodId, fkey->value ); + + transferCommits( pdaGraph, followTrans, expandTo, prodId ); + + pdaGraph->attachTrans( expandTo, actionDestState, followTrans ); + expandTo->transMap.insert( followTrans->lowKey, followTrans ); + pdaGraph->transClosureQueue.append( followTrans ); + } + } + } +} + +long PdaTrans::maxPrior() +{ + long prior = LONG_MIN; + if ( isShift && shiftPrior > prior ) + prior = shiftPrior; + for ( ReductionMap::Iter red = reductions; red.lte(); red++ ) { + if ( red->value > prior ) + prior = red->value; + } + return prior; +} + +void Compiler::lalr1AddFollow1( PdaGraph *pdaGraph, PdaState *state ) +{ + /* Finding non-terminals into the state. */ + for ( PdaTransInList::Iter in = state->inRange; in.lte(); in++ ) { + long key = in->lowKey; + LangEl *langEl = langElIndex[key]; + if ( langEl != 0 && langEl->type == LangEl::NonTerm ) { + /* Finding the following transitions. */ + FollowToAdd followKeys; + for ( TransMap::Iter fout = state->transMap; fout.lte(); fout++ ) { + int fkey = fout->key; + LangEl *flel = langElIndex[fkey]; + if ( flel == 0 || flel->type == LangEl::Term ) { + long prior = fout->value->maxPrior(); + followKeys.insert( fkey, prior ); + } + } + + if ( followKeys.length() > 0 ) + lalr1AddFollow2( pdaGraph, in, followKeys ); + } + } +} + +void Compiler::lalr1AddFollow2( PdaGraph *pdaGraph, PdaTrans *trans, + long followKey, long prior ) +{ + for ( ExpandToSet::Iter ets = trans->expandTo; ets.lte(); ets++ ) { + int prodId = ets->prodId; + PdaState *expandTo = ets->state; + + TransMapEl *transEl = expandTo->transMap.find( followKey ); + if ( transEl != 0 ) { + /* Add in the reductions, or in the shift. */ + PdaTrans *destTrans = transEl->value; + + transferCommits( pdaGraph, destTrans, expandTo, prodId ); + + pdaGraph->addInReduction( destTrans, prodId, prior ); + } + else { + /* Set up the follow transition. */ + PdaTrans *followTrans = new PdaTrans; + followTrans->lowKey = followKey; + followTrans->isShift = false; + followTrans->reductions.insert( prodId, prior ); + + transferCommits( pdaGraph, followTrans, expandTo, prodId ); + + pdaGraph->attachTrans( expandTo, actionDestState, followTrans ); + expandTo->transMap.insert( followTrans->lowKey, followTrans ); + pdaGraph->transClosureQueue.append( followTrans ); + } + } +} + +void Compiler::lalr1AddFollow1( PdaGraph *pdaGraph, PdaTrans *trans ) +{ + PdaState *state = trans->fromState; + int fkey = trans->lowKey; + LangEl *flel = langElIndex[fkey]; + if ( flel == 0 || flel->type == LangEl::Term ) { + /* Finding non-terminals into the state. */ + for ( PdaTransInList::Iter in = state->inRange; in.lte(); in++ ) { + long key = in->lowKey; + LangEl *langEl = langElIndex[key]; + if ( langEl != 0 && langEl->type == LangEl::NonTerm ) { + //cerr << "FOLLOW PRIOR TRANSFER 2: " << prior << endl; + long prior = trans->maxPrior(); + lalr1AddFollow2( pdaGraph, in, fkey, prior ); + } + } + } +} + +/* Add follow sets to an LR(0) graph to make it LALR(1). */ +void Compiler::lalr1AddFollowSets( PdaGraph *pdaGraph, LangElSet &parserEls ) +{ + /* Make the state that all reduction actions go to. Since a reduction pops + * states of the stack and sets the new target state, this state is + * actually never reached. Just here to link the trans to. */ + actionDestState = pdaGraph->addState(); + pdaGraph->setFinState( actionDestState ); + + for ( LangElSet::Iter pe = parserEls; pe.lte(); pe++ ) { + /* Get the entry into the graph and traverse over start. */ + PdaState *overStart = pdaGraph->followFsm( (*pe)->startState, (*pe)->rootDef->fsm ); + + /* Add _eof after the initial _start. */ + PdaTrans *eofTrans = pdaGraph->insertNewTrans( overStart, actionDestState, + (*pe)->eofLel->id, (*pe)->eofLel->id ); + eofTrans->isShift = true; + } + + /* This was used during lr0 table construction. */ + pdaGraph->transClosureQueue.abandon(); + + /* Need to pass over every state initially. */ + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) + lalr1AddFollow1( pdaGraph, state ); + + /* While the closure queue has items, pop them off and add follow + * characters. */ + while ( pdaGraph->transClosureQueue.length() > 0 ) { + /* Pop the first item off and add Follow for it . */ + PdaTrans *trans = pdaGraph->transClosureQueue.detachFirst(); + lalr1AddFollow1( pdaGraph, trans ); + } +} + +void Compiler::linkExpansions( PdaGraph *pdaGraph ) +{ + pdaGraph->setStateNumbers(); + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + /* Find transitions out on non terminals. */ + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + long key = trans->key; + LangEl *langEl = langElIndex[key]; + if ( langEl != 0 && langEl->type == LangEl::NonTerm ) { + /* For each production that the non terminal expand to ... */ + for ( LelDefList::Iter prod = langEl->defList; prod.lte(); prod++ ) { + /* Follow the production and add to the trans's expand to set. */ + PdaState *followRes = pdaGraph->followFsm( state, prod->fsm ); + + //LangEl *lel = langElIndex[key]; + //cerr << state->stateNum << ", "; + //if ( lel != 0 ) + // cerr << lel->data; + //else + // cerr << (char)key; + //cerr << " -> " << (*fto)->stateNum << " on " << + // prod->data << " (fss = " << fin.pos() << ")" << endl; + trans->value->expandTo.insert( ExpandToEl( followRes, prod->prodId ) ); + } + } + } + } +} + +/* Add terminal versions of all nonterminal transitions. */ +void Compiler::addDupTerms( PdaGraph *pdaGraph ) +{ + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + PdaTransList newTranitions; + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + LangEl *lel = langElIndex[trans->value->lowKey]; + if ( lel->type == LangEl::NonTerm ) { + PdaTrans *dupTrans = new PdaTrans; + dupTrans->lowKey = lel->termDup->id; + dupTrans->isShift = true; + + /* Save the target state in to state. In the next loop when we + * attach the transition we must clear this because the + * attaching code requires the transition to be unattached. */ + dupTrans->toState = trans->value->toState; + newTranitions.append( dupTrans ); + + /* Commit code used? */ + //transferCommits( pdaGraph, followTrans, expandTo, prodId ); + } + } + + for ( PdaTrans *dup = newTranitions.head; dup != 0; ) { + PdaTrans *next = dup->next; + PdaState *toState = dup->toState; + dup->toState = 0; + pdaGraph->attachTrans( state, toState, dup ); + state->transMap.insert( dup->lowKey, dup ); + dup = next; + } + } +} + +/* Generate a LALR(1) graph. */ +void Compiler::lalr1GenerateParser( PdaGraph *pdaGraph, LangElSet &parserEls ) +{ + /* Make the intial graph. */ + pdaGraph->langElIndex = langElIndex; + + for ( Vector<LangEl*>::Iter r = parserEls; r.lte(); r++ ) { + /* Create the entry point. */ + PdaState *rs = pdaGraph->addState(); + pdaGraph->entryStateSet.insert( rs ); + + /* State set of just one state. */ + rs->stateSet = new PdaStateSet; + rs->stateSet->insert( (*r)->rootDef->fsm->startState ); + + /* Queue the start state for closure. */ + rs->onClosureQueue = true; + pdaGraph->stateClosureQueue.append( rs ); + + (*r)->startState = rs; + } + + /* Run the lr0 closure. */ + lr0CloseAllStates( pdaGraph ); + + /* Add terminal versions of all nonterminal transitions. */ + addDupTerms( pdaGraph ); + + /* Link production expansions to the place they expand to. */ + linkExpansions( pdaGraph ); + + /* Walk the graph adding follow sets to the LR(0) graph. */ + lalr1AddFollowSets( pdaGraph, parserEls ); + +// /* Set the commit on the final eof shift. */ +// PdaTrans *overStart = pdaGraph->startState->findTrans( rootEl->id ); +// PdaTrans *eofTrans = overStart->toState->findTrans( eofLangEl->id ); +// eofTrans->afterShiftCommits.insert( 2 ); +} diff --git a/src/codegen.cc b/src/codegen.cc new file mode 100644 index 0000000..b48ebbb --- /dev/null +++ b/src/codegen.cc @@ -0,0 +1,49 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "parsedata.h" +#include "fsmcodegen.h" +#include "redfsm.h" +#include "bstmap.h" +#include "debug.h" +#include <sstream> +#include <string> + + +void FsmCodeGen::writeMain( long activeRealm ) +{ + out << + "int main( int argc, const char **argv )\n" + "{\n" + " struct colm_program *prg;\n" + " int exitStatus;\n" + " prg = colm_new_program( &colm_object );\n" + " colm_set_debug( prg, " << activeRealm << " );\n" + " colm_run_program( prg, argc, argv );\n" + " exitStatus = colm_delete_program( prg );\n" + " return exitStatus;\n" + "}\n" + "\n"; + + out.flush(); +} + + diff --git a/src/codevect.c b/src/codevect.c new file mode 100644 index 0000000..a05c7ea --- /dev/null +++ b/src/codevect.c @@ -0,0 +1,183 @@ +/* + * Copyright 2010-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Aapl. + * + * Aapl is free software; you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * Aapl 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 Lesser General Public License for + * more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Aapl; if not, write to the Free Software Foundation, Inc., 59 + * Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <colm/rtvector.h> +#include <colm/pdarun.h> + +#include <string.h> +#include <stdlib.h> +#include <assert.h> + + +void initRtCodeVect( RtCodeVect *vect ) +{ + vect->data = 0; + vect->tabLen = 0; + vect->allocLen = 0; +} + +static long newSizeUp( long existing, long needed ) +{ + return needed > existing ? (needed<<1) : existing; +} + +static long newSizeDown( long existing, long needed ) +{ + return needed < (existing>>2) ? (needed<<1) : existing; +} + +/* Up resize the data for len elements using Resize::upResize to tell us the + * new tabLen. Reads and writes allocLen. Does not read or write tabLen. */ +static void upResize( RtCodeVect *vect, long len ) +{ + /* Ask the resizer what the new tabLen will be. */ + long newLen = newSizeUp(vect->allocLen, len); + + /* Did the data grow? */ + if ( newLen > vect->allocLen ) { + vect->allocLen = newLen; + if ( vect->data != 0 ) { + /* Table exists already, resize it up. */ + vect->data = (Code*) realloc( vect->data, sizeof(Code) * newLen ); + //if ( vect->data == 0 ) + // throw std::bad_alloc(); + } + else { + /* Create the data. */ + vect->data = (Code*) malloc( sizeof(Code) * newLen ); + //if ( vect->data == 0 ) + // throw std::bad_alloc(); + } + } +} + +/* Down resize the data for len elements using Resize::downResize to determine + * the new tabLen. Reads and writes allocLen. Does not read or write tabLen. */ +static void downResize( RtCodeVect *vect, long len) +{ + /* Ask the resizer what the new tabLen will be. */ + long newLen = newSizeDown( vect->allocLen, len ); + + /* Did the data shrink? */ + if ( newLen < vect->allocLen ) { + vect->allocLen = newLen; + if ( newLen == 0 ) { + /* Simply free the data. */ + free( vect->data ); + vect->data = 0; + } + else { + /* Not shrinking to size zero, realloc it to the smaller size. */ + vect->data = (Code*) realloc( vect->data, sizeof(Code) * newLen ); + //if ( vect->data == 0 ) + // throw std::bad_alloc(); + } + } +} + + +void rtCodeVectEmpty( RtCodeVect *vect ) +{ + if ( vect->data != 0 ) { + /* Free the data space. */ + free( vect->data ); + vect->data = 0; + vect->tabLen = vect->allocLen = 0; + } +} + +void rtCodeVectReplace( RtCodeVect *vect, long pos, const Code *val, long len ) +{ + long endPos, i; + //Code *item; + + /* If we are given a negative position to replace at then + * treat it as a position relative to the length. */ + if ( pos < 0 ) + pos = vect->tabLen + pos; + + /* The end is the one past the last item that we want + * to write to. */ + endPos = pos + len; + + /* Make sure we have enough space. */ + if ( endPos > vect->tabLen ) { + upResize( vect, endPos ); + + /* Delete any objects we need to delete. */ + //item = vect->data + pos; + //for ( i = pos; i < vect->tabLen; i++, item++ ) + // item->~Code(); + + /* We are extending the vector, set the new data length. */ + vect->tabLen = endPos; + } + else { + /* Delete any objects we need to delete. */ + //item = vect->data + pos; + //for ( i = pos; i < endPos; i++, item++ ) + // item->~Code(); + } + + /* Copy data in using copy constructor. */ + Code *dst = vect->data + pos; + const Code *src = val; + for ( i = 0; i < len; i++, dst++, src++ ) + *dst = *src; +} + +void rtCodeVectRemove( RtCodeVect *vect, long pos, long len ) +{ + long newLen, lenToSlideOver, endPos; + Code *dst;//, *item; + + /* If we are given a negative position to remove at then + * treat it as a position relative to the length. */ + if ( pos < 0 ) + pos = vect->tabLen + pos; + + /* The first position after the last item deleted. */ + endPos = pos + len; + + /* The new data length. */ + newLen = vect->tabLen - len; + + /* The place in the data we are deleting at. */ + dst = vect->data + pos; + + /* Call Destructors. */ + //item = dst; + //for ( long i = 0; i < len; i += 1, item += 1 ) + // item->~Code(); + + /* Shift data over if necessary. */ + lenToSlideOver = vect->tabLen - endPos; + if ( len > 0 && lenToSlideOver > 0 ) + memmove(dst, dst + len, sizeof(Code)*lenToSlideOver); + + /* Shrink the data if necessary. */ + downResize( vect, newLen ); + + /* Set the new data length. */ + vect->tabLen = newLen; +} + + diff --git a/src/colm.h b/src/colm.h new file mode 100644 index 0000000..8bfdb94 --- /dev/null +++ b/src/colm.h @@ -0,0 +1,82 @@ +#ifndef __COLM_COLM_H +#define __COLM_COLM_H + +#ifdef __cplusplus +extern "C" { +#endif + +struct colm_data; +struct colm_tree; +struct colm_kid; +struct colm_program; +struct colm_sections; +struct colm_tree; +struct colm_location; + +struct colm_tree +{ + /* First four will be overlaid in other structures. */ + short id; + unsigned short flags; + long refs; + struct colm_kid *child; + + struct colm_data *tokdata; + + /* FIXME: this needs to go somewhere else. Will do for now. */ + unsigned short prodNum; +}; + +/* + * Interface + */ + +struct colm_print_args +{ + void *arg; + int comm; + int attr; + int trim; + void (*out)( struct colm_print_args *args, const char *data, int length ); + void (*open_tree)( struct colm_program *prg, struct colm_tree **sp, + struct colm_print_args *args, struct colm_kid *parent, struct colm_kid *kid ); + void (*print_term)( struct colm_program *prg, struct colm_tree **sp, + struct colm_print_args *args, struct colm_kid *kid ); + void (*close_tree)( struct colm_program *prg, struct colm_tree **sp, + struct colm_print_args *args, struct colm_kid *parent, struct colm_kid *kid ); +}; + +void colm_print_null( struct colm_program *prg, struct colm_tree **sp, + struct colm_print_args *args, struct colm_kid *parent, struct colm_kid *kid ); +void colm_print_term_tree( struct colm_program *prg, struct colm_tree **sp, + struct colm_print_args *print_args, struct colm_kid *kid ); + +struct colm_tree **colm_vm_root( struct colm_program *prg ); +struct colm_tree *colm_return_val( struct colm_program *prg ); +void colm_print_tree_args( struct colm_program *prg, struct colm_tree **sp, + struct colm_print_args *print_args, struct colm_tree *tree ); + +int colm_repeat_end( struct colm_tree *tree ); +int colm_list_last( struct colm_tree *tree ); +struct colm_tree *colm_get_rhs_val( struct colm_program *prg, struct colm_tree *tree, int *a ); +struct colm_tree *colm_get_attr( struct colm_tree *tree, long pos ); +struct colm_tree *colm_get_global( struct colm_program *prg, long pos ); +struct colm_tree *colm_get_repeat_next( struct colm_tree *tree ); +struct colm_tree *colm_get_repeat_val( struct colm_tree *tree ); +struct colm_location *colm_find_location( struct colm_program *prg, struct colm_tree *tree ); + +/* + * Primary interface. + */ + +struct colm_program *colm_new_program( struct colm_sections *rtd ); +void colm_set_debug( struct colm_program *prg, long active_realm ); +void colm_run_program( struct colm_program *prg, int argc, const char **argv ); +struct colm_tree *colm_run_func( struct colm_program *prg, int frame_id, const char **params, int param_count ); +int colm_delete_program( struct colm_program *prg ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/colm.lm b/src/colm.lm new file mode 100644 index 0000000..e0ba8c7 --- /dev/null +++ b/src/colm.lm @@ -0,0 +1,765 @@ +# Main region. +lex + token DEF / 'def' / + token LEX / 'lex' / + token END / 'end' / + token TOKEN / 'token' / + token RL / 'rl' / + token IGNORE / 'ignore' / + token PRINT / 'print' / + token PRINTS / 'prints' / + token PRINT_XML / 'print_xml' / + token PRINT_XML_AC / 'print_xml_ac' / + token PARSE / 'parse' / + token PARSE_STOP / 'parse_stop' / + token CONS / 'construct' | 'cons' / + token MATCH / 'match' / + token REQUIRE / 'require' / + token SEND / 'send' / + token NAMESPACE / 'namespace' / + token FOR / 'for' / + token IF / 'if' / + token YIELD / 'yield' / + token WHILE / 'while' / + token ELSIF / 'elsif' / + token ELSE / 'else' / + token IN / 'in' / + token PARSER / 'parser' | 'accum' / + token LIST / 'list' / + token VECTOR / 'vector' / + token MAP / 'map' / + token PTR / 'ptr' / + token ITER / 'iter' / + token REF / 'ref' / + token EXPORT / 'export' / + token RETURN / 'return' / + token BREAK / 'break' / + token REJECT / 'reject' / + token REDUCEFIRST / 'reducefirst' / + token ALIAS / 'alias' / + token COMMIT / 'commit' / + token NEW / 'new' / + token PREEOF / 'preeof' / + token GLOBAL / 'global' / + token EOS / 'eos' / + token CAST / 'cast' / + + token MAKE_TOKEN / 'make_token' / + token MAKE_TREE / 'make_tree' / + + token TYPEID / 'typeid' / + + token LITERAL /'literal'/ + token CONTEXT /'context'/ + token NI /'ni'/ + + token NIL / 'nil' / + token TRUE / 'true' / + token FALSE / 'false' / + + token LEFT /'left'/ + token RIGHT /'right'/ + token NONASSOC /'nonassoc'/ + + token INCLUDE /'include'/ + + token id / + ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) . + ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' ) * + / + + token number + / ( '0' .. '9' ) + / + + token backtick_lit + / '`' . ^( ' ' | '\n' | '\t' | ']' )+ | '`]' / + + token DQ / '\"' / ni + token SQ / '\'' / ni + token TILDE / '~' / ni + + token SQOPEN /'['/ + token SQCLOSE /']'/ + token BAR /'|'/ + token FSLASH /'/'/ + token COLON /':'/ + token DOUBLE_COLON /'::'/ + token DOT /'.'/ + token ARROW /'->'/ + token POPEN /'('/ + token PCLOSE /')'/ + token COPEN /'{'/ + token CCLOSE /'}'/ + token STAR /'*'/ + token QUESTION /'?'/ + token EQUALS /'='/ + token EQEQ /'=='/ + token NEQ /'!='/ + token COMMA /','/ + token LT /'<'/ + token GT /'>'/ + token LTEQ /'<='/ + token GTEQ /'>='/ + token BANG /'!'/ + token DOLLAR /'$'/ + token CARET /'^'/ + token PERCENT /'%'/ + token PLUS /'+'/ + token MINUS /'-'/ + token AMPAMP /'&&'/ + token BARBAR /'||'/ + + ignore / ( '\n' | '\t' | ' ' )+ / + ignore / '#' . ( ^'\n' )* . '\n' / +end + +lex + token CONS_DQ / '\"' / + token CONS_DQ_NL / '\n' / + token CONS_SQOPEN / '[' / + token CONS_SQCLOSE / ']' / + + token dq_cons_data + / ( ^( '\n' | '\"' | '[' | ']' | '\\' ) | '\\' . any )+ / +end + +lex + token CONS_SQ / '\'' / + token CONS_SQ_NL / '\n' / + + token sq_cons_data + / ( ^( '\n' | '\'' | '\\' ) | '\\' . any )+ / +end + +lex + token TILDE_NL / '\n' / + token tilde_data + / ( ^'\n' )+ / +end + +lex + token lex_id / + ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) . + ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' ) * + / + + token lex_uint + / ( '0' .. '9' )+ / + + token lex_hex + / '0x' . ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+ / + + token lex_lit / + '\'' . ( ^( '\'' | '\\' ) | '\\' . any )* . ( '\'' | '\'i' ) | + '\"' . ( ^( '\"' | '\\' ) | '\\' . any )* . ( '\"' | '\"i' ) + / + + token LEX_DOT /'.'/ + token LEX_BAR /'|'/ + token LEX_AMP /'&'/ + token LEX_DASH /'-'/ + token LEX_POPEN /'('/ + token LEX_PCLOSE /')'/ + token LEX_STAR /'*'/ + token LEX_STARSTAR /'**'/ + token LEX_QUESTION /'?'/ + token LEX_PLUS /'+'/ + token LEX_CARET /'^'/ + token LEX_DOTDOT /'..'/ + token LEX_SQOPEN_POS /'['/ ni + token LEX_SQOPEN_NEG /'[^'/ ni + token LEX_FSLASH /'/'/ + + token LEX_DASHDASH /'--'/ + token LEX_COLON_GT /':>'/ + token LEX_COLON_GTGT /':>>'/ + token LEX_LT_COLON /'<:'/ + + ignore / + ( '\n' | '\t' | ' ' ) . + ( '\n' | '\t' | ' ' )* + / + + ignore / '#' . ( ^'\n' )* . '\n' / +end + +lex + token RE_DASH / '-' / + token RE_CHAR / ^( '\\' | '-' | ']' ) | '\\' . any / + token RE_SQCLOSE / ']' / +end + +def start + [RootItemList: root_item*] + +def root_item + [rl_def] :Rl commit +| [literal_def] :Literal commit +| [token_def] :Token commit +| [ic_def] :IgnoreCollector commit +| [ignore_def] :Ignore commit +| [cfl_def] :Cfl commit +| [region_def] :Region commit +| [context_def] :Context commit +| [namespace_def] :Namespace commit +| [function_def] :Function commit +| [iter_def] :Iter commit +| [statement] :Statement commit +| [global_def] :Global commit +| [export_def] :Export commit +| [pre_eof_def] :PreEof commit +| [precedence_def] :Precedence commit +| [alias_def] :Alias commit +| [include] :Include commit + +def include + [INCLUDE SQ SqConsDataList: sq_cons_data* sq_lit_term] + +def precedence_def + [pred_type pred_token_list] + +def pred_type + [LEFT] :Left +| [RIGHT] :Right +| [NONASSOC] :NonAssoc + +def pred_token_list + [pred_token_list COMMA pred_token] :List +| [pred_token] :Base + +def pred_token + [region_qual id] :Id +| [region_qual backtick_lit] :Lit + +def pre_eof_def + [PREEOF COPEN lang_stmt_list CCLOSE] + +def alias_def + [ALIAS id type_ref] + +def context_item + [context_var_def] :ContextVar commit +| [literal_def] :Literal commit +| [rl_def] :Rl commit +| [token_def] :Token commit +| [ic_def] :IgnoreCollector commit +| [ignore_def] :Ignore commit +| [cfl_def] :Cfl commit +| [region_def] :Region commit +| [context_def] :Context commit +| [function_def] :Function commit +| [iter_def] :Iter commit +| [export_def] :Export commit +| [pre_eof_def] :PreEof commit +| [precedence_def] :Precedence commit + +def export_def + [EXPORT var_def opt_def_init] + +def global_def + [GLOBAL var_def opt_def_init] + +def iter_def + [ITER id POPEN ParamVarDefList: param_var_def_list PCLOSE + COPEN lang_stmt_list CCLOSE] + +def reference_type_ref + [REF LT type_ref GT] + +def param_var_def_list + [param_var_def param_var_def_list] +| [] + +def param_var_def + [id COLON type_ref] :Type +| [id COLON reference_type_ref] :Ref + +def opt_export + [EXPORT] :Export +| [] + +def function_def + [opt_export type_ref id + POPEN ParamVarDefList: param_var_def_list PCLOSE + COPEN lang_stmt_list CCLOSE] + +def context_var_def + [var_def] + +def context_def + [CONTEXT id ContextItemList: context_item* END] + +def literal_def + [LITERAL literal_list] + +def literal_list + [literal_list literal_item] :Item +| [literal_item] :Base + +def literal_item + [no_ignore_left backtick_lit no_ignore_right] + +def no_ignore_left + [NI MINUS] :Ni +| [] + +def no_ignore_right + [MINUS NI] :Ni +| [] + +def namespace_def + [NAMESPACE id ItemList: namespace_item* END] + +def namespace_item + [rl_def] :Rl commit +| [literal_def] :Literal commit +| [token_def] :Token commit +| [ic_def] :IgnoreCollector commit +| [ignore_def] :Ignore commit +| [cfl_def] :Cfl commit +| [region_def] :Region commit +| [context_def] :Context commit +| [namespace_def] :Namespace commit +| [function_def] :Function commit +| [iter_def] :Iter commit +| [pre_eof_def] :PreEof commit +| [precedence_def] :Precedence commit +| [alias_def] :Alias commit +| [include] :Include commit + +def obj_var_list + [] + +def opt_reduce_first + [REDUCEFIRST] +| [] + +def cfl_def + [DEF id + VarDefList: var_def* + opt_reduce_first + prod_list] + +def region_def + [LEX RootItemList: root_item* END] + +def rl_def + [RL id LEX_FSLASH lex_expr LEX_FSLASH] + +def opt_lex_expr + [lex_expr] +| [] + +def token_def + [TOKEN id VarDefList: var_def* + no_ignore_left + LEX_FSLASH opt_lex_expr LEX_FSLASH + no_ignore_right + opt_translate] + +def ic_def + [TOKEN id MINUS] + +def opt_translate + [COPEN lang_stmt_list CCLOSE] :Translate +| [] + +def opt_id + [id] :Id +| [] + +def ignore_def + [IGNORE opt_id LEX_FSLASH opt_lex_expr LEX_FSLASH] + +def prod_el + [opt_prod_el_name region_qual id opt_repeat] :Id +| [opt_prod_el_name region_qual backtick_lit opt_repeat] :Lit + +def opt_prod_el_name + [id COLON] :Name +| [] + +def prod_el_list + [prod_el_list prod_el] :List +| [] + +def opt_commit + [COMMIT] :Commit +| [] + +def opt_prod_name + [COLON id] :Name +| [] + +def prod + [SQOPEN prod_el_list SQCLOSE + opt_prod_name + opt_commit + opt_reduce] + +def opt_reduce + [COPEN lang_stmt_list CCLOSE] :Reduce +| [] + +def prod_list + [prod_list BAR prod] :List +| [prod] :Base + +def statement + [print_stmt] :Print +| [expr_stmt] :Expr +| [var_def opt_def_init] :VarDef +| [FOR id COLON type_ref IN iter_call block_or_single] :For +| [IF code_expr block_or_single elsif_list] :If +| [WHILE code_expr block_or_single] :While +| [var_ref EQUALS code_expr] :LhsVarRef +| [YIELD var_ref] :Yield +| [RETURN code_expr] :Return +| [BREAK] :Break +| [REJECT] :Reject + +def elsif_list + [elsif_clause elsif_list] :Clause +| [optional_else] :OptElse + +def elsif_clause + [ELSIF code_expr block_or_single] + +def optional_else + [ELSE block_or_single] :Else +| [] + +def call_arg_list + [code_expr call_arg_list] +| [] + +def iter_call + [E1 var_ref POPEN call_arg_list PCLOSE] :Call +| [E2 id] :Id +| [E3 code_expr] :Expr + +def block_or_single + [COPEN lang_stmt_list CCLOSE] :Block +| [statement] :Single + +def require_pattern + [REQUIRE var_ref pattern] + +def opt_require_stmt + [require_pattern lang_stmt_list] :Require +| [] :Base + +def lang_stmt_list + [StmtList: statement* opt_require_stmt] + +def opt_def_init + [EQUALS code_expr] :Init +| [] :Base + +def var_def + [id COLON type_ref] + +def print_stmt + [PRINT POPEN call_arg_list PCLOSE] :Tree +| [PRINTS POPEN call_arg_list PCLOSE] :PrintStream +| [PRINT_XML POPEN call_arg_list PCLOSE] :Xml +| [PRINT_XML_AC POPEN call_arg_list PCLOSE] :XmlAc + +def expr_stmt + [code_expr] + +def code_expr + [code_expr AMPAMP code_relational] :AmpAmp +| [code_expr BARBAR code_relational] :BarBar +| [code_relational] :Base + +def code_relational + [code_relational EQEQ code_additive] :EqEq +| [code_relational NEQ code_additive] :Neq +| [code_relational LT code_additive] :Lt +| [code_relational GT code_additive] :Gt +| [code_relational LTEQ code_additive] :LtEq +| [code_relational GTEQ code_additive] :GtEq +| [code_additive] :Base + +def code_additive + [code_additive PLUS code_multiplicitive] :Plus +| [code_additive MINUS code_multiplicitive] :Minus +| [code_multiplicitive] :Base + +def code_multiplicitive + [code_multiplicitive STAR code_unary] :Star +| [code_multiplicitive FSLASH code_unary] :Fslash +| [code_unary] :Base + +def code_unary + [BANG code_factor] :Bang +| [DOLLAR code_factor] :Dollar +| [CARET code_factor] :Caret +| [PERCENT code_factor] :Percent +| [code_factor] :Base + +def opt_eos + [DOT] :Dot +| [EOS] :Eos +| [] + +def code_factor + [number] :Number +| [var_ref POPEN call_arg_list PCLOSE] :Call +| [var_ref] :VarRef +| [NIL] :Nil +| [TRUE] :True +| [FALSE] :False +| [POPEN code_expr PCLOSE] :Paren +| [SEND var_ref accumulate opt_eos] :Send +| [PARSE opt_capture type_ref opt_field_init accumulate] :Parse +| [PARSE_STOP opt_capture type_ref opt_field_init accumulate] :ParseStop +| [CONS opt_capture type_ref opt_field_init constructor] :Cons +| [MATCH var_ref pattern] :Match +| [string] :String +| [type_ref IN var_ref] :In +| [MAKE_TREE POPEN call_arg_list PCLOSE] :MakeTree +| [MAKE_TOKEN POPEN call_arg_list PCLOSE] :MakeToken +| [TYPEID LT type_ref GT] :TypeId +| [NEW code_factor] :New +| [CAST LT type_ref GT code_factor] :Cast + +def type_ref + [region_qual id opt_repeat] :Id +| [PTR LT region_qual id opt_repeat GT] :Ptr +| [MAP LT MapKeyType: type_ref MapValueType: type_ref GT] :Map +| [LIST LT type_ref GT] :List +| [VECTOR LT type_ref GT] :Vector +| [PARSER LT type_ref GT] :Parser + +def region_qual + [region_qual id DOUBLE_COLON] :Qual +| [] :Base + +def opt_repeat + [STAR] :Star +| [PLUS] :Plus +| [QUESTION] :Question +| [] + +def opt_capture + [id COLON] :Id +| [] + +def opt_field_init + [POPEN FieldInitList: field_init* PCLOSE] :Init +| [] :Base + +def field_init + [code_expr] + + +# +# Pattern +# + +def opt_label + [id COLON] :Id +| [] + +def dq_lit_term + [CONS_DQ] | [CONS_DQ_NL] + +def sq_lit_term + [CONS_SQ] | [CONS_SQ_NL] + +def opt_tilde_data + [tilde_data] +| [] + +def pattern_el_lel + [region_qual id opt_repeat] :Id +| [region_qual backtick_lit opt_repeat] :Lit + +def pattern_el + [opt_label pattern_el_lel] :PatternEl +| [DQ LitpatElList: litpat_el* dq_lit_term] :Dq +| [SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq +| [TILDE opt_tilde_data TILDE_NL] :Tilde + +def litpat_el + [dq_cons_data] :ConsData +| [CONS_SQOPEN PatternElList: pattern_el* CONS_SQCLOSE] :SubList + +def pattern_top_el + [DQ LitpatElList: litpat_el* dq_lit_term] :Dq +| [SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq +| [TILDE opt_tilde_data TILDE_NL] :Tilde +| [SQOPEN PatternElList: pattern_el* SQCLOSE] :SubList + +def pattern_list + [pattern_list pattern_top_el] :List +| [pattern_top_el] :Base + +def pattern + [pattern_list] + +# +# Constructor List +# + +def E1 [] +def E2 [] +def E3 [] +def E4 [] + +def cons_el + [E1 region_qual backtick_lit] :Lit +| [E1 DQ LitConsElList: lit_cons_el* dq_lit_term] :Dq +| [E1 SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq +| [E1 TILDE opt_tilde_data TILDE_NL] :Tilde +| [E2 code_expr] :CodeExpr + +def lit_cons_el + [dq_cons_data] :ConsData +| [CONS_SQOPEN ConsElList: cons_el* CONS_SQCLOSE] :SubList + +def cons_top_el + [DQ LitConsElList: lit_cons_el* dq_lit_term] :Dq +| [SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq +| [TILDE opt_tilde_data TILDE_NL] :Tilde +| [SQOPEN ConsElList: cons_el* SQCLOSE] :SubList + +def cons_list + [cons_top_el cons_list] :List +| [cons_top_el] :Base + +def constructor + [cons_list] + +# +# Accumulate +# + +def accum_el + [E1 DQ LitAccumElList: lit_accum_el* dq_lit_term] :Dq +| [E1 SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq +| [E1 TILDE opt_tilde_data TILDE_NL] :Tilde +| [E2 code_expr] :CodeExpr + +def lit_accum_el + [dq_cons_data] :ConsData +| [CONS_SQOPEN AccumElList: accum_el* CONS_SQCLOSE] :SubList + +def accum_top_el + [DQ LitAccumElList: lit_accum_el* dq_lit_term] :Dq +| [SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq +| [TILDE opt_tilde_data TILDE_NL] :Tilde +| [SQOPEN AccumElList: accum_el* SQCLOSE] :SubList + +def accum_list + [accum_top_el accum_list] :List +| [accum_top_el] :Base + +def accumulate + [accum_list] + +# +# String List +# + +def string_el + [E1 DQ LitStringElList: lit_string_el* dq_lit_term] :Dq +| [E1 SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq +| [E1 TILDE opt_tilde_data TILDE_NL] :Tilde +| [E2 code_expr] :CodeExpr + +def lit_string_el + [dq_cons_data] :ConsData +| [CONS_SQOPEN StringElList: string_el* CONS_SQCLOSE] :SubList + +def string_top_el + [DQ LitStringElList: lit_string_el* dq_lit_term] :Dq +| [SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq +| [TILDE opt_tilde_data TILDE_NL] :Tilde +| [SQOPEN StringElList: string_el* SQCLOSE] :SubList + +def string_list + [string_top_el string_list] :List +| [string_top_el] :Base + +def string + [string_list] + +# +# Variable References +# + +def var_ref + [qual id] + +def qual + [qual id DOT] :Dot +| [qual id ARROW] :Arrow +| [] :Base + +# +# Lexical analysis. +# + +def lex_expr + [lex_expr LEX_BAR lex_term] :Bar +| [lex_expr LEX_AMP lex_term] :Amp +| [lex_expr LEX_DASH lex_term] :Dash +| [lex_expr LEX_DASHDASH lex_term] :DashDash +| [lex_term] :Base + +def opt_lex_dot + [LEX_DOT] +| [] + +def lex_term + [lex_term opt_lex_dot lex_factor_rep] :Dot +| [lex_term LEX_COLON_GT lex_factor_rep] :ColonGt +| [lex_term LEX_COLON_GTGT lex_factor_rep] :ColonGtGt +| [lex_term LEX_LT_COLON lex_factor_rep] :LtColon +| [lex_factor_rep] :Base + +def lex_factor_rep + [lex_factor_rep LEX_STAR] :Star +| [lex_factor_rep LEX_STARSTAR] :StarStar +| [lex_factor_rep LEX_PLUS] :Plus +| [lex_factor_rep LEX_QUESTION] :Question +| [lex_factor_rep COPEN lex_uint CCLOSE ] :Exact +| [lex_factor_rep COPEN COMMA lex_uint CCLOSE ] :Max +| [lex_factor_rep COPEN lex_uint COMMA CCLOSE ] :Min +| [lex_factor_rep COPEN Low: lex_uint COMMA High: lex_uint CCLOSE ] :Range +| [lex_factor_neg] :Base + +def lex_factor_neg + [LEX_CARET lex_factor_neg] :Caret +| [lex_factor] :Base + +def lex_range_lit + [lex_lit] :Lit +| [lex_num] :Number + +def lex_num + [lex_uint] +| [lex_hex] + +#| [LEX_DASH num] + +def lex_factor + [lex_lit] :Literal +| [lex_id] :Id +| [lex_uint] :Number +| [lex_hex] :Hex +| [Low: lex_range_lit LEX_DOTDOT High: lex_range_lit] :Range +| [LEX_SQOPEN_POS reg_or_data RE_SQCLOSE] :PosOrBlock +| [LEX_SQOPEN_NEG reg_or_data RE_SQCLOSE] :NegOrBlock +| [LEX_POPEN lex_expr LEX_PCLOSE] :Paren + +def reg_or_data + [reg_or_data reg_or_char] :Data +| [] :Base + +def reg_or_char + [RE_CHAR] :Char +| [Low: RE_CHAR RE_DASH High: RE_CHAR] :Range diff --git a/src/compiler.cc b/src/compiler.cc new file mode 100644 index 0000000..d60519e --- /dev/null +++ b/src/compiler.cc @@ -0,0 +1,1170 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <iostream> +#include <iomanip> +#include <errno.h> +#include <stdlib.h> +#include <limits.h> +#include <sstream> + +#include "global.h" +#include "avltree.h" +#include "parsedata.h" +#include "parser.h" +#include "parsedata.h" +#include "parsetree.h" +#include "mergesort.h" +#include "redbuild.h" +#include "pdacodegen.h" +#include "fsmcodegen.h" +#include "pdarun.h" +#include "colm.h" +#include "pool.h" + +using std::ostringstream; +using std::cout; +using std::cerr; +using std::endl; + +char machineMain[] = "main"; +exit_object endp; +void operator<<( ostream &out, exit_object & ) +{ + out << endl; + exit(1); +} + +/* Perform minimization after an operation according + * to the command line args. */ +void afterOpMinimize( FsmGraph *fsm, bool lastInSeq ) +{ + /* Switch on the prefered minimization algorithm. */ + if ( lastInSeq ) { + /* First clean up the graph. FsmGraph operations may leave these + * lying around. There should be no dead end states. The subtract + * intersection operators are the only places where they may be + * created and those operators clean them up. */ + fsm->removeUnreachableStates(); + fsm->minimizePartition2(); + } +} + +/* Count the transitions in the fsm by walking the state list. */ +int countTransitions( FsmGraph *fsm ) +{ + int numTrans = 0; + FsmState *state = fsm->stateList.head; + while ( state != 0 ) { + numTrans += state->outList.length(); + state = state->next; + } + return numTrans; +} + +Key makeFsmKeyHex( char *str, const InputLoc &loc, Compiler *pd ) +{ + /* Reset errno so we can check for overflow or underflow. In the event of + * an error, sets the return val to the upper or lower bound being tested + * against. */ + errno = 0; + unsigned int size = keyOps->alphType->size; + bool unusedBits = size < sizeof(unsigned long); + + unsigned long ul = strtoul( str, 0, 16 ); + + if ( errno == ERANGE || (unusedBits && ul >> (size * 8)) ) { + error(loc) << "literal " << str << " overflows the alphabet type" << endl; + ul = 1 << (size * 8); + } + + if ( unusedBits && ul >> (size * 8 - 1) ) + ul |= (ULONG_MAX >> (size*8 ) ) << (size*8); + + return Key( (long)ul ); +} + +Key makeFsmKeyDec( char *str, const InputLoc &loc, Compiler *pd ) +{ + /* Convert the number to a decimal. First reset errno so we can check + * for overflow or underflow. */ + errno = 0; + long long minVal = keyOps->alphType->minVal; + long long maxVal = keyOps->alphType->maxVal; + + long long ll = strtoll( str, 0, 10 ); + + /* Check for underflow. */ + if ( (errno == ERANGE && ll < 0) || ll < minVal) { + error(loc) << "literal " << str << " underflows the alphabet type" << endl; + ll = minVal; + } + /* Check for overflow. */ + else if ( (errno == ERANGE && ll > 0) || ll > maxVal ) { + error(loc) << "literal " << str << " overflows the alphabet type" << endl; + ll = maxVal; + } + + return Key( (long)ll ); +} + +/* Make an fsm key in int format (what the fsm graph uses) from an alphabet + * number returned by the parser. Validates that the number doesn't overflow + * the alphabet type. */ +Key makeFsmKeyNum( char *str, const InputLoc &loc, Compiler *pd ) +{ + /* Switch on hex/decimal format. */ + if ( str[0] == '0' && str[1] == 'x' ) + return makeFsmKeyHex( str, loc, pd ); + else + return makeFsmKeyDec( str, loc, pd ); +} + +/* Make an fsm int format (what the fsm graph uses) from a single character. + * Performs proper conversion depending on signed/unsigned property of the + * alphabet. */ +Key makeFsmKeyChar( char c, Compiler *pd ) +{ + /* Copy from a char type. */ + return Key( c ); +} + +/* Make an fsm key array in int format (what the fsm graph uses) from a string + * of characters. Performs proper conversion depending on signed/unsigned + * property of the alphabet. */ +void makeFsmKeyArray( Key *result, char *data, int len, Compiler *pd ) +{ + /* Copy from a char star type. */ + char *src = data; + for ( int i = 0; i < len; i++ ) + result[i] = Key(src[i]); +} + +/* Like makeFsmKeyArray except the result has only unique keys. They ordering + * will be changed. */ +void makeFsmUniqueKeyArray( KeySet &result, char *data, int len, + bool caseInsensitive, Compiler *pd ) +{ + /* Copy from a char star type. */ + char *src = data; + for ( int si = 0; si < len; si++ ) { + Key key( src[si] ); + result.insert( key ); + if ( caseInsensitive ) { + if ( key.isLower() ) + result.insert( key.toUpper() ); + else if ( key.isUpper() ) + result.insert( key.toLower() ); + } + } +} + +FsmGraph *dotFsm( Compiler *pd ) +{ + FsmGraph *retFsm = new FsmGraph(); + retFsm->rangeFsm( keyOps->minKey, keyOps->maxKey ); + return retFsm; +} + +FsmGraph *dotStarFsm( Compiler *pd ) +{ + FsmGraph *retFsm = new FsmGraph(); + retFsm->rangeStarFsm( keyOps->minKey, keyOps->maxKey ); + return retFsm; +} + +/* Make a builtin type. Depends on the signed nature of the alphabet type. */ +FsmGraph *makeBuiltin( BuiltinMachine builtin, Compiler *pd ) +{ + /* FsmGraph created to return. */ + FsmGraph *retFsm = 0; + + switch ( builtin ) { + case BT_Any: { + /* All characters. */ + retFsm = dotFsm( pd ); + break; + } + case BT_Ascii: { + /* Ascii characters 0 to 127. */ + retFsm = new FsmGraph(); + retFsm->rangeFsm( 0, 127 ); + break; + } + case BT_Extend: { + /* Ascii extended characters. This is the full byte range. Dependent + * on signed, vs no signed. If the alphabet is one byte then just use + * dot fsm. */ + retFsm = new FsmGraph(); + retFsm->rangeFsm( -128, 127 ); + break; + } + case BT_Alpha: { + /* Alpha [A-Za-z]. */ + FsmGraph *upper = new FsmGraph(), *lower = new FsmGraph(); + upper->rangeFsm( 'A', 'Z' ); + lower->rangeFsm( 'a', 'z' ); + upper->unionOp( lower ); + upper->minimizePartition2(); + retFsm = upper; + break; + } + case BT_Digit: { + /* Digits [0-9]. */ + retFsm = new FsmGraph(); + retFsm->rangeFsm( '0', '9' ); + break; + } + case BT_Alnum: { + /* Alpha numerics [0-9A-Za-z]. */ + FsmGraph *digit = new FsmGraph(), *lower = new FsmGraph(); + FsmGraph *upper = new FsmGraph(); + digit->rangeFsm( '0', '9' ); + upper->rangeFsm( 'A', 'Z' ); + lower->rangeFsm( 'a', 'z' ); + digit->unionOp( upper ); + digit->unionOp( lower ); + digit->minimizePartition2(); + retFsm = digit; + break; + } + case BT_Lower: { + /* Lower case characters. */ + retFsm = new FsmGraph(); + retFsm->rangeFsm( 'a', 'z' ); + break; + } + case BT_Upper: { + /* Upper case characters. */ + retFsm = new FsmGraph(); + retFsm->rangeFsm( 'A', 'Z' ); + break; + } + case BT_Cntrl: { + /* Control characters. */ + FsmGraph *cntrl = new FsmGraph(); + FsmGraph *highChar = new FsmGraph(); + cntrl->rangeFsm( 0, 31 ); + highChar->concatFsm( 127 ); + cntrl->unionOp( highChar ); + cntrl->minimizePartition2(); + retFsm = cntrl; + break; + } + case BT_Graph: { + /* Graphical ascii characters [!-~]. */ + retFsm = new FsmGraph(); + retFsm->rangeFsm( '!', '~' ); + break; + } + case BT_Print: { + /* Printable characters. Same as graph except includes space. */ + retFsm = new FsmGraph(); + retFsm->rangeFsm( ' ', '~' ); + break; + } + case BT_Punct: { + /* Punctuation. */ + FsmGraph *range1 = new FsmGraph(); + FsmGraph *range2 = new FsmGraph(); + FsmGraph *range3 = new FsmGraph(); + FsmGraph *range4 = new FsmGraph(); + range1->rangeFsm( '!', '/' ); + range2->rangeFsm( ':', '@' ); + range3->rangeFsm( '[', '`' ); + range4->rangeFsm( '{', '~' ); + range1->unionOp( range2 ); + range1->unionOp( range3 ); + range1->unionOp( range4 ); + range1->minimizePartition2(); + retFsm = range1; + break; + } + case BT_Space: { + /* Whitespace: [\t\v\f\n\r ]. */ + FsmGraph *cntrl = new FsmGraph(); + FsmGraph *space = new FsmGraph(); + cntrl->rangeFsm( '\t', '\r' ); + space->concatFsm( ' ' ); + cntrl->unionOp( space ); + cntrl->minimizePartition2(); + retFsm = cntrl; + break; + } + case BT_Xdigit: { + /* Hex digits [0-9A-Fa-f]. */ + FsmGraph *digit = new FsmGraph(); + FsmGraph *upper = new FsmGraph(); + FsmGraph *lower = new FsmGraph(); + digit->rangeFsm( '0', '9' ); + upper->rangeFsm( 'A', 'F' ); + lower->rangeFsm( 'a', 'f' ); + digit->unionOp( upper ); + digit->unionOp( lower ); + digit->minimizePartition2(); + retFsm = digit; + break; + } + case BT_Lambda: { + retFsm = new FsmGraph(); + retFsm->lambdaFsm(); + break; + } + case BT_Empty: { + retFsm = new FsmGraph(); + retFsm->emptyFsm(); + break; + }} + + return retFsm; +} + +/* + * Compiler + */ + +/* Initialize the structure that will collect info during the parse of a + * machine. */ +Compiler::Compiler( ) +: + nextPriorKey(0), + nextNameId(0), + alphTypeSet(false), + getKeyExpr(0), + accessExpr(0), + curStateExpr(0), + lowerNum(0), + upperNum(0), + errorCount(0), + curActionOrd(0), + curPriorOrd(0), + nextEpsilonResolvedLink(0), + nextTokenId(1), + rootCodeBlock(0), + mainReturnUT(0), + //access(0), + //tokenStruct(0), + + ptrLangEl(0), + boolLangEl(0), + intLangEl(0), + strLangEl(0), + streamLangEl(0), + anyLangEl(0), + rootLangEl(0), + noTokenLangEl(0), + eofLangEl(0), + errorLangEl(0), + ignoreLangEl(0), + + firstNonTermId(0), + prodIdIndex(0), + + uniqueTypeNil(0), + uniqueTypePtr(0), + uniqueTypeBool(0), + uniqueTypeInt(0), + uniqueTypeStr(0), + uniqueTypeStream(0), + uniqueTypeIgnore(0), + uniqueTypeAny(0), + nextPatConsId(0), + nextGenericId(1), + nextFuncId(0), + loopCleanup(0), + nextObjectId(1), /* 0 is reserved for no object. */ + nextFrameId(0), + nextParserId(0), + revertOn(true), + predValue(0), + nextMatchEndNum(0), + argvTypeRef(0), + inContiguous(false), + contiguousOffset(0), + contiguousStretch(0) +{ +} + +/* Clean up the data collected during a parse. */ +Compiler::~Compiler() +{ + /* Delete all the nodes in the action list. Will cause all the + * string data that represents the actions to be deallocated. */ + actionList.empty(); +} + +ostream &operator<<( ostream &out, const Token &token ) +{ + out << token.data; + return out; +} + +/* Write out a name reference. */ +ostream &operator<<( ostream &out, const NameRef &nameRef ) +{ + int pos = 0; + if ( nameRef[pos] == 0 ) { + out << "::"; + pos += 1; + } + out << nameRef[pos++]; + for ( ; pos < nameRef.length(); pos++ ) + out << "::" << nameRef[pos]; + return out; +} + +NameInst **Compiler::makeNameIndex() +{ + /* The number of nodes in the tree can now be given by nextNameId. Put a + * null pointer on the end of the list to terminate it. */ + NameInst **nameIndex = new NameInst*[nextNameId+1]; + memset( nameIndex, 0, sizeof(NameInst*)*(nextNameId+1) ); + + for ( NameInstList::Iter ni = nameInstList; ni.lte(); ni++ ) + nameIndex[ni->id] = ni; + + return nameIndex; +} + +void Compiler::createBuiltin( const char *name, BuiltinMachine builtin ) +{ + LexExpression *expression = LexExpression::cons( builtin ); + LexJoin *join = LexJoin::cons( expression ); + LexDefinition *varDef = new LexDefinition( name, join ); + GraphDictEl *graphDictEl = new GraphDictEl( name, varDef ); + rootNamespace->rlMap.insert( graphDictEl ); +} + +/* Initialize the graph dict with builtin types. */ +void Compiler::initGraphDict( ) +{ + createBuiltin( "any", BT_Any ); + createBuiltin( "ascii", BT_Ascii ); + createBuiltin( "extend", BT_Extend ); + createBuiltin( "alpha", BT_Alpha ); + createBuiltin( "digit", BT_Digit ); + createBuiltin( "alnum", BT_Alnum ); + createBuiltin( "lower", BT_Lower ); + createBuiltin( "upper", BT_Upper ); + createBuiltin( "cntrl", BT_Cntrl ); + createBuiltin( "graph", BT_Graph ); + createBuiltin( "print", BT_Print ); + createBuiltin( "punct", BT_Punct ); + createBuiltin( "space", BT_Space ); + createBuiltin( "xdigit", BT_Xdigit ); + createBuiltin( "null", BT_Lambda ); + createBuiltin( "zlen", BT_Lambda ); + createBuiltin( "empty", BT_Empty ); +} + +/* Initialize the key operators object that will be referenced by all fsms + * created. */ +void Compiler::initKeyOps( ) +{ + /* Signedness and bounds. */ + HostType *alphType = alphTypeSet ? userAlphType : hostLang->defaultAlphType; + thisKeyOps.setAlphType( alphType ); + + if ( lowerNum != 0 ) { + /* If ranges are given then interpret the alphabet type. */ + thisKeyOps.minKey = makeFsmKeyNum( lowerNum, rangeLowLoc, this ); + thisKeyOps.maxKey = makeFsmKeyNum( upperNum, rangeHighLoc, this ); + } +} + +/* Remove duplicates of unique actions from an action table. */ +void Compiler::removeDups( ActionTable &table ) +{ + /* Scan through the table looking for unique actions to + * remove duplicates of. */ + for ( int i = 0; i < table.length(); i++ ) { + /* Remove any duplicates ahead of i. */ + for ( int r = i+1; r < table.length(); ) { + if ( table[r].value == table[i].value ) + table.vremove(r); + else + r += 1; + } + } +} + +/* Remove duplicates from action lists. This operates only on transition and + * eof action lists and so should be called once all actions have been + * transfered to their final resting place. */ +void Compiler::removeActionDups( FsmGraph *graph ) +{ + /* Loop all states. */ + for ( StateList::Iter state = graph->stateList; state.lte(); state++ ) { + /* Loop all transitions. */ + for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) + removeDups( trans->actionTable ); + removeDups( state->toStateActionTable ); + removeDups( state->fromStateActionTable ); + removeDups( state->eofActionTable ); + } +} + +Action *Compiler::newAction( const String &name, InlineList *inlineList ) +{ + InputLoc loc; + loc.line = 1; + loc.col = 1; + loc.fileName = 0; + + Action *action = Action::cons( loc, name, inlineList ); + actionList.append( action ); + return action; +} + +void Compiler::initLongestMatchData() +{ + if ( regionSetList.length() > 0 ) { + /* The initActId action gives act a default value. */ + InlineList *il4 = InlineList::cons(); + il4->append( InlineItem::cons( InputLoc(), InlineItem::LmInitAct ) ); + initActId = newAction( "initact", il4 ); + initActId->isLmAction = true; + + /* The setTokStart action sets tokstart. */ + InlineList *il5 = InlineList::cons(); + il5->append( InlineItem::cons( InputLoc(), InlineItem::LmSetTokStart ) ); + setTokStart = newAction( "tokstart", il5 ); + setTokStart->isLmAction = true; + + /* The setTokEnd action sets tokend. */ + InlineList *il3 = InlineList::cons(); + il3->append( InlineItem::cons( InputLoc(), InlineItem::LmSetTokEnd ) ); + setTokEnd = newAction( "tokend", il3 ); + setTokEnd->isLmAction = true; + + /* The action will also need an ordering: ahead of all user action + * embeddings. */ + initActIdOrd = curActionOrd++; + setTokStartOrd = curActionOrd++; + setTokEndOrd = curActionOrd++; + } +} + +void Compiler::finishGraphBuild( FsmGraph *graph ) +{ + /* Resolve any labels that point to multiple states. Any labels that are + * still around are referenced only by gotos and calls and they need to be + * made into deterministic entry points. */ + graph->deterministicEntry(); + + /* + * All state construction is now complete. + */ + + /* Transfer global error actions. */ + for ( StateList::Iter state = graph->stateList; state.lte(); state++ ) + graph->transferErrorActions( state, 0 ); + + removeActionDups( graph ); + + /* Remove unreachable states. There should be no dead end states. The + * subtract and intersection operators are the only places where they may + * be created and those operators clean them up. */ + graph->removeUnreachableStates(); + + /* No more fsm operations are to be done. Action ordering numbers are + * no longer of use and will just hinder minimization. Clear them. */ + graph->nullActionKeys(); + + /* Transition priorities are no longer of use. We can clear them + * because they will just hinder minimization as well. Clear them. */ + graph->clearAllPriorities(); + + /* Minimize here even if we minimized at every op. Now that function + * keys have been cleared we may get a more minimal fsm. */ + graph->minimizePartition2(); + graph->compressTransitions(); +} + +/* Build the name tree and supporting data structures. */ +NameInst *Compiler::makeNameTree() +{ + /* Create the root name. */ + nextNameId = 1; + + /* First make the name tree. */ + for ( RegionImplList::Iter rel = regionImplList; rel.lte(); rel++ ) { + /* Recurse on the instance. */ + rel->makeNameTree( rel->loc, this ); + } + + return 0; +} + +FsmGraph *Compiler::makeAllRegions() +{ + /* Build the name tree and supporting data structures. */ + makeNameTree(); + NameInst **nameIndex = makeNameIndex(); + + int numGraphs = 0; + FsmGraph **graphs = new FsmGraph*[regionImplList.length()]; + + /* Make all the instantiations, we know that main exists in this list. */ + for ( RegionImplList::Iter rel = regionImplList; rel.lte(); rel++ ) { + /* Build the graph from a walk of the parse tree. */ + FsmGraph *newGraph = rel->walk( this ); + + /* Wrap up the construction. */ + finishGraphBuild( newGraph ); + + /* Save off the new graph. */ + graphs[numGraphs++] = newGraph; + } + + /* NOTE: If putting in minimization here we need to include eofTarget + * into the minimization algorithm. It is currently set by the longest + * match operator and not considered anywhere else. */ + + FsmGraph *all; + if ( numGraphs == 0 ) { + all = new FsmGraph; + all->lambdaFsm(); + } + else { + /* Add all the other graphs into the first. */ + all = graphs[0]; + all->globOp( graphs+1, numGraphs-1 ); + delete[] graphs; + } + + /* Go through all the token regions and check for lmRequiresErrorState. */ + for ( RegionImplList::Iter reg = regionImplList; reg.lte(); reg++ ) { + if ( reg->lmSwitchHandlesError ) + all->lmRequiresErrorState = true; + } + + all->nameIndex = nameIndex; + + return all; +} + +void Compiler::analyzeAction( Action *action, InlineList *inlineList ) +{ + /* FIXME: Actions used as conditions should be very constrained. */ + for ( InlineList::Iter item = *inlineList; item.lte(); item++ ) { + //if ( item->type == InlineItem::Call || item->type == InlineItem::CallExpr ) + // action->anyCall = true; + + /* Need to recurse into longest match items. */ + if ( item->type == InlineItem::LmSwitch ) { + RegionImpl *lm = item->tokenRegion; + for ( TokenInstanceListReg::Iter lmi = lm->tokenInstanceList; lmi.lte(); lmi++ ) { + if ( lmi->action != 0 ) + analyzeAction( action, lmi->action->inlineList ); + } + } + + if ( item->type == InlineItem::LmOnLast || + item->type == InlineItem::LmOnNext || + item->type == InlineItem::LmOnLagBehind ) + { + TokenInstance *lmi = item->longestMatchPart; + if ( lmi->action != 0 ) + analyzeAction( action, lmi->action->inlineList ); + } + + if ( item->children != 0 ) + analyzeAction( action, item->children ); + } +} + +void Compiler::analyzeGraph( FsmGraph *graph ) +{ + for ( ActionList::Iter act = actionList; act.lte(); act++ ) + analyzeAction( act, act->inlineList ); + + for ( StateList::Iter st = graph->stateList; st.lte(); st++ ) { + /* The transition list. */ + for ( TransList::Iter trans = st->outList; trans.lte(); trans++ ) { + for ( ActionTable::Iter at = trans->actionTable; at.lte(); at++ ) + at->value->numTransRefs += 1; + } + + for ( ActionTable::Iter at = st->toStateActionTable; at.lte(); at++ ) + at->value->numToStateRefs += 1; + + for ( ActionTable::Iter at = st->fromStateActionTable; at.lte(); at++ ) + at->value->numFromStateRefs += 1; + + for ( ActionTable::Iter at = st->eofActionTable; at.lte(); at++ ) + at->value->numEofRefs += 1; + } +} + +FsmGraph *Compiler::makeScanner() +{ + /* Make the graph, do minimization. */ + FsmGraph *fsmGraph = makeAllRegions(); + + /* If any errors have occured in the input file then don't write anything. */ + if ( gblErrorCount > 0 ) + return 0; + + analyzeGraph( fsmGraph ); + + /* Decide if an error state is necessary. + * 1. There is an error transition + * 2. There is a gap in the transitions + * 3. The longest match operator requires it. */ + if ( fsmGraph->lmRequiresErrorState || fsmGraph->hasErrorTrans() ) + fsmGraph->errState = fsmGraph->addState(); + + /* State numbers need to be assigned such that all final states have a + * larger state id number than all non-final states. This enables the + * first_final mechanism to function correctly. We also want states to be + * ordered in a predictable fashion. So we first apply a depth-first + * search, then do a stable sort by final state status, then assign + * numbers. */ + + fsmGraph->depthFirstOrdering(); + fsmGraph->sortStatesByFinal(); + fsmGraph->setStateNumbers( 0 ); + + return fsmGraph; +} + +LangEl *Compiler::makeRepeatProd( const InputLoc &loc, Namespace *nspace, + const String &repeatName, UniqueType *ut ) +{ + LangEl *prodName = addLangEl( this, nspace, repeatName, LangEl::NonTerm ); + prodName->isRepeat = true; + + ProdElList *prodElList1 = new ProdElList; + + /* Build the first production of the repeat. */ + TypeRef *typeRef1 = TypeRef::cons( loc, ut ); + ProdEl *factor1 = new ProdEl( ProdEl::ReferenceType, InputLoc(), 0, false, typeRef1, 0 ); + + UniqueType *prodNameUT = findUniqueType( TYPE_TREE, prodName ); + TypeRef *typeRef2 = TypeRef::cons( loc, prodNameUT ); + ProdEl *factor2 = new ProdEl( ProdEl::ReferenceType, InputLoc(), 0, false, typeRef2, 0 ); + + prodElList1->append( factor1 ); + prodElList1->append( factor2 ); + + Production *newDef1 = Production::cons( InputLoc(), + prodName, prodElList1, String(), false, 0, + prodList.length(), prodName->defList.length() ); + + prodName->defList.append( newDef1 ); + prodList.append( newDef1 ); + + /* Build the second production of the repeat. */ + ProdElList *prodElList2 = new ProdElList; + + Production *newDef2 = Production::cons( InputLoc(), + prodName, prodElList2, String(), false, 0, + prodList.length(), prodName->defList.length() ); + + prodName->defList.append( newDef2 ); + prodList.append( newDef2 ); + + return prodName; +} + +LangEl *Compiler::makeListProd( const InputLoc &loc, Namespace *nspace, + const String &listName, UniqueType *ut ) +{ + LangEl *prodName = addLangEl( this, nspace, listName, LangEl::NonTerm ); + prodName->isList = true; + + /* Build the first production of the list. */ + TypeRef *typeRef1 = TypeRef::cons( loc, ut ); + ProdEl *factor1 = new ProdEl( ProdEl::ReferenceType, InputLoc(), 0, false, typeRef1, 0 ); + + UniqueType *prodNameUT = findUniqueType( TYPE_TREE, prodName ); + TypeRef *typeRef2 = TypeRef::cons( loc, prodNameUT ); + ProdEl *factor2 = new ProdEl( ProdEl::ReferenceType, loc, 0, false, typeRef2, 0 ); + + ProdElList *prodElList1 = new ProdElList; + prodElList1->append( factor1 ); + prodElList1->append( factor2 ); + + Production *newDef1 = Production::cons( loc, + prodName, prodElList1, String(), false, 0, + prodList.length(), prodName->defList.length() ); + + prodName->defList.append( newDef1 ); + prodList.append( newDef1 ); + + /* Build the second production of the list. */ + TypeRef *typeRef3 = TypeRef::cons( loc, ut ); + ProdEl *factor3 = new ProdEl( ProdEl::ReferenceType, loc, 0, false, typeRef3, 0 ); + + ProdElList *prodElList2 = new ProdElList; + prodElList2->append( factor3 ); + + Production *newDef2 = Production::cons( loc, + prodName, prodElList2, String(), false, 0, + prodList.length(), prodName->defList.length() ); + + prodName->defList.append( newDef2 ); + prodList.append( newDef2 ); + + return prodName; +} + +LangEl *Compiler::makeOptProd( const InputLoc &loc, Namespace *nspace, + const String &optName, UniqueType *ut ) +{ + LangEl *prodName = addLangEl( this, nspace, optName, LangEl::NonTerm ); + prodName->isOpt = true; + + ProdElList *prodElList1 = new ProdElList; + + /* Build the first production of the repeat. */ + TypeRef *typeRef1 = TypeRef::cons( loc, ut ); + ProdEl *factor1 = new ProdEl( ProdEl::ReferenceType, loc, 0, false, typeRef1, 0 ); + prodElList1->append( factor1 ); + + Production *newDef1 = Production::cons( loc, + prodName, prodElList1, String(), false, 0, + prodList.length(), prodName->defList.length() ); + + prodName->defList.append( newDef1 ); + prodList.append( newDef1 ); + + /* Build the second production of the repeat. */ + ProdElList *prodElList2 = new ProdElList; + + Production *newDef2 = Production::cons( loc, + prodName, prodElList2, String(), false, 0, + prodList.length(), prodName->defList.length() ); + + prodName->defList.append( newDef2 ); + prodList.append( newDef2 ); + + return prodName; +} + +Namespace *Namespace::findNamespace( const String &name ) +{ + for ( NamespaceVect::Iter c = childNamespaces; c.lte(); c++ ) { + if ( strcmp( name, (*c)->name ) == 0 ) + return *c; + } + return 0; +} + +/* Search from a previously resolved qualification. (name 1+ in a qual list). */ +Namespace *NamespaceQual::searchFrom( Namespace *from, StringVect::Iter &qualPart ) +{ + /* While there are still parts in the qualification. */ + while ( qualPart.lte() ) { + Namespace *child = from->findNamespace( *qualPart ); + if ( child == 0 ) + return 0; + + from = child; + qualPart.increment(); + } + + return from; +} + +Namespace *NamespaceQual::getQual( Compiler *pd ) +{ + /* Do the search only once. */ + if ( cachedNspaceQual != 0 ) + return cachedNspaceQual; + + if ( qualNames.length() == 0 ) { + /* No qualification, use the region the qualification was + * declared in. */ + cachedNspaceQual = declInNspace; + } + else if ( strcmp( qualNames[0], "root" ) == 0 ) { + /* First item is "root." Start the downward search from there. */ + StringVect::Iter qualPart = qualNames; + qualPart.increment(); + cachedNspaceQual = searchFrom( pd->rootNamespace, qualPart ); + return cachedNspaceQual; + } + else { + /* Have a qualification. Move upwards through the declared + * regions looking for the first part. */ + StringVect::Iter qualPart = qualNames; + Namespace *parentNamespace = declInNspace; + while ( parentNamespace != 0 ) { + /* Search for the first part underneath the current parent. */ + Namespace *child = parentNamespace->findNamespace( *qualPart ); + + if ( child != 0 ) { + /* Found the first part. Start going below the result. */ + qualPart.increment(); + cachedNspaceQual = searchFrom( child, qualPart ); + return cachedNspaceQual; + } + + /* Not found, move up to the parent. */ + parentNamespace = parentNamespace->parentNamespace; + } + + /* Failed to find the place to start from. */ + cachedNspaceQual = 0; + } + + return cachedNspaceQual; +} + +void Compiler::initEmptyScanner( RegionSet *regionSet, TokenRegion *reg ) +{ + if ( reg != 0 && reg->impl->tokenInstanceList.length() == 0 ) { + reg->impl->wasEmpty = true; + + static int def = 1; + String name( 64, "__%p_DEF_PAT_%d", reg, def++ ); + + LexJoin *join = LexJoin::cons( LexExpression::cons( BT_Any ) ); + + TokenDef *tokenDef = TokenDef::cons( name, String(), false, false, + join, 0, internal, nextTokenId++, rootNamespace, + regionSet, 0, 0 ); + + TokenInstance *tokenInstance = TokenInstance::cons( tokenDef, + join, internal, nextTokenId++, + rootNamespace, reg ); + + reg->impl->tokenInstanceList.append( tokenInstance ); + + /* These do not go in the namespace so so they cannot get declared + * in the declare pass. */ + LangEl *lel = addLangEl( this, rootNamespace, name, LangEl::Term ); + + tokenInstance->tokenDef->tdLangEl = lel; + lel->tokenDef = tokenDef; + } +} + +void Compiler::initEmptyScanners() +{ + for ( RegionSetList::Iter regionSet = regionSetList; regionSet.lte(); regionSet++ ) { + initEmptyScanner( regionSet, regionSet->tokenIgnore ); + initEmptyScanner( regionSet, regionSet->tokenOnly ); + initEmptyScanner( regionSet, regionSet->ignoreOnly ); + initEmptyScanner( regionSet, regionSet->collectIgnore ); + } +} + +PdaRun *Compiler::parsePattern( Program *prg, Tree **sp, const InputLoc &loc, + int parserId, StreamImpl *sourceStream ) +{ + StreamImpl *in = newSourceStreamGeneric( "<internal>" ); + + PdaRun *pdaRun = new PdaRun; + initPdaRun( prg, pdaRun, pdaTables, parserId, 0, false, 0 ); + + Stream *res = streamAllocate( prg ); + res->id = LEL_ID_STREAM; + res->in = sourceStream; + in->funcs->appendStream( in, (Tree*)res ); + in->funcs->setEof( in ); + + long pcr = parseLoop( prg, sp, pdaRun, in, PcrStart ); + assert( pcr == PcrDone ); + if ( pdaRun->parseError ) { + cerr << ( loc.fileName != 0 ? loc.fileName : "<input>" ) << + ":" << loc.line << ":" << loc.col; + + if ( pdaRun->parseErrorText != 0 ) { + cerr << ": relative error: " << + pdaRun->parseErrorText->tokdata->data; + } + else { + cerr << ": parse error"; + } + + cerr << endl; + gblErrorCount += 1; + } + + return pdaRun; +} + + +void Compiler::parsePatterns() +{ + Program *prg = colm_new_program( runtimeData ); + + /* Turn off context-dependent parsing. */ + prg->ctxDepParsing = 0; + + Tree **sp = prg->stackRoot; + + for ( ConsList::Iter cons = replList; cons.lte(); cons++ ) { + StreamImpl *in = newSourceStreamCons( "<internal>", cons ); + cons->pdaRun = parsePattern( prg, sp, cons->loc, cons->langEl->parserId, in ); + } + + for ( PatList::Iter pat = patternList; pat.lte(); pat++ ) { + StreamImpl *in = newSourceStreamPat( "<internal>", pat ); + pat->pdaRun = parsePattern( prg, sp, pat->loc, pat->langEl->parserId, in ); + } + + /* Bail on above errors. */ + if ( gblErrorCount > 0 ) + exit(1); + + fillInPatterns( prg ); +} + +void Compiler::collectParserEls( BstSet<LangEl*> &parserEls ) +{ + for ( PatList::Iter pat = patternList; pat.lte(); pat++ ) { + /* We assume the reduction action compilation phase was run before + * pattern parsing and it decorated the pattern with the target type. */ + assert( pat->langEl != 0 ); + if ( pat->langEl->type != LangEl::NonTerm ) + error(pat->loc) << "pattern type is not a non-terminal" << endp; + + if ( pat->langEl->parserId < 0 ) { + /* Make a parser for the language element. */ + parserEls.insert( pat->langEl ); + pat->langEl->parserId = nextParserId++; + } + } + + for ( ConsList::Iter repl = replList; repl.lte(); repl++ ) { + /* We assume the reduction action compilation phase was run before + * replacement parsing decorated the replacement with the target type. */ + assert( repl->langEl != 0 ); + + if ( repl->langEl->parserId < 0 ) { + /* Make a parser for the language element. */ + parserEls.insert( repl->langEl ); + repl->langEl->parserId = nextParserId++; + } + } + + /* Make parsers that we need. */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->parserId >= 0 ) + parserEls.insert( lel ); + } +} + +void Compiler::generateOutput( long activeRealm ) +{ + FsmCodeGen *fsmGen = new FsmCodeGen( *outStream, redFsm, fsmTables ); + + PdaCodeGen *pdaGen = new PdaCodeGen( *outStream ); + + fsmGen->writeIncludes(); + pdaGen->defineRuntime(); + fsmGen->writeCode(); + + /* Make parsers that we need. */ + pdaGen->writeParserData( 0, pdaTables ); + + /* Write the runtime data. */ + pdaGen->writeRuntimeData( runtimeData, pdaTables ); + + if ( !gblLibrary ) + fsmGen->writeMain( activeRealm ); + + outStream->flush(); +} + + +void Compiler::prepGrammar() +{ + /* This will create language elements. */ + wrapNonTerminals(); + + makeLangElIds(); + makeLangElNames(); + makeDefinitionNames(); + noUndefindLangEls(); + + /* Put the language elements in an index by language element id. */ + langElIndex = new LangEl*[nextSymbolId+1]; + memset( langElIndex, 0, sizeof(LangEl*)*(nextSymbolId+1) ); + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) + langElIndex[lel->id] = lel; + + makeProdFsms(); + + /* Allocate the Runtime data now. Every PdaTable that we make + * will reference it, but it will be filled in after all the tables are + * built. */ + runtimeData = new RuntimeData; +} + +void Compiler::compile() +{ + beginProcessing(); + initKeyOps(); + + declarePass(); + + resolvePass(); + + makeTerminalWrappers(); + makeEofElements(); + + /* + * Parsers + */ + + /* Init the longest match data */ + initLongestMatchData(); + FsmGraph *fsmGraph = makeScanner(); + + prepGrammar(); + + initAllLanguageObjects(); + initAllFrameObjects(); + + for ( FunctionList::Iter f = functionList; f.lte(); f++ ) + initUserFunctions( f, f->isUserIter ); + + /* Compile bytecode. */ + compileByteCode(); + + /* Make the reduced fsm. */ + RedFsmBuild reduce( this, fsmGraph ); + redFsm = reduce.reduceMachine(); + + BstSet<LangEl*> parserEls; + collectParserEls( parserEls ); + + makeParser( parserEls ); + + /* Make the scanner tables. */ + fsmTables = redFsm->makeFsmTables(); + + /* Now that all parsers are built, make the global runtimeData. */ + makeRuntimeData(); + + /* + * All compilation is now complete. + */ + + /* Parse constructors and patterns. */ + parsePatterns(); +} + diff --git a/src/config.h b/src/config.h new file mode 100644 index 0000000..bedb903 --- /dev/null +++ b/src/config.h @@ -0,0 +1,72 @@ +/* src/config.h. Generated from config.h.in by configure. */ +/* src/config.h.in. Generated from configure.in by autoheader. */ + +/* enable debug statements */ +#define DEBUG 1 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "colm" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "colm" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "colm 0.12.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "colm" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.12.0" + +/* allocate pool objects with malloc */ +/* #undef POOL_MALLOC */ + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "0.12.0" diff --git a/src/config.h.in b/src/config.h.in new file mode 100644 index 0000000..a41b8a7 --- /dev/null +++ b/src/config.h.in @@ -0,0 +1,71 @@ +/* src/config.h.in. Generated from configure.in by autoheader. */ + +/* enable debug statements */ +#undef DEBUG + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* allocate pool objects with malloc */ +#undef POOL_MALLOC + +/* The size of `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION diff --git a/src/consinit.cc b/src/consinit.cc new file mode 100644 index 0000000..81d06e2 --- /dev/null +++ b/src/consinit.cc @@ -0,0 +1,856 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <iostream> +#include <errno.h> + +#include "parser.h" +#include "config.h" +#include "avltree.h" +#include "parsedata.h" +#include "parser.h" +#include "global.h" +#include "input.h" +#include "consinit.h" + +using std::cout; +using std::cerr; +using std::endl; + +LexTerm *rangeTerm( const char *low, const char *high ) +{ + Literal *lowLit = Literal::cons( internal, String( low ), Literal::LitString ); + Literal *highLit = Literal::cons( internal, String( high ), Literal::LitString ); + Range *range = Range::cons( lowLit, highLit ); + LexFactor *factor = LexFactor::cons( range ); + LexFactorNeg *factorNeg = LexFactorNeg::cons( factor ); + LexFactorRep *factorRep = LexFactorRep::cons( factorNeg ); + LexFactorAug *factorAug = LexFactorAug::cons( factorRep ); + LexTerm *term = LexTerm::cons( factorAug ); + return term; +} + +LexFactorNeg *litFactorNeg( const char *str ) +{ + Literal *lit = Literal::cons( internal, String( str ), Literal::LitString ); + LexFactor *factor = LexFactor::cons( lit ); + LexFactorNeg *factorNeg = LexFactorNeg::cons( factor ); + return factorNeg; +} + +LexFactorAug *litFactorAug( const char *str ) +{ + Literal *lit = Literal::cons( internal, String( str ), Literal::LitString ); + LexFactor *factor = LexFactor::cons( lit ); + LexFactorNeg *factorNeg = LexFactorNeg::cons( factor ); + LexFactorRep *factorRep = LexFactorRep::cons( factorNeg ); + LexFactorAug *factorAug = LexFactorAug::cons( factorRep ); + return factorAug; +} + +LexTerm *litTerm( const char *str ) +{ + Literal *lit = Literal::cons( internal, String( str ), Literal::LitString ); + LexFactor *factor = LexFactor::cons( lit ); + LexFactorNeg *factorNeg = LexFactorNeg::cons( factor ); + LexFactorRep *factorRep = LexFactorRep::cons( factorNeg ); + LexFactorAug *factorAug = LexFactorAug::cons( factorRep ); + LexTerm *term = LexTerm::cons( factorAug ); + return term; +} + +LexExpression *litExpr( const char *str ) +{ + LexTerm *term = litTerm( str ); + LexExpression *expr = LexExpression::cons( term ); + return expr; +} + +LexExpression *orExpr( LexTerm *term1, LexTerm *term2 ) +{ + LexExpression *expr1 = LexExpression::cons( term1 ); + return LexExpression::cons( expr1, term2, LexExpression::OrType ); +} + +LexExpression *orExpr( LexTerm *term1, LexTerm *term2, LexTerm *term3 ) +{ + LexExpression *expr1 = LexExpression::cons( term1 ); + LexExpression *expr2 = LexExpression::cons( expr1, term2, LexExpression::OrType ); + LexExpression *expr3 = LexExpression::cons( expr2, term3, LexExpression::OrType ); + return expr3; +} + +LexExpression *orExpr( LexTerm *term1, LexTerm *term2, LexTerm *term3, LexTerm *term4 ) +{ + LexExpression *expr1 = LexExpression::cons( term1 ); + LexExpression *expr2 = LexExpression::cons( expr1, term2, LexExpression::OrType ); + LexExpression *expr3 = LexExpression::cons( expr2, term3, LexExpression::OrType ); + LexExpression *expr4 = LexExpression::cons( expr3, term4, LexExpression::OrType ); + return expr4; +} + +LexExpression *orExpr( LexTerm *term1, LexTerm *term2, LexTerm *term3, + LexTerm *term4, LexTerm *term5, LexTerm *term6 ) +{ + LexExpression *expr1 = LexExpression::cons( term1 ); + LexExpression *expr2 = LexExpression::cons( expr1, term2, LexExpression::OrType ); + LexExpression *expr3 = LexExpression::cons( expr2, term3, LexExpression::OrType ); + LexExpression *expr4 = LexExpression::cons( expr3, term4, LexExpression::OrType ); + return expr4; +} + +LexFactorAug *starFactorAug( LexExpression *expr ) +{ + LexJoin *join = LexJoin::cons( expr ); + LexFactor *factor = LexFactor::cons( join ); + LexFactorNeg *factorNeg = LexFactorNeg::cons( factor ); + LexFactorRep *factorRep = LexFactorRep::cons( factorNeg ); + LexFactorRep *staredRep = LexFactorRep::cons( internal, factorRep, 0, 0, LexFactorRep::StarType ); + LexFactorAug *factorAug = LexFactorAug::cons( staredRep ); + return factorAug; +} + +LexFactorAug *starFactorAug( LexTerm *term ) +{ + LexExpression *expr = LexExpression::cons( term ); + return starFactorAug( expr ); +} + +LexFactorAug *starFactorAug( LexFactorAug *factorAug ) +{ + LexTerm *term = LexTerm::cons( factorAug ); + return starFactorAug( term ); +} + +LexFactorAug *plusFactorAug( LexExpression *expr ) +{ + LexJoin *join = LexJoin::cons( expr ); + LexFactor *factor = LexFactor::cons( join ); + LexFactorNeg *factorNeg = LexFactorNeg::cons( factor ); + LexFactorRep *factorRep = LexFactorRep::cons( factorNeg ); + LexFactorRep *staredRep = LexFactorRep::cons( internal, factorRep, 0, 0, LexFactorRep::PlusType ); + LexFactorAug *factorAug = LexFactorAug::cons( staredRep ); + return factorAug; +} + +LexTerm *concatTerm( LexFactorAug *fa1, LexFactorAug *fa2 ) +{ + LexTerm *term1 = LexTerm::cons( fa1 ); + LexTerm *term2 = LexTerm::cons( term1, fa2, LexTerm::ConcatType ); + return term2; +} + +LexTerm *concatTerm( LexFactorAug *fa1, LexFactorAug *fa2, LexFactorAug *fa3 ) +{ + LexTerm *term1 = LexTerm::cons( fa1 ); + LexTerm *term2 = LexTerm::cons( term1, fa2, LexTerm::ConcatType ); + LexTerm *term3 = LexTerm::cons( term2, fa3, LexTerm::ConcatType ); + return term3; +} + +LexFactorAug *parensFactorAug( LexExpression *expr ) +{ + LexJoin *join = LexJoin::cons( expr ); + LexFactor *factor = LexFactor::cons( join ); + LexFactorNeg *factorNeg = LexFactorNeg::cons( factor ); + LexFactorRep *factorRep = LexFactorRep::cons( factorNeg ); + LexFactorAug *factorAug = LexFactorAug::cons( factorRep ); + return factorAug; +} + +LexFactorNeg *parensFactorNeg( LexExpression *expr ) +{ + LexJoin *join = LexJoin::cons( expr ); + LexFactor *factor = LexFactor::cons( join ); + LexFactorNeg *factorNeg = LexFactorNeg::cons( factor ); + return factorNeg; +} + +LexFactorAug *parensFactorAug( LexTerm *term ) +{ + LexExpression *expr = LexExpression::cons( term ); + LexJoin *join = LexJoin::cons( expr ); + LexFactor *factor = LexFactor::cons( join ); + LexFactorNeg *factorNeg = LexFactorNeg::cons( factor ); + LexFactorRep *factorRep = LexFactorRep::cons( factorNeg ); + LexFactorAug *factorAug = LexFactorAug::cons( factorRep ); + return factorAug; +} + +LexFactorAug *charNegFactorAug( LexExpression *expr ) +{ + LexFactorNeg *factorNeg = parensFactorNeg( expr ); + LexFactorNeg *charNeg = LexFactorNeg::cons( factorNeg, LexFactorNeg::CharNegateType ); + LexFactorRep *factorRep = LexFactorRep::cons( charNeg ); + LexFactorAug *factorAug = LexFactorAug::cons( factorRep ); + return factorAug; +} + +LexTerm *charNegTerm( LexExpression *expr ) +{ + LexFactorAug *factorAug = charNegFactorAug( expr ); + LexTerm *term = LexTerm::cons( factorAug ); + return term; +} + +LexTerm *parensTerm( LexExpression *expr ) +{ + LexFactorAug *factorAug = parensFactorAug( expr ); + return LexTerm::cons( factorAug ); +} + +void ConsInit::wsIgnore() +{ + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, String(), pd->nextObjectId++ ); + + LexTerm *r1 = litTerm( "' '" ); + LexTerm *r2 = litTerm( "'\t'" ); + LexTerm *r3 = litTerm( "'\v'" ); + LexTerm *r4 = litTerm( "'\n'" ); + LexTerm *r5 = litTerm( "'\r'" ); + LexTerm *r6 = litTerm( "'\f'" ); + + LexExpression *whitespace = orExpr( r1, r2, r3, r4, r5, r6 ); + LexFactorAug *whitespaceRep = plusFactorAug( whitespace ); + + LexTerm *term = LexTerm::cons( whitespaceRep ); + LexExpression *expr = LexExpression::cons( term ); + LexJoin *join = LexJoin::cons( expr ); + + defineToken( internal, String(), join, objectDef, 0, true, false, false ); +} + +void ConsInit::commentIgnore() +{ + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, String(), pd->nextObjectId++ ); + + LexFactorAug *pound = litFactorAug( "'#'" ); + LexExpression *newline = litExpr( "'\\n'" ); + + LexFactorAug *commChars = charNegFactorAug( newline ); + LexFactorAug *restOfLine = starFactorAug( commChars ); + + LexFactorAug *termNewline = litFactorAug( "'\\n'" ); + + LexTerm *concat = concatTerm( pound, restOfLine, termNewline ); + LexExpression *expr = LexExpression::cons( concat ); + + LexJoin *join = LexJoin::cons( expr ); + + defineToken( internal, String(), join, objectDef, 0, true, false, false ); +} + +void ConsInit::idToken() +{ + String hello( "id" ); + + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, hello, pd->nextObjectId++ ); + + LexTerm *r1 = rangeTerm( "'a'", "'z'" ); + LexTerm *r2 = rangeTerm( "'A'", "'Z'" ); + LexTerm *r3 = litTerm( "'_'" ); + LexFactorAug *first = parensFactorAug( orExpr( r1, r2, r3 ) ); + + LexTerm *r4 = rangeTerm( "'a'", "'z'" ); + LexTerm *r5 = rangeTerm( "'A'", "'Z'" ); + LexTerm *r6 = litTerm( "'_'" ); + LexTerm *r7 = rangeTerm( "'0'", "'9'" ); + LexExpression *second = orExpr( r4, r5, r6, r7 ); + LexFactorAug *secondStar = starFactorAug( second ); + + LexTerm *concat = concatTerm( first, secondStar ); + + LexExpression *expr = LexExpression::cons( concat ); + LexJoin *join = LexJoin::cons( expr ); + + defineToken( internal, hello, join, objectDef, 0, false, false, false ); +} + +void ConsInit::literalToken() +{ + String hello( "literal" ); + + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, hello, pd->nextObjectId++ ); + + LexFactorAug *r1 = litFactorAug( "'\\''" ); + + /* [^'\\] */ + LexExpression *singleQuoteBackSlash = orExpr( + litTerm( "'\\''" ), + litTerm( "'\\\\'" ) ); + + LexTerm *freeChars = charNegTerm( singleQuoteBackSlash ); + + /* '\\' any */ + LexFactorAug *backSlash = litFactorAug( "'\\\\'" ); + LexExpression *any = LexExpression::cons( BT_Any ); + LexTerm *escape = concatTerm( backSlash, parensFactorAug( any ) ); + + /* Union and repeat. */ + LexExpression *charOrEscape = orExpr( freeChars, escape ); + LexFactorAug *r2 = starFactorAug( charOrEscape ); + + LexFactorAug *r3 = litFactorAug( "'\''" ); + + LexTerm *concat = concatTerm( r1, r2, r3 ); + LexExpression *expr = LexExpression::cons( concat ); + LexJoin *join = LexJoin::cons( expr ); + + defineToken( internal, hello, join, objectDef, 0, false, false, false ); +} + +void ConsInit::keyword( const String &name, const String &lit ) +{ + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ ); + LexTerm *term = litTerm( lit ); + LexExpression *expr = LexExpression::cons( term ); + LexJoin *join = LexJoin::cons( expr ); + defineToken( internal, name, join, objectDef, 0, false, false, false ); +} + +void ConsInit::keyword( const String &kw ) +{ + literalDef( internal, kw, false, false ); +} + +ProdEl *ConsInit::prodRefName( const String &name ) +{ + ProdEl *prodEl = prodElName( internal, name, + NamespaceQual::cons( curNspace() ), 0, + RepeatNone, false ); + return prodEl; +} + +ProdEl *ConsInit::prodRefName( const String &capture, const String &name ) +{ + ObjectField *captureField = ObjectField::cons( internal, 0, capture ); + ProdEl *prodEl = prodElName( internal, name, + NamespaceQual::cons( curNspace() ), captureField, + RepeatNone, false ); + return prodEl; +} + +ProdEl *ConsInit::prodRefNameRepeat( const String &name ) +{ + ProdEl *prodEl = prodElName( internal, name, + NamespaceQual::cons( curNspace() ), 0, + RepeatRepeat, false ); + return prodEl; +} + +ProdEl *ConsInit::prodRefNameRepeat( const String &capture, const String &name ) +{ + ObjectField *captureField = ObjectField::cons( internal, 0, capture ); + ProdEl *prodEl = prodElName( internal, name, + NamespaceQual::cons( curNspace() ), captureField, + RepeatRepeat, false ); + return prodEl; +} + +ProdEl *ConsInit::prodRefLit( const String &lit ) +{ + ProdEl *prodEl = prodElLiteral( internal, lit, + NamespaceQual::cons( curNspace() ), 0, + RepeatNone, false ); + return prodEl; +} + +Production *ConsInit::production() +{ + ProdElList *prodElList = new ProdElList; + return BaseParser::production( internal, prodElList, String(), false, 0, 0 ); +} + +Production *ConsInit::production( ProdEl *prodEl1 ) +{ + ProdElList *prodElList = new ProdElList; + appendProdEl( prodElList, prodEl1 ); + return BaseParser::production( internal, prodElList, String(), false, 0, 0 ); +} + +Production *ConsInit::production( ProdEl *prodEl1, ProdEl *prodEl2 ) +{ + ProdElList *prodElList = new ProdElList; + appendProdEl( prodElList, prodEl1 ); + appendProdEl( prodElList, prodEl2 ); + return BaseParser::production( internal, prodElList, String(), false, 0, 0 ); +} + +Production *ConsInit::production( ProdEl *prodEl1, ProdEl *prodEl2, + ProdEl *prodEl3 ) +{ + ProdElList *prodElList = new ProdElList; + appendProdEl( prodElList, prodEl1 ); + appendProdEl( prodElList, prodEl2 ); + appendProdEl( prodElList, prodEl3 ); + return BaseParser::production( internal, prodElList, String(), false, 0, 0 ); +} + +Production *ConsInit::production( ProdEl *prodEl1, ProdEl *prodEl2, + ProdEl *prodEl3, ProdEl *prodEl4 ) +{ + ProdElList *prodElList = new ProdElList; + appendProdEl( prodElList, prodEl1 ); + appendProdEl( prodElList, prodEl2 ); + appendProdEl( prodElList, prodEl3 ); + appendProdEl( prodElList, prodEl4 ); + return BaseParser::production( internal, prodElList, String(), false, 0, 0 ); +} + +Production *ConsInit::production( ProdEl *prodEl1, ProdEl *prodEl2, + ProdEl *prodEl3, ProdEl *prodEl4, ProdEl *prodEl5 ) +{ + ProdElList *prodElList = new ProdElList; + appendProdEl( prodElList, prodEl1 ); + appendProdEl( prodElList, prodEl2 ); + appendProdEl( prodElList, prodEl3 ); + appendProdEl( prodElList, prodEl4 ); + appendProdEl( prodElList, prodEl5 ); + return BaseParser::production( internal, prodElList, String(), false, 0, 0 ); +} + +Production *ConsInit::production( ProdEl *prodEl1, ProdEl *prodEl2, + ProdEl *prodEl3, ProdEl *prodEl4, ProdEl *prodEl5, + ProdEl *prodEl6, ProdEl *prodEl7 ) +{ + ProdElList *prodElList = new ProdElList; + appendProdEl( prodElList, prodEl1 ); + appendProdEl( prodElList, prodEl2 ); + appendProdEl( prodElList, prodEl3 ); + appendProdEl( prodElList, prodEl4 ); + appendProdEl( prodElList, prodEl5 ); + appendProdEl( prodElList, prodEl6 ); + appendProdEl( prodElList, prodEl7 ); + return BaseParser::production( internal, prodElList, String(), false, 0, 0 ); +} + +void ConsInit::definition( const String &name, Production *prod1, Production *prod2, + Production *prod3, Production *prod4 ) +{ + LelDefList *defList = new LelDefList; + prodAppend( defList, prod1 ); + prodAppend( defList, prod2 ); + prodAppend( defList, prod3 ); + prodAppend( defList, prod4 ); + + NtDef *ntDef = NtDef::cons( name, curNspace(), curContext(), false ); + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ ); + cflDef( ntDef, objectDef, defList ); +} + +void ConsInit::definition( const String &name, Production *prod1, Production *prod2, Production *prod3 ) +{ + LelDefList *defList = new LelDefList; + prodAppend( defList, prod1 ); + prodAppend( defList, prod2 ); + prodAppend( defList, prod3 ); + + NtDef *ntDef = NtDef::cons( name, curNspace(), curContext(), false ); + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ ); + cflDef( ntDef, objectDef, defList ); +} + +void ConsInit::definition( const String &name, Production *prod1, Production *prod2 ) +{ + LelDefList *defList = new LelDefList; + prodAppend( defList, prod1 ); + prodAppend( defList, prod2 ); + + NtDef *ntDef = NtDef::cons( name, curNspace(), curContext(), false ); + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ ); + cflDef( ntDef, objectDef, defList ); +} + +void ConsInit::definition( const String &name, Production *prod ) +{ + LelDefList *defList = new LelDefList; + prodAppend( defList, prod ); + + NtDef *ntDef = NtDef::cons( name, curNspace(), curContext(), false ); + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ ); + cflDef( ntDef, objectDef, defList ); +} + +void ConsInit::lexFactor() +{ + ProdEl *prodEl1 = prodRefName( "Literal", "literal" ); + Production *prod1 = production( prodEl1 ); + + ProdEl *prodEl8 = prodRefName( "Id", "id" ); + Production *prod4 = production( prodEl8 ); + + ProdEl *prodEl2 = prodRefLit( "'('" ); + ProdEl *prodEl3 = prodRefName( "Expr", "lex_expr" ); + ProdEl *prodEl4 = prodRefLit( "')'" ); + Production *prod2 = production( prodEl2, prodEl3, prodEl4 ); + + ProdEl *prodEl5 = prodRefName( "Low", "literal" ); + ProdEl *prodEl6 = prodRefLit( "'..'" ); + ProdEl *prodEl7 = prodRefName( "High", "literal" ); + Production *prod3 = production( prodEl5, prodEl6, prodEl7 ); + + definition( "lex_factor", prod1, prod2, prod3, prod4 ); +} + +void ConsInit::lexFactorNeg() +{ + ProdEl *prodEl1 = prodRefLit( "'^'" ); + ProdEl *prodEl2 = prodRefName( "FactorNeg", "lex_factor_neg" ); + Production *prod1 = production( prodEl1, prodEl2 ); + + ProdEl *prodEl3 = prodRefName( "Factor", "lex_factor" ); + Production *prod2 = production( prodEl3 ); + + definition( "lex_factor_neg", prod1, prod2 ); +} + +void ConsInit::lexFactorRep() +{ + ProdEl *prodEl1 = prodRefName( "FactorRep", "lex_factor_rep" ); + ProdEl *prodEl2 = prodRefName( "Star", "STAR" ); + Production *prod1 = production( prodEl1, prodEl2 ); + + ProdEl *prodEl3 = prodRefName( "FactorRep", "lex_factor_rep" ); + ProdEl *prodEl4 = prodRefName( "Plus", "PLUS" ); + Production *prod2 = production( prodEl3, prodEl4 ); + + ProdEl *prodEl5 = prodRefName( "FactorNeg", "lex_factor_neg" ); + Production *prod3 = production( prodEl5 ); + + definition( "lex_factor_rep", prod1, prod2, prod3 ); +} + +void ConsInit::lexTerm() +{ + ProdEl *prodEl1 = prodRefName( "Term", "lex_term" ); + ProdEl *prodEl2 = prodRefLit( "'.'" ); + ProdEl *prodEl3 = prodRefName( "FactorRep", "lex_factor_rep" ); + Production *prod1 = production( prodEl1, prodEl2, prodEl3 ); + + ProdEl *prodEl4 = prodRefName( "FactorRep", "lex_factor_rep" ); + Production *prod2 = production( prodEl4 ); + + definition( "lex_term", prod1, prod2 ); +} + +void ConsInit::lexExpr() +{ + ProdEl *prodEl1 = prodRefName( "Expr", "lex_expr" ); + ProdEl *prodEl2 = prodRefLit( "'|'" ); + ProdEl *prodEl3 = prodRefName( "Term", "lex_term" ); + Production *prod1 = production( prodEl1, prodEl2, prodEl3 ); + + ProdEl *prodEl4 = prodRefName( "Term", "lex_term" ); + Production *prod2 = production( prodEl4 ); + + definition( "lex_expr", prod1, prod2 ); +} + +void ConsInit::token() +{ + ProdEl *prodEl1 = prodRefLit( "'token'" ); + ProdEl *prodEl2 = prodRefName( "Id", "id" ); + ProdEl *prodEl3 = prodRefName( "LeftNi", "opt_ni" ); + ProdEl *prodEl4 = prodRefLit( "'/'" ); + ProdEl *prodEl5 = prodRefName( "Expr", "lex_expr" ); + ProdEl *prodEl6 = prodRefLit( "'/'" ); + ProdEl *prodEl7 = prodRefName( "RightNi", "opt_ni" ); + Production *prod1 = production( prodEl1, prodEl2, prodEl3, + prodEl4, prodEl5, prodEl6, prodEl7 ); + definition( "token_def", prod1 ); +} + +void ConsInit::ignore() +{ + ProdEl *prodEl1 = prodRefLit( "'ignore'" ); + ProdEl *prodEl2 = prodRefLit( "'/'" ); + ProdEl *prodEl3 = prodRefName( "Expr", "lex_expr" ); + ProdEl *prodEl4 = prodRefLit( "'/'" ); + Production *prod1 = production( prodEl1, prodEl2, prodEl3, prodEl4 ); + definition( "ignore_def", prod1 ); +} + +void ConsInit::tokenList() +{ + ProdEl *prodEl1 = prodRefName( "TokenList", "token_list" ); + ProdEl *prodEl2 = prodRefName( "TokenDef", "token_def" ); + Production *prod1 = production( prodEl1, prodEl2 ); + + ProdEl *prodEl3 = prodRefName( "TokenList", "token_list" ); + ProdEl *prodEl4 = prodRefName( "IgnoreDef", "ignore_def" ); + Production *prod2 = production( prodEl3, prodEl4 ); + + Production *prod3 = production(); + + definition( "token_list", prod1, prod2, prod3 ); +} + +Production *ConsInit::prodLex() +{ + ProdEl *prodEl1 = prodRefLit( "'lex'" ); + ProdEl *prodEl2 = prodRefName( "TokenList", "token_list" ); + ProdEl *prodEl3 = prodRefLit( "'end'" ); + + return production( prodEl1, prodEl2, prodEl3 ); +} + +void ConsInit::optProdElName() +{ + ProdEl *prodEl1 = prodRefName( "Name", "id" ); + ProdEl *prodEl2 = prodRefLit( "':'" ); + Production *prod1 = production( prodEl1, prodEl2 ); + + Production *prod2 = production(); + + definition( "opt_prod_el_name", prod1, prod2 ); +} + +void ConsInit::optNi() +{ + ProdEl *prodEl1 = prodRefName( "Ni", "NI" ); + Production *prod1 = production( prodEl1 ); + + Production *prod2 = production(); + + definition( "opt_ni", prod1, prod2 ); +} + +void ConsInit::optRepeat() +{ + ProdEl *prodEl1 = prodRefName( "Star", "STAR" ); + Production *prod1 = production( prodEl1 ); + + Production *prod2 = production(); + + definition( "opt_prod_repeat", prod1, prod2 ); +} + +void ConsInit::prodEl() +{ + ProdEl *prodEl1 = prodRefName( "OptName", "opt_prod_el_name" ); + ProdEl *prodEl2 = prodRefName( "Id", "id" ); + ProdEl *prodEl3 = prodRefName( "OptRepeat", "opt_prod_repeat" ); + Production *prod1 = production( prodEl1, prodEl2, prodEl3 ); + + definition( "prod_el", prod1 ); +} + +void ConsInit::prodElList() +{ + ProdEl *prodEl1 = prodRefName( "ProdElList", "prod_el_list" ); + ProdEl *prodEl2 = prodRefName( "ProdEl", "prod_el" ); + Production *prod1 = production( prodEl1, prodEl2 ); + + Production *prod2 = production(); + + definition( "prod_el_list", prod1, prod2 ); +} + +void ConsInit::optCommit() +{ + ProdEl *prodEl1 = prodRefName( "Commit", "COMMIT" ); + Production *prod1 = production( prodEl1 ); + + Production *prod2 = production(); + + definition( "opt_commit", prod1, prod2 ); +} + +void ConsInit::optProdName() +{ + ProdEl *prodEl1 = prodRefLit( "':'" ); + ProdEl *prodEl2 = prodRefName( "Name", "id" ); + Production *prod1 = production( prodEl1, prodEl2 ); + + Production *prod2 = production(); + + definition( "opt_prod_name", prod1, prod2 ); +} + +void ConsInit::prod() +{ + ProdEl *prodEl1 = prodRefLit( "'['" ); + ProdEl *prodEl2 = prodRefName( "ProdElList", "prod_el_list" ); + ProdEl *prodEl3 = prodRefLit( "']'" ); + ProdEl *prodEl4 = prodRefName( "OptName", "opt_prod_name" ); + ProdEl *prodEl5 = prodRefName( "OptCommit", "opt_commit" ); + Production *prod1 = production( prodEl1, prodEl2, prodEl3, prodEl4, prodEl5 ); + + definition( "prod", prod1 ); +} + +void ConsInit::prodList() +{ + ProdEl *prodEl1 = prodRefName( "ProdList", "prod_list" ); + ProdEl *prodEl2 = prodRefLit( "'|'" ); + ProdEl *prodEl3 = prodRefName( "Prod", "prod" ); + Production *prod1 = production( prodEl1, prodEl2, prodEl3 ); + + ProdEl *prodEl4 = prodRefName( "Prod", "prod" ); + Production *prod2 = production( prodEl4 ); + + definition( "prod_list", prod1, prod2 ); +} + +Production *ConsInit::prodProd() +{ + ProdEl *prodEl1 = prodRefLit( "'def'" ); + ProdEl *prodEl2 = prodRefName( "DefId", "id" ); + ProdEl *prodEl3 = prodRefName( "ProdList", "prod_list" ); + + return production( prodEl1, prodEl2, prodEl3 ); +} + +void ConsInit::item() +{ + Production *prod1 = prodLex(); + Production *prod2 = prodProd(); + definition( "item", prod1, prod2 ); +} + +void ConsInit::startProd() +{ + ProdEl *prodEl1 = prodRefNameRepeat( "ItemList", "item" ); + Production *prod1 = production( prodEl1 ); + + definition( "start", prod1 ); +} + +void ConsInit::parseInput( StmtList *stmtList ) +{ + /* Parse the "start" def. */ + NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() ); + TypeRef *typeRef = TypeRef::cons( internal, nspaceQual, String("start"), RepeatNone ); + + /* Pop argv, this yields the file name . */ + CallArgVect *popArgs = new CallArgVect; + QualItemVect *popQual = new QualItemVect; + popQual->append( QualItem( QualItem::Dot, internal, String( "argv" ) ) ); + + LangVarRef *popRef = LangVarRef::cons( internal, + 0, curLocalFrame->rootScope, popQual, String("pop") ); + LangExpr *pop = LangExpr::cons( LangTerm::cons( InputLoc(), popRef, popArgs ) ); + + /* Construct a literal string 'r', for second arg to open. */ + ConsItem *modeConsItem = ConsItem::cons( internal, ConsItem::InputText, String("r") ); + ConsItemList *modeCons = new ConsItemList; + modeCons->append( modeConsItem ); + LangExpr *modeExpr = LangExpr::cons( LangTerm::cons( internal, modeCons ) ); + + /* Call open. */ + QualItemVect *openQual = new QualItemVect; + LangVarRef *openRef = LangVarRef::cons( internal, + 0, curLocalFrame->rootScope, openQual, String("open") ); + CallArgVect *openArgs = new CallArgVect; + openArgs->append( new CallArg(pop) ); + openArgs->append( new CallArg(modeExpr) ); + LangExpr *open = LangExpr::cons( LangTerm::cons( InputLoc(), openRef, openArgs ) ); + + /* Construct a list containing the open stream. */ + ConsItem *consItem = ConsItem::cons( internal, ConsItem::ExprType, open ); + ConsItemList *list = ConsItemList::cons( consItem ); + + /* Will capture the parser to "P" */ + ObjectField *objField = ObjectField::cons( internal, 0, String("P") ); + + /* Parse the above list. */ + LangExpr *parseExpr = parseCmd( internal, false, objField, typeRef, 0, list ); + LangStmt *parseStmt = LangStmt::cons( internal, LangStmt::ExprType, parseExpr ); + stmtList->append( parseStmt ); +} + +void ConsInit::exportTree( StmtList *stmtList ) +{ + QualItemVect *qual = new QualItemVect; + LangVarRef *varRef = LangVarRef::cons( internal, 0, curLocalFrame->rootScope, qual, String("P") ); + LangExpr *expr = LangExpr::cons( LangTerm::cons( internal, LangTerm::VarRefType, varRef ) ); + + NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() ); + TypeRef *typeRef = TypeRef::cons( internal, nspaceQual, String("start"), RepeatNone ); + ObjectField *program = ObjectField::cons( internal, typeRef, String("ColmTree") ); + LangStmt *programExport = exportStmt( program, LangStmt::AssignType, expr ); + stmtList->append( programExport ); +} + +void ConsInit::go( long activeRealm ) +{ + ConsInit::init(); + + StmtList *stmtList = new StmtList; + + /* The token region */ + pushRegionSet( internal ); + + wsIgnore(); + commentIgnore(); + + keyword( "'def'" ); + keyword( "'lex'" ); + keyword( "'end'" ); + keyword( "'token'" ); + keyword( "'ignore'" ); + keyword( "NI", "'ni'" ); + keyword( "COMMIT", "'commit'" ); + + idToken(); + literalToken(); + + keyword( "STAR", "'*'"); + keyword( "PLUS", "'+'"); + keyword( "'['" ); + keyword( "']'" ); + keyword( "'|'" ); + keyword( "'/'" ); + keyword( "':'" ); + keyword( "'.'" ); + keyword( "'('" ); + keyword( "')'" ); + keyword( "'..'" ); + keyword( "'^'" ); + + popRegionSet(); + + lexFactor(); + lexFactorNeg(); + lexFactorRep(); + lexTerm(); + lexExpr(); + + optNi(); + optRepeat(); + optProdElName(); + prodEl(); + prodElList(); + optCommit(); + optProdName(); + prod(); + prodList(); + ignore(); + token(); + tokenList(); + item(); + startProd(); + + parseInput( stmtList ); + exportTree( stmtList ); + + pd->rootCodeBlock = CodeBlock::cons( stmtList, 0 ); +} diff --git a/src/consinit.h b/src/consinit.h new file mode 100644 index 0000000..093f75a --- /dev/null +++ b/src/consinit.h @@ -0,0 +1,103 @@ +/* + * Copyright 2013 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <iostream> +#include "avltree.h" +#include "parsedata.h" +#include "parser.h" + +struct ConsInit +: + public BaseParser +{ + ConsInit( Compiler *pd ) + : + BaseParser(pd) + {} + + ProdEl *prodRefName( const String &name ); + ProdEl *prodRefName( const String &capture, const String &name ); + ProdEl *prodRefNameRepeat( const String &name ); + ProdEl *prodRefNameRepeat( const String &capture, const String &name ); + ProdEl *prodRefLit( const String &lit ); + + Production *production(); + Production *production( ProdEl *prodEl1 ); + Production *production( ProdEl *prodEl1, ProdEl *prodEl2 ); + Production *production( ProdEl *prodEl1, ProdEl *prodEl2, + ProdEl *prodEl3 ); + Production *production( ProdEl *prodEl1, ProdEl *prodEl2, + ProdEl *prodEl3, ProdEl *prodEl4 ); + Production *production( ProdEl *prodEl1, ProdEl *prodEl2, + ProdEl *prodEl3, ProdEl *prodEl4, ProdEl *prodEl5 ); + Production *production( ProdEl *prodEl1, ProdEl *prodEl2, + ProdEl *prodEl3, ProdEl *prodEl4, ProdEl *prodEl5, + ProdEl *prodEl6, ProdEl *prodEl7 ); + + void definition( const String &name, Production *prod ); + void definition( const String &name, Production *prod1, Production *prod2 ); + void definition( const String &name, Production *prod1, Production *prod2, Production *prod3 ); + void definition( const String &name, Production *prod1, Production *prod2, + Production *prod3, Production *prod4 ); + + void keyword( const String &name, const String &lit ); + void keyword( const String &kw ); + + void printParseTree( StmtList *stmtList ); + void printParseTree(); + + void literalToken(); + void commentIgnore(); + void wsIgnore(); + void idToken(); + + void token(); + void ignore(); + void tokenList(); + + void lexFactor(); + void lexFactorNeg(); + void lexFactorRep(); + void lexExpr(); + void lexTerm(); + + Production *prodProd(); + Production *prodLex(); + + void optNi(); + void optRepeat(); + void optProdElName(); + void prodEl(); + void prodElList(); + void item(); + void prodList(); + void optProdName(); + void prod(); + void startProd(); + void optCommit(); + + void parseInput( StmtList *stmtList ); + void exportTree( StmtList *stmtList ); + + virtual void go( long activeRealm ); +}; + + diff --git a/src/cstring.h b/src/cstring.h new file mode 100644 index 0000000..a59ebe3 --- /dev/null +++ b/src/cstring.h @@ -0,0 +1,861 @@ +/* + * Copyright 2002 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Aapl. + * + * Aapl is free software; you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * Aapl 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 Lesser General Public License for + * more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Aapl; if not, write to the Free Software Foundation, Inc., 59 + * Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _AAPL_ASTRING_H +#define _AAPL_ASTRING_H + +#include <new> +#include <stdlib.h> +#include <stdarg.h> +#include <stdio.h> +#include <string.h> +#include <iostream> +#include <assert.h> + +#include "tree.h" + +struct colm_data; + +#ifdef AAPL_NAMESPACE +namespace Aapl { +#endif + +#ifdef AAPL_DOCUMENTATION + +/** + * \defgroup astring String + * \brief Implicitly shared copy-on-write string. + * + * @{ + */ + +/** + * \class String + * \brief Implicitly shared copy-on-write string. + */ + +/*@}*/ + +class String +{ +public: + /** + * \brief Create a null string. Data points to NULL. + */ + String(); + + /** + * \brief Construct a string from a c-style string. + * + * A new buffer is allocated for the c string. Initially, this string will + * be the only String class referencing the data. + */ + String( const char *s ); + + /** + * \brief Construct a string from a c-style string of specific length. + * + * A new buffer is allocated for the c string. Initially, this string will + * be the only String class referencing the data. + */ + String( const char *s, long len ); + + /** + * \brief Construct a string from another String. + * + * A refernce to the buffer allocated for s is taken. A new buffer is + * not allocated. + */ + String( const String &s ); + + /** + * \brief Construct a string using snprintf. + * + * Requires a maximum length for the resulting string. If the formatting + * (not including trailing null) requires more space than maxLen, the + * result will be truncated to maxLen long. Only the length actually + * written will be used by the new string. This string will be the only + * String class referencing the data. + */ + String( long maxLen, const char *format, ... ) + + /** + * \brief Clean up the string. + * + * If the string is not null, the referenced data is detached. If no other + * string refernces the detached data, it is deleted. + */ + ~String(); + + /** + * \brief Set the string from a c-style string. + * + * If this string is not null, the current buffer is dereferenced and + * possibly deleted. A new buffer is allocated (or possibly the old buffer + * reused) for the string. Initially, this string will be the only String + * class referencing the data. + * + * If s is null, then this string becomes a null ptr. + * + * \returns A reference to this. + */ + String &operator=( const char *s ); + + /** + * \brief Set the string from a c-style of specific length. + * + * If this string is not null, the current buffer is dereferenced and + * possibly deleted. A new buffer is allocated (or possibly the old buffer + * reused) for the string. Initially, this string will be the only String + * class referencing the data. + * + * If s is null, then this string becomes a null ptr. + * + * \returns A reference to this. + */ + void setAs( const char *s, long len ); + + /** + * \brief Set the string from a single char. + * + * The current buffer is dereferenced and possibly deleted. A new buffer + * is allocated (or possibly the old buffer reused) for the string. + * Initially, this string will be the only String class referencing the + * data. + * + * If s is null, then this string becomes a null ptr. + * + * \returns A reference to this. + */ + String &operator=( const char c ); + + + /** + * \brief Set the string from another String. + * + * If this string is not null, the current buffer is dereferenced and + * possibly deleted. A reference to the buffer allocated for s is taken. + * A new buffer is not allocated. + * + * If s is null, then this string becomes a null ptr. + * + * \returns a reference to this. + */ + String &operator=( const String &s ); + + /** + * \brief Append a c string to the end of this string. + * + * If this string shares its allocation with another, a copy is first + * taken. The buffer for this string is grown and s is appended to the + * end. + * + * If s is null nothing happens. + * + * \returns a reference to this. + */ + String &operator+=( const char *s ); + + /** + * \brief Append a c string of specific length to the end of this string. + * + * If this string shares its allocation with another, a copy is first + * taken. The buffer for this string is grown and s is appended to the + * end. + * + * If s is null nothing happens. + * + * \returns a reference to this. + */ + void append( const char *s, long len ); + + /** + * \brief Append a single char to the end of this string. + * + * If this string shares its allocation with another, a copy is first + * taken. The buffer for this string is grown and s is appended to the + * end. + * + * \returns a reference to this. + */ + String &operator+=( const char c ); + + /** + * \brief Append a String to the end of this string. + * + * If this string shares its allocation with another, a copy is first + * taken. The buffer for this string is grown and the data of s is + * appeneded to the end. + * + * If s is null nothing happens. + * + * returns a reference to this. + */ + String &operator+=( const String &s ); + + /** + * \brief Cast to a char star. + * + * \returns the string data. A null string returns 0. + */ + operator char*() const; + + /** + * \brief Get a pointer to the data. + * + * \returns the string Data + */ + char *get() const; + + /** + * \brief Get the length of the string + * + * If the string is null, then undefined behaviour results. + * + * \returns the length of the string. + */ + long length() const; + + /** + * \brief Pointer to the data. + * + * Publically accessible pointer to the data. Immediately in front of the + * string data block is the string header which stores the refcount and + * length. Consequently, care should be taken if modifying this pointer. + */ + char *data; +}; + +/** + * \relates String + * \brief Concatenate a c-style string and a String. + * + * \returns The concatenation of the two strings in a String. + */ +String operator+( const String &s1, const char *s2 ); + +/** + * \relates String + * \brief Concatenate a String and a c-style string. + * + * \returns The concatenation of the two strings in a String. + */ +String operator+( const char *s1, const String &s2 ); + +/** + * \relates String + * \brief Concatenate two String classes. + * + * \returns The concatenation of the two strings in a String. + */ +String operator+( const String &s1, const String &s2 ); + +#endif + +template<class T> class StrTmpl +{ +public: + class Fresh {}; + + /* Header located just before string data. Keeps the length and a refcount on + * the data. */ + struct Head + { + long refCount; + long length; + }; + + /** + * \brief Create a null string. + */ + StrTmpl() : data(0) { } + + /* Clean up the string. */ + ~StrTmpl(); + + /* Construct a string from a c-style string. */ + StrTmpl( const char *s ); + + /* Construct a string from a c-style string of specific len. */ + StrTmpl( const char *s, long len ); + + /* Allocate len spaces. */ + StrTmpl( const Fresh &, long len ); + + /* Construct a string from another StrTmpl. */ + StrTmpl( const StrTmpl &s ); + + /* Construct a string from with, sprintf. */ + StrTmpl( long lenGuess, const char *format, ... ); + + /* Construct a string from with, sprintf. */ + StrTmpl( const colm_data *cd ); + + /* Set the string from a c-style string. */ + StrTmpl &operator=( const char *s ); + + /* Set the string from a c-style string of specific len. */ + void setAs( const char *s, long len ); + + /* Allocate len spaces. */ + void setAs( const Fresh &, long len ); + + void chop( long len ); + + /* Construct a string from with, sprintf. */ + void setAs( long lenGuess, const char *format, ... ); + + /* Set the string from a single char. */ + StrTmpl &operator=( const char c ); + + /* Set the string from another StrTmpl. */ + StrTmpl &operator=( const StrTmpl &s ); + + /* Append a c string to the end of this string. */ + StrTmpl &operator+=( const char *s ); + + /* Append a c string to the end of this string of specifi len. */ + void append( const char *s, long len ); + + /* Append a single char to the end of this string. */ + StrTmpl &operator+=( const char c ); + + /* Append an StrTmpl to the end of this string. */ + StrTmpl &operator+=( const StrTmpl &s ); + + /* Cast to a char star. */ + operator char*() const { return data; } + + /* Get a pointer to the data. */ + char *get() const { return data; } + + /* Return the length of the string. Must check for null data pointer. */ + long length() const { return data ? (((Head*)data)-1)->length : 0; } + + /** + * \brief Pointer to the data. + */ + char *data; + +protected: + /* Make space for a string of length len to be appended. */ + char *appendSpace( long len ); + void initSpace( long length ); + void setSpace( long length ); + + template <class FT> friend StrTmpl<FT> operator+( + const StrTmpl<FT> &s1, const char *s2 ); + template <class FT> friend StrTmpl<FT> operator+( + const char *s1, const StrTmpl<FT> &s2 ); + template <class FT> friend StrTmpl<FT> operator+( + const StrTmpl<FT> &s1, const StrTmpl<FT> &s2 ); + +private: + /* A dummy struct solely to make a constructor that will never be + * ambiguous with the public constructors. */ + struct DisAmbig { }; + StrTmpl( char *data, const DisAmbig & ) : data(data) { } +}; + +/* Free all mem used by the string. */ +template<class T> StrTmpl<T>::~StrTmpl() +{ + if ( data != 0 ) { + /* If we are the only ones referencing the string, then delete it. */ + Head *head = ((Head*) data) - 1; + head->refCount -= 1; + if ( head->refCount == 0 ) + free( head ); + } +} + +/* Create from a c-style string. */ +template<class T> StrTmpl<T>::StrTmpl( const char *s ) +{ + if ( s == 0 ) + data = 0; + else { + /* Find the length and allocate the space for the shared string. */ + long length = strlen( s ); + + /* Init space for the data. */ + initSpace( length ); + + /* Copy in the data. */ + memcpy( data, s, length+1 ); + } +} + +/* Create from a c-style string. */ +template<class T> StrTmpl<T>::StrTmpl( const char *s, long length ) +{ + if ( s == 0 ) + data = 0; + else { + /* Init space for the data. */ + initSpace( length ); + + /* Copy in the data. */ + memcpy( data, s, length ); + data[length] = 0; + } +} + +/* Create from a c-style string. */ +template<class T> StrTmpl<T>::StrTmpl( const Fresh &, long length ) +{ + /* Init space for the data. */ + initSpace( length ); + data[length] = 0; +} + +/* Create from another string class. */ +template<class T> StrTmpl<T>::StrTmpl( const StrTmpl &s ) +{ + if ( s.data == 0 ) + data = 0; + else { + /* Take a reference to the string. */ + Head *strHead = ((Head*)s.data) - 1; + strHead->refCount += 1; + data = (char*) (strHead+1); + } +} + +/* Construct a string from with, sprintf. */ +template<class T> StrTmpl<T>::StrTmpl( long lenGuess, const char *format, ... ) +{ + /* Set the string for len. */ + initSpace( lenGuess ); + + va_list args; + + va_start( args, format ); + long written = vsnprintf( data, lenGuess+1, format, args ); + va_end( args ); + + if ( written > lenGuess ) { + setSpace( written ); + va_start( args, format ); + written = vsnprintf( data, written+1, format, args ); + va_end( args ); + } + chop( written ); + + va_end( args ); +} + +/* Create from another string class. */ +template<class T> StrTmpl<T>::StrTmpl( const colm_data *cd ) +{ + if ( cd->data == 0 ) + data = 0; + else { + /* Init space for the data. */ + initSpace( cd->length ); + + /* Copy in the data. */ + memcpy( data, cd->data, cd->length ); + data[cd->length] = 0; + } +} + + + +/* Construct a string from with, sprintf. */ +template<class T> void StrTmpl<T>::setAs( long lenGuess, const char *format, ... ) +{ + /* Set the string for len. */ + setSpace( lenGuess ); + + va_list args; + + /* Write to the temporary buffer. */ + va_start( args, format ); + + long written = vsnprintf( data, lenGuess+1, format, args ); + if ( written > lenGuess ) { + setSpace( written ); + written = vsnprintf( data, written+1, format, args ); + } + chop( written ); + + va_end( args ); +} + +template<class T> void StrTmpl<T>::initSpace( long length ) +{ + /* Find the length and allocate the space for the shared string. */ + Head *head = (Head*) malloc( sizeof(Head) + length+1 ); + if ( head == 0 ) + throw std::bad_alloc(); + + /* Init the header. */ + head->refCount = 1; + head->length = length; + + /* Save the pointer to the data. */ + data = (char*) (head+1); +} + + +/* Set this string to be the c string exactly. The old string is discarded. + * Returns a reference to this. */ +template<class T> StrTmpl<T> &StrTmpl<T>::operator=( const char *s ) +{ + if ( s == 0 ) { + /* Just free the data, we are being set to null. */ + if ( data != 0 ) { + Head *head = ((Head*)data) - 1; + head->refCount -= 1; + if ( head->refCount == 0 ) + free(head); + data = 0; + } + } + else { + /* Find the length of the string we are setting. */ + long length = strlen( s ); + + /* Set the string for len. */ + setSpace( length ); + + /* Copy in the data. */ + memcpy( data, s, length+1 ); + } + return *this; +} + +/* Set this string to be the c string exactly. The old string is discarded. + * Returns a reference to this. */ +template<class T> void StrTmpl<T>::setAs( const char *s, long length ) +{ + if ( s == 0 ) { + /* Just free the data, we are being set to null. */ + if ( data != 0 ) { + Head *head = ((Head*)data) - 1; + head->refCount -= 1; + if ( head->refCount == 0 ) + free(head); + data = 0; + } + } + else { + /* Set the string for len. */ + setSpace( length ); + + /* Copy in the data. */ + memcpy( data, s, length ); + data[length] = 0; + } +} + +template<class T> void StrTmpl<T>::chop( long length ) +{ + Head *head = ((Head*)data) - 1; + assert( head->refCount == 1 ); + assert( length <= head->length ); + head->length = length; + data[length] = 0; +} + +/* Set this string to be the c string exactly. The old string is discarded. + * Returns a reference to this. */ +template<class T> void StrTmpl<T>::setAs( const Fresh &, long length ) +{ + setSpace( length ); + data[length] = 0; +} + +/* Set this string to be the single char exactly. The old string is discarded. + * Returns a reference to this. */ +template<class T> StrTmpl<T> &StrTmpl<T>::operator=( const char c ) +{ + /* Set to length 1. */ + setSpace( 1 ); + + /* Copy in the data. */ + data[0] = c; + data[1] = 0; + + /* Return ourselves. */ + return *this; +} + +/* Set this string to be the StrTmpl s exactly. The old string is + * discarded. */ +template<class T> StrTmpl<T> &StrTmpl<T>::operator=( const StrTmpl &s ) +{ + /* Detach from the existing string. */ + if ( data != 0 ) { + Head *head = ((Head*)data) - 1; + head->refCount -= 1; + if ( head->refCount == 0 ) + free( head ); + } + + if ( s.data != 0 ) { + /* Take a reference to the string. */ + Head *strHead = ((Head*)s.data) - 1; + strHead->refCount += 1; + data = (char*)(strHead+1); + } + else { + /* Setting from a null string, just null our pointer. */ + data = 0; + } + return *this; +} + +/* Prepare the string to be set to something else of the given length. */ +template<class T> void StrTmpl<T>::setSpace( long length ) +{ + /* Detach from the existing string. */ + Head *head = ((Head*)data) - 1; + if ( data != 0 && --head->refCount == 0 ) { + /* Resuse the space. */ + head = (Head*) realloc( head, sizeof(Head) + length+1 ); + } + else { + /* Need to make new space, there is no usable old space. */ + head = (Head*) malloc( sizeof(Head) + length+1 ); + } + if ( head == 0 ) + throw std::bad_alloc(); + + /* Init the header. */ + head->refCount = 1; + head->length = length; + + /* Copy in the data and save the pointer to it. */ + data = (char*) (head+1); +} + + +/* Append a c-style string to the end of this string. Returns a reference to + * this */ +template<class T> StrTmpl<T> &StrTmpl<T>::operator+=( const char *s ) +{ + /* Find the length of the string appended. */ + if ( s != 0 ) { + /* Get the string length and make space on the end. */ + long addedLen = strlen( s ); + char *dest = appendSpace( addedLen ); + + /* Copy the data in. Plus one for the null. */ + memcpy( dest, s, addedLen+1 ); + } + return *this; +} + +/* Append a c-style string of specific length to the end of this string. + * Returns a reference to this */ +template<class T> void StrTmpl<T>::append( const char *s, long length ) +{ + /* Find the length of the string appended. */ + if ( s != 0 ) { + /* Make space on the end. */ + char *dest = appendSpace( length ); + + /* Copy the data in. Plus one for the null. */ + memcpy( dest, s, length ); + dest[length] = 0; + } +} + +/* Append a single char to the end of this string. Returns a reference to + * this */ +template<class T> StrTmpl<T> &StrTmpl<T>::operator+=( const char c ) +{ + /* Grow on the end. */ + char *dst = appendSpace( 1 ); + + /* Append a single charachter. */ + dst[0] = c; + dst[1] = 0; + return *this; +} + + +/* Append an StrTmpl string to the end of this string. Returns a reference + * to this */ +template<class T> StrTmpl<T> &StrTmpl<T>::operator+=( const StrTmpl &s ) +{ + /* Find the length of the string appended. */ + if ( s.data != 0 ) { + /* Find the length to append. */ + long addedLen = (((Head*)s.data) - 1)->length; + + /* Make space on the end to put the string. */ + char *dest = appendSpace( addedLen ); + + /* Append the data, add one for the null. */ + memcpy( dest, s.data, addedLen+1 ); + } + return *this; +} + +/* Make space for a string of length len to be appended. */ +template<class T> char *StrTmpl<T>::appendSpace( long len ) +{ + /* Find the length of this and the string appended. */ + Head *head = (((Head*)data) - 1); + long thisLen = head->length; + + if ( head->refCount == 1 ) { + /* No other string is using the space, grow this space. */ + head = (Head*) realloc( head, + sizeof(Head) + thisLen + len + 1 ); + if ( head == 0 ) + throw std::bad_alloc(); + data = (char*) (head+1); + + /* Adjust the length. */ + head->length += len; + } + else { + /* Another string is using this space, make new space. */ + head->refCount -= 1; + Head *newHead = (Head*) malloc( + sizeof(Head) + thisLen + len + 1 ); + if ( newHead == 0 ) + throw std::bad_alloc(); + data = (char*) (newHead+1); + + /* Set the new header and data from this. */ + newHead->refCount = 1; + newHead->length = thisLen + len; + memcpy( data, head+1, thisLen ); + } + + /* Return writing position. */ + return data + thisLen; +} + +/* Concatenate a String and a c-style string. */ +template<class T> StrTmpl<T> operator+( const StrTmpl<T> &s1, const char *s2 ) +{ + /* Find s2 length and alloc the space for the result. */ + long str1Len = (((typename StrTmpl<T>::Head*)(s1.data)) - 1)->length; + long str2Len = strlen( s2 ); + + typename StrTmpl<T>::Head *head = (typename StrTmpl<T>::Head*) + malloc( sizeof(typename StrTmpl<T>::Head) + str1Len + str2Len + 1 ); + if ( head == 0 ) + throw std::bad_alloc(); + + /* Set up the header. */ + head->refCount = 1; + head->length = str1Len + str2Len; + + /* Save the pointer to data and copy the data in. */ + char *data = (char*) (head+1); + memcpy( data, s1.data, str1Len ); + memcpy( data + str1Len, s2, str2Len + 1 ); + return StrTmpl<T>( data, typename StrTmpl<T>::DisAmbig() ); +} + +/* Concatenate a c-style string and a String. */ +template<class T> StrTmpl<T> operator+( const char *s1, const StrTmpl<T> &s2 ) +{ + /* Find s2 length and alloc the space for the result. */ + long str1Len = strlen( s1 ); + long str2Len = (((typename StrTmpl<T>::Head*)(s2.data)) - 1)->length; + + typename StrTmpl<T>::Head *head = (typename StrTmpl<T>::Head*) + malloc( sizeof(typename StrTmpl<T>::Head) + str1Len + str2Len + 1 ); + if ( head == 0 ) + throw std::bad_alloc(); + + /* Set up the header. */ + head->refCount = 1; + head->length = str1Len + str2Len; + + /* Save the pointer to data and copy the data in. */ + char *data = (char*) (head+1); + memcpy( data, s1, str1Len ); + memcpy( data + str1Len, s2.data, str2Len + 1 ); + return StrTmpl<T>( data, typename StrTmpl<T>::DisAmbig() ); +} + +/* Add two StrTmpl strings. */ +template<class T> StrTmpl<T> operator+( const StrTmpl<T> &s1, const StrTmpl<T> &s2 ) +{ + /* Find s2 length and alloc the space for the result. */ + long str1Len = (((typename StrTmpl<T>::Head*)(s1.data)) - 1)->length; + long str2Len = (((typename StrTmpl<T>::Head*)(s2.data)) - 1)->length; + typename StrTmpl<T>::Head *head = (typename StrTmpl<T>::Head*) + malloc( sizeof(typename StrTmpl<T>::Head) + str1Len + str2Len + 1 ); + if ( head == 0 ) + throw std::bad_alloc(); + + /* Set up the header. */ + head->refCount = 1; + head->length = str1Len + str2Len; + + /* Save the pointer to data and copy the data in. */ + char *data = (char*) (head+1); + memcpy( data, s1.data, str1Len ); + memcpy( data + str1Len, s2.data, str2Len + 1 ); + return StrTmpl<T>( data, typename StrTmpl<T>::DisAmbig() ); +} + +/* Operator used in case the compiler does not support the conversion. */ +template <class T> inline std::ostream &operator<<( std::ostream &o, const StrTmpl<T> &s ) +{ + return o.write( s.data, s.length() ); +} + +typedef StrTmpl<char> String; + +/** + * \brief Compare two null terminated character sequences. + * + * This comparision class is a wrapper for strcmp. + */ +template<class T> struct CmpStrTmpl +{ + /** + * \brief Compare two null terminated string types. + */ + static inline long compare( const char *k1, const char *k2 ) + { return strcmp(k1, k2); } + + static int compare( const StrTmpl<T> &s1, const StrTmpl<T> &s2 ) + { + if ( s1.length() < s2.length() ) + return -1; + else if ( s1.length() > s2.length() ) + return 1; + else + return memcmp( s1.data, s2.data, s1.length() ); + } +}; + +typedef CmpStrTmpl<char> CmpStr; + + + +#ifdef AAPL_NAMESPACE +} +#endif + +#endif /* _AAPL_ASTRING_H */ diff --git a/src/ctinput.cc b/src/ctinput.cc new file mode 100644 index 0000000..c8005ff --- /dev/null +++ b/src/ctinput.cc @@ -0,0 +1,497 @@ +/* + * Copyright 2007-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "parsedata.h" +#include "parsetree.h" +#include "input.h" +#include "debug.h" +#include "pool.h" + +#include <iostream> + +using std::cerr; +using std::endl; + +extern StreamFuncs patternFuncs; +extern StreamFuncs replFuncs; + +/* + * Pattern + */ + +StreamImpl *newSourceStreamPat( const char *name, Pattern *pattern ) +{ + StreamImpl *ss = (StreamImpl*)malloc(sizeof(StreamImpl)); + memset( ss, 0, sizeof(StreamImpl) ); + ss->pattern = pattern; + ss->patItem = pattern->list->head; + ss->funcs = &patternFuncs; + return ss; +} + +LangEl *inputStreamPatternGetLangEl( StreamImpl *ss, long *bindId, char **data, long *length ) +{ + LangEl *klangEl = ss->patItem->prodEl->langEl; + *bindId = ss->patItem->bindId; + *data = 0; + *length = 0; + + ss->patItem = ss->patItem->next; + ss->offset = 0; + return klangEl; +} + +int inputStreamPatternGetParseBlock( StreamImpl *ss, int skip, char **pdp, int *copied ) +{ + *copied = 0; + + PatternItem *buf = ss->patItem; + int offset = ss->offset; + + while ( true ) { + if ( buf == 0 ) + return INPUT_EOD; + + if ( buf->form == PatternItem::TypeRefForm ) + return INPUT_LANG_EL; + + assert ( buf->form == PatternItem::InputTextForm ); + int avail = buf->data.length() - offset; + + if ( avail > 0 ) { + /* The source data from the current buffer. */ + char *src = &buf->data[offset]; + int slen = avail; + + /* Need to skip? */ + if ( skip > 0 && slen <= skip ) { + /* Skipping the the whole source. */ + skip -= slen; + } + else { + /* Either skip is zero, or less than slen. Skip goes to zero. + * Some data left over, copy it. */ + src += skip; + slen -= skip; + skip = 0; + + *pdp = src; + *copied += slen; + break; + } + } + + buf = buf->next; + offset = 0; + } + + return INPUT_DATA; +} + +int inputStreamPatternGetData( StreamImpl *ss, char *dest, int length ) +{ + int copied = 0; + + PatternItem *buf = ss->patItem; + int offset = ss->offset; + + while ( true ) { + if ( buf == 0 ) + break; + + if ( buf->form == PatternItem::TypeRefForm ) + break; + + assert ( buf->form == PatternItem::InputTextForm ); + int avail = buf->data.length() - offset; + + if ( avail > 0 ) { + /* The source data from the current buffer. */ + char *src = &buf->data[offset]; + int slen = avail <= length ? avail : length; + + memcpy( dest+copied, src, slen ) ; + copied += slen; + length -= slen; + } + + if ( length == 0 ) + break; + + buf = buf->next; + offset = 0; + } + + return copied; +} + +void inputStreamPatternBackup( StreamImpl *ss ) +{ + if ( ss->patItem == 0 ) + ss->patItem = ss->pattern->list->tail; + else + ss->patItem = ss->patItem->prev; +} + +void inputStreamPatternPushBackBuf( StreamImpl *ss, RunBuf *runBuf ) +{ + char *data = runBuf->data + runBuf->offset; + long length = runBuf->length; + + if ( length == 0 ) + return; + + /* While pushing back past the current pattern item start. */ + while ( length > ss->offset ) { + length -= ss->offset; + if ( ss->offset > 0 ) + assert( memcmp( ss->patItem->data, data-length, ss->offset ) == 0 ); + inputStreamPatternBackup( ss ); + ss->offset = ss->patItem->data.length(); + } + + ss->offset -= length; + assert( memcmp( &ss->patItem->data[ss->offset], data, length ) == 0 ); +} + +void inputStreamPatternUndoConsumeLangEl( StreamImpl *ss ) +{ + inputStreamPatternBackup( ss ); + ss->offset = ss->patItem->data.length(); +} + +int inputStreamPatternConsumeData( StreamImpl *ss, int length, Location *loc ) +{ + //debug( REALM_INPUT, "consuming %ld bytes\n", length ); + + int consumed = 0; + + while ( true ) { + if ( ss->patItem == 0 ) + break; + + int avail = ss->patItem->data.length() - ss->offset; + + if ( length >= avail ) { + /* Read up to the end of the data. Advance the + * pattern item. */ + ss->patItem = ss->patItem->next; + ss->offset = 0; + + length -= avail; + consumed += avail; + + if ( length == 0 ) + break; + } + else { + ss->offset += length; + consumed += length; + break; + } + } + + return consumed; +} + +int inputStreamPatternUndoConsumeData( StreamImpl *ss, const char *data, int length ) +{ + ss->offset -= length; + return length; +} + +StreamFuncs patternFuncs = +{ + &inputStreamPatternGetParseBlock, + &inputStreamPatternGetData, + &inputStreamPatternConsumeData, + &inputStreamPatternUndoConsumeData, + 0, + 0, + &inputStreamPatternGetLangEl, + &inputStreamPatternUndoConsumeLangEl, +}; + + +/* + * Constructor + */ + +StreamImpl *newSourceStreamCons( const char *name, Constructor *constructor ) +{ + StreamImpl *ss = (StreamImpl*)malloc(sizeof(StreamImpl)); + memset( ss, 0, sizeof(StreamImpl) ); + ss->constructor = constructor; + ss->consItem = constructor->list->head; + ss->funcs = &replFuncs; + return ss; +} + +LangEl *inputStreamConsGetLangEl( StreamImpl *ss, long *bindId, char **data, long *length ) +{ + LangEl *klangEl = ss->consItem->type == ConsItem::ExprType ? + ss->consItem->langEl : ss->consItem->prodEl->langEl; + *bindId = ss->consItem->bindId; + + *data = 0; + *length = 0; + + if ( ss->consItem->type == ConsItem::LiteralType ) { + if ( ss->consItem->prodEl->typeRef->pdaLiteral != 0 ) { + bool unusedCI; + prepareLitString( ss->consItem->data, unusedCI, + ss->consItem->prodEl->typeRef->pdaLiteral->data, + ss->consItem->prodEl->typeRef->pdaLiteral->loc ); + + *data = ss->consItem->data; + *length = ss->consItem->data.length(); + } + } + + ss->consItem = ss->consItem->next; + ss->offset = 0; + return klangEl; +} + +int inputStreamConsGetParseBlock( StreamImpl *ss, + int skip, char **pdp, int *copied ) +{ + *copied = 0; + + ConsItem *buf = ss->consItem; + int offset = ss->offset; + + while ( true ) { + if ( buf == 0 ) + return INPUT_EOD; + + if ( buf->type == ConsItem::ExprType || buf->type == ConsItem::LiteralType ) + return INPUT_LANG_EL; + + assert ( buf->type == ConsItem::InputText ); + int avail = buf->data.length() - offset; + + if ( avail > 0 ) { + /* The source data from the current buffer. */ + char *src = &buf->data[offset]; + int slen = avail; + + /* Need to skip? */ + if ( skip > 0 && slen <= skip ) { + /* Skipping the the whole source. */ + skip -= slen; + } + else { + /* Either skip is zero, or less than slen. Skip goes to zero. + * Some data left over, copy it. */ + src += skip; + slen -= skip; + skip = 0; + + *pdp = src; + *copied += slen; + break; + } + } + + buf = buf->next; + offset = 0; + } + + return INPUT_DATA; +} + +int inputStreamConsGetData( StreamImpl *ss, char *dest, int length ) +{ + int copied = 0; + + ConsItem *buf = ss->consItem; + int offset = ss->offset; + + while ( true ) { + if ( buf == 0 ) + break; + + if ( buf->type == ConsItem::ExprType || buf->type == ConsItem::LiteralType ) + break; + + assert ( buf->type == ConsItem::InputText ); + int avail = buf->data.length() - offset; + + if ( avail > 0 ) { + /* The source data from the current buffer. */ + char *src = &buf->data[offset]; + int slen = avail <= length ? avail : length; + + memcpy( dest+copied, src, slen ) ; + copied += slen; + length -= slen; + } + + if ( length == 0 ) + break; + + buf = buf->next; + offset = 0; + } + + return copied; +} + +void inputStreamConsBackup( StreamImpl *ss ) +{ + if ( ss->consItem == 0 ) + ss->consItem = ss->constructor->list->tail; + else + ss->consItem = ss->consItem->prev; +} + +void inputStreamConsPushBackBuf( StreamImpl *ss, RunBuf *runBuf ) +{ + char *data = runBuf->data + runBuf->offset; + long length = runBuf->length; + + //cerr << "push back data: "; + //cerr.write( data, length ); + //cerr << endl; + + if ( length == 0 ) + return; + + /* While pushing back past the current pattern item start. */ + while ( length > ss->offset ) { + length -= ss->offset; + if ( ss->offset > 0 ) + assert( memcmp( ss->consItem->data, data-length, ss->offset ) == 0 ); + inputStreamConsBackup( ss ); + ss->offset = ss->consItem->data.length(); + } + + ss->offset -= length; + assert( memcmp( &ss->consItem->data[ss->offset], data, length ) == 0 ); +} + +void inputStreamConsUndoConsumeLangEl( StreamImpl *ss ) +{ + inputStreamConsBackup( ss ); + ss->offset = ss->consItem->data.length(); +} + +int inputStreamConsConsumeData( StreamImpl *ss, int length, Location *loc ) +{ + int consumed = 0; + + while ( true ) { + if ( ss->consItem == 0 ) + break; + + int avail = ss->consItem->data.length() - ss->offset; + + if ( length >= avail ) { + /* Read up to the end of the data. Advance the + * pattern item. */ + ss->consItem = ss->consItem->next; + ss->offset = 0; + + length -= avail; + consumed += avail; + + if ( length == 0 ) + break; + } + else { + ss->offset += length; + consumed += length; + break; + } + } + + return consumed; +} + +int inputStreamConsUndoConsumeData( StreamImpl *ss, const char *data, int length ) +{ + ss->offset -= length; + return length; +} + +StreamFuncs replFuncs = +{ + &inputStreamConsGetParseBlock, + &inputStreamConsGetData, + &inputStreamConsConsumeData, + &inputStreamConsUndoConsumeData, + 0, + 0, + &inputStreamConsGetLangEl, + &inputStreamConsUndoConsumeLangEl, +}; + +extern "C" void internalSendNamedLangEl( Program *prg, Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *is ) +{ + /* All three set by consumeLangEl. */ + long bindId; + char *data; + long length; + + LangEl *klangEl = is->funcs->consumeLangEl( is, &bindId, &data, &length ); + + //cerr << "named langEl: " << prg->rtd->lelInfo[klangEl->id].name << endl; + + /* Copy the token data. */ + Head *tokdata = 0; + if ( data != 0 ) + tokdata = stringAllocFull( prg, data, length ); + + Kid *input = makeTokenWithData( prg, pdaRun, fsmRun, is, klangEl->id, tokdata ); + + incrementSteps( pdaRun ); + + ParseTree *parseTree = parseTreeAllocate( prg ); + parseTree->id = input->tree->id; + parseTree->flags |= PF_NAMED; + parseTree->shadow = input; + + if ( bindId > 0 ) + pushBinding( pdaRun, parseTree ); + + pdaRun->parseInput = parseTree; +} + +extern "C" void internalInitBindings( PdaRun *pdaRun ) +{ + /* Bindings are indexed at 1. Need a no-binding. */ + pdaRun->bindings = new Bindings; + pdaRun->bindings->push(0); +} + +void pushBinding( PdaRun *pdaRun, ParseTree *parseTree ) +{ + /* If the item is bound then store it in the bindings array. */ + pdaRun->bindings->push( parseTree ); +} + +extern "C" void internalPopBinding( PdaRun *pdaRun, ParseTree *parseTree ) +{ + ParseTree *lastBound = pdaRun->bindings->top(); + if ( lastBound == parseTree ) + pdaRun->bindings->pop(); +} diff --git a/src/debug.c b/src/debug.c new file mode 100644 index 0000000..c43f5a6 --- /dev/null +++ b/src/debug.c @@ -0,0 +1,78 @@ +/* + * Copyright 2010-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <colm/debug.h> +#include <colm/program.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> + +const char *const colmRealmNames[REALMS] = + { + "BYTECODE", + "PARSE", + "MATCH", + "COMPILE", + "POOL", + "PRINT", + "INPUT", + "SCAN", + }; + +int _debug( struct colm_program *prg, long realm, const char *fmt, ... ) +{ + int result = 0; + if ( prg->activeRealm & realm ) { + /* Compute the index by shifting. */ + int ind = 0; + while ( (realm & 0x1) != 0x1 ) { + realm >>= 1; + ind += 1; + } + + fprintf( stderr, "%s: ", colmRealmNames[ind] ); + va_list args; + va_start( args, fmt ); + result = vfprintf( stderr, fmt, args ); + va_end( args ); + } + + return result; +} + +void fatal( const char *fmt, ... ) +{ + va_list args; + fprintf( stderr, "fatal: " ); + va_start( args, fmt ); + vfprintf( stderr, fmt, args ); + va_end( args ); + exit(1); +} + +void message( const char *fmt, ... ) +{ + va_list args; + fprintf( stderr, "message: " ); + va_start( args, fmt ); + vfprintf( stderr, fmt, args ); + va_end( args ); +} diff --git a/src/debug.h b/src/debug.h new file mode 100644 index 0000000..91e1c46 --- /dev/null +++ b/src/debug.h @@ -0,0 +1,59 @@ +/* + * Copyright 2010-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "config.h" + +void fatal( const char *fmt, ... ); + +#ifdef DEBUG +#define debug( prg, realm, ... ) _debug( prg, realm, __VA_ARGS__ ) +#define check_realm( realm ) _check_realm( realm ) +#else +#define debug( prg, realm, ... ) +#define check_realm( realm ) +#endif + +struct colm_program; + +int _debug( struct colm_program *prg, long realm, const char *fmt, ... ); + +void message( const char *fmt, ... ); + +#define REALM_BYTECODE 0x00000001 +#define REALM_PARSE 0x00000002 +#define REALM_MATCH 0x00000004 +#define REALM_COMPILE 0x00000008 +#define REALM_POOL 0x00000010 +#define REALM_PRINT 0x00000020 +#define REALM_INPUT 0x00000040 +#define REALM_SCAN 0x00000080 + +#define REALMS 32 + +extern const char *const colmRealmNames[REALMS]; + +#ifdef __cplusplus +} +#endif diff --git a/src/declare.cc b/src/declare.cc new file mode 100644 index 0000000..d18ce5d --- /dev/null +++ b/src/declare.cc @@ -0,0 +1,1255 @@ +/* + * Copyright 2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "bytecode.h" +#include "parsedata.h" +#include <iostream> +#include <assert.h> + +void Compiler::initUniqueTypes( ) +{ + uniqueTypeNil = new UniqueType( TYPE_NIL ); + uniqueTypeVoid = new UniqueType( TYPE_TREE, voidLangEl ); + uniqueTypePtr = new UniqueType( TYPE_TREE, ptrLangEl ); + uniqueTypeBool = new UniqueType( TYPE_TREE, boolLangEl ); + uniqueTypeInt = new UniqueType( TYPE_TREE, intLangEl ); + uniqueTypeStr = new UniqueType( TYPE_TREE, strLangEl ); + uniqueTypeStream = new UniqueType( TYPE_TREE, streamLangEl ); + uniqueTypeIgnore = new UniqueType( TYPE_TREE, ignoreLangEl ); + uniqueTypeAny = new UniqueType( TYPE_TREE, anyLangEl ); + + uniqeTypeMap.insert( uniqueTypeNil ); + uniqeTypeMap.insert( uniqueTypeVoid ); + uniqeTypeMap.insert( uniqueTypePtr ); + uniqeTypeMap.insert( uniqueTypeBool ); + uniqeTypeMap.insert( uniqueTypeInt ); + uniqeTypeMap.insert( uniqueTypeStr ); + uniqeTypeMap.insert( uniqueTypeStream ); + uniqeTypeMap.insert( uniqueTypeIgnore ); + uniqeTypeMap.insert( uniqueTypeAny ); +} + +ObjectField *ObjNameScope::checkRedecl( const String &name ) +{ + return owner->checkRedecl( this, name ); +} + +void ObjNameScope::insertField( const String &name, ObjectField *value ) +{ + return owner->insertField( this, name, value ); +} + +ObjectField *ObjectDef::checkRedecl( ObjNameScope *inScope, const String &name ) +{ + ObjFieldMapEl *objDefMapEl = inScope->objFieldMap->find( name ); + if ( objDefMapEl != 0 ) + return objDefMapEl->value; + return 0; +} + +void ObjectDef::insertField( ObjNameScope *inScope, const String &name, ObjectField *value ) +{ + inScope->objFieldMap->insert( name, value ); + objFieldList->append( value ); + value->scope = inScope; +} + +ObjNameScope *ObjectDef::pushScope( ObjNameScope *curScope ) +{ + ObjNameScope *newScope = new ObjNameScope; + newScope->objFieldMap = new ObjFieldMap; + + newScope->owner = this; + newScope->parentScope = curScope; + curScope->children.append( newScope ); + + return newScope; +} + +void LexJoin::varDecl( Compiler *pd, TokenDef *tokenDef ) +{ + expr->varDecl( pd, tokenDef ); +} + +void LexExpression::varDecl( Compiler *pd, TokenDef *tokenDef ) +{ + switch ( type ) { + case OrType: case IntersectType: case SubtractType: + case StrongSubtractType: + expression->varDecl( pd, tokenDef ); + term->varDecl( pd, tokenDef ); + break; + case TermType: + term->varDecl( pd, tokenDef ); + break; + case BuiltinType: + break; + } +} + +void LexTerm::varDecl( Compiler *pd, TokenDef *tokenDef ) +{ + switch ( type ) { + case ConcatType: + case RightStartType: + case RightFinishType: + case LeftType: + term->varDecl( pd, tokenDef ); + factorAug->varDecl( pd, tokenDef ); + break; + case FactorAugType: + factorAug->varDecl( pd, tokenDef ); + break; + } +} + +void LexFactorAug::varDecl( Compiler *pd, TokenDef *tokenDef ) +{ + for ( ReCaptureVect::Iter re = reCaptureVect; re.lte(); re++ ) { + if ( tokenDef->objectDef->rootScope->checkRedecl( re->objField->name ) != 0 ) { + error(re->objField->loc) << "label name \"" << + re->objField->name << "\" already in use" << endp; + } + + /* Insert it into the map. */ + tokenDef->objectDef->rootScope->insertField( re->objField->name, re->objField ); + + /* Store it in the TokenDef. */ + tokenDef->reCaptureVect.append( *re ); + } +} + +void Compiler::declareReVars() +{ + for ( NamespaceList::Iter n = namespaceList; n.lte(); n++ ) { + for ( TokenDefListNs::Iter tok = n->tokenDefList; tok.lte(); tok++ ) { + if ( tok->join != 0 ) + tok->join->varDecl( this, tok ); + } + } + + /* FIXME: declare RE captures in token generation actions. */ +#if 0 + /* Add captures to the local frame. We Depend on these becoming the + * first local variables so we can compute their location. */ + + /* Make local variables corresponding to the local capture vector. */ + for ( ReCaptureVect::Iter c = reCaptureVect; c.lte(); c++ ) + { + ObjectField *objField = ObjectField::cons( c->objField->loc, + c->objField->typeRef, c->objField->name ); + + /* Insert it into the field map. */ + pd->curLocalFrame->insertField( objField->name, objField ); + } +#endif +} + +LangEl *declareLangEl( Compiler *pd, Namespace *nspace, const String &data, LangEl::Type type ) +{ + /* If the id is already in the dict, it will be placed in last found. If + * it is not there then it will be inserted and last found will be set to it. */ + TypeMapEl *inDict = nspace->typeMap.find( data ); + if ( inDict != 0 ) + error() << "'" << data << "' already defined as something else" << endp; + + /* Language element not there. Make the new lang el and insert.. */ + LangEl *langEl = new LangEl( nspace, data, type ); + TypeMapEl *typeMapEl = new TypeMapEl( data, langEl ); + nspace->typeMap.insert( typeMapEl ); + pd->langEls.append( langEl ); + + return langEl; +} + +/* Does not map the new language element. */ +LangEl *addLangEl( Compiler *pd, Namespace *nspace, const String &data, LangEl::Type type ) +{ + LangEl *langEl = new LangEl( nspace, data, type ); + pd->langEls.append( langEl ); + return langEl; +} + +void declareTypeAlias( Compiler *pd, Namespace *nspace, const String &data, TypeRef *typeRef ) +{ + /* If the id is already in the dict, it will be placed in last found. If + * it is not there then it will be inserted and last found will be set to it. */ + TypeMapEl *inDict = nspace->typeMap.find( data ); + if ( inDict != 0 ) + error() << "'" << data << "' already defined as something else" << endp; + + /* Language element not there. Make the new lang el and insert.. */ + TypeMapEl *typeMapEl = new TypeMapEl( data, typeRef ); + nspace->typeMap.insert( typeMapEl ); +} + +LangEl *findType( Compiler *pd, Namespace *nspace, const String &data ) +{ + /* If the id is already in the dict, it will be placed in last found. If + * it is not there then it will be inserted and last found will be set to it. */ + TypeMapEl *inDict = nspace->typeMap.find( data ); + + if ( inDict == 0 ) + error() << "'" << data << "' not declared as anything" << endp; + + return inDict->value; +} + + +void Compiler::declareBaseLangEls() +{ + /* Order here is important because we make assumptions about the inbuilt + * language elements in the runtime. Note tokens are have identifiers set + * in an initial pass. */ + + /* Make a "_notoken" language element. This element is used when a + * generation action fails to generate anything, but there is reverse code + * that needs to be associated with a language element. This allows us to + * always associate reverse code with the first language element produced + * after a generation action. */ + noTokenLangEl = declareLangEl( this, rootNamespace, "_notoken", LangEl::Term ); + noTokenLangEl->isIgnore = true; + + ptrLangEl = declareLangEl( this, rootNamespace, "ptr", LangEl::Term ); + voidLangEl = declareLangEl( this, rootNamespace, "void", LangEl::Term ); + boolLangEl = declareLangEl( this, rootNamespace, "bool", LangEl::Term ); + intLangEl = declareLangEl( this, rootNamespace, "int", LangEl::Term ); + strLangEl = declareLangEl( this, rootNamespace, "str", LangEl::Term ); + streamLangEl = declareLangEl( this, rootNamespace, "stream", LangEl::Term ); + ignoreLangEl = declareLangEl( this, rootNamespace, "il", LangEl::Term ); + + /* Make the EOF language element. */ + eofLangEl = 0; + + /* Make the "any" language element */ + anyLangEl = declareLangEl( this, rootNamespace, "any", LangEl::NonTerm ); +} + + +void Compiler::addProdRedObjectVar( ObjectDef *localFrame, LangEl *nonTerm ) +{ + UniqueType *prodNameUT = findUniqueType( TYPE_TREE, nonTerm ); + TypeRef *typeRef = TypeRef::cons( internal, prodNameUT ); + ObjectField *el = ObjectField::cons( internal, typeRef, "lhs" ); + + el->isLhsEl = true; + + initLocalInstructions( el ); + + localFrame->rootScope->insertField( el->name, el ); +} + +void Compiler::addProdLHSLoad( Production *prod, CodeVect &code, long &insertPos ) +{ + ObjNameScope *scope = prod->redBlock->localFrame->rootScope; + ObjectField *lhsField = scope->findField("lhs"); + assert( lhsField != 0 ); + + CodeVect loads; + if ( lhsField->beenReferenced ) { + loads.append( IN_INIT_LHS_EL ); + loads.appendHalf( lhsField->offset ); + } + + code.insert( insertPos, loads ); + insertPos += loads.length(); +} + +void Compiler::addPushBackLHS( Production *prod, CodeVect &code, long &insertPos ) +{ + CodeBlock *block = prod->redBlock; + + /* If the lhs tree is dirty then we will need to save off the old lhs + * before it gets modified. We want to avoid this for attribute + * modifications. The computation of dirtyTree should deal with this for + * us. */ + ObjNameScope *scope = block->localFrame->rootScope; + ObjectField *lhsField = scope->findField("lhs"); + assert( lhsField != 0 ); + + if ( lhsField->beenReferenced ) { + code.append( IN_STORE_LHS_EL ); + code.appendHalf( lhsField->offset ); + } +} + +void Compiler::addProdRHSVars( ObjectDef *localFrame, ProdElList *prodElList ) +{ + long position = 1; + for ( ProdElList::Iter rhsEl = *prodElList; rhsEl.lte(); rhsEl++, position++ ) { + if ( rhsEl->type == ProdEl::ReferenceType ) { + /* Use an offset of zero. For frame objects we compute the offset on + * demand. */ + String name( 8, "r%d", position ); + ObjectField *el = ObjectField::cons( InputLoc(), rhsEl->typeRef, name ); + rhsEl->rhsElField = el; + + /* Right hand side elements are constant. */ + el->isConst = true; + el->isRhsEl = true; + + /* Only ever fetch for reading since they are constant. */ + el->inGetR = IN_GET_LOCAL_R; + + localFrame->rootScope->insertField( el->name, el ); + } + } +} + +void Compiler::addProdRHSLoads( Production *prod, CodeVect &code, long &insertPos ) +{ + CodeVect loads; + long elPos = 0; + for ( ProdElList::Iter rhsEl = *prod->prodElList; rhsEl.lte(); rhsEl++, elPos++ ) { + if ( rhsEl->type == ProdEl::ReferenceType ) { + if ( rhsEl->rhsElField->beenReferenced ) { + loads.append ( IN_INIT_RHS_EL ); + loads.appendHalf( elPos ); + loads.appendHalf( rhsEl->rhsElField->offset ); + } + } + } + + /* Insert and update the insert position. */ + code.insert( insertPos, loads ); + insertPos += loads.length(); +} + +void GenericType::declare( Compiler *pd, Namespace *nspace ) +{ + //std::cout << "generic " << g->name << std::endl; + + LangEl *langEl = declareLangEl( pd, nspace, name, LangEl::NonTerm ); + + /* Add one empty production. */ + ProdElList *emptyList = new ProdElList; + //addProduction( g->loc, langEl, emptyList, false, 0, 0 ); + + { + LangEl *prodName = langEl; + assert( prodName->type == LangEl::NonTerm ); + + Production *newDef = Production::cons( InputLoc(), prodName, + emptyList, String(), false, 0, + pd->prodList.length(), prodName->defList.length() ); + + prodName->defList.append( newDef ); + pd->prodList.append( newDef ); + newDef->predOf = 0; + } + + langEl->generic = this; + this->langEl = langEl; + + utArg = typeArg->uniqueType; + + if ( typeId == GEN_MAP ) + keyUT = keyTypeArg->uniqueType; + + objDef = ObjectDef::cons( ObjectDef::BuiltinType, + name, pd->nextObjectId++ ); + + switch ( typeId ) { + case GEN_MAP: + pd->initMapFunctions( this ); + break; + case GEN_LIST: + pd->initListFunctions( this ); + pd->initListFields( this ); + break; + case GEN_VECTOR: + pd->initVectorFunctions( this ); + break; + case GEN_PARSER: + /* Need to generate a parser for the type. */ + utArg->langEl->parserId = pd->nextParserId++; + pd->initParserFunctions( this ); + pd->initParserFields( this ); + break; + } + + langEl->objectDef = objDef; +} + +void Namespace::declare( Compiler *pd ) +{ + for ( GenericList::Iter g = genericList; g.lte(); g++ ) + g->declare( pd, this ); + + for ( TokenDefListNs::Iter tokenDef = tokenDefList; tokenDef.lte(); tokenDef++ ) { + if ( tokenDef->isLiteral ) { + if ( tokenDef->isZero ) { + assert( tokenDef->regionSet->collectIgnore->zeroLel != 0 ); + tokenDef->tdLangEl = tokenDef->regionSet->collectIgnore->zeroLel; + } + else { + /* Original. Create a token for the literal. */ + LangEl *litEl = declareLangEl( pd, this, tokenDef->name, LangEl::Term ); + + litEl->lit = tokenDef->literal; + litEl->isLiteral = true; + litEl->tokenDef = tokenDef; + litEl->objectDef = tokenDef->objectDef; + + tokenDef->tdLangEl = litEl; + + if ( tokenDef->noPreIgnore ) + litEl->noPreIgnore = true; + if ( tokenDef->noPostIgnore ) + litEl->noPostIgnore = true; + } + } + } + + for ( ContextDefList::Iter c = contextDefList; c.lte(); c++ ) { + LangEl *lel = declareLangEl( pd, this, c->name, LangEl::NonTerm ); + ProdElList *emptyList = new ProdElList; + //addProduction( c->context->loc, c->name, emptyList, false, 0, 0 ); + + { + LangEl *prodName = lel; + assert( prodName->type == LangEl::NonTerm ); + + Production *newDef = Production::cons( loc, prodName, + emptyList, String(), false, 0, + pd->prodList.length(), prodName->defList.length() ); + + prodName->defList.append( newDef ); + pd->prodList.append( newDef ); + newDef->predOf = 0; + + /* If the token has the same name as the region it is in, then also + * insert it into the symbol map for the parent region. */ + if ( strcmp( c->name, this->name ) == 0 ) { + /* Insert the name into the top of the region stack after popping the + * region just created. We need it in the parent. */ + TypeMapEl *typeMapEl = new TypeMapEl( c->name, prodName ); + this->parentNamespace->typeMap.insert( typeMapEl ); + } + } + + c->context->lel = lel; + lel->contextDef = c->context; + lel->objectDef = c->context->contextObjDef; + } + + for ( TokenDefListNs::Iter tokenDef = tokenDefList; tokenDef.lte(); tokenDef++ ) { + /* Literals already taken care of. */ + if ( ! tokenDef->isLiteral ) { + /* Create the token. */ + LangEl *tokEl = declareLangEl( pd, this, tokenDef->name, LangEl::Term ); + tokEl->isIgnore = tokenDef->isIgnore; + tokEl->transBlock = tokenDef->codeBlock; + tokEl->objectDef = tokenDef->objectDef; + tokEl->contextIn = tokenDef->contextIn; + tokEl->tokenDef = tokenDef; + + if ( tokenDef->noPreIgnore ) + tokEl->noPreIgnore = true; + if ( tokenDef->noPostIgnore ) + tokEl->noPostIgnore = true; + + tokenDef->tdLangEl = tokEl; + + if ( tokenDef->isZero ) { + /* Setting zero lel to newly created tokEl. */ + tokenDef->regionSet->collectIgnore->zeroLel = tokEl; + tokEl->isZero = true; + } + } + } + + for ( NtDefList::Iter n = ntDefList; n.lte(); n++ ) { + /* Get the language element. */ + LangEl *langEl = declareLangEl( pd, this, n->name, LangEl::NonTerm ); + //$$->langEl = langEl; + + /* Get the language element. */ + langEl->objectDef = n->objectDef; + langEl->reduceFirst = n->reduceFirst; + langEl->contextIn = n->contextIn; + langEl->defList.transfer( *n->defList ); + + for ( LelDefList::Iter d = langEl->defList; d.lte(); d++ ) { + d->prodName = langEl; + + if ( d->redBlock != 0 ) { + pd->addProdRedObjectVar( d->redBlock->localFrame, langEl ); + pd->addProdRHSVars( d->redBlock->localFrame, d->prodElList ); + } + + /* References to the reduce item. */ + } + } + + for ( TypeAliasList::Iter ta = typeAliasList; ta.lte(); ta++ ) + declareTypeAlias( pd, this, ta->name, ta->typeRef ); + + /* Go into child aliases. */ + for ( NamespaceVect::Iter c = childNamespaces; c.lte(); c++ ) + (*c)->declare( pd ); +} + +void Compiler::makeIgnoreCollectors() +{ + for ( RegionSetList::Iter regionSet = regionSetList; regionSet.lte(); regionSet++ ) { + if ( regionSet->collectIgnore->zeroLel == 0 ) { + String name( 128, "_ign_%p", regionSet->tokenIgnore ); + LangEl *zeroLel = new LangEl( rootNamespace, name, LangEl::Term ); + langEls.append( zeroLel ); + zeroLel->isZero = true; + zeroLel->regionSet = regionSet; + + regionSet->collectIgnore->zeroLel = zeroLel; + } + } +} + +void LangStmt::chooseDefaultIter( Compiler *pd, IterCall *iterCall ) const +{ + /* The iterator name. */ + LangVarRef *callVarRef = LangVarRef::cons( loc, context, scope, "triter" ); + + /* The parameters. */ + CallArgVect *callExprVect = new CallArgVect; + callExprVect->append( new CallArg( iterCall->langExpr ) ); + iterCall->langTerm = LangTerm::cons( InputLoc(), callVarRef, callExprVect ); + iterCall->langExpr = 0; + iterCall->form = IterCall::IterCallForm; +} + + +void LangStmt::declareForIter( Compiler *pd ) const +{ + if ( iterCall->form != IterCall::IterCallForm ) + chooseDefaultIter( pd, iterCall ); + + objField->typeRef = TypeRef::cons( loc, typeRef, iterCall ); +} + +void LangStmt::declare( Compiler *pd ) const +{ + switch ( type ) { + case PrintType: + break; + case PrintXMLACType: + break; + case PrintXMLType: + break; + case PrintStreamType: + break; + case ExprType: + break; + case IfType: + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->declare( pd ); + + if ( elsePart != 0 ) + elsePart->declare( pd ); + break; + + case ElseType: + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->declare( pd ); + break; + case RejectType: + break; + case WhileType: + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->declare( pd ); + break; + case AssignType: + break; + case ForIterType: + declareForIter( pd ); + + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->declare( pd ); + break; + case ReturnType: + break; + case BreakType: + break; + case YieldType: + break; + } +} + +void CodeBlock::declare( Compiler *pd ) const +{ + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->declare( pd ); +} + + +void Compiler::declareFunction( Function *func ) +{ + CodeBlock *block = func->codeBlock; + block->declare( this ); +} + +void Compiler::declareReductionCode( Production *prod ) +{ + CodeBlock *block = prod->redBlock; + block->declare( this ); +} + +void Compiler::declareTranslateBlock( LangEl *langEl ) +{ + CodeBlock *block = langEl->transBlock; + + /* References to the reduce item. */ + addMatchLength( block->localFrame, langEl ); + addMatchText( block->localFrame, langEl ); + addInput( block->localFrame ); + addCtx( block->localFrame ); + + block->declare( this ); +} + +void Compiler::declarePreEof( TokenRegion *region ) +{ + CodeBlock *block = region->preEofBlock; + + addInput( block->localFrame ); + addCtx( block->localFrame ); + + block->declare( this ); +} + +void Compiler::declareRootBlock() +{ + CodeBlock *block = rootCodeBlock; + block->declare( this ); +} + +void Compiler::declareByteCode() +{ + for ( FunctionList::Iter f = functionList; f.lte(); f++ ) + declareFunction( f ); + + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + if ( prod->redBlock != 0 ) + declareReductionCode( prod ); + } + + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->transBlock != 0 ) + declareTranslateBlock( lel ); + } + + for ( RegionList::Iter r = regionList; r.lte(); r++ ) { + if ( r->preEofBlock != 0 ) + declarePreEof( r ); + } + + declareRootBlock( ); +} + +void Compiler::makeDefaultIterators() +{ + /* Tree iterator. */ + { + UniqueType *anyRefUT = findUniqueType( TYPE_REF, anyLangEl ); + ObjMethod *objMethod = initFunction( uniqueTypeAny, globalObjectDef, + "triter", IN_HALT, IN_HALT, anyRefUT, true ); + + IterDef *triter = findIterDef( IterDef::Tree ); + objMethod->iterDef = triter; + } + + /* Child iterator. */ + { + UniqueType *anyRefUT = findUniqueType( TYPE_REF, anyLangEl ); + ObjMethod *objMethod = initFunction( uniqueTypeAny, globalObjectDef, + "child", IN_HALT, IN_HALT, anyRefUT, true ); + + IterDef *triter = findIterDef( IterDef::Child ); + objMethod->iterDef = triter; + } + + /* Reverse iterator. */ + { + UniqueType *anyRefUT = findUniqueType( TYPE_REF, anyLangEl ); + ObjMethod *objMethod = initFunction( uniqueTypeAny, globalObjectDef, + "rev_child", IN_HALT, IN_HALT, anyRefUT, true ); + + IterDef *triter = findIterDef( IterDef::RevChild ); + objMethod->iterDef = triter; + } + + /* Repeat iterator. */ + { + UniqueType *anyRefUT = findUniqueType( TYPE_REF, anyLangEl ); + ObjMethod *objMethod = initFunction( uniqueTypeAny, globalObjectDef, + "repeat", IN_HALT, IN_HALT, anyRefUT, true ); + + IterDef *triter = findIterDef( IterDef::Repeat ); + objMethod->iterDef = triter; + } + + /* Reverse repeat iterator. */ + { + UniqueType *anyRefUT = findUniqueType( TYPE_REF, anyLangEl ); + ObjMethod *objMethod = initFunction( uniqueTypeAny, globalObjectDef, + "rev_repeat", IN_HALT, IN_HALT, anyRefUT, true ); + + IterDef *triter = findIterDef( IterDef::RevRepeat ); + objMethod->iterDef = triter; + } +} + +void Compiler::addMatchLength( ObjectDef *frame, LangEl *lel ) +{ + /* Make the type ref. */ + TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeInt ); + + /* Create the field and insert it into the map. */ + ObjectField *el = ObjectField::cons( InputLoc(), typeRef, "match_length" ); + el->beenReferenced = true; + el->beenInitialized = true; + el->isConst = true; + el->useOffset = false; + el->inGetR = IN_GET_MATCH_LENGTH_R; + frame->rootScope->insertField( el->name, el ); +} + +void Compiler::addMatchText( ObjectDef *frame, LangEl *lel ) +{ + /* Make the type ref. */ + TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStr ); + + /* Create the field and insert it into the map. */ + ObjectField *el = ObjectField::cons( internal, typeRef, "match_text" ); + el->beenReferenced = true; + el->beenInitialized = true; + el->isConst = true; + el->useOffset = false; + el->inGetR = IN_GET_MATCH_TEXT_R; + frame->rootScope->insertField( el->name, el ); +} + +void Compiler::addInput( ObjectDef *frame ) +{ + /* Make the type ref. */ + TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStream ); + + /* Create the field and insert it into the map. */ + ObjectField *el = ObjectField::cons( internal, typeRef, "input" ); + el->beenReferenced = true; + el->beenInitialized = true; + el->isConst = false; + el->useOffset = false; + el->isCustom = true; + el->inGetR = IN_LOAD_INPUT_R; + el->inGetWV = IN_LOAD_INPUT_WV; + el->inGetWC = IN_LOAD_INPUT_WC; + frame->rootScope->insertField( el->name, el ); +} + +void Compiler::addCtx( ObjectDef *frame ) +{ + /* Make the type ref. */ + TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStream ); + + /* Create the field and insert it into the map. */ + ObjectField *el = ObjectField::cons( internal, typeRef, "ctx" ); + el->beenReferenced = true; + el->beenInitialized = true; + el->isConst = false; + el->useOffset = false; + el->isCustom = true; + el->inGetR = IN_LOAD_CTX_R; + el->inGetWV = IN_LOAD_CTX_WV; + el->inGetWC = IN_LOAD_CTX_WC; + frame->rootScope->insertField( el->name, el ); +} + +void Compiler::initIntObject( ) +{ + intObj = ObjectDef::cons( ObjectDef::BuiltinType, "int", nextObjectId++ ); + intLangEl->objectDef = intObj; + + initFunction( uniqueTypeStr, intObj, "to_string", IN_INT_TO_STR, IN_INT_TO_STR, true ); +} + +void Compiler::initStrObject( ) +{ + strObj = ObjectDef::cons( ObjectDef::BuiltinType, "str", nextObjectId++ ); + strLangEl->objectDef = strObj; + + initFunction( uniqueTypeInt, strObj, "atoi", IN_STR_ATOI, IN_STR_ATOI, true ); + initFunction( uniqueTypeInt, strObj, "uord8", IN_STR_UORD8, IN_STR_UORD8, true ); + initFunction( uniqueTypeInt, strObj, "sord8", IN_STR_SORD8, IN_STR_SORD8, true ); + initFunction( uniqueTypeInt, strObj, "uord16", IN_STR_UORD16, IN_STR_UORD16, true ); + initFunction( uniqueTypeInt, strObj, "sord16", IN_STR_SORD16, IN_STR_SORD16, true ); + initFunction( uniqueTypeInt, strObj, "uord32", IN_STR_UORD32, IN_STR_UORD32, true ); + initFunction( uniqueTypeInt, strObj, "sord32", IN_STR_SORD32, IN_STR_SORD32, true ); + addLengthField( strObj, IN_STR_LENGTH ); + + initFunction( uniqueTypeStr, globalObjectDef, "sprintf", + IN_SPRINTF, IN_SPRINTF, uniqueTypeStr, uniqueTypeInt, true ); +} + +void Compiler::initStreamObject( ) +{ + streamObj = ObjectDef::cons( ObjectDef::BuiltinType, + "stream", nextObjectId++ ); + streamLangEl->objectDef = streamObj; + + initFunction( uniqueTypeStr, streamObj, "pull", + IN_INPUT_PULL_WV, IN_INPUT_PULL_WC, uniqueTypeInt, false ); + initFunction( uniqueTypeStr, streamObj, "push", + IN_INPUT_PUSH_WV, IN_INPUT_PUSH_WV, uniqueTypeAny, false ); + initFunction( uniqueTypeStr, streamObj, "push_ignore", + IN_INPUT_PUSH_IGNORE_WV, IN_INPUT_PUSH_IGNORE_WV, uniqueTypeAny, false ); +} + +ObjectField *Compiler::makeDataEl() +{ + /* Create the "data" field. */ + TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStr ); + ObjectField *el = ObjectField::cons( internal, typeRef, "data" ); + + /* Setting beenReferenced to true prevents us from assigning instructions + * and an offset to the field. */ + + el->beenReferenced = true; + el->beenInitialized = true; + el->useOffset = false; + el->inGetR = IN_GET_TOKEN_DATA_R; + el->inSetWC = IN_SET_TOKEN_DATA_WC; + el->inSetWV = IN_SET_TOKEN_DATA_WV; + return el; +} + +ObjectField *Compiler::makePosEl() +{ + /* Create the "data" field. */ + TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeInt ); + ObjectField *el = ObjectField::cons( internal, typeRef, "pos" ); + + /* Setting beenReferenced to true prevents us from assigning instructions + * and an offset to the field. */ + + el->isConst = true; + el->beenReferenced = true; + el->beenInitialized = true; + el->useOffset = false; + el->inGetR = IN_GET_TOKEN_POS_R; + return el; +} + +ObjectField *Compiler::makeLineEl() +{ + /* Create the "data" field. */ + TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeInt ); + ObjectField *el = ObjectField::cons( internal, typeRef, "line" ); + + /* Setting beenReferenced to true prevents us from assigning instructions + * and an offset to the field. */ + + el->isConst = true; + el->beenReferenced = true; + el->beenInitialized = true; + el->useOffset = false; + el->inGetR = IN_GET_TOKEN_LINE_R; + return el; +} + +void Compiler::initFieldInstructions( ObjectField *el ) +{ + el->inGetR = IN_GET_FIELD_R; + el->inGetWC = IN_GET_FIELD_WC; + el->inGetWV = IN_GET_FIELD_WV; + el->inSetWC = IN_SET_FIELD_WC; + el->inSetWV = IN_SET_FIELD_WV; +} + +void Compiler::initLocalInstructions( ObjectField *el ) +{ + el->inGetR = IN_GET_LOCAL_R; + el->inGetWC = IN_GET_LOCAL_WC; + el->inSetWC = IN_SET_LOCAL_WC; +} + +void Compiler::initLocalRefInstructions( ObjectField *el ) +{ + el->inGetR = IN_GET_LOCAL_REF_R; + el->inGetWC = IN_GET_LOCAL_REF_WC; + el->inSetWC = IN_SET_LOCAL_REF_WC; +} + +/* Add a constant length field to the object. + * Opcode supplied by the caller. */ +void Compiler::addLengthField( ObjectDef *objDef, Code getLength ) +{ + /* Create the "length" field. */ + TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeInt ); + ObjectField *el = ObjectField::cons( internal, typeRef, "length" ); + el->beenReferenced = true; + el->beenInitialized = true; + el->isConst = true; + el->useOffset = false; + el->inGetR = getLength; + + objDef->rootScope->insertField( el->name, el ); +} + +void Compiler::initTokenObjects( ) +{ + /* Give all user terminals the token object type. */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->type == LangEl::Term ) { + if ( lel->objectDef != 0 ) { + /* Create the "data" field. */ + ObjectField *dataEl = makeDataEl(); + lel->objectDef->rootScope->insertField( dataEl->name, dataEl ); + + /* Create the "pos" field. */ + ObjectField *posEl = makePosEl(); + lel->objectDef->rootScope->insertField( posEl->name, posEl ); + + /* Create the "line" field. */ + ObjectField *lineEl = makeLineEl(); + lel->objectDef->rootScope->insertField( lineEl->name, lineEl ); + } + } + } +} + +void Compiler::initGlobalFunctions() +{ + ObjMethod *method; + + method = initFunction( uniqueTypeStream, globalObjectDef, "open", + IN_OPEN_FILE, IN_OPEN_FILE, uniqueTypeStr, uniqueTypeStr, true ); + method->useCallObj = false; + + method = initFunction( uniqueTypeStr, globalObjectDef, "tolower", + IN_TO_LOWER, IN_TO_LOWER, uniqueTypeStr, true ); + method->useCallObj = false; + + method = initFunction( uniqueTypeStr, globalObjectDef, "toupper", + IN_TO_UPPER, IN_TO_UPPER, uniqueTypeStr, true ); + method->useCallObj = false; + + method = initFunction( uniqueTypeInt, globalObjectDef, "exit", + IN_EXIT, IN_EXIT, uniqueTypeInt, true ); + + method = initFunction( uniqueTypeInt, globalObjectDef, "system", + IN_SYSTEM, IN_SYSTEM, uniqueTypeStr, true ); + + addStdin(); + addStdout(); + addStderr(); + addArgv(); + addError(); +} + +void Compiler::addStdin() +{ + /* Make the type ref. */ + TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStream ); + + /* Create the field and insert it into the map. */ + ObjectField *el = ObjectField::cons( internal, typeRef, "stdin" ); + el->beenReferenced = true; + el->beenInitialized = true; + el->isConst = true; + el->useOffset = false; + el->inGetR = IN_GET_STDIN; + el->inGetWC = IN_GET_STDIN; + el->inGetWV = IN_GET_STDIN; + globalObjectDef->rootScope->insertField( el->name, el ); +} + +void Compiler::addStdout() +{ + /* Make the type ref. */ + TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStream ); + + /* Create the field and insert it into the map. */ + ObjectField *el = ObjectField::cons( internal, typeRef, "stdout" ); + el->beenReferenced = true; + el->beenInitialized = true; + el->isConst = true; + el->useOffset = false; + el->inGetR = IN_GET_STDOUT; + el->inGetWC = IN_GET_STDOUT; + el->inGetWV = IN_GET_STDOUT; + globalObjectDef->rootScope->insertField( el->name, el ); +} + +void Compiler::addStderr() +{ + /* Make the type ref. */ + TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStream ); + + /* Create the field and insert it into the map. */ + ObjectField *el = ObjectField::cons( internal, typeRef, "stderr" ); + el->beenReferenced = true; + el->beenInitialized = true; + el->isConst = true; + el->useOffset = false; + el->inGetR = IN_GET_STDERR; + el->inGetWC = IN_GET_STDERR; + el->inGetWV = IN_GET_STDERR; + globalObjectDef->rootScope->insertField( el->name, el ); +} + +void Compiler::addArgv() +{ + /* Create the field and insert it into the map. */ + ObjectField *el = ObjectField::cons( internal, argvTypeRef, "argv" ); + el->isArgv = true; + el->isConst = true; + globalObjectDef->rootScope->insertField( el->name, el ); +} + +void Compiler::addError() +{ + /* Make the type ref. */ + TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStr ); + + /* Create the field and insert it into the map. */ + ObjectField *el = ObjectField::cons( internal, typeRef, "error" ); + el->beenReferenced = true; + el->beenInitialized = true; + el->isConst = true; + el->useOffset = false; + el->inGetR = IN_GET_ERROR; + el->inGetWC = IN_GET_ERROR; + el->inGetWV = IN_GET_ERROR; + globalObjectDef->rootScope->insertField( el->name, el ); +} + +int Compiler::argvOffset() +{ + for ( ObjFieldList::Iter field = *globalObjectDef->objFieldList; + field.lte(); field++ ) + { + if ( field->value->isArgv ) { + globalObjectDef->referenceField( this, field->value ); + return field->value->offset; + } + } + assert(false); +} + +void Compiler::initMapFunctions( GenericType *gen ) +{ + addLengthField( gen->objDef, IN_MAP_LENGTH ); + initFunction( gen->utArg, gen->objDef, "find", + IN_MAP_FIND, IN_MAP_FIND, gen->keyUT, true ); + initFunction( uniqueTypeInt, gen->objDef, "insert", + IN_MAP_INSERT_WV, IN_MAP_INSERT_WC, gen->keyUT, gen->utArg, false ); + initFunction( uniqueTypeInt, gen->objDef, "store", + IN_MAP_STORE_WV, IN_MAP_STORE_WC, gen->keyUT, gen->utArg, false ); + initFunction( gen->utArg, gen->objDef, "remove", + IN_MAP_REMOVE_WV, IN_MAP_REMOVE_WC, gen->keyUT, false ); +} + +void Compiler::initListFunctions( GenericType *gen ) +{ + addLengthField( gen->objDef, IN_LIST_LENGTH ); + + initFunction( uniqueTypeInt, gen->objDef, "append", + IN_LIST_APPEND_WV, IN_LIST_APPEND_WC, gen->utArg, false ); + initFunction( uniqueTypeInt, gen->objDef, "push", + IN_LIST_APPEND_WV, IN_LIST_APPEND_WC, gen->utArg, false ); + + initFunction( gen->utArg, gen->objDef, "remove_end", + IN_LIST_REMOVE_END_WV, IN_LIST_REMOVE_END_WC, false ); + initFunction( gen->utArg, gen->objDef, "pop", + IN_LIST_REMOVE_END_WV, IN_LIST_REMOVE_END_WC, false ); +} + +void Compiler::initListField( GenericType *gen, const char *name, int offset ) +{ + /* Make the type ref and create the field. */ + TypeRef *typeRef = TypeRef::cons( internal, gen->utArg ); + ObjectField *el = ObjectField::cons( internal, typeRef, name ); + + el->inGetR = IN_GET_LIST_MEM_R; + el->inGetWC = IN_GET_LIST_MEM_WC; + el->inGetWV = IN_GET_LIST_MEM_WV; + el->inSetWC = IN_SET_LIST_MEM_WC; + el->inSetWV = IN_SET_LIST_MEM_WV; + + gen->objDef->rootScope->insertField( el->name, el ); + + el->useOffset = true; + el->beenReferenced = true; + el->beenInitialized = true; + + /* Zero for head, One for tail. */ + el->offset = offset; +} + +void Compiler::initListFields( GenericType *gen ) +{ + initListField( gen, "head", 0 ); + initListField( gen, "tail", 1 ); + initListField( gen, "top", 1 ); +} + +void Compiler::initVectorFunctions( GenericType *gen ) +{ + addLengthField( gen->objDef, IN_VECTOR_LENGTH ); + initFunction( uniqueTypeInt, gen->objDef, "append", + IN_VECTOR_APPEND_WV, IN_VECTOR_APPEND_WC, gen->utArg, false ); + initFunction( uniqueTypeInt, gen->objDef, "insert", + IN_VECTOR_INSERT_WV, IN_VECTOR_INSERT_WC, uniqueTypeInt, gen->utArg, false ); +} + +void Compiler::initParserFunctions( GenericType *gen ) +{ + initFunction( gen->utArg, gen->objDef, "finish", + IN_PARSE_FINISH_WV, IN_PARSE_FINISH_WC, true ); + + initFunction( gen->utArg, gen->objDef, "eof", + IN_PARSE_FINISH_WV, IN_PARSE_FINISH_WC, true ); +} + +void Compiler::initParserField( GenericType *gen, const char *name, int offset, TypeRef *typeRef ) +{ + /* Make the type ref and create the field. */ + ObjectField *el = ObjectField::cons( internal, typeRef, name ); + + el->inGetR = IN_GET_PARSER_MEM_R; + el->inGetWC = IN_GET_PARSER_MEM_WC; + el->inGetWV = IN_GET_PARSER_MEM_WV; + el->inSetWC = IN_SET_PARSER_MEM_WC; + el->inSetWV = IN_SET_PARSER_MEM_WV; + + gen->objDef->rootScope->insertField( el->name, el ); + + el->useOffset = true; + el->beenReferenced = true; + el->beenInitialized = true; + + /* Zero for head, One for tail. */ + el->offset = offset; +} + +void Compiler::initCtxField( GenericType *gen ) +{ + LangEl *langEl = gen->utArg->langEl; + Context *context = langEl->contextIn; + + /* Make the type ref and create the field. */ + UniqueType *ctxUT = findUniqueType( TYPE_TREE, context->lel ); + TypeRef *typeRef = TypeRef::cons( internal, ctxUT ); + ObjectField *el = ObjectField::cons( internal, typeRef, "ctx" ); + + el->inGetR = IN_GET_PARSER_CTX_R; + el->inGetWC = IN_GET_PARSER_CTX_WC; + el->inGetWV = IN_GET_PARSER_CTX_WV; + el->inSetWC = IN_SET_PARSER_CTX_WC; + el->inSetWV = IN_SET_PARSER_CTX_WV; + + gen->objDef->rootScope->insertField( el->name, el ); + + el->useOffset = false; + el->beenReferenced = true; + el->beenInitialized = true; +} + +void Compiler::initParserFields( GenericType *gen ) +{ + LangEl *langEl = gen->utArg->langEl; + if ( langEl->contextIn != 0 ) + initCtxField( gen ); + + TypeRef *typeRef; + + typeRef = TypeRef::cons( internal, gen->utArg ); + initParserField( gen, "tree", 0, typeRef ); + + typeRef = TypeRef::cons( internal, uniqueTypeStr ); + initParserField( gen, "error", 1, typeRef ); +} + +void Compiler::makeFuncVisible( Function *func, bool isUserIter ) +{ + func->localFrame = func->codeBlock->localFrame; + + /* Set up the parameters. */ + long paramPos = 0; + for ( ParameterList::Iter param = *func->paramList; param.lte(); param++ ) { + if ( func->localFrame->rootScope->findField( param->name ) != 0 ) + error(param->loc) << "parameter " << param->name << " redeclared" << endp; + + func->localFrame->rootScope->insertField( param->name, param ); + param->beenInitialized = true; + param->pos = paramPos; + + paramPos += 1; + } + + /* Insert the function into the global function map. */ + ObjMethod *objMethod = new ObjMethod( func->typeRef, func->name, + IN_CALL_WV, IN_CALL_WC, + func->paramList->length(), 0, func->paramList, false ); + objMethod->funcId = func->funcId; + objMethod->useFuncId = true; + objMethod->useCallObj = false; + objMethod->func = func; + + if ( isUserIter ) { + IterDef *uiter = findIterDef( IterDef::User, func ); + objMethod->iterDef = uiter; + } + + globalObjectDef->objMethodMap->insert( func->name, objMethod ); + + func->objMethod = objMethod; +} + +/* + * Type Declaration Root. + */ +void Compiler::declarePass() +{ + declareReVars(); + + makeDefaultIterators(); + + for ( FunctionList::Iter f = functionList; f.lte(); f++ ) + makeFuncVisible( f, f->isUserIter ); + + rootNamespace->declare( this ); + + /* Will fill in zero lels that were not declared. */ + makeIgnoreCollectors(); + + declareByteCode(); + + initIntObject(); + initStrObject(); + initStreamObject(); + initTokenObjects(); + initGlobalFunctions(); + + /* Fill any empty scanners with a default token. */ + initEmptyScanners(); +} diff --git a/src/defs.h b/src/defs.h new file mode 100644 index 0000000..95a4c2c --- /dev/null +++ b/src/defs.h @@ -0,0 +1,31 @@ +/* src/defs.h. Generated from defs.h.in by configure. */ +/* + * Copyright 2001 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Ragel. + * + * Ragel 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 2 of the License, or + * (at your option) any later version. + * + * Ragel 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 Ragel; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _CONFIG_H +#define _CONFIG_H + +/* Configuration */ + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +#endif /* _CONFIG_H */ diff --git a/src/defs.h.in b/src/defs.h.in new file mode 100644 index 0000000..4281536 --- /dev/null +++ b/src/defs.h.in @@ -0,0 +1,30 @@ +/* + * Copyright 2001 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Ragel. + * + * Ragel 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 2 of the License, or + * (at your option) any later version. + * + * Ragel 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 Ragel; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _CONFIG_H +#define _CONFIG_H + +/* Configuration */ + +/* The size of `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +#endif /* _CONFIG_H */ diff --git a/src/dotgen.cc b/src/dotgen.cc new file mode 100644 index 0000000..e207805 --- /dev/null +++ b/src/dotgen.cc @@ -0,0 +1,115 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include "global.h" +#include "parsedata.h" + +using namespace std; + + +void Compiler::writeTransList( PdaState *state ) +{ + ostream &out = *outStream; + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + /* Write out the from and to states. */ + out << "\t" << state->stateNum << " -> " << trans->value->toState->stateNum; + + /* Begin the label. */ + out << " [ label = \""; + long key = trans->key; + LangEl *lel = langElIndex[key]; + if ( lel != 0 ) + out << lel->name; + else + out << (char)key; + + if ( trans->value->actions.length() > 0 ) { + out << " / "; + for ( ActDataList::Iter act = trans->value->actions; act.lte(); act++ ) { + switch ( *act & 0x3 ) { + case 1: + out << "S(" << trans->value->actOrds[act.pos()] << ")"; + break; + case 2: { + out << "R(" << prodIdIndex[(*act >> 2)]->data << + ", " << trans->value->actOrds[act.pos()] << ")"; + break; + } + case 3: { + out << "SR(" << prodIdIndex[(*act >> 2)]->data << + ", " << trans->value->actOrds[act.pos()] << ")"; + break; + }} + if ( ! act.last() ) + out << ", "; + } + } + + out << "\" ];\n"; + } +} + +void Compiler::writeDotFile( PdaGraph *graph ) +{ + ostream &out = *outStream; + out << + "digraph " << parserName << " {\n" + " rankdir=LR;\n" + " ranksep=\"0\"\n" + " nodesep=\"0.25\"\n" + "\n"; + + /* Define the psuedo states. Transitions will be done after the states + * have been defined as either final or not final. */ + out << + " node [ shape = point ];\n"; + + for ( int i = 0; i < graph->entryStateSet.length(); i++ ) + out << "\tENTRY" << i << " [ label = \"\" ];\n"; + + out << + "\n" + " node [ shape = circle, fixedsize = true, height = 0.6 ];\n"; + + /* Walk the states. */ + for ( PdaStateList::Iter st = graph->stateList; st.lte(); st++ ) + out << " " << st->stateNum << " [ label = \"" << st->stateNum << "\" ];\n"; + + out << "\n"; + + /* Walk the states. */ + for ( PdaStateList::Iter st = graph->stateList; st.lte(); st++ ) + writeTransList( st ); + + /* Start state and other entry points. */ + for ( PdaStateSet::Iter st = graph->entryStateSet; st.lte(); st++ ) + out << "\tENTRY" << st.pos() << " -> " << (*st)->stateNum << " [ label = \"\" ];\n"; + + out << + "}\n"; +} + +void Compiler::writeDotFile() +{ + writeDotFile( pdaGraph ); +} + diff --git a/src/dotgen.h b/src/dotgen.h new file mode 100644 index 0000000..d05a241 --- /dev/null +++ b/src/dotgen.h @@ -0,0 +1,51 @@ +/* + * Copyright 2001-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _GVDOTGEN_H +#define _GVDOTGEN_H + +#include <iostream> + +#if 0 + +class GraphvizDotGen : public CodeGenData +{ +public: + GraphvizDotGen( ostream &out ) : CodeGenData(out) { } + + /* Print an fsm to out stream. */ + void writeTransList( RedState *state ); + void writeDotFile( ); + + virtual void finishRagelDef(); + +private: + /* Writing labels and actions. */ + std::ostream &ONCHAR( Key lowKey, Key highKey ); + std::ostream &TRANS_ACTION( RedState *fromState, RedTrans *trans ); + std::ostream &ACTION( RedAction *action ); + std::ostream &KEY( Key key ); +}; + +#endif + + +#endif /* _GVDOTGEN_H */ diff --git a/src/exports.cc b/src/exports.cc new file mode 100644 index 0000000..62e0d2a --- /dev/null +++ b/src/exports.cc @@ -0,0 +1,316 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "parsedata.h" +#include "fsmcodegen.h" +#include "redfsm.h" +#include "bstmap.h" +#include "debug.h" +#include <sstream> +#include <string> + +using std::ostream; +using std::ostringstream; +using std::string; +using std::cerr; +using std::endl; + +void Compiler::openNameSpace( ostream &out, Namespace *nspace ) +{ + if ( nspace == rootNamespace ) + return; + + openNameSpace( out, nspace->parentNamespace ); + out << "namespace " << nspace->name << " { "; +} + +void Compiler::closeNameSpace( ostream &out, Namespace *nspace ) +{ + if ( nspace == rootNamespace ) + return; + + openNameSpace( out, nspace->parentNamespace ); + out << " }"; +} + +void Compiler::generateExports() +{ + ostream &out = *outStream; + + out << + "#ifndef _EXPORTS_H\n" + "#define _EXPORTS_H\n" + "\n" + "#include <colm/colm.h>\n" + "#include <string>\n" + "\n"; + + out << + "inline void appendString( colm_print_args *args, const char *data, int length )\n" + "{\n" + " std::string *str = (std::string*)args->arg;\n" + " *str += std::string( data, length );\n" + "}\n" + "\n"; + + out << + "inline std::string printTreeStr( colm_program *prg, colm_tree *tree, bool trim )\n" + "{\n" + " std::string str;\n" + " colm_print_args printArgs = { &str, 1, 0, trim, &appendString, \n" + " &colm_print_null, &colm_print_term_tree, &colm_print_null };\n" + " colm_print_tree_args( prg, colm_vm_root(prg), &printArgs, tree );\n" + " return str;\n" + "}\n" + "\n"; + + /* Declare. */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->isEOF ) + continue; + + openNameSpace( out, lel->nspace ); + out << "struct " << lel->fullName << ";"; + closeNameSpace( out, lel->nspace ); + out << "\n"; + } + + /* Class definitions. */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->isEOF ) + continue; + + openNameSpace( out, lel->nspace ); + out << "struct " << lel->fullName << "\n"; + out << "{\n"; + out << " std::string text() { return printTreeStr( __prg, __tree, true ); }\n"; + out << " colm_location *loc() { return colm_find_location( __prg, __tree ); }\n"; + out << " std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }\n"; + out << " std::string text_ws() { return printTreeStr( __prg, __tree, false ); }\n"; + out << " colm_data *data() { return __tree->tokdata; }\n"; + out << " operator colm_tree *() { return __tree; }\n"; + out << " colm_program *__prg;\n"; + out << " colm_tree *__tree;\n"; + + if ( mainReturnUT != 0 && mainReturnUT->langEl == lel ) { + out << " " << lel->fullName << + "( colm_program *prg ) : __prg(prg), __tree(returnVal(prg)) {}\n"; + } + + out << " " << lel->fullName << + "( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}\n"; + + if ( lel->objectDef != 0 && lel->objectDef->objFieldList != 0 ) { + ObjFieldList *objFieldList = lel->objectDef->objFieldList; + for ( ObjFieldList::Iter ofi = *objFieldList; ofi.lte(); ofi++ ) { + ObjectField *field = ofi->value; + if ( field->useOffset && field->typeRef != 0 ) { + UniqueType *ut = field->typeRef->resolveType( this ); + + if ( ut != 0 && ut->typeId == TYPE_TREE ) { + out << " " << ut->langEl->refName << " " << field->name << "();\n"; + } + } + + if ( field->isRhsGet ) { + UniqueType *ut = field->typeRef->resolveType( this ); + + if ( ut != 0 && ut->typeId == TYPE_TREE ) { + out << " " << ut->langEl->refName << " " << field->name << "();\n"; + } + } + } + } + + bool prodNames = false; + for ( LelDefList::Iter prod = lel->defList; prod.lte(); prod++ ) { + if ( prod->name.length() > 0 ) + prodNames = true; + } + + if ( prodNames ) { + out << " enum prod_name {\n"; + for ( LelDefList::Iter prod = lel->defList; prod.lte(); prod++ ) { + if ( prod->name.length() > 0 ) + out << "\t\t_" << prod->name << " = " << prod->prodNum << ",\n"; + } + out << " };\n"; + out << " enum prod_name prodName() " << + "{ return (enum prod_name)__tree->prodNum; }\n"; + } + + + if ( lel->isRepeat ) { + out << " " << "int end() { return colm_repeat_end( __tree ); }\n"; + out << " " << lel->refName << " next();\n"; + out << " " << lel->repeatOf->refName << " value();\n"; + } + + if ( lel->isList ) { + out << " " << "int last() { return colm_list_last( __tree ); }\n"; + out << " " << lel->refName << " next();\n"; + out << " " << lel->repeatOf->refName << " value();\n"; + } + + + out << "};"; + closeNameSpace( out, lel->nspace ); + out << "\n"; + } + + for ( ObjFieldList::Iter of = *globalObjectDef->objFieldList; of.lte(); of++ ) { + ObjectField *field = of->value; + if ( field->isExport ) { + UniqueType *ut = field->typeRef->resolveType(this); + if ( ut != 0 && ut->typeId == TYPE_TREE ) { + out << ut->langEl->refName << " " << field->name << "( colm_program *prg );\n"; + } + } + } + + out << "\n"; + + for ( FunctionList::Iter func = functionList; func.lte(); func++ ) { + if ( func->exprt ) { + char *refName = func->typeRef->uniqueType->langEl->refName; + int paramCount = func->paramList->length(); + out << + refName << " " << func->name << "( colm_program *prg"; + + for ( int p = 0; p < paramCount; p++ ) + out << ", const char *p" << p; + + out << " );\n"; + } + } + + out << "#endif\n"; +} + +void Compiler::generateExportsImpl() +{ + ostream &out = *outStream; + + if ( exportHeaderFn != 0 ) { + out << "#include \"" << exportHeaderFn << "\"\n"; + } + + /* Function implementations. */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->objectDef != 0 && lel->objectDef->objFieldList != 0 ) { + ObjFieldList *objFieldList = lel->objectDef->objFieldList; + for ( ObjFieldList::Iter ofi = *objFieldList; ofi.lte(); ofi++ ) { + ObjectField *field = ofi->value; + if ( field->useOffset && field->typeRef != 0 ) { + UniqueType *ut = field->typeRef->resolveType( this ); + + if ( ut != 0 && ut->typeId == TYPE_TREE ) { + out << ut->langEl->refName << " " << lel->declName << "::" << field->name << + "() { return " << ut->langEl->refName << + "( __prg, colm_get_attr( __tree, " << field->offset << ") ); }\n"; + } + } + + if ( field->isRhsGet ) { + UniqueType *ut = field->typeRef->resolveType( this ); + + if ( ut != 0 && ut->typeId == TYPE_TREE ) { + out << ut->langEl->refName << " " << lel->declName << "::" << field->name << + "() { static int a[] = {"; + + /* Need to place the array computing the val. */ + out << field->rhsVal.length(); + for ( Vector<RhsVal>::Iter rg = field->rhsVal; rg.lte(); rg++ ) { + out << ", " << rg->prodEl->production->prodNum; + out << ", " << rg->prodEl->pos; + } + + out << "}; return " << ut->langEl->refName << + "( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }\n"; + } + } + } + } + + if ( lel->isRepeat ) { + out << lel->refName << " " << lel->declName << "::" << " next" + "() { return " << lel->refName << + "( __prg, colm_get_repeat_next( __tree ) ); }\n"; + + out << lel->repeatOf->refName << " " << lel->declName << "::" << " value" + "() { return " << lel->repeatOf->refName << + "( __prg, colm_get_repeat_val( __tree ) ); }\n"; + + } + + if ( lel->isList ) { + out << lel->refName << " " << lel->declName << "::" << " next" + "() { return " << lel->refName << + "( __prg, colm_get_repeat_next( __tree ) ); }\n"; + + out << lel->repeatOf->refName << " " << lel->declName << "::" << " value" + "() { return " << lel->repeatOf->refName << + "( __prg, colm_get_repeat_val( __tree ) ); }\n"; + } + } + + out << "\n"; + + for ( ObjFieldList::Iter of = *globalObjectDef->objFieldList; of.lte(); of++ ) { + ObjectField *field = of->value; + if ( field->isExport ) { + UniqueType *ut = field->typeRef->resolveType(this); + if ( ut != 0 && ut->typeId == TYPE_TREE ) { + out << + ut->langEl->refName << " " << field->name << "( colm_program *prg )\n" + "{ return " << ut->langEl->refName << "( prg, colm_get_global( prg, " << + field->offset << ") ); }\n"; + } + } + } + + out << "\n"; + + for ( FunctionList::Iter func = functionList; func.lte(); func++ ) { + if ( func->exprt ) { + char *refName = func->typeRef->uniqueType->langEl->refName; + int paramCount = func->paramList->length(); + out << + refName << " " << func->name << "( colm_program *prg"; + + for ( int p = 0; p < paramCount; p++ ) + out << ", const char *p" << p; + + out << " )\n" + "{\n" + " int funcId = " << func->funcId << ";\n" + " const char *params[" << paramCount << "];\n"; + + for ( int p = 0; p < paramCount; p++ ) + out << " params[" << p << "] = p" << p << ";\n"; + + out << + " return " << refName << + "( prg, colm_run_func( prg, funcId, params, " << paramCount << " ));\n" + "}\n"; + } + } +} diff --git a/src/fsmap.cc b/src/fsmap.cc new file mode 100644 index 0000000..cd95561 --- /dev/null +++ b/src/fsmap.cc @@ -0,0 +1,804 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "defs.h" +#include "fsmgraph.h" +#include <iostream> + +using std::cerr; +using std::endl; + +KeyOps *keyOps = 0; + +/* Insert an action into an action table. */ +void ActionTable::setAction( int ordering, Action *action ) +{ + /* Multi-insert in case specific instances of an action appear in a + * transition more than once. */ + insertMulti( ordering, action ); +} + +/* Set all the action from another action table in this table. */ +void ActionTable::setActions( const ActionTable &other ) +{ + for ( ActionTable::Iter action = other; action.lte(); action++ ) + insertMulti( action->key, action->value ); +} + +void ActionTable::setActions( int *orderings, Action **actions, int nActs ) +{ + for ( int a = 0; a < nActs; a++ ) + insertMulti( orderings[a], actions[a] ); +} + +bool ActionTable::hasAction( Action *action ) +{ + for ( int a = 0; a < length(); a++ ) { + if ( data[a].value == action ) + return true; + } + return false; +} + +/* Insert an action into an action table. */ +void LmActionTable::setAction( int ordering, TokenInstance *action ) +{ + /* Multi-insert in case specific instances of an action appear in a + * transition more than once. */ + insertMulti( ordering, action ); +} + +/* Set all the action from another action table in this table. */ +void LmActionTable::setActions( const LmActionTable &other ) +{ + for ( LmActionTable::Iter action = other; action.lte(); action++ ) + insertMulti( action->key, action->value ); +} + +void ErrActionTable::setAction( int ordering, Action *action, int transferPoint ) +{ + insertMulti( ErrActionTableEl( action, ordering, transferPoint ) ); +} + +void ErrActionTable::setActions( const ErrActionTable &other ) +{ + for ( ErrActionTable::Iter act = other; act.lte(); act++ ) + insertMulti( ErrActionTableEl( act->action, act->ordering, act->transferPoint ) ); +} + +/* Insert a priority into this priority table. Looks out for priorities on + * duplicate keys. */ +void PriorTable::setPrior( int ordering, PriorDesc *desc ) +{ + PriorEl *lastHit = 0; + PriorEl *insed = insert( PriorEl(ordering, desc), &lastHit ); + if ( insed == 0 ) { + /* This already has a priority on the same key as desc. Overwrite the + * priority if the ordering is larger (later in time). */ + if ( ordering >= lastHit->ordering ) + *lastHit = PriorEl( ordering, desc ); + } +} + +/* Set all the priorities from a priorTable in this table. */ +void PriorTable::setPriors( const PriorTable &other ) +{ + /* Loop src priorities once to overwrite duplicates. */ + PriorTable::Iter priorIt = other; + for ( ; priorIt.lte(); priorIt++ ) + setPrior( priorIt->ordering, priorIt->desc ); +} + +/* Set the priority of starting transitions. Isolates the start state so it has + * no other entry points, then sets the priorities of all the transitions out + * of the start state. If the start state is final, then the outPrior of the + * start state is also set. The idea is that a machine that accepts the null + * string can still specify the starting trans prior for when it accepts the + * null word. */ +void FsmGraph::startFsmPrior( int ordering, PriorDesc *prior ) +{ + /* Make sure the start state has no other entry points. */ + isolateStartState(); + + /* Walk all transitions out of the start state. */ + for ( TransList::Iter trans = startState->outList; trans.lte(); trans++ ) { + if ( trans->toState != 0 ) + trans->priorTable.setPrior( ordering, prior ); + } +} + +/* Set the priority of all transitions in a graph. Walks all transition lists + * and all def transitions. */ +void FsmGraph::allTransPrior( int ordering, PriorDesc *prior ) +{ + /* Walk the list of all states. */ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + /* Walk the out list of the state. */ + for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) { + if ( trans->toState != 0 ) + trans->priorTable.setPrior( ordering, prior ); + } + } +} + +/* Set the priority of all transitions that go into a final state. Note that if + * any entry states are final, we will not be setting the priority of any + * transitions that may go into those states in the future. The graph does not + * support pending in transitions in the same way pending out transitions are + * supported. */ +void FsmGraph::finishFsmPrior( int ordering, PriorDesc *prior ) +{ + /* Walk all final states. */ + for ( StateSet::Iter state = finStateSet; state.lte(); state++ ) { + /* Walk all in transitions of the final state. */ + for ( TransInList::Iter trans = (*state)->inList; trans.lte(); trans++ ) + trans->priorTable.setPrior( ordering, prior ); + } +} + +/* Set the priority of any future out transitions that may be made going out of + * this state machine. */ +void FsmGraph::leaveFsmPrior( int ordering, PriorDesc *prior ) +{ + /* Set priority in all final states. */ + for ( StateSet::Iter state = finStateSet; state.lte(); state++ ) + (*state)->outPriorTable.setPrior( ordering, prior ); +} + + +/* Set actions to execute on starting transitions. Isolates the start state + * so it has no other entry points, then adds to the transition functions + * of all the transitions out of the start state. If the start state is final, + * then the func is also added to the start state's out func list. The idea is + * that a machine that accepts the null string can execute a start func when it + * matches the null word, which can only be done when leaving the start/final + * state. */ +void FsmGraph::startFsmAction( int ordering, Action *action ) +{ + /* Make sure the start state has no other entry points. */ + isolateStartState(); + + /* Walk the start state's transitions, setting functions. */ + for ( TransList::Iter trans = startState->outList; trans.lte(); trans++ ) { + if ( trans->toState != 0 ) + trans->actionTable.setAction( ordering, action ); + } +} + +/* Set functions to execute on all transitions. Walks the out lists of all + * states. */ +void FsmGraph::allTransAction( int ordering, Action *action ) +{ + /* Walk all states. */ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + /* Walk the out list of the state. */ + for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) { + if ( trans->toState != 0 ) + trans->actionTable.setAction( ordering, action ); + } + } +} + +/* Specify functions to execute upon entering final states. If the start state + * is final we can't really specify a function to execute upon entering that + * final state the first time. So function really means whenever entering a + * final state from within the same fsm. */ +void FsmGraph::finishFsmAction( int ordering, Action *action ) +{ + /* Walk all final states. */ + for ( StateSet::Iter state = finStateSet; state.lte(); state++ ) { + /* Walk the final state's in list. */ + for ( TransInList::Iter trans = (*state)->inList; trans.lte(); trans++ ) + trans->actionTable.setAction( ordering, action ); + } +} + +/* Add functions to any future out transitions that may be made going out of + * this state machine. */ +void FsmGraph::leaveFsmAction( int ordering, Action *action ) +{ + /* Insert the action in the outActionTable of all final states. */ + for ( StateSet::Iter state = finStateSet; state.lte(); state++ ) + (*state)->outActionTable.setAction( ordering, action ); +} + +/* Add functions to the longest match action table for constructing scanners. */ +void FsmGraph::longMatchAction( int ordering, TokenInstance *lmPart ) +{ + /* Walk all final states. */ + for ( StateSet::Iter state = finStateSet; state.lte(); state++ ) { + /* Walk the final state's in list. */ + for ( TransInList::Iter trans = (*state)->inList; trans.lte(); trans++ ) + trans->lmActionTable.setAction( ordering, lmPart ); + } +} + +void FsmGraph::fillGaps( FsmState *state ) +{ + if ( state->outList.length() == 0 ) { + /* Add the range on the lower and upper bound. */ + attachNewTrans( state, 0, keyOps->minKey, keyOps->maxKey ); + } + else { + TransList srcList; + srcList.transfer( state->outList ); + + /* Check for a gap at the beginning. */ + TransList::Iter trans = srcList, next; + if ( keyOps->minKey < trans->lowKey ) { + /* Make the high key and append. */ + Key highKey = trans->lowKey; + highKey.decrement(); + + attachNewTrans( state, 0, keyOps->minKey, highKey ); + } + + /* Write the transition. */ + next = trans.next(); + state->outList.append( trans ); + + /* Keep the last high end. */ + Key lastHigh = trans->highKey; + + /* Loop each source range. */ + for ( trans = next; trans.lte(); trans = next ) { + /* Make the next key following the last range. */ + Key nextKey = lastHigh; + nextKey.increment(); + + /* Check for a gap from last up to here. */ + if ( nextKey < trans->lowKey ) { + /* Make the high end of the range that fills the gap. */ + Key highKey = trans->lowKey; + highKey.decrement(); + + attachNewTrans( state, 0, nextKey, highKey ); + } + + /* Reduce the transition. If it reduced to anything then add it. */ + next = trans.next(); + state->outList.append( trans ); + + /* Keep the last high end. */ + lastHigh = trans->highKey; + } + + /* Now check for a gap on the end to fill. */ + if ( lastHigh < keyOps->maxKey ) { + /* Get a copy of the default. */ + lastHigh.increment(); + + attachNewTrans( state, 0, lastHigh, keyOps->maxKey ); + } + } +} + +void FsmGraph::setErrorAction( FsmState *state, int ordering, Action *action ) +{ + /* Fill any gaps in the out list with an error transition. */ + fillGaps( state ); + + /* Set error transitions in the transitions that go to error. */ + for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) { + if ( trans->toState == 0 ) + trans->actionTable.setAction( ordering, action ); + } +} + +void FsmGraph::setErrorActions( FsmState *state, const ActionTable &other ) +{ + /* Fill any gaps in the out list with an error transition. */ + fillGaps( state ); + + /* Set error transitions in the transitions that go to error. */ + for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) { + if ( trans->toState == 0 ) + trans->actionTable.setActions( other ); + } +} + + +/* Give a target state for error transitions. */ +void FsmGraph::setErrorTarget( FsmState *state, FsmState *target, int *orderings, + Action **actions, int nActs ) +{ + /* Fill any gaps in the out list with an error transition. */ + fillGaps( state ); + + /* Set error target in the transitions that go to error. */ + for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) { + if ( trans->toState == 0 ) { + /* The trans goes to error, redirect it. */ + redirectErrorTrans( trans->fromState, target, trans ); + trans->actionTable.setActions( orderings, actions, nActs ); + } + } +} + +void FsmGraph::transferErrorActions( FsmState *state, int transferPoint ) +{ + for ( int i = 0; i < state->errActionTable.length(); ) { + ErrActionTableEl *act = state->errActionTable.data + i; + if ( act->transferPoint == transferPoint ) { + /* Transfer the error action and remove it. */ + setErrorAction( state, act->ordering, act->action ); + state->errActionTable.vremove( i ); + } + else { + /* Not transfering and deleting, skip over the item. */ + i += 1; + } + } +} + +/* Set error actions in the start state. */ +void FsmGraph::startErrorAction( int ordering, Action *action, int transferPoint ) +{ + /* Make sure the start state has no other entry points. */ + isolateStartState(); + + /* Add the actions. */ + startState->errActionTable.setAction( ordering, action, transferPoint ); +} + +/* Set error actions in all states where there is a transition out. */ +void FsmGraph::allErrorAction( int ordering, Action *action, int transferPoint ) +{ + /* Insert actions in the error action table of all states. */ + for ( StateList::Iter state = stateList; state.lte(); state++ ) + state->errActionTable.setAction( ordering, action, transferPoint ); +} + +/* Set error actions in final states. */ +void FsmGraph::finalErrorAction( int ordering, Action *action, int transferPoint ) +{ + /* Add the action to the error table of final states. */ + for ( StateSet::Iter state = finStateSet; state.lte(); state++ ) + (*state)->errActionTable.setAction( ordering, action, transferPoint ); +} + +void FsmGraph::notStartErrorAction( int ordering, Action *action, int transferPoint ) +{ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + if ( state != startState ) + state->errActionTable.setAction( ordering, action, transferPoint ); + } +} + +void FsmGraph::notFinalErrorAction( int ordering, Action *action, int transferPoint ) +{ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + if ( ! state->isFinState() ) + state->errActionTable.setAction( ordering, action, transferPoint ); + } +} + +/* Set error actions in the states that have transitions into a final state. */ +void FsmGraph::middleErrorAction( int ordering, Action *action, int transferPoint ) +{ + /* Isolate the start state in case it is reachable from in inside the + * machine, in which case we don't want it set. */ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + if ( state != startState && ! state->isFinState() ) + state->errActionTable.setAction( ordering, action, transferPoint ); + } +} + +/* Set EOF actions in the start state. */ +void FsmGraph::startEOFAction( int ordering, Action *action ) +{ + /* Make sure the start state has no other entry points. */ + isolateStartState(); + + /* Add the actions. */ + startState->eofActionTable.setAction( ordering, action ); +} + +/* Set EOF actions in all states where there is a transition out. */ +void FsmGraph::allEOFAction( int ordering, Action *action ) +{ + /* Insert actions in the EOF action table of all states. */ + for ( StateList::Iter state = stateList; state.lte(); state++ ) + state->eofActionTable.setAction( ordering, action ); +} + +/* Set EOF actions in final states. */ +void FsmGraph::finalEOFAction( int ordering, Action *action ) +{ + /* Add the action to the error table of final states. */ + for ( StateSet::Iter state = finStateSet; state.lte(); state++ ) + (*state)->eofActionTable.setAction( ordering, action ); +} + +void FsmGraph::notStartEOFAction( int ordering, Action *action ) +{ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + if ( state != startState ) + state->eofActionTable.setAction( ordering, action ); + } +} + +void FsmGraph::notFinalEOFAction( int ordering, Action *action ) +{ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + if ( ! state->isFinState() ) + state->eofActionTable.setAction( ordering, action ); + } +} + +/* Set EOF actions in the states that have transitions into a final state. */ +void FsmGraph::middleEOFAction( int ordering, Action *action ) +{ + /* Set the actions in all states that are not the start state and not final. */ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + if ( state != startState && ! state->isFinState() ) + state->eofActionTable.setAction( ordering, action ); + } +} + +/* + * Set To State Actions. + */ + +/* Set to state actions in the start state. */ +void FsmGraph::startToStateAction( int ordering, Action *action ) +{ + /* Make sure the start state has no other entry points. */ + isolateStartState(); + startState->toStateActionTable.setAction( ordering, action ); +} + +/* Set to state actions in all states. */ +void FsmGraph::allToStateAction( int ordering, Action *action ) +{ + /* Insert the action on all states. */ + for ( StateList::Iter state = stateList; state.lte(); state++ ) + state->toStateActionTable.setAction( ordering, action ); +} + +/* Set to state actions in final states. */ +void FsmGraph::finalToStateAction( int ordering, Action *action ) +{ + /* Add the action to the error table of final states. */ + for ( StateSet::Iter state = finStateSet; state.lte(); state++ ) + (*state)->toStateActionTable.setAction( ordering, action ); +} + +void FsmGraph::notStartToStateAction( int ordering, Action *action ) +{ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + if ( state != startState ) + state->toStateActionTable.setAction( ordering, action ); + } +} + +void FsmGraph::notFinalToStateAction( int ordering, Action *action ) +{ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + if ( ! state->isFinState() ) + state->toStateActionTable.setAction( ordering, action ); + } +} + +/* Set to state actions in states that are not final and not the start state. */ +void FsmGraph::middleToStateAction( int ordering, Action *action ) +{ + /* Set the action in all states that are not the start state and not final. */ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + if ( state != startState && ! state->isFinState() ) + state->toStateActionTable.setAction( ordering, action ); + } +} + +/* + * Set From State Actions. + */ + +void FsmGraph::startFromStateAction( int ordering, Action *action ) +{ + /* Make sure the start state has no other entry points. */ + isolateStartState(); + startState->fromStateActionTable.setAction( ordering, action ); +} + +void FsmGraph::allFromStateAction( int ordering, Action *action ) +{ + /* Insert the action on all states. */ + for ( StateList::Iter state = stateList; state.lte(); state++ ) + state->fromStateActionTable.setAction( ordering, action ); +} + +void FsmGraph::finalFromStateAction( int ordering, Action *action ) +{ + /* Add the action to the error table of final states. */ + for ( StateSet::Iter state = finStateSet; state.lte(); state++ ) + (*state)->fromStateActionTable.setAction( ordering, action ); +} + +void FsmGraph::notStartFromStateAction( int ordering, Action *action ) +{ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + if ( state != startState ) + state->fromStateActionTable.setAction( ordering, action ); + } +} + +void FsmGraph::notFinalFromStateAction( int ordering, Action *action ) +{ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + if ( ! state->isFinState() ) + state->fromStateActionTable.setAction( ordering, action ); + } +} + +void FsmGraph::middleFromStateAction( int ordering, Action *action ) +{ + /* Set the action in all states that are not the start state and not final. */ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + if ( state != startState && ! state->isFinState() ) + state->fromStateActionTable.setAction( ordering, action ); + } +} + +/* Shift the function ordering of the start transitions to start + * at fromOrder and increase in units of 1. Useful before staring. + * Returns the maximum number of order numbers used. */ +int FsmGraph::shiftStartActionOrder( int fromOrder ) +{ + int maxUsed = 0; + + /* Walk the start state's transitions, shifting function ordering. */ + for ( TransList::Iter trans = startState->outList; trans.lte(); trans++ ) { + /* Walk the function data for the transition and set the keys to + * increasing values starting at fromOrder. */ + int curFromOrder = fromOrder; + ActionTable::Iter action = trans->actionTable; + for ( ; action.lte(); action++ ) + action->key = curFromOrder++; + + /* Keep track of the max number of orders used. */ + if ( curFromOrder - fromOrder > maxUsed ) + maxUsed = curFromOrder - fromOrder; + } + + return maxUsed; +} + +/* Remove all priorities. */ +void FsmGraph::clearAllPriorities() +{ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + /* Clear out priority data. */ + state->outPriorTable.empty(); + + /* Clear transition data from the out transitions. */ + for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) + trans->priorTable.empty(); + } +} + +/* Zeros out the function ordering keys. This may be called before minimization + * when it is known that no more fsm operations are going to be done. This + * will achieve greater reduction as states will not be separated on the basis + * of function ordering. */ +void FsmGraph::nullActionKeys( ) +{ + /* For each state... */ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + /* Walk the transitions for the state. */ + for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) { + /* Walk the action table for the transition. */ + for ( ActionTable::Iter action = trans->actionTable; + action.lte(); action++ ) + action->key = 0; + + /* Walk the action table for the transition. */ + for ( LmActionTable::Iter action = trans->lmActionTable; + action.lte(); action++ ) + action->key = 0; + } + + /* Null the action keys of the to state action table. */ + for ( ActionTable::Iter action = state->toStateActionTable; + action.lte(); action++ ) + action->key = 0; + + /* Null the action keys of the from state action table. */ + for ( ActionTable::Iter action = state->fromStateActionTable; + action.lte(); action++ ) + action->key = 0; + + /* Null the action keys of the out transtions. */ + for ( ActionTable::Iter action = state->outActionTable; + action.lte(); action++ ) + action->key = 0; + + /* Null the action keys of the error action table. */ + for ( ErrActionTable::Iter action = state->errActionTable; + action.lte(); action++ ) + action->ordering = 0; + + /* Null the action keys eof action table. */ + for ( ActionTable::Iter action = state->eofActionTable; + action.lte(); action++ ) + action->key = 0; + } +} + +/* Walk the list of states and verify that non final states do not have out + * data, that all stateBits are cleared, and that there are no states with + * zero foreign in transitions. */ +void FsmGraph::verifyStates() +{ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + /* Non final states should not have leaving data. */ + if ( ! (state->stateBits & SB_ISFINAL) ) { + assert( state->outActionTable.length() == 0 ); + assert( state->outCondSet.length() == 0 ); + assert( state->outPriorTable.length() == 0 ); + } + + /* Data used in algorithms should be cleared. */ + assert( (state->stateBits & SB_BOTH) == 0 ); + assert( state->foreignInTrans > 0 ); + } +} + +/* Compare two transitions according to their relative priority. Since the + * base transition has no priority associated with it, the default is to + * return equal. */ +int FsmGraph::comparePrior( const PriorTable &priorTable1, const PriorTable &priorTable2 ) +{ + /* Looking for differing priorities on same keys. Need to concurrently + * scan the priority lists. */ + PriorTable::Iter pd1 = priorTable1; + PriorTable::Iter pd2 = priorTable2; + while ( pd1.lte() && pd2.lte() ) { + /* Check keys. */ + if ( pd1->desc->key < pd2->desc->key ) + pd1.increment(); + else if ( pd1->desc->key > pd2->desc->key ) + pd2.increment(); + /* Keys are the same, check priorities. */ + else if ( pd1->desc->priority < pd2->desc->priority ) + return -1; + else if ( pd1->desc->priority > pd2->desc->priority ) + return 1; + else { + /* Keys and priorities are equal, advance both. */ + pd1.increment(); + pd2.increment(); + } + } + + /* No differing priorities on the same key. */ + return 0; +} + +/* Compares two transitions according to priority and functions. Pointers + * should not be null. Does not consider to state or from state. Compare two + * transitions according to the data contained in the transitions. Data means + * any properties added to user transitions that may differentiate them. Since + * the base transition has no data, the default is to return equal. */ +int FsmGraph::compareTransData( FsmTrans *trans1, FsmTrans *trans2 ) +{ + /* Compare the prior table. */ + int cmpRes = CmpPriorTable::compare( trans1->priorTable, + trans2->priorTable ); + if ( cmpRes != 0 ) + return cmpRes; + + /* Compare longest match action tables. */ + cmpRes = CmpLmActionTable::compare(trans1->lmActionTable, + trans2->lmActionTable); + if ( cmpRes != 0 ) + return cmpRes; + + /* Compare action tables. */ + return CmpActionTable::compare(trans1->actionTable, + trans2->actionTable); +} + +/* Callback invoked when another trans (or possibly this) is added into this + * transition during the merging process. Draw in any properties of srcTrans + * into this transition. AddInTrans is called when a new transitions is made + * that will be a duplicate of another transition or a combination of several + * other transitions. AddInTrans will be called for each transition that the + * new transition is to represent. */ +void FsmGraph::addInTrans( FsmTrans *destTrans, FsmTrans *srcTrans ) +{ + /* Protect against adding in from ourselves. */ + if ( srcTrans == destTrans ) { + /* Adding in ourselves, need to make a copy of the source transitions. + * The priorities are not copied in as that would have no effect. */ + destTrans->lmActionTable.setActions( LmActionTable(srcTrans->lmActionTable) ); + destTrans->actionTable.setActions( ActionTable(srcTrans->actionTable) ); + } + else { + /* Not a copy of ourself, get the functions and priorities. */ + destTrans->lmActionTable.setActions( srcTrans->lmActionTable ); + destTrans->actionTable.setActions( srcTrans->actionTable ); + destTrans->priorTable.setPriors( srcTrans->priorTable ); + } +} + +/* Compare the properties of states that are embedded by users. Compares out + * priorities, out transitions, to, from, out, error and eof action tables. */ +int FsmGraph::compareStateData( const FsmState *state1, const FsmState *state2 ) +{ + /* Compare the out priority table. */ + int cmpRes = CmpPriorTable:: + compare( state1->outPriorTable, state2->outPriorTable ); + if ( cmpRes != 0 ) + return cmpRes; + + /* Test to state action tables. */ + cmpRes = CmpActionTable::compare( state1->toStateActionTable, + state2->toStateActionTable ); + if ( cmpRes != 0 ) + return cmpRes; + + /* Test from state action tables. */ + cmpRes = CmpActionTable::compare( state1->fromStateActionTable, + state2->fromStateActionTable ); + if ( cmpRes != 0 ) + return cmpRes; + + /* Test out action tables. */ + cmpRes = CmpActionTable::compare( state1->outActionTable, + state2->outActionTable ); + if ( cmpRes != 0 ) + return cmpRes; + + /* Test out condition sets. */ + cmpRes = CmpActionSet::compare( state1->outCondSet, + state2->outCondSet ); + if ( cmpRes != 0 ) + return cmpRes; + + /* Test out error action tables. */ + cmpRes = CmpErrActionTable::compare( state1->errActionTable, + state2->errActionTable ); + if ( cmpRes != 0 ) + return cmpRes; + + /* Test eof action tables. */ + return CmpActionTable::compare( state1->eofActionTable, + state2->eofActionTable ); +} + +/* Invoked when a state looses its final state status and the leaving + * transition embedding data should be deleted. */ +void FsmGraph::clearOutData( FsmState *state ) +{ + /* Kill the out actions and priorities. */ + state->outActionTable.empty(); + state->outCondSet.empty(); + state->outPriorTable.empty(); +} + +bool FsmGraph::hasOutData( FsmState *state ) +{ + return ( state->outActionTable.length() > 0 || + state->outCondSet.length() > 0 || + state->outPriorTable.length() > 0 ); +} diff --git a/src/fsmattach.cc b/src/fsmattach.cc new file mode 100644 index 0000000..a58ed9a --- /dev/null +++ b/src/fsmattach.cc @@ -0,0 +1,425 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <string.h> +#include <assert.h> +#include "fsmgraph.h" + +#include <iostream> +using namespace std; + +/* Insert a transition into an inlist. The head must be supplied. */ +void FsmGraph::attachToInList( FsmState *from, FsmState *to, + FsmTrans *&head, FsmTrans *trans ) +{ + trans->ilnext = head; + trans->ilprev = 0; + + /* If in trans list is not empty, set the head->prev to trans. */ + if ( head != 0 ) + head->ilprev = trans; + + /* Now insert ourselves at the front of the list. */ + head = trans; + + /* Keep track of foreign transitions for from and to. */ + if ( from != to ) { + if ( misfitAccounting ) { + /* If the number of foreign in transitions is about to go up to 1 then + * move it from the misfit list to the main list. */ + if ( to->foreignInTrans == 0 ) + stateList.append( misfitList.detach( to ) ); + } + + to->foreignInTrans += 1; + } +}; + +/* Detach a transition from an inlist. The head of the inlist must be supplied. */ +void FsmGraph::detachFromInList( FsmState *from, FsmState *to, + FsmTrans *&head, FsmTrans *trans ) +{ + /* Detach in the inTransList. */ + if ( trans->ilprev == 0 ) + head = trans->ilnext; + else + trans->ilprev->ilnext = trans->ilnext; + + if ( trans->ilnext != 0 ) + trans->ilnext->ilprev = trans->ilprev; + + /* Keep track of foreign transitions for from and to. */ + if ( from != to ) { + to->foreignInTrans -= 1; + + if ( misfitAccounting ) { + /* If the number of foreign in transitions goes down to 0 then move it + * from the main list to the misfit list. */ + if ( to->foreignInTrans == 0 ) + misfitList.append( stateList.detach( to ) ); + } + } +} + +/* Attach states on the default transition, range list or on out/in list key. + * First makes a new transition. If there is already a transition out from + * fromState on the default, then will assertion fail. */ +FsmTrans *FsmGraph::attachNewTrans( FsmState *from, FsmState *to, Key lowKey, Key highKey ) +{ + /* Make the new transition. */ + FsmTrans *retVal = new FsmTrans(); + + /* The transition is now attached. Remember the parties involved. */ + retVal->fromState = from; + retVal->toState = to; + + /* Make the entry in the out list for the transitions. */ + from->outList.append( retVal ); + + /* Set the the keys of the new trans. */ + retVal->lowKey = lowKey; + retVal->highKey = highKey; + + /* Attach using inList as the head pointer. */ + if ( to != 0 ) + attachToInList( from, to, to->inList.head, retVal ); + + return retVal; +} + +/* Attach for range lists or for the default transition. This attach should + * be used when a transition already is allocated and must be attached to a + * target state. Does not handle adding the transition into the out list. */ +void FsmGraph::attachTrans( FsmState *from, FsmState *to, FsmTrans *trans ) +{ + assert( trans->fromState == 0 && trans->toState == 0 ); + trans->fromState = from; + trans->toState = to; + + if ( to != 0 ) { + /* Attach using the inList pointer as the head pointer. */ + attachToInList( from, to, to->inList.head, trans ); + } +} + +/* Redirect a transition away from error and towards some state. This is just + * like attachTrans except it requires fromState to be set and does not touch + * it. */ +void FsmGraph::redirectErrorTrans( FsmState *from, FsmState *to, FsmTrans *trans ) +{ + assert( trans->fromState != 0 && trans->toState == 0 ); + trans->toState = to; + + if ( to != 0 ) { + /* Attach using the inList pointer as the head pointer. */ + attachToInList( from, to, to->inList.head, trans ); + } +} + +/* Detach for out/in lists or for default transition. */ +void FsmGraph::detachTrans( FsmState *from, FsmState *to, FsmTrans *trans ) +{ + assert( trans->fromState == from && trans->toState == to ); + trans->fromState = 0; + trans->toState = 0; + + if ( to != 0 ) { + /* Detach using to's inList pointer as the head. */ + detachFromInList( from, to, to->inList.head, trans ); + } +} + + +/* Detach a state from the graph. Detaches and deletes transitions in and out + * of the state. Empties inList and outList. Removes the state from the final + * state set. A detached state becomes useless and should be deleted. */ +void FsmGraph::detachState( FsmState *state ) +{ + /* Detach the in transitions from the inList list of transitions. */ + while ( state->inList.head != 0 ) { + /* Get pointers to the trans and the state. */ + FsmTrans *trans = state->inList.head; + FsmState *fromState = trans->fromState; + + /* Detach the transitions from the source state. */ + detachTrans( fromState, state, trans ); + + /* Ok to delete the transition. */ + fromState->outList.detach( trans ); + delete trans; + } + + /* Remove the entry points in on the machine. */ + while ( state->entryIds.length() > 0 ) + unsetEntry( state->entryIds[0], state ); + + /* Detach out range transitions. */ + for ( TransList::Iter trans = state->outList; trans.lte(); ) { + TransList::Iter next = trans.next(); + detachTrans( state, trans->toState, trans ); + delete trans; + trans = next; + } + + /* Delete all of the out range pointers. */ + state->outList.abandon(); + + /* Unset final stateness before detaching from graph. */ + if ( state->stateBits & SB_ISFINAL ) + finStateSet.remove( state ); +} + + +/* Duplicate a transition. Makes a new transition that is attached to the same + * dest as srcTrans. The new transition has functions and priority taken from + * srcTrans. Used for merging a transition in to a free spot. The trans can + * just be dropped in. It does not conflict with an existing trans and need + * not be crossed. Returns the new transition. */ +FsmTrans *FsmGraph::dupTrans( FsmState *from, FsmTrans *srcTrans ) +{ + /* Make a new transition. */ + FsmTrans *newTrans = new FsmTrans(); + + /* We can attach the transition, one does not exist. */ + attachTrans( from, srcTrans->toState, newTrans ); + + /* Call the user callback to add in the original source transition. */ + addInTrans( newTrans, srcTrans ); + + return newTrans; +} + +/* In crossing, src trans and dest trans both go to existing states. Make one + * state from the sets of states that src and dest trans go to. */ +FsmTrans *FsmGraph::fsmAttachStates( MergeData &md, FsmState *from, + FsmTrans *destTrans, FsmTrans *srcTrans ) +{ + /* The priorities are equal. We must merge the transitions. Does the + * existing trans go to the state we are to attach to? ie, are we to + * simply double up the transition? */ + FsmState *toState = srcTrans->toState; + FsmState *existingState = destTrans->toState; + + if ( existingState == toState ) { + /* The transition is a double up to the same state. Copy the src + * trans into itself. We don't need to merge in the from out trans + * data, that was done already. */ + addInTrans( destTrans, srcTrans ); + } + else { + /* The trans is not a double up. Dest trans cannot be the same as src + * trans. Set up the state set. */ + StateSet stateSet; + + /* We go to all the states the existing trans goes to, plus... */ + if ( existingState->stateDictEl == 0 ) + stateSet.insert( existingState ); + else + stateSet.insert( existingState->stateDictEl->stateSet ); + + /* ... all the states that we have been told to go to. */ + if ( toState->stateDictEl == 0 ) + stateSet.insert( toState ); + else + stateSet.insert( toState->stateDictEl->stateSet ); + + /* Look for the state. If it is not there already, make it. */ + StateDictEl *lastFound; + if ( md.stateDict.insert( stateSet, &lastFound ) ) { + /* Make a new state representing the combination of states in + * stateSet. It gets added to the fill list. This means that we + * need to fill in it's transitions sometime in the future. We + * don't do that now (ie, do not recurse). */ + FsmState *combinState = addState(); + + /* Link up the dict element and the state. */ + lastFound->targState = combinState; + combinState->stateDictEl = lastFound; + + /* Add to the fill list. */ + md.fillListAppend( combinState ); + } + + /* Get the state insertted/deleted. */ + FsmState *targ = lastFound->targState; + + /* Detach the state from existing state. */ + detachTrans( from, existingState, destTrans ); + + /* Re-attach to the new target. */ + attachTrans( from, targ, destTrans ); + + /* Add in src trans to the existing transition that we redirected to + * the new state. We don't need to merge in the from out trans data, + * that was done already. */ + addInTrans( destTrans, srcTrans ); + } + + return destTrans; +} + +/* Two transitions are to be crossed, handle the possibility of either going + * to the error state. */ +FsmTrans *FsmGraph::mergeTrans( MergeData &md, FsmState *from, + FsmTrans *destTrans, FsmTrans *srcTrans ) +{ + FsmTrans *retTrans = 0; + if ( destTrans->toState == 0 && srcTrans->toState == 0 ) { + /* Error added into error. */ + addInTrans( destTrans, srcTrans ); + retTrans = destTrans; + } + else if ( destTrans->toState == 0 && srcTrans->toState != 0 ) { + /* Non error added into error we need to detach and reattach, */ + detachTrans( from, destTrans->toState, destTrans ); + attachTrans( from, srcTrans->toState, destTrans ); + addInTrans( destTrans, srcTrans ); + retTrans = destTrans; + } + else if ( srcTrans->toState == 0 ) { + /* Dest goes somewhere but src doesn't, just add it it in. */ + addInTrans( destTrans, srcTrans ); + retTrans = destTrans; + } + else { + /* Both go somewhere, run the actual cross. */ + retTrans = fsmAttachStates( md, from, destTrans, srcTrans ); + } + + return retTrans; +} + +/* Find the trans with the higher priority. If src is lower priority then dest then + * src is ignored. If src is higher priority than dest, then src overwrites dest. If + * the priorities are equal, then they are merged. */ +FsmTrans *FsmGraph::crossTransitions( MergeData &md, FsmState *from, + FsmTrans *destTrans, FsmTrans *srcTrans ) +{ + FsmTrans *retTrans; + + /* Compare the priority of the dest and src transitions. */ + int compareRes = comparePrior( destTrans->priorTable, srcTrans->priorTable ); + if ( compareRes < 0 ) { + /* Src trans has a higher priority than dest, src overwrites dest. + * Detach dest and return a copy of src. */ + detachTrans( from, destTrans->toState, destTrans ); + retTrans = dupTrans( from, srcTrans ); + } + else if ( compareRes > 0 ) { + /* The dest trans has a higher priority, use dest. */ + retTrans = destTrans; + } + else { + /* Src trans and dest trans have the same priority, they must be merged. */ + retTrans = mergeTrans( md, from, destTrans, srcTrans ); + } + + /* Return the transition that resulted from the cross. */ + return retTrans; +} + +/* Copy the transitions in srcList to the outlist of dest. The srcList should + * not be the outList of dest, otherwise you would be copying the contents of + * srcList into itself as it's iterated: bad news. */ +void FsmGraph::outTransCopy( MergeData &md, FsmState *dest, FsmTrans *srcList ) +{ + /* The destination list. */ + TransList destList; + + /* Set up an iterator to stop at breaks. */ + PairIter<FsmTrans> outPair( dest->outList.head, srcList ); + for ( ; !outPair.end(); outPair++ ) { + switch ( outPair.userState ) { + case RangeInS1: { + /* The pair iter is the authority on the keys. It may have needed + * to break the dest range. */ + FsmTrans *destTrans = outPair.s1Tel.trans; + destTrans->lowKey = outPair.s1Tel.lowKey; + destTrans->highKey = outPair.s1Tel.highKey; + destList.append( destTrans ); + break; + } + case RangeInS2: { + /* Src range may get crossed with dest's default transition. */ + FsmTrans *newTrans = dupTrans( dest, outPair.s2Tel.trans ); + + /* Set up the transition's keys and append to the dest list. */ + newTrans->lowKey = outPair.s2Tel.lowKey; + newTrans->highKey = outPair.s2Tel.highKey; + destList.append( newTrans ); + break; + } + case RangeOverlap: { + /* Exact overlap, cross them. */ + FsmTrans *newTrans = crossTransitions( md, dest, + outPair.s1Tel.trans, outPair.s2Tel.trans ); + + /* Set up the transition's keys and append to the dest list. */ + newTrans->lowKey = outPair.s1Tel.lowKey; + newTrans->highKey = outPair.s1Tel.highKey; + destList.append( newTrans ); + break; + } + case BreakS1: { + /* Since we are always writing to the dest trans, the dest needs + * to be copied when it is broken. The copy goes into the first + * half of the break to "break it off". */ + outPair.s1Tel.trans = dupTrans( dest, outPair.s1Tel.trans ); + break; + } + case BreakS2: + break; + } + } + + /* Abandon the old outList and transfer destList into it. */ + dest->outList.transfer( destList ); +} + + +/* Move all the transitions that go into src so that they go into dest. */ +void FsmGraph::inTransMove( FsmState *dest, FsmState *src ) +{ + /* Do not try to move in trans to and from the same state. */ + assert( dest != src ); + + /* If src is the start state, dest becomes the start state. */ + if ( src == startState ) { + unsetStartState(); + setStartState( dest ); + } + + /* For each entry point into, create an entry point into dest, when the + * state is detached, the entry points to src will be removed. */ + for ( EntryIdSet::Iter enId = src->entryIds; enId.lte(); enId++ ) + changeEntry( *enId, dest, src ); + + /* Move the transitions in inList. */ + while ( src->inList.head != 0 ) { + /* Get trans and from state. */ + FsmTrans *trans = src->inList.head; + FsmState *fromState = trans->fromState; + + /* Detach from src, reattach to dest. */ + detachTrans( fromState, src, trans ); + attachTrans( fromState, dest, trans ); + } +} diff --git a/src/fsmbase.cc b/src/fsmbase.cc new file mode 100644 index 0000000..9034103 --- /dev/null +++ b/src/fsmbase.cc @@ -0,0 +1,602 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <string.h> +#include <assert.h> +#include "fsmgraph.h" + +/* Simple singly linked list append routine for the fill list. The new state + * goes to the end of the list. */ +void MergeData::fillListAppend( FsmState *state ) +{ + state->alg.next = 0; + + if ( stfillHead == 0 ) { + /* List is empty, state becomes head and tail. */ + stfillHead = state; + stfillTail = state; + } + else { + /* List is not empty, state goes after last element. */ + stfillTail->alg.next = state; + stfillTail = state; + } +} + +/* Graph constructor. */ +FsmGraph::FsmGraph() +: + /* No start state. */ + startState(0), + errState(0), + + /* Misfit accounting is a switch, turned on only at specific times. It + * controls what happens when states have no way in from the outside + * world.. */ + misfitAccounting(false), + + lmRequiresErrorState(false) +{ +} + +/* Copy all graph data including transitions. */ +FsmGraph::FsmGraph( const FsmGraph &graph ) +: + /* Lists start empty. Will be filled by copy. */ + stateList(), + misfitList(), + + /* Copy in the entry points, + * pointers will be resolved later. */ + entryPoints(graph.entryPoints), + startState(graph.startState), + errState(0), + + /* Will be filled by copy. */ + finStateSet(), + + /* Misfit accounting is only on during merging. */ + misfitAccounting(false), + + lmRequiresErrorState(graph.lmRequiresErrorState) +{ + /* Create the states and record their map in the original state. */ + StateList::Iter origState = graph.stateList; + for ( ; origState.lte(); origState++ ) { + /* Make the new state. */ + FsmState *newState = new FsmState( *origState ); + + /* Add the state to the list. */ + stateList.append( newState ); + + /* Set the mapsTo item of the old state. */ + origState->alg.stateMap = newState; + } + + /* Derefernce all the state maps. */ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) { + /* The points to the original in the src machine. The taget's duplicate + * is in the statemap. */ + FsmState *toState = trans->toState != 0 ? trans->toState->alg.stateMap : 0; + + /* Attach The transition to the duplicate. */ + trans->toState = 0; + attachTrans( state, toState, trans ); + } + } + + /* Fix the state pointers in the entry points array. */ + EntryMapEl *eel = entryPoints.data; + for ( int e = 0; e < entryPoints.length(); e++, eel++ ) { + /* Get the duplicate of the state. */ + eel->value = eel->value->alg.stateMap; + + /* Foreign in transitions must be built up when duping machines so + * increment it here. */ + eel->value->foreignInTrans += 1; + } + + /* Fix the start state pointer and the new start state's count of in + * transiions. */ + startState = startState->alg.stateMap; + startState->foreignInTrans += 1; + + /* Build the final state set. */ + StateSet::Iter st = graph.finStateSet; + for ( ; st.lte(); st++ ) + finStateSet.insert((*st)->alg.stateMap); +} + +/* Deletes all transition data then deletes each state. */ +FsmGraph::~FsmGraph() +{ + /* Delete all the transitions. */ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + /* Iterate the out transitions, deleting them. */ + state->outList.empty(); + } + + /* Delete all the states. */ + stateList.empty(); +} + +/* Set a state final. The state has its isFinState set to true and the state + * is added to the finStateSet. */ +void FsmGraph::setFinState( FsmState *state ) +{ + /* Is it already a fin state. */ + if ( state->stateBits & SB_ISFINAL ) + return; + + state->stateBits |= SB_ISFINAL; + finStateSet.insert( state ); +} + +/* Set a state non-final. The has its isFinState flag set false and the state + * is removed from the final state set. */ +void FsmGraph::unsetFinState( FsmState *state ) +{ + /* Is it already a non-final state? */ + if ( ! (state->stateBits & SB_ISFINAL) ) + return; + + /* When a state looses its final state status it must relinquish all the + * properties that are allowed only for final states. */ + clearOutData( state ); + + state->stateBits &= ~ SB_ISFINAL; + finStateSet.remove( state ); +} + +/* Set and unset a state as the start state. */ +void FsmGraph::setStartState( FsmState *state ) +{ + /* Sould change from unset to set. */ + assert( startState == 0 ); + startState = state; + + if ( misfitAccounting ) { + /* If the number of foreign in transitions is about to go up to 1 then + * take it off the misfit list and put it on the head list. */ + if ( state->foreignInTrans == 0 ) + stateList.append( misfitList.detach( state ) ); + } + + /* Up the foreign in transitions to the state. */ + state->foreignInTrans += 1; +} + +void FsmGraph::unsetStartState() +{ + /* Should change from set to unset. */ + assert( startState != 0 ); + + /* Decrement the entry's count of foreign entries. */ + startState->foreignInTrans -= 1; + + if ( misfitAccounting ) { + /* If the number of foreign in transitions just went down to 0 then take + * it off the main list and put it on the misfit list. */ + if ( startState->foreignInTrans == 0 ) + misfitList.append( stateList.detach( startState ) ); + } + + startState = 0; +} + +/* Associate an id with a state. Makes the state a named entry point. Has no + * effect if the entry point is already mapped to the state. */ +void FsmGraph::setEntry( int id, FsmState *state ) +{ + /* Insert the id into the state. If the state is already labelled with id, + * nothing to do. */ + if ( state->entryIds.insert( id ) ) { + /* Insert the entry and assert that it succeeds. */ + entryPoints.insertMulti( id, state ); + + if ( misfitAccounting ) { + /* If the number of foreign in transitions is about to go up to 1 then + * take it off the misfit list and put it on the head list. */ + if ( state->foreignInTrans == 0 ) + stateList.append( misfitList.detach( state ) ); + } + + /* Up the foreign in transitions to the state. */ + state->foreignInTrans += 1; + } +} + +/* Remove the association of an id with a state. The state looses it's entry + * point status. Assumes that the id is indeed mapped to state. */ +void FsmGraph::unsetEntry( int id, FsmState *state ) +{ + /* Find the entry point in on id. */ + EntryMapEl *enLow = 0, *enHigh = 0; + entryPoints.findMulti( id, enLow, enHigh ); + while ( enLow->value != state ) + enLow += 1; + + /* Remove the record from the map. */ + entryPoints.remove( enLow ); + + /* Remove the state's sense of the link. */ + state->entryIds.remove( id ); + state->foreignInTrans -= 1; + if ( misfitAccounting ) { + /* If the number of foreign in transitions just went down to 0 then take + * it off the main list and put it on the misfit list. */ + if ( state->foreignInTrans == 0 ) + misfitList.append( stateList.detach( state ) ); + } +} + +/* Remove all association of an id with states. Assumes that the id is indeed + * mapped to a state. */ +void FsmGraph::unsetEntry( int id ) +{ + /* Find the entry point in on id. */ + EntryMapEl *enLow = 0, *enHigh = 0; + entryPoints.findMulti( id, enLow, enHigh ); + for ( EntryMapEl *mel = enLow; mel <= enHigh; mel++ ) { + /* Remove the state's sense of the link. */ + mel->value->entryIds.remove( id ); + mel->value->foreignInTrans -= 1; + if ( misfitAccounting ) { + /* If the number of foreign in transitions just went down to 0 + * then take it off the main list and put it on the misfit list. */ + if ( mel->value->foreignInTrans == 0 ) + misfitList.append( stateList.detach( mel->value ) ); + } + } + + /* Remove the records from the entry points map. */ + entryPoints.removeMulti( enLow, enHigh ); +} + + +void FsmGraph::changeEntry( int id, FsmState *to, FsmState *from ) +{ + /* Find the entry in the entry map. */ + EntryMapEl *enLow = 0, *enHigh = 0; + entryPoints.findMulti( id, enLow, enHigh ); + while ( enLow->value != from ) + enLow += 1; + + /* Change it to the new target. */ + enLow->value = to; + + /* Remove from's sense of the link. */ + from->entryIds.remove( id ); + from->foreignInTrans -= 1; + if ( misfitAccounting ) { + /* If the number of foreign in transitions just went down to 0 then take + * it off the main list and put it on the misfit list. */ + if ( from->foreignInTrans == 0 ) + misfitList.append( stateList.detach( from ) ); + } + + /* Add to's sense of the link. */ + if ( to->entryIds.insert( id ) != 0 ) { + if ( misfitAccounting ) { + /* If the number of foreign in transitions is about to go up to 1 then + * take it off the misfit list and put it on the head list. */ + if ( to->foreignInTrans == 0 ) + stateList.append( misfitList.detach( to ) ); + } + + /* Up the foreign in transitions to the state. */ + to->foreignInTrans += 1; + } +} + + +/* Clear all entry points from a machine. */ +void FsmGraph::unsetAllEntryPoints() +{ + for ( EntryMap::Iter en = entryPoints; en.lte(); en++ ) { + /* Kill all the state's entry points at once. */ + if ( en->value->entryIds.length() > 0 ) { + en->value->foreignInTrans -= en->value->entryIds.length(); + + if ( misfitAccounting ) { + /* If the number of foreign in transitions just went down to 0 + * then take it off the main list and put it on the misfit + * list. */ + if ( en->value->foreignInTrans == 0 ) + misfitList.append( stateList.detach( en->value ) ); + } + + /* Clear the set of ids out all at once. */ + en->value->entryIds.empty(); + } + } + + /* Now clear out the entry map all at once. */ + entryPoints.empty(); +} + +/* Assigning an epsilon transition into final states. */ +void FsmGraph::epsilonTrans( int id ) +{ + for ( StateSet::Iter fs = finStateSet; fs.lte(); fs++ ) + (*fs)->epsilonTrans.append( id ); +} + +/* Mark all states reachable from state. Traverses transitions forward. Used + * for removing states that have no path into them. */ +void FsmGraph::markReachableFromHere( FsmState *state ) +{ + /* Base case: return; */ + if ( state->stateBits & SB_ISMARKED ) + return; + + /* Set this state as processed. We are going to visit all states that this + * state has a transition to. */ + state->stateBits |= SB_ISMARKED; + + /* Recurse on all out transitions. */ + for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) { + if ( trans->toState != 0 ) + markReachableFromHere( trans->toState ); + } +} + +void FsmGraph::markReachableFromHereStopFinal( FsmState *state ) +{ + /* Base case: return; */ + if ( state->stateBits & SB_ISMARKED ) + return; + + /* Set this state as processed. We are going to visit all states that this + * state has a transition to. */ + state->stateBits |= SB_ISMARKED; + + /* Recurse on all out transitions. */ + for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) { + FsmState *toState = trans->toState; + if ( toState != 0 && !toState->isFinState() ) + markReachableFromHereStopFinal( toState ); + } +} + +/* Mark all states reachable from state. Traverse transitions backwards. Used + * for removing dead end paths in graphs. */ +void FsmGraph::markReachableFromHereReverse( FsmState *state ) +{ + /* Base case: return; */ + if ( state->stateBits & SB_ISMARKED ) + return; + + /* Set this state as processed. We are going to visit all states with + * transitions into this state. */ + state->stateBits |= SB_ISMARKED; + + /* Recurse on all items in transitions. */ + for ( TransInList::Iter trans = state->inList; trans.lte(); trans++ ) + markReachableFromHereReverse( trans->fromState ); +} + +/* Determine if there are any entry points into a start state other than the + * start state. Setting starting transitions requires that the start state be + * isolated. In most cases a start state will already be isolated. */ +bool FsmGraph::isStartStateIsolated() +{ + /* If there are any in transitions then the state is not isolated. */ + if ( startState->inList.head != 0 ) + return false; + + /* If there are any entry points then isolated. */ + if ( startState->entryIds.length() > 0 ) + return false; + + return true; +} + +/* Bring in other's entry points. Assumes others states are going to be + * copied into this machine. */ +void FsmGraph::copyInEntryPoints( FsmGraph *other ) +{ + /* Use insert multi because names are not unique. */ + for ( EntryMap::Iter en = other->entryPoints; en.lte(); en++ ) + entryPoints.insertMulti( en->key, en->value ); +} + + +void FsmGraph::unsetAllFinStates() +{ + for ( StateSet::Iter st = finStateSet; st.lte(); st++ ) + (*st)->stateBits &= ~ SB_ISFINAL; + finStateSet.empty(); +} + +void FsmGraph::setFinBits( int finStateBits ) +{ + for ( int s = 0; s < finStateSet.length(); s++ ) + finStateSet.data[s]->stateBits |= finStateBits; +} + + +/* Tests the integrity of the transition lists and the fromStates. */ +void FsmGraph::verifyIntegrity() +{ + for ( StateList::Iter state = stateList; state.lte(); state++ ) { + /* Walk the out transitions and assert fromState is correct. */ + for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) + assert( trans->fromState == state ); + + /* Walk the inlist and assert toState is correct. */ + for ( TransInList::Iter trans = state->inList; trans.lte(); trans++ ) + assert( trans->toState == state ); + } +} + +void FsmGraph::verifyReachability() +{ + /* Mark all the states that can be reached + * through the set of entry points. */ + markReachableFromHere( startState ); + for ( EntryMap::Iter en = entryPoints; en.lte(); en++ ) + markReachableFromHere( en->value ); + + /* Check that everything got marked. */ + for ( StateList::Iter st = stateList; st.lte(); st++ ) { + /* Assert it got marked and then clear the mark. */ + assert( st->stateBits & SB_ISMARKED ); + st->stateBits &= ~ SB_ISMARKED; + } +} + +void FsmGraph::verifyNoDeadEndStates() +{ + /* Mark all states that have paths to the final states. */ + for ( StateSet::Iter pst = finStateSet; pst.lte(); pst++ ) + markReachableFromHereReverse( *pst ); + + /* Start state gets honorary marking. Must be done AFTER recursive call. */ + startState->stateBits |= SB_ISMARKED; + + /* Make sure everything got marked. */ + for ( StateList::Iter st = stateList; st.lte(); st++ ) { + /* Assert the state got marked and unmark it. */ + assert( st->stateBits & SB_ISMARKED ); + st->stateBits &= ~ SB_ISMARKED; + } +} + +void FsmGraph::depthFirstOrdering( FsmState *state ) +{ + /* Nothing to do if the state is already on the list. */ + if ( state->stateBits & SB_ONLIST ) + return; + + /* Doing depth first, put state on the list. */ + state->stateBits |= SB_ONLIST; + stateList.append( state ); + + /* Recurse on everything ranges. */ + for ( TransList::Iter tel = state->outList; tel.lte(); tel++ ) { + if ( tel->toState != 0 ) + depthFirstOrdering( tel->toState ); + } +} + +/* Ordering states by transition connections. */ +void FsmGraph::depthFirstOrdering() +{ + /* Init on state list flags. */ + for ( StateList::Iter st = stateList; st.lte(); st++ ) + st->stateBits &= ~SB_ONLIST; + + /* Clear out the state list, we will rebuild it. */ + int stateListLen = stateList.length(); + stateList.abandon(); + + /* Add back to the state list from the start state and all other entry + * points. */ + if ( errState != 0 ) + depthFirstOrdering( errState ); + depthFirstOrdering( startState ); + for ( EntryMap::Iter en = entryPoints; en.lte(); en++ ) + depthFirstOrdering( en->value ); + + /* Make sure we put everything back on. */ + assert( stateListLen == stateList.length() ); +} + +/* Stable sort the states by final state status. */ +void FsmGraph::sortStatesByFinal() +{ + /* Move forward through the list and throw final states onto the end. */ + FsmState *state = 0; + FsmState *next = stateList.head; + FsmState *last = stateList.tail; + while ( state != last ) { + /* Move forward and load up the next. */ + state = next; + next = state->next; + + /* Throw to the end? */ + if ( state->isFinState() ) { + stateList.detach( state ); + stateList.append( state ); + } + } +} + +void FsmGraph::setStateNumbers( int base ) +{ + for ( StateList::Iter state = stateList; state.lte(); state++ ) + state->alg.stateNum = base++; +} + + +bool FsmGraph::checkErrTrans( FsmState *state, FsmTrans *trans ) +{ + /* Might go directly to error state. */ + if ( trans->toState == 0 ) + return true; + + if ( trans->prev == 0 ) { + /* If this is the first transition. */ + if ( keyOps->minKey < trans->lowKey ) + return true; + } + else { + /* Not the first transition. Compare against the prev. */ + FsmTrans *prev = trans->prev; + Key nextKey = prev->highKey; + nextKey.increment(); + if ( nextKey < trans->lowKey ) + return true; + } + return false; +} + +bool FsmGraph::checkErrTransFinish( FsmState *state ) +{ + /* Check if there are any ranges already. */ + if ( state->outList.length() == 0 ) + return true; + else { + /* Get the last and check for a gap on the end. */ + FsmTrans *last = state->outList.tail; + if ( last->highKey < keyOps->maxKey ) + return true; + } + return 0; +} + +bool FsmGraph::hasErrorTrans() +{ + bool result; + for ( StateList::Iter st = stateList; st.lte(); st++ ) { + for ( TransList::Iter tr = st->outList; tr.lte(); tr++ ) { + result = checkErrTrans( st, tr ); + if ( result ) + return true; + } + result = checkErrTransFinish( st ); + if ( result ) + return true; + } + return false; +} diff --git a/src/fsmcodegen.cc b/src/fsmcodegen.cc new file mode 100644 index 0000000..61a48f7 --- /dev/null +++ b/src/fsmcodegen.cc @@ -0,0 +1,931 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "parsedata.h" +#include "fsmcodegen.h" +#include "redfsm.h" +#include "bstmap.h" +#include <sstream> +#include <string> +#include <assert.h> + + +using std::ostream; +using std::ostringstream; +using std::string; +using std::cerr; +using std::endl; + + +/* Init code gen with in parameters. */ +FsmCodeGen::FsmCodeGen( ostream &out, + RedFsm *redFsm, FsmTables *fsmTables ) +: + out(out), + redFsm(redFsm), + fsmTables(fsmTables), + codeGenErrCount(0), + dataPrefix(true), + writeFirstFinal(true), + writeErr(true), + skipTokenLabelNeeded(false) +{ +} + +/* Write out the fsm name. */ +string FsmCodeGen::FSM_NAME() +{ + return "parser"; +} + +/* Emit the offset of the start state as a decimal integer. */ +string FsmCodeGen::START_STATE_ID() +{ + ostringstream ret; + ret << redFsm->startState->id; + return ret.str(); +}; + +/* Write out the array of actions. */ +std::ostream &FsmCodeGen::ACTIONS_ARRAY() +{ + out << "\t0, "; + int totalActions = 1; + for ( GenActionTableMap::Iter act = redFsm->actionMap; act.lte(); act++ ) { + /* Write out the length, which will never be the last character. */ + out << act->key.length() << ", "; + /* Put in a line break every 8 */ + if ( totalActions++ % 8 == 7 ) + out << "\n\t"; + + for ( GenActionTable::Iter item = act->key; item.lte(); item++ ) { + out << item->value->actionId; + if ( ! (act.last() && item.last()) ) + out << ", "; + + /* Put in a line break every 8 */ + if ( totalActions++ % 8 == 7 ) + out << "\n\t"; + } + } + out << "\n"; + return out; +} + + +string FsmCodeGen::CS() +{ + ostringstream ret; + /* Expression for retrieving the key, use simple dereference. */ + ret << ACCESS() << "cs"; + return ret.str(); +} + +string FsmCodeGen::GET_WIDE_KEY() +{ + return GET_KEY(); +} + +string FsmCodeGen::GET_WIDE_KEY( RedState *state ) +{ + return GET_KEY(); +} + +string FsmCodeGen::GET_KEY() +{ + ostringstream ret; + /* Expression for retrieving the key, use simple dereference. */ + ret << "(*" << P() << ")"; + return ret.str(); +} + +/* Write out level number of tabs. Makes the nested binary search nice + * looking. */ +string FsmCodeGen::TABS( int level ) +{ + string result; + while ( level-- > 0 ) + result += "\t"; + return result; +} + +/* Write out a key from the fsm code gen. Depends on wether or not the key is + * signed. */ +string FsmCodeGen::KEY( Key key ) +{ + ostringstream ret; + ret << key.getVal(); + return ret.str(); +} + +void FsmCodeGen::SET_ACT( ostream &ret, InlineItem *item ) +{ + ret << ACT() << " = " << item->longestMatchPart->longestMatchId << ";"; +} + +void FsmCodeGen::SET_TOKEND( ostream &ret, InlineItem *item ) +{ + /* The tokend action sets tokend. */ + ret << "{ " << TOKEND() << " = " << TOKLEN() << " + ( " << P() << " - " << BLOCK_START() << " ) + 1; }"; +} +void FsmCodeGen::INIT_TOKSTART( ostream &ret, InlineItem *item ) +{ + ret << TOKSTART() << " = 0;"; +} + +void FsmCodeGen::INIT_ACT( ostream &ret, InlineItem *item ) +{ + ret << ACT() << " = 0;"; +} + +void FsmCodeGen::SET_TOKSTART( ostream &ret, InlineItem *item ) +{ + ret << TOKSTART() << " = " << P() << ";"; +} + +void FsmCodeGen::EMIT_TOKEN( ostream &ret, LangEl *token ) +{ + ret << " " << MATCHED_TOKEN() << " = " << token->id << ";\n"; +} + +void FsmCodeGen::LM_SWITCH( ostream &ret, InlineItem *item, + int targState, int inFinish ) +{ + ret << + " " << TOKLEN() << " = " << TOKEND() << ";\n" + " switch( " << ACT() << " ) {\n"; + + /* If the switch handles error then we also forced the error state. It + * will exist. */ + if ( item->tokenRegion->lmSwitchHandlesError ) { + ret << " case 0: " //<< P() << " = " << TOKSTART() << ";" << + "goto st" << redFsm->errState->id << ";\n"; + } + + for ( TokenInstanceListReg::Iter lmi = item->tokenRegion->tokenInstanceList; lmi.lte(); lmi++ ) { + if ( lmi->inLmSelect ) { + assert( lmi->tokenDef->tdLangEl != 0 ); + ret << " case " << lmi->longestMatchId << ":\n"; + EMIT_TOKEN( ret, lmi->tokenDef->tdLangEl ); + ret << " break;\n"; + } + } + + ret << + " }\n" + "\t" + " goto skip_toklen;\n"; + + skipTokenLabelNeeded = true; +} + +void FsmCodeGen::LM_ON_LAST( ostream &ret, InlineItem *item ) +{ + assert( item->longestMatchPart->tokenDef->tdLangEl != 0 ); + + ret << " " << P() << " += 1;\n"; + EMIT_TOKEN( ret, item->longestMatchPart->tokenDef->tdLangEl ); + ret << " goto out;\n"; +} + +void FsmCodeGen::LM_ON_NEXT( ostream &ret, InlineItem *item ) +{ + assert( item->longestMatchPart->tokenDef->tdLangEl != 0 ); + + EMIT_TOKEN( ret, item->longestMatchPart->tokenDef->tdLangEl ); + ret << " goto out;\n"; +} + +void FsmCodeGen::LM_ON_LAG_BEHIND( ostream &ret, InlineItem *item ) +{ + assert( item->longestMatchPart->tokenDef->tdLangEl != 0 ); + + ret << " " << TOKLEN() << " = " << TOKEND() << ";\n"; + EMIT_TOKEN( ret, item->longestMatchPart->tokenDef->tdLangEl ); + ret << " goto skip_toklen;\n"; + + skipTokenLabelNeeded = true; +} + + +/* Write out an inline tree structure. Walks the list and possibly calls out + * to virtual functions than handle language specific items in the tree. */ +void FsmCodeGen::INLINE_LIST( ostream &ret, InlineList *inlineList, + int targState, bool inFinish ) +{ + for ( InlineList::Iter item = *inlineList; item.lte(); item++ ) { + switch ( item->type ) { + case InlineItem::Text: + assert( false ); + break; + case InlineItem::LmSetActId: + SET_ACT( ret, item ); + break; + case InlineItem::LmSetTokEnd: + SET_TOKEND( ret, item ); + break; + case InlineItem::LmInitTokStart: + assert( false ); + break; + case InlineItem::LmInitAct: + INIT_ACT( ret, item ); + break; + case InlineItem::LmSetTokStart: + SET_TOKSTART( ret, item ); + break; + case InlineItem::LmSwitch: + LM_SWITCH( ret, item, targState, inFinish ); + break; + case InlineItem::LmOnLast: + LM_ON_LAST( ret, item ); + break; + case InlineItem::LmOnNext: + LM_ON_NEXT( ret, item ); + break; + case InlineItem::LmOnLagBehind: + LM_ON_LAG_BEHIND( ret, item ); + break; + } + } +} + +/* Write out paths in line directives. Escapes any special characters. */ +string FsmCodeGen::LDIR_PATH( char *path ) +{ + ostringstream ret; + for ( char *pc = path; *pc != 0; pc++ ) { + if ( *pc == '\\' ) + ret << "\\\\"; + else + ret << *pc; + } + return ret.str(); +} + +void FsmCodeGen::ACTION( ostream &ret, GenAction *action, int targState, bool inFinish ) +{ + /* Write the block and close it off. */ + ret << "\t{"; + INLINE_LIST( ret, action->inlineList, targState, inFinish ); + + if ( action->markId > 0 ) + ret << "mark[" << action->markId-1 << "] = " << P() << ";\n"; + + ret << "}\n"; + +} + +void FsmCodeGen::CONDITION( ostream &ret, GenAction *condition ) +{ + ret << "\n"; + INLINE_LIST( ret, condition->inlineList, 0, false ); +} + +string FsmCodeGen::ERROR_STATE() +{ + ostringstream ret; + if ( redFsm->errState != 0 ) + ret << redFsm->errState->id; + else + ret << "-1"; + return ret.str(); +} + +string FsmCodeGen::FIRST_FINAL_STATE() +{ + ostringstream ret; + if ( redFsm->firstFinState != 0 ) + ret << redFsm->firstFinState->id; + else + ret << redFsm->nextStateId; + return ret.str(); +} + +string FsmCodeGen::DATA_PREFIX() +{ + if ( dataPrefix ) + return FSM_NAME() + "_"; + return ""; +} + +/* Emit the alphabet data type. */ +string FsmCodeGen::ALPH_TYPE() +{ + string ret = keyOps->alphType->data1; + if ( keyOps->alphType->data2 != 0 ) { + ret += " "; + ret += + keyOps->alphType->data2; + } + return ret; +} + +/* Emit the alphabet data type. */ +string FsmCodeGen::WIDE_ALPH_TYPE() +{ + string ret; + ret = ALPH_TYPE(); + return ret; +} + + +string FsmCodeGen::PTR_CONST() +{ + return "const "; +} + +std::ostream &FsmCodeGen::OPEN_ARRAY( string type, string name ) +{ + out << "static const " << type << " " << name << "[] = {\n"; + return out; +} + +std::ostream &FsmCodeGen::CLOSE_ARRAY() +{ + return out << "};\n"; +} + +std::ostream &FsmCodeGen::STATIC_VAR( string type, string name ) +{ + out << "static const " << type << " " << name; + return out; +} + +string FsmCodeGen::UINT( ) +{ + return "unsigned int"; +} + +string FsmCodeGen::ARR_OFF( string ptr, string offset ) +{ + return ptr + " + " + offset; +} + +string FsmCodeGen::CAST( string type ) +{ + return "(" + type + ")"; +} + +std::ostream &FsmCodeGen::TO_STATE_ACTION_SWITCH() +{ + /* Walk the list of functions, printing the cases. */ + for ( GenActionList::Iter act = redFsm->genActionList; act.lte(); act++ ) { + /* Write out referenced actions. */ + if ( act->numToStateRefs > 0 ) { + /* Write the case label, the action and the case break. */ + out << "\tcase " << act->actionId << ":\n"; + ACTION( out, act, 0, false ); + out << "\tbreak;\n"; + } + } + + return out; +} + +std::ostream &FsmCodeGen::FROM_STATE_ACTION_SWITCH() +{ + /* Walk the list of functions, printing the cases. */ + for ( GenActionList::Iter act = redFsm->genActionList; act.lte(); act++ ) { + /* Write out referenced actions. */ + if ( act->numFromStateRefs > 0 ) { + /* Write the case label, the action and the case break. */ + out << "\tcase " << act->actionId << ":\n"; + ACTION( out, act, 0, false ); + out << "\tbreak;\n"; + } + } + + return out; +} + +std::ostream &FsmCodeGen::ACTION_SWITCH() +{ + /* Walk the list of functions, printing the cases. */ + for ( GenActionList::Iter act = redFsm->genActionList; act.lte(); act++ ) { + /* Write out referenced actions. */ + if ( act->numTransRefs > 0 ) { + /* Write the case label, the action and the case break. */ + out << "\tcase " << act->actionId << ":\n"; + ACTION( out, act, 0, false ); + out << "\tbreak;\n"; + } + } + + return out; +} + +void FsmCodeGen::emitSingleSwitch( RedState *state ) +{ + /* Load up the singles. */ + int numSingles = state->outSingle.length(); + RedTransEl *data = state->outSingle.data; + + if ( numSingles == 1 ) { + /* If there is a single single key then write it out as an if. */ + out << "\tif ( " << GET_WIDE_KEY(state) << " == " << + KEY(data[0].lowKey) << " )\n\t\t"; + + /* Virtual function for writing the target of the transition. */ + TRANS_GOTO(data[0].value, 0) << "\n"; + } + else if ( numSingles > 1 ) { + /* Write out single keys in a switch if there is more than one. */ + out << "\tswitch( " << GET_WIDE_KEY(state) << " ) {\n"; + + /* Write out the single indicies. */ + for ( int j = 0; j < numSingles; j++ ) { + out << "\t\tcase " << KEY(data[j].lowKey) << ": "; + TRANS_GOTO(data[j].value, 0) << "\n"; + } + + /* Close off the transition switch. */ + out << "\t}\n"; + } +} + +void FsmCodeGen::emitRangeBSearch( RedState *state, int level, int low, int high ) +{ + /* Get the mid position, staying on the lower end of the range. */ + int mid = (low + high) >> 1; + RedTransEl *data = state->outRange.data; + + /* Determine if we need to look higher or lower. */ + bool anyLower = mid > low; + bool anyHigher = mid < high; + + /* Determine if the keys at mid are the limits of the alphabet. */ + bool limitLow = data[mid].lowKey == keyOps->minKey; + bool limitHigh = data[mid].highKey == keyOps->maxKey; + + if ( anyLower && anyHigher ) { + /* Can go lower and higher than mid. */ + out << TABS(level) << "if ( " << GET_WIDE_KEY(state) << " < " << + KEY(data[mid].lowKey) << " ) {\n"; + emitRangeBSearch( state, level+1, low, mid-1 ); + out << TABS(level) << "} else if ( " << GET_WIDE_KEY(state) << " > " << + KEY(data[mid].highKey) << " ) {\n"; + emitRangeBSearch( state, level+1, mid+1, high ); + out << TABS(level) << "} else\n"; + TRANS_GOTO(data[mid].value, level+1) << "\n"; + } + else if ( anyLower && !anyHigher ) { + /* Can go lower than mid but not higher. */ + out << TABS(level) << "if ( " << GET_WIDE_KEY(state) << " < " << + KEY(data[mid].lowKey) << " ) {\n"; + emitRangeBSearch( state, level+1, low, mid-1 ); + + /* if the higher is the highest in the alphabet then there is no + * sense testing it. */ + if ( limitHigh ) { + out << TABS(level) << "} else\n"; + TRANS_GOTO(data[mid].value, level+1) << "\n"; + } + else { + out << TABS(level) << "} else if ( " << GET_WIDE_KEY(state) << " <= " << + KEY(data[mid].highKey) << " )\n"; + TRANS_GOTO(data[mid].value, level+1) << "\n"; + } + } + else if ( !anyLower && anyHigher ) { + /* Can go higher than mid but not lower. */ + out << TABS(level) << "if ( " << GET_WIDE_KEY(state) << " > " << + KEY(data[mid].highKey) << " ) {\n"; + emitRangeBSearch( state, level+1, mid+1, high ); + + /* If the lower end is the lowest in the alphabet then there is no + * sense testing it. */ + if ( limitLow ) { + out << TABS(level) << "} else\n"; + TRANS_GOTO(data[mid].value, level+1) << "\n"; + } + else { + out << TABS(level) << "} else if ( " << GET_WIDE_KEY(state) << " >= " << + KEY(data[mid].lowKey) << " )\n"; + TRANS_GOTO(data[mid].value, level+1) << "\n"; + } + } + else { + /* Cannot go higher or lower than mid. It's mid or bust. What + * tests to do depends on limits of alphabet. */ + if ( !limitLow && !limitHigh ) { + out << TABS(level) << "if ( " << KEY(data[mid].lowKey) << " <= " << + GET_WIDE_KEY(state) << " && " << GET_WIDE_KEY(state) << " <= " << + KEY(data[mid].highKey) << " )\n"; + TRANS_GOTO(data[mid].value, level+1) << "\n"; + } + else if ( limitLow && !limitHigh ) { + out << TABS(level) << "if ( " << GET_WIDE_KEY(state) << " <= " << + KEY(data[mid].highKey) << " )\n"; + TRANS_GOTO(data[mid].value, level+1) << "\n"; + } + else if ( !limitLow && limitHigh ) { + out << TABS(level) << "if ( " << KEY(data[mid].lowKey) << " <= " << + GET_WIDE_KEY(state) << " )\n"; + TRANS_GOTO(data[mid].value, level+1) << "\n"; + } + else { + /* Both high and low are at the limit. No tests to do. */ + TRANS_GOTO(data[mid].value, level+1) << "\n"; + } + } +} + +std::ostream &FsmCodeGen::STATE_GOTOS() +{ + for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { + if ( st == redFsm->errState ) + STATE_GOTO_ERROR(); + else { + /* Writing code above state gotos. */ + GOTO_HEADER( st ); + + /* Try singles. */ + if ( st->outSingle.length() > 0 ) + emitSingleSwitch( st ); + + /* Default case is to binary search for the ranges, if that fails then */ + if ( st->outRange.length() > 0 ) + emitRangeBSearch( st, 1, 0, st->outRange.length() - 1 ); + + /* Write the default transition. */ + TRANS_GOTO( st->defTrans, 1 ) << "\n"; + } + } + return out; +} + +unsigned int FsmCodeGen::TO_STATE_ACTION( RedState *state ) +{ + int act = 0; + if ( state->toStateAction != 0 ) + act = state->toStateAction->location+1; + return act; +} + +unsigned int FsmCodeGen::FROM_STATE_ACTION( RedState *state ) +{ + int act = 0; + if ( state->fromStateAction != 0 ) + act = state->fromStateAction->location+1; + return act; +} + +std::ostream &FsmCodeGen::TO_STATE_ACTIONS() +{ + /* Take one off for the psuedo start state. */ + int numStates = redFsm->stateList.length(); + unsigned int *vals = new unsigned int[numStates]; + memset( vals, 0, sizeof(unsigned int)*numStates ); + + for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) + vals[st->id] = TO_STATE_ACTION(st); + + out << "\t"; + for ( int st = 0; st < redFsm->nextStateId; st++ ) { + /* Write any eof action. */ + out << vals[st]; + if ( st < numStates-1 ) { + out << ", "; + if ( (st+1) % IALL == 0 ) + out << "\n\t"; + } + } + out << "\n"; + delete[] vals; + return out; +} + +std::ostream &FsmCodeGen::FROM_STATE_ACTIONS() +{ + /* Take one off for the psuedo start state. */ + int numStates = redFsm->stateList.length(); + unsigned int *vals = new unsigned int[numStates]; + memset( vals, 0, sizeof(unsigned int)*numStates ); + + for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) + vals[st->id] = FROM_STATE_ACTION(st); + + out << "\t"; + for ( int st = 0; st < redFsm->nextStateId; st++ ) { + /* Write any eof action. */ + out << vals[st]; + if ( st < numStates-1 ) { + out << ", "; + if ( (st+1) % IALL == 0 ) + out << "\n\t"; + } + } + out << "\n"; + delete[] vals; + return out; +} + +bool FsmCodeGen::IN_TRANS_ACTIONS( RedState *state ) +{ + /* Emit any transitions that have actions and that go to this state. */ + for ( int it = 0; it < state->numInTrans; it++ ) { + RedTrans *trans = state->inTrans[it]; + if ( trans->action != 0 && trans->labelNeeded ) { + /* Write the label for the transition so it can be jumped to. */ + out << "tr" << trans->id << ":\n"; + + /* If the action contains a next, then we must preload the current + * state since the action may or may not set it. */ + if ( trans->action->anyNextStmt() ) + out << " " << CS() << " = " << trans->targ->id << ";\n"; + + /* Write each action in the list. */ + for ( GenActionTable::Iter item = trans->action->key; item.lte(); item++ ) + ACTION( out, item->value, trans->targ->id, false ); + + out << "\tgoto st" << trans->targ->id << ";\n"; + } + } + + return 0; +} + +/* Called from FsmCodeGen::STATE_GOTOS just before writing the gotos for each + * state. */ +void FsmCodeGen::GOTO_HEADER( RedState *state ) +{ + IN_TRANS_ACTIONS( state ); + + if ( state->labelNeeded ) + out << "st" << state->id << ":\n"; + + if ( state->toStateAction != 0 ) { + /* Remember that we wrote an action. Write every action in the list. */ + for ( GenActionTable::Iter item = state->toStateAction->key; item.lte(); item++ ) + ACTION( out, item->value, state->id, false ); + } + + /* Give the state a switch case. */ + out << "case " << state->id << ":\n"; + + /* Advance and test buffer pos. */ + out << + " if ( ++" << P() << " == " << PE() << " )\n" + " goto out" << state->id << ";\n"; + + if ( state->fromStateAction != 0 ) { + /* Remember that we wrote an action. Write every action in the list. */ + for ( GenActionTable::Iter item = state->fromStateAction->key; item.lte(); item++ ) + ACTION( out, item->value, state->id, false ); + } + + /* Record the prev state if necessary. */ + if ( state->anyRegCurStateRef() ) + out << " _ps = " << state->id << ";\n"; +} + +void FsmCodeGen::STATE_GOTO_ERROR() +{ + /* In the error state we need to emit some stuff that usually goes into + * the header. */ + RedState *state = redFsm->errState; + IN_TRANS_ACTIONS( state ); + + if ( state->labelNeeded ) + out << "st" << state->id << ":\n"; + + /* We do not need a case label here because the the error state is checked + * at the head of the loop. */ + + /* Break out here. */ + out << " goto out" << state->id << ";\n"; +} + + +/* Emit the goto to take for a given transition. */ +std::ostream &FsmCodeGen::TRANS_GOTO( RedTrans *trans, int level ) +{ + if ( trans->action != 0 ) { + /* Go to the transition which will go to the state. */ + out << TABS(level) << "goto tr" << trans->id << ";"; + } + else { + /* Go directly to the target state. */ + out << TABS(level) << "goto st" << trans->targ->id << ";"; + } + return out; +} + +std::ostream &FsmCodeGen::EXIT_STATES() +{ + for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { + out << " case " << st->id << ": out" << st->id << ": "; + if ( st->eofTrans != 0 ) { + out << "if ( " << DATA_EOF() << " ) {"; + TRANS_GOTO( st->eofTrans, 0 ); + out << "\n"; + out << "}"; + } + + /* Exit. */ + out << CS() << " = " << st->id << "; goto out; \n"; + } + return out; +} + +/* Set up labelNeeded flag for each state. */ +void FsmCodeGen::setLabelsNeeded() +{ + /* Do not use all labels by default, init all labelNeeded vars to false. */ + for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) + st->labelNeeded = false; + + if ( redFsm->errState != 0 && redFsm->anyLmSwitchError() ) + redFsm->errState->labelNeeded = true; + + /* Walk all transitions and set only those that have targs. */ + for ( RedTransSet::Iter trans = redFsm->transSet; trans.lte(); trans++ ) { + /* If there is no action with a next statement, then the label will be + * needed. */ + if ( trans->action == 0 || !trans->action->anyNextStmt() ) + trans->targ->labelNeeded = true; + } + + for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) + st->outNeeded = st->labelNeeded; +} + +void FsmCodeGen::writeData() +{ + out << "#define " << START() << " " << START_STATE_ID() << "\n"; + out << "#define " << FIRST_FINAL() << " " << FIRST_FINAL_STATE() << "\n"; + out << "#define " << ERROR() << " " << ERROR_STATE() << "\n"; + out << "#define false 0\n"; + out << "#define true 1\n"; + out << "\n"; + + out << "static long " << ENTRY_BY_REGION() << "[] = {\n\t"; + for ( int i = 0; i < fsmTables->numRegions; i++ ) { + out << fsmTables->entryByRegion[i]; + + if ( i < fsmTables->numRegions-1 ) { + out << ", "; + if ( (i+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + + out << + "static FsmTables fsmTables_start =\n" + "{\n" + " 0, " /* actions */ + " 0, " /* keyOffsets */ + " 0, " /* transKeys */ + " 0, " /* singleLengths */ + " 0, " /* rangeLengths */ + " 0, " /* indexOffsets */ + " 0, " /* transTargsWI */ + " 0, " /* transActionsWI */ + " 0, " /* toStateActions */ + " 0, " /* fromStateActions */ + " 0, " /* eofActions */ + " 0,\n" /* eofTargs */ + " " << ENTRY_BY_REGION() << ",\n" + + "\n" + " 0, " /* numStates */ + " 0, " /* numActions */ + " 0, " /* numTransKeys */ + " 0, " /* numSingleLengths */ + " 0, " /* numRangeLengths */ + " 0, " /* numIndexOffsets */ + " 0, " /* numTransTargsWI */ + " 0,\n" /* numTransActionsWI */ + " " << redFsm->regionToEntry.length() << ",\n" + "\n" + " " << START() << ",\n" + " " << FIRST_FINAL() << ",\n" + " " << ERROR() << ",\n" + "\n" + " 0,\n" /* actionSwitch */ + " 0\n" /* numActionSwitch */ + "};\n" + "\n"; +} + +void FsmCodeGen::writeInit() +{ + out << + " " << CS() << " = " << START() << ";\n"; + + /* If there are any calls, then the stack top needs initialization. */ + if ( redFsm->anyActionCalls() || redFsm->anyActionRets() ) + out << "\t" << TOP() << " = 0;\n"; + + out << + " " << TOKSTART() << " = 0;\n" + " " << TOKEND() << " = 0;\n" + " " << ACT() << " = 0;\n"; + + out << "\n"; +} + +void FsmCodeGen::writeExec() +{ + setLabelsNeeded(); + + out << + "static void fsmExecute( FsmRun *fsmRun, StreamImpl *inputStream )\n" + "{\n" + " " << BLOCK_START() << " = fsmRun->p;\n" + "/*_resume:*/\n"; + + if ( redFsm->errState != 0 ) { + out << + " if ( " << CS() << " == " << redFsm->errState->id << " )\n" + " goto out;\n"; + } + + out << + " if ( " << P() << " == " << PE() << " )\n" + " goto out_switch;\n" + " --" << P() << ";\n" + "\n" + " switch ( " << CS() << " )\n {\n"; + STATE_GOTOS() << + " }\n"; + + out << + "out_switch:\n" + " switch ( " << CS() << " )\n {\n"; + EXIT_STATES() << + " }\n"; + + out << + "out:\n" + " if ( " << P() << " != 0 )\n" + " " << TOKLEN() << " += " << P() << " - " << BLOCK_START() << ";\n"; + + if ( skipTokenLabelNeeded ) { + out << + "skip_toklen:\n" + " {}\n"; + } + + out << + "}\n" + "\n"; +} + +void FsmCodeGen::writeIncludes() +{ + out << + "#include <colm/pdarun.h>\n" + "#include <colm/debug.h>\n" + "#include <colm/bytecode.h>\n" + "#include <stdio.h>\n" + "#include <stdlib.h>\n" + "#include <string.h>\n" + "#include <assert.h>\n" + "#include <colm/config.h>\n" + "#include <colm/defs.h>\n" + "#include <colm/input.h>\n" + "#include <colm/tree.h>\n" + "#include <colm/program.h>\n" + "#include <colm/colm.h>\n" + "\n" + "\n"; +} + +void FsmCodeGen::writeCode() +{ + redFsm->depthFirstOrdering(); + + writeData(); + writeExec(); + + /* Referenced in the runtime lib, but used only in the compiler. Probably + * should use the preprocessor to make these go away. */ + out << + "static void sendNamedLangEl( Program *prg, Tree **tree, PdaRun *pdaRun,\n" + " FsmRun *fsmRun, StreamImpl *inputStream ) { }\n" + "static void initBindings( PdaRun *pdaRun ) {}\n" + "static void popBinding( PdaRun *pdaRun, ParseTree *tree ) {}\n" + "\n" + "\n"; +} + + diff --git a/src/fsmcodegen.h b/src/fsmcodegen.h new file mode 100644 index 0000000..7c88dc8 --- /dev/null +++ b/src/fsmcodegen.h @@ -0,0 +1,206 @@ +/* + * Copyright 2001-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _FSMCODEGEN_H +#define _FSMCODEGEN_H + +#include <iostream> +#include <string> +#include <stdio.h> +#include "keyops.h" +#include "parsedata.h" +#include "redfsm.h" + +using std::string; +using std::ostream; + +/* Integer array line length. */ +#define IALL 8 + +/* Forwards. */ +struct RedFsm; +struct RedState; +struct GenAction; +struct NameInst; +struct RedAction; +struct LongestMatch; +struct TokenInstance; +struct InlineList; +struct InlineItem; +struct NameInst; +struct FsmCodeGen; + +typedef unsigned long ulong; +typedef unsigned char uchar; + + +/* + * The interface to the parser + */ + +std::ostream *openOutput( char *inputFile ); + +inline string itoa( int i ) +{ + char buf[16]; + sprintf( buf, "%i", i ); + return buf; +} + +/* + * class FsmCodeGen + */ +class FsmCodeGen +{ +public: + FsmCodeGen( ostream &out, RedFsm *redFsm, FsmTables *fsmTables ); + +protected: + + string FSM_NAME(); + string START_STATE_ID(); + ostream &ACTIONS_ARRAY(); + string GET_WIDE_KEY(); + string GET_WIDE_KEY( RedState *state ); + string TABS( int level ); + string KEY( Key key ); + string LDIR_PATH( char *path ); + void ACTION( ostream &ret, GenAction *action, int targState, bool inFinish ); + void CONDITION( ostream &ret, GenAction *condition ); + string ALPH_TYPE(); + string WIDE_ALPH_TYPE(); + string ARRAY_TYPE( unsigned long maxVal ); + + string ARR_OFF( string ptr, string offset ); + string CAST( string type ); + string UINT(); + string GET_KEY(); + + string ACCESS() { return "fsmRun->"; } + + string P() { return ACCESS() + "p"; } + string PE() { return ACCESS() + "pe"; } + string DATA_EOF() { return ACCESS() + "eof"; } + + string CS(); + string TOP() { return ACCESS() + "top"; } + string TOKSTART() { return ACCESS() + "tokstart"; } + string TOKEND() { return ACCESS() + "tokend"; } + string BLOCK_START() { return ACCESS() + "start"; } + string TOKLEN() { return ACCESS() + "toklen"; } + string ACT() { return ACCESS() + "act"; } + string MATCHED_TOKEN() { return ACCESS() + "matchedToken"; } + + string DATA_PREFIX(); + + string START() { return DATA_PREFIX() + "start"; } + string ERROR() { return DATA_PREFIX() + "error"; } + string FIRST_FINAL() { return DATA_PREFIX() + "first_final"; } + + string ENTRY_BY_REGION() { return DATA_PREFIX() + "entryByRegion"; } + + + void INLINE_LIST( ostream &ret, InlineList *inlineList, + int targState, bool inFinish ); + void EXEC_TOKEND( ostream &ret, InlineItem *item, int targState, int inFinish ); + void EXECTE( ostream &ret, InlineItem *item, int targState, int inFinish ); + void LM_SWITCH( ostream &ret, InlineItem *item, int targState, int inFinish ); + void SET_ACT( ostream &ret, InlineItem *item ); + void INIT_TOKSTART( ostream &ret, InlineItem *item ); + void INIT_ACT( ostream &ret, InlineItem *item ); + void SET_TOKSTART( ostream &ret, InlineItem *item ); + void SET_TOKEND( ostream &ret, InlineItem *item ); + void GET_TOKEND( ostream &ret, InlineItem *item ); + void SUB_ACTION( ostream &ret, InlineItem *item, int targState, bool inFinish ); + void LM_ON_LAST( ostream &ret, InlineItem *item ); + void LM_ON_NEXT( ostream &ret, InlineItem *item ); + void LM_ON_LAG_BEHIND( ostream &ret, InlineItem *item ); + void EXEC_TOKEND( ostream &ret ); + void EMIT_TOKEN( ostream &ret, LangEl *token ); + + string ERROR_STATE(); + string FIRST_FINAL_STATE(); + + string PTR_CONST(); + ostream &OPEN_ARRAY( string type, string name ); + ostream &CLOSE_ARRAY(); + ostream &STATIC_VAR( string type, string name ); + + string CTRL_FLOW(); + + unsigned int arrayTypeSize( unsigned long maxVal ); + +public: + ostream &out; + RedFsm *redFsm; + FsmTables *fsmTables; + int codeGenErrCount; + + /* Write options. */ + bool dataPrefix; + bool writeFirstFinal; + bool writeErr; + bool skipTokenLabelNeeded; + + std::ostream &TO_STATE_ACTION_SWITCH(); + std::ostream &FROM_STATE_ACTION_SWITCH(); + std::ostream &ACTION_SWITCH(); + std::ostream &STATE_GOTOS(); + std::ostream &TRANSITIONS(); + std::ostream &EXEC_FUNCS(); + + unsigned int TO_STATE_ACTION( RedState *state ); + unsigned int FROM_STATE_ACTION( RedState *state ); + + std::ostream &TO_STATE_ACTIONS(); + std::ostream &FROM_STATE_ACTIONS(); + + void emitCondBSearch( RedState *state, int level, int low, int high ); + void STATE_CONDS( RedState *state, bool genDefault ); + + void emitSingleSwitch( RedState *state ); + void emitRangeBSearch( RedState *state, int level, int low, int high ); + + std::ostream &EXIT_STATES(); + std::ostream &TRANS_GOTO( RedTrans *trans, int level ); + std::ostream &FINISH_CASES(); + + void writeIncludes(); + void writeData(); + void writeInit(); + void writeExec(); + void writeCode(); + void writeMain( long activeRealm ); + +protected: + bool useAgainLabel(); + + /* Called from GotoCodeGen::STATE_GOTOS just before writing the gotos for + * each state. */ + bool IN_TRANS_ACTIONS( RedState *state ); + void GOTO_HEADER( RedState *state ); + void STATE_GOTO_ERROR(); + + /* Set up labelNeeded flag for each state. */ + void setLabelsNeeded(); +}; + +#endif /* _FSMCODEGEN_H */ diff --git a/src/fsmexec.cc b/src/fsmexec.cc new file mode 100644 index 0000000..bec899f --- /dev/null +++ b/src/fsmexec.cc @@ -0,0 +1,223 @@ +/* + * Copyright 2007-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <string.h> +#include <iostream> + +#include "config.h" +#include "defs.h" +#include "redfsm.h" +#include "parsedata.h" +#include "parsetree.h" +#include "pdarun.h" +#include "global.h" + +void execAction( FsmRun *fsmRun, GenAction *genAction ) +{ + for ( InlineList::Iter item = *genAction->inlineList; item.lte(); item++ ) { + switch ( item->type ) { + case InlineItem::Text: + assert(false); + break; + case InlineItem::LmSetActId: + fsmRun->act = item->longestMatchPart->longestMatchId; + break; + case InlineItem::LmSetTokEnd: + fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; + break; + case InlineItem::LmInitTokStart: + assert(false); + break; + case InlineItem::LmInitAct: + fsmRun->act = 0; + break; + case InlineItem::LmSetTokStart: + fsmRun->tokstart = fsmRun->p; + break; + case InlineItem::LmSwitch: + /* If the switch handles error then we also forced the error state. It + * will exist. */ + fsmRun->toklen = fsmRun->tokend; + if ( item->tokenRegion->lmSwitchHandlesError && fsmRun->act == 0 ) { + fsmRun->cs = fsmRun->tables->errorState; + } + else { + for ( TokenInstanceListReg::Iter lmi = item->tokenRegion->tokenInstanceList; + lmi.lte(); lmi++ ) + { + if ( lmi->inLmSelect && fsmRun->act == lmi->longestMatchId ) + fsmRun->matchedToken = lmi->tokenDef->tdLangEl->id; + } + } + fsmRun->returnResult = true; + fsmRun->skipToklen = true; + break; + case InlineItem::LmOnLast: + fsmRun->p += 1; + fsmRun->matchedToken = item->longestMatchPart->tokenDef->tdLangEl->id; + fsmRun->returnResult = true; + break; + case InlineItem::LmOnNext: + fsmRun->matchedToken = item->longestMatchPart->tokenDef->tdLangEl->id; + fsmRun->returnResult = true; + break; + case InlineItem::LmOnLagBehind: + fsmRun->toklen = fsmRun->tokend; + fsmRun->matchedToken = item->longestMatchPart->tokenDef->tdLangEl->id; + fsmRun->returnResult = true; + fsmRun->skipToklen = true; + break; + } + } + + if ( genAction->markType == MarkMark ) + fsmRun->mark[genAction->markId-1] = fsmRun->p; +} + +extern "C" void internalFsmExecute( FsmRun *fsmRun, StreamImpl *inputStream ) +{ + int _klen; + unsigned int _trans; + const long *_acts; + unsigned int _nacts; + const char *_keys; + + fsmRun->start = fsmRun->p; + + /* Init the token match to nothing (the sentinal). */ + fsmRun->matchedToken = 0; + +/*_resume:*/ + if ( fsmRun->cs == fsmRun->tables->errorState ) + goto out; + + if ( fsmRun->p == fsmRun->pe ) + goto out; + +_loop_head: + _acts = fsmRun->tables->actions + fsmRun->tables->fromStateActions[fsmRun->cs]; + _nacts = (unsigned int) *_acts++; + while ( _nacts-- > 0 ) + execAction( fsmRun, fsmRun->tables->actionSwitch[*_acts++] ); + + _keys = fsmRun->tables->transKeys + fsmRun->tables->keyOffsets[fsmRun->cs]; + _trans = fsmRun->tables->indexOffsets[fsmRun->cs]; + + _klen = fsmRun->tables->singleLengths[fsmRun->cs]; + if ( _klen > 0 ) { + const char *_lower = _keys; + const char *_mid; + const char *_upper = _keys + _klen - 1; + while (1) { + if ( _upper < _lower ) + break; + + _mid = _lower + ((_upper-_lower) >> 1); + if ( (*fsmRun->p) < *_mid ) + _upper = _mid - 1; + else if ( (*fsmRun->p) > *_mid ) + _lower = _mid + 1; + else { + _trans += (_mid - _keys); + goto _match; + } + } + _keys += _klen; + _trans += _klen; + } + + _klen = fsmRun->tables->rangeLengths[fsmRun->cs]; + if ( _klen > 0 ) { + const char *_lower = _keys; + const char *_mid; + const char *_upper = _keys + (_klen<<1) - 2; + while (1) { + if ( _upper < _lower ) + break; + + _mid = _lower + (((_upper-_lower) >> 1) & ~1); + if ( (*fsmRun->p) < _mid[0] ) + _upper = _mid - 2; + else if ( (*fsmRun->p) > _mid[1] ) + _lower = _mid + 2; + else { + _trans += ((_mid - _keys)>>1); + goto _match; + } + } + _trans += _klen; + } + +_match: + fsmRun->cs = fsmRun->tables->transTargsWI[_trans]; + + if ( fsmRun->tables->transActionsWI[_trans] == 0 ) + goto _again; + + fsmRun->returnResult = false; + fsmRun->skipToklen = false; + _acts = fsmRun->tables->actions + fsmRun->tables->transActionsWI[_trans]; + _nacts = (unsigned int) *_acts++; + while ( _nacts-- > 0 ) + execAction( fsmRun, fsmRun->tables->actionSwitch[*_acts++] ); + if ( fsmRun->returnResult ) { + if ( fsmRun->skipToklen ) + goto skip_toklen; + goto final; + } + +_again: + _acts = fsmRun->tables->actions + fsmRun->tables->toStateActions[fsmRun->cs]; + _nacts = (unsigned int) *_acts++; + while ( _nacts-- > 0 ) + execAction( fsmRun, fsmRun->tables->actionSwitch[*_acts++] ); + + if ( fsmRun->cs == fsmRun->tables->errorState ) + goto out; + + if ( ++fsmRun->p != fsmRun->pe ) + goto _loop_head; +out: + if ( fsmRun->eof ) { + fsmRun->returnResult = false; + fsmRun->skipToklen = false; + _acts = fsmRun->tables->actions + fsmRun->tables->eofActions[fsmRun->cs]; + _nacts = (unsigned int) *_acts++; + + if ( fsmRun->tables->eofTargs[fsmRun->cs] >= 0 ) + fsmRun->cs = fsmRun->tables->eofTargs[fsmRun->cs]; + + while ( _nacts-- > 0 ) + execAction( fsmRun, fsmRun->tables->actionSwitch[*_acts++] ); + if ( fsmRun->returnResult ) { + if ( fsmRun->skipToklen ) + goto skip_toklen; + goto final; + } + } + +final: + + if ( fsmRun->p != 0 ) + fsmRun->toklen += fsmRun->p - fsmRun->start; +skip_toklen: + {} +} diff --git a/src/fsmgraph.cc b/src/fsmgraph.cc new file mode 100644 index 0000000..bf2d244 --- /dev/null +++ b/src/fsmgraph.cc @@ -0,0 +1,982 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <assert.h> +#include <iostream> + +#include "config.h" +#include "defs.h" +#include "fsmgraph.h" +#include "mergesort.h" + +using std::cerr; +using std::endl; + +/* Make a new state. The new state will be put on the graph's + * list of state. The new state can be created final or non final. */ +FsmState *FsmGraph::addState() +{ + /* Make the new state to return. */ + FsmState *state = new FsmState(); + + if ( misfitAccounting ) { + /* Create the new state on the misfit list. All states are created + * with no foreign in transitions. */ + misfitList.append( state ); + } + else { + /* Create the new state. */ + stateList.append( state ); + } + + return state; +} + +/* Construct an FSM that is the concatenation of an array of characters. A new + * machine will be made that has len+1 states with one transition between each + * state for each integer in str. IsSigned determines if the integers are to + * be considered as signed or unsigned ints. */ +void FsmGraph::concatFsm( Key *str, int len ) +{ + /* Make the first state and set it as the start state. */ + FsmState *last = addState(); + setStartState( last ); + + /* Attach subsequent states. */ + for ( int i = 0; i < len; i++ ) { + FsmState *newState = addState(); + attachNewTrans( last, newState, str[i], str[i] ); + last = newState; + } + + /* Make the last state the final state. */ + setFinState( last ); +} + +/* Case insensitive version of concatFsm. */ +void FsmGraph::concatFsmCI( Key *str, int len ) +{ + /* Make the first state and set it as the start state. */ + FsmState *last = addState(); + setStartState( last ); + + /* Attach subsequent states. */ + for ( int i = 0; i < len; i++ ) { + FsmState *newState = addState(); + + KeySet keySet; + if ( str[i].isLower() ) + keySet.insert( str[i].toUpper() ); + if ( str[i].isUpper() ) + keySet.insert( str[i].toLower() ); + keySet.insert( str[i] ); + + for ( int i = 0; i < keySet.length(); i++ ) + attachNewTrans( last, newState, keySet[i], keySet[i] ); + + last = newState; + } + + /* Make the last state the final state. */ + setFinState( last ); +} + +/* Construct a machine that matches one character. A new machine will be made + * that has two states with a single transition between the states. IsSigned + * determines if the integers are to be considered as signed or unsigned ints. */ +void FsmGraph::concatFsm( Key chr ) +{ + /* Two states first start, second final. */ + setStartState( addState() ); + + FsmState *end = addState(); + setFinState( end ); + + /* Attach on the character. */ + attachNewTrans( startState, end, chr, chr ); +} + +/* Construct a machine that matches any character in set. A new machine will + * be made that has two states and len transitions between the them. The set + * should be ordered correctly accroding to KeyOps and should not contain + * any duplicates. */ +void FsmGraph::orFsm( Key *set, int len ) +{ + /* Two states first start, second final. */ + setStartState( addState() ); + + FsmState *end = addState(); + setFinState( end ); + + for ( int i = 1; i < len; i++ ) + assert( set[i-1] < set[i] ); + + /* Attach on all the integers in the given string of ints. */ + for ( int i = 0; i < len; i++ ) + attachNewTrans( startState, end, set[i], set[i] ); +} + +/* Construct a machine that matches a range of characters. A new machine will + * be made with two states and a range transition between them. The range will + * match any characters from low to high inclusive. Low should be less than or + * equal to high otherwise undefined behaviour results. IsSigned determines + * if the integers are to be considered as signed or unsigned ints. */ +void FsmGraph::rangeFsm( Key low, Key high ) +{ + /* Two states first start, second final. */ + setStartState( addState() ); + + FsmState *end = addState(); + setFinState( end ); + + /* Attach using the range of characters. */ + attachNewTrans( startState, end, low, high ); +} + +/* Construct a machine that a repeated range of characters. */ +void FsmGraph::rangeStarFsm( Key low, Key high) +{ + /* One state which is final and is the start state. */ + setStartState( addState() ); + setFinState( startState ); + + /* Attach start to start using range of characters. */ + attachNewTrans( startState, startState, low, high ); +} + +/* Construct a machine that matches the empty string. A new machine will be + * made with only one state. The new state will be both a start and final + * state. IsSigned determines if the machine has a signed or unsigned + * alphabet. Fsm operations must be done on machines with the same alphabet + * signedness. */ +void FsmGraph::lambdaFsm( ) +{ + /* Give it one state with no transitions making it + * the start state and final state. */ + setStartState( addState() ); + setFinState( startState ); +} + +/* Construct a machine that matches nothing at all. A new machine will be + * made with only one state. It will not be final. */ +void FsmGraph::emptyFsm( ) +{ + /* Give it one state with no transitions making it + * the start state and final state. */ + setStartState( addState() ); +} + +void FsmGraph::transferOutData( FsmState *destState, FsmState *srcState ) +{ + for ( TransList::Iter trans = destState->outList; trans.lte(); trans++ ) { + if ( trans->toState != 0 ) { + /* Get the actions data from the outActionTable. */ + trans->actionTable.setActions( srcState->outActionTable ); + + /* Get the priorities from the outPriorTable. */ + trans->priorTable.setPriors( srcState->outPriorTable ); + } + } +} + +/* Kleene star operator. Makes this machine the kleene star of itself. Any + * transitions made going out of the machine and back into itself will be + * notified that they are leaving transitions by having the leavingFromState + * callback invoked. */ +void FsmGraph::starOp( ) +{ + /* For the merging process. */ + MergeData md; + + /* Turn on misfit accounting to possibly catch the old start state. */ + setMisfitAccounting( true ); + + /* Create the new new start state. It will be set final after the merging + * of the final states with the start state is complete. */ + FsmState *prevStartState = startState; + unsetStartState(); + setStartState( addState() ); + + /* Merge the new start state with the old one to isolate it. */ + mergeStates( md, startState, prevStartState ); + + /* Merge the start state into all final states. Except the start state on + * the first pass. If the start state is set final we will be doubling up + * its transitions, which will get transfered to any final states that + * follow it in the final state set. This will be determined by the order + * of items in the final state set. To prevent this we just merge with the + * start on a second pass. */ + for ( StateSet::Iter st = finStateSet; st.lte(); st++ ) { + if ( *st != startState ) + mergeStatesLeaving( md, *st, startState ); + } + + /* Now it is safe to merge the start state with itself (provided it + * is set final). */ + if ( startState->isFinState() ) + mergeStatesLeaving( md, startState, startState ); + + /* Now ensure the new start state is a final state. */ + setFinState( startState ); + + /* Fill in any states that were newed up as combinations of others. */ + fillInStates( md ); + + /* Remove the misfits and turn off misfit accounting. */ + removeMisfits(); + setMisfitAccounting( false ); +} + +void FsmGraph::repeatOp( int times ) +{ + /* Must be 1 and up. 0 produces null machine and requires deleting this. */ + assert( times > 0 ); + + /* A repeat of one does absolutely nothing. */ + if ( times == 1 ) + return; + + /* Make a machine to make copies from. */ + FsmGraph *copyFrom = new FsmGraph( *this ); + + /* Concatentate duplicates onto the end up until before the last. */ + for ( int i = 1; i < times-1; i++ ) { + FsmGraph *dup = new FsmGraph( *copyFrom ); + doConcat( dup, 0, false ); + } + + /* Now use the copyFrom on the end. */ + doConcat( copyFrom, 0, false ); +} + +void FsmGraph::optionalRepeatOp( int times ) +{ + /* Must be 1 and up. 0 produces null machine and requires deleting this. */ + assert( times > 0 ); + + /* A repeat of one optional merely allows zero string. */ + if ( times == 1 ) { + setFinState( startState ); + return; + } + + /* Make a machine to make copies from. */ + FsmGraph *copyFrom = new FsmGraph( *this ); + + /* The state set used in the from end of the concatentation. Starts with + * the initial final state set, then after each concatenation, gets set to + * the the final states that come from the the duplicate. */ + StateSet lastFinSet( finStateSet ); + + /* Set the initial state to zero to allow zero copies. */ + setFinState( startState ); + + /* Concatentate duplicates onto the end up until before the last. */ + for ( int i = 1; i < times-1; i++ ) { + /* Make a duplicate for concating and set the fin bits to graph 2 so we + * can pick out it's final states after the optional style concat. */ + FsmGraph *dup = new FsmGraph( *copyFrom ); + dup->setFinBits( SB_GRAPH2 ); + doConcat( dup, &lastFinSet, true ); + + /* Clear the last final state set and make the new one by taking only + * the final states that come from graph 2.*/ + lastFinSet.empty(); + for ( int i = 0; i < finStateSet.length(); i++ ) { + /* If the state came from graph 2, add it to the last set and clear + * the bits. */ + FsmState *fs = finStateSet[i]; + if ( fs->stateBits & SB_GRAPH2 ) { + lastFinSet.insert( fs ); + fs->stateBits &= ~SB_GRAPH2; + } + } + } + + /* Now use the copyFrom on the end, no bits set, no bits to clear. */ + doConcat( copyFrom, &lastFinSet, true ); +} + + +/* Fsm concatentation worker. Supports treating the concatentation as optional, + * which essentially leaves the final states of machine one as final. */ +void FsmGraph::doConcat( FsmGraph *other, StateSet *fromStates, bool optional ) +{ + /* For the merging process. */ + StateSet finStateSetCopy, startStateSet; + MergeData md; + + /* Turn on misfit accounting for both graphs. */ + setMisfitAccounting( true ); + other->setMisfitAccounting( true ); + + /* Get the other's start state. */ + FsmState *otherStartState = other->startState; + + /* Unset other's start state before bringing in the entry points. */ + other->unsetStartState(); + + /* Bring in the rest of other's entry points. */ + copyInEntryPoints( other ); + other->entryPoints.empty(); + + /* Bring in other's states into our state lists. */ + stateList.append( other->stateList ); + misfitList.append( other->misfitList ); + + /* If from states is not set, then get a copy of our final state set before + * we clobber it and use it instead. */ + if ( fromStates == 0 ) { + finStateSetCopy = finStateSet; + fromStates = &finStateSetCopy; + } + + /* Unset all of our final states and get the final states from other. */ + if ( !optional ) + unsetAllFinStates(); + finStateSet.insert( other->finStateSet ); + + /* Since other's lists are empty, we can delete the fsm without + * affecting any states. */ + delete other; + + /* Merge our former final states with the start state of other. */ + for ( int i = 0; i < fromStates->length(); i++ ) { + FsmState *state = fromStates->data[i]; + + /* Merge the former final state with other's start state. */ + mergeStatesLeaving( md, state, otherStartState ); + + /* If the former final state was not reset final then we must clear + * the state's out trans data. If it got reset final then it gets to + * keep its out trans data. This must be done before fillInStates gets + * called to prevent the data from being sourced. */ + if ( ! state->isFinState() ) + clearOutData( state ); + } + + /* Fill in any new states made from merging. */ + fillInStates( md ); + + /* Remove the misfits and turn off misfit accounting. */ + removeMisfits(); + setMisfitAccounting( false ); +} + +/* Concatenates other to the end of this machine. Other is deleted. Any + * transitions made leaving this machine and entering into other are notified + * that they are leaving transitions by having the leavingFromState callback + * invoked. */ +void FsmGraph::concatOp( FsmGraph *other ) +{ + /* Assert same signedness and return graph concatenation op. */ + doConcat( other, 0, false ); +} + + +void FsmGraph::doOr( FsmGraph *other ) +{ + /* For the merging process. */ + MergeData md; + + /* Build a state set consisting of both start states */ + StateSet startStateSet; + startStateSet.insert( startState ); + startStateSet.insert( other->startState ); + + /* Both of the original start states loose their start state status. */ + unsetStartState(); + other->unsetStartState(); + + /* Bring in the rest of other's entry points. */ + copyInEntryPoints( other ); + other->entryPoints.empty(); + + /* Merge the lists. This will move all the states from other + * into this. No states will be deleted. */ + stateList.append( other->stateList ); + misfitList.append( other->misfitList ); + + /* Move the final set data from other into this. */ + finStateSet.insert(other->finStateSet); + other->finStateSet.empty(); + + /* Since other's list is empty, we can delete the fsm without + * affecting any states. */ + delete other; + + /* Create a new start state. */ + setStartState( addState() ); + + /* Merge the start states. */ + mergeStates( md, startState, startStateSet.data, startStateSet.length() ); + + /* Fill in any new states made from merging. */ + fillInStates( md ); +} + +/* Unions other with this machine. Other is deleted. */ +void FsmGraph::unionOp( FsmGraph *other ) +{ + /* Turn on misfit accounting for both graphs. */ + setMisfitAccounting( true ); + other->setMisfitAccounting( true ); + + /* Call Worker routine. */ + doOr( other ); + + /* Remove the misfits and turn off misfit accounting. */ + removeMisfits(); + setMisfitAccounting( false ); +} + +/* Intersects other with this machine. Other is deleted. */ +void FsmGraph::intersectOp( FsmGraph *other ) +{ + /* Turn on misfit accounting for both graphs. */ + setMisfitAccounting( true ); + other->setMisfitAccounting( true ); + + /* Set the fin bits on this and other to want each other. */ + setFinBits( SB_GRAPH1 ); + other->setFinBits( SB_GRAPH2 ); + + /* Call worker Or routine. */ + doOr( other ); + + /* Unset any final states that are no longer to + * be final due to final bits. */ + unsetIncompleteFinals(); + + /* Remove the misfits and turn off misfit accounting. */ + removeMisfits(); + setMisfitAccounting( false ); + + /* Remove states that have no path to a final state. */ + removeDeadEndStates(); +} + +/* Set subtracts other machine from this machine. Other is deleted. */ +void FsmGraph::subtractOp( FsmGraph *other ) +{ + /* Turn on misfit accounting for both graphs. */ + setMisfitAccounting( true ); + other->setMisfitAccounting( true ); + + /* Set the fin bits of other to be killers. */ + other->setFinBits( SB_GRAPH1 ); + + /* Call worker Or routine. */ + doOr( other ); + + /* Unset any final states that are no longer to + * be final due to final bits. */ + unsetKilledFinals(); + + /* Remove the misfits and turn off misfit accounting. */ + removeMisfits(); + setMisfitAccounting( false ); + + /* Remove states that have no path to a final state. */ + removeDeadEndStates(); +} + +bool FsmGraph::inEptVect( EptVect *eptVect, FsmState *state ) +{ + if ( eptVect != 0 ) { + /* Vect is there, walk it looking for state. */ + for ( int i = 0; i < eptVect->length(); i++ ) { + if ( eptVect->data[i].targ == state ) + return true; + } + } + return false; +} + +/* Fill epsilon vectors in a root state from a given starting point. Epmploys + * a depth first search through the graph of epsilon transitions. */ +void FsmGraph::epsilonFillEptVectFrom( FsmState *root, FsmState *from, bool parentLeaving ) +{ + /* Walk the epsilon transitions out of the state. */ + for ( EpsilonTrans::Iter ep = from->epsilonTrans; ep.lte(); ep++ ) { + /* Find the entry point, if the it does not resove, ignore it. */ + EntryMapEl *enLow, *enHigh; + if ( entryPoints.findMulti( *ep, enLow, enHigh ) ) { + /* Loop the targets. */ + for ( EntryMapEl *en = enLow; en <= enHigh; en++ ) { + /* Do not add the root or states already in eptVect. */ + FsmState *targ = en->value; + if ( targ != from && !inEptVect(root->eptVect, targ) ) { + /* Maybe need to create the eptVect. */ + if ( root->eptVect == 0 ) + root->eptVect = new EptVect(); + + /* If moving to a different graph or if any parent is + * leaving then we are leaving. */ + bool leaving = parentLeaving || + root->owningGraph != targ->owningGraph; + + /* All ok, add the target epsilon and recurse. */ + root->eptVect->append( EptVectEl(targ, leaving) ); + epsilonFillEptVectFrom( root, targ, leaving ); + } + } + } + } +} + +void FsmGraph::shadowReadWriteStates( MergeData &md ) +{ + /* Init isolatedShadow algorithm data. */ + for ( StateList::Iter st = stateList; st.lte(); st++ ) + st->isolatedShadow = 0; + + /* Any states that may be both read from and written to must + * be shadowed. */ + for ( StateList::Iter st = stateList; st.lte(); st++ ) { + /* Find such states by looping through stateVect lists, which give us + * the states that will be read from. May cause us to visit the states + * that we are interested in more than once. */ + if ( st->eptVect != 0 ) { + /* For all states that will be read from. */ + for ( EptVect::Iter ept = *st->eptVect; ept.lte(); ept++ ) { + /* Check for read and write to the same state. */ + FsmState *targ = ept->targ; + if ( targ->eptVect != 0 ) { + /* State is to be written to, if the shadow is not already + * there, create it. */ + if ( targ->isolatedShadow == 0 ) { + FsmState *shadow = addState(); + mergeStates( md, shadow, targ ); + targ->isolatedShadow = shadow; + } + + /* Write shadow into the state vector so that it is the + * state that the epsilon transition will read from. */ + ept->targ = targ->isolatedShadow; + } + } + } + } +} + +void FsmGraph::resolveEpsilonTrans( MergeData &md ) +{ + /* Walk the state list and invoke recursive worker on each state. */ + for ( StateList::Iter st = stateList; st.lte(); st++ ) + epsilonFillEptVectFrom( st, st, false ); + + /* Prevent reading from and writing to of the same state. */ + shadowReadWriteStates( md ); + + /* For all states that have epsilon transitions out, draw the transitions, + * clear the epsilon transitions. */ + for ( StateList::Iter st = stateList; st.lte(); st++ ) { + /* If there is a state vector, then create the pre-merge state. */ + if ( st->eptVect != 0 ) { + /* Merge all the epsilon targets into the state. */ + for ( EptVect::Iter ept = *st->eptVect; ept.lte(); ept++ ) { + if ( ept->leaving ) + mergeStatesLeaving( md, st, ept->targ ); + else + mergeStates( md, st, ept->targ ); + } + + /* Clean up the target list. */ + delete st->eptVect; + st->eptVect = 0; + } + + /* Clear the epsilon transitions vector. */ + st->epsilonTrans.empty(); + } +} + +void FsmGraph::epsilonOp() +{ + /* For merging process. */ + MergeData md; + + setMisfitAccounting( true ); + + for ( StateList::Iter st = stateList; st.lte(); st++ ) + st->owningGraph = 0; + + /* Perform merges. */ + resolveEpsilonTrans( md ); + + /* Epsilons can caused merges which leave behind unreachable states. */ + fillInStates( md ); + + /* Remove the misfits and turn off misfit accounting. */ + removeMisfits(); + setMisfitAccounting( false ); +} + +/* Make a new maching by joining together a bunch of machines without making + * any transitions between them. A negative finalId results in there being no + * final id. */ +void FsmGraph::joinOp( int startId, int finalId, FsmGraph **others, int numOthers ) +{ + /* For the merging process. */ + MergeData md; + + /* Set the owning machines. Start at one. Zero is reserved for the start + * and final states. */ + for ( StateList::Iter st = stateList; st.lte(); st++ ) + st->owningGraph = 1; + for ( int m = 0; m < numOthers; m++ ) { + for ( StateList::Iter st = others[m]->stateList; st.lte(); st++ ) + st->owningGraph = 2+m; + } + + /* All machines loose start state status. */ + unsetStartState(); + for ( int m = 0; m < numOthers; m++ ) + others[m]->unsetStartState(); + + /* Bring the other machines into this. */ + for ( int m = 0; m < numOthers; m++ ) { + /* Bring in the rest of other's entry points. */ + copyInEntryPoints( others[m] ); + others[m]->entryPoints.empty(); + + /* Merge the lists. This will move all the states from other into + * this. No states will be deleted. */ + stateList.append( others[m]->stateList ); + assert( others[m]->misfitList.length() == 0 ); + + /* Move the final set data from other into this. */ + finStateSet.insert( others[m]->finStateSet ); + others[m]->finStateSet.empty(); + + /* Since other's list is empty, we can delete the fsm without + * affecting any states. */ + delete others[m]; + } + + /* Look up the start entry point. */ + EntryMapEl *enLow = 0, *enHigh = 0; + bool findRes = entryPoints.findMulti( startId, enLow, enHigh ); + if ( ! findRes ) { + /* No start state. Set a default one and proceed with the join. Note + * that the result of the join will be a very uninteresting machine. */ + setStartState( addState() ); + } + else { + /* There is at least one start state, create a state that will become + * the new start state. */ + FsmState *newStart = addState(); + setStartState( newStart ); + + /* The start state is in an owning machine class all it's own. */ + newStart->owningGraph = 0; + + /* Create the set of states to merge from. */ + StateSet stateSet; + for ( EntryMapEl *en = enLow; en <= enHigh; en++ ) + stateSet.insert( en->value ); + + /* Merge in the set of start states into the new start state. */ + mergeStates( md, newStart, stateSet.data, stateSet.length() ); + } + + /* Take a copy of the final state set, before unsetting them all. This + * will allow us to call clearOutData on the states that don't get + * final state status back back. */ + StateSet finStateSetCopy = finStateSet; + + /* Now all final states are unset. */ + unsetAllFinStates(); + + if ( finalId >= 0 ) { + /* Create the implicit final state. */ + FsmState *finState = addState(); + setFinState( finState ); + + /* Assign an entry into the final state on the final state entry id. Note + * that there may already be an entry on this id. That's ok. Also set the + * final state owning machine id. It's in a class all it's own. */ + setEntry( finalId, finState ); + finState->owningGraph = 0; + } + + /* Hand over to workers for resolving epsilon trans. This will merge states + * with the targets of their epsilon transitions. */ + resolveEpsilonTrans( md ); + + /* Invoke the relinquish final callback on any states that did not get + * final state status back. */ + for ( StateSet::Iter st = finStateSetCopy; st.lte(); st++ ) { + if ( !((*st)->stateBits & SB_ISFINAL) ) + clearOutData( *st ); + } + + /* Fill in any new states made from merging. */ + fillInStates( md ); + + /* Joining can be messy. Instead of having misfit accounting on (which is + * tricky here) do a full cleaning. */ + removeUnreachableStates(); +} + +void FsmGraph::globOp( FsmGraph **others, int numOthers ) +{ + /* All other machines loose start states status. */ + for ( int m = 0; m < numOthers; m++ ) + others[m]->unsetStartState(); + + /* Bring the other machines into this. */ + for ( int m = 0; m < numOthers; m++ ) { + /* Bring in the rest of other's entry points. */ + copyInEntryPoints( others[m] ); + others[m]->entryPoints.empty(); + + /* Merge the lists. This will move all the states from other into + * this. No states will be deleted. */ + stateList.append( others[m]->stateList ); + assert( others[m]->misfitList.length() == 0 ); + + /* Move the final set data from other into this. */ + finStateSet.insert( others[m]->finStateSet ); + others[m]->finStateSet.empty(); + + /* Since other's list is empty, we can delete the fsm without + * affecting any states. */ + delete others[m]; + } +} + +void FsmGraph::deterministicEntry() +{ + /* For the merging process. */ + MergeData md; + + /* States may loose their entry points, turn on misfit accounting. */ + setMisfitAccounting( true ); + + /* Get a copy of the entry map then clear all the entry points. As we + * iterate the old entry map finding duplicates we will add the entry + * points for the new states that we create. */ + EntryMap prevEntry = entryPoints; + unsetAllEntryPoints(); + + for ( int enId = 0; enId < prevEntry.length(); ) { + /* Count the number of states on this entry key. */ + int highId = enId; + while ( highId < prevEntry.length() && prevEntry[enId].key == prevEntry[highId].key ) + highId += 1; + + int numIds = highId - enId; + if ( numIds == 1 ) { + /* Only a single entry point, just set the entry. */ + setEntry( prevEntry[enId].key, prevEntry[enId].value ); + } + else { + /* Multiple entry points, need to create a new state and merge in + * all the targets of entry points. */ + FsmState *newEntry = addState(); + for ( int en = enId; en < highId; en++ ) + mergeStates( md, newEntry, prevEntry[en].value ); + + /* Add the new state as the single entry point. */ + setEntry( prevEntry[enId].key, newEntry ); + } + + enId += numIds; + } + + /* The old start state may be unreachable. Remove the misfits and turn off + * misfit accounting. */ + removeMisfits(); + setMisfitAccounting( false ); +} + +/* Unset any final states that are no longer to be final due to final bits. */ +void FsmGraph::unsetKilledFinals() +{ + /* Duplicate the final state set before we begin modifying it. */ + StateSet fin( finStateSet ); + + for ( int s = 0; s < fin.length(); s++ ) { + /* Check for killing bit. */ + FsmState *state = fin.data[s]; + if ( state->stateBits & SB_GRAPH1 ) { + /* One final state is a killer, set to non-final. */ + unsetFinState( state ); + } + + /* Clear all killing bits. Non final states should never have had those + * state bits set in the first place. */ + state->stateBits &= ~SB_GRAPH1; + } +} + +/* Unset any final states that are no longer to be final due to final bits. */ +void FsmGraph::unsetIncompleteFinals() +{ + /* Duplicate the final state set before we begin modifying it. */ + StateSet fin( finStateSet ); + + for ( int s = 0; s < fin.length(); s++ ) { + /* Check for one set but not the other. */ + FsmState *state = fin.data[s]; + if ( state->stateBits & SB_BOTH && + (state->stateBits & SB_BOTH) != SB_BOTH ) + { + /* One state wants the other but it is not there. */ + unsetFinState( state ); + } + + /* Clear wanting bits. Non final states should never have had those + * state bits set in the first place. */ + state->stateBits &= ~SB_BOTH; + } +} + +/* Ensure that the start state is free of entry points (aside from the fact + * that it is the start state). If the start state has entry points then Make a + * new start state by merging with the old one. Useful before modifying start + * transitions. If the existing start state has any entry points other than the + * start state entry then modifying its transitions changes more than the start + * transitions. So isolate the start state by separating it out such that it + * only has start stateness as it's entry point. */ +void FsmGraph::isolateStartState( ) +{ + /* For the merging process. */ + MergeData md; + + /* Bail out if the start state is already isolated. */ + if ( isStartStateIsolated() ) + return; + + /* Turn on misfit accounting to possibly catch the old start state. */ + setMisfitAccounting( true ); + + /* This will be the new start state. The existing start + * state is merged with it. */ + FsmState *prevStartState = startState; + unsetStartState(); + setStartState( addState() ); + + /* Merge the new start state with the old one to isolate it. */ + mergeStates( md, startState, prevStartState ); + + /* Stfil and stateDict will be empty because the merging of the old start + * state into the new one will not have any conflicting transitions. */ + assert( md.stateDict.treeSize == 0 ); + assert( md.stfillHead == 0 ); + + /* The old start state may be unreachable. Remove the misfits and turn off + * misfit accounting. */ + removeMisfits(); + setMisfitAccounting( false ); +} + +/* A state merge which represents the drawing in of leaving transitions. If + * there is any out data then we duplicate the souce state, transfer the out + * data, then merge in the state. The new state will be reaped because it will + * not be given any in transitions. */ +void FsmGraph::mergeStatesLeaving( MergeData &md, FsmState *destState, FsmState *srcState ) +{ + if ( !hasOutData( destState ) ) + mergeStates( md, destState, srcState ); + else { + FsmState *ssMutable = addState(); + mergeStates( md, ssMutable, srcState ); + transferOutData( ssMutable, destState ); + mergeStates( md, destState, ssMutable ); + } +} + +void FsmGraph::mergeStates( MergeData &md, FsmState *destState, + FsmState **srcStates, int numSrc ) +{ + for ( int s = 0; s < numSrc; s++ ) + mergeStates( md, destState, srcStates[s] ); +} + +void FsmGraph::mergeStates( MergeData &md, FsmState *destState, FsmState *srcState ) +{ + outTransCopy( md, destState, srcState->outList.head ); + + /* Get its bits and final state status. */ + destState->stateBits |= ( srcState->stateBits & ~SB_ISFINAL ); + if ( srcState->isFinState() ) + setFinState( destState ); + + /* Draw in any properties of srcState into destState. */ + if ( srcState == destState ) { + /* Duplicate the list to protect against write to source. The + * priorities sets are not copied in because that would have no + * effect. */ + destState->epsilonTrans.append( EpsilonTrans( srcState->epsilonTrans ) ); + + /* Get all actions, duplicating to protect against write to source. */ + destState->toStateActionTable.setActions( + ActionTable( srcState->toStateActionTable ) ); + destState->fromStateActionTable.setActions( + ActionTable( srcState->fromStateActionTable ) ); + destState->outActionTable.setActions( ActionTable( srcState->outActionTable ) ); + destState->outCondSet.insert( ActionSet( srcState->outCondSet ) ); + destState->errActionTable.setActions( ErrActionTable( srcState->errActionTable ) ); + destState->eofActionTable.setActions( ActionTable( srcState->eofActionTable ) ); + } + else { + /* Get the epsilons, out priorities. */ + destState->epsilonTrans.append( srcState->epsilonTrans ); + destState->outPriorTable.setPriors( srcState->outPriorTable ); + + /* Get all actions. */ + destState->toStateActionTable.setActions( srcState->toStateActionTable ); + destState->fromStateActionTable.setActions( srcState->fromStateActionTable ); + destState->outActionTable.setActions( srcState->outActionTable ); + destState->outCondSet.insert( srcState->outCondSet ); + destState->errActionTable.setActions( srcState->errActionTable ); + destState->eofActionTable.setActions( srcState->eofActionTable ); + } +} + +void FsmGraph::fillInStates( MergeData &md ) +{ + /* Merge any states that are awaiting merging. This will likey cause + * other states to be added to the stfil list. */ + FsmState *state = md.stfillHead; + while ( state != 0 ) { + StateSet *stateSet = &state->stateDictEl->stateSet; + mergeStates( md, state, stateSet->data, stateSet->length() ); + state = state->alg.next; + } + + /* Delete the state sets of all states that are on the fill list. */ + state = md.stfillHead; + while ( state != 0 ) { + /* Delete and reset the state set. */ + delete state->stateDictEl; + state->stateDictEl = 0; + + /* Next state in the stfill list. */ + state = state->alg.next; + } + + /* StateDict will still have its ptrs/size set but all of it's element + * will be deleted so we don't need to clean it up. */ +} diff --git a/src/fsmgraph.h b/src/fsmgraph.h new file mode 100644 index 0000000..9a0f2ae --- /dev/null +++ b/src/fsmgraph.h @@ -0,0 +1,1317 @@ +/* + * Copyright 2001-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _FSMGRAPH_H +#define _FSMGRAPH_H + +#include <assert.h> +#include "keyops.h" +#include "vector.h" +#include "bstset.h" +#include "compare.h" +#include "avltree.h" +#include "dlist.h" +#include "bstmap.h" +#include "sbstmap.h" +#include "sbstset.h" +#include "sbsttable.h" +#include "avlset.h" +#include "avlmap.h" + +/* Flags that control merging. */ +#define SB_GRAPH1 0x01 +#define SB_GRAPH2 0x02 +#define SB_BOTH 0x03 +#define SB_ISFINAL 0x04 +#define SB_ISMARKED 0x08 +#define SB_ONLIST 0x10 + +struct FsmTrans; +struct FsmState; +struct FsmGraph; +struct Action; +struct TokenInstance; +struct NameInst; + +/* State list element for unambiguous access to list element. */ +struct FsmListEl +{ + FsmState *prev, *next; +}; + +/* This is the marked index for a state pair. Used in minimization. It keeps + * track of whether or not the state pair is marked. */ +struct MarkIndex +{ + MarkIndex(int states); + ~MarkIndex(); + + void markPair(int state1, int state2); + bool isPairMarked(int state1, int state2); + +private: + int numStates; + bool *array; +}; + +extern KeyOps *keyOps; + +/* Transistion Action Element. */ +typedef SBstMapEl< int, Action* > ActionTableEl; + +/* Transition Action Table. */ +struct ActionTable + : public SBstMap< int, Action*, CmpOrd<int> > +{ + void setAction( int ordering, Action *action ); + void setActions( int *orderings, Action **actions, int nActs ); + void setActions( const ActionTable &other ); + + bool hasAction( Action *action ); +}; + +typedef SBstSet< Action*, CmpOrd<Action*> > ActionSet; +typedef CmpSTable< Action*, CmpOrd<Action*> > CmpActionSet; + +/* Transistion Action Element. */ +typedef SBstMapEl< int, TokenInstance* > LmActionTableEl; + +/* Transition Action Table. */ +struct LmActionTable + : public SBstMap< int, TokenInstance*, CmpOrd<int> > +{ + void setAction( int ordering, TokenInstance *action ); + void setActions( const LmActionTable &other ); +}; + +/* Compare of a whole action table element (key & value). */ +struct CmpActionTableEl +{ + static int compare( const ActionTableEl &action1, + const ActionTableEl &action2 ) + { + if ( action1.key < action2.key ) + return -1; + else if ( action1.key > action2.key ) + return 1; + else if ( action1.value < action2.value ) + return -1; + else if ( action1.value > action2.value ) + return 1; + return 0; + } +}; + +/* Compare for ActionTable. */ +typedef CmpSTable< ActionTableEl, CmpActionTableEl > CmpActionTable; + +/* Compare of a whole lm action table element (key & value). */ +struct CmpLmActionTableEl +{ + static int compare( const LmActionTableEl &lmAction1, + const LmActionTableEl &lmAction2 ) + { + if ( lmAction1.key < lmAction2.key ) + return -1; + else if ( lmAction1.key > lmAction2.key ) + return 1; + else if ( lmAction1.value < lmAction2.value ) + return -1; + else if ( lmAction1.value > lmAction2.value ) + return 1; + return 0; + } +}; + +/* Compare for ActionTable. */ +typedef CmpSTable< LmActionTableEl, CmpLmActionTableEl > CmpLmActionTable; + +/* Action table element for error action tables. Adds the encoding of transfer + * point. */ +struct ErrActionTableEl +{ + ErrActionTableEl( Action *action, int ordering, int transferPoint ) + : ordering(ordering), action(action), transferPoint(transferPoint) { } + + /* Ordering and id of the action embedding. */ + int ordering; + Action *action; + + /* Id of point of transfere from Error action table to transtions and + * eofActionTable. */ + int transferPoint; + + int getKey() const { return ordering; } +}; + +struct ErrActionTable + : public SBstTable< ErrActionTableEl, int, CmpOrd<int> > +{ + void setAction( int ordering, Action *action, int transferPoint ); + void setActions( const ErrActionTable &other ); +}; + +/* Compare of an error action table element (key & value). */ +struct CmpErrActionTableEl +{ + static int compare( const ErrActionTableEl &action1, + const ErrActionTableEl &action2 ) + { + if ( action1.ordering < action2.ordering ) + return -1; + else if ( action1.ordering > action2.ordering ) + return 1; + else if ( action1.action < action2.action ) + return -1; + else if ( action1.action > action2.action ) + return 1; + else if ( action1.transferPoint < action2.transferPoint ) + return -1; + else if ( action1.transferPoint > action2.transferPoint ) + return 1; + return 0; + } +}; + +/* Compare for ErrActionTable. */ +typedef CmpSTable< ErrActionTableEl, CmpErrActionTableEl > CmpErrActionTable; + + +/* Descibe a priority, shared among PriorEls. + * Has key and whether or not used. */ +struct PriorDesc +{ + int key; + int priority; +}; + +/* Element in the arrays of priorities for transitions and arrays. Ordering is + * unique among instantiations of machines, desc is shared. */ +struct PriorEl +{ + PriorEl( int ordering, PriorDesc *desc ) + : ordering(ordering), desc(desc) { } + + int ordering; + PriorDesc *desc; +}; + +/* Compare priority elements, which are ordered by the priority descriptor + * key. */ +struct PriorElCmp +{ + static inline int compare( const PriorEl &pel1, const PriorEl &pel2 ) + { + if ( pel1.desc->key < pel2.desc->key ) + return -1; + else if ( pel1.desc->key > pel2.desc->key ) + return 1; + else + return 0; + } +}; + + +/* Priority Table. */ +struct PriorTable + : public SBstSet< PriorEl, PriorElCmp > +{ + void setPrior( int ordering, PriorDesc *desc ); + void setPriors( const PriorTable &other ); +}; + +/* Compare of prior table elements for distinguising state data. */ +struct CmpPriorEl +{ + static inline int compare( const PriorEl &pel1, const PriorEl &pel2 ) + { + if ( pel1.desc < pel2.desc ) + return -1; + else if ( pel1.desc > pel2.desc ) + return 1; + else if ( pel1.ordering < pel2.ordering ) + return -1; + else if ( pel1.ordering > pel2.ordering ) + return 1; + return 0; + } +}; + +/* Compare of PriorTable distinguising state data. Using a compare of the + * pointers is a little more strict than it needs be. It requires that + * prioritiy tables have the exact same set of priority assignment operators + * (from the input lang) to be considered equal. + * + * Really only key-value pairs need be tested and ordering be merged. However + * this would require that in the fuseing of states, priority descriptors be + * chosen for the new fused state based on priority. Since the out transition + * lists and ranges aren't necessarily going to line up, this is more work for + * little gain. Final compression resets all priorities first, so this would + * only be useful for compression at every operator, which is only an + * undocumented test feature. + */ +typedef CmpSTable<PriorEl, CmpPriorEl> CmpPriorTable; + +/* Plain action list that imposes no ordering. */ +typedef Vector<int> TransFuncList; + +/* Comparison for TransFuncList. */ +typedef CmpTable< int, CmpOrd<int> > TransFuncListCompare; + +/* Transition class that implements actions and priorities. */ +struct FsmTrans +{ + FsmTrans() : fromState(0), toState(0) {} + FsmTrans( const FsmTrans &other ) : + lowKey(other.lowKey), + highKey(other.highKey), + fromState(0), toState(0), + actionTable(other.actionTable), + priorTable(other.priorTable) + { + assert( lmActionTable.length() == 0 && other.lmActionTable.length() == 0 ); + } + + Key lowKey, highKey; + FsmState *fromState; + FsmState *toState; + + /* Pointers for outlist. */ + FsmTrans *prev, *next; + + /* Pointers for in-list. */ + FsmTrans *ilprev, *ilnext; + + /* The function table and priority for the transition. */ + ActionTable actionTable; + PriorTable priorTable; + + LmActionTable lmActionTable; +}; + +/* In transition list. Like DList except only has head pointers, which is all + * that is required. Insertion and deletion is handled by the graph. This + * class provides the iterator of a single list. */ +struct TransInList +{ + TransInList() : head(0) { } + + FsmTrans *head; + + struct Iter + { + /* Default construct. */ + Iter() : ptr(0) { } + + /* Construct, assign from a list. */ + Iter( const TransInList &il ) : ptr(il.head) { } + Iter &operator=( const TransInList &dl ) { ptr = dl.head; return *this; } + + /* At the end */ + bool lte() const { return ptr != 0; } + bool end() const { return ptr == 0; } + + /* At the first, last element. */ + bool first() const { return ptr && ptr->ilprev == 0; } + bool last() const { return ptr && ptr->ilnext == 0; } + + /* Cast, dereference, arrow ops. */ + operator FsmTrans*() const { return ptr; } + FsmTrans &operator *() const { return *ptr; } + FsmTrans *operator->() const { return ptr; } + + /* Increment, decrement. */ + inline void operator++(int) { ptr = ptr->ilnext; } + inline void operator--(int) { ptr = ptr->ilprev; } + + /* The iterator is simply a pointer. */ + FsmTrans *ptr; + }; +}; + +typedef DList<FsmTrans> TransList; + +/* Set of states, list of states. */ +typedef BstSet<FsmState*> StateSet; +typedef DList<FsmState> StateList; + +/* A element in a state dict. */ +struct StateDictEl +: + public AvlTreeEl<StateDictEl> +{ + StateDictEl(const StateSet &stateSet) + : stateSet(stateSet) { } + + const StateSet &getKey() { return stateSet; } + StateSet stateSet; + FsmState *targState; +}; + +/* Dictionary mapping a set of states to a target state. */ +typedef AvlTree< StateDictEl, StateSet, CmpTable<FsmState*> > StateDict; + +/* Data needed for a merge operation. */ +struct MergeData +{ + MergeData() + : stfillHead(0), stfillTail(0) { } + + StateDict stateDict; + + FsmState *stfillHead; + FsmState *stfillTail; + + void fillListAppend( FsmState *state ); +}; + +struct TransEl +{ + /* Constructors. */ + TransEl() { } + TransEl( Key lowKey, Key highKey ) + : lowKey(lowKey), highKey(highKey) { } + TransEl( Key lowKey, Key highKey, FsmTrans *value ) + : lowKey(lowKey), highKey(highKey), value(value) { } + + Key lowKey, highKey; + FsmTrans *value; +}; + +struct CmpKey +{ + static int compare( const Key key1, const Key key2 ) + { + if ( key1 < key2 ) + return -1; + else if ( key1 > key2 ) + return 1; + else + return 0; + } +}; + +/* Vector based set of key items. */ +typedef BstSet<Key, CmpKey> KeySet; + +struct MinPartition +{ + MinPartition() : active(false) { } + + StateList list; + bool active; + + MinPartition *prev, *next; +}; + +/* Epsilon transition stored in a state. Specifies the target */ +typedef Vector<int> EpsilonTrans; + +/* List of states that are to be drawn into this. */ +struct EptVectEl +{ + EptVectEl( FsmState *targ, bool leaving ) + : targ(targ), leaving(leaving) { } + + FsmState *targ; + bool leaving; +}; +typedef Vector<EptVectEl> EptVect; + +/* Set of entry ids that go into this state. */ +typedef BstSet<int> EntryIdSet; + +/* Set of longest match items that may be active in a given state. */ +typedef BstSet<TokenInstance*> LmItemSet; + +/* Conditions. */ +typedef BstSet< Action*, CmpOrd<Action*> > CondSet; +typedef CmpTable< Action*, CmpOrd<Action*> > CmpCondSet; + +struct CondSpace + : public AvlTreeEl<CondSpace> +{ + CondSpace( const CondSet &condSet ) + : condSet(condSet) {} + + const CondSet &getKey() { return condSet; } + + CondSet condSet; + Key baseKey; + long condSpaceId; +}; + +typedef Vector<CondSpace*> CondSpaceVect; + +typedef AvlTree<CondSpace, CondSet, CmpCondSet> CondSpaceMap; + +struct StateCond +{ + StateCond( Key lowKey, Key highKey ) : + lowKey(lowKey), highKey(highKey) {} + + Key lowKey; + Key highKey; + CondSpace *condSpace; + + StateCond *prev, *next; +}; + +typedef DList<StateCond> StateCondList; +typedef Vector<long> LongVect; + +/* State class that implements actions and priorities. */ +struct FsmState +{ + FsmState(); + FsmState(const FsmState &other); + ~FsmState(); + + /* Is the state final? */ + bool isFinState() { return stateBits & SB_ISFINAL; } + + /* Out transition list and the pointer for the default out trans. */ + TransList outList; + + /* In transition Lists. */ + TransInList inList; + + /* Entry points into the state. */ + EntryIdSet entryIds; + + /* Epsilon transitions. */ + EpsilonTrans epsilonTrans; + + /* Condition info. */ + StateCondList stateCondList; + + /* Number of in transitions from states other than ourselves. */ + int foreignInTrans; + + /* Temporary data for various algorithms. */ + union { + /* When duplicating the fsm we need to map each + * state to the new state representing it. */ + FsmState *stateMap; + + /* When minimizing machines by partitioning, this maps to the group + * the state is in. */ + MinPartition *partition; + + /* When merging states (state machine operations) this next pointer is + * used for the list of states that need to be filled in. */ + FsmState *next; + + /* Identification for printing and stable minimization. */ + int stateNum; + + } alg; + + /* Data used in epsilon operation, maybe fit into alg? */ + FsmState *isolatedShadow; + int owningGraph; + + /* A pointer to a dict element that contains the set of states this state + * represents. This cannot go into alg, because alg.next is used during + * the merging process. */ + StateDictEl *stateDictEl; + + /* When drawing epsilon transitions, holds the list of states to merge + * with. */ + EptVect *eptVect; + + /* Bits controlling the behaviour of the state during collapsing to dfa. */ + int stateBits; + + /* State list elements. */ + FsmState *next, *prev; + + /* + * Priority and Action data. + */ + + /* Out priorities transfered to out transitions. */ + PriorTable outPriorTable; + + /* The following two action tables are distinguished by the fact that when + * toState actions are executed immediatly after transition actions of + * incoming transitions and the current character will be the same as the + * one available then. The fromState actions are executed immediately + * before the transition actions of outgoing transitions and the current + * character is same as the one available then. */ + + /* Actions to execute upon entering into a state. */ + ActionTable toStateActionTable; + + /* Actions to execute when going from the state to the transition. */ + ActionTable fromStateActionTable; + + /* Actions to add to any future transitions that leave via this state. */ + ActionTable outActionTable; + + /* Conditions to add to any future transiions that leave via this sttate. */ + ActionSet outCondSet; + + /* Error action tables. */ + ErrActionTable errActionTable; + + /* Actions to execute on eof. */ + ActionTable eofActionTable; + + /* Set of longest match items that may be active in this state. */ + LmItemSet lmItemSet; + + FsmState *eofTarget; +}; + +template <class ListItem> struct NextTrans +{ + Key lowKey, highKey; + ListItem *trans; + ListItem *next; + + void load() { + if ( trans == 0 ) + next = 0; + else { + next = trans->next; + lowKey = trans->lowKey; + highKey = trans->highKey; + } + } + + void set( ListItem *t ) { + trans = t; + load(); + } + + void increment() { + trans = next; + load(); + } +}; + + +/* Encodes the different states that are meaningful to the of the iterator. */ +enum PairIterUserState +{ + RangeInS1, RangeInS2, + RangeOverlap, + BreakS1, BreakS2 +}; + +template <class ListItem1, class ListItem2 = ListItem1> struct PairIter +{ + /* Encodes the different states that an fsm iterator can be in. */ + enum IterState { + Begin, + ConsumeS1Range, ConsumeS2Range, + OnlyInS1Range, OnlyInS2Range, + S1SticksOut, S1SticksOutBreak, + S2SticksOut, S2SticksOutBreak, + S1DragsBehind, S1DragsBehindBreak, + S2DragsBehind, S2DragsBehindBreak, + ExactOverlap, End + }; + + PairIter( ListItem1 *list1, ListItem2 *list2 ); + + /* Query iterator. */ + bool lte() { return itState != End; } + bool end() { return itState == End; } + void operator++(int) { findNext(); } + void operator++() { findNext(); } + + /* Iterator state. */ + ListItem1 *list1; + ListItem2 *list2; + IterState itState; + PairIterUserState userState; + + NextTrans<ListItem1> s1Tel; + NextTrans<ListItem2> s2Tel; + Key bottomLow, bottomHigh; + ListItem1 *bottomTrans1; + ListItem2 *bottomTrans2; + +private: + void findNext(); +}; + +/* Init the iterator by advancing to the first item. */ +template <class ListItem1, class ListItem2> PairIter<ListItem1, ListItem2>::PairIter( + ListItem1 *list1, ListItem2 *list2 ) +: + list1(list1), + list2(list2), + itState(Begin) +{ + findNext(); +} + +/* Return and re-entry for the co-routine iterators. This should ALWAYS be + * used inside of a block. */ +#define CO_RETURN(label) \ + itState = label; \ + return; \ + entry##label: {} + +/* Return and re-entry for the co-routine iterators. This should ALWAYS be + * used inside of a block. */ +#define CO_RETURN2(label, uState) \ + itState = label; \ + userState = uState; \ + return; \ + entry##label: {} + +/* Advance to the next transition. When returns, trans points to the next + * transition, unless there are no more, in which case end() returns true. */ +template <class ListItem1, class ListItem2> void PairIter<ListItem1, ListItem2>::findNext() +{ + /* Jump into the iterator routine base on the iterator state. */ + switch ( itState ) { + case Begin: goto entryBegin; + case ConsumeS1Range: goto entryConsumeS1Range; + case ConsumeS2Range: goto entryConsumeS2Range; + case OnlyInS1Range: goto entryOnlyInS1Range; + case OnlyInS2Range: goto entryOnlyInS2Range; + case S1SticksOut: goto entryS1SticksOut; + case S1SticksOutBreak: goto entryS1SticksOutBreak; + case S2SticksOut: goto entryS2SticksOut; + case S2SticksOutBreak: goto entryS2SticksOutBreak; + case S1DragsBehind: goto entryS1DragsBehind; + case S1DragsBehindBreak: goto entryS1DragsBehindBreak; + case S2DragsBehind: goto entryS2DragsBehind; + case S2DragsBehindBreak: goto entryS2DragsBehindBreak; + case ExactOverlap: goto entryExactOverlap; + case End: goto entryEnd; + } + +entryBegin: + /* Set up the next structs at the head of the transition lists. */ + s1Tel.set( list1 ); + s2Tel.set( list2 ); + + /* Concurrently scan both out ranges. */ + while ( true ) { + if ( s1Tel.trans == 0 ) { + /* We are at the end of state1's ranges. Process the rest of + * state2's ranges. */ + while ( s2Tel.trans != 0 ) { + /* Range is only in s2. */ + CO_RETURN2( ConsumeS2Range, RangeInS2 ); + s2Tel.increment(); + } + break; + } + else if ( s2Tel.trans == 0 ) { + /* We are at the end of state2's ranges. Process the rest of + * state1's ranges. */ + while ( s1Tel.trans != 0 ) { + /* Range is only in s1. */ + CO_RETURN2( ConsumeS1Range, RangeInS1 ); + s1Tel.increment(); + } + break; + } + /* Both state1's and state2's transition elements are good. + * The signiture of no overlap is a back key being in front of a + * front key. */ + else if ( s1Tel.highKey < s2Tel.lowKey ) { + /* A range exists in state1 that does not overlap with state2. */ + CO_RETURN2( OnlyInS1Range, RangeInS1 ); + s1Tel.increment(); + } + else if ( s2Tel.highKey < s1Tel.lowKey ) { + /* A range exists in state2 that does not overlap with state1. */ + CO_RETURN2( OnlyInS2Range, RangeInS2 ); + s2Tel.increment(); + } + /* There is overlap, must mix the ranges in some way. */ + else if ( s1Tel.lowKey < s2Tel.lowKey ) { + /* Range from state1 sticks out front. Must break it into + * non-overlaping and overlaping segments. */ + bottomLow = s2Tel.lowKey; + bottomHigh = s1Tel.highKey; + s1Tel.highKey = s2Tel.lowKey; + s1Tel.highKey.decrement(); + bottomTrans1 = s1Tel.trans; + + /* Notify the caller that we are breaking s1. This gives them a + * chance to duplicate s1Tel[0,1].value. */ + CO_RETURN2( S1SticksOutBreak, BreakS1 ); + + /* Broken off range is only in s1. */ + CO_RETURN2( S1SticksOut, RangeInS1 ); + + /* Advance over the part sticking out front. */ + s1Tel.lowKey = bottomLow; + s1Tel.highKey = bottomHigh; + s1Tel.trans = bottomTrans1; + } + else if ( s2Tel.lowKey < s1Tel.lowKey ) { + /* Range from state2 sticks out front. Must break it into + * non-overlaping and overlaping segments. */ + bottomLow = s1Tel.lowKey; + bottomHigh = s2Tel.highKey; + s2Tel.highKey = s1Tel.lowKey; + s2Tel.highKey.decrement(); + bottomTrans2 = s2Tel.trans; + + /* Notify the caller that we are breaking s2. This gives them a + * chance to duplicate s2Tel[0,1].value. */ + CO_RETURN2( S2SticksOutBreak, BreakS2 ); + + /* Broken off range is only in s2. */ + CO_RETURN2( S2SticksOut, RangeInS2 ); + + /* Advance over the part sticking out front. */ + s2Tel.lowKey = bottomLow; + s2Tel.highKey = bottomHigh; + s2Tel.trans = bottomTrans2; + } + /* Low ends are even. Are the high ends even? */ + else if ( s1Tel.highKey < s2Tel.highKey ) { + /* Range from state2 goes longer than the range from state1. We + * must break the range from state2 into an evenly overlaping + * segment. */ + bottomLow = s1Tel.highKey; + bottomLow.increment(); + bottomHigh = s2Tel.highKey; + s2Tel.highKey = s1Tel.highKey; + bottomTrans2 = s2Tel.trans; + + /* Notify the caller that we are breaking s2. This gives them a + * chance to duplicate s2Tel[0,1].value. */ + CO_RETURN2( S2DragsBehindBreak, BreakS2 ); + + /* Breaking s2 produces exact overlap. */ + CO_RETURN2( S2DragsBehind, RangeOverlap ); + + /* Advance over the front we just broke off of range 2. */ + s2Tel.lowKey = bottomLow; + s2Tel.highKey = bottomHigh; + s2Tel.trans = bottomTrans2; + + /* Advance over the entire s1Tel. We have consumed it. */ + s1Tel.increment(); + } + else if ( s2Tel.highKey < s1Tel.highKey ) { + /* Range from state1 goes longer than the range from state2. We + * must break the range from state1 into an evenly overlaping + * segment. */ + bottomLow = s2Tel.highKey; + bottomLow.increment(); + bottomHigh = s1Tel.highKey; + s1Tel.highKey = s2Tel.highKey; + bottomTrans1 = s1Tel.trans; + + /* Notify the caller that we are breaking s1. This gives them a + * chance to duplicate s2Tel[0,1].value. */ + CO_RETURN2( S1DragsBehindBreak, BreakS1 ); + + /* Breaking s1 produces exact overlap. */ + CO_RETURN2( S1DragsBehind, RangeOverlap ); + + /* Advance over the front we just broke off of range 1. */ + s1Tel.lowKey = bottomLow; + s1Tel.highKey = bottomHigh; + s1Tel.trans = bottomTrans1; + + /* Advance over the entire s2Tel. We have consumed it. */ + s2Tel.increment(); + } + else { + /* There is an exact overlap. */ + CO_RETURN2( ExactOverlap, RangeOverlap ); + + s1Tel.increment(); + s2Tel.increment(); + } + } + + /* Done, go into end state. */ + CO_RETURN( End ); +} + + +/* Compare lists of epsilon transitions. Entries are name ids of targets. */ +typedef CmpTable< int, CmpOrd<int> > CmpEpsilonTrans; + +/* Compare class for the Approximate minimization. */ +class ApproxCompare +{ +public: + ApproxCompare() { } + int compare( const FsmState *pState1, const FsmState *pState2 ); +}; + +/* Compare class for the initial partitioning of a partition minimization. */ +class InitPartitionCompare +{ +public: + InitPartitionCompare() { } + int compare( const FsmState *pState1, const FsmState *pState2 ); +}; + +/* Compare class for the regular partitioning of a partition minimization. */ +class PartitionCompare +{ +public: + PartitionCompare() { } + int compare( const FsmState *pState1, const FsmState *pState2 ); +}; + +/* Compare class for a minimization that marks pairs. Provides the shouldMark + * routine. */ +class MarkCompare +{ +public: + MarkCompare() { } + bool shouldMark( MarkIndex &markIndex, const FsmState *pState1, + const FsmState *pState2 ); +}; + +/* List of partitions. */ +typedef DList< MinPartition > PartitionList; + +/* List of transtions out of a state. */ +typedef Vector<TransEl> TransListVect; + +/* Entry point map used for keeping track of entry points in a machine. */ +typedef BstSet< int > EntryIdSet; +typedef BstMapEl< int, FsmState* > EntryMapEl; +typedef BstMap< int, FsmState* > EntryMap; +typedef Vector<EntryMapEl> EntryMapBase; + +/* Graph class that implements actions and priorities. */ +struct FsmGraph +{ + /* Constructors/Destructors. */ + FsmGraph( ); + FsmGraph( const FsmGraph &graph ); + ~FsmGraph(); + + /* The list of states. */ + StateList stateList; + StateList misfitList; + + /* The map of entry points. */ + EntryMap entryPoints; + + /* The start state. */ + FsmState *startState; + + /* Error state, possibly created only when the final machine has been + * created and the XML machine is about to be written. No transitions + * point to this state. */ + FsmState *errState; + + /* The set of final states. */ + StateSet finStateSet; + + /* Misfit Accounting. Are misfits put on a separate list. */ + bool misfitAccounting; + + bool lmRequiresErrorState; + NameInst **nameIndex; + + /* + * Transition actions and priorities. + */ + + /* Set priorities on transtions. */ + void startFsmPrior( int ordering, PriorDesc *prior ); + void allTransPrior( int ordering, PriorDesc *prior ); + void finishFsmPrior( int ordering, PriorDesc *prior ); + void leaveFsmPrior( int ordering, PriorDesc *prior ); + + /* Action setting support. */ + void transferErrorActions( FsmState *state, int transferPoint ); + void setErrorAction( FsmState *state, int ordering, Action *action ); + void setErrorActions( FsmState *state, const ActionTable &other ); + + /* Fill all spaces in a transition list with an error transition. */ + void fillGaps( FsmState *state ); + + /* Similar to setErrorAction, instead gives a state to go to on error. */ + void setErrorTarget( FsmState *state, FsmState *target, int *orderings, + Action **actions, int nActs ); + + /* Set actions to execute. */ + void startFsmAction( int ordering, Action *action ); + void allTransAction( int ordering, Action *action ); + void finishFsmAction( int ordering, Action *action ); + void leaveFsmAction( int ordering, Action *action ); + void longMatchAction( int ordering, TokenInstance *lmPart ); + + /* Set error actions to execute. */ + void startErrorAction( int ordering, Action *action, int transferPoint ); + void allErrorAction( int ordering, Action *action, int transferPoint ); + void finalErrorAction( int ordering, Action *action, int transferPoint ); + void notStartErrorAction( int ordering, Action *action, int transferPoint ); + void notFinalErrorAction( int ordering, Action *action, int transferPoint ); + void middleErrorAction( int ordering, Action *action, int transferPoint ); + + /* Set EOF actions. */ + void startEOFAction( int ordering, Action *action ); + void allEOFAction( int ordering, Action *action ); + void finalEOFAction( int ordering, Action *action ); + void notStartEOFAction( int ordering, Action *action ); + void notFinalEOFAction( int ordering, Action *action ); + void middleEOFAction( int ordering, Action *action ); + + /* Set To State actions. */ + void startToStateAction( int ordering, Action *action ); + void allToStateAction( int ordering, Action *action ); + void finalToStateAction( int ordering, Action *action ); + void notStartToStateAction( int ordering, Action *action ); + void notFinalToStateAction( int ordering, Action *action ); + void middleToStateAction( int ordering, Action *action ); + + /* Set From State actions. */ + void startFromStateAction( int ordering, Action *action ); + void allFromStateAction( int ordering, Action *action ); + void finalFromStateAction( int ordering, Action *action ); + void notStartFromStateAction( int ordering, Action *action ); + void notFinalFromStateAction( int ordering, Action *action ); + void middleFromStateAction( int ordering, Action *action ); + + /* Shift the action ordering of the start transitions to start at + * fromOrder and increase in units of 1. Useful before kleene star + * operation. */ + int shiftStartActionOrder( int fromOrder ); + + /* Clear all priorities from the fsm to so they won't affcet minimization + * of the final fsm. */ + void clearAllPriorities(); + + /* Zero out all the function keys. */ + void nullActionKeys(); + + /* Walk the list of states and verify state properties. */ + void verifyStates(); + + /* Misfit Accounting. Are misfits put on a separate list. */ + void setMisfitAccounting( bool val ) + { misfitAccounting = val; } + + /* Set and Unset a state as final. */ + void setFinState( FsmState *state ); + void unsetFinState( FsmState *state ); + + void setStartState( FsmState *state ); + void unsetStartState( ); + + /* Set and unset a state as an entry point. */ + void setEntry( int id, FsmState *state ); + void changeEntry( int id, FsmState *to, FsmState *from ); + void unsetEntry( int id, FsmState *state ); + void unsetEntry( int id ); + void unsetAllEntryPoints(); + + /* Epsilon transitions. */ + void epsilonTrans( int id ); + void shadowReadWriteStates( MergeData &md ); + + /* + * Basic attaching and detaching. + */ + + /* Common to attaching/detaching list and default. */ + void attachToInList( FsmState *from, FsmState *to, FsmTrans *&head, FsmTrans *trans ); + void detachFromInList( FsmState *from, FsmState *to, FsmTrans *&head, FsmTrans *trans ); + + /* Attach with a new transition. */ + FsmTrans *attachNewTrans( FsmState *from, FsmState *to, + Key onChar1, Key onChar2 ); + + /* Attach with an existing transition that already in an out list. */ + void attachTrans( FsmState *from, FsmState *to, FsmTrans *trans ); + + /* Redirect a transition away from error and towards some state. */ + void redirectErrorTrans( FsmState *from, FsmState *to, FsmTrans *trans ); + + /* Detach a transition from a target state. */ + void detachTrans( FsmState *from, FsmState *to, FsmTrans *trans ); + + /* Detach a state from the graph. */ + void detachState( FsmState *state ); + + /* + * NFA to DFA conversion routines. + */ + + /* Duplicate a transition that will dropin to a free spot. */ + FsmTrans *dupTrans( FsmState *from, FsmTrans *srcTrans ); + + /* In crossing, two transitions both go to real states. */ + FsmTrans *fsmAttachStates( MergeData &md, FsmState *from, + FsmTrans *destTrans, FsmTrans *srcTrans ); + + /* Two transitions are to be crossed, handle the possibility of either + * going to the error state. */ + FsmTrans *mergeTrans( MergeData &md, FsmState *from, + FsmTrans *destTrans, FsmTrans *srcTrans ); + + /* Compare deterimne relative priorities of two transition tables. */ + int comparePrior( const PriorTable &priorTable1, const PriorTable &priorTable2 ); + + /* Cross a src transition with one that is already occupying a spot. */ + FsmTrans *crossTransitions( MergeData &md, FsmState *from, + FsmTrans *destTrans, FsmTrans *srcTrans ); + + void outTransCopy( MergeData &md, FsmState *dest, FsmTrans *srcList ); + void mergeStateConds( FsmState *destState, FsmState *srcState ); + + /* Merge a set of states into newState. */ + void mergeStates( MergeData &md, FsmState *destState, + FsmState **srcStates, int numSrc ); + void mergeStatesLeaving( MergeData &md, FsmState *destState, FsmState *srcState ); + void mergeStates( MergeData &md, FsmState *destState, FsmState *srcState ); + + /* Make all states that are combinations of other states and that + * have not yet had their out transitions filled in. This will + * empty out stateDict and stFil. */ + void fillInStates( MergeData &md ); + + /* + * Transition Comparison. + */ + + /* Compare transition data. Either of the pointers may be null. */ + static inline int compareDataPtr( FsmTrans *trans1, FsmTrans *trans2 ); + + /* Compare target state and transition data. Either pointer may be null. */ + static inline int compareFullPtr( FsmTrans *trans1, FsmTrans *trans2 ); + + /* Compare target partitions. Either pointer may be null. */ + static inline int comparePartPtr( FsmTrans *trans1, FsmTrans *trans2 ); + + /* Check marked status of target states. Either pointer may be null. */ + static inline bool shouldMarkPtr( MarkIndex &markIndex, + FsmTrans *trans1, FsmTrans *trans2 ); + + /* + * Callbacks. + */ + + /* Compare priority and function table of transitions. */ + static int compareTransData( FsmTrans *trans1, FsmTrans *trans2 ); + + /* Add in the properties of srcTrans into this. */ + void addInTrans( FsmTrans *destTrans, FsmTrans *srcTrans ); + + /* Compare states on data stored in the states. */ + static int compareStateData( const FsmState *state1, const FsmState *state2 ); + + /* Out transition data. */ + void clearOutData( FsmState *state ); + bool hasOutData( FsmState *state ); + void transferOutData( FsmState *destState, FsmState *srcState ); + + /* + * Allocation. + */ + + /* New up a state and add it to the graph. */ + FsmState *addState(); + + /* + * Building basic machines + */ + + void concatFsm( Key c ); + void concatFsm( Key *str, int len ); + void concatFsmCI( Key *str, int len ); + void orFsm( Key *set, int len ); + void rangeFsm( Key low, Key high ); + void rangeStarFsm( Key low, Key high ); + void emptyFsm( ); + void lambdaFsm( ); + + /* + * Fsm operators. + */ + + void starOp( ); + void repeatOp( int times ); + void optionalRepeatOp( int times ); + void concatOp( FsmGraph *other ); + void unionOp( FsmGraph *other ); + void intersectOp( FsmGraph *other ); + void subtractOp( FsmGraph *other ); + void epsilonOp(); + void joinOp( int startId, int finalId, FsmGraph **others, int numOthers ); + void globOp( FsmGraph **others, int numOthers ); + void deterministicEntry(); + + /* + * Operator workers + */ + + /* Determine if there are any entry points into a start state other than + * the start state. */ + bool isStartStateIsolated(); + + /* Make a new start state that has no entry points. Will not change the + * identity of the fsm. */ + void isolateStartState(); + + /* Workers for resolving epsilon transitions. */ + bool inEptVect( EptVect *eptVect, FsmState *targ ); + void epsilonFillEptVectFrom( FsmState *root, FsmState *from, bool parentLeaving ); + void resolveEpsilonTrans( MergeData &md ); + + /* Workers for concatenation and union. */ + void doConcat( FsmGraph *other, StateSet *fromStates, bool optional ); + void doOr( FsmGraph *other ); + + /* + * Final states + */ + + /* Unset any final states that are no longer to be final + * due to final bits. */ + void unsetIncompleteFinals(); + void unsetKilledFinals(); + + /* Bring in other's entry points. Assumes others states are going to be + * copied into this machine. */ + void copyInEntryPoints( FsmGraph *other ); + + /* Ordering states. */ + void depthFirstOrdering( FsmState *state ); + void depthFirstOrdering(); + void sortStatesByFinal(); + + /* Set sqequential state numbers starting at 0. */ + void setStateNumbers( int base ); + + /* Unset all final states. */ + void unsetAllFinStates(); + + /* Set the bits of final states and clear the bits of non final states. */ + void setFinBits( int finStateBits ); + + /* + * Self-consistency checks. + */ + + /* Run a sanity check on the machine. */ + void verifyIntegrity(); + + /* Verify that there are no unreachable states, or dead end states. */ + void verifyReachability(); + void verifyNoDeadEndStates(); + + /* + * Path pruning + */ + + /* Mark all states reachable from state. */ + void markReachableFromHereReverse( FsmState *state ); + + /* Mark all states reachable from state. */ + void markReachableFromHere( FsmState *state ); + void markReachableFromHereStopFinal( FsmState *state ); + + /* Removes states that cannot be reached by any path in the fsm and are + * thus wasted silicon. */ + void removeDeadEndStates(); + + /* Removes states that cannot be reached by any path in the fsm and are + * thus wasted silicon. */ + void removeUnreachableStates(); + + /* Remove error actions from states on which the error transition will + * never be taken. */ + bool outListCovers( FsmState *state ); + bool anyErrorRange( FsmState *state ); + + /* Remove states that are on the misfit list. */ + void removeMisfits(); + + /* + * FSM Minimization + */ + + /* Minimization by partitioning. */ + void minimizePartition1(); + void minimizePartition2(); + + /* Minimize the final state Machine. The result is the minimal fsm. Slow + * but stable, correct minimization. Uses n^2 space (lookout) and average + * n^2 time. Worst case n^3 time, but a that is a very rare case. */ + void minimizeStable(); + + /* Minimize the final state machine. Does not find the minimal fsm, but a + * pretty good approximation. Does not use any extra space. Average n^2 + * time. Worst case n^3 time, but a that is a very rare case. */ + void minimizeApproximate(); + + /* This is the worker for the minimize approximate solution. It merges + * states that have identical out transitions. */ + bool minimizeRound( ); + + /* Given an intial partioning of states, split partitions that have out trans + * to differing partitions. */ + int partitionRound( FsmState **statePtrs, MinPartition *parts, int numParts ); + + /* Split partitions that have a transition to a previously split partition, until + * there are no more partitions to split. */ + int splitCandidates( FsmState **statePtrs, MinPartition *parts, int numParts ); + + /* Fuse together states in the same partition. */ + void fusePartitions( MinPartition *parts, int numParts ); + + /* Mark pairs where out final stateness differs, out trans data differs, + * trans pairs go to a marked pair or trans data differs. Should get + * alot of pairs. */ + void initialMarkRound( MarkIndex &markIndex ); + + /* One marking round on all state pairs. Considers if trans pairs go + * to a marked state only. Returns whether or not a pair was marked. */ + bool markRound( MarkIndex &markIndex ); + + /* Move the in trans into src into dest. */ + void inTransMove(FsmState *dest, FsmState *src); + + /* Make state src and dest the same state. */ + void fuseEquivStates(FsmState *dest, FsmState *src); + + /* Find any states that didn't get marked by the marking algorithm and + * merge them into the primary states of their equivalence class. */ + void fuseUnmarkedPairs( MarkIndex &markIndex ); + + /* Merge neighboring transitions go to the same state and have the same + * transitions data. */ + void compressTransitions(); + + /* Returns true if there is a transtion (either explicit or by a gap) to + * the error state. */ + bool checkErrTrans( FsmState *state, FsmTrans *trans ); + bool checkErrTransFinish( FsmState *state ); + bool hasErrorTrans(); +}; + + +#endif /* _FSMGRAPH_H */ diff --git a/src/fsmmin.cc b/src/fsmmin.cc new file mode 100644 index 0000000..cbb2b99 --- /dev/null +++ b/src/fsmmin.cc @@ -0,0 +1,732 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "fsmgraph.h" +#include "mergesort.h" + +int FsmGraph::partitionRound( FsmState **statePtrs, MinPartition *parts, int numParts ) +{ + /* Need a mergesort object and a single partition compare. */ + MergeSort<FsmState*, PartitionCompare> mergeSort; + PartitionCompare partCompare; + + /* For each partition. */ + for ( int p = 0; p < numParts; p++ ) { + /* Fill the pointer array with the states in the partition. */ + StateList::Iter state = parts[p].list; + for ( int s = 0; state.lte(); state++, s++ ) + statePtrs[s] = state; + + /* Sort the states using the partitioning compare. */ + int numStates = parts[p].list.length(); + mergeSort.sort( statePtrs, numStates ); + + /* Assign the states into partitions based on the results of the sort. */ + int destPart = p, firstNewPart = numParts; + for ( int s = 1; s < numStates; s++ ) { + /* If this state differs from the last then move to the next partition. */ + if ( partCompare.compare( statePtrs[s-1], statePtrs[s] ) < 0 ) { + /* The new partition is the next avail spot. */ + destPart = numParts; + numParts += 1; + } + + /* If the state is not staying in the first partition, then + * transfer it to its destination partition. */ + if ( destPart != p ) { + FsmState *state = parts[p].list.detach( statePtrs[s] ); + parts[destPart].list.append( state ); + } + } + + /* Fix the partition pointer for all the states that got moved to a new + * partition. This must be done after the states are transfered so the + * result of the sort is not altered. */ + for ( int newPart = firstNewPart; newPart < numParts; newPart++ ) { + StateList::Iter state = parts[newPart].list; + for ( ; state.lte(); state++ ) + state->alg.partition = &parts[newPart]; + } + } + + return numParts; +} + +/** + * \brief Minimize by partitioning version 1. + * + * Repeatedly tries to split partitions until all partitions are unsplittable. + * Produces the most minimal FSM possible. + */ +void FsmGraph::minimizePartition1() +{ + /* Need one mergesort object and partition compares. */ + MergeSort<FsmState*, InitPartitionCompare> mergeSort; + InitPartitionCompare initPartCompare; + + /* Nothing to do if there are no states. */ + if ( stateList.length() == 0 ) + return; + + /* + * First thing is to partition the states by final state status and + * transition functions. This gives us an initial partitioning to work + * with. + */ + + /* Make a array of pointers to states. */ + int numStates = stateList.length(); + FsmState** statePtrs = new FsmState*[numStates]; + + /* Fill up an array of pointers to the states for easy sorting. */ + StateList::Iter state = stateList; + for ( int s = 0; state.lte(); state++, s++ ) + statePtrs[s] = state; + + /* Sort the states using the array of states. */ + mergeSort.sort( statePtrs, numStates ); + + /* An array of lists of states is used to partition the states. */ + MinPartition *parts = new MinPartition[numStates]; + + /* Assign the states into partitions. */ + int destPart = 0; + for ( int s = 0; s < numStates; s++ ) { + /* If this state differs from the last then move to the next partition. */ + if ( s > 0 && initPartCompare.compare( statePtrs[s-1], statePtrs[s] ) < 0 ) { + /* Move to the next partition. */ + destPart += 1; + } + + /* Put the state into its partition. */ + statePtrs[s]->alg.partition = &parts[destPart]; + parts[destPart].list.append( statePtrs[s] ); + } + + /* We just moved all the states from the main list into partitions without + * taking them off the main list. So clean up the main list now. */ + stateList.abandon(); + + /* Split partitions. */ + int numParts = destPart + 1; + while ( true ) { + /* Test all partitions for splitting. */ + int newNum = partitionRound( statePtrs, parts, numParts ); + + /* When no partitions can be split, stop. */ + if ( newNum == numParts ) + break; + + numParts = newNum; + } + + /* Fuse states in the same partition. The states will end up back on the + * main list. */ + fusePartitions( parts, numParts ); + + /* Cleanup. */ + delete[] statePtrs; + delete[] parts; +} + +/* Split partitions that need splittting, decide which partitions might need + * to be split as a result, continue until there are no more that might need + * to be split. */ +int FsmGraph::splitCandidates( FsmState **statePtrs, MinPartition *parts, int numParts ) +{ + /* Need a mergesort and a partition compare. */ + MergeSort<FsmState*, PartitionCompare> mergeSort; + PartitionCompare partCompare; + + /* The lists of unsplitable (partList) and splitable partitions. + * Only partitions in the splitable list are check for needing splitting. */ + PartitionList partList, splittable; + + /* Initially, all partitions are born from a split (the initial + * partitioning) and can cause other partitions to be split. So any + * partition with a state with a transition out to another partition is a + * candidate for splitting. This will make every partition except possibly + * partitions of final states split candidates. */ + for ( int p = 0; p < numParts; p++ ) { + /* Assume not active. */ + parts[p].active = false; + + /* Look for a trans out of any state in the partition. */ + for ( StateList::Iter state = parts[p].list; state.lte(); state++ ) { + /* If there is at least one transition out to another state then + * the partition becomes splittable. */ + if ( state->outList.length() > 0 ) { + parts[p].active = true; + break; + } + } + + /* If it was found active then it goes on the splittable list. */ + if ( parts[p].active ) + splittable.append( &parts[p] ); + else + partList.append( &parts[p] ); + } + + /* While there are partitions that are splittable, pull one off and try + * to split it. If it splits, determine which partitions may now be split + * as a result of the newly split partition. */ + while ( splittable.length() > 0 ) { + MinPartition *partition = splittable.detachFirst(); + + /* Fill the pointer array with the states in the partition. */ + StateList::Iter state = partition->list; + for ( int s = 0; state.lte(); state++, s++ ) + statePtrs[s] = state; + + /* Sort the states using the partitioning compare. */ + int numStates = partition->list.length(); + mergeSort.sort( statePtrs, numStates ); + + /* Assign the states into partitions based on the results of the sort. */ + MinPartition *destPart = partition; + int firstNewPart = numParts; + for ( int s = 1; s < numStates; s++ ) { + /* If this state differs from the last then move to the next partition. */ + if ( partCompare.compare( statePtrs[s-1], statePtrs[s] ) < 0 ) { + /* The new partition is the next avail spot. */ + destPart = &parts[numParts]; + numParts += 1; + } + + /* If the state is not staying in the first partition, then + * transfer it to its destination partition. */ + if ( destPart != partition ) { + FsmState *state = partition->list.detach( statePtrs[s] ); + destPart->list.append( state ); + } + } + + /* Fix the partition pointer for all the states that got moved to a new + * partition. This must be done after the states are transfered so the + * result of the sort is not altered. */ + int newPart; + for ( newPart = firstNewPart; newPart < numParts; newPart++ ) { + StateList::Iter state = parts[newPart].list; + for ( ; state.lte(); state++ ) + state->alg.partition = &parts[newPart]; + } + + /* Put the partition we just split and any new partitions that came out + * of the split onto the inactive list. */ + partition->active = false; + partList.append( partition ); + for ( newPart = firstNewPart; newPart < numParts; newPart++ ) { + parts[newPart].active = false; + partList.append( &parts[newPart] ); + } + + if ( destPart == partition ) + continue; + + /* Now determine which partitions are splittable as a result of + * splitting partition by walking the in lists of the states in + * partitions that got split. Partition is the faked first item in the + * loop. */ + MinPartition *causalPart = partition; + newPart = firstNewPart - 1; + while ( newPart < numParts ) { + /* Loop all states in the causal partition. */ + StateList::Iter state = causalPart->list; + for ( ; state.lte(); state++ ) { + /* Walk all transition into the state and put the partition + * that the from state is in onto the splittable list. */ + for ( TransInList::Iter trans = state->inList; trans.lte(); trans++ ) { + MinPartition *fromPart = trans->fromState->alg.partition; + if ( ! fromPart->active ) { + fromPart->active = true; + partList.detach( fromPart ); + splittable.append( fromPart ); + } + } + } + + newPart += 1; + causalPart = &parts[newPart]; + } + } + return numParts; +} + + +/** + * \brief Minimize by partitioning version 2 (best alg). + * + * Repeatedly tries to split partitions that may splittable until there are no + * more partitions that might possibly need splitting. Runs faster than + * version 1. Produces the most minimal fsm possible. + */ +void FsmGraph::minimizePartition2() +{ + /* Need a mergesort and an initial partition compare. */ + MergeSort<FsmState*, InitPartitionCompare> mergeSort; + InitPartitionCompare initPartCompare; + + /* Nothing to do if there are no states. */ + if ( stateList.length() == 0 ) + return; + + /* + * First thing is to partition the states by final state status and + * transition functions. This gives us an initial partitioning to work + * with. + */ + + /* Make a array of pointers to states. */ + int numStates = stateList.length(); + FsmState** statePtrs = new FsmState*[numStates]; + + /* Fill up an array of pointers to the states for easy sorting. */ + StateList::Iter state = stateList; + for ( int s = 0; state.lte(); state++, s++ ) + statePtrs[s] = state; + + /* Sort the states using the array of states. */ + mergeSort.sort( statePtrs, numStates ); + + /* An array of lists of states is used to partition the states. */ + MinPartition *parts = new MinPartition[numStates]; + + /* Assign the states into partitions. */ + int destPart = 0; + for ( int s = 0; s < numStates; s++ ) { + /* If this state differs from the last then move to the next partition. */ + if ( s > 0 && initPartCompare.compare( statePtrs[s-1], statePtrs[s] ) < 0 ) { + /* Move to the next partition. */ + destPart += 1; + } + + /* Put the state into its partition. */ + statePtrs[s]->alg.partition = &parts[destPart]; + parts[destPart].list.append( statePtrs[s] ); + } + + /* We just moved all the states from the main list into partitions without + * taking them off the main list. So clean up the main list now. */ + stateList.abandon(); + + /* Split partitions. */ + int numParts = splitCandidates( statePtrs, parts, destPart+1 ); + + /* Fuse states in the same partition. The states will end up back on the + * main list. */ + fusePartitions( parts, numParts ); + + /* Cleanup. */ + delete[] statePtrs; + delete[] parts; +} + +void FsmGraph::initialMarkRound( MarkIndex &markIndex ) +{ + /* P and q for walking pairs. */ + FsmState *p = stateList.head, *q; + + /* Need an initial partition compare. */ + InitPartitionCompare initPartCompare; + + /* Walk all unordered pairs of (p, q) where p != q. + * The second depth of the walk stops before reaching p. This + * gives us all unordered pairs of states (p, q) where p != q. */ + while ( p != 0 ) { + q = stateList.head; + while ( q != p ) { + /* If the states differ on final state status, out transitions or + * any transition data then they should be separated on the initial + * round. */ + if ( initPartCompare.compare( p, q ) != 0 ) + markIndex.markPair( p->alg.stateNum, q->alg.stateNum ); + + q = q->next; + } + p = p->next; + } +} + +bool FsmGraph::markRound( MarkIndex &markIndex ) +{ + /* P an q for walking pairs. Take note if any pair gets marked. */ + FsmState *p = stateList.head, *q; + bool pairWasMarked = false; + + /* Need a mark comparison. */ + MarkCompare markCompare; + + /* Walk all unordered pairs of (p, q) where p != q. + * The second depth of the walk stops before reaching p. This + * gives us all unordered pairs of states (p, q) where p != q. */ + while ( p != 0 ) { + q = stateList.head; + while ( q != p ) { + /* Should we mark the pair? */ + if ( !markIndex.isPairMarked( p->alg.stateNum, q->alg.stateNum ) ) { + if ( markCompare.shouldMark( markIndex, p, q ) ) { + markIndex.markPair( p->alg.stateNum, q->alg.stateNum ); + pairWasMarked = true; + } + } + q = q->next; + } + p = p->next; + } + + return pairWasMarked; +} + + +/** + * \brief Minimize by pair marking. + * + * Decides if each pair of states is distinct or not. Uses O(n^2) memory and + * should only be used on small graphs. Produces the most minmimal FSM + * possible. + */ +void FsmGraph::minimizeStable() +{ + /* Set the state numbers. */ + setStateNumbers( 0 ); + + /* This keeps track of which pairs have been marked. */ + MarkIndex markIndex( stateList.length() ); + + /* Mark pairs where final stateness, out trans, or trans data differ. */ + initialMarkRound( markIndex ); + + /* While the last round of marking succeeded in marking a state + * continue to do another round. */ + int modified = markRound( markIndex ); + while (modified) + modified = markRound( markIndex ); + + /* Merge pairs that are unmarked. */ + fuseUnmarkedPairs( markIndex ); +} + +bool FsmGraph::minimizeRound() +{ + /* Nothing to do if there are no states. */ + if ( stateList.length() == 0 ) + return false; + + /* Need a mergesort on approx compare and an approx compare. */ + MergeSort<FsmState*, ApproxCompare> mergeSort; + ApproxCompare approxCompare; + + /* Fill up an array of pointers to the states. */ + FsmState **statePtrs = new FsmState*[stateList.length()]; + StateList::Iter state = stateList; + for ( int s = 0; state.lte(); state++, s++ ) + statePtrs[s] = state; + + bool modified = false; + + /* Sort The list. */ + mergeSort.sort( statePtrs, stateList.length() ); + + /* Walk the list looking for duplicates next to each other, + * merge in any duplicates. */ + FsmState **pLast = statePtrs; + FsmState **pState = statePtrs + 1; + for ( int i = 1; i < stateList.length(); i++, pState++ ) { + if ( approxCompare.compare( *pLast, *pState ) == 0 ) { + /* Last and pState are the same, so fuse together. Move forward + * with pState but not with pLast. If any more are identical, we + * must */ + fuseEquivStates( *pLast, *pState ); + modified = true; + } + else { + /* Last and this are different, do not set to merge them. Move + * pLast to the current (it may be way behind from merging many + * states) and pState forward one to consider the next pair. */ + pLast = pState; + } + } + delete[] statePtrs; + return modified; +} + +/** + * \brief Minmimize by an approximation. + * + * Repeatedly tries to find states with transitions out to the same set of + * states on the same set of keys until no more identical states can be found. + * Does not produce the most minimial FSM possible. + */ +void FsmGraph::minimizeApproximate() +{ + /* While the last minimization round succeeded in compacting states, + * continue to try to compact states. */ + while ( true ) { + bool modified = minimizeRound(); + if ( ! modified ) + break; + } +} + + +/* Remove states that have no path to them from the start state. Recursively + * traverses the graph marking states that have paths into them. Then removes + * all states that did not get marked. */ +void FsmGraph::removeUnreachableStates() +{ + /* Misfit accounting should be off and there should be no states on the + * misfit list. */ + assert( !misfitAccounting && misfitList.length() == 0 ); + + /* Mark all the states that can be reached + * through the existing set of entry points. */ + markReachableFromHere( startState ); + for ( EntryMap::Iter en = entryPoints; en.lte(); en++ ) + markReachableFromHere( en->value ); + + /* Delete all states that are not marked + * and unmark the ones that are marked. */ + FsmState *state = stateList.head; + while ( state ) { + FsmState *next = state->next; + + if ( state->stateBits & SB_ISMARKED ) + state->stateBits &= ~ SB_ISMARKED; + else { + detachState( state ); + stateList.detach( state ); + delete state; + } + + state = next; + } +} + +bool FsmGraph::outListCovers( FsmState *state ) +{ + /* Must be at least one range to cover. */ + if ( state->outList.length() == 0 ) + return false; + + /* The first must start at the lower bound. */ + TransList::Iter trans = state->outList.first(); + if ( keyOps->minKey < trans->lowKey ) + return false; + + /* Loop starts at second el. */ + trans.increment(); + + /* Loop checks lower against prev upper. */ + for ( ; trans.lte(); trans++ ) { + /* Lower end of the trans must be one greater than the + * previous' high end. */ + Key lowKey = trans->lowKey; + lowKey.decrement(); + if ( trans->prev->highKey < lowKey ) + return false; + } + + /* Require that the last range extends to the upper bound. */ + trans = state->outList.last(); + if ( trans->highKey < keyOps->maxKey ) + return false; + + return true; +} + +/* Remove states that that do not lead to a final states. Works recursivly traversing + * the graph in reverse (starting from all final states) and marking seen states. Then + * removes states that did not get marked. */ +void FsmGraph::removeDeadEndStates() +{ + /* Misfit accounting should be off and there should be no states on the + * misfit list. */ + assert( !misfitAccounting && misfitList.length() == 0 ); + + /* Mark all states that have paths to the final states. */ + FsmState **st = finStateSet.data; + int nst = finStateSet.length(); + for ( int i = 0; i < nst; i++, st++ ) + markReachableFromHereReverse( *st ); + + /* Start state gets honorary marking. If the machine accepts nothing we + * still want the start state to hang around. This must be done after the + * recursive call on all the final states so that it does not cause the + * start state in transitions to be skipped when the start state is + * visited by the traversal. */ + startState->stateBits |= SB_ISMARKED; + + /* Delete all states that are not marked + * and unmark the ones that are marked. */ + FsmState *state = stateList.head; + while ( state != 0 ) { + FsmState *next = state->next; + + if ( state->stateBits & SB_ISMARKED ) + state->stateBits &= ~ SB_ISMARKED; + else { + detachState( state ); + stateList.detach( state ); + delete state; + } + + state = next; + } +} + +/* Remove states on the misfit list. To work properly misfit accounting should + * be on when this is called. The detaching of a state will likely cause + * another misfit to be collected and it can then be removed. */ +void FsmGraph::removeMisfits() +{ + while ( misfitList.length() > 0 ) { + /* Get the first state. */ + FsmState *state = misfitList.head; + + /* Detach and delete. */ + detachState( state ); + + /* The state was previously on the misfit list and detaching can only + * remove in transitions so the state must still be on the misfit + * list. */ + misfitList.detach( state ); + delete state; + } +} + +/* Fuse src into dest because they have been deemed equivalent states. + * Involves moving transitions into src to go into dest and invoking + * callbacks. Src is deleted detached from the graph and deleted. */ +void FsmGraph::fuseEquivStates( FsmState *dest, FsmState *src ) +{ + /* This would get ugly. */ + assert( dest != src ); + + /* Cur is a duplicate. We can merge it with trail. */ + inTransMove( dest, src ); + + detachState( src ); + stateList.detach( src ); + delete src; +} + +void FsmGraph::fuseUnmarkedPairs( MarkIndex &markIndex ) +{ + FsmState *p = stateList.head, *nextP, *q; + + /* Definition: The primary state of an equivalence class is the first state + * encounterd that belongs to the equivalence class. All equivalence + * classes have primary state including equivalence classes with one state + * in it. */ + + /* For each unmarked pair merge p into q and delete p. q is always the + * primary state of it's equivalence class. We wouldn't have landed on it + * here if it were not, because it would have been deleted. + * + * Proof that q is the primaray state of it's equivalence class: Assume q + * is not the primary state of it's equivalence class, then it would be + * merged into some state that came before it and thus p would be + * equivalent to that state. But q is the first state that p is equivalent + * to so we have a contradiction. */ + + /* Walk all unordered pairs of (p, q) where p != q. + * The second depth of the walk stops before reaching p. This + * gives us all unordered pairs of states (p, q) where p != q. */ + while ( p != 0 ) { + nextP = p->next; + + q = stateList.head; + while ( q != p ) { + /* If one of p or q is a final state then mark. */ + if ( ! markIndex.isPairMarked( p->alg.stateNum, q->alg.stateNum ) ) { + fuseEquivStates( q, p ); + break; + } + q = q->next; + } + p = nextP; + } +} + +void FsmGraph::fusePartitions( MinPartition *parts, int numParts ) +{ + /* For each partition, fuse state 2, 3, ... into state 1. */ + for ( int p = 0; p < numParts; p++ ) { + /* Assume that there will always be at least one state. */ + FsmState *first = parts[p].list.head, *toFuse = first->next; + + /* Put the first state back onto the main state list. Don't bother + * removing it from the partition list first. */ + stateList.append( first ); + + /* Fuse the rest of the state into the first. */ + while ( toFuse != 0 ) { + /* Save the next. We will trash it before it is needed. */ + FsmState *next = toFuse->next; + + /* Put the state to be fused in to the first back onto the main + * list before it is fuse. the graph. The state needs to be on + * the main list for the detach from the graph to work. Don't + * bother removing the state from the partition list first. We + * need not maintain it. */ + stateList.append( toFuse ); + + /* Now fuse to the first. */ + fuseEquivStates( first, toFuse ); + + /* Go to the next that we saved before trashing the next pointer. */ + toFuse = next; + } + + /* We transfered the states from the partition list into the main list without + * removing the states from the partition list first. Clean it up. */ + parts[p].list.abandon(); + } +} + + +/* Merge neighboring transitions go to the same state and have the same + * transitions data. */ +void FsmGraph::compressTransitions() +{ + for ( StateList::Iter st = stateList; st.lte(); st++ ) { + if ( st->outList.length() > 1 ) { + for ( TransList::Iter trans = st->outList, next = trans.next(); next.lte(); ) { + Key nextLow = next->lowKey; + nextLow.decrement(); + if ( trans->highKey == nextLow && trans->toState == next->toState && + CmpActionTable::compare( trans->actionTable, next->actionTable ) == 0 ) + { + trans->highKey = next->highKey; + st->outList.detach( next ); + detachTrans( next->fromState, next->toState, next ); + delete next; + next = trans.next(); + } + else { + trans.increment(); + next.increment(); + } + } + } + } +} diff --git a/src/fsmstate.cc b/src/fsmstate.cc new file mode 100644 index 0000000..f917302 --- /dev/null +++ b/src/fsmstate.cc @@ -0,0 +1,437 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <string.h> +#include <assert.h> +#include "fsmgraph.h" + +#include <iostream> +using namespace std; + +/* Construct a mark index for a specified number of states. Must new up + * an array that is states^2 in size. */ +MarkIndex::MarkIndex( int states ) : numStates(states) +{ + /* Total pairs is states^2. Actually only use half of these, but we allocate + * them all to make indexing into the array easier. */ + int total = states * states; + + /* New up chars so that individual DListEl constructors are + * not called. Zero out the mem manually. */ + array = new bool[total]; + memset( array, 0, sizeof(bool) * total ); +} + +/* Free the array used to store state pairs. */ +MarkIndex::~MarkIndex() +{ + delete[] array; +} + +/* Mark a pair of states. States are specified by their number. The + * marked states are moved from the unmarked list to the marked list. */ +void MarkIndex::markPair(int state1, int state2) +{ + int pos = ( state1 >= state2 ) ? + ( state1 * numStates ) + state2 : + ( state2 * numStates ) + state1; + + array[pos] = true; +} + +/* Returns true if the pair of states are marked. Returns false otherwise. + * Ordering of states given does not matter. */ +bool MarkIndex::isPairMarked(int state1, int state2) +{ + int pos = ( state1 >= state2 ) ? + ( state1 * numStates ) + state2 : + ( state2 * numStates ) + state1; + + return array[pos]; +} + +/* Create a new fsm state. State has not out transitions or in transitions, not + * out out transition data and not number. */ +FsmState::FsmState() +: + /* No out or in transitions. */ + outList(), + inList(), + + /* No entry points, or epsilon trans. */ + entryIds(), + epsilonTrans(), + + /* No transitions in from other states. */ + foreignInTrans(0), + + /* Only used during merging. Normally null. */ + stateDictEl(0), + eptVect(0), + + /* No state identification bits. */ + stateBits(0), + + /* No Priority data. */ + outPriorTable(), + + /* No Action data. */ + toStateActionTable(), + fromStateActionTable(), + outActionTable(), + outCondSet(), + errActionTable(), + eofActionTable(), + + eofTarget(0) +{ +} + +/* Copy everything except actual the transitions. That is left up to the + * FsmGraph copy constructor. */ +FsmState::FsmState(const FsmState &other) +: + /* All lists are cleared. They will be filled in when the + * individual transitions are duplicated and attached. */ + outList(), + inList(), + + /* Duplicate the entry id set and epsilon transitions. These + * are sets of integers and as such need no fixing. */ + entryIds(other.entryIds), + epsilonTrans(other.epsilonTrans), + + /* No transitions in from other states. */ + foreignInTrans(0), + + /* This is only used during merging. Normally null. */ + stateDictEl(0), + eptVect(0), + + /* Fsm state data. */ + stateBits(other.stateBits), + + /* Copy in priority data. */ + outPriorTable(other.outPriorTable), + + /* Copy in action data. */ + toStateActionTable(other.toStateActionTable), + fromStateActionTable(other.fromStateActionTable), + outActionTable(other.outActionTable), + outCondSet(other.outCondSet), + errActionTable(other.errActionTable), + eofActionTable(other.eofActionTable), + + eofTarget(0) +{ + /* Duplicate all the transitions. */ + for ( TransList::Iter trans = other.outList; trans.lte(); trans++ ) { + /* Dupicate and store the orginal target in the transition. This will + * be corrected once all the states have been created. */ + FsmTrans *newTrans = new FsmTrans(*trans); + newTrans->toState = trans->toState; + outList.append( newTrans ); + } +} + +/* If there is a state dict element, then delete it. Everything else is left + * up to the FsmGraph destructor. */ +FsmState::~FsmState() +{ + if ( stateDictEl != 0 ) + delete stateDictEl; +} + +/* Compare two states using pointers to the states. With the approximate + * compare the idea is that if the compare finds them the same, they can + * immediately be merged. */ +int ApproxCompare::compare( const FsmState *state1 , const FsmState *state2 ) +{ + int compareRes; + + /* Test final state status. */ + if ( (state1->stateBits & SB_ISFINAL) && !(state2->stateBits & SB_ISFINAL) ) + return -1; + else if ( !(state1->stateBits & SB_ISFINAL) && (state2->stateBits & SB_ISFINAL) ) + return 1; + + /* Test epsilon transition sets. */ + compareRes = CmpEpsilonTrans::compare( state1->epsilonTrans, + state2->epsilonTrans ); + if ( compareRes != 0 ) + return compareRes; + + /* Compare the out transitions. */ + compareRes = FsmGraph::compareStateData( state1, state2 ); + if ( compareRes != 0 ) + return compareRes; + + /* Use a pair iterator to get the transition pairs. */ + PairIter<FsmTrans> outPair( state1->outList.head, state2->outList.head ); + for ( ; !outPair.end(); outPair++ ) { + switch ( outPair.userState ) { + + case RangeInS1: + compareRes = FsmGraph::compareFullPtr( outPair.s1Tel.trans, 0 ); + if ( compareRes != 0 ) + return compareRes; + break; + + case RangeInS2: + compareRes = FsmGraph::compareFullPtr( 0, outPair.s2Tel.trans ); + if ( compareRes != 0 ) + return compareRes; + break; + + case RangeOverlap: + compareRes = FsmGraph::compareFullPtr( + outPair.s1Tel.trans, outPair.s2Tel.trans ); + if ( compareRes != 0 ) + return compareRes; + break; + + case BreakS1: + case BreakS2: + break; + } + } + + /* Got through the entire state comparison, deem them equal. */ + return 0; +} + +/* Compare class for the sort that does the intial partition of compaction. */ +int InitPartitionCompare::compare( const FsmState *state1 , const FsmState *state2 ) +{ + int compareRes; + + /* Test final state status. */ + if ( (state1->stateBits & SB_ISFINAL) && !(state2->stateBits & SB_ISFINAL) ) + return -1; + else if ( !(state1->stateBits & SB_ISFINAL) && (state2->stateBits & SB_ISFINAL) ) + return 1; + + /* Test epsilon transition sets. */ + compareRes = CmpEpsilonTrans::compare( state1->epsilonTrans, + state2->epsilonTrans ); + if ( compareRes != 0 ) + return compareRes; + + /* Compare the out transitions. */ + compareRes = FsmGraph::compareStateData( state1, state2 ); + if ( compareRes != 0 ) + return compareRes; + + /* Use a pair iterator to test the transition pairs. */ + PairIter<FsmTrans> outPair( state1->outList.head, state2->outList.head ); + for ( ; !outPair.end(); outPair++ ) { + switch ( outPair.userState ) { + + case RangeInS1: + compareRes = FsmGraph::compareDataPtr( outPair.s1Tel.trans, 0 ); + if ( compareRes != 0 ) + return compareRes; + break; + + case RangeInS2: + compareRes = FsmGraph::compareDataPtr( 0, outPair.s2Tel.trans ); + if ( compareRes != 0 ) + return compareRes; + break; + + case RangeOverlap: + compareRes = FsmGraph::compareDataPtr( + outPair.s1Tel.trans, outPair.s2Tel.trans ); + if ( compareRes != 0 ) + return compareRes; + break; + + case BreakS1: + case BreakS2: + break; + } + } + + return 0; +} + +/* Compare class for the sort that does the partitioning. */ +int PartitionCompare::compare( const FsmState *state1, const FsmState *state2 ) +{ + int compareRes; + + /* Use a pair iterator to get the transition pairs. */ + PairIter<FsmTrans> outPair( state1->outList.head, state2->outList.head ); + for ( ; !outPair.end(); outPair++ ) { + switch ( outPair.userState ) { + + case RangeInS1: + compareRes = FsmGraph::comparePartPtr( outPair.s1Tel.trans, 0 ); + if ( compareRes != 0 ) + return compareRes; + break; + + case RangeInS2: + compareRes = FsmGraph::comparePartPtr( 0, outPair.s2Tel.trans ); + if ( compareRes != 0 ) + return compareRes; + break; + + case RangeOverlap: + compareRes = FsmGraph::comparePartPtr( + outPair.s1Tel.trans, outPair.s2Tel.trans ); + if ( compareRes != 0 ) + return compareRes; + break; + + case BreakS1: + case BreakS2: + break; + } + } + + return 0; +} + +/* Compare class for the sort that does the partitioning. */ +bool MarkCompare::shouldMark( MarkIndex &markIndex, const FsmState *state1, + const FsmState *state2 ) +{ + /* Use a pair iterator to get the transition pairs. */ + PairIter<FsmTrans> outPair( state1->outList.head, state2->outList.head ); + for ( ; !outPair.end(); outPair++ ) { + switch ( outPair.userState ) { + + case RangeInS1: + if ( FsmGraph::shouldMarkPtr( markIndex, outPair.s1Tel.trans, 0 ) ) + return true; + break; + + case RangeInS2: + if ( FsmGraph::shouldMarkPtr( markIndex, 0, outPair.s2Tel.trans ) ) + return true; + break; + + case RangeOverlap: + if ( FsmGraph::shouldMarkPtr( markIndex, + outPair.s1Tel.trans, outPair.s2Tel.trans ) ) + return true; + break; + + case BreakS1: + case BreakS2: + break; + } + } + + return false; +} + +/* + * Transition Comparison. + */ + +/* Compare target partitions. Either pointer may be null. */ +int FsmGraph::comparePartPtr( FsmTrans *trans1, FsmTrans *trans2 ) +{ + if ( trans1 != 0 ) { + /* If trans1 is set then so should trans2. The initial partitioning + * guarantees this for us. */ + if ( trans1->toState == 0 && trans2->toState != 0 ) + return -1; + else if ( trans1->toState != 0 && trans2->toState == 0 ) + return 1; + else if ( trans1->toState != 0 ) { + /* Both of targets are set. */ + return CmpOrd< MinPartition* >::compare( + trans1->toState->alg.partition, trans2->toState->alg.partition ); + } + } + return 0; +} + + +/* Compares two transition pointers according to priority and functions. + * Either pointer may be null. Does not consider to state or from state. */ +int FsmGraph::compareDataPtr( FsmTrans *trans1, FsmTrans *trans2 ) +{ + if ( trans1 == 0 && trans2 != 0 ) + return -1; + else if ( trans1 != 0 && trans2 == 0 ) + return 1; + else if ( trans1 != 0 ) { + /* Both of the transition pointers are set. */ + int compareRes = compareTransData( trans1, trans2 ); + if ( compareRes != 0 ) + return compareRes; + } + return 0; +} + +/* Compares two transitions according to target state, priority and functions. + * Does not consider from state. Either of the pointers may be null. */ +int FsmGraph::compareFullPtr( FsmTrans *trans1, FsmTrans *trans2 ) +{ + if ( (trans1 != 0) ^ (trans2 != 0) ) { + /* Exactly one of the transitions is set. */ + if ( trans1 != 0 ) + return -1; + else + return 1; + } + else if ( trans1 != 0 ) { + /* Both of the transition pointers are set. Test target state, + * priority and funcs. */ + if ( trans1->toState < trans2->toState ) + return -1; + else if ( trans1->toState > trans2->toState ) + return 1; + else if ( trans1->toState != 0 ) { + /* Test transition data. */ + int compareRes = compareTransData( trans1, trans2 ); + if ( compareRes != 0 ) + return compareRes; + } + } + return 0; +} + + +bool FsmGraph::shouldMarkPtr( MarkIndex &markIndex, FsmTrans *trans1, + FsmTrans *trans2 ) +{ + if ( (trans1 != 0) ^ (trans2 != 0) ) { + /* Exactly one of the transitions is set. The initial mark round + * should rule out this case. */ + assert( false ); + } + else if ( trans1 != 0 ) { + /* Both of the transitions are set. If the target pair is marked, then + * the pair we are considering gets marked. */ + return markIndex.isPairMarked( trans1->toState->alg.stateNum, + trans2->toState->alg.stateNum ); + } + + /* Neither of the transitiosn are set. */ + return false; +} + + diff --git a/src/global.h b/src/global.h new file mode 100644 index 0000000..2dd6e4f --- /dev/null +++ b/src/global.h @@ -0,0 +1,104 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __COLM_GLOBAL_H +#define __COLM_GLOBAL_H + +#include <stdio.h> +#include <iostream> +#include <fstream> +#include <fstream> +#include <string> + +#include "config.h" +#include "defs.h" +#include "avltree.h" +#include "keyops.h" + +#define PROGNAME "colm" + +/* IO filenames and stream. */ +extern bool genGraphviz; +extern int gblErrorCount; + +std::ostream &error(); + +/* IO filenames and stream. */ +extern std::ostream *outStream; +extern bool generateGraphviz; +extern bool branchPointInfo; +extern bool verbose, logging; +extern bool addUniqueEmptyProductions; + +extern int gblErrorCount; +extern char startDefName[]; + +/* Error reporting. */ +std::ostream &error(); +std::ostream &error( int first_line, int first_column ); +std::ostream &warning( ); +std::ostream &warning( int first_line, int first_column ); + +extern std::ostream *outStream; +extern bool printStatistics; + +extern int gblErrorCount; +extern bool gblLibrary; +extern char machineMain[]; +extern const char *exportHeaderFn; + +struct colm_location; + +/* Location in an input file. */ +struct InputLoc +{ + InputLoc( colm_location *pcloc ); + + InputLoc() : fileName(0), line(-1), col(-1) {} + + InputLoc( const InputLoc &loc ) + { + fileName = loc.fileName; + line = loc.line; + col = loc.col; + } + + const char *fileName; + int line; + int col; +}; + +extern InputLoc internal; + +/* Error reporting. */ +std::ostream &error(); +std::ostream &error( const InputLoc &loc ); +std::ostream &warning( const InputLoc &loc ); + +void scan( char *fileName, std::istream &input, std::ostream &output ); +void terminateAllParsers( ); +void checkMachines( ); + +void xmlEscapeHost( std::ostream &out, char *data, int len ); +void openOutput(); +void escapeLiteralString( std::ostream &out, const char *data ); + +#endif diff --git a/src/if1.cc b/src/if1.cc new file mode 100644 index 0000000..0fb8cb2 --- /dev/null +++ b/src/if1.cc @@ -0,0 +1,101 @@ +#include "if1.h" +::literal lex_factor::Literal() { static int a[] = {1, 0, 0}; return ::literal( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr lex_factor::Expr() { static int a[] = {1, 1, 1}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal lex_factor::Low() { static int a[] = {1, 2, 0}; return ::literal( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal lex_factor::High() { static int a[] = {1, 2, 2}; return ::literal( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id lex_factor::Id() { static int a[] = {1, 3, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_neg lex_factor_neg::FactorNeg() { static int a[] = {1, 0, 1}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor lex_factor_neg::Factor() { static int a[] = {1, 1, 0}; return ::lex_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_rep lex_factor_rep::FactorRep() { static int a[] = {2, 0, 0, 1, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::STAR lex_factor_rep::Star() { static int a[] = {1, 0, 1}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PLUS lex_factor_rep::Plus() { static int a[] = {1, 1, 1}; return ::PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_neg lex_factor_rep::FactorNeg() { static int a[] = {1, 2, 0}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_term lex_term::Term() { static int a[] = {1, 0, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_rep lex_term::FactorRep() { static int a[] = {2, 0, 2, 1, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr lex_expr::Expr() { static int a[] = {1, 0, 0}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_term lex_expr::Term() { static int a[] = {2, 0, 2, 1, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NI opt_ni::Ni() { static int a[] = {1, 0, 0}; return ::NI( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::STAR opt_prod_repeat::Star() { static int a[] = {1, 0, 0}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id opt_prod_el_name::Name() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_prod_el_name prod_el::OptName() { static int a[] = {1, 0, 0}; return ::opt_prod_el_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id prod_el::Id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_prod_repeat prod_el::OptRepeat() { static int a[] = {1, 0, 2}; return ::opt_prod_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_el_list prod_el_list::ProdElList() { static int a[] = {1, 0, 0}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_el prod_el_list::ProdEl() { static int a[] = {1, 0, 1}; return ::prod_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COMMIT opt_commit::Commit() { static int a[] = {1, 0, 0}; return ::COMMIT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id opt_prod_name::Name() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_el_list prod::ProdElList() { static int a[] = {1, 0, 1}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_prod_name prod::OptName() { static int a[] = {1, 0, 3}; return ::opt_prod_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_commit prod::OptCommit() { static int a[] = {1, 0, 4}; return ::opt_commit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_list prod_list::ProdList() { static int a[] = {1, 0, 0}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod prod_list::Prod() { static int a[] = {2, 0, 2, 1, 0}; return ::prod( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr ignore_def::Expr() { static int a[] = {1, 0, 2}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id token_def::Id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_ni token_def::LeftNi() { static int a[] = {1, 0, 2}; return ::opt_ni( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr token_def::Expr() { static int a[] = {1, 0, 4}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_ni token_def::RightNi() { static int a[] = {1, 0, 6}; return ::opt_ni( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::token_list token_list::TokenList() { static int a[] = {2, 0, 0, 1, 0}; return ::token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::token_def token_list::TokenDef() { static int a[] = {1, 0, 1}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ignore_def token_list::IgnoreDef() { static int a[] = {1, 1, 1}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::token_list item::TokenList() { static int a[] = {1, 0, 1}; return ::token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id item::DefId() { static int a[] = {1, 1, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_list item::ProdList() { static int a[] = {1, 1, 2}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_item start::ItemList() { static int a[] = {1, 0, 0}; return ::_repeat_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::start __accum0::tree() { return ::start( __prg, colm_get_attr( __tree, 0) ); } +::str __accum0::error() { return ::str( __prg, colm_get_attr( __tree, 1) ); } +::_repeat_item _repeat_item:: next() { return ::_repeat_item( __prg, colm_get_repeat_next( __tree ) ); } +::item _repeat_item:: value() { return ::item( __prg, colm_get_repeat_val( __tree ) ); } +::str __list0::head() { return ::str( __prg, colm_get_attr( __tree, 0) ); } +::str __list0::tail() { return ::str( __prg, colm_get_attr( __tree, 1) ); } +::str __list0::top() { return ::str( __prg, colm_get_attr( __tree, 1) ); } +::literal _T_lex_factor::Literal() { static int a[] = {1, 0, 0}; return ::literal( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr _T_lex_factor::Expr() { static int a[] = {1, 1, 1}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal _T_lex_factor::Low() { static int a[] = {1, 2, 0}; return ::literal( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal _T_lex_factor::High() { static int a[] = {1, 2, 2}; return ::literal( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_lex_factor::Id() { static int a[] = {1, 3, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_neg _T_lex_factor_neg::FactorNeg() { static int a[] = {1, 0, 1}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor _T_lex_factor_neg::Factor() { static int a[] = {1, 1, 0}; return ::lex_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_rep _T_lex_factor_rep::FactorRep() { static int a[] = {2, 0, 0, 1, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::STAR _T_lex_factor_rep::Star() { static int a[] = {1, 0, 1}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PLUS _T_lex_factor_rep::Plus() { static int a[] = {1, 1, 1}; return ::PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_neg _T_lex_factor_rep::FactorNeg() { static int a[] = {1, 2, 0}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_term _T_lex_term::Term() { static int a[] = {1, 0, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_rep _T_lex_term::FactorRep() { static int a[] = {2, 0, 2, 1, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr _T_lex_expr::Expr() { static int a[] = {1, 0, 0}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_term _T_lex_expr::Term() { static int a[] = {2, 0, 2, 1, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NI _T_opt_ni::Ni() { static int a[] = {1, 0, 0}; return ::NI( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::STAR _T_opt_prod_repeat::Star() { static int a[] = {1, 0, 0}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_opt_prod_el_name::Name() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_prod_el_name _T_prod_el::OptName() { static int a[] = {1, 0, 0}; return ::opt_prod_el_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_prod_el::Id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_prod_repeat _T_prod_el::OptRepeat() { static int a[] = {1, 0, 2}; return ::opt_prod_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_el_list _T_prod_el_list::ProdElList() { static int a[] = {1, 0, 0}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_el _T_prod_el_list::ProdEl() { static int a[] = {1, 0, 1}; return ::prod_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COMMIT _T_opt_commit::Commit() { static int a[] = {1, 0, 0}; return ::COMMIT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_opt_prod_name::Name() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_el_list _T_prod::ProdElList() { static int a[] = {1, 0, 1}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_prod_name _T_prod::OptName() { static int a[] = {1, 0, 3}; return ::opt_prod_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_commit _T_prod::OptCommit() { static int a[] = {1, 0, 4}; return ::opt_commit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_list _T_prod_list::ProdList() { static int a[] = {1, 0, 0}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod _T_prod_list::Prod() { static int a[] = {2, 0, 2, 1, 0}; return ::prod( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr _T_ignore_def::Expr() { static int a[] = {1, 0, 2}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_token_def::Id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_ni _T_token_def::LeftNi() { static int a[] = {1, 0, 2}; return ::opt_ni( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr _T_token_def::Expr() { static int a[] = {1, 0, 4}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_ni _T_token_def::RightNi() { static int a[] = {1, 0, 6}; return ::opt_ni( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::token_list _T_token_list::TokenList() { static int a[] = {2, 0, 0, 1, 0}; return ::token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::token_def _T_token_list::TokenDef() { static int a[] = {1, 0, 1}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ignore_def _T_token_list::IgnoreDef() { static int a[] = {1, 1, 1}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::token_list _T_item::TokenList() { static int a[] = {1, 0, 1}; return ::token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_item::DefId() { static int a[] = {1, 1, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_list _T_item::ProdList() { static int a[] = {1, 1, 2}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_item _T_start::ItemList() { static int a[] = {1, 0, 0}; return ::_repeat_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::start _T___accum0::tree() { return ::start( __prg, colm_get_attr( __tree, 0) ); } +::str _T___accum0::error() { return ::str( __prg, colm_get_attr( __tree, 1) ); } +::str _T___list0::head() { return ::str( __prg, colm_get_attr( __tree, 0) ); } +::str _T___list0::tail() { return ::str( __prg, colm_get_attr( __tree, 1) ); } +::str _T___list0::top() { return ::str( __prg, colm_get_attr( __tree, 1) ); } + +::start ColmTree( colm_program *prg ) +{ return ::start( prg, colm_get_global( prg, 0) ); } + diff --git a/src/if1.h b/src/if1.h new file mode 100644 index 0000000..7199da6 --- /dev/null +++ b/src/if1.h @@ -0,0 +1,1148 @@ +#ifndef _EXPORTS_H +#define _EXPORTS_H + +#include <colm/colm.h> +#include <string> + +inline void appendString( colm_print_args *args, const char *data, int length ) +{ + std::string *str = (std::string*)args->arg; + *str += std::string( data, length ); +} + +inline std::string printTreeStr( colm_program *prg, colm_tree *tree, bool trim ) +{ + std::string str; + colm_print_args printArgs = { &str, 1, 0, trim, &appendString, + &colm_print_null, &colm_print_term_tree, &colm_print_null }; + colm_print_tree_args( prg, colm_vm_root(prg), &printArgs, tree ); + return str; +} + +struct _notoken; +struct ptr; +struct _void; +struct _bool; +struct _int; +struct str; +struct stream; +struct il; +struct any; +struct _literal_0005; +struct _literal_0007; +struct _literal_0009; +struct _literal_000b; +struct _literal_000d; +struct _literal_001b; +struct _literal_001d; +struct _literal_001f; +struct _literal_0021; +struct _literal_0023; +struct _literal_0025; +struct _literal_0027; +struct _literal_0029; +struct _literal_002b; +struct _literal_002d; +struct _ignore_0001; +struct _ignore_0003; +struct NI; +struct COMMIT; +struct id; +struct literal; +struct STAR; +struct PLUS; +struct lex_factor; +struct lex_factor_neg; +struct lex_factor_rep; +struct lex_term; +struct lex_expr; +struct opt_ni; +struct opt_prod_repeat; +struct opt_prod_el_name; +struct prod_el; +struct prod_el_list; +struct opt_commit; +struct opt_prod_name; +struct prod; +struct prod_list; +struct ignore_def; +struct token_def; +struct token_list; +struct item; +struct start; +struct _ign_0x11bb1a0; +struct __accum0; +struct _repeat_item; +struct __list0; +struct _T_any; +struct _T_lex_factor; +struct _T_lex_factor_neg; +struct _T_lex_factor_rep; +struct _T_lex_term; +struct _T_lex_expr; +struct _T_opt_ni; +struct _T_opt_prod_repeat; +struct _T_opt_prod_el_name; +struct _T_prod_el; +struct _T_prod_el_list; +struct _T_opt_commit; +struct _T_opt_prod_name; +struct _T_prod; +struct _T_prod_list; +struct _T_ignore_def; +struct _T_token_def; +struct _T_token_list; +struct _T_item; +struct _T_start; +struct _T___accum0; +struct _T__repeat_item; +struct _T___list0; +struct _root; +struct _notoken +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _notoken( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct ptr +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + ptr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _void +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _void( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _bool +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _bool( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _int +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _int( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct str +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + str( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct stream +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + stream( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct il +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + il( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct any +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + any( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_0005 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_0005( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_0007 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_0007( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_0009 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_0009( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_000b +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_000b( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_000d +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_000d( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_001b +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_001b( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_001d +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_001d( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_001f +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_001f( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_0021 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_0021( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_0023 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_0023( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_0025 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_0025( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_0027 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_0027( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_0029 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_0029( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_002b +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_002b( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _literal_002d +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _literal_002d( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _ignore_0001 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _ignore_0001( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _ignore_0003 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _ignore_0003( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct NI +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + NI( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct COMMIT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + COMMIT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct id +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + id( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct literal +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + literal( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct STAR +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + STAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct PLUS +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + PLUS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct lex_factor +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_factor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::literal Literal(); + ::lex_expr Expr(); + ::literal Low(); + ::literal High(); + ::id Id(); +}; +struct lex_factor_neg +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_factor_neg( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_factor_neg FactorNeg(); + ::lex_factor Factor(); +}; +struct lex_factor_rep +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_factor_rep( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_factor_rep FactorRep(); + ::STAR Star(); + ::PLUS Plus(); + ::lex_factor_neg FactorNeg(); +}; +struct lex_term +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_term Term(); + ::lex_factor_rep FactorRep(); +}; +struct lex_expr +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_expr Expr(); + ::lex_term Term(); +}; +struct opt_ni +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_ni( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::NI Ni(); +}; +struct opt_prod_repeat +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_prod_repeat( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::STAR Star(); +}; +struct opt_prod_el_name +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_prod_el_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id Name(); +}; +struct prod_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + prod_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::opt_prod_el_name OptName(); + ::id Id(); + ::opt_prod_repeat OptRepeat(); +}; +struct prod_el_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + prod_el_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::prod_el_list ProdElList(); + ::prod_el ProdEl(); +}; +struct opt_commit +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_commit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::COMMIT Commit(); +}; +struct opt_prod_name +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_prod_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id Name(); +}; +struct prod +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + prod( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::prod_el_list ProdElList(); + ::opt_prod_name OptName(); + ::opt_commit OptCommit(); +}; +struct prod_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + prod_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::prod_list ProdList(); + ::prod Prod(); +}; +struct ignore_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + ignore_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_expr Expr(); +}; +struct token_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + token_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id Id(); + ::opt_ni LeftNi(); + ::lex_expr Expr(); + ::opt_ni RightNi(); +}; +struct token_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + token_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::token_list TokenList(); + ::token_def TokenDef(); + ::ignore_def IgnoreDef(); +}; +struct item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::token_list TokenList(); + ::id DefId(); + ::prod_list ProdList(); +}; +struct start +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + start( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::_repeat_item ItemList(); +}; +struct _ign_0x11bb1a0 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _ign_0x11bb1a0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct __accum0 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + __accum0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::start tree(); + ::str error(); +}; +struct _repeat_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_item next(); + ::item value(); +}; +struct __list0 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + __list0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::str head(); + ::str tail(); + ::str top(); +}; +struct _T_any +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_any( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T_lex_factor +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lex_factor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::literal Literal(); + ::lex_expr Expr(); + ::literal Low(); + ::literal High(); + ::id Id(); +}; +struct _T_lex_factor_neg +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lex_factor_neg( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_factor_neg FactorNeg(); + ::lex_factor Factor(); +}; +struct _T_lex_factor_rep +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lex_factor_rep( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_factor_rep FactorRep(); + ::STAR Star(); + ::PLUS Plus(); + ::lex_factor_neg FactorNeg(); +}; +struct _T_lex_term +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lex_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_term Term(); + ::lex_factor_rep FactorRep(); +}; +struct _T_lex_expr +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lex_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_expr Expr(); + ::lex_term Term(); +}; +struct _T_opt_ni +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_ni( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::NI Ni(); +}; +struct _T_opt_prod_repeat +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_prod_repeat( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::STAR Star(); +}; +struct _T_opt_prod_el_name +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_prod_el_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id Name(); +}; +struct _T_prod_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_prod_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::opt_prod_el_name OptName(); + ::id Id(); + ::opt_prod_repeat OptRepeat(); +}; +struct _T_prod_el_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_prod_el_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::prod_el_list ProdElList(); + ::prod_el ProdEl(); +}; +struct _T_opt_commit +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_commit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::COMMIT Commit(); +}; +struct _T_opt_prod_name +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_prod_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id Name(); +}; +struct _T_prod +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_prod( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::prod_el_list ProdElList(); + ::opt_prod_name OptName(); + ::opt_commit OptCommit(); +}; +struct _T_prod_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_prod_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::prod_list ProdList(); + ::prod Prod(); +}; +struct _T_ignore_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_ignore_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_expr Expr(); +}; +struct _T_token_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_token_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id Id(); + ::opt_ni LeftNi(); + ::lex_expr Expr(); + ::opt_ni RightNi(); +}; +struct _T_token_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_token_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::token_list TokenList(); + ::token_def TokenDef(); + ::ignore_def IgnoreDef(); +}; +struct _T_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::token_list TokenList(); + ::id DefId(); + ::prod_list ProdList(); +}; +struct _T_start +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_start( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::_repeat_item ItemList(); +}; +struct _T___accum0 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T___accum0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::start tree(); + ::str error(); +}; +struct _T__repeat_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T___list0 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T___list0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::str head(); + ::str tail(); + ::str top(); +}; +struct _root +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _root( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +::start ColmTree( colm_program *prg ); + +#endif diff --git a/src/if2.cc b/src/if2.cc new file mode 100644 index 0000000..55d7365 --- /dev/null +++ b/src/if2.cc @@ -0,0 +1,1091 @@ +#include "if2.h" +::_repeat_root_item start::RootItemList() { static int a[] = {1, 0, 0}; return ::_repeat_root_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::rl_def root_item::rl_def() { static int a[] = {1, 0, 0}; return ::rl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal_def root_item::literal_def() { static int a[] = {1, 1, 0}; return ::literal_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::token_def root_item::token_def() { static int a[] = {1, 2, 0}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ic_def root_item::ic_def() { static int a[] = {1, 3, 0}; return ::ic_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ignore_def root_item::ignore_def() { static int a[] = {1, 4, 0}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::cfl_def root_item::cfl_def() { static int a[] = {1, 5, 0}; return ::cfl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_def root_item::region_def() { static int a[] = {1, 6, 0}; return ::region_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::context_def root_item::context_def() { static int a[] = {1, 7, 0}; return ::context_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::namespace_def root_item::namespace_def() { static int a[] = {1, 8, 0}; return ::namespace_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::function_def root_item::function_def() { static int a[] = {1, 9, 0}; return ::function_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::iter_def root_item::iter_def() { static int a[] = {1, 10, 0}; return ::iter_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::statement root_item::statement() { static int a[] = {1, 11, 0}; return ::statement( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::global_def root_item::global_def() { static int a[] = {1, 12, 0}; return ::global_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::export_def root_item::export_def() { static int a[] = {1, 13, 0}; return ::export_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pre_eof_def root_item::pre_eof_def() { static int a[] = {1, 14, 0}; return ::pre_eof_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::precedence_def root_item::precedence_def() { static int a[] = {1, 15, 0}; return ::precedence_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::alias_def root_item::alias_def() { static int a[] = {1, 16, 0}; return ::alias_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::include root_item::include() { static int a[] = {1, 17, 0}; return ::include( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::INCLUDE include::INCLUDE() { static int a[] = {1, 0, 0}; return ::INCLUDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ include::SQ() { static int a[] = {1, 0, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data include::SqConsDataList() { static int a[] = {1, 0, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term include::sq_lit_term() { static int a[] = {1, 0, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pred_type precedence_def::pred_type() { static int a[] = {1, 0, 0}; return ::pred_type( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pred_token_list precedence_def::pred_token_list() { static int a[] = {1, 0, 1}; return ::pred_token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEFT pred_type::LEFT() { static int a[] = {1, 0, 0}; return ::LEFT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RIGHT pred_type::RIGHT() { static int a[] = {1, 1, 0}; return ::RIGHT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NONASSOC pred_type::NONASSOC() { static int a[] = {1, 2, 0}; return ::NONASSOC( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pred_token_list pred_token_list::_pred_token_list() { static int a[] = {1, 0, 0}; return ::pred_token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COMMA pred_token_list::COMMA() { static int a[] = {1, 0, 1}; return ::COMMA( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pred_token pred_token_list::pred_token() { static int a[] = {2, 0, 2, 1, 0}; return ::pred_token( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_qual pred_token::region_qual() { static int a[] = {2, 0, 0, 1, 0}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id pred_token::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::backtick_lit pred_token::backtick_lit() { static int a[] = {1, 1, 1}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PREEOF pre_eof_def::PREEOF() { static int a[] = {1, 0, 0}; return ::PREEOF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN pre_eof_def::COPEN() { static int a[] = {1, 0, 1}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list pre_eof_def::lang_stmt_list() { static int a[] = {1, 0, 2}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE pre_eof_def::CCLOSE() { static int a[] = {1, 0, 3}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ALIAS alias_def::ALIAS() { static int a[] = {1, 0, 0}; return ::ALIAS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id alias_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref alias_def::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::context_var_def context_item::context_var_def() { static int a[] = {1, 0, 0}; return ::context_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal_def context_item::literal_def() { static int a[] = {1, 1, 0}; return ::literal_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::rl_def context_item::rl_def() { static int a[] = {1, 2, 0}; return ::rl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::token_def context_item::token_def() { static int a[] = {1, 3, 0}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ic_def context_item::ic_def() { static int a[] = {1, 4, 0}; return ::ic_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ignore_def context_item::ignore_def() { static int a[] = {1, 5, 0}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::cfl_def context_item::cfl_def() { static int a[] = {1, 6, 0}; return ::cfl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_def context_item::region_def() { static int a[] = {1, 7, 0}; return ::region_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::context_def context_item::context_def() { static int a[] = {1, 8, 0}; return ::context_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::function_def context_item::function_def() { static int a[] = {1, 9, 0}; return ::function_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::iter_def context_item::iter_def() { static int a[] = {1, 10, 0}; return ::iter_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::export_def context_item::export_def() { static int a[] = {1, 11, 0}; return ::export_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pre_eof_def context_item::pre_eof_def() { static int a[] = {1, 12, 0}; return ::pre_eof_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::precedence_def context_item::precedence_def() { static int a[] = {1, 13, 0}; return ::precedence_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::EXPORT export_def::EXPORT() { static int a[] = {1, 0, 0}; return ::EXPORT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_def export_def::var_def() { static int a[] = {1, 0, 1}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_def_init export_def::opt_def_init() { static int a[] = {1, 0, 2}; return ::opt_def_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::GLOBAL global_def::GLOBAL() { static int a[] = {1, 0, 0}; return ::GLOBAL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_def global_def::var_def() { static int a[] = {1, 0, 1}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_def_init global_def::opt_def_init() { static int a[] = {1, 0, 2}; return ::opt_def_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ITER iter_def::ITER() { static int a[] = {1, 0, 0}; return ::ITER( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id iter_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::POPEN iter_def::POPEN() { static int a[] = {1, 0, 2}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::param_var_def_list iter_def::ParamVarDefList() { static int a[] = {1, 0, 3}; return ::param_var_def_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PCLOSE iter_def::PCLOSE() { static int a[] = {1, 0, 4}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN iter_def::COPEN() { static int a[] = {1, 0, 5}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list iter_def::lang_stmt_list() { static int a[] = {1, 0, 6}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE iter_def::CCLOSE() { static int a[] = {1, 0, 7}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::REF reference_type_ref::REF() { static int a[] = {1, 0, 0}; return ::REF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LT reference_type_ref::LT() { static int a[] = {1, 0, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref reference_type_ref::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::GT reference_type_ref::GT() { static int a[] = {1, 0, 3}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::param_var_def param_var_def_list::param_var_def() { static int a[] = {1, 0, 0}; return ::param_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::param_var_def_list param_var_def_list::_param_var_def_list() { static int a[] = {1, 0, 1}; return ::param_var_def_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id param_var_def::id() { static int a[] = {2, 0, 0, 1, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON param_var_def::COLON() { static int a[] = {2, 0, 1, 1, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref param_var_def::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::reference_type_ref param_var_def::reference_type_ref() { static int a[] = {1, 1, 2}; return ::reference_type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::EXPORT opt_export::EXPORT() { static int a[] = {1, 0, 0}; return ::EXPORT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_export function_def::opt_export() { static int a[] = {1, 0, 0}; return ::opt_export( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref function_def::type_ref() { static int a[] = {1, 0, 1}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id function_def::id() { static int a[] = {1, 0, 2}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::POPEN function_def::POPEN() { static int a[] = {1, 0, 3}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::param_var_def_list function_def::ParamVarDefList() { static int a[] = {1, 0, 4}; return ::param_var_def_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PCLOSE function_def::PCLOSE() { static int a[] = {1, 0, 5}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN function_def::COPEN() { static int a[] = {1, 0, 6}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list function_def::lang_stmt_list() { static int a[] = {1, 0, 7}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE function_def::CCLOSE() { static int a[] = {1, 0, 8}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_def context_var_def::var_def() { static int a[] = {1, 0, 0}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONTEXT context_def::CONTEXT() { static int a[] = {1, 0, 0}; return ::CONTEXT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id context_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_context_item context_def::ContextItemList() { static int a[] = {1, 0, 2}; return ::_repeat_context_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::END context_def::END() { static int a[] = {1, 0, 3}; return ::END( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LITERAL literal_def::LITERAL() { static int a[] = {1, 0, 0}; return ::LITERAL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal_list literal_def::literal_list() { static int a[] = {1, 0, 1}; return ::literal_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal_list literal_list::_literal_list() { static int a[] = {1, 0, 0}; return ::literal_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal_item literal_list::literal_item() { static int a[] = {2, 0, 1, 1, 0}; return ::literal_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::no_ignore_left literal_item::no_ignore_left() { static int a[] = {1, 0, 0}; return ::no_ignore_left( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::backtick_lit literal_item::backtick_lit() { static int a[] = {1, 0, 1}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::no_ignore_right literal_item::no_ignore_right() { static int a[] = {1, 0, 2}; return ::no_ignore_right( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NI no_ignore_left::NI() { static int a[] = {1, 0, 0}; return ::NI( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MINUS no_ignore_left::MINUS() { static int a[] = {1, 0, 1}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MINUS no_ignore_right::MINUS() { static int a[] = {1, 0, 0}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NI no_ignore_right::NI() { static int a[] = {1, 0, 1}; return ::NI( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NAMESPACE namespace_def::NAMESPACE() { static int a[] = {1, 0, 0}; return ::NAMESPACE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id namespace_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_namespace_item namespace_def::ItemList() { static int a[] = {1, 0, 2}; return ::_repeat_namespace_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::END namespace_def::END() { static int a[] = {1, 0, 3}; return ::END( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::rl_def namespace_item::rl_def() { static int a[] = {1, 0, 0}; return ::rl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal_def namespace_item::literal_def() { static int a[] = {1, 1, 0}; return ::literal_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::token_def namespace_item::token_def() { static int a[] = {1, 2, 0}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ic_def namespace_item::ic_def() { static int a[] = {1, 3, 0}; return ::ic_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ignore_def namespace_item::ignore_def() { static int a[] = {1, 4, 0}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::cfl_def namespace_item::cfl_def() { static int a[] = {1, 5, 0}; return ::cfl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_def namespace_item::region_def() { static int a[] = {1, 6, 0}; return ::region_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::context_def namespace_item::context_def() { static int a[] = {1, 7, 0}; return ::context_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::namespace_def namespace_item::namespace_def() { static int a[] = {1, 8, 0}; return ::namespace_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::function_def namespace_item::function_def() { static int a[] = {1, 9, 0}; return ::function_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::iter_def namespace_item::iter_def() { static int a[] = {1, 10, 0}; return ::iter_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pre_eof_def namespace_item::pre_eof_def() { static int a[] = {1, 11, 0}; return ::pre_eof_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::precedence_def namespace_item::precedence_def() { static int a[] = {1, 12, 0}; return ::precedence_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::alias_def namespace_item::alias_def() { static int a[] = {1, 13, 0}; return ::alias_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::include namespace_item::include() { static int a[] = {1, 14, 0}; return ::include( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::REDUCEFIRST opt_reduce_first::REDUCEFIRST() { static int a[] = {1, 0, 0}; return ::REDUCEFIRST( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DEF cfl_def::DEF() { static int a[] = {1, 0, 0}; return ::DEF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id cfl_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_var_def cfl_def::VarDefList() { static int a[] = {1, 0, 2}; return ::_repeat_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_reduce_first cfl_def::opt_reduce_first() { static int a[] = {1, 0, 3}; return ::opt_reduce_first( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_list cfl_def::prod_list() { static int a[] = {1, 0, 4}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX region_def::LEX() { static int a[] = {1, 0, 0}; return ::LEX( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_root_item region_def::RootItemList() { static int a[] = {1, 0, 1}; return ::_repeat_root_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::END region_def::END() { static int a[] = {1, 0, 2}; return ::END( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RL rl_def::RL() { static int a[] = {1, 0, 0}; return ::RL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id rl_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_FSLASH rl_def::LEX_FSLASH() { static int a[] = {2, 0, 2, 0, 4}; return ::LEX_FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr rl_def::lex_expr() { static int a[] = {1, 0, 3}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr opt_lex_expr::lex_expr() { static int a[] = {1, 0, 0}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TOKEN token_def::TOKEN() { static int a[] = {1, 0, 0}; return ::TOKEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id token_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_var_def token_def::VarDefList() { static int a[] = {1, 0, 2}; return ::_repeat_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::no_ignore_left token_def::no_ignore_left() { static int a[] = {1, 0, 3}; return ::no_ignore_left( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_FSLASH token_def::LEX_FSLASH() { static int a[] = {2, 0, 4, 0, 6}; return ::LEX_FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_lex_expr token_def::opt_lex_expr() { static int a[] = {1, 0, 5}; return ::opt_lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::no_ignore_right token_def::no_ignore_right() { static int a[] = {1, 0, 7}; return ::no_ignore_right( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_translate token_def::opt_translate() { static int a[] = {1, 0, 8}; return ::opt_translate( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TOKEN ic_def::TOKEN() { static int a[] = {1, 0, 0}; return ::TOKEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id ic_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MINUS ic_def::MINUS() { static int a[] = {1, 0, 2}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN opt_translate::COPEN() { static int a[] = {1, 0, 0}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list opt_translate::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE opt_translate::CCLOSE() { static int a[] = {1, 0, 2}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id opt_id::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::IGNORE ignore_def::IGNORE() { static int a[] = {1, 0, 0}; return ::IGNORE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_id ignore_def::opt_id() { static int a[] = {1, 0, 1}; return ::opt_id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_FSLASH ignore_def::LEX_FSLASH() { static int a[] = {2, 0, 2, 0, 4}; return ::LEX_FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_lex_expr ignore_def::opt_lex_expr() { static int a[] = {1, 0, 3}; return ::opt_lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_prod_el_name prod_el::opt_prod_el_name() { static int a[] = {2, 0, 0, 1, 0}; return ::opt_prod_el_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_qual prod_el::region_qual() { static int a[] = {2, 0, 1, 1, 1}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id prod_el::id() { static int a[] = {1, 0, 2}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_repeat prod_el::opt_repeat() { static int a[] = {2, 0, 3, 1, 3}; return ::opt_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::backtick_lit prod_el::backtick_lit() { static int a[] = {1, 1, 2}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id opt_prod_el_name::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON opt_prod_el_name::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_el_list prod_el_list::_prod_el_list() { static int a[] = {1, 0, 0}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_el prod_el_list::prod_el() { static int a[] = {1, 0, 1}; return ::prod_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COMMIT opt_commit::COMMIT() { static int a[] = {1, 0, 0}; return ::COMMIT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON opt_prod_name::COLON() { static int a[] = {1, 0, 0}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id opt_prod_name::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQOPEN prod::SQOPEN() { static int a[] = {1, 0, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_el_list prod::prod_el_list() { static int a[] = {1, 0, 1}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQCLOSE prod::SQCLOSE() { static int a[] = {1, 0, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_prod_name prod::opt_prod_name() { static int a[] = {1, 0, 3}; return ::opt_prod_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_commit prod::opt_commit() { static int a[] = {1, 0, 4}; return ::opt_commit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_reduce prod::opt_reduce() { static int a[] = {1, 0, 5}; return ::opt_reduce( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN opt_reduce::COPEN() { static int a[] = {1, 0, 0}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list opt_reduce::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE opt_reduce::CCLOSE() { static int a[] = {1, 0, 2}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_list prod_list::_prod_list() { static int a[] = {1, 0, 0}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::BAR prod_list::BAR() { static int a[] = {1, 0, 1}; return ::BAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod prod_list::prod() { static int a[] = {2, 0, 2, 1, 0}; return ::prod( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::print_stmt statement::print_stmt() { static int a[] = {1, 0, 0}; return ::print_stmt( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::expr_stmt statement::expr_stmt() { static int a[] = {1, 1, 0}; return ::expr_stmt( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_def statement::var_def() { static int a[] = {1, 2, 0}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_def_init statement::opt_def_init() { static int a[] = {1, 2, 1}; return ::opt_def_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::FOR statement::FOR() { static int a[] = {1, 3, 0}; return ::FOR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id statement::id() { static int a[] = {1, 3, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON statement::COLON() { static int a[] = {1, 3, 2}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref statement::type_ref() { static int a[] = {1, 3, 3}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::IN statement::IN() { static int a[] = {1, 3, 4}; return ::IN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::iter_call statement::iter_call() { static int a[] = {1, 3, 5}; return ::iter_call( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::block_or_single statement::block_or_single() { static int a[] = {3, 3, 6, 4, 2, 5, 2}; return ::block_or_single( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::IF statement::IF() { static int a[] = {1, 4, 0}; return ::IF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr statement::code_expr() { static int a[] = {4, 4, 1, 5, 1, 6, 2, 8, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::elsif_list statement::elsif_list() { static int a[] = {1, 4, 3}; return ::elsif_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::WHILE statement::WHILE() { static int a[] = {1, 5, 0}; return ::WHILE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_ref statement::var_ref() { static int a[] = {2, 6, 0, 7, 1}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::EQUALS statement::EQUALS() { static int a[] = {1, 6, 1}; return ::EQUALS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::YIELD statement::YIELD() { static int a[] = {1, 7, 0}; return ::YIELD( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RETURN statement::RETURN() { static int a[] = {1, 8, 0}; return ::RETURN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::BREAK statement::BREAK() { static int a[] = {1, 9, 0}; return ::BREAK( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::REJECT statement::REJECT() { static int a[] = {1, 10, 0}; return ::REJECT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::elsif_clause elsif_list::elsif_clause() { static int a[] = {1, 0, 0}; return ::elsif_clause( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::elsif_list elsif_list::_elsif_list() { static int a[] = {1, 0, 1}; return ::elsif_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::optional_else elsif_list::optional_else() { static int a[] = {1, 1, 0}; return ::optional_else( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ELSIF elsif_clause::ELSIF() { static int a[] = {1, 0, 0}; return ::ELSIF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr elsif_clause::code_expr() { static int a[] = {1, 0, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::block_or_single elsif_clause::block_or_single() { static int a[] = {1, 0, 2}; return ::block_or_single( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ELSE optional_else::ELSE() { static int a[] = {1, 0, 0}; return ::ELSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::block_or_single optional_else::block_or_single() { static int a[] = {1, 0, 1}; return ::block_or_single( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr call_arg_list::code_expr() { static int a[] = {1, 0, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::call_arg_list call_arg_list::_call_arg_list() { static int a[] = {1, 0, 1}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E1 iter_call::E1() { static int a[] = {1, 0, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_ref iter_call::var_ref() { static int a[] = {1, 0, 1}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::POPEN iter_call::POPEN() { static int a[] = {1, 0, 2}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::call_arg_list iter_call::call_arg_list() { static int a[] = {1, 0, 3}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PCLOSE iter_call::PCLOSE() { static int a[] = {1, 0, 4}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E2 iter_call::E2() { static int a[] = {1, 1, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id iter_call::id() { static int a[] = {1, 1, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E3 iter_call::E3() { static int a[] = {1, 2, 0}; return ::E3( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr iter_call::code_expr() { static int a[] = {1, 2, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN block_or_single::COPEN() { static int a[] = {1, 0, 0}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list block_or_single::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE block_or_single::CCLOSE() { static int a[] = {1, 0, 2}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::statement block_or_single::statement() { static int a[] = {1, 1, 0}; return ::statement( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::REQUIRE require_pattern::REQUIRE() { static int a[] = {1, 0, 0}; return ::REQUIRE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_ref require_pattern::var_ref() { static int a[] = {1, 0, 1}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pattern require_pattern::pattern() { static int a[] = {1, 0, 2}; return ::pattern( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::require_pattern opt_require_stmt::require_pattern() { static int a[] = {1, 0, 0}; return ::require_pattern( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list opt_require_stmt::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_statement lang_stmt_list::StmtList() { static int a[] = {1, 0, 0}; return ::_repeat_statement( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_require_stmt lang_stmt_list::opt_require_stmt() { static int a[] = {1, 0, 1}; return ::opt_require_stmt( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::EQUALS opt_def_init::EQUALS() { static int a[] = {1, 0, 0}; return ::EQUALS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr opt_def_init::code_expr() { static int a[] = {1, 0, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id var_def::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON var_def::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref var_def::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PRINT print_stmt::PRINT() { static int a[] = {1, 0, 0}; return ::PRINT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::POPEN print_stmt::POPEN() { static int a[] = {4, 0, 1, 1, 1, 2, 1, 3, 1}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::call_arg_list print_stmt::call_arg_list() { static int a[] = {4, 0, 2, 1, 2, 2, 2, 3, 2}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PCLOSE print_stmt::PCLOSE() { static int a[] = {4, 0, 3, 1, 3, 2, 3, 3, 3}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PRINTS print_stmt::PRINTS() { static int a[] = {1, 1, 0}; return ::PRINTS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PRINT_XML print_stmt::PRINT_XML() { static int a[] = {1, 2, 0}; return ::PRINT_XML( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PRINT_XML_AC print_stmt::PRINT_XML_AC() { static int a[] = {1, 3, 0}; return ::PRINT_XML_AC( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr expr_stmt::code_expr() { static int a[] = {1, 0, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr code_expr::_code_expr() { static int a[] = {2, 0, 0, 1, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::AMPAMP code_expr::AMPAMP() { static int a[] = {1, 0, 1}; return ::AMPAMP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_relational code_expr::code_relational() { static int a[] = {3, 0, 2, 1, 2, 2, 0}; return ::code_relational( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::BARBAR code_expr::BARBAR() { static int a[] = {1, 1, 1}; return ::BARBAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_relational code_relational::_code_relational() { static int a[] = {6, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0}; return ::code_relational( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::EQEQ code_relational::EQEQ() { static int a[] = {1, 0, 1}; return ::EQEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_additive code_relational::code_additive() { static int a[] = {7, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 0}; return ::code_additive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NEQ code_relational::NEQ() { static int a[] = {1, 1, 1}; return ::NEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LT code_relational::LT() { static int a[] = {1, 2, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::GT code_relational::GT() { static int a[] = {1, 3, 1}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LTEQ code_relational::LTEQ() { static int a[] = {1, 4, 1}; return ::LTEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::GTEQ code_relational::GTEQ() { static int a[] = {1, 5, 1}; return ::GTEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_additive code_additive::_code_additive() { static int a[] = {2, 0, 0, 1, 0}; return ::code_additive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PLUS code_additive::PLUS() { static int a[] = {1, 0, 1}; return ::PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_multiplicitive code_additive::code_multiplicitive() { static int a[] = {3, 0, 2, 1, 2, 2, 0}; return ::code_multiplicitive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MINUS code_additive::MINUS() { static int a[] = {1, 1, 1}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_multiplicitive code_multiplicitive::_code_multiplicitive() { static int a[] = {2, 0, 0, 1, 0}; return ::code_multiplicitive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::STAR code_multiplicitive::STAR() { static int a[] = {1, 0, 1}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_unary code_multiplicitive::code_unary() { static int a[] = {3, 0, 2, 1, 2, 2, 0}; return ::code_unary( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::FSLASH code_multiplicitive::FSLASH() { static int a[] = {1, 1, 1}; return ::FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::BANG code_unary::BANG() { static int a[] = {1, 0, 0}; return ::BANG( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_factor code_unary::code_factor() { static int a[] = {5, 0, 1, 1, 1, 2, 1, 3, 1, 4, 0}; return ::code_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DOLLAR code_unary::DOLLAR() { static int a[] = {1, 1, 0}; return ::DOLLAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CARET code_unary::CARET() { static int a[] = {1, 2, 0}; return ::CARET( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PERCENT code_unary::PERCENT() { static int a[] = {1, 3, 0}; return ::PERCENT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DOT opt_eos::DOT() { static int a[] = {1, 0, 0}; return ::DOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::EOS opt_eos::EOS() { static int a[] = {1, 1, 0}; return ::EOS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::number code_factor::number() { static int a[] = {1, 0, 0}; return ::number( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_ref code_factor::var_ref() { static int a[] = {5, 1, 0, 2, 0, 7, 1, 11, 1, 13, 2}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::POPEN code_factor::POPEN() { static int a[] = {4, 1, 1, 6, 0, 14, 1, 15, 1}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::call_arg_list code_factor::call_arg_list() { static int a[] = {3, 1, 2, 14, 2, 15, 2}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PCLOSE code_factor::PCLOSE() { static int a[] = {4, 1, 3, 6, 2, 14, 3, 15, 3}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NIL code_factor::NIL() { static int a[] = {1, 3, 0}; return ::NIL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TRUE code_factor::TRUE() { static int a[] = {1, 4, 0}; return ::TRUE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::FALSE code_factor::FALSE() { static int a[] = {1, 5, 0}; return ::FALSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr code_factor::code_expr() { static int a[] = {1, 6, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SEND code_factor::SEND() { static int a[] = {1, 7, 0}; return ::SEND( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::accumulate code_factor::accumulate() { static int a[] = {3, 7, 2, 8, 4, 9, 4}; return ::accumulate( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_eos code_factor::opt_eos() { static int a[] = {1, 7, 3}; return ::opt_eos( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PARSE code_factor::PARSE() { static int a[] = {1, 8, 0}; return ::PARSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_capture code_factor::opt_capture() { static int a[] = {3, 8, 1, 9, 1, 10, 1}; return ::opt_capture( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref code_factor::type_ref() { static int a[] = {6, 8, 2, 9, 2, 10, 2, 13, 0, 16, 2, 18, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_field_init code_factor::opt_field_init() { static int a[] = {3, 8, 3, 9, 3, 10, 3}; return ::opt_field_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PARSE_STOP code_factor::PARSE_STOP() { static int a[] = {1, 9, 0}; return ::PARSE_STOP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS code_factor::CONS() { static int a[] = {1, 10, 0}; return ::CONS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::constructor code_factor::constructor() { static int a[] = {1, 10, 4}; return ::constructor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MATCH code_factor::MATCH() { static int a[] = {1, 11, 0}; return ::MATCH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pattern code_factor::pattern() { static int a[] = {1, 11, 2}; return ::pattern( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::string code_factor::string() { static int a[] = {1, 12, 0}; return ::string( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::IN code_factor::IN() { static int a[] = {1, 13, 1}; return ::IN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MAKE_TREE code_factor::MAKE_TREE() { static int a[] = {1, 14, 0}; return ::MAKE_TREE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MAKE_TOKEN code_factor::MAKE_TOKEN() { static int a[] = {1, 15, 0}; return ::MAKE_TOKEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TYPEID code_factor::TYPEID() { static int a[] = {1, 16, 0}; return ::TYPEID( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LT code_factor::LT() { static int a[] = {2, 16, 1, 18, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::GT code_factor::GT() { static int a[] = {2, 16, 3, 18, 3}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NEW code_factor::NEW() { static int a[] = {1, 17, 0}; return ::NEW( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_factor code_factor::_code_factor() { static int a[] = {2, 17, 1, 18, 4}; return ::code_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CAST code_factor::CAST() { static int a[] = {1, 18, 0}; return ::CAST( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_qual type_ref::region_qual() { static int a[] = {2, 0, 0, 1, 2}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id type_ref::id() { static int a[] = {2, 0, 1, 1, 3}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_repeat type_ref::opt_repeat() { static int a[] = {2, 0, 2, 1, 4}; return ::opt_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PTR type_ref::PTR() { static int a[] = {1, 1, 0}; return ::PTR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LT type_ref::LT() { static int a[] = {5, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::GT type_ref::GT() { static int a[] = {5, 1, 5, 2, 4, 3, 3, 4, 3, 5, 3}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MAP type_ref::MAP() { static int a[] = {1, 2, 0}; return ::MAP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref type_ref::MapKeyType() { static int a[] = {1, 2, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref type_ref::MapValueType() { static int a[] = {1, 2, 3}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LIST type_ref::LIST() { static int a[] = {1, 3, 0}; return ::LIST( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref type_ref::_type_ref() { static int a[] = {3, 3, 2, 4, 2, 5, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::VECTOR type_ref::VECTOR() { static int a[] = {1, 4, 0}; return ::VECTOR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PARSER type_ref::PARSER() { static int a[] = {1, 5, 0}; return ::PARSER( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_qual region_qual::_region_qual() { static int a[] = {1, 0, 0}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id region_qual::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DOUBLE_COLON region_qual::DOUBLE_COLON() { static int a[] = {1, 0, 2}; return ::DOUBLE_COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::STAR opt_repeat::STAR() { static int a[] = {1, 0, 0}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PLUS opt_repeat::PLUS() { static int a[] = {1, 1, 0}; return ::PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::QUESTION opt_repeat::QUESTION() { static int a[] = {1, 2, 0}; return ::QUESTION( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id opt_capture::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON opt_capture::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::POPEN opt_field_init::POPEN() { static int a[] = {1, 0, 0}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_field_init opt_field_init::FieldInitList() { static int a[] = {1, 0, 1}; return ::_repeat_field_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PCLOSE opt_field_init::PCLOSE() { static int a[] = {1, 0, 2}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr field_init::code_expr() { static int a[] = {1, 0, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id opt_label::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON opt_label::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_DQ dq_lit_term::CONS_DQ() { static int a[] = {1, 0, 0}; return ::CONS_DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_DQ_NL dq_lit_term::CONS_DQ_NL() { static int a[] = {1, 1, 0}; return ::CONS_DQ_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQ sq_lit_term::CONS_SQ() { static int a[] = {1, 0, 0}; return ::CONS_SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQ_NL sq_lit_term::CONS_SQ_NL() { static int a[] = {1, 1, 0}; return ::CONS_SQ_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::tilde_data opt_tilde_data::tilde_data() { static int a[] = {1, 0, 0}; return ::tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_qual pattern_el_lel::region_qual() { static int a[] = {2, 0, 0, 1, 0}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id pattern_el_lel::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_repeat pattern_el_lel::opt_repeat() { static int a[] = {2, 0, 2, 1, 2}; return ::opt_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::backtick_lit pattern_el_lel::backtick_lit() { static int a[] = {1, 1, 1}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_label pattern_el::opt_label() { static int a[] = {1, 0, 0}; return ::opt_label( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pattern_el_lel pattern_el::pattern_el_lel() { static int a[] = {1, 0, 1}; return ::pattern_el_lel( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ pattern_el::DQ() { static int a[] = {1, 1, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_litpat_el pattern_el::LitpatElList() { static int a[] = {1, 1, 1}; return ::_repeat_litpat_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term pattern_el::dq_lit_term() { static int a[] = {1, 1, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ pattern_el::SQ() { static int a[] = {1, 2, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data pattern_el::SqConsDataList() { static int a[] = {1, 2, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term pattern_el::sq_lit_term() { static int a[] = {1, 2, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE pattern_el::TILDE() { static int a[] = {1, 3, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data pattern_el::opt_tilde_data() { static int a[] = {1, 3, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL pattern_el::TILDE_NL() { static int a[] = {1, 3, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_cons_data litpat_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQOPEN litpat_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_pattern_el litpat_el::PatternElList() { static int a[] = {1, 1, 1}; return ::_repeat_pattern_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQCLOSE litpat_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ pattern_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_litpat_el pattern_top_el::LitpatElList() { static int a[] = {1, 0, 1}; return ::_repeat_litpat_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term pattern_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ pattern_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data pattern_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term pattern_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE pattern_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data pattern_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL pattern_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQOPEN pattern_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_pattern_el pattern_top_el::PatternElList() { static int a[] = {1, 3, 1}; return ::_repeat_pattern_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQCLOSE pattern_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pattern_list pattern_list::_pattern_list() { static int a[] = {1, 0, 0}; return ::pattern_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pattern_top_el pattern_list::pattern_top_el() { static int a[] = {2, 0, 1, 1, 0}; return ::pattern_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pattern_list pattern::pattern_list() { static int a[] = {1, 0, 0}; return ::pattern_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E1 cons_el::E1() { static int a[] = {4, 0, 0, 1, 0, 2, 0, 3, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_qual cons_el::region_qual() { static int a[] = {1, 0, 1}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::backtick_lit cons_el::backtick_lit() { static int a[] = {1, 0, 2}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ cons_el::DQ() { static int a[] = {1, 1, 1}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_lit_cons_el cons_el::LitConsElList() { static int a[] = {1, 1, 2}; return ::_repeat_lit_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term cons_el::dq_lit_term() { static int a[] = {1, 1, 3}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ cons_el::SQ() { static int a[] = {1, 2, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data cons_el::SqConsDataList() { static int a[] = {1, 2, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term cons_el::sq_lit_term() { static int a[] = {1, 2, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE cons_el::TILDE() { static int a[] = {1, 3, 1}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data cons_el::opt_tilde_data() { static int a[] = {1, 3, 2}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL cons_el::TILDE_NL() { static int a[] = {1, 3, 3}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E2 cons_el::E2() { static int a[] = {1, 4, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr cons_el::code_expr() { static int a[] = {1, 4, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_cons_data lit_cons_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQOPEN lit_cons_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_cons_el lit_cons_el::ConsElList() { static int a[] = {1, 1, 1}; return ::_repeat_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQCLOSE lit_cons_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ cons_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_lit_cons_el cons_top_el::LitConsElList() { static int a[] = {1, 0, 1}; return ::_repeat_lit_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term cons_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ cons_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data cons_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term cons_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE cons_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data cons_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL cons_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQOPEN cons_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_cons_el cons_top_el::ConsElList() { static int a[] = {1, 3, 1}; return ::_repeat_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQCLOSE cons_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::cons_top_el cons_list::cons_top_el() { static int a[] = {2, 0, 0, 1, 0}; return ::cons_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::cons_list cons_list::_cons_list() { static int a[] = {1, 0, 1}; return ::cons_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::cons_list constructor::cons_list() { static int a[] = {1, 0, 0}; return ::cons_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E1 accum_el::E1() { static int a[] = {3, 0, 0, 1, 0, 2, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ accum_el::DQ() { static int a[] = {1, 0, 1}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_lit_accum_el accum_el::LitAccumElList() { static int a[] = {1, 0, 2}; return ::_repeat_lit_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term accum_el::dq_lit_term() { static int a[] = {1, 0, 3}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ accum_el::SQ() { static int a[] = {1, 1, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data accum_el::SqConsDataList() { static int a[] = {1, 1, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term accum_el::sq_lit_term() { static int a[] = {1, 1, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE accum_el::TILDE() { static int a[] = {1, 2, 1}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data accum_el::opt_tilde_data() { static int a[] = {1, 2, 2}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL accum_el::TILDE_NL() { static int a[] = {1, 2, 3}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E2 accum_el::E2() { static int a[] = {1, 3, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr accum_el::code_expr() { static int a[] = {1, 3, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_cons_data lit_accum_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQOPEN lit_accum_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_accum_el lit_accum_el::AccumElList() { static int a[] = {1, 1, 1}; return ::_repeat_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQCLOSE lit_accum_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ accum_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_lit_accum_el accum_top_el::LitAccumElList() { static int a[] = {1, 0, 1}; return ::_repeat_lit_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term accum_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ accum_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data accum_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term accum_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE accum_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data accum_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL accum_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQOPEN accum_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_accum_el accum_top_el::AccumElList() { static int a[] = {1, 3, 1}; return ::_repeat_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQCLOSE accum_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::accum_top_el accum_list::accum_top_el() { static int a[] = {2, 0, 0, 1, 0}; return ::accum_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::accum_list accum_list::_accum_list() { static int a[] = {1, 0, 1}; return ::accum_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::accum_list accumulate::accum_list() { static int a[] = {1, 0, 0}; return ::accum_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E1 string_el::E1() { static int a[] = {3, 0, 0, 1, 0, 2, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ string_el::DQ() { static int a[] = {1, 0, 1}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_lit_string_el string_el::LitStringElList() { static int a[] = {1, 0, 2}; return ::_repeat_lit_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term string_el::dq_lit_term() { static int a[] = {1, 0, 3}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ string_el::SQ() { static int a[] = {1, 1, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data string_el::SqConsDataList() { static int a[] = {1, 1, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term string_el::sq_lit_term() { static int a[] = {1, 1, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE string_el::TILDE() { static int a[] = {1, 2, 1}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data string_el::opt_tilde_data() { static int a[] = {1, 2, 2}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL string_el::TILDE_NL() { static int a[] = {1, 2, 3}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E2 string_el::E2() { static int a[] = {1, 3, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr string_el::code_expr() { static int a[] = {1, 3, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_cons_data lit_string_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQOPEN lit_string_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_string_el lit_string_el::StringElList() { static int a[] = {1, 1, 1}; return ::_repeat_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQCLOSE lit_string_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ string_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_lit_string_el string_top_el::LitStringElList() { static int a[] = {1, 0, 1}; return ::_repeat_lit_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term string_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ string_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data string_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term string_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE string_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data string_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL string_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQOPEN string_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_string_el string_top_el::StringElList() { static int a[] = {1, 3, 1}; return ::_repeat_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQCLOSE string_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::string_top_el string_list::string_top_el() { static int a[] = {2, 0, 0, 1, 0}; return ::string_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::string_list string_list::_string_list() { static int a[] = {1, 0, 1}; return ::string_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::string_list string::string_list() { static int a[] = {1, 0, 0}; return ::string_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::qual var_ref::qual() { static int a[] = {1, 0, 0}; return ::qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id var_ref::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::qual qual::_qual() { static int a[] = {2, 0, 0, 1, 0}; return ::qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id qual::id() { static int a[] = {2, 0, 1, 1, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DOT qual::DOT() { static int a[] = {1, 0, 2}; return ::DOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ARROW qual::ARROW() { static int a[] = {1, 1, 2}; return ::ARROW( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr lex_expr::_lex_expr() { static int a[] = {4, 0, 0, 1, 0, 2, 0, 3, 0}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_BAR lex_expr::LEX_BAR() { static int a[] = {1, 0, 1}; return ::LEX_BAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_term lex_expr::lex_term() { static int a[] = {5, 0, 2, 1, 2, 2, 2, 3, 2, 4, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_AMP lex_expr::LEX_AMP() { static int a[] = {1, 1, 1}; return ::LEX_AMP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_DASH lex_expr::LEX_DASH() { static int a[] = {1, 2, 1}; return ::LEX_DASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_DASHDASH lex_expr::LEX_DASHDASH() { static int a[] = {1, 3, 1}; return ::LEX_DASHDASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_DOT opt_lex_dot::LEX_DOT() { static int a[] = {1, 0, 0}; return ::LEX_DOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_term lex_term::_lex_term() { static int a[] = {4, 0, 0, 1, 0, 2, 0, 3, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_lex_dot lex_term::opt_lex_dot() { static int a[] = {1, 0, 1}; return ::opt_lex_dot( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_rep lex_term::lex_factor_rep() { static int a[] = {5, 0, 2, 1, 2, 2, 2, 3, 2, 4, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_COLON_GT lex_term::LEX_COLON_GT() { static int a[] = {1, 1, 1}; return ::LEX_COLON_GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_COLON_GTGT lex_term::LEX_COLON_GTGT() { static int a[] = {1, 2, 1}; return ::LEX_COLON_GTGT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_LT_COLON lex_term::LEX_LT_COLON() { static int a[] = {1, 3, 1}; return ::LEX_LT_COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_rep lex_factor_rep::_lex_factor_rep() { static int a[] = {8, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_STAR lex_factor_rep::LEX_STAR() { static int a[] = {1, 0, 1}; return ::LEX_STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_STARSTAR lex_factor_rep::LEX_STARSTAR() { static int a[] = {1, 1, 1}; return ::LEX_STARSTAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_PLUS lex_factor_rep::LEX_PLUS() { static int a[] = {1, 2, 1}; return ::LEX_PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_QUESTION lex_factor_rep::LEX_QUESTION() { static int a[] = {1, 3, 1}; return ::LEX_QUESTION( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN lex_factor_rep::COPEN() { static int a[] = {4, 4, 1, 5, 1, 6, 1, 7, 1}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_uint lex_factor_rep::lex_uint() { static int a[] = {3, 4, 2, 5, 3, 6, 2}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE lex_factor_rep::CCLOSE() { static int a[] = {4, 4, 3, 5, 4, 6, 4, 7, 5}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COMMA lex_factor_rep::COMMA() { static int a[] = {3, 5, 2, 6, 3, 7, 3}; return ::COMMA( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_uint lex_factor_rep::Low() { static int a[] = {1, 7, 2}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_uint lex_factor_rep::High() { static int a[] = {1, 7, 4}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_neg lex_factor_rep::lex_factor_neg() { static int a[] = {1, 8, 0}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_CARET lex_factor_neg::LEX_CARET() { static int a[] = {1, 0, 0}; return ::LEX_CARET( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_neg lex_factor_neg::_lex_factor_neg() { static int a[] = {1, 0, 1}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor lex_factor_neg::lex_factor() { static int a[] = {1, 1, 0}; return ::lex_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_lit lex_range_lit::lex_lit() { static int a[] = {1, 0, 0}; return ::lex_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_num lex_range_lit::lex_num() { static int a[] = {1, 1, 0}; return ::lex_num( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_uint lex_num::lex_uint() { static int a[] = {1, 0, 0}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_hex lex_num::lex_hex() { static int a[] = {1, 1, 0}; return ::lex_hex( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_lit lex_factor::lex_lit() { static int a[] = {1, 0, 0}; return ::lex_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_id lex_factor::lex_id() { static int a[] = {1, 1, 0}; return ::lex_id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_uint lex_factor::lex_uint() { static int a[] = {1, 2, 0}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_hex lex_factor::lex_hex() { static int a[] = {1, 3, 0}; return ::lex_hex( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_range_lit lex_factor::Low() { static int a[] = {1, 4, 0}; return ::lex_range_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_DOTDOT lex_factor::LEX_DOTDOT() { static int a[] = {1, 4, 1}; return ::LEX_DOTDOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_range_lit lex_factor::High() { static int a[] = {1, 4, 2}; return ::lex_range_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_SQOPEN_POS lex_factor::LEX_SQOPEN_POS() { static int a[] = {1, 5, 0}; return ::LEX_SQOPEN_POS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::reg_or_data lex_factor::reg_or_data() { static int a[] = {2, 5, 1, 6, 1}; return ::reg_or_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RE_SQCLOSE lex_factor::RE_SQCLOSE() { static int a[] = {2, 5, 2, 6, 2}; return ::RE_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_SQOPEN_NEG lex_factor::LEX_SQOPEN_NEG() { static int a[] = {1, 6, 0}; return ::LEX_SQOPEN_NEG( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_POPEN lex_factor::LEX_POPEN() { static int a[] = {1, 7, 0}; return ::LEX_POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr lex_factor::lex_expr() { static int a[] = {1, 7, 1}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_PCLOSE lex_factor::LEX_PCLOSE() { static int a[] = {1, 7, 2}; return ::LEX_PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::reg_or_data reg_or_data::_reg_or_data() { static int a[] = {1, 0, 0}; return ::reg_or_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::reg_or_char reg_or_data::reg_or_char() { static int a[] = {1, 0, 1}; return ::reg_or_char( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RE_CHAR reg_or_char::RE_CHAR() { static int a[] = {1, 0, 0}; return ::RE_CHAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RE_CHAR reg_or_char::Low() { static int a[] = {1, 1, 0}; return ::RE_CHAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RE_DASH reg_or_char::RE_DASH() { static int a[] = {1, 1, 1}; return ::RE_DASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RE_CHAR reg_or_char::High() { static int a[] = {1, 1, 2}; return ::RE_CHAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::start __accum0::tree() { return ::start( __prg, colm_get_attr( __tree, 0) ); } +::str __accum0::error() { return ::str( __prg, colm_get_attr( __tree, 1) ); } +::_repeat_root_item _repeat_root_item:: next() { return ::_repeat_root_item( __prg, colm_get_repeat_next( __tree ) ); } +::root_item _repeat_root_item:: value() { return ::root_item( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_sq_cons_data _repeat_sq_cons_data:: next() { return ::_repeat_sq_cons_data( __prg, colm_get_repeat_next( __tree ) ); } +::sq_cons_data _repeat_sq_cons_data:: value() { return ::sq_cons_data( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_context_item _repeat_context_item:: next() { return ::_repeat_context_item( __prg, colm_get_repeat_next( __tree ) ); } +::context_item _repeat_context_item:: value() { return ::context_item( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_namespace_item _repeat_namespace_item:: next() { return ::_repeat_namespace_item( __prg, colm_get_repeat_next( __tree ) ); } +::namespace_item _repeat_namespace_item:: value() { return ::namespace_item( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_var_def _repeat_var_def:: next() { return ::_repeat_var_def( __prg, colm_get_repeat_next( __tree ) ); } +::var_def _repeat_var_def:: value() { return ::var_def( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_statement _repeat_statement:: next() { return ::_repeat_statement( __prg, colm_get_repeat_next( __tree ) ); } +::statement _repeat_statement:: value() { return ::statement( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_field_init _repeat_field_init:: next() { return ::_repeat_field_init( __prg, colm_get_repeat_next( __tree ) ); } +::field_init _repeat_field_init:: value() { return ::field_init( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_litpat_el _repeat_litpat_el:: next() { return ::_repeat_litpat_el( __prg, colm_get_repeat_next( __tree ) ); } +::litpat_el _repeat_litpat_el:: value() { return ::litpat_el( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_pattern_el _repeat_pattern_el:: next() { return ::_repeat_pattern_el( __prg, colm_get_repeat_next( __tree ) ); } +::pattern_el _repeat_pattern_el:: value() { return ::pattern_el( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_lit_cons_el _repeat_lit_cons_el:: next() { return ::_repeat_lit_cons_el( __prg, colm_get_repeat_next( __tree ) ); } +::lit_cons_el _repeat_lit_cons_el:: value() { return ::lit_cons_el( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_cons_el _repeat_cons_el:: next() { return ::_repeat_cons_el( __prg, colm_get_repeat_next( __tree ) ); } +::cons_el _repeat_cons_el:: value() { return ::cons_el( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_lit_accum_el _repeat_lit_accum_el:: next() { return ::_repeat_lit_accum_el( __prg, colm_get_repeat_next( __tree ) ); } +::lit_accum_el _repeat_lit_accum_el:: value() { return ::lit_accum_el( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_accum_el _repeat_accum_el:: next() { return ::_repeat_accum_el( __prg, colm_get_repeat_next( __tree ) ); } +::accum_el _repeat_accum_el:: value() { return ::accum_el( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_lit_string_el _repeat_lit_string_el:: next() { return ::_repeat_lit_string_el( __prg, colm_get_repeat_next( __tree ) ); } +::lit_string_el _repeat_lit_string_el:: value() { return ::lit_string_el( __prg, colm_get_repeat_val( __tree ) ); } +::_repeat_string_el _repeat_string_el:: next() { return ::_repeat_string_el( __prg, colm_get_repeat_next( __tree ) ); } +::string_el _repeat_string_el:: value() { return ::string_el( __prg, colm_get_repeat_val( __tree ) ); } +::str __list0::head() { return ::str( __prg, colm_get_attr( __tree, 0) ); } +::str __list0::tail() { return ::str( __prg, colm_get_attr( __tree, 1) ); } +::str __list0::top() { return ::str( __prg, colm_get_attr( __tree, 1) ); } +::_repeat_root_item _T_start::RootItemList() { static int a[] = {1, 0, 0}; return ::_repeat_root_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::rl_def _T_root_item::rl_def() { static int a[] = {1, 0, 0}; return ::rl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal_def _T_root_item::literal_def() { static int a[] = {1, 1, 0}; return ::literal_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::token_def _T_root_item::token_def() { static int a[] = {1, 2, 0}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ic_def _T_root_item::ic_def() { static int a[] = {1, 3, 0}; return ::ic_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ignore_def _T_root_item::ignore_def() { static int a[] = {1, 4, 0}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::cfl_def _T_root_item::cfl_def() { static int a[] = {1, 5, 0}; return ::cfl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_def _T_root_item::region_def() { static int a[] = {1, 6, 0}; return ::region_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::context_def _T_root_item::context_def() { static int a[] = {1, 7, 0}; return ::context_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::namespace_def _T_root_item::namespace_def() { static int a[] = {1, 8, 0}; return ::namespace_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::function_def _T_root_item::function_def() { static int a[] = {1, 9, 0}; return ::function_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::iter_def _T_root_item::iter_def() { static int a[] = {1, 10, 0}; return ::iter_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::statement _T_root_item::statement() { static int a[] = {1, 11, 0}; return ::statement( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::global_def _T_root_item::global_def() { static int a[] = {1, 12, 0}; return ::global_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::export_def _T_root_item::export_def() { static int a[] = {1, 13, 0}; return ::export_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pre_eof_def _T_root_item::pre_eof_def() { static int a[] = {1, 14, 0}; return ::pre_eof_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::precedence_def _T_root_item::precedence_def() { static int a[] = {1, 15, 0}; return ::precedence_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::alias_def _T_root_item::alias_def() { static int a[] = {1, 16, 0}; return ::alias_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::include _T_root_item::include() { static int a[] = {1, 17, 0}; return ::include( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::INCLUDE _T_include::INCLUDE() { static int a[] = {1, 0, 0}; return ::INCLUDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ _T_include::SQ() { static int a[] = {1, 0, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data _T_include::SqConsDataList() { static int a[] = {1, 0, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term _T_include::sq_lit_term() { static int a[] = {1, 0, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pred_type _T_precedence_def::pred_type() { static int a[] = {1, 0, 0}; return ::pred_type( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pred_token_list _T_precedence_def::pred_token_list() { static int a[] = {1, 0, 1}; return ::pred_token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEFT _T_pred_type::LEFT() { static int a[] = {1, 0, 0}; return ::LEFT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RIGHT _T_pred_type::RIGHT() { static int a[] = {1, 1, 0}; return ::RIGHT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NONASSOC _T_pred_type::NONASSOC() { static int a[] = {1, 2, 0}; return ::NONASSOC( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pred_token_list _T_pred_token_list::_pred_token_list() { static int a[] = {1, 0, 0}; return ::pred_token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COMMA _T_pred_token_list::COMMA() { static int a[] = {1, 0, 1}; return ::COMMA( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pred_token _T_pred_token_list::pred_token() { static int a[] = {2, 0, 2, 1, 0}; return ::pred_token( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_qual _T_pred_token::region_qual() { static int a[] = {2, 0, 0, 1, 0}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_pred_token::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::backtick_lit _T_pred_token::backtick_lit() { static int a[] = {1, 1, 1}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PREEOF _T_pre_eof_def::PREEOF() { static int a[] = {1, 0, 0}; return ::PREEOF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN _T_pre_eof_def::COPEN() { static int a[] = {1, 0, 1}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list _T_pre_eof_def::lang_stmt_list() { static int a[] = {1, 0, 2}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE _T_pre_eof_def::CCLOSE() { static int a[] = {1, 0, 3}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ALIAS _T_alias_def::ALIAS() { static int a[] = {1, 0, 0}; return ::ALIAS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_alias_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref _T_alias_def::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::context_var_def _T_context_item::context_var_def() { static int a[] = {1, 0, 0}; return ::context_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal_def _T_context_item::literal_def() { static int a[] = {1, 1, 0}; return ::literal_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::rl_def _T_context_item::rl_def() { static int a[] = {1, 2, 0}; return ::rl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::token_def _T_context_item::token_def() { static int a[] = {1, 3, 0}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ic_def _T_context_item::ic_def() { static int a[] = {1, 4, 0}; return ::ic_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ignore_def _T_context_item::ignore_def() { static int a[] = {1, 5, 0}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::cfl_def _T_context_item::cfl_def() { static int a[] = {1, 6, 0}; return ::cfl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_def _T_context_item::region_def() { static int a[] = {1, 7, 0}; return ::region_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::context_def _T_context_item::context_def() { static int a[] = {1, 8, 0}; return ::context_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::function_def _T_context_item::function_def() { static int a[] = {1, 9, 0}; return ::function_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::iter_def _T_context_item::iter_def() { static int a[] = {1, 10, 0}; return ::iter_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::export_def _T_context_item::export_def() { static int a[] = {1, 11, 0}; return ::export_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pre_eof_def _T_context_item::pre_eof_def() { static int a[] = {1, 12, 0}; return ::pre_eof_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::precedence_def _T_context_item::precedence_def() { static int a[] = {1, 13, 0}; return ::precedence_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::EXPORT _T_export_def::EXPORT() { static int a[] = {1, 0, 0}; return ::EXPORT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_def _T_export_def::var_def() { static int a[] = {1, 0, 1}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_def_init _T_export_def::opt_def_init() { static int a[] = {1, 0, 2}; return ::opt_def_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::GLOBAL _T_global_def::GLOBAL() { static int a[] = {1, 0, 0}; return ::GLOBAL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_def _T_global_def::var_def() { static int a[] = {1, 0, 1}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_def_init _T_global_def::opt_def_init() { static int a[] = {1, 0, 2}; return ::opt_def_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ITER _T_iter_def::ITER() { static int a[] = {1, 0, 0}; return ::ITER( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_iter_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::POPEN _T_iter_def::POPEN() { static int a[] = {1, 0, 2}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::param_var_def_list _T_iter_def::ParamVarDefList() { static int a[] = {1, 0, 3}; return ::param_var_def_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PCLOSE _T_iter_def::PCLOSE() { static int a[] = {1, 0, 4}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN _T_iter_def::COPEN() { static int a[] = {1, 0, 5}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list _T_iter_def::lang_stmt_list() { static int a[] = {1, 0, 6}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE _T_iter_def::CCLOSE() { static int a[] = {1, 0, 7}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::REF _T_reference_type_ref::REF() { static int a[] = {1, 0, 0}; return ::REF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LT _T_reference_type_ref::LT() { static int a[] = {1, 0, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref _T_reference_type_ref::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::GT _T_reference_type_ref::GT() { static int a[] = {1, 0, 3}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::param_var_def _T_param_var_def_list::param_var_def() { static int a[] = {1, 0, 0}; return ::param_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::param_var_def_list _T_param_var_def_list::_param_var_def_list() { static int a[] = {1, 0, 1}; return ::param_var_def_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_param_var_def::id() { static int a[] = {2, 0, 0, 1, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON _T_param_var_def::COLON() { static int a[] = {2, 0, 1, 1, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref _T_param_var_def::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::reference_type_ref _T_param_var_def::reference_type_ref() { static int a[] = {1, 1, 2}; return ::reference_type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::EXPORT _T_opt_export::EXPORT() { static int a[] = {1, 0, 0}; return ::EXPORT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_export _T_function_def::opt_export() { static int a[] = {1, 0, 0}; return ::opt_export( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref _T_function_def::type_ref() { static int a[] = {1, 0, 1}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_function_def::id() { static int a[] = {1, 0, 2}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::POPEN _T_function_def::POPEN() { static int a[] = {1, 0, 3}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::param_var_def_list _T_function_def::ParamVarDefList() { static int a[] = {1, 0, 4}; return ::param_var_def_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PCLOSE _T_function_def::PCLOSE() { static int a[] = {1, 0, 5}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN _T_function_def::COPEN() { static int a[] = {1, 0, 6}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list _T_function_def::lang_stmt_list() { static int a[] = {1, 0, 7}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE _T_function_def::CCLOSE() { static int a[] = {1, 0, 8}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_def _T_context_var_def::var_def() { static int a[] = {1, 0, 0}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONTEXT _T_context_def::CONTEXT() { static int a[] = {1, 0, 0}; return ::CONTEXT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_context_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_context_item _T_context_def::ContextItemList() { static int a[] = {1, 0, 2}; return ::_repeat_context_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::END _T_context_def::END() { static int a[] = {1, 0, 3}; return ::END( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LITERAL _T_literal_def::LITERAL() { static int a[] = {1, 0, 0}; return ::LITERAL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal_list _T_literal_def::literal_list() { static int a[] = {1, 0, 1}; return ::literal_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal_list _T_literal_list::_literal_list() { static int a[] = {1, 0, 0}; return ::literal_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal_item _T_literal_list::literal_item() { static int a[] = {2, 0, 1, 1, 0}; return ::literal_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::no_ignore_left _T_literal_item::no_ignore_left() { static int a[] = {1, 0, 0}; return ::no_ignore_left( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::backtick_lit _T_literal_item::backtick_lit() { static int a[] = {1, 0, 1}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::no_ignore_right _T_literal_item::no_ignore_right() { static int a[] = {1, 0, 2}; return ::no_ignore_right( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NI _T_no_ignore_left::NI() { static int a[] = {1, 0, 0}; return ::NI( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MINUS _T_no_ignore_left::MINUS() { static int a[] = {1, 0, 1}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MINUS _T_no_ignore_right::MINUS() { static int a[] = {1, 0, 0}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NI _T_no_ignore_right::NI() { static int a[] = {1, 0, 1}; return ::NI( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NAMESPACE _T_namespace_def::NAMESPACE() { static int a[] = {1, 0, 0}; return ::NAMESPACE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_namespace_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_namespace_item _T_namespace_def::ItemList() { static int a[] = {1, 0, 2}; return ::_repeat_namespace_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::END _T_namespace_def::END() { static int a[] = {1, 0, 3}; return ::END( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::rl_def _T_namespace_item::rl_def() { static int a[] = {1, 0, 0}; return ::rl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::literal_def _T_namespace_item::literal_def() { static int a[] = {1, 1, 0}; return ::literal_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::token_def _T_namespace_item::token_def() { static int a[] = {1, 2, 0}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ic_def _T_namespace_item::ic_def() { static int a[] = {1, 3, 0}; return ::ic_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ignore_def _T_namespace_item::ignore_def() { static int a[] = {1, 4, 0}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::cfl_def _T_namespace_item::cfl_def() { static int a[] = {1, 5, 0}; return ::cfl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_def _T_namespace_item::region_def() { static int a[] = {1, 6, 0}; return ::region_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::context_def _T_namespace_item::context_def() { static int a[] = {1, 7, 0}; return ::context_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::namespace_def _T_namespace_item::namespace_def() { static int a[] = {1, 8, 0}; return ::namespace_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::function_def _T_namespace_item::function_def() { static int a[] = {1, 9, 0}; return ::function_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::iter_def _T_namespace_item::iter_def() { static int a[] = {1, 10, 0}; return ::iter_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pre_eof_def _T_namespace_item::pre_eof_def() { static int a[] = {1, 11, 0}; return ::pre_eof_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::precedence_def _T_namespace_item::precedence_def() { static int a[] = {1, 12, 0}; return ::precedence_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::alias_def _T_namespace_item::alias_def() { static int a[] = {1, 13, 0}; return ::alias_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::include _T_namespace_item::include() { static int a[] = {1, 14, 0}; return ::include( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::REDUCEFIRST _T_opt_reduce_first::REDUCEFIRST() { static int a[] = {1, 0, 0}; return ::REDUCEFIRST( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DEF _T_cfl_def::DEF() { static int a[] = {1, 0, 0}; return ::DEF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_cfl_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_var_def _T_cfl_def::VarDefList() { static int a[] = {1, 0, 2}; return ::_repeat_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_reduce_first _T_cfl_def::opt_reduce_first() { static int a[] = {1, 0, 3}; return ::opt_reduce_first( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_list _T_cfl_def::prod_list() { static int a[] = {1, 0, 4}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX _T_region_def::LEX() { static int a[] = {1, 0, 0}; return ::LEX( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_root_item _T_region_def::RootItemList() { static int a[] = {1, 0, 1}; return ::_repeat_root_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::END _T_region_def::END() { static int a[] = {1, 0, 2}; return ::END( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RL _T_rl_def::RL() { static int a[] = {1, 0, 0}; return ::RL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_rl_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_FSLASH _T_rl_def::LEX_FSLASH() { static int a[] = {2, 0, 2, 0, 4}; return ::LEX_FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr _T_rl_def::lex_expr() { static int a[] = {1, 0, 3}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr _T_opt_lex_expr::lex_expr() { static int a[] = {1, 0, 0}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TOKEN _T_token_def::TOKEN() { static int a[] = {1, 0, 0}; return ::TOKEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_token_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_var_def _T_token_def::VarDefList() { static int a[] = {1, 0, 2}; return ::_repeat_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::no_ignore_left _T_token_def::no_ignore_left() { static int a[] = {1, 0, 3}; return ::no_ignore_left( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_FSLASH _T_token_def::LEX_FSLASH() { static int a[] = {2, 0, 4, 0, 6}; return ::LEX_FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_lex_expr _T_token_def::opt_lex_expr() { static int a[] = {1, 0, 5}; return ::opt_lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::no_ignore_right _T_token_def::no_ignore_right() { static int a[] = {1, 0, 7}; return ::no_ignore_right( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_translate _T_token_def::opt_translate() { static int a[] = {1, 0, 8}; return ::opt_translate( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TOKEN _T_ic_def::TOKEN() { static int a[] = {1, 0, 0}; return ::TOKEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_ic_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MINUS _T_ic_def::MINUS() { static int a[] = {1, 0, 2}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN _T_opt_translate::COPEN() { static int a[] = {1, 0, 0}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list _T_opt_translate::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE _T_opt_translate::CCLOSE() { static int a[] = {1, 0, 2}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_opt_id::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::IGNORE _T_ignore_def::IGNORE() { static int a[] = {1, 0, 0}; return ::IGNORE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_id _T_ignore_def::opt_id() { static int a[] = {1, 0, 1}; return ::opt_id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_FSLASH _T_ignore_def::LEX_FSLASH() { static int a[] = {2, 0, 2, 0, 4}; return ::LEX_FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_lex_expr _T_ignore_def::opt_lex_expr() { static int a[] = {1, 0, 3}; return ::opt_lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_prod_el_name _T_prod_el::opt_prod_el_name() { static int a[] = {2, 0, 0, 1, 0}; return ::opt_prod_el_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_qual _T_prod_el::region_qual() { static int a[] = {2, 0, 1, 1, 1}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_prod_el::id() { static int a[] = {1, 0, 2}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_repeat _T_prod_el::opt_repeat() { static int a[] = {2, 0, 3, 1, 3}; return ::opt_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::backtick_lit _T_prod_el::backtick_lit() { static int a[] = {1, 1, 2}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_opt_prod_el_name::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON _T_opt_prod_el_name::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_el_list _T_prod_el_list::_prod_el_list() { static int a[] = {1, 0, 0}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_el _T_prod_el_list::prod_el() { static int a[] = {1, 0, 1}; return ::prod_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COMMIT _T_opt_commit::COMMIT() { static int a[] = {1, 0, 0}; return ::COMMIT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON _T_opt_prod_name::COLON() { static int a[] = {1, 0, 0}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_opt_prod_name::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQOPEN _T_prod::SQOPEN() { static int a[] = {1, 0, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_el_list _T_prod::prod_el_list() { static int a[] = {1, 0, 1}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQCLOSE _T_prod::SQCLOSE() { static int a[] = {1, 0, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_prod_name _T_prod::opt_prod_name() { static int a[] = {1, 0, 3}; return ::opt_prod_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_commit _T_prod::opt_commit() { static int a[] = {1, 0, 4}; return ::opt_commit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_reduce _T_prod::opt_reduce() { static int a[] = {1, 0, 5}; return ::opt_reduce( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN _T_opt_reduce::COPEN() { static int a[] = {1, 0, 0}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list _T_opt_reduce::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE _T_opt_reduce::CCLOSE() { static int a[] = {1, 0, 2}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod_list _T_prod_list::_prod_list() { static int a[] = {1, 0, 0}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::BAR _T_prod_list::BAR() { static int a[] = {1, 0, 1}; return ::BAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::prod _T_prod_list::prod() { static int a[] = {2, 0, 2, 1, 0}; return ::prod( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::print_stmt _T_statement::print_stmt() { static int a[] = {1, 0, 0}; return ::print_stmt( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::expr_stmt _T_statement::expr_stmt() { static int a[] = {1, 1, 0}; return ::expr_stmt( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_def _T_statement::var_def() { static int a[] = {1, 2, 0}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_def_init _T_statement::opt_def_init() { static int a[] = {1, 2, 1}; return ::opt_def_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::FOR _T_statement::FOR() { static int a[] = {1, 3, 0}; return ::FOR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_statement::id() { static int a[] = {1, 3, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON _T_statement::COLON() { static int a[] = {1, 3, 2}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref _T_statement::type_ref() { static int a[] = {1, 3, 3}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::IN _T_statement::IN() { static int a[] = {1, 3, 4}; return ::IN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::iter_call _T_statement::iter_call() { static int a[] = {1, 3, 5}; return ::iter_call( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::block_or_single _T_statement::block_or_single() { static int a[] = {3, 3, 6, 4, 2, 5, 2}; return ::block_or_single( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::IF _T_statement::IF() { static int a[] = {1, 4, 0}; return ::IF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr _T_statement::code_expr() { static int a[] = {4, 4, 1, 5, 1, 6, 2, 8, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::elsif_list _T_statement::elsif_list() { static int a[] = {1, 4, 3}; return ::elsif_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::WHILE _T_statement::WHILE() { static int a[] = {1, 5, 0}; return ::WHILE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_ref _T_statement::var_ref() { static int a[] = {2, 6, 0, 7, 1}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::EQUALS _T_statement::EQUALS() { static int a[] = {1, 6, 1}; return ::EQUALS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::YIELD _T_statement::YIELD() { static int a[] = {1, 7, 0}; return ::YIELD( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RETURN _T_statement::RETURN() { static int a[] = {1, 8, 0}; return ::RETURN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::BREAK _T_statement::BREAK() { static int a[] = {1, 9, 0}; return ::BREAK( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::REJECT _T_statement::REJECT() { static int a[] = {1, 10, 0}; return ::REJECT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::elsif_clause _T_elsif_list::elsif_clause() { static int a[] = {1, 0, 0}; return ::elsif_clause( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::elsif_list _T_elsif_list::_elsif_list() { static int a[] = {1, 0, 1}; return ::elsif_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::optional_else _T_elsif_list::optional_else() { static int a[] = {1, 1, 0}; return ::optional_else( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ELSIF _T_elsif_clause::ELSIF() { static int a[] = {1, 0, 0}; return ::ELSIF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr _T_elsif_clause::code_expr() { static int a[] = {1, 0, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::block_or_single _T_elsif_clause::block_or_single() { static int a[] = {1, 0, 2}; return ::block_or_single( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ELSE _T_optional_else::ELSE() { static int a[] = {1, 0, 0}; return ::ELSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::block_or_single _T_optional_else::block_or_single() { static int a[] = {1, 0, 1}; return ::block_or_single( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr _T_call_arg_list::code_expr() { static int a[] = {1, 0, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::call_arg_list _T_call_arg_list::_call_arg_list() { static int a[] = {1, 0, 1}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E1 _T_iter_call::E1() { static int a[] = {1, 0, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_ref _T_iter_call::var_ref() { static int a[] = {1, 0, 1}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::POPEN _T_iter_call::POPEN() { static int a[] = {1, 0, 2}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::call_arg_list _T_iter_call::call_arg_list() { static int a[] = {1, 0, 3}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PCLOSE _T_iter_call::PCLOSE() { static int a[] = {1, 0, 4}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E2 _T_iter_call::E2() { static int a[] = {1, 1, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_iter_call::id() { static int a[] = {1, 1, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E3 _T_iter_call::E3() { static int a[] = {1, 2, 0}; return ::E3( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr _T_iter_call::code_expr() { static int a[] = {1, 2, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN _T_block_or_single::COPEN() { static int a[] = {1, 0, 0}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list _T_block_or_single::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE _T_block_or_single::CCLOSE() { static int a[] = {1, 0, 2}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::statement _T_block_or_single::statement() { static int a[] = {1, 1, 0}; return ::statement( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::REQUIRE _T_require_pattern::REQUIRE() { static int a[] = {1, 0, 0}; return ::REQUIRE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_ref _T_require_pattern::var_ref() { static int a[] = {1, 0, 1}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pattern _T_require_pattern::pattern() { static int a[] = {1, 0, 2}; return ::pattern( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::require_pattern _T_opt_require_stmt::require_pattern() { static int a[] = {1, 0, 0}; return ::require_pattern( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lang_stmt_list _T_opt_require_stmt::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_statement _T_lang_stmt_list::StmtList() { static int a[] = {1, 0, 0}; return ::_repeat_statement( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_require_stmt _T_lang_stmt_list::opt_require_stmt() { static int a[] = {1, 0, 1}; return ::opt_require_stmt( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::EQUALS _T_opt_def_init::EQUALS() { static int a[] = {1, 0, 0}; return ::EQUALS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr _T_opt_def_init::code_expr() { static int a[] = {1, 0, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_var_def::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON _T_var_def::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref _T_var_def::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PRINT _T_print_stmt::PRINT() { static int a[] = {1, 0, 0}; return ::PRINT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::POPEN _T_print_stmt::POPEN() { static int a[] = {4, 0, 1, 1, 1, 2, 1, 3, 1}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::call_arg_list _T_print_stmt::call_arg_list() { static int a[] = {4, 0, 2, 1, 2, 2, 2, 3, 2}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PCLOSE _T_print_stmt::PCLOSE() { static int a[] = {4, 0, 3, 1, 3, 2, 3, 3, 3}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PRINTS _T_print_stmt::PRINTS() { static int a[] = {1, 1, 0}; return ::PRINTS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PRINT_XML _T_print_stmt::PRINT_XML() { static int a[] = {1, 2, 0}; return ::PRINT_XML( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PRINT_XML_AC _T_print_stmt::PRINT_XML_AC() { static int a[] = {1, 3, 0}; return ::PRINT_XML_AC( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr _T_expr_stmt::code_expr() { static int a[] = {1, 0, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr _T_code_expr::_code_expr() { static int a[] = {2, 0, 0, 1, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::AMPAMP _T_code_expr::AMPAMP() { static int a[] = {1, 0, 1}; return ::AMPAMP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_relational _T_code_expr::code_relational() { static int a[] = {3, 0, 2, 1, 2, 2, 0}; return ::code_relational( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::BARBAR _T_code_expr::BARBAR() { static int a[] = {1, 1, 1}; return ::BARBAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_relational _T_code_relational::_code_relational() { static int a[] = {6, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0}; return ::code_relational( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::EQEQ _T_code_relational::EQEQ() { static int a[] = {1, 0, 1}; return ::EQEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_additive _T_code_relational::code_additive() { static int a[] = {7, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 0}; return ::code_additive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NEQ _T_code_relational::NEQ() { static int a[] = {1, 1, 1}; return ::NEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LT _T_code_relational::LT() { static int a[] = {1, 2, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::GT _T_code_relational::GT() { static int a[] = {1, 3, 1}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LTEQ _T_code_relational::LTEQ() { static int a[] = {1, 4, 1}; return ::LTEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::GTEQ _T_code_relational::GTEQ() { static int a[] = {1, 5, 1}; return ::GTEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_additive _T_code_additive::_code_additive() { static int a[] = {2, 0, 0, 1, 0}; return ::code_additive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PLUS _T_code_additive::PLUS() { static int a[] = {1, 0, 1}; return ::PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_multiplicitive _T_code_additive::code_multiplicitive() { static int a[] = {3, 0, 2, 1, 2, 2, 0}; return ::code_multiplicitive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MINUS _T_code_additive::MINUS() { static int a[] = {1, 1, 1}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_multiplicitive _T_code_multiplicitive::_code_multiplicitive() { static int a[] = {2, 0, 0, 1, 0}; return ::code_multiplicitive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::STAR _T_code_multiplicitive::STAR() { static int a[] = {1, 0, 1}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_unary _T_code_multiplicitive::code_unary() { static int a[] = {3, 0, 2, 1, 2, 2, 0}; return ::code_unary( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::FSLASH _T_code_multiplicitive::FSLASH() { static int a[] = {1, 1, 1}; return ::FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::BANG _T_code_unary::BANG() { static int a[] = {1, 0, 0}; return ::BANG( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_factor _T_code_unary::code_factor() { static int a[] = {5, 0, 1, 1, 1, 2, 1, 3, 1, 4, 0}; return ::code_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DOLLAR _T_code_unary::DOLLAR() { static int a[] = {1, 1, 0}; return ::DOLLAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CARET _T_code_unary::CARET() { static int a[] = {1, 2, 0}; return ::CARET( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PERCENT _T_code_unary::PERCENT() { static int a[] = {1, 3, 0}; return ::PERCENT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DOT _T_opt_eos::DOT() { static int a[] = {1, 0, 0}; return ::DOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::EOS _T_opt_eos::EOS() { static int a[] = {1, 1, 0}; return ::EOS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::number _T_code_factor::number() { static int a[] = {1, 0, 0}; return ::number( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::var_ref _T_code_factor::var_ref() { static int a[] = {5, 1, 0, 2, 0, 7, 1, 11, 1, 13, 2}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::POPEN _T_code_factor::POPEN() { static int a[] = {4, 1, 1, 6, 0, 14, 1, 15, 1}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::call_arg_list _T_code_factor::call_arg_list() { static int a[] = {3, 1, 2, 14, 2, 15, 2}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PCLOSE _T_code_factor::PCLOSE() { static int a[] = {4, 1, 3, 6, 2, 14, 3, 15, 3}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NIL _T_code_factor::NIL() { static int a[] = {1, 3, 0}; return ::NIL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TRUE _T_code_factor::TRUE() { static int a[] = {1, 4, 0}; return ::TRUE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::FALSE _T_code_factor::FALSE() { static int a[] = {1, 5, 0}; return ::FALSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr _T_code_factor::code_expr() { static int a[] = {1, 6, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SEND _T_code_factor::SEND() { static int a[] = {1, 7, 0}; return ::SEND( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::accumulate _T_code_factor::accumulate() { static int a[] = {3, 7, 2, 8, 4, 9, 4}; return ::accumulate( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_eos _T_code_factor::opt_eos() { static int a[] = {1, 7, 3}; return ::opt_eos( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PARSE _T_code_factor::PARSE() { static int a[] = {1, 8, 0}; return ::PARSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_capture _T_code_factor::opt_capture() { static int a[] = {3, 8, 1, 9, 1, 10, 1}; return ::opt_capture( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref _T_code_factor::type_ref() { static int a[] = {6, 8, 2, 9, 2, 10, 2, 13, 0, 16, 2, 18, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_field_init _T_code_factor::opt_field_init() { static int a[] = {3, 8, 3, 9, 3, 10, 3}; return ::opt_field_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PARSE_STOP _T_code_factor::PARSE_STOP() { static int a[] = {1, 9, 0}; return ::PARSE_STOP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS _T_code_factor::CONS() { static int a[] = {1, 10, 0}; return ::CONS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::constructor _T_code_factor::constructor() { static int a[] = {1, 10, 4}; return ::constructor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MATCH _T_code_factor::MATCH() { static int a[] = {1, 11, 0}; return ::MATCH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pattern _T_code_factor::pattern() { static int a[] = {1, 11, 2}; return ::pattern( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::string _T_code_factor::string() { static int a[] = {1, 12, 0}; return ::string( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::IN _T_code_factor::IN() { static int a[] = {1, 13, 1}; return ::IN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MAKE_TREE _T_code_factor::MAKE_TREE() { static int a[] = {1, 14, 0}; return ::MAKE_TREE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MAKE_TOKEN _T_code_factor::MAKE_TOKEN() { static int a[] = {1, 15, 0}; return ::MAKE_TOKEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TYPEID _T_code_factor::TYPEID() { static int a[] = {1, 16, 0}; return ::TYPEID( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LT _T_code_factor::LT() { static int a[] = {2, 16, 1, 18, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::GT _T_code_factor::GT() { static int a[] = {2, 16, 3, 18, 3}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::NEW _T_code_factor::NEW() { static int a[] = {1, 17, 0}; return ::NEW( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_factor _T_code_factor::_code_factor() { static int a[] = {2, 17, 1, 18, 4}; return ::code_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CAST _T_code_factor::CAST() { static int a[] = {1, 18, 0}; return ::CAST( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_qual _T_type_ref::region_qual() { static int a[] = {2, 0, 0, 1, 2}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_type_ref::id() { static int a[] = {2, 0, 1, 1, 3}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_repeat _T_type_ref::opt_repeat() { static int a[] = {2, 0, 2, 1, 4}; return ::opt_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PTR _T_type_ref::PTR() { static int a[] = {1, 1, 0}; return ::PTR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LT _T_type_ref::LT() { static int a[] = {5, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::GT _T_type_ref::GT() { static int a[] = {5, 1, 5, 2, 4, 3, 3, 4, 3, 5, 3}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::MAP _T_type_ref::MAP() { static int a[] = {1, 2, 0}; return ::MAP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref _T_type_ref::MapKeyType() { static int a[] = {1, 2, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref _T_type_ref::MapValueType() { static int a[] = {1, 2, 3}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LIST _T_type_ref::LIST() { static int a[] = {1, 3, 0}; return ::LIST( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::type_ref _T_type_ref::_type_ref() { static int a[] = {3, 3, 2, 4, 2, 5, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::VECTOR _T_type_ref::VECTOR() { static int a[] = {1, 4, 0}; return ::VECTOR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PARSER _T_type_ref::PARSER() { static int a[] = {1, 5, 0}; return ::PARSER( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_qual _T_region_qual::_region_qual() { static int a[] = {1, 0, 0}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_region_qual::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DOUBLE_COLON _T_region_qual::DOUBLE_COLON() { static int a[] = {1, 0, 2}; return ::DOUBLE_COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::STAR _T_opt_repeat::STAR() { static int a[] = {1, 0, 0}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PLUS _T_opt_repeat::PLUS() { static int a[] = {1, 1, 0}; return ::PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::QUESTION _T_opt_repeat::QUESTION() { static int a[] = {1, 2, 0}; return ::QUESTION( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_opt_capture::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON _T_opt_capture::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::POPEN _T_opt_field_init::POPEN() { static int a[] = {1, 0, 0}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_field_init _T_opt_field_init::FieldInitList() { static int a[] = {1, 0, 1}; return ::_repeat_field_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::PCLOSE _T_opt_field_init::PCLOSE() { static int a[] = {1, 0, 2}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr _T_field_init::code_expr() { static int a[] = {1, 0, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_opt_label::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COLON _T_opt_label::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_DQ _T_dq_lit_term::CONS_DQ() { static int a[] = {1, 0, 0}; return ::CONS_DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_DQ_NL _T_dq_lit_term::CONS_DQ_NL() { static int a[] = {1, 1, 0}; return ::CONS_DQ_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQ _T_sq_lit_term::CONS_SQ() { static int a[] = {1, 0, 0}; return ::CONS_SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQ_NL _T_sq_lit_term::CONS_SQ_NL() { static int a[] = {1, 1, 0}; return ::CONS_SQ_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::tilde_data _T_opt_tilde_data::tilde_data() { static int a[] = {1, 0, 0}; return ::tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_qual _T_pattern_el_lel::region_qual() { static int a[] = {2, 0, 0, 1, 0}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_pattern_el_lel::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_repeat _T_pattern_el_lel::opt_repeat() { static int a[] = {2, 0, 2, 1, 2}; return ::opt_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::backtick_lit _T_pattern_el_lel::backtick_lit() { static int a[] = {1, 1, 1}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_label _T_pattern_el::opt_label() { static int a[] = {1, 0, 0}; return ::opt_label( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pattern_el_lel _T_pattern_el::pattern_el_lel() { static int a[] = {1, 0, 1}; return ::pattern_el_lel( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ _T_pattern_el::DQ() { static int a[] = {1, 1, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_litpat_el _T_pattern_el::LitpatElList() { static int a[] = {1, 1, 1}; return ::_repeat_litpat_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term _T_pattern_el::dq_lit_term() { static int a[] = {1, 1, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ _T_pattern_el::SQ() { static int a[] = {1, 2, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data _T_pattern_el::SqConsDataList() { static int a[] = {1, 2, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term _T_pattern_el::sq_lit_term() { static int a[] = {1, 2, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE _T_pattern_el::TILDE() { static int a[] = {1, 3, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data _T_pattern_el::opt_tilde_data() { static int a[] = {1, 3, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL _T_pattern_el::TILDE_NL() { static int a[] = {1, 3, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_cons_data _T_litpat_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQOPEN _T_litpat_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_pattern_el _T_litpat_el::PatternElList() { static int a[] = {1, 1, 1}; return ::_repeat_pattern_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQCLOSE _T_litpat_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ _T_pattern_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_litpat_el _T_pattern_top_el::LitpatElList() { static int a[] = {1, 0, 1}; return ::_repeat_litpat_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term _T_pattern_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ _T_pattern_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data _T_pattern_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term _T_pattern_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE _T_pattern_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data _T_pattern_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL _T_pattern_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQOPEN _T_pattern_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_pattern_el _T_pattern_top_el::PatternElList() { static int a[] = {1, 3, 1}; return ::_repeat_pattern_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQCLOSE _T_pattern_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pattern_list _T_pattern_list::_pattern_list() { static int a[] = {1, 0, 0}; return ::pattern_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pattern_top_el _T_pattern_list::pattern_top_el() { static int a[] = {2, 0, 1, 1, 0}; return ::pattern_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::pattern_list _T_pattern::pattern_list() { static int a[] = {1, 0, 0}; return ::pattern_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E1 _T_cons_el::E1() { static int a[] = {4, 0, 0, 1, 0, 2, 0, 3, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::region_qual _T_cons_el::region_qual() { static int a[] = {1, 0, 1}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::backtick_lit _T_cons_el::backtick_lit() { static int a[] = {1, 0, 2}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ _T_cons_el::DQ() { static int a[] = {1, 1, 1}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_lit_cons_el _T_cons_el::LitConsElList() { static int a[] = {1, 1, 2}; return ::_repeat_lit_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term _T_cons_el::dq_lit_term() { static int a[] = {1, 1, 3}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ _T_cons_el::SQ() { static int a[] = {1, 2, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data _T_cons_el::SqConsDataList() { static int a[] = {1, 2, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term _T_cons_el::sq_lit_term() { static int a[] = {1, 2, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE _T_cons_el::TILDE() { static int a[] = {1, 3, 1}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data _T_cons_el::opt_tilde_data() { static int a[] = {1, 3, 2}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL _T_cons_el::TILDE_NL() { static int a[] = {1, 3, 3}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E2 _T_cons_el::E2() { static int a[] = {1, 4, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr _T_cons_el::code_expr() { static int a[] = {1, 4, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_cons_data _T_lit_cons_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQOPEN _T_lit_cons_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_cons_el _T_lit_cons_el::ConsElList() { static int a[] = {1, 1, 1}; return ::_repeat_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQCLOSE _T_lit_cons_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ _T_cons_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_lit_cons_el _T_cons_top_el::LitConsElList() { static int a[] = {1, 0, 1}; return ::_repeat_lit_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term _T_cons_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ _T_cons_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data _T_cons_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term _T_cons_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE _T_cons_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data _T_cons_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL _T_cons_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQOPEN _T_cons_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_cons_el _T_cons_top_el::ConsElList() { static int a[] = {1, 3, 1}; return ::_repeat_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQCLOSE _T_cons_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::cons_top_el _T_cons_list::cons_top_el() { static int a[] = {2, 0, 0, 1, 0}; return ::cons_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::cons_list _T_cons_list::_cons_list() { static int a[] = {1, 0, 1}; return ::cons_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::cons_list _T_constructor::cons_list() { static int a[] = {1, 0, 0}; return ::cons_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E1 _T_accum_el::E1() { static int a[] = {3, 0, 0, 1, 0, 2, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ _T_accum_el::DQ() { static int a[] = {1, 0, 1}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_lit_accum_el _T_accum_el::LitAccumElList() { static int a[] = {1, 0, 2}; return ::_repeat_lit_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term _T_accum_el::dq_lit_term() { static int a[] = {1, 0, 3}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ _T_accum_el::SQ() { static int a[] = {1, 1, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data _T_accum_el::SqConsDataList() { static int a[] = {1, 1, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term _T_accum_el::sq_lit_term() { static int a[] = {1, 1, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE _T_accum_el::TILDE() { static int a[] = {1, 2, 1}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data _T_accum_el::opt_tilde_data() { static int a[] = {1, 2, 2}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL _T_accum_el::TILDE_NL() { static int a[] = {1, 2, 3}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E2 _T_accum_el::E2() { static int a[] = {1, 3, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr _T_accum_el::code_expr() { static int a[] = {1, 3, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_cons_data _T_lit_accum_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQOPEN _T_lit_accum_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_accum_el _T_lit_accum_el::AccumElList() { static int a[] = {1, 1, 1}; return ::_repeat_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQCLOSE _T_lit_accum_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ _T_accum_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_lit_accum_el _T_accum_top_el::LitAccumElList() { static int a[] = {1, 0, 1}; return ::_repeat_lit_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term _T_accum_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ _T_accum_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data _T_accum_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term _T_accum_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE _T_accum_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data _T_accum_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL _T_accum_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQOPEN _T_accum_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_accum_el _T_accum_top_el::AccumElList() { static int a[] = {1, 3, 1}; return ::_repeat_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQCLOSE _T_accum_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::accum_top_el _T_accum_list::accum_top_el() { static int a[] = {2, 0, 0, 1, 0}; return ::accum_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::accum_list _T_accum_list::_accum_list() { static int a[] = {1, 0, 1}; return ::accum_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::accum_list _T_accumulate::accum_list() { static int a[] = {1, 0, 0}; return ::accum_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E1 _T_string_el::E1() { static int a[] = {3, 0, 0, 1, 0, 2, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ _T_string_el::DQ() { static int a[] = {1, 0, 1}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_lit_string_el _T_string_el::LitStringElList() { static int a[] = {1, 0, 2}; return ::_repeat_lit_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term _T_string_el::dq_lit_term() { static int a[] = {1, 0, 3}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ _T_string_el::SQ() { static int a[] = {1, 1, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data _T_string_el::SqConsDataList() { static int a[] = {1, 1, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term _T_string_el::sq_lit_term() { static int a[] = {1, 1, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE _T_string_el::TILDE() { static int a[] = {1, 2, 1}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data _T_string_el::opt_tilde_data() { static int a[] = {1, 2, 2}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL _T_string_el::TILDE_NL() { static int a[] = {1, 2, 3}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::E2 _T_string_el::E2() { static int a[] = {1, 3, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::code_expr _T_string_el::code_expr() { static int a[] = {1, 3, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_cons_data _T_lit_string_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQOPEN _T_lit_string_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_string_el _T_lit_string_el::StringElList() { static int a[] = {1, 1, 1}; return ::_repeat_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CONS_SQCLOSE _T_lit_string_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DQ _T_string_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_lit_string_el _T_string_top_el::LitStringElList() { static int a[] = {1, 0, 1}; return ::_repeat_lit_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::dq_lit_term _T_string_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQ _T_string_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_sq_cons_data _T_string_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::sq_lit_term _T_string_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE _T_string_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_tilde_data _T_string_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::TILDE_NL _T_string_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQOPEN _T_string_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::_repeat_string_el _T_string_top_el::StringElList() { static int a[] = {1, 3, 1}; return ::_repeat_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::SQCLOSE _T_string_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::string_top_el _T_string_list::string_top_el() { static int a[] = {2, 0, 0, 1, 0}; return ::string_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::string_list _T_string_list::_string_list() { static int a[] = {1, 0, 1}; return ::string_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::string_list _T_string::string_list() { static int a[] = {1, 0, 0}; return ::string_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::qual _T_var_ref::qual() { static int a[] = {1, 0, 0}; return ::qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_var_ref::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::qual _T_qual::_qual() { static int a[] = {2, 0, 0, 1, 0}; return ::qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::id _T_qual::id() { static int a[] = {2, 0, 1, 1, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::DOT _T_qual::DOT() { static int a[] = {1, 0, 2}; return ::DOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::ARROW _T_qual::ARROW() { static int a[] = {1, 1, 2}; return ::ARROW( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr _T_lex_expr::_lex_expr() { static int a[] = {4, 0, 0, 1, 0, 2, 0, 3, 0}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_BAR _T_lex_expr::LEX_BAR() { static int a[] = {1, 0, 1}; return ::LEX_BAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_term _T_lex_expr::lex_term() { static int a[] = {5, 0, 2, 1, 2, 2, 2, 3, 2, 4, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_AMP _T_lex_expr::LEX_AMP() { static int a[] = {1, 1, 1}; return ::LEX_AMP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_DASH _T_lex_expr::LEX_DASH() { static int a[] = {1, 2, 1}; return ::LEX_DASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_DASHDASH _T_lex_expr::LEX_DASHDASH() { static int a[] = {1, 3, 1}; return ::LEX_DASHDASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_DOT _T_opt_lex_dot::LEX_DOT() { static int a[] = {1, 0, 0}; return ::LEX_DOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_term _T_lex_term::_lex_term() { static int a[] = {4, 0, 0, 1, 0, 2, 0, 3, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::opt_lex_dot _T_lex_term::opt_lex_dot() { static int a[] = {1, 0, 1}; return ::opt_lex_dot( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_rep _T_lex_term::lex_factor_rep() { static int a[] = {5, 0, 2, 1, 2, 2, 2, 3, 2, 4, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_COLON_GT _T_lex_term::LEX_COLON_GT() { static int a[] = {1, 1, 1}; return ::LEX_COLON_GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_COLON_GTGT _T_lex_term::LEX_COLON_GTGT() { static int a[] = {1, 2, 1}; return ::LEX_COLON_GTGT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_LT_COLON _T_lex_term::LEX_LT_COLON() { static int a[] = {1, 3, 1}; return ::LEX_LT_COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_rep _T_lex_factor_rep::_lex_factor_rep() { static int a[] = {8, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_STAR _T_lex_factor_rep::LEX_STAR() { static int a[] = {1, 0, 1}; return ::LEX_STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_STARSTAR _T_lex_factor_rep::LEX_STARSTAR() { static int a[] = {1, 1, 1}; return ::LEX_STARSTAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_PLUS _T_lex_factor_rep::LEX_PLUS() { static int a[] = {1, 2, 1}; return ::LEX_PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_QUESTION _T_lex_factor_rep::LEX_QUESTION() { static int a[] = {1, 3, 1}; return ::LEX_QUESTION( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COPEN _T_lex_factor_rep::COPEN() { static int a[] = {4, 4, 1, 5, 1, 6, 1, 7, 1}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_uint _T_lex_factor_rep::lex_uint() { static int a[] = {3, 4, 2, 5, 3, 6, 2}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::CCLOSE _T_lex_factor_rep::CCLOSE() { static int a[] = {4, 4, 3, 5, 4, 6, 4, 7, 5}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::COMMA _T_lex_factor_rep::COMMA() { static int a[] = {3, 5, 2, 6, 3, 7, 3}; return ::COMMA( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_uint _T_lex_factor_rep::Low() { static int a[] = {1, 7, 2}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_uint _T_lex_factor_rep::High() { static int a[] = {1, 7, 4}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_neg _T_lex_factor_rep::lex_factor_neg() { static int a[] = {1, 8, 0}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_CARET _T_lex_factor_neg::LEX_CARET() { static int a[] = {1, 0, 0}; return ::LEX_CARET( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor_neg _T_lex_factor_neg::_lex_factor_neg() { static int a[] = {1, 0, 1}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_factor _T_lex_factor_neg::lex_factor() { static int a[] = {1, 1, 0}; return ::lex_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_lit _T_lex_range_lit::lex_lit() { static int a[] = {1, 0, 0}; return ::lex_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_num _T_lex_range_lit::lex_num() { static int a[] = {1, 1, 0}; return ::lex_num( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_uint _T_lex_num::lex_uint() { static int a[] = {1, 0, 0}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_hex _T_lex_num::lex_hex() { static int a[] = {1, 1, 0}; return ::lex_hex( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_lit _T_lex_factor::lex_lit() { static int a[] = {1, 0, 0}; return ::lex_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_id _T_lex_factor::lex_id() { static int a[] = {1, 1, 0}; return ::lex_id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_uint _T_lex_factor::lex_uint() { static int a[] = {1, 2, 0}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_hex _T_lex_factor::lex_hex() { static int a[] = {1, 3, 0}; return ::lex_hex( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_range_lit _T_lex_factor::Low() { static int a[] = {1, 4, 0}; return ::lex_range_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_DOTDOT _T_lex_factor::LEX_DOTDOT() { static int a[] = {1, 4, 1}; return ::LEX_DOTDOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_range_lit _T_lex_factor::High() { static int a[] = {1, 4, 2}; return ::lex_range_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_SQOPEN_POS _T_lex_factor::LEX_SQOPEN_POS() { static int a[] = {1, 5, 0}; return ::LEX_SQOPEN_POS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::reg_or_data _T_lex_factor::reg_or_data() { static int a[] = {2, 5, 1, 6, 1}; return ::reg_or_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RE_SQCLOSE _T_lex_factor::RE_SQCLOSE() { static int a[] = {2, 5, 2, 6, 2}; return ::RE_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_SQOPEN_NEG _T_lex_factor::LEX_SQOPEN_NEG() { static int a[] = {1, 6, 0}; return ::LEX_SQOPEN_NEG( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_POPEN _T_lex_factor::LEX_POPEN() { static int a[] = {1, 7, 0}; return ::LEX_POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::lex_expr _T_lex_factor::lex_expr() { static int a[] = {1, 7, 1}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::LEX_PCLOSE _T_lex_factor::LEX_PCLOSE() { static int a[] = {1, 7, 2}; return ::LEX_PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::reg_or_data _T_reg_or_data::_reg_or_data() { static int a[] = {1, 0, 0}; return ::reg_or_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::reg_or_char _T_reg_or_data::reg_or_char() { static int a[] = {1, 0, 1}; return ::reg_or_char( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RE_CHAR _T_reg_or_char::RE_CHAR() { static int a[] = {1, 0, 0}; return ::RE_CHAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RE_CHAR _T_reg_or_char::Low() { static int a[] = {1, 1, 0}; return ::RE_CHAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RE_DASH _T_reg_or_char::RE_DASH() { static int a[] = {1, 1, 1}; return ::RE_DASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::RE_CHAR _T_reg_or_char::High() { static int a[] = {1, 1, 2}; return ::RE_CHAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); } +::start _T___accum0::tree() { return ::start( __prg, colm_get_attr( __tree, 0) ); } +::str _T___accum0::error() { return ::str( __prg, colm_get_attr( __tree, 1) ); } +::str _T___list0::head() { return ::str( __prg, colm_get_attr( __tree, 0) ); } +::str _T___list0::tail() { return ::str( __prg, colm_get_attr( __tree, 1) ); } +::str _T___list0::top() { return ::str( __prg, colm_get_attr( __tree, 1) ); } + +::start ColmTree( colm_program *prg ) +{ return ::start( prg, colm_get_global( prg, 0) ); } +::str ColmError( colm_program *prg ) +{ return ::str( prg, colm_get_global( prg, 1) ); } + diff --git a/src/if2.h b/src/if2.h new file mode 100644 index 0000000..4ae10d7 --- /dev/null +++ b/src/if2.h @@ -0,0 +1,6965 @@ +#ifndef _EXPORTS_H +#define _EXPORTS_H + +#include <colm/colm.h> +#include <string> + +inline void appendString( colm_print_args *args, const char *data, int length ) +{ + std::string *str = (std::string*)args->arg; + *str += std::string( data, length ); +} + +inline std::string printTreeStr( colm_program *prg, colm_tree *tree, bool trim ) +{ + std::string str; + colm_print_args printArgs = { &str, 1, 0, trim, &appendString, + &colm_print_null, &colm_print_term_tree, &colm_print_null }; + colm_print_tree_args( prg, colm_vm_root(prg), &printArgs, tree ); + return str; +} + +struct _notoken; +struct ptr; +struct _void; +struct _bool; +struct _int; +struct str; +struct stream; +struct il; +struct any; +struct DEF; +struct LEX; +struct END; +struct TOKEN; +struct RL; +struct IGNORE; +struct PRINT; +struct PRINTS; +struct PRINT_XML; +struct PRINT_XML_AC; +struct PARSE; +struct PARSE_STOP; +struct CONS; +struct MATCH; +struct REQUIRE; +struct SEND; +struct NAMESPACE; +struct FOR; +struct IF; +struct YIELD; +struct WHILE; +struct ELSIF; +struct ELSE; +struct IN; +struct PARSER; +struct LIST; +struct VECTOR; +struct MAP; +struct PTR; +struct ITER; +struct REF; +struct EXPORT; +struct RETURN; +struct BREAK; +struct REJECT; +struct REDUCEFIRST; +struct ALIAS; +struct COMMIT; +struct NEW; +struct PREEOF; +struct GLOBAL; +struct EOS; +struct CAST; +struct MAKE_TOKEN; +struct MAKE_TREE; +struct TYPEID; +struct LITERAL; +struct CONTEXT; +struct NI; +struct NIL; +struct TRUE; +struct FALSE; +struct LEFT; +struct RIGHT; +struct NONASSOC; +struct INCLUDE; +struct id; +struct number; +struct backtick_lit; +struct DQ; +struct SQ; +struct TILDE; +struct SQOPEN; +struct SQCLOSE; +struct BAR; +struct FSLASH; +struct COLON; +struct DOUBLE_COLON; +struct DOT; +struct ARROW; +struct POPEN; +struct PCLOSE; +struct COPEN; +struct CCLOSE; +struct STAR; +struct QUESTION; +struct EQUALS; +struct EQEQ; +struct NEQ; +struct COMMA; +struct LT; +struct GT; +struct LTEQ; +struct GTEQ; +struct BANG; +struct DOLLAR; +struct CARET; +struct PERCENT; +struct PLUS; +struct MINUS; +struct AMPAMP; +struct BARBAR; +struct _ignore_00b9; +struct _ignore_00bb; +struct CONS_DQ; +struct CONS_DQ_NL; +struct CONS_SQOPEN; +struct CONS_SQCLOSE; +struct dq_cons_data; +struct CONS_SQ; +struct CONS_SQ_NL; +struct sq_cons_data; +struct TILDE_NL; +struct tilde_data; +struct lex_id; +struct lex_uint; +struct lex_hex; +struct lex_lit; +struct LEX_DOT; +struct LEX_BAR; +struct LEX_AMP; +struct LEX_DASH; +struct LEX_POPEN; +struct LEX_PCLOSE; +struct LEX_STAR; +struct LEX_STARSTAR; +struct LEX_QUESTION; +struct LEX_PLUS; +struct LEX_CARET; +struct LEX_DOTDOT; +struct LEX_SQOPEN_POS; +struct LEX_SQOPEN_NEG; +struct LEX_FSLASH; +struct LEX_DASHDASH; +struct LEX_COLON_GT; +struct LEX_COLON_GTGT; +struct LEX_LT_COLON; +struct _ignore_00ff; +struct _ignore_0101; +struct RE_DASH; +struct RE_CHAR; +struct RE_SQCLOSE; +struct start; +struct root_item; +struct include; +struct precedence_def; +struct pred_type; +struct pred_token_list; +struct pred_token; +struct pre_eof_def; +struct alias_def; +struct context_item; +struct export_def; +struct global_def; +struct iter_def; +struct reference_type_ref; +struct param_var_def_list; +struct param_var_def; +struct opt_export; +struct function_def; +struct context_var_def; +struct context_def; +struct literal_def; +struct literal_list; +struct literal_item; +struct no_ignore_left; +struct no_ignore_right; +struct namespace_def; +struct namespace_item; +struct obj_var_list; +struct opt_reduce_first; +struct cfl_def; +struct region_def; +struct rl_def; +struct opt_lex_expr; +struct token_def; +struct ic_def; +struct opt_translate; +struct opt_id; +struct ignore_def; +struct prod_el; +struct opt_prod_el_name; +struct prod_el_list; +struct opt_commit; +struct opt_prod_name; +struct prod; +struct opt_reduce; +struct prod_list; +struct statement; +struct elsif_list; +struct elsif_clause; +struct optional_else; +struct call_arg_list; +struct iter_call; +struct block_or_single; +struct require_pattern; +struct opt_require_stmt; +struct lang_stmt_list; +struct opt_def_init; +struct var_def; +struct print_stmt; +struct expr_stmt; +struct code_expr; +struct code_relational; +struct code_additive; +struct code_multiplicitive; +struct code_unary; +struct opt_eos; +struct code_factor; +struct type_ref; +struct region_qual; +struct opt_repeat; +struct opt_capture; +struct opt_field_init; +struct field_init; +struct opt_label; +struct dq_lit_term; +struct sq_lit_term; +struct opt_tilde_data; +struct pattern_el_lel; +struct pattern_el; +struct litpat_el; +struct pattern_top_el; +struct pattern_list; +struct pattern; +struct E1; +struct E2; +struct E3; +struct E4; +struct cons_el; +struct lit_cons_el; +struct cons_top_el; +struct cons_list; +struct constructor; +struct accum_el; +struct lit_accum_el; +struct accum_top_el; +struct accum_list; +struct accumulate; +struct string_el; +struct lit_string_el; +struct string_top_el; +struct string_list; +struct string; +struct var_ref; +struct qual; +struct lex_expr; +struct opt_lex_dot; +struct lex_term; +struct lex_factor_rep; +struct lex_factor_neg; +struct lex_range_lit; +struct lex_num; +struct lex_factor; +struct reg_or_data; +struct reg_or_char; +struct _ign_0xdbb3a0; +struct _ign_0xde4b20; +struct _ign_0xde7770; +struct _ign_0xde9520; +struct _ign_0xdea540; +struct _ign_0xdf7df0; +struct __0xde4bc0_DEF_PAT_1; +struct __0xde7810_DEF_PAT_2; +struct __0xde95c0_DEF_PAT_3; +struct __0xdf7e90_DEF_PAT_4; +struct __accum0; +struct _repeat_root_item; +struct _repeat_sq_cons_data; +struct _repeat_context_item; +struct _repeat_namespace_item; +struct _repeat_var_def; +struct _repeat_statement; +struct _repeat_field_init; +struct _repeat_litpat_el; +struct _repeat_pattern_el; +struct _repeat_lit_cons_el; +struct _repeat_cons_el; +struct _repeat_lit_accum_el; +struct _repeat_accum_el; +struct _repeat_lit_string_el; +struct _repeat_string_el; +struct __list0; +struct _T_any; +struct _T_start; +struct _T_root_item; +struct _T_include; +struct _T_precedence_def; +struct _T_pred_type; +struct _T_pred_token_list; +struct _T_pred_token; +struct _T_pre_eof_def; +struct _T_alias_def; +struct _T_context_item; +struct _T_export_def; +struct _T_global_def; +struct _T_iter_def; +struct _T_reference_type_ref; +struct _T_param_var_def_list; +struct _T_param_var_def; +struct _T_opt_export; +struct _T_function_def; +struct _T_context_var_def; +struct _T_context_def; +struct _T_literal_def; +struct _T_literal_list; +struct _T_literal_item; +struct _T_no_ignore_left; +struct _T_no_ignore_right; +struct _T_namespace_def; +struct _T_namespace_item; +struct _T_obj_var_list; +struct _T_opt_reduce_first; +struct _T_cfl_def; +struct _T_region_def; +struct _T_rl_def; +struct _T_opt_lex_expr; +struct _T_token_def; +struct _T_ic_def; +struct _T_opt_translate; +struct _T_opt_id; +struct _T_ignore_def; +struct _T_prod_el; +struct _T_opt_prod_el_name; +struct _T_prod_el_list; +struct _T_opt_commit; +struct _T_opt_prod_name; +struct _T_prod; +struct _T_opt_reduce; +struct _T_prod_list; +struct _T_statement; +struct _T_elsif_list; +struct _T_elsif_clause; +struct _T_optional_else; +struct _T_call_arg_list; +struct _T_iter_call; +struct _T_block_or_single; +struct _T_require_pattern; +struct _T_opt_require_stmt; +struct _T_lang_stmt_list; +struct _T_opt_def_init; +struct _T_var_def; +struct _T_print_stmt; +struct _T_expr_stmt; +struct _T_code_expr; +struct _T_code_relational; +struct _T_code_additive; +struct _T_code_multiplicitive; +struct _T_code_unary; +struct _T_opt_eos; +struct _T_code_factor; +struct _T_type_ref; +struct _T_region_qual; +struct _T_opt_repeat; +struct _T_opt_capture; +struct _T_opt_field_init; +struct _T_field_init; +struct _T_opt_label; +struct _T_dq_lit_term; +struct _T_sq_lit_term; +struct _T_opt_tilde_data; +struct _T_pattern_el_lel; +struct _T_pattern_el; +struct _T_litpat_el; +struct _T_pattern_top_el; +struct _T_pattern_list; +struct _T_pattern; +struct _T_E1; +struct _T_E2; +struct _T_E3; +struct _T_E4; +struct _T_cons_el; +struct _T_lit_cons_el; +struct _T_cons_top_el; +struct _T_cons_list; +struct _T_constructor; +struct _T_accum_el; +struct _T_lit_accum_el; +struct _T_accum_top_el; +struct _T_accum_list; +struct _T_accumulate; +struct _T_string_el; +struct _T_lit_string_el; +struct _T_string_top_el; +struct _T_string_list; +struct _T_string; +struct _T_var_ref; +struct _T_qual; +struct _T_lex_expr; +struct _T_opt_lex_dot; +struct _T_lex_term; +struct _T_lex_factor_rep; +struct _T_lex_factor_neg; +struct _T_lex_range_lit; +struct _T_lex_num; +struct _T_lex_factor; +struct _T_reg_or_data; +struct _T_reg_or_char; +struct _T___accum0; +struct _T__repeat_root_item; +struct _T__repeat_sq_cons_data; +struct _T__repeat_context_item; +struct _T__repeat_namespace_item; +struct _T__repeat_var_def; +struct _T__repeat_statement; +struct _T__repeat_field_init; +struct _T__repeat_litpat_el; +struct _T__repeat_pattern_el; +struct _T__repeat_lit_cons_el; +struct _T__repeat_cons_el; +struct _T__repeat_lit_accum_el; +struct _T__repeat_accum_el; +struct _T__repeat_lit_string_el; +struct _T__repeat_string_el; +struct _T___list0; +struct _root; +struct _notoken +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _notoken( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct ptr +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + ptr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _void +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _void( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _bool +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _bool( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _int +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _int( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct str +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + str( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct stream +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + stream( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct il +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + il( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct any +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + any( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct DEF +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + DEF( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct END +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + END( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct TOKEN +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + TOKEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct RL +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + RL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct IGNORE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + IGNORE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct PRINT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + PRINT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct PRINTS +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + PRINTS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct PRINT_XML +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + PRINT_XML( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct PRINT_XML_AC +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + PRINT_XML_AC( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct PARSE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + PARSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct PARSE_STOP +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + PARSE_STOP( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct CONS +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + CONS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct MATCH +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + MATCH( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct REQUIRE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + REQUIRE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct SEND +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + SEND( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct NAMESPACE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + NAMESPACE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct FOR +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + FOR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct IF +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + IF( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct YIELD +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + YIELD( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct WHILE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + WHILE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct ELSIF +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + ELSIF( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct ELSE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + ELSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct IN +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + IN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct PARSER +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + PARSER( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LIST +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LIST( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct VECTOR +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + VECTOR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct MAP +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + MAP( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct PTR +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + PTR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct ITER +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + ITER( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct REF +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + REF( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct EXPORT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + EXPORT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct RETURN +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + RETURN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct BREAK +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + BREAK( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct REJECT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + REJECT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct REDUCEFIRST +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + REDUCEFIRST( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct ALIAS +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + ALIAS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct COMMIT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + COMMIT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct NEW +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + NEW( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct PREEOF +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + PREEOF( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct GLOBAL +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + GLOBAL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct EOS +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + EOS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct CAST +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + CAST( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct MAKE_TOKEN +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + MAKE_TOKEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct MAKE_TREE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + MAKE_TREE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct TYPEID +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + TYPEID( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LITERAL +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LITERAL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct CONTEXT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + CONTEXT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct NI +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + NI( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct NIL +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + NIL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct TRUE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + TRUE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct FALSE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + FALSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEFT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEFT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct RIGHT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + RIGHT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct NONASSOC +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + NONASSOC( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct INCLUDE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + INCLUDE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct id +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + id( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct number +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + number( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct backtick_lit +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + backtick_lit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct DQ +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + DQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct SQ +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + SQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct TILDE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + TILDE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct SQOPEN +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + SQOPEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct SQCLOSE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + SQCLOSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct BAR +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + BAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct FSLASH +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + FSLASH( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct COLON +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + COLON( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct DOUBLE_COLON +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + DOUBLE_COLON( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct DOT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + DOT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct ARROW +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + ARROW( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct POPEN +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + POPEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct PCLOSE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + PCLOSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct COPEN +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + COPEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct CCLOSE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + CCLOSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct STAR +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + STAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct QUESTION +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + QUESTION( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct EQUALS +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + EQUALS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct EQEQ +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + EQEQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct NEQ +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + NEQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct COMMA +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + COMMA( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct GT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + GT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LTEQ +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LTEQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct GTEQ +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + GTEQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct BANG +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + BANG( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct DOLLAR +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + DOLLAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct CARET +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + CARET( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct PERCENT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + PERCENT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct PLUS +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + PLUS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct MINUS +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + MINUS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct AMPAMP +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + AMPAMP( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct BARBAR +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + BARBAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _ignore_00b9 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _ignore_00b9( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _ignore_00bb +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _ignore_00bb( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct CONS_DQ +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + CONS_DQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct CONS_DQ_NL +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + CONS_DQ_NL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct CONS_SQOPEN +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + CONS_SQOPEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct CONS_SQCLOSE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + CONS_SQCLOSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct dq_cons_data +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + dq_cons_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct CONS_SQ +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + CONS_SQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct CONS_SQ_NL +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + CONS_SQ_NL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct sq_cons_data +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + sq_cons_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct TILDE_NL +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + TILDE_NL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct tilde_data +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + tilde_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct lex_id +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_id( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct lex_uint +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_uint( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct lex_hex +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_hex( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct lex_lit +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_lit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_DOT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_DOT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_BAR +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_BAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_AMP +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_AMP( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_DASH +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_DASH( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_POPEN +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_POPEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_PCLOSE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_PCLOSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_STAR +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_STAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_STARSTAR +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_STARSTAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_QUESTION +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_QUESTION( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_PLUS +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_PLUS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_CARET +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_CARET( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_DOTDOT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_DOTDOT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_SQOPEN_POS +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_SQOPEN_POS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_SQOPEN_NEG +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_SQOPEN_NEG( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_FSLASH +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_FSLASH( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_DASHDASH +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_DASHDASH( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_COLON_GT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_COLON_GT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_COLON_GTGT +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_COLON_GTGT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct LEX_LT_COLON +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + LEX_LT_COLON( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _ignore_00ff +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _ignore_00ff( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _ignore_0101 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _ignore_0101( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct RE_DASH +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + RE_DASH( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct RE_CHAR +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + RE_CHAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct RE_SQCLOSE +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + RE_SQCLOSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct start +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + start( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::_repeat_root_item RootItemList(); +}; +struct root_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + root_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::rl_def rl_def(); + ::literal_def literal_def(); + ::token_def token_def(); + ::ic_def ic_def(); + ::ignore_def ignore_def(); + ::cfl_def cfl_def(); + ::region_def region_def(); + ::context_def context_def(); + ::namespace_def namespace_def(); + ::function_def function_def(); + ::iter_def iter_def(); + ::statement statement(); + ::global_def global_def(); + ::export_def export_def(); + ::pre_eof_def pre_eof_def(); + ::precedence_def precedence_def(); + ::alias_def alias_def(); + ::include include(); + enum prod_name { + _Rl = 0, + _Literal = 1, + _Token = 2, + _IgnoreCollector = 3, + _Ignore = 4, + _Cfl = 5, + _Region = 6, + _Context = 7, + _Namespace = 8, + _Function = 9, + _Iter = 10, + _Statement = 11, + _Global = 12, + _Export = 13, + _PreEof = 14, + _Precedence = 15, + _Alias = 16, + _Include = 17, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct include +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + include( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::INCLUDE INCLUDE(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); +}; +struct precedence_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + precedence_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::pred_type pred_type(); + ::pred_token_list pred_token_list(); +}; +struct pred_type +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + pred_type( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::LEFT LEFT(); + ::RIGHT RIGHT(); + ::NONASSOC NONASSOC(); + enum prod_name { + _Left = 0, + _Right = 1, + _NonAssoc = 2, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct pred_token_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + pred_token_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::pred_token_list _pred_token_list(); + ::COMMA COMMA(); + ::pred_token pred_token(); + enum prod_name { + _List = 0, + _Base = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct pred_token +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + pred_token( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::region_qual region_qual(); + ::id id(); + ::backtick_lit backtick_lit(); + enum prod_name { + _Id = 0, + _Lit = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct pre_eof_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + pre_eof_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::PREEOF PREEOF(); + ::COPEN COPEN(); + ::lang_stmt_list lang_stmt_list(); + ::CCLOSE CCLOSE(); +}; +struct alias_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + alias_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::ALIAS ALIAS(); + ::id id(); + ::type_ref type_ref(); +}; +struct context_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + context_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::context_var_def context_var_def(); + ::literal_def literal_def(); + ::rl_def rl_def(); + ::token_def token_def(); + ::ic_def ic_def(); + ::ignore_def ignore_def(); + ::cfl_def cfl_def(); + ::region_def region_def(); + ::context_def context_def(); + ::function_def function_def(); + ::iter_def iter_def(); + ::export_def export_def(); + ::pre_eof_def pre_eof_def(); + ::precedence_def precedence_def(); + enum prod_name { + _ContextVar = 0, + _Literal = 1, + _Rl = 2, + _Token = 3, + _IgnoreCollector = 4, + _Ignore = 5, + _Cfl = 6, + _Region = 7, + _Context = 8, + _Function = 9, + _Iter = 10, + _Export = 11, + _PreEof = 12, + _Precedence = 13, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct export_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + export_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::EXPORT EXPORT(); + ::var_def var_def(); + ::opt_def_init opt_def_init(); +}; +struct global_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + global_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::GLOBAL GLOBAL(); + ::var_def var_def(); + ::opt_def_init opt_def_init(); +}; +struct iter_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + iter_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::ITER ITER(); + ::id id(); + ::POPEN POPEN(); + ::param_var_def_list ParamVarDefList(); + ::PCLOSE PCLOSE(); + ::COPEN COPEN(); + ::lang_stmt_list lang_stmt_list(); + ::CCLOSE CCLOSE(); +}; +struct reference_type_ref +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + reference_type_ref( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::REF REF(); + ::LT LT(); + ::type_ref type_ref(); + ::GT GT(); +}; +struct param_var_def_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + param_var_def_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::param_var_def param_var_def(); + ::param_var_def_list _param_var_def_list(); +}; +struct param_var_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + param_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id id(); + ::COLON COLON(); + ::type_ref type_ref(); + ::reference_type_ref reference_type_ref(); + enum prod_name { + _Type = 0, + _Ref = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct opt_export +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_export( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::EXPORT EXPORT(); + enum prod_name { + _Export = 0, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct function_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + function_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::opt_export opt_export(); + ::type_ref type_ref(); + ::id id(); + ::POPEN POPEN(); + ::param_var_def_list ParamVarDefList(); + ::PCLOSE PCLOSE(); + ::COPEN COPEN(); + ::lang_stmt_list lang_stmt_list(); + ::CCLOSE CCLOSE(); +}; +struct context_var_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + context_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::var_def var_def(); +}; +struct context_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + context_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::CONTEXT CONTEXT(); + ::id id(); + ::_repeat_context_item ContextItemList(); + ::END END(); +}; +struct literal_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + literal_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::LITERAL LITERAL(); + ::literal_list literal_list(); +}; +struct literal_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + literal_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::literal_list _literal_list(); + ::literal_item literal_item(); + enum prod_name { + _Item = 0, + _Base = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct literal_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + literal_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::no_ignore_left no_ignore_left(); + ::backtick_lit backtick_lit(); + ::no_ignore_right no_ignore_right(); +}; +struct no_ignore_left +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + no_ignore_left( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::NI NI(); + ::MINUS MINUS(); + enum prod_name { + _Ni = 0, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct no_ignore_right +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + no_ignore_right( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::MINUS MINUS(); + ::NI NI(); + enum prod_name { + _Ni = 0, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct namespace_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + namespace_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::NAMESPACE NAMESPACE(); + ::id id(); + ::_repeat_namespace_item ItemList(); + ::END END(); +}; +struct namespace_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + namespace_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::rl_def rl_def(); + ::literal_def literal_def(); + ::token_def token_def(); + ::ic_def ic_def(); + ::ignore_def ignore_def(); + ::cfl_def cfl_def(); + ::region_def region_def(); + ::context_def context_def(); + ::namespace_def namespace_def(); + ::function_def function_def(); + ::iter_def iter_def(); + ::pre_eof_def pre_eof_def(); + ::precedence_def precedence_def(); + ::alias_def alias_def(); + ::include include(); + enum prod_name { + _Rl = 0, + _Literal = 1, + _Token = 2, + _IgnoreCollector = 3, + _Ignore = 4, + _Cfl = 5, + _Region = 6, + _Context = 7, + _Namespace = 8, + _Function = 9, + _Iter = 10, + _PreEof = 11, + _Precedence = 12, + _Alias = 13, + _Include = 14, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct obj_var_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + obj_var_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct opt_reduce_first +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_reduce_first( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::REDUCEFIRST REDUCEFIRST(); +}; +struct cfl_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + cfl_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::DEF DEF(); + ::id id(); + ::_repeat_var_def VarDefList(); + ::opt_reduce_first opt_reduce_first(); + ::prod_list prod_list(); +}; +struct region_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + region_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::LEX LEX(); + ::_repeat_root_item RootItemList(); + ::END END(); +}; +struct rl_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + rl_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::RL RL(); + ::id id(); + ::LEX_FSLASH LEX_FSLASH(); + ::lex_expr lex_expr(); +}; +struct opt_lex_expr +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_lex_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_expr lex_expr(); +}; +struct token_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + token_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::TOKEN TOKEN(); + ::id id(); + ::_repeat_var_def VarDefList(); + ::no_ignore_left no_ignore_left(); + ::LEX_FSLASH LEX_FSLASH(); + ::opt_lex_expr opt_lex_expr(); + ::no_ignore_right no_ignore_right(); + ::opt_translate opt_translate(); +}; +struct ic_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + ic_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::TOKEN TOKEN(); + ::id id(); + ::MINUS MINUS(); +}; +struct opt_translate +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_translate( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::COPEN COPEN(); + ::lang_stmt_list lang_stmt_list(); + ::CCLOSE CCLOSE(); + enum prod_name { + _Translate = 0, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct opt_id +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_id( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id id(); + enum prod_name { + _Id = 0, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct ignore_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + ignore_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::IGNORE IGNORE(); + ::opt_id opt_id(); + ::LEX_FSLASH LEX_FSLASH(); + ::opt_lex_expr opt_lex_expr(); +}; +struct prod_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + prod_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::opt_prod_el_name opt_prod_el_name(); + ::region_qual region_qual(); + ::id id(); + ::opt_repeat opt_repeat(); + ::backtick_lit backtick_lit(); + enum prod_name { + _Id = 0, + _Lit = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct opt_prod_el_name +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_prod_el_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id id(); + ::COLON COLON(); + enum prod_name { + _Name = 0, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct prod_el_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + prod_el_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::prod_el_list _prod_el_list(); + ::prod_el prod_el(); + enum prod_name { + _List = 0, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct opt_commit +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_commit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::COMMIT COMMIT(); + enum prod_name { + _Commit = 0, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct opt_prod_name +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_prod_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::COLON COLON(); + ::id id(); + enum prod_name { + _Name = 0, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct prod +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + prod( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::SQOPEN SQOPEN(); + ::prod_el_list prod_el_list(); + ::SQCLOSE SQCLOSE(); + ::opt_prod_name opt_prod_name(); + ::opt_commit opt_commit(); + ::opt_reduce opt_reduce(); +}; +struct opt_reduce +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_reduce( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::COPEN COPEN(); + ::lang_stmt_list lang_stmt_list(); + ::CCLOSE CCLOSE(); + enum prod_name { + _Reduce = 0, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct prod_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + prod_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::prod_list _prod_list(); + ::BAR BAR(); + ::prod prod(); + enum prod_name { + _List = 0, + _Base = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct statement +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + statement( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::print_stmt print_stmt(); + ::expr_stmt expr_stmt(); + ::var_def var_def(); + ::opt_def_init opt_def_init(); + ::FOR FOR(); + ::id id(); + ::COLON COLON(); + ::type_ref type_ref(); + ::IN IN(); + ::iter_call iter_call(); + ::block_or_single block_or_single(); + ::IF IF(); + ::code_expr code_expr(); + ::elsif_list elsif_list(); + ::WHILE WHILE(); + ::var_ref var_ref(); + ::EQUALS EQUALS(); + ::YIELD YIELD(); + ::RETURN RETURN(); + ::BREAK BREAK(); + ::REJECT REJECT(); + enum prod_name { + _Print = 0, + _Expr = 1, + _VarDef = 2, + _For = 3, + _If = 4, + _While = 5, + _LhsVarRef = 6, + _Yield = 7, + _Return = 8, + _Break = 9, + _Reject = 10, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct elsif_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + elsif_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::elsif_clause elsif_clause(); + ::elsif_list _elsif_list(); + ::optional_else optional_else(); + enum prod_name { + _Clause = 0, + _OptElse = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct elsif_clause +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + elsif_clause( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::ELSIF ELSIF(); + ::code_expr code_expr(); + ::block_or_single block_or_single(); +}; +struct optional_else +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + optional_else( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::ELSE ELSE(); + ::block_or_single block_or_single(); + enum prod_name { + _Else = 0, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct call_arg_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + call_arg_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_expr code_expr(); + ::call_arg_list _call_arg_list(); +}; +struct iter_call +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + iter_call( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::E1 E1(); + ::var_ref var_ref(); + ::POPEN POPEN(); + ::call_arg_list call_arg_list(); + ::PCLOSE PCLOSE(); + ::E2 E2(); + ::id id(); + ::E3 E3(); + ::code_expr code_expr(); + enum prod_name { + _Call = 0, + _Id = 1, + _Expr = 2, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct block_or_single +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + block_or_single( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::COPEN COPEN(); + ::lang_stmt_list lang_stmt_list(); + ::CCLOSE CCLOSE(); + ::statement statement(); + enum prod_name { + _Block = 0, + _Single = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct require_pattern +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + require_pattern( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::REQUIRE REQUIRE(); + ::var_ref var_ref(); + ::pattern pattern(); +}; +struct opt_require_stmt +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_require_stmt( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::require_pattern require_pattern(); + ::lang_stmt_list lang_stmt_list(); + enum prod_name { + _Require = 0, + _Base = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct lang_stmt_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lang_stmt_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::_repeat_statement StmtList(); + ::opt_require_stmt opt_require_stmt(); +}; +struct opt_def_init +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_def_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::EQUALS EQUALS(); + ::code_expr code_expr(); + enum prod_name { + _Init = 0, + _Base = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct var_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id id(); + ::COLON COLON(); + ::type_ref type_ref(); +}; +struct print_stmt +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + print_stmt( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::PRINT PRINT(); + ::POPEN POPEN(); + ::call_arg_list call_arg_list(); + ::PCLOSE PCLOSE(); + ::PRINTS PRINTS(); + ::PRINT_XML PRINT_XML(); + ::PRINT_XML_AC PRINT_XML_AC(); + enum prod_name { + _Tree = 0, + _PrintStream = 1, + _Xml = 2, + _XmlAc = 3, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct expr_stmt +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + expr_stmt( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_expr code_expr(); +}; +struct code_expr +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + code_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_expr _code_expr(); + ::AMPAMP AMPAMP(); + ::code_relational code_relational(); + ::BARBAR BARBAR(); + enum prod_name { + _AmpAmp = 0, + _BarBar = 1, + _Base = 2, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct code_relational +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + code_relational( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_relational _code_relational(); + ::EQEQ EQEQ(); + ::code_additive code_additive(); + ::NEQ NEQ(); + ::LT LT(); + ::GT GT(); + ::LTEQ LTEQ(); + ::GTEQ GTEQ(); + enum prod_name { + _EqEq = 0, + _Neq = 1, + _Lt = 2, + _Gt = 3, + _LtEq = 4, + _GtEq = 5, + _Base = 6, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct code_additive +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + code_additive( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_additive _code_additive(); + ::PLUS PLUS(); + ::code_multiplicitive code_multiplicitive(); + ::MINUS MINUS(); + enum prod_name { + _Plus = 0, + _Minus = 1, + _Base = 2, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct code_multiplicitive +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + code_multiplicitive( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_multiplicitive _code_multiplicitive(); + ::STAR STAR(); + ::code_unary code_unary(); + ::FSLASH FSLASH(); + enum prod_name { + _Star = 0, + _Fslash = 1, + _Base = 2, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct code_unary +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + code_unary( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::BANG BANG(); + ::code_factor code_factor(); + ::DOLLAR DOLLAR(); + ::CARET CARET(); + ::PERCENT PERCENT(); + enum prod_name { + _Bang = 0, + _Dollar = 1, + _Caret = 2, + _Percent = 3, + _Base = 4, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct opt_eos +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_eos( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::DOT DOT(); + ::EOS EOS(); + enum prod_name { + _Dot = 0, + _Eos = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct code_factor +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + code_factor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::number number(); + ::var_ref var_ref(); + ::POPEN POPEN(); + ::call_arg_list call_arg_list(); + ::PCLOSE PCLOSE(); + ::NIL NIL(); + ::TRUE TRUE(); + ::FALSE FALSE(); + ::code_expr code_expr(); + ::SEND SEND(); + ::accumulate accumulate(); + ::opt_eos opt_eos(); + ::PARSE PARSE(); + ::opt_capture opt_capture(); + ::type_ref type_ref(); + ::opt_field_init opt_field_init(); + ::PARSE_STOP PARSE_STOP(); + ::CONS CONS(); + ::constructor constructor(); + ::MATCH MATCH(); + ::pattern pattern(); + ::string string(); + ::IN IN(); + ::MAKE_TREE MAKE_TREE(); + ::MAKE_TOKEN MAKE_TOKEN(); + ::TYPEID TYPEID(); + ::LT LT(); + ::GT GT(); + ::NEW NEW(); + ::code_factor _code_factor(); + ::CAST CAST(); + enum prod_name { + _Number = 0, + _Call = 1, + _VarRef = 2, + _Nil = 3, + _True = 4, + _False = 5, + _Paren = 6, + _Send = 7, + _Parse = 8, + _ParseStop = 9, + _Cons = 10, + _Match = 11, + _String = 12, + _In = 13, + _MakeTree = 14, + _MakeToken = 15, + _TypeId = 16, + _New = 17, + _Cast = 18, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct type_ref +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + type_ref( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::region_qual region_qual(); + ::id id(); + ::opt_repeat opt_repeat(); + ::PTR PTR(); + ::LT LT(); + ::GT GT(); + ::MAP MAP(); + ::type_ref MapKeyType(); + ::type_ref MapValueType(); + ::LIST LIST(); + ::type_ref _type_ref(); + ::VECTOR VECTOR(); + ::PARSER PARSER(); + enum prod_name { + _Id = 0, + _Ptr = 1, + _Map = 2, + _List = 3, + _Vector = 4, + _Parser = 5, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct region_qual +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + region_qual( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::region_qual _region_qual(); + ::id id(); + ::DOUBLE_COLON DOUBLE_COLON(); + enum prod_name { + _Qual = 0, + _Base = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct opt_repeat +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_repeat( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::STAR STAR(); + ::PLUS PLUS(); + ::QUESTION QUESTION(); + enum prod_name { + _Star = 0, + _Plus = 1, + _Question = 2, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct opt_capture +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_capture( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id id(); + ::COLON COLON(); + enum prod_name { + _Id = 0, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct opt_field_init +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_field_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::POPEN POPEN(); + ::_repeat_field_init FieldInitList(); + ::PCLOSE PCLOSE(); + enum prod_name { + _Init = 0, + _Base = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct field_init +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + field_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_expr code_expr(); +}; +struct opt_label +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_label( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id id(); + ::COLON COLON(); + enum prod_name { + _Id = 0, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct dq_lit_term +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + dq_lit_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::CONS_DQ CONS_DQ(); + ::CONS_DQ_NL CONS_DQ_NL(); +}; +struct sq_lit_term +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + sq_lit_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::CONS_SQ CONS_SQ(); + ::CONS_SQ_NL CONS_SQ_NL(); +}; +struct opt_tilde_data +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_tilde_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::tilde_data tilde_data(); +}; +struct pattern_el_lel +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + pattern_el_lel( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::region_qual region_qual(); + ::id id(); + ::opt_repeat opt_repeat(); + ::backtick_lit backtick_lit(); + enum prod_name { + _Id = 0, + _Lit = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct pattern_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + pattern_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::opt_label opt_label(); + ::pattern_el_lel pattern_el_lel(); + ::DQ DQ(); + ::_repeat_litpat_el LitpatElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + enum prod_name { + _PatternEl = 0, + _Dq = 1, + _Sq = 2, + _Tilde = 3, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct litpat_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + litpat_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::dq_cons_data dq_cons_data(); + ::CONS_SQOPEN CONS_SQOPEN(); + ::_repeat_pattern_el PatternElList(); + ::CONS_SQCLOSE CONS_SQCLOSE(); + enum prod_name { + _ConsData = 0, + _SubList = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct pattern_top_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + pattern_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::DQ DQ(); + ::_repeat_litpat_el LitpatElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::SQOPEN SQOPEN(); + ::_repeat_pattern_el PatternElList(); + ::SQCLOSE SQCLOSE(); + enum prod_name { + _Dq = 0, + _Sq = 1, + _Tilde = 2, + _SubList = 3, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct pattern_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + pattern_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::pattern_list _pattern_list(); + ::pattern_top_el pattern_top_el(); + enum prod_name { + _List = 0, + _Base = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct pattern +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + pattern( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::pattern_list pattern_list(); +}; +struct E1 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + E1( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct E2 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + E2( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct E3 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + E3( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct E4 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + E4( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct cons_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::E1 E1(); + ::region_qual region_qual(); + ::backtick_lit backtick_lit(); + ::DQ DQ(); + ::_repeat_lit_cons_el LitConsElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::E2 E2(); + ::code_expr code_expr(); + enum prod_name { + _Lit = 0, + _Dq = 1, + _Sq = 2, + _Tilde = 3, + _CodeExpr = 4, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct lit_cons_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lit_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::dq_cons_data dq_cons_data(); + ::CONS_SQOPEN CONS_SQOPEN(); + ::_repeat_cons_el ConsElList(); + ::CONS_SQCLOSE CONS_SQCLOSE(); + enum prod_name { + _ConsData = 0, + _SubList = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct cons_top_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + cons_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::DQ DQ(); + ::_repeat_lit_cons_el LitConsElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::SQOPEN SQOPEN(); + ::_repeat_cons_el ConsElList(); + ::SQCLOSE SQCLOSE(); + enum prod_name { + _Dq = 0, + _Sq = 1, + _Tilde = 2, + _SubList = 3, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct cons_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + cons_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::cons_top_el cons_top_el(); + ::cons_list _cons_list(); + enum prod_name { + _List = 0, + _Base = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct constructor +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + constructor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::cons_list cons_list(); +}; +struct accum_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::E1 E1(); + ::DQ DQ(); + ::_repeat_lit_accum_el LitAccumElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::E2 E2(); + ::code_expr code_expr(); + enum prod_name { + _Dq = 0, + _Sq = 1, + _Tilde = 2, + _CodeExpr = 3, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct lit_accum_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lit_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::dq_cons_data dq_cons_data(); + ::CONS_SQOPEN CONS_SQOPEN(); + ::_repeat_accum_el AccumElList(); + ::CONS_SQCLOSE CONS_SQCLOSE(); + enum prod_name { + _ConsData = 0, + _SubList = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct accum_top_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + accum_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::DQ DQ(); + ::_repeat_lit_accum_el LitAccumElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::SQOPEN SQOPEN(); + ::_repeat_accum_el AccumElList(); + ::SQCLOSE SQCLOSE(); + enum prod_name { + _Dq = 0, + _Sq = 1, + _Tilde = 2, + _SubList = 3, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct accum_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + accum_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::accum_top_el accum_top_el(); + ::accum_list _accum_list(); + enum prod_name { + _List = 0, + _Base = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct accumulate +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + accumulate( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::accum_list accum_list(); +}; +struct string_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::E1 E1(); + ::DQ DQ(); + ::_repeat_lit_string_el LitStringElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::E2 E2(); + ::code_expr code_expr(); + enum prod_name { + _Dq = 0, + _Sq = 1, + _Tilde = 2, + _CodeExpr = 3, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct lit_string_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lit_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::dq_cons_data dq_cons_data(); + ::CONS_SQOPEN CONS_SQOPEN(); + ::_repeat_string_el StringElList(); + ::CONS_SQCLOSE CONS_SQCLOSE(); + enum prod_name { + _ConsData = 0, + _SubList = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct string_top_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + string_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::DQ DQ(); + ::_repeat_lit_string_el LitStringElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::SQOPEN SQOPEN(); + ::_repeat_string_el StringElList(); + ::SQCLOSE SQCLOSE(); + enum prod_name { + _Dq = 0, + _Sq = 1, + _Tilde = 2, + _SubList = 3, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct string_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + string_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::string_top_el string_top_el(); + ::string_list _string_list(); + enum prod_name { + _List = 0, + _Base = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct string +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + string( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::string_list string_list(); +}; +struct var_ref +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + var_ref( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::qual qual(); + ::id id(); +}; +struct qual +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + qual( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::qual _qual(); + ::id id(); + ::DOT DOT(); + ::ARROW ARROW(); + enum prod_name { + _Dot = 0, + _Arrow = 1, + _Base = 2, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct lex_expr +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_expr _lex_expr(); + ::LEX_BAR LEX_BAR(); + ::lex_term lex_term(); + ::LEX_AMP LEX_AMP(); + ::LEX_DASH LEX_DASH(); + ::LEX_DASHDASH LEX_DASHDASH(); + enum prod_name { + _Bar = 0, + _Amp = 1, + _Dash = 2, + _DashDash = 3, + _Base = 4, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct opt_lex_dot +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + opt_lex_dot( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::LEX_DOT LEX_DOT(); +}; +struct lex_term +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_term _lex_term(); + ::opt_lex_dot opt_lex_dot(); + ::lex_factor_rep lex_factor_rep(); + ::LEX_COLON_GT LEX_COLON_GT(); + ::LEX_COLON_GTGT LEX_COLON_GTGT(); + ::LEX_LT_COLON LEX_LT_COLON(); + enum prod_name { + _Dot = 0, + _ColonGt = 1, + _ColonGtGt = 2, + _LtColon = 3, + _Base = 4, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct lex_factor_rep +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_factor_rep( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_factor_rep _lex_factor_rep(); + ::LEX_STAR LEX_STAR(); + ::LEX_STARSTAR LEX_STARSTAR(); + ::LEX_PLUS LEX_PLUS(); + ::LEX_QUESTION LEX_QUESTION(); + ::COPEN COPEN(); + ::lex_uint lex_uint(); + ::CCLOSE CCLOSE(); + ::COMMA COMMA(); + ::lex_uint Low(); + ::lex_uint High(); + ::lex_factor_neg lex_factor_neg(); + enum prod_name { + _Star = 0, + _StarStar = 1, + _Plus = 2, + _Question = 3, + _Exact = 4, + _Max = 5, + _Min = 6, + _Range = 7, + _Base = 8, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct lex_factor_neg +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_factor_neg( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::LEX_CARET LEX_CARET(); + ::lex_factor_neg _lex_factor_neg(); + ::lex_factor lex_factor(); + enum prod_name { + _Caret = 0, + _Base = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct lex_range_lit +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_range_lit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_lit lex_lit(); + ::lex_num lex_num(); + enum prod_name { + _Lit = 0, + _Number = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct lex_num +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_num( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_uint lex_uint(); + ::lex_hex lex_hex(); +}; +struct lex_factor +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + lex_factor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_lit lex_lit(); + ::lex_id lex_id(); + ::lex_uint lex_uint(); + ::lex_hex lex_hex(); + ::lex_range_lit Low(); + ::LEX_DOTDOT LEX_DOTDOT(); + ::lex_range_lit High(); + ::LEX_SQOPEN_POS LEX_SQOPEN_POS(); + ::reg_or_data reg_or_data(); + ::RE_SQCLOSE RE_SQCLOSE(); + ::LEX_SQOPEN_NEG LEX_SQOPEN_NEG(); + ::LEX_POPEN LEX_POPEN(); + ::lex_expr lex_expr(); + ::LEX_PCLOSE LEX_PCLOSE(); + enum prod_name { + _Literal = 0, + _Id = 1, + _Number = 2, + _Hex = 3, + _Range = 4, + _PosOrBlock = 5, + _NegOrBlock = 6, + _Paren = 7, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct reg_or_data +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + reg_or_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::reg_or_data _reg_or_data(); + ::reg_or_char reg_or_char(); + enum prod_name { + _Data = 0, + _Base = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct reg_or_char +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + reg_or_char( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::RE_CHAR RE_CHAR(); + ::RE_CHAR Low(); + ::RE_DASH RE_DASH(); + ::RE_CHAR High(); + enum prod_name { + _Char = 0, + _Range = 1, + }; + enum prod_name prodName() { return (enum prod_name)__tree->prodNum; } +}; +struct _ign_0xdbb3a0 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _ign_0xdbb3a0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _ign_0xde4b20 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _ign_0xde4b20( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _ign_0xde7770 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _ign_0xde7770( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _ign_0xde9520 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _ign_0xde9520( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _ign_0xdea540 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _ign_0xdea540( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _ign_0xdf7df0 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _ign_0xdf7df0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct __0xde4bc0_DEF_PAT_1 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + __0xde4bc0_DEF_PAT_1( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct __0xde7810_DEF_PAT_2 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + __0xde7810_DEF_PAT_2( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct __0xde95c0_DEF_PAT_3 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + __0xde95c0_DEF_PAT_3( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct __0xdf7e90_DEF_PAT_4 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + __0xdf7e90_DEF_PAT_4( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct __accum0 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + __accum0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::start tree(); + ::str error(); +}; +struct _repeat_root_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_root_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_root_item next(); + ::root_item value(); +}; +struct _repeat_sq_cons_data +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_sq_cons_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_sq_cons_data next(); + ::sq_cons_data value(); +}; +struct _repeat_context_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_context_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_context_item next(); + ::context_item value(); +}; +struct _repeat_namespace_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_namespace_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_namespace_item next(); + ::namespace_item value(); +}; +struct _repeat_var_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_var_def next(); + ::var_def value(); +}; +struct _repeat_statement +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_statement( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_statement next(); + ::statement value(); +}; +struct _repeat_field_init +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_field_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_field_init next(); + ::field_init value(); +}; +struct _repeat_litpat_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_litpat_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_litpat_el next(); + ::litpat_el value(); +}; +struct _repeat_pattern_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_pattern_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_pattern_el next(); + ::pattern_el value(); +}; +struct _repeat_lit_cons_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_lit_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_lit_cons_el next(); + ::lit_cons_el value(); +}; +struct _repeat_cons_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_cons_el next(); + ::cons_el value(); +}; +struct _repeat_lit_accum_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_lit_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_lit_accum_el next(); + ::lit_accum_el value(); +}; +struct _repeat_accum_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_accum_el next(); + ::accum_el value(); +}; +struct _repeat_lit_string_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_lit_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_lit_string_el next(); + ::lit_string_el value(); +}; +struct _repeat_string_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _repeat_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + int end() { return colm_repeat_end( __tree ); } + ::_repeat_string_el next(); + ::string_el value(); +}; +struct __list0 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + __list0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::str head(); + ::str tail(); + ::str top(); +}; +struct _T_any +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_any( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T_start +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_start( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::_repeat_root_item RootItemList(); +}; +struct _T_root_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_root_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::rl_def rl_def(); + ::literal_def literal_def(); + ::token_def token_def(); + ::ic_def ic_def(); + ::ignore_def ignore_def(); + ::cfl_def cfl_def(); + ::region_def region_def(); + ::context_def context_def(); + ::namespace_def namespace_def(); + ::function_def function_def(); + ::iter_def iter_def(); + ::statement statement(); + ::global_def global_def(); + ::export_def export_def(); + ::pre_eof_def pre_eof_def(); + ::precedence_def precedence_def(); + ::alias_def alias_def(); + ::include include(); +}; +struct _T_include +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_include( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::INCLUDE INCLUDE(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); +}; +struct _T_precedence_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_precedence_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::pred_type pred_type(); + ::pred_token_list pred_token_list(); +}; +struct _T_pred_type +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_pred_type( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::LEFT LEFT(); + ::RIGHT RIGHT(); + ::NONASSOC NONASSOC(); +}; +struct _T_pred_token_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_pred_token_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::pred_token_list _pred_token_list(); + ::COMMA COMMA(); + ::pred_token pred_token(); +}; +struct _T_pred_token +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_pred_token( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::region_qual region_qual(); + ::id id(); + ::backtick_lit backtick_lit(); +}; +struct _T_pre_eof_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_pre_eof_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::PREEOF PREEOF(); + ::COPEN COPEN(); + ::lang_stmt_list lang_stmt_list(); + ::CCLOSE CCLOSE(); +}; +struct _T_alias_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_alias_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::ALIAS ALIAS(); + ::id id(); + ::type_ref type_ref(); +}; +struct _T_context_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_context_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::context_var_def context_var_def(); + ::literal_def literal_def(); + ::rl_def rl_def(); + ::token_def token_def(); + ::ic_def ic_def(); + ::ignore_def ignore_def(); + ::cfl_def cfl_def(); + ::region_def region_def(); + ::context_def context_def(); + ::function_def function_def(); + ::iter_def iter_def(); + ::export_def export_def(); + ::pre_eof_def pre_eof_def(); + ::precedence_def precedence_def(); +}; +struct _T_export_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_export_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::EXPORT EXPORT(); + ::var_def var_def(); + ::opt_def_init opt_def_init(); +}; +struct _T_global_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_global_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::GLOBAL GLOBAL(); + ::var_def var_def(); + ::opt_def_init opt_def_init(); +}; +struct _T_iter_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_iter_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::ITER ITER(); + ::id id(); + ::POPEN POPEN(); + ::param_var_def_list ParamVarDefList(); + ::PCLOSE PCLOSE(); + ::COPEN COPEN(); + ::lang_stmt_list lang_stmt_list(); + ::CCLOSE CCLOSE(); +}; +struct _T_reference_type_ref +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_reference_type_ref( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::REF REF(); + ::LT LT(); + ::type_ref type_ref(); + ::GT GT(); +}; +struct _T_param_var_def_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_param_var_def_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::param_var_def param_var_def(); + ::param_var_def_list _param_var_def_list(); +}; +struct _T_param_var_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_param_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id id(); + ::COLON COLON(); + ::type_ref type_ref(); + ::reference_type_ref reference_type_ref(); +}; +struct _T_opt_export +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_export( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::EXPORT EXPORT(); +}; +struct _T_function_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_function_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::opt_export opt_export(); + ::type_ref type_ref(); + ::id id(); + ::POPEN POPEN(); + ::param_var_def_list ParamVarDefList(); + ::PCLOSE PCLOSE(); + ::COPEN COPEN(); + ::lang_stmt_list lang_stmt_list(); + ::CCLOSE CCLOSE(); +}; +struct _T_context_var_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_context_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::var_def var_def(); +}; +struct _T_context_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_context_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::CONTEXT CONTEXT(); + ::id id(); + ::_repeat_context_item ContextItemList(); + ::END END(); +}; +struct _T_literal_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_literal_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::LITERAL LITERAL(); + ::literal_list literal_list(); +}; +struct _T_literal_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_literal_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::literal_list _literal_list(); + ::literal_item literal_item(); +}; +struct _T_literal_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_literal_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::no_ignore_left no_ignore_left(); + ::backtick_lit backtick_lit(); + ::no_ignore_right no_ignore_right(); +}; +struct _T_no_ignore_left +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_no_ignore_left( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::NI NI(); + ::MINUS MINUS(); +}; +struct _T_no_ignore_right +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_no_ignore_right( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::MINUS MINUS(); + ::NI NI(); +}; +struct _T_namespace_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_namespace_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::NAMESPACE NAMESPACE(); + ::id id(); + ::_repeat_namespace_item ItemList(); + ::END END(); +}; +struct _T_namespace_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_namespace_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::rl_def rl_def(); + ::literal_def literal_def(); + ::token_def token_def(); + ::ic_def ic_def(); + ::ignore_def ignore_def(); + ::cfl_def cfl_def(); + ::region_def region_def(); + ::context_def context_def(); + ::namespace_def namespace_def(); + ::function_def function_def(); + ::iter_def iter_def(); + ::pre_eof_def pre_eof_def(); + ::precedence_def precedence_def(); + ::alias_def alias_def(); + ::include include(); +}; +struct _T_obj_var_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_obj_var_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T_opt_reduce_first +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_reduce_first( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::REDUCEFIRST REDUCEFIRST(); +}; +struct _T_cfl_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_cfl_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::DEF DEF(); + ::id id(); + ::_repeat_var_def VarDefList(); + ::opt_reduce_first opt_reduce_first(); + ::prod_list prod_list(); +}; +struct _T_region_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_region_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::LEX LEX(); + ::_repeat_root_item RootItemList(); + ::END END(); +}; +struct _T_rl_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_rl_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::RL RL(); + ::id id(); + ::LEX_FSLASH LEX_FSLASH(); + ::lex_expr lex_expr(); +}; +struct _T_opt_lex_expr +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_lex_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_expr lex_expr(); +}; +struct _T_token_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_token_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::TOKEN TOKEN(); + ::id id(); + ::_repeat_var_def VarDefList(); + ::no_ignore_left no_ignore_left(); + ::LEX_FSLASH LEX_FSLASH(); + ::opt_lex_expr opt_lex_expr(); + ::no_ignore_right no_ignore_right(); + ::opt_translate opt_translate(); +}; +struct _T_ic_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_ic_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::TOKEN TOKEN(); + ::id id(); + ::MINUS MINUS(); +}; +struct _T_opt_translate +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_translate( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::COPEN COPEN(); + ::lang_stmt_list lang_stmt_list(); + ::CCLOSE CCLOSE(); +}; +struct _T_opt_id +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_id( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id id(); +}; +struct _T_ignore_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_ignore_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::IGNORE IGNORE(); + ::opt_id opt_id(); + ::LEX_FSLASH LEX_FSLASH(); + ::opt_lex_expr opt_lex_expr(); +}; +struct _T_prod_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_prod_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::opt_prod_el_name opt_prod_el_name(); + ::region_qual region_qual(); + ::id id(); + ::opt_repeat opt_repeat(); + ::backtick_lit backtick_lit(); +}; +struct _T_opt_prod_el_name +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_prod_el_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id id(); + ::COLON COLON(); +}; +struct _T_prod_el_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_prod_el_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::prod_el_list _prod_el_list(); + ::prod_el prod_el(); +}; +struct _T_opt_commit +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_commit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::COMMIT COMMIT(); +}; +struct _T_opt_prod_name +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_prod_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::COLON COLON(); + ::id id(); +}; +struct _T_prod +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_prod( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::SQOPEN SQOPEN(); + ::prod_el_list prod_el_list(); + ::SQCLOSE SQCLOSE(); + ::opt_prod_name opt_prod_name(); + ::opt_commit opt_commit(); + ::opt_reduce opt_reduce(); +}; +struct _T_opt_reduce +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_reduce( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::COPEN COPEN(); + ::lang_stmt_list lang_stmt_list(); + ::CCLOSE CCLOSE(); +}; +struct _T_prod_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_prod_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::prod_list _prod_list(); + ::BAR BAR(); + ::prod prod(); +}; +struct _T_statement +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_statement( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::print_stmt print_stmt(); + ::expr_stmt expr_stmt(); + ::var_def var_def(); + ::opt_def_init opt_def_init(); + ::FOR FOR(); + ::id id(); + ::COLON COLON(); + ::type_ref type_ref(); + ::IN IN(); + ::iter_call iter_call(); + ::block_or_single block_or_single(); + ::IF IF(); + ::code_expr code_expr(); + ::elsif_list elsif_list(); + ::WHILE WHILE(); + ::var_ref var_ref(); + ::EQUALS EQUALS(); + ::YIELD YIELD(); + ::RETURN RETURN(); + ::BREAK BREAK(); + ::REJECT REJECT(); +}; +struct _T_elsif_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_elsif_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::elsif_clause elsif_clause(); + ::elsif_list _elsif_list(); + ::optional_else optional_else(); +}; +struct _T_elsif_clause +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_elsif_clause( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::ELSIF ELSIF(); + ::code_expr code_expr(); + ::block_or_single block_or_single(); +}; +struct _T_optional_else +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_optional_else( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::ELSE ELSE(); + ::block_or_single block_or_single(); +}; +struct _T_call_arg_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_call_arg_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_expr code_expr(); + ::call_arg_list _call_arg_list(); +}; +struct _T_iter_call +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_iter_call( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::E1 E1(); + ::var_ref var_ref(); + ::POPEN POPEN(); + ::call_arg_list call_arg_list(); + ::PCLOSE PCLOSE(); + ::E2 E2(); + ::id id(); + ::E3 E3(); + ::code_expr code_expr(); +}; +struct _T_block_or_single +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_block_or_single( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::COPEN COPEN(); + ::lang_stmt_list lang_stmt_list(); + ::CCLOSE CCLOSE(); + ::statement statement(); +}; +struct _T_require_pattern +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_require_pattern( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::REQUIRE REQUIRE(); + ::var_ref var_ref(); + ::pattern pattern(); +}; +struct _T_opt_require_stmt +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_require_stmt( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::require_pattern require_pattern(); + ::lang_stmt_list lang_stmt_list(); +}; +struct _T_lang_stmt_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lang_stmt_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::_repeat_statement StmtList(); + ::opt_require_stmt opt_require_stmt(); +}; +struct _T_opt_def_init +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_def_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::EQUALS EQUALS(); + ::code_expr code_expr(); +}; +struct _T_var_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id id(); + ::COLON COLON(); + ::type_ref type_ref(); +}; +struct _T_print_stmt +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_print_stmt( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::PRINT PRINT(); + ::POPEN POPEN(); + ::call_arg_list call_arg_list(); + ::PCLOSE PCLOSE(); + ::PRINTS PRINTS(); + ::PRINT_XML PRINT_XML(); + ::PRINT_XML_AC PRINT_XML_AC(); +}; +struct _T_expr_stmt +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_expr_stmt( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_expr code_expr(); +}; +struct _T_code_expr +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_code_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_expr _code_expr(); + ::AMPAMP AMPAMP(); + ::code_relational code_relational(); + ::BARBAR BARBAR(); +}; +struct _T_code_relational +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_code_relational( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_relational _code_relational(); + ::EQEQ EQEQ(); + ::code_additive code_additive(); + ::NEQ NEQ(); + ::LT LT(); + ::GT GT(); + ::LTEQ LTEQ(); + ::GTEQ GTEQ(); +}; +struct _T_code_additive +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_code_additive( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_additive _code_additive(); + ::PLUS PLUS(); + ::code_multiplicitive code_multiplicitive(); + ::MINUS MINUS(); +}; +struct _T_code_multiplicitive +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_code_multiplicitive( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_multiplicitive _code_multiplicitive(); + ::STAR STAR(); + ::code_unary code_unary(); + ::FSLASH FSLASH(); +}; +struct _T_code_unary +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_code_unary( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::BANG BANG(); + ::code_factor code_factor(); + ::DOLLAR DOLLAR(); + ::CARET CARET(); + ::PERCENT PERCENT(); +}; +struct _T_opt_eos +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_eos( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::DOT DOT(); + ::EOS EOS(); +}; +struct _T_code_factor +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_code_factor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::number number(); + ::var_ref var_ref(); + ::POPEN POPEN(); + ::call_arg_list call_arg_list(); + ::PCLOSE PCLOSE(); + ::NIL NIL(); + ::TRUE TRUE(); + ::FALSE FALSE(); + ::code_expr code_expr(); + ::SEND SEND(); + ::accumulate accumulate(); + ::opt_eos opt_eos(); + ::PARSE PARSE(); + ::opt_capture opt_capture(); + ::type_ref type_ref(); + ::opt_field_init opt_field_init(); + ::PARSE_STOP PARSE_STOP(); + ::CONS CONS(); + ::constructor constructor(); + ::MATCH MATCH(); + ::pattern pattern(); + ::string string(); + ::IN IN(); + ::MAKE_TREE MAKE_TREE(); + ::MAKE_TOKEN MAKE_TOKEN(); + ::TYPEID TYPEID(); + ::LT LT(); + ::GT GT(); + ::NEW NEW(); + ::code_factor _code_factor(); + ::CAST CAST(); +}; +struct _T_type_ref +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_type_ref( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::region_qual region_qual(); + ::id id(); + ::opt_repeat opt_repeat(); + ::PTR PTR(); + ::LT LT(); + ::GT GT(); + ::MAP MAP(); + ::type_ref MapKeyType(); + ::type_ref MapValueType(); + ::LIST LIST(); + ::type_ref _type_ref(); + ::VECTOR VECTOR(); + ::PARSER PARSER(); +}; +struct _T_region_qual +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_region_qual( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::region_qual _region_qual(); + ::id id(); + ::DOUBLE_COLON DOUBLE_COLON(); +}; +struct _T_opt_repeat +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_repeat( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::STAR STAR(); + ::PLUS PLUS(); + ::QUESTION QUESTION(); +}; +struct _T_opt_capture +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_capture( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id id(); + ::COLON COLON(); +}; +struct _T_opt_field_init +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_field_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::POPEN POPEN(); + ::_repeat_field_init FieldInitList(); + ::PCLOSE PCLOSE(); +}; +struct _T_field_init +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_field_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::code_expr code_expr(); +}; +struct _T_opt_label +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_label( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::id id(); + ::COLON COLON(); +}; +struct _T_dq_lit_term +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_dq_lit_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::CONS_DQ CONS_DQ(); + ::CONS_DQ_NL CONS_DQ_NL(); +}; +struct _T_sq_lit_term +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_sq_lit_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::CONS_SQ CONS_SQ(); + ::CONS_SQ_NL CONS_SQ_NL(); +}; +struct _T_opt_tilde_data +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_tilde_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::tilde_data tilde_data(); +}; +struct _T_pattern_el_lel +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_pattern_el_lel( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::region_qual region_qual(); + ::id id(); + ::opt_repeat opt_repeat(); + ::backtick_lit backtick_lit(); +}; +struct _T_pattern_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_pattern_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::opt_label opt_label(); + ::pattern_el_lel pattern_el_lel(); + ::DQ DQ(); + ::_repeat_litpat_el LitpatElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); +}; +struct _T_litpat_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_litpat_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::dq_cons_data dq_cons_data(); + ::CONS_SQOPEN CONS_SQOPEN(); + ::_repeat_pattern_el PatternElList(); + ::CONS_SQCLOSE CONS_SQCLOSE(); +}; +struct _T_pattern_top_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_pattern_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::DQ DQ(); + ::_repeat_litpat_el LitpatElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::SQOPEN SQOPEN(); + ::_repeat_pattern_el PatternElList(); + ::SQCLOSE SQCLOSE(); +}; +struct _T_pattern_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_pattern_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::pattern_list _pattern_list(); + ::pattern_top_el pattern_top_el(); +}; +struct _T_pattern +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_pattern( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::pattern_list pattern_list(); +}; +struct _T_E1 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_E1( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T_E2 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_E2( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T_E3 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_E3( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T_E4 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_E4( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T_cons_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::E1 E1(); + ::region_qual region_qual(); + ::backtick_lit backtick_lit(); + ::DQ DQ(); + ::_repeat_lit_cons_el LitConsElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::E2 E2(); + ::code_expr code_expr(); +}; +struct _T_lit_cons_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lit_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::dq_cons_data dq_cons_data(); + ::CONS_SQOPEN CONS_SQOPEN(); + ::_repeat_cons_el ConsElList(); + ::CONS_SQCLOSE CONS_SQCLOSE(); +}; +struct _T_cons_top_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_cons_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::DQ DQ(); + ::_repeat_lit_cons_el LitConsElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::SQOPEN SQOPEN(); + ::_repeat_cons_el ConsElList(); + ::SQCLOSE SQCLOSE(); +}; +struct _T_cons_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_cons_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::cons_top_el cons_top_el(); + ::cons_list _cons_list(); +}; +struct _T_constructor +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_constructor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::cons_list cons_list(); +}; +struct _T_accum_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::E1 E1(); + ::DQ DQ(); + ::_repeat_lit_accum_el LitAccumElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::E2 E2(); + ::code_expr code_expr(); +}; +struct _T_lit_accum_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lit_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::dq_cons_data dq_cons_data(); + ::CONS_SQOPEN CONS_SQOPEN(); + ::_repeat_accum_el AccumElList(); + ::CONS_SQCLOSE CONS_SQCLOSE(); +}; +struct _T_accum_top_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_accum_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::DQ DQ(); + ::_repeat_lit_accum_el LitAccumElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::SQOPEN SQOPEN(); + ::_repeat_accum_el AccumElList(); + ::SQCLOSE SQCLOSE(); +}; +struct _T_accum_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_accum_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::accum_top_el accum_top_el(); + ::accum_list _accum_list(); +}; +struct _T_accumulate +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_accumulate( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::accum_list accum_list(); +}; +struct _T_string_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::E1 E1(); + ::DQ DQ(); + ::_repeat_lit_string_el LitStringElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::E2 E2(); + ::code_expr code_expr(); +}; +struct _T_lit_string_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lit_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::dq_cons_data dq_cons_data(); + ::CONS_SQOPEN CONS_SQOPEN(); + ::_repeat_string_el StringElList(); + ::CONS_SQCLOSE CONS_SQCLOSE(); +}; +struct _T_string_top_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_string_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::DQ DQ(); + ::_repeat_lit_string_el LitStringElList(); + ::dq_lit_term dq_lit_term(); + ::SQ SQ(); + ::_repeat_sq_cons_data SqConsDataList(); + ::sq_lit_term sq_lit_term(); + ::TILDE TILDE(); + ::opt_tilde_data opt_tilde_data(); + ::TILDE_NL TILDE_NL(); + ::SQOPEN SQOPEN(); + ::_repeat_string_el StringElList(); + ::SQCLOSE SQCLOSE(); +}; +struct _T_string_list +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_string_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::string_top_el string_top_el(); + ::string_list _string_list(); +}; +struct _T_string +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_string( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::string_list string_list(); +}; +struct _T_var_ref +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_var_ref( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::qual qual(); + ::id id(); +}; +struct _T_qual +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_qual( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::qual _qual(); + ::id id(); + ::DOT DOT(); + ::ARROW ARROW(); +}; +struct _T_lex_expr +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lex_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_expr _lex_expr(); + ::LEX_BAR LEX_BAR(); + ::lex_term lex_term(); + ::LEX_AMP LEX_AMP(); + ::LEX_DASH LEX_DASH(); + ::LEX_DASHDASH LEX_DASHDASH(); +}; +struct _T_opt_lex_dot +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_opt_lex_dot( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::LEX_DOT LEX_DOT(); +}; +struct _T_lex_term +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lex_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_term _lex_term(); + ::opt_lex_dot opt_lex_dot(); + ::lex_factor_rep lex_factor_rep(); + ::LEX_COLON_GT LEX_COLON_GT(); + ::LEX_COLON_GTGT LEX_COLON_GTGT(); + ::LEX_LT_COLON LEX_LT_COLON(); +}; +struct _T_lex_factor_rep +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lex_factor_rep( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_factor_rep _lex_factor_rep(); + ::LEX_STAR LEX_STAR(); + ::LEX_STARSTAR LEX_STARSTAR(); + ::LEX_PLUS LEX_PLUS(); + ::LEX_QUESTION LEX_QUESTION(); + ::COPEN COPEN(); + ::lex_uint lex_uint(); + ::CCLOSE CCLOSE(); + ::COMMA COMMA(); + ::lex_uint Low(); + ::lex_uint High(); + ::lex_factor_neg lex_factor_neg(); +}; +struct _T_lex_factor_neg +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lex_factor_neg( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::LEX_CARET LEX_CARET(); + ::lex_factor_neg _lex_factor_neg(); + ::lex_factor lex_factor(); +}; +struct _T_lex_range_lit +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lex_range_lit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_lit lex_lit(); + ::lex_num lex_num(); +}; +struct _T_lex_num +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lex_num( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_uint lex_uint(); + ::lex_hex lex_hex(); +}; +struct _T_lex_factor +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_lex_factor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::lex_lit lex_lit(); + ::lex_id lex_id(); + ::lex_uint lex_uint(); + ::lex_hex lex_hex(); + ::lex_range_lit Low(); + ::LEX_DOTDOT LEX_DOTDOT(); + ::lex_range_lit High(); + ::LEX_SQOPEN_POS LEX_SQOPEN_POS(); + ::reg_or_data reg_or_data(); + ::RE_SQCLOSE RE_SQCLOSE(); + ::LEX_SQOPEN_NEG LEX_SQOPEN_NEG(); + ::LEX_POPEN LEX_POPEN(); + ::lex_expr lex_expr(); + ::LEX_PCLOSE LEX_PCLOSE(); +}; +struct _T_reg_or_data +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_reg_or_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::reg_or_data _reg_or_data(); + ::reg_or_char reg_or_char(); +}; +struct _T_reg_or_char +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T_reg_or_char( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::RE_CHAR RE_CHAR(); + ::RE_CHAR Low(); + ::RE_DASH RE_DASH(); + ::RE_CHAR High(); +}; +struct _T___accum0 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T___accum0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::start tree(); + ::str error(); +}; +struct _T__repeat_root_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_root_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_sq_cons_data +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_sq_cons_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_context_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_context_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_namespace_item +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_namespace_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_var_def +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_statement +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_statement( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_field_init +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_field_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_litpat_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_litpat_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_pattern_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_pattern_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_lit_cons_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_lit_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_cons_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_lit_accum_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_lit_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_accum_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_lit_string_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_lit_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T__repeat_string_el +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T__repeat_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +struct _T___list0 +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _T___list0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} + ::str head(); + ::str tail(); + ::str top(); +}; +struct _root +{ + std::string text() { return printTreeStr( __prg, __tree, true ); } + colm_location *loc() { return colm_find_location( __prg, __tree ); } + std::string text_notrim() { return printTreeStr( __prg, __tree, false ); } + std::string text_ws() { return printTreeStr( __prg, __tree, false ); } + colm_data *data() { return __tree->tokdata; } + operator colm_tree *() { return __tree; } + colm_program *__prg; + colm_tree *__tree; + _root( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {} +}; +::start ColmTree( colm_program *prg ); +::str ColmError( colm_program *prg ); + +#endif diff --git a/src/input.c b/src/input.c new file mode 100644 index 0000000..a41aa5b --- /dev/null +++ b/src/input.c @@ -0,0 +1,1005 @@ +/* + * Copyright 2007-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <colm/input.h> +#include <colm/pdarun.h> +#include <colm/debug.h> +#include <colm/program.h> + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <assert.h> +#include <unistd.h> + +#define true 1 +#define false 0 + +RunBuf *newRunBuf() +{ + RunBuf *rb = (RunBuf*)malloc(sizeof(RunBuf)); + memset( rb, 0, sizeof(RunBuf) ); + return rb; +} + +void initFdFuncs(); +void initFileFuncs(); +void initPatFuncs(); +void initConsFuncs(); + +extern struct StreamFuncs fileFuncs; +extern struct StreamFuncs fdFuncs; +extern struct StreamFuncs streamFuncs; + +void clearSourceStream( struct colm_program *prg, Tree **sp, StreamImpl *sourceStream ) +{ + RunBuf *buf = sourceStream->queue; + while ( buf != 0 ) { + switch ( buf->type ) { + case RunBufDataType: + break; + + case RunBufTokenType: + case RunBufIgnoreType: + case RunBufSourceType: + treeDownref( prg, sp, buf->tree ); + break; + } + + RunBuf *next = buf->next; + free( buf ); + buf = next; + } + + sourceStream->queue = 0; +} + +/* Keep the position up to date after consuming text. */ +void updatePosition( StreamImpl *is, const char *data, long length ) +{ + int i; + for ( i = 0; i < length; i++ ) { + if ( data[i] != '\n' ) + is->column += 1; + else { + is->line += 1; + is->column = 1; + } + } + + is->byte += length; +} + +/* Keep the position up to date after sending back text. */ +void undoPosition( StreamImpl *is, const char *data, long length ) +{ + /* FIXME: this needs to fetch the position information from the parsed + * token and restore based on that.. */ + int i; + for ( i = 0; i < length; i++ ) { + if ( data[i] == '\n' ) + is->line -= 1; + } + + is->byte -= length; +} + + +static RunBuf *sourceStreamPopHead( StreamImpl *ss ) +{ + RunBuf *ret = ss->queue; + ss->queue = ss->queue->next; + if ( ss->queue == 0 ) + ss->queueTail = 0; + else + ss->queue->prev = 0; + return ret; +} + +static void sourceStreamAppend( StreamImpl *ss, RunBuf *runBuf ) +{ + if ( ss->queue == 0 ) { + runBuf->prev = runBuf->next = 0; + ss->queue = ss->queueTail = runBuf; + } + else { + ss->queueTail->next = runBuf; + runBuf->prev = ss->queueTail; + runBuf->next = 0; + ss->queueTail = runBuf; + } +} + +static void sourceStreamPrepend( StreamImpl *ss, RunBuf *runBuf ) +{ + if ( ss->queue == 0 ) { + runBuf->prev = runBuf->next = 0; + ss->queue = ss->queueTail = runBuf; + } + else { + ss->queue->prev = runBuf; + runBuf->prev = 0; + runBuf->next = ss->queue; + ss->queue = runBuf; + } +} + +/* + * Base run-time input streams. + */ + +int fdGetParseBlock( StreamImpl *ss, int skip, char **pdp, int *copied ) +{ + int ret = 0; + *copied = 0; + + /* Move over skip bytes. */ + RunBuf *buf = ss->queue; + while ( true ) { + if ( buf == 0 ) { + /* Got through the in-mem buffers without copying anything. */ + RunBuf *runBuf = newRunBuf(); + sourceStreamAppend( ss, runBuf ); + int received = ss->funcs->getDataSource( ss, runBuf->data, FSM_BUFSIZE ); + if ( received == 0 ) { + ret = INPUT_EOD; + break; + } + runBuf->length = received; + + int slen = received; + *pdp = runBuf->data; + *copied = slen; + ret = INPUT_DATA; + break; + } + + int avail = buf->length - buf->offset; + + /* Anything available in the current buffer. */ + if ( avail > 0 ) { + /* The source data from the current buffer. */ + char *src = &buf->data[buf->offset]; + + /* Need to skip? */ + if ( skip > 0 && skip >= avail ) { + /* Skipping the the whole source. */ + skip -= avail; + } + else { + /* Either skip is zero, or less than slen. Skip goes to zero. + * Some data left over, copy it. */ + src += skip; + avail -= skip; + skip = 0; + + int slen = avail; + *pdp = src; + *copied += slen; + ret = INPUT_DATA; + break; + } + } + + buf = buf->next; + } + + return ret; +} + +int fdGetData( StreamImpl *ss, char *dest, int length ) +{ + int copied = 0; + + /* Move over skip bytes. */ + RunBuf *buf = ss->queue; + while ( true ) { + if ( buf == 0 ) { + /* Got through the in-mem buffers without copying anything. */ + RunBuf *runBuf = newRunBuf(); + sourceStreamAppend( ss, runBuf ); + int received = ss->funcs->getDataSource( ss, runBuf->data, FSM_BUFSIZE ); + runBuf->length = received; + if ( received == 0 ) + break; + + buf = runBuf; + } + + int avail = buf->length - buf->offset; + + /* Anything available in the current buffer. */ + if ( avail > 0 ) { + /* The source data from the current buffer. */ + char *src = &buf->data[buf->offset]; + + int slen = avail < length ? avail : length; + memcpy( dest+copied, src, slen ) ; + copied += slen; + length -= slen; + } + + if ( length == 0 ) { + //debug( REALM_INPUT, "exiting get data\n", length ); + break; + } + + buf = buf->next; + } + + return copied; +} + +int fdConsumeData( StreamImpl *ss, int length, Location *loc ) +{ + int consumed = 0; + + /* Move over skip bytes. */ + while ( true ) { + RunBuf *buf = ss->queue; + + if ( buf == 0 ) + break; + + if ( buf->type == RunBufTokenType ) + break; + else if ( buf->type == RunBufIgnoreType ) + break; + else { + if ( loc->line == 0 ) { + loc->name = ss->name; + loc->line = ss->line; + loc->column = ss->column; + loc->byte = ss->byte; + } + + /* Anything available in the current buffer. */ + int avail = buf->length - buf->offset; + if ( avail > 0 ) { + /* The source data from the current buffer. */ + int slen = avail <= length ? avail : length; + consumed += slen; + length -= slen; + updatePosition( ss, buf->data + buf->offset, slen ); + buf->offset += slen; + ss->consumed += slen; + } + } + + if ( length == 0 ) + break; + + RunBuf *runBuf = sourceStreamPopHead( ss ); + free( runBuf ); + } + + return consumed; +} + +int fdUndoConsumeData( StreamImpl *ss, const char *data, int length ) +{ + RunBuf *newBuf = newRunBuf(); + newBuf->length = length; + memcpy( newBuf->data, data, length ); + sourceStreamPrepend( ss, newBuf ); + undoPosition( ss, data, length ); + ss->consumed -= length; + + return length; +} + +/* + * File + */ + +int fileGetDataSource( StreamImpl *ss, char *dest, int length ) +{ + //debug( REALM_INPUT, "inputStreamFileGetDataSource length = %ld\n", length ); + size_t res = fread( dest, 1, length, ss->file ); + return res; +} + +void initFileFuncs() +{ + memset( &fileFuncs, 0, sizeof(struct StreamFuncs) ); +} + +/* + * FD + */ + +int fdGetDataSource( StreamImpl *ss, char *dest, int length ) +{ + if ( ss->eof ) + return 0; + else { + long got = read( ss->fd, dest, length ); + if ( got == 0 ) + ss->eof = true; + return got; + } +} + +/* + * StreamImpl struct, this wraps the list of input streams. + */ + +void initStreamImpl( StreamImpl *is, const char *name ) +{ + memset( is, 0, sizeof(StreamImpl) ); + + is->name = name; + is->line = 1; + is->column = 1; + is->byte = 0; +} + +void clearStreamImpl( struct colm_program *prg, Tree **sp, StreamImpl *inputStream ) +{ + RunBuf *buf = inputStream->queue; + while ( buf != 0 ) { + switch ( buf->type ) { + case RunBufDataType: + break; + + case RunBufTokenType: + case RunBufIgnoreType: + case RunBufSourceType: + treeDownref( prg, sp, buf->tree ); + break; + } + + RunBuf *next = buf->next; + free( buf ); + buf = next; + } + + inputStream->queue = 0; +} + +static void inputStreamPrepend( StreamImpl *is, RunBuf *runBuf ) +{ + if ( is->queue == 0 ) { + runBuf->prev = runBuf->next = 0; + is->queue = is->queueTail = runBuf; + } + else { + is->queue->prev = runBuf; + runBuf->prev = 0; + runBuf->next = is->queue; + is->queue = runBuf; + } +} + +static RunBuf *inputStreamPopHead( StreamImpl *is ) +{ + RunBuf *ret = is->queue; + is->queue = is->queue->next; + if ( is->queue == 0 ) + is->queueTail = 0; + else + is->queue->prev = 0; + return ret; +} + +static void inputStreamAppend( StreamImpl *is, RunBuf *runBuf ) +{ + if ( is->queue == 0 ) { + runBuf->prev = runBuf->next = 0; + is->queue = is->queueTail = runBuf; + } + else { + is->queueTail->next = runBuf; + runBuf->prev = is->queueTail; + runBuf->next = 0; + is->queueTail = runBuf; + } +} + +static RunBuf *inputStreamPopTail( StreamImpl *is ) +{ + RunBuf *ret = is->queueTail; + is->queueTail = is->queueTail->prev; + if ( is->queueTail == 0 ) + is->queue = 0; + else + is->queueTail->next = 0; + return ret; +} + +static int isSourceStream( StreamImpl *is ) +{ + if ( is->queue != 0 && is->queue->type == RunBufSourceType ) + return true; + return false; +} + +static void _setEof( StreamImpl *is ) +{ + //debug( REALM_INPUT, "setting EOF in input stream\n" ); + is->eof = true; +} + +static void _unsetEof( StreamImpl *is ) +{ + if ( isSourceStream( is ) ) { + Stream *stream = (Stream*)is->queue->tree; + stream->in->eof = false; + } + else { + is->eof = false; + } +} + +static int _getParseBlock( StreamImpl *is, int skip, char **pdp, int *copied ) +{ + int ret = 0; + *copied = 0; + + /* Move over skip bytes. */ + RunBuf *buf = is->queue; + while ( true ) { + if ( buf == 0 ) { + /* Got through the in-mem buffers without copying anything. */ + ret = is->eof ? INPUT_EOF : INPUT_EOD; + break; + } + + if ( buf->type == RunBufSourceType ) { + Stream *stream = (Stream*)buf->tree; + int type = stream->in->funcs->getParseBlock( stream->in, skip, pdp, copied ); + +// if ( type == INPUT_EOD && !stream->in->eosSent ) { +// stream->in->eosSent = 1; +// ret = INPUT_EOS; +// continue; +// } + + if ( type == INPUT_EOD || type == INPUT_EOF ) { + //debug( REALM_INPUT, "skipping over input\n" ); + buf = buf->next; + continue; + } + + ret = type; + break; + } + + if ( buf->type == RunBufTokenType ) { + ret = INPUT_TREE; + break; + } + + if ( buf->type == RunBufIgnoreType ) { + ret = INPUT_IGNORE; + break; + } + + int avail = buf->length - buf->offset; + + /* Anything available in the current buffer. */ + if ( avail > 0 ) { + /* The source data from the current buffer. */ + char *src = &buf->data[buf->offset]; + + /* Need to skip? */ + if ( skip > 0 && skip >= avail ) { + /* Skipping the the whole source. */ + skip -= avail; + } + else { + /* Either skip is zero, or less than slen. Skip goes to zero. + * Some data left over, copy it. */ + src += skip; + avail -= skip; + skip = 0; + + *pdp = src; + *copied += avail; + ret = INPUT_DATA; + break; + } + } + + buf = buf->next; + } + +#if DEBUG + switch ( ret ) { + case INPUT_DATA: + //debug( REALM_INPUT, "get parse block: DATA: %d\n", *copied ); + break; + case INPUT_EOD: + //debug( REALM_INPUT, "get parse block: EOD\n" ); + break; + case INPUT_EOF: + //debug( REALM_INPUT, "get parse block: EOF\n" ); + break; + case INPUT_TREE: + //debug( REALM_INPUT, "get parse block: TREE\n" ); + break; + case INPUT_IGNORE: + //debug( REALM_INPUT, "get parse block: IGNORE\n" ); + break; + case INPUT_LANG_EL: + //debug( REALM_INPUT, "get parse block: LANG_EL\n" ); + break; + } +#endif + + return ret; +} + +static int _getData( StreamImpl *is, char *dest, int length ) +{ + int copied = 0; + + /* Move over skip bytes. */ + RunBuf *buf = is->queue; + while ( true ) { + if ( buf == 0 ) { + /* Got through the in-mem buffers without copying anything. */ + break; + } + + if ( buf->type == RunBufSourceType ) { + Stream *stream = (Stream*)buf->tree; + int glen = stream->in->funcs->getData( stream->in, dest+copied, length ); + + if ( glen == 0 ) { + //debug( REALM_INPUT, "skipping over input\n" ); + buf = buf->next; + continue; + } + + copied += glen; + length -= glen; + } + else if ( buf->type == RunBufTokenType ) + break; + else if ( buf->type == RunBufIgnoreType ) + break; + else { + int avail = buf->length - buf->offset; + + /* Anything available in the current buffer. */ + if ( avail > 0 ) { + /* The source data from the current buffer. */ + char *src = &buf->data[buf->offset]; + + int slen = avail <= length ? avail : length; + memcpy( dest+copied, src, slen ) ; + + copied += slen; + length -= slen; + } + } + + if ( length == 0 ) { + //debug( REALM_INPUT, "exiting get data\n", length ); + break; + } + + buf = buf->next; + } + + return copied; +} + +static int _consumeData( StreamImpl *is, int length, Location *loc ) +{ + //debug( REALM_INPUT, "consuming %d bytes\n", length ); + + int consumed = 0; + + /* Move over skip bytes. */ + while ( true ) { + RunBuf *buf = is->queue; + + if ( buf == 0 ) + break; + + if ( buf->type == RunBufSourceType ) { + Stream *stream = (Stream*)buf->tree; + int slen = stream->in->funcs->consumeData( stream->in, length, loc ); + //debug( REALM_INPUT, " got %d bytes from source\n", slen ); + + consumed += slen; + length -= slen; + } + else if ( buf->type == RunBufTokenType ) + break; + else if ( buf->type == RunBufIgnoreType ) + break; + else { + /* Anything available in the current buffer. */ + int avail = buf->length - buf->offset; + if ( avail > 0 ) { + /* The source data from the current buffer. */ + int slen = avail <= length ? avail : length; + consumed += slen; + length -= slen; + buf->offset += slen; + is->consumed += slen; + } + } + + if ( length == 0 ) { + //debug( REALM_INPUT, "exiting consume\n", length ); + break; + } + + RunBuf *runBuf = inputStreamPopHead( is ); + free( runBuf ); + } + + return consumed; +} + +static int _undoConsumeData( StreamImpl *is, const char *data, int length ) +{ + //debug( REALM_INPUT, "undoing consume of %ld bytes\n", length ); + + if ( is->consumed == 0 && isSourceStream( is ) ) { + Stream *stream = (Stream*)is->queue->tree; + int len = stream->in->funcs->undoConsumeData( stream->in, data, length ); + return len; + } + else { + RunBuf *newBuf = newRunBuf(); + newBuf->length = length; + memcpy( newBuf->data, data, length ); + inputStreamPrepend( is, newBuf ); + is->consumed -= length; + + return length; + } +} + +static Tree *_consumeTree( StreamImpl *is ) +{ + while ( is->queue != 0 && is->queue->type == RunBufDataType && is->queue->offset == is->queue->length ) { + RunBuf *runBuf = inputStreamPopHead( is ); + free( runBuf ); + } + + if ( is->queue != 0 && (is->queue->type == RunBufTokenType || is->queue->type == RunBufIgnoreType) ) { + RunBuf *runBuf = inputStreamPopHead( is ); + + /* FIXME: using runbufs here for this is a poor use of memory. */ + Tree *tree = runBuf->tree; + free(runBuf); + return tree; + } + + return 0; +} + +static void _undoConsumeTree( StreamImpl *is, Tree *tree, int ignore ) +{ + /* Create a new buffer for the data. This is the easy implementation. + * Something better is needed here. It puts a max on the amount of + * data that can be pushed back to the inputStream. */ + RunBuf *newBuf = newRunBuf(); + newBuf->type = ignore ? RunBufIgnoreType : RunBufTokenType; + newBuf->tree = tree; + inputStreamPrepend( is, newBuf ); +} + +static struct LangEl *_consumeLangEl( StreamImpl *is, long *bindId, char **data, long *length ) +{ + if ( isSourceStream( is ) ) { + Stream *stream = (Stream*)is->queue->tree; + return stream->in->funcs->consumeLangEl( stream->in, bindId, data, length ); + } + else { + assert( false ); + } +} + +static void _undoConsumeLangEl( StreamImpl *is ) +{ + if ( isSourceStream( is ) ) { + Stream *stream = (Stream*)is->queue->tree; + return stream->in->funcs->undoConsumeLangEl( stream->in ); + } + else { + assert( false ); + } +} + +static void _prependData( StreamImpl *is, const char *data, long length ) +{ + if ( isSourceStream( is ) && ((Stream*)is->queue->tree)->in->funcs == &streamFuncs ) { + Stream *stream = (Stream*)is->queue->tree; + + _prependData( stream->in, data, length ); + } + else { + /* Create a new buffer for the data. This is the easy implementation. + * Something better is needed here. It puts a max on the amount of + * data that can be pushed back to the inputStream. */ + assert( length < FSM_BUFSIZE ); + + RunBuf *newBuf = newRunBuf(); + newBuf->length = length; + memcpy( newBuf->data, data, length ); + + inputStreamPrepend( is, newBuf ); + } +} + +static void _prependTree( StreamImpl *is, Tree *tree, int ignore ) +{ + /* Create a new buffer for the data. This is the easy implementation. + * Something better is needed here. It puts a max on the amount of + * data that can be pushed back to the inputStream. */ + RunBuf *newBuf = newRunBuf(); + newBuf->type = ignore ? RunBufIgnoreType : RunBufTokenType; + newBuf->tree = tree; + inputStreamPrepend( is, newBuf ); +} + +static void _prependStream( StreamImpl *in, struct colm_tree *tree ) +{ + /* Create a new buffer for the data. This is the easy implementation. + * Something better is needed here. It puts a max on the amount of + * data that can be pushed back to the inputStream. */ + RunBuf *newBuf = newRunBuf(); + newBuf->type = RunBufSourceType; + newBuf->tree = tree; + inputStreamPrepend( in, newBuf ); +} + +static int _undoPrependData( StreamImpl *is, int length ) +{ + //debug( REALM_INPUT, "consuming %d bytes\n", length ); + + int consumed = 0; + + /* Move over skip bytes. */ + while ( true ) { + RunBuf *buf = is->queue; + + if ( buf == 0 ) + break; + + if ( buf->type == RunBufSourceType ) { + Stream *stream = (Stream*)buf->tree; + int slen = stream->in->funcs->undoPrependData( stream->in, length ); + + consumed += slen; + length -= slen; + } + else if ( buf->type == RunBufTokenType ) + break; + else if ( buf->type == RunBufIgnoreType ) + break; + else { + /* Anything available in the current buffer. */ + int avail = buf->length - buf->offset; + if ( avail > 0 ) { + /* The source data from the current buffer. */ + int slen = avail <= length ? avail : length; + consumed += slen; + length -= slen; + buf->offset += slen; + } + } + + if ( length == 0 ) + break; + + RunBuf *runBuf = inputStreamPopHead( is ); + free( runBuf ); + } + + return consumed; +} + +static Tree *_undoPrependTree( StreamImpl *is ) +{ + while ( is->queue != 0 && is->queue->type == RunBufDataType && is->queue->offset == is->queue->length ) { + RunBuf *runBuf = inputStreamPopHead( is ); + free( runBuf ); + } + + if ( is->queue != 0 && (is->queue->type == RunBufTokenType || is->queue->type == RunBufIgnoreType) ) { + RunBuf *runBuf = inputStreamPopHead( is ); + + /* FIXME: using runbufs here for this is a poor use of memory. */ + Tree *tree = runBuf->tree; + free(runBuf); + return tree; + } + + return 0; +} + +static void _appendData( StreamImpl *is, const char *data, long len ) +{ + while ( len > 0 ) { + RunBuf *ad = newRunBuf(); + inputStreamAppend( is, ad ); + + long consume = + len <= (long)sizeof(ad->data) ? + len : (long)sizeof(ad->data); + + memcpy( ad->data, data, consume ); + ad->length = consume; + + len -= consume; + data += consume; + } +} + +static Tree *_undoAppendData( StreamImpl *is, int length ) +{ + int consumed = 0; + + /* Move over skip bytes. */ + while ( true ) { + RunBuf *buf = is->queueTail; + + if ( buf == 0 ) + break; + + if ( buf->type == RunBufTokenType ) + break; + else if ( buf->type == RunBufIgnoreType ) + break; + else { + /* Anything available in the current buffer. */ + int avail = buf->length - buf->offset; + if ( avail > 0 ) { + /* The source data from the current buffer. */ + int slen = avail <= length ? avail : length; + consumed += slen; + length -= slen; + buf->length -= slen; + } + } + + if ( length == 0 ) + break; + + RunBuf *runBuf = inputStreamPopTail( is ); + free( runBuf ); + } + + return 0; +} + +static void _appendTree( StreamImpl *is, Tree *tree ) +{ + RunBuf *ad = newRunBuf(); + + inputStreamAppend( is, ad ); + + ad->type = RunBufTokenType; + ad->tree = tree; + ad->length = 0; +} + +static void _appendStream( StreamImpl *in, struct colm_tree *tree ) +{ + RunBuf *ad = newRunBuf(); + + inputStreamAppend( in, ad ); + + ad->type = RunBufSourceType; + ad->tree = tree; + ad->length = 0; +} + +static Tree *_undoAppendTree( StreamImpl *is ) +{ + RunBuf *runBuf = inputStreamPopTail( is ); + Tree *tree = runBuf->tree; + free( runBuf ); + return tree; +} + +static Tree *_undoAppendStream( StreamImpl *is ) +{ + RunBuf *runBuf = inputStreamPopTail( is ); + Tree *tree = runBuf->tree; + free( runBuf ); + return tree; +} + +struct StreamFuncs streamFuncs = +{ + &_getParseBlock, + &_getData, + &_consumeData, + &_undoConsumeData, + &_consumeTree, + &_undoConsumeTree, + &_consumeLangEl, + &_undoConsumeLangEl, + 0, // source data get, not needed. + &_setEof, + &_unsetEof, + &_prependData, + &_prependTree, + &_prependStream, + &_undoPrependData, + &_undoPrependTree, + 0, // FIXME: Add this. + &_appendData, + &_appendTree, + &_appendStream, + &_undoAppendData, + &_undoAppendTree, + &_undoAppendStream, +}; + +struct StreamFuncs fdFuncs = +{ + .getData = &fdGetData, + .getParseBlock = &fdGetParseBlock, + .consumeData = &fdConsumeData, + .undoConsumeData = &fdUndoConsumeData, + .getDataSource = &fdGetDataSource, +}; + +struct StreamFuncs fileFuncs = +{ + .getData = &fdGetData, + .getParseBlock = &fdGetParseBlock, + .consumeData = &fdConsumeData, + .undoConsumeData = &fdUndoConsumeData, + .getDataSource = &fileGetDataSource, +}; + + +StreamImpl *newSourceStreamFile( const char *name, FILE *file ) +{ + StreamImpl *ss = (StreamImpl*)malloc(sizeof(StreamImpl)); + initStreamImpl( ss, name ); + ss->funcs = &fileFuncs; + + ss->file = file; + + return ss; +} + +StreamImpl *newSourceStreamFd( const char *name, long fd ) +{ + StreamImpl *ss = (StreamImpl*)malloc(sizeof(StreamImpl)); + initStreamImpl( ss, name ); + ss->funcs = &fdFuncs; + + ss->fd = fd; + + return ss; +} + +StreamImpl *newSourceStreamGeneric( const char *name ) +{ + StreamImpl *ss = (StreamImpl*)malloc(sizeof(StreamImpl)); + initStreamImpl( ss, name ); + ss->funcs = &streamFuncs; + + return ss; +} diff --git a/src/input.h b/src/input.h new file mode 100644 index 0000000..1605ebc --- /dev/null +++ b/src/input.h @@ -0,0 +1,175 @@ +/* + * Copyright 2007-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _INPUT_H +#define _INPUT_H + +#include <stdio.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define FSM_BUFSIZE 8192 +//#define FSM_BUFSIZE 8 + +#define INPUT_DATA 1 +/* This is for data sources to return, not for the wrapper. */ +#define INPUT_EOD 2 +#define INPUT_EOF 3 +#define INPUT_EOS 4 +#define INPUT_LANG_EL 5 +#define INPUT_TREE 6 +#define INPUT_IGNORE 7 + +/* + * pdaRun <- fsmRun <- stream + * + * Activities we need to support: + * + * 1. Stuff data into an input stream each time we << + * 2. Detach an input stream, and attach another when we include + * 3. Send data back to an input stream when the parser backtracks + * 4. Temporarily stop parsing due to a lack of input. + * + * At any given time, the fsmRun struct may have a prefix of the stream's + * input. If getting data we first get what we can out of the fsmRun, then + * consult the stream. If sending data back, we first shift pointers in the + * fsmRun, then ship to the stream. If changing streams the old stream needs to + * take back unprocessed data from the fsmRun. + */ + +struct LangEl; +struct Pattern; +struct PatternItem; +struct Constructor; +struct ConsItem; +struct _FsmRun; +struct colm_tree; +struct colm_location; +struct colm_program; + +enum RunBufType { + RunBufDataType = 0, + RunBufTokenType, + RunBufIgnoreType, + RunBufSourceType +}; + +typedef struct _RunBuf +{ + enum RunBufType type; + char data[FSM_BUFSIZE]; + long length; + struct colm_tree *tree; + long offset; + struct _RunBuf *next, *prev; +} RunBuf; + +RunBuf *newRunBuf(); + +typedef struct _StreamImpl StreamImpl; + +struct StreamFuncs +{ + int (*getParseBlock)( StreamImpl *ss, int skip, char **pdp, int *copied ); + + int (*getData)( StreamImpl *ss, char *dest, int length ); + + int (*consumeData)( StreamImpl *ss, int length, struct colm_location *loc ); + int (*undoConsumeData)( StreamImpl *ss, const char *data, int length ); + + struct colm_tree *(*consumeTree)( StreamImpl *ss ); + void (*undoConsumeTree)( StreamImpl *ss, struct colm_tree *tree, int ignore ); + + /* Language elments (compile-time). */ + struct LangEl *(*consumeLangEl)( StreamImpl *ss, long *bindId, char **data, long *length ); + void (*undoConsumeLangEl)( StreamImpl *ss ); + + /* Private implmentation for some shared get data functions. */ + int (*getDataSource)( StreamImpl *ss, char *dest, int length ); + + void (*setEof)( StreamImpl *is ); + void (*unsetEof)( StreamImpl *is ); + + /* Prepending to a stream. */ + void (*prependData)( StreamImpl *in, const char *data, long len ); + void (*prependTree)( StreamImpl *is, struct colm_tree *tree, int ignore ); + void (*prependStream)( StreamImpl *in, struct colm_tree *tree ); + int (*undoPrependData)( StreamImpl *is, int length ); + struct colm_tree *(*undoPrependTree)( StreamImpl *is ); + struct colm_tree *(*undoPrependStream)( StreamImpl *in ); + + /* Appending to a stream. */ + void (*appendData)( StreamImpl *in, const char *data, long len ); + void (*appendTree)( StreamImpl *in, struct colm_tree *tree ); + void (*appendStream)( StreamImpl *in, struct colm_tree *tree ); + struct colm_tree *(*undoAppendData)( StreamImpl *in, int length ); + struct colm_tree *(*undoAppendTree)( StreamImpl *in ); + struct colm_tree *(*undoAppendStream)( StreamImpl *in ); +}; + +/* List of source streams. Enables streams to be pushed/popped. */ +struct _StreamImpl +{ + struct StreamFuncs *funcs; + + char eofSent; + char eof; + char eosSent; + + RunBuf *queue; + RunBuf *queueTail; + + const char *data; + long dlen; + int offset; + + long line; + long column; + long byte; + + const char *name; + FILE *file; + long fd; + + struct Pattern *pattern; + struct PatternItem *patItem; + struct Constructor *constructor; + struct ConsItem *consItem; + + int consumed; +}; + +StreamImpl *newSourceStreamPat( const char *name, struct Pattern *pattern ); +StreamImpl *newSourceStreamCons( const char *name, struct Constructor *constructor ); +StreamImpl *newSourceStreamFile( const char *name, FILE *file ); +StreamImpl *newSourceStreamFd( const char *name, long fd ); +StreamImpl *newSourceStreamGeneric( const char *name ); + +void updatePosition( StreamImpl *inputStream, const char *data, long length ); +void undoPosition( StreamImpl *inputStream, const char *data, long length ); + +#ifdef __cplusplus +} +#endif + +#endif /* _INPUT_H */ diff --git a/src/iter.c b/src/iter.c new file mode 100644 index 0000000..9e60a2d --- /dev/null +++ b/src/iter.c @@ -0,0 +1,490 @@ +/* + * Copyright 2007-2014 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <colm/tree.h> +#include <colm/bytecode.h> +#include <colm/program.h> +#include <assert.h> + +#define true 1 +#define false 0 + +void initTreeIter( TreeIter *treeIter, Tree **stackRoot, long rootSize, + const Ref *rootRef, int searchId ) +{ + treeIter->type = IT_Tree; + treeIter->rootRef = *rootRef; + treeIter->searchId = searchId; + treeIter->stackRoot = stackRoot; + treeIter->yieldSize = 0; + treeIter->rootSize = rootSize; + treeIter->ref.kid = 0; + treeIter->ref.next = 0; +} + +void initRevTreeIter( RevTreeIter *revTriter, Tree **stackRoot, long rootSize, + const Ref *rootRef, int searchId, int children ) +{ + revTriter->type = IT_RevTree; + revTriter->rootRef = *rootRef; + revTriter->searchId = searchId; + revTriter->stackRoot = stackRoot; + revTriter->yieldSize = children; + revTriter->rootSize = rootSize; + revTriter->kidAtYield = 0; + revTriter->children = children; + revTriter->ref.kid = 0; + revTriter->ref.next = 0; +} + +void initUserIter( UserIter *userIter, Tree **stackRoot, long rootSize, + long argSize, long searchId ) +{ + userIter->type = IT_User; + userIter->stackRoot = stackRoot; + userIter->argSize = argSize; + userIter->yieldSize = 0; + userIter->rootSize = rootSize; + userIter->resume = 0; + userIter->frame = 0; + userIter->searchId = searchId; + + userIter->ref.kid = 0; + userIter->ref.next = 0; +} + + +UserIter *uiterCreate( Program *prg, Tree ***psp, FunctionInfo *fi, long searchId ) +{ + Tree **sp = *psp; + + vm_pushn( sizeof(UserIter) / sizeof(Word) ); + void *mem = vm_ptop(); + UserIter *uiter = mem; + + Tree **stackRoot = vm_ptop(); + long rootSize = vm_ssize(); + + initUserIter( uiter, stackRoot, rootSize, fi->argSize, searchId ); + + *psp = sp; + return uiter; +} + +void uiterInit( Program *prg, Tree **sp, UserIter *uiter, + FunctionInfo *fi, int revertOn ) +{ + /* Set up the first yeild so when we resume it starts at the beginning. */ + uiter->ref.kid = 0; + uiter->yieldSize = vm_ssize() - uiter->rootSize; + uiter->frame = &uiter->stackRoot[-IFR_AA]; + + if ( revertOn ) + uiter->resume = prg->rtd->frameInfo[fi->frameId].codeWV; + else + uiter->resume = prg->rtd->frameInfo[fi->frameId].codeWC; +} + + +void treeIterDestroy( Program *prg, Tree ***psp, TreeIter *iter ) +{ + if ( (int)iter->type != 0 ) { + Tree **sp = *psp; + long curStackSize = vm_ssize() - iter->rootSize; + assert( iter->yieldSize == curStackSize ); + vm_popn( iter->yieldSize ); + iter->type = 0; + *psp = sp; + } +} + +void revTreeIterDestroy( struct colm_program *prg, Tree ***psp, RevTreeIter *riter ) +{ + if ( (int)riter->type != 0 ) { + Tree **sp = *psp; + long curStackSize = vm_ssize() - riter->rootSize; + assert( riter->yieldSize == curStackSize ); + vm_popn( riter->yieldSize ); + riter->type = 0; + *psp = sp; + } +} + +void userIterDestroy( Program *prg, Tree ***psp, UserIter *uiter ) +{ + if ( uiter != 0 && (int)uiter->type != 0 ) { + Tree **sp = *psp; + + /* We should always be coming from a yield. The current stack size will be + * nonzero and the stack size in the iterator will be correct. */ + long curStackSize = vm_ssize() - uiter->rootSize; + assert( uiter->yieldSize == curStackSize ); + + long argSize = uiter->argSize; + + vm_popn( uiter->yieldSize ); + vm_popn( sizeof(UserIter) / sizeof(Word) ); + vm_popn( argSize ); + + uiter->type = 0; + + *psp = sp; + } +} + +void userIterDestroy2( Program *prg, Tree ***psp, UserIter *uiter ) +{ + if ( uiter != 0 && (int)uiter->type != 0 ) { + Tree **sp = *psp; + + /* We should always be coming from a yield. The current stack size will be + * nonzero and the stack size in the iterator will be correct. */ + long curStackSize = vm_ssize() - uiter->rootSize; + assert( uiter->yieldSize == curStackSize ); + + long argSize = uiter->argSize; + + vm_popn( uiter->yieldSize ); + vm_popn( sizeof(UserIter) / sizeof(Word) ); + vm_popn( argSize ); + vm_pop(); + + uiter->type = 0; + + *psp = sp; + } +} + +Tree *treeIterDerefCur( TreeIter *iter ) +{ + return iter->ref.kid == 0 ? 0 : iter->ref.kid->tree; +} + +void setTriterCur( Program *prg, TreeIter *iter, Tree *tree ) +{ + iter->ref.kid->tree = tree; +} + +void setUiterCur( Program *prg, UserIter *uiter, Tree *tree ) +{ + uiter->ref.kid->tree = tree; +} + +void splitIterCur( Program *prg, Tree ***psp, TreeIter *iter ) +{ + if ( iter->ref.kid == 0 ) + return; + + splitRef( prg, psp, &iter->ref ); +} + +void iterFind( Program *prg, Tree ***psp, TreeIter *iter, int tryFirst ) +{ + int anyTree = iter->searchId == prg->rtd->anyId; + Tree **top = iter->stackRoot; + Kid *child; + Tree **sp = *psp; + +rec_call: + if ( tryFirst && ( iter->ref.kid->tree->id == iter->searchId || anyTree ) ) { + *psp = sp; + return; + } + else { + child = treeChild( prg, iter->ref.kid->tree ); + if ( child != 0 ) { + vm_contiguous( 2 ); + vm_push( (SW) iter->ref.next ); + vm_push( (SW) iter->ref.kid ); + iter->ref.kid = child; + iter->ref.next = (Ref*)vm_ptop(); + while ( iter->ref.kid != 0 ) { + tryFirst = true; + goto rec_call; + rec_return: + iter->ref.kid = iter->ref.kid->next; + } + iter->ref.kid = (Kid*)vm_pop(); + iter->ref.next = (Ref*)vm_pop(); + } + } + + if ( top != vm_ptop() ) + goto rec_return; + + iter->ref.kid = 0; + *psp = sp; +} + +Tree *treeIterAdvance( Program *prg, Tree ***psp, TreeIter *iter ) +{ + Tree **sp = *psp; + assert( iter->yieldSize == (vm_ssize() - iter->rootSize) ); + + if ( iter->ref.kid == 0 ) { + /* Kid is zero, start from the root. */ + iter->ref = iter->rootRef; + iterFind( prg, psp, iter, true ); + } + else { + /* Have a previous item, continue searching from there. */ + iterFind( prg, psp, iter, false ); + } + + sp = *psp; + iter->yieldSize = vm_ssize() - iter->rootSize; + + return (iter->ref.kid ? prg->trueVal : prg->falseVal ); +} + +Tree *treeIterNextChild( Program *prg, Tree ***psp, TreeIter *iter ) +{ + Tree **sp = *psp; + assert( iter->yieldSize == (vm_ssize() - iter->rootSize) ); + Kid *kid = 0; + + if ( iter->ref.kid == 0 ) { + /* Kid is zero, start from the first child. */ + Kid *child = treeChild( prg, iter->rootRef.kid->tree ); + + if ( child == 0 ) + iter->ref.next = 0; + else { + /* Make a reference to the root. */ + vm_contiguous( 2 ); + vm_push( (SW) iter->rootRef.next ); + vm_push( (SW) iter->rootRef.kid ); + iter->ref.next = (Ref*)vm_ptop(); + + kid = child; + } + } + else { + /* Start at next. */ + kid = iter->ref.kid->next; + } + + if ( iter->searchId != prg->rtd->anyId ) { + /* Have a previous item, go to the next sibling. */ + while ( kid != 0 && kid->tree->id != iter->searchId ) + kid = kid->next; + } + + iter->ref.kid = kid; + iter->yieldSize = vm_ssize() - iter->rootSize; + *psp = sp; + return ( iter->ref.kid ? prg->trueVal : prg->falseVal ); +} + +Tree *treeRevIterPrevChild( Program *prg, Tree ***psp, RevTreeIter *iter ) +{ + Tree **sp = *psp; + assert( iter->yieldSize == ( vm_ssize() - iter->rootSize ) ); + + if ( iter->kidAtYield != iter->ref.kid ) { + /* Need to reload the kids. */ + vm_popn( iter->children ); + + int c; + Kid *kid = treeChild( prg, iter->rootRef.kid->tree ); + for ( c = 0; c < iter->children; c++ ) { + vm_push( (SW)kid ); + kid = kid->next; + } + } + + if ( iter->ref.kid != 0 ) { + vm_pop_ignore(); + iter->children -= 1; + } + + if ( iter->searchId != prg->rtd->anyId ) { + /* Have a previous item, go to the next sibling. */ + while ( iter->children > 0 && ((Kid*)(vm_top()))->tree->id != iter->searchId ) { + iter->children -= 1; + vm_pop_ignore(); + } + } + + if ( iter->children == 0 ) { + iter->ref.next = 0; + iter->ref.kid = 0; + } + else { + iter->ref.next = &iter->rootRef; + iter->ref.kid = (Kid*)vm_top(); + } + + /* We will use this to detect a split above the iterated tree. */ + iter->kidAtYield = iter->ref.kid; + + iter->yieldSize = vm_ssize() - iter->rootSize; + + *psp = sp; + + return (iter->ref.kid ? prg->trueVal : prg->falseVal ); +} + +void iterFindRepeat( Program *prg, Tree ***psp, TreeIter *iter, int tryFirst ) +{ + Tree **sp = *psp; + int anyTree = iter->searchId == prg->rtd->anyId; + Tree **top = iter->stackRoot; + Kid *child; + +rec_call: + if ( tryFirst && ( iter->ref.kid->tree->id == iter->searchId || anyTree ) ) { + *psp = sp; + return; + } + else { + /* The repeat iterator is just like the normal top-down-left-right, + * execept it only goes into the children of a node if the node is the + * root of the iteration, or if does not have any neighbours to the + * right. */ + if ( top == vm_ptop() || iter->ref.kid->next == 0 ) { + child = treeChild( prg, iter->ref.kid->tree ); + if ( child != 0 ) { + vm_contiguous( 2 ); + vm_push( (SW) iter->ref.next ); + vm_push( (SW) iter->ref.kid ); + iter->ref.kid = child; + iter->ref.next = (Ref*)vm_ptop(); + while ( iter->ref.kid != 0 ) { + tryFirst = true; + goto rec_call; + rec_return: + iter->ref.kid = iter->ref.kid->next; + } + iter->ref.kid = (Kid*)vm_pop(); + iter->ref.next = (Ref*)vm_pop(); + } + } + } + + if ( top != vm_ptop() ) + goto rec_return; + + iter->ref.kid = 0; + *psp = sp; +} + +Tree *treeIterNextRepeat( Program *prg, Tree ***psp, TreeIter *iter ) +{ + Tree **sp = *psp; + assert( iter->yieldSize == ( vm_ssize() - iter->rootSize ) ); + + if ( iter->ref.kid == 0 ) { + /* Kid is zero, start from the root. */ + iter->ref = iter->rootRef; + iterFindRepeat( prg, psp, iter, true ); + } + else { + /* Have a previous item, continue searching from there. */ + iterFindRepeat( prg, psp, iter, false ); + } + + sp = *psp; + iter->yieldSize = vm_ssize() - iter->rootSize; + + return (iter->ref.kid ? prg->trueVal : prg->falseVal ); +} + +void iterFindRevRepeat( Program *prg, Tree ***psp, TreeIter *iter, int tryFirst ) +{ + Tree **sp = *psp; + int anyTree = iter->searchId == prg->rtd->anyId; + Tree **top = iter->stackRoot; + Kid *child; + + if ( tryFirst ) { + while ( true ) { + if ( top == vm_ptop() || iter->ref.kid->next == 0 ) { + child = treeChild( prg, iter->ref.kid->tree ); + + if ( child == 0 ) + break; + vm_contiguous( 2 ); + vm_push( (SW) iter->ref.next ); + vm_push( (SW) iter->ref.kid ); + iter->ref.kid = child; + iter->ref.next = (Ref*)vm_ptop(); + } + else { + /* Not the top and not there is a next, go over to it. */ + iter->ref.kid = iter->ref.kid->next; + } + } + + goto first; + } + + while ( true ) { + if ( top == vm_ptop() ) { + iter->ref.kid = 0; + return; + } + + if ( iter->ref.kid->next == 0 ) { + /* Go up one and then down. Remember we can't use iter->ref.next + * because the chain may have been split, setting it null (to + * prevent repeated walks up). */ + Ref *ref = (Ref*)vm_ptop(); + iter->ref.kid = treeChild( prg, ref->kid->tree ); + } + else { + iter->ref.kid = (Kid*)vm_pop(); + iter->ref.next = (Ref*)vm_pop(); + } +first: + if ( iter->ref.kid->tree->id == iter->searchId || anyTree ) { + *psp = sp; + return; + } + } + *psp = sp; + return; +} + + +Tree *treeIterPrevRepeat( Program *prg, Tree ***psp, TreeIter *iter ) +{ + Tree **sp = *psp; + assert( iter->yieldSize == (vm_ssize() - iter->rootSize) ); + + if ( iter->ref.kid == 0 ) { + /* Kid is zero, start from the root. */ + iter->ref = iter->rootRef; + iterFindRevRepeat( prg, psp, iter, true ); + } + else { + /* Have a previous item, continue searching from there. */ + iterFindRevRepeat( prg, psp, iter, false ); + } + + sp = *psp; + iter->yieldSize = vm_ssize() - iter->rootSize; + + return (iter->ref.kid ? prg->trueVal : prg->falseVal ); +} + + + diff --git a/src/keyops.h b/src/keyops.h new file mode 100644 index 0000000..a79881e --- /dev/null +++ b/src/keyops.h @@ -0,0 +1,196 @@ +/* + * Copyright 2001-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _KEYOPS_H +#define _KEYOPS_H + +#include <fstream> +#include <climits> + +enum MarkType +{ + MarkNone = 0, + MarkMark +}; + +typedef unsigned long long Size; + +struct Key +{ +private: + long key; + +public: + friend inline Key operator+(const Key key1, const Key key2); + friend inline Key operator-(const Key key1, const Key key2); + + friend inline bool operator<( const Key key1, const Key key2 ); + friend inline bool operator<=( const Key key1, const Key key2 ); + friend inline bool operator>( const Key key1, const Key key2 ); + friend inline bool operator>=( const Key key1, const Key key2 ); + friend inline bool operator==( const Key key1, const Key key2 ); + friend inline bool operator!=( const Key key1, const Key key2 ); + + friend struct KeyOps; + + Key( ) {} + Key( const Key &key ) : key(key.key) {} + Key( long key ) : key(key) {} + + /* Returns the value used to represent the key. This value must be + * interpreted based on signedness. */ + long getVal() const { return key; }; + + /* Returns the key casted to a long long. This form of the key does not + * require and signedness interpretation. */ + long long getLongLong() const; + + bool isUpper() const { return ( 'A' <= key && key <= 'Z' ); } + bool isLower() const { return ( 'a' <= key && key <= 'z' ); } + bool isPrintable() const { return ( 32 <= key && key < 127 ); } + + Key toUpper() const + { return Key( 'A' + ( key - 'a' ) ); } + Key toLower() const + { return Key( 'a' + ( key - 'A' ) ); } + + void operator+=( const Key other ) + { key += other.key; } + + void operator-=( const Key other ) + { key -= other.key; } + + void operator|=( const Key other ) + { key |= other.key; } + + /* Decrement. Needed only for ranges. */ + inline void decrement(); + inline void increment(); +}; + +struct HostType +{ + const char *data1; + const char *data2; + long long minVal; + long long maxVal; + unsigned int size; +}; + +struct HostLang +{ + HostType *hostTypes; + int numHostTypes; + HostType *defaultAlphType; + bool explicitUnsigned; +}; + +extern HostLang *hostLang; +extern HostLang hostLangC; + +/* An abstraction of the key operators that manages key operations such as + * comparison and increment according the signedness of the key. */ +struct KeyOps +{ + /* Default to signed alphabet. */ + KeyOps() : alphType(0) {} + + Key minKey, maxKey; + HostType *alphType; + + void setAlphType( HostType *alphType ) + { + this->alphType = alphType; + minKey = (long) alphType->minVal; + maxKey = (long) alphType->maxVal; + } + + /* Compute the distance between two keys. */ + Size span( Key key1, Key key2 ) + { + return (unsigned long long)( (long long)key2.key - (long long)key1.key + 1) ; + } + + Size alphSize() + { return span( minKey, maxKey ); } +}; + +inline bool operator<( const Key key1, const Key key2 ) +{ + return key1.key < key2.key; +} + +inline bool operator<=( const Key key1, const Key key2 ) +{ + return key1.key <= key2.key; +} + +inline bool operator>( const Key key1, const Key key2 ) +{ + return key1.key > key2.key; +} + +inline bool operator>=( const Key key1, const Key key2 ) +{ + return key1.key >= key2.key; +} + +inline bool operator==( const Key key1, const Key key2 ) +{ + return key1.key == key2.key; +} + +inline bool operator!=( const Key key1, const Key key2 ) +{ + return key1.key != key2.key; +} + +/* Decrement. Needed only for ranges. */ +inline void Key::decrement() +{ + key = key - 1; +} + +/* Increment. Needed only for ranges. */ +inline void Key::increment() +{ + key = key + 1; +} + +inline long long Key::getLongLong() const +{ + return (long long) key; +} + +inline Key operator+(const Key key1, const Key key2) +{ + return Key( key1.key + key2.key ); +} + +inline Key operator-(const Key key1, const Key key2) +{ + return Key( key1.key - key2.key ); +} + +const char *findFileExtension( const char *stemFile ); +char *fileNameFromStem( const char *stemFile, const char *suffix ); + +#endif /* _KEYOPS_H */ diff --git a/src/list.c b/src/list.c new file mode 100644 index 0000000..d9180b7 --- /dev/null +++ b/src/list.c @@ -0,0 +1,105 @@ +/* + * Copyright 2007-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <colm/pdarun.h> + +void listAddAfter( List *list, ListEl *prev_el, ListEl *new_el ) +{ + /* Set the previous pointer of new_el to prev_el. We do + * this regardless of the state of the list. */ + new_el->prev = prev_el; + + /* Set forward pointers. */ + if (prev_el == 0) { + /* There was no prev_el, we are inserting at the head. */ + new_el->next = list->head; + list->head = new_el; + } + else { + /* There was a prev_el, we can access previous next. */ + new_el->next = prev_el->next; + prev_el->next = new_el; + } + + /* Set reverse pointers. */ + if (new_el->next == 0) { + /* There is no next element. Set the tail pointer. */ + list->tail = new_el; + } + else { + /* There is a next element. Set it's prev pointer. */ + new_el->next->prev = new_el; + } + + /* Update list length. */ + list->listLen++; +} + +void listAddBefore( List *list, ListEl *next_el, ListEl *new_el) +{ + /* Set the next pointer of the new element to next_el. We do + * this regardless of the state of the list. */ + new_el->next = next_el; + + /* Set reverse pointers. */ + if (next_el == 0) { + /* There is no next elememnt. We are inserting at the tail. */ + new_el->prev = list->tail; + list->tail = new_el; + } + else { + /* There is a next element and we can access next's previous. */ + new_el->prev = next_el->prev; + next_el->prev = new_el; + } + + /* Set forward pointers. */ + if (new_el->prev == 0) { + /* There is no previous element. Set the head pointer.*/ + list->head = new_el; + } + else { + /* There is a previous element, set it's next pointer to new_el. */ + new_el->prev->next = new_el; + } + + list->listLen++; +} + +ListEl *listDetach( List *list, ListEl *el ) +{ + /* Set forward pointers to skip over el. */ + if (el->prev == 0) + list->head = el->next; + else + el->prev->next = el->next; + + /* Set reverse pointers to skip over el. */ + if (el->next == 0) + list->tail = el->prev; + else + el->next->prev = el->prev; + + /* Update List length and return element we detached. */ + list->listLen--; + return el; +} + diff --git a/src/loadcolm.cc b/src/loadcolm.cc new file mode 100644 index 0000000..6bdac1c --- /dev/null +++ b/src/loadcolm.cc @@ -0,0 +1,2341 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <iostream> +#include <errno.h> + +#include "parser.h" +#include "config.h" +#include "avltree.h" +#include "parsedata.h" +#include "parser.h" +#include "global.h" +#include "input.h" +#include "loadcolm.h" +#include "if2.h" +#include "colm/colm.h" + +extern RuntimeData colm_object; + +InputLoc::InputLoc( colm_location *pcloc ) +{ + if ( pcloc != 0 ) { + fileName = pcloc->name; + line = pcloc->line; + col = pcloc->column; + } + else { + fileName = 0; + line = -1; + col = -1; + } +} + + +String unescape( const String &s ) +{ + String out( String::Fresh(), s.length() ); + char *d = out.data; + + for ( int i = 0; i < s.length(); ) { + if ( s[i] == '\\' ) { + switch ( s[i+1] ) { + case '0': *d++ = '\0'; break; + case 'a': *d++ = '\a'; break; + case 'b': *d++ = '\b'; break; + case 't': *d++ = '\t'; break; + case 'n': *d++ = '\n'; break; + case 'v': *d++ = '\v'; break; + case 'f': *d++ = '\f'; break; + case 'r': *d++ = '\r'; break; + default: *d++ = s[i+1]; break; + } + i += 2; + } + else { + *d++ = s[i]; + i += 1; + } + } + out.chop( d - out.data ); + return out; +} + + +struct LoadColm +: + public BaseParser +{ + LoadColm( Compiler *pd, const char *inputFileName ) + : + BaseParser( pd ), + inputFileName( inputFileName ) + {} + + const char *inputFileName; + + Literal *walkLexRangeLit( lex_range_lit lexRangeLit ) + { + Literal *literal = 0; + switch ( lexRangeLit.prodName() ) { + case lex_range_lit::_Lit: { + String lit = lexRangeLit.lex_lit().data(); + literal = Literal::cons( lexRangeLit.lex_lit().loc(), lit, Literal::LitString ); + break; + } + case lex_range_lit::_Number: { + String num = lexRangeLit.lex_num().text().c_str(); + literal = Literal::cons( lexRangeLit.lex_num().loc(), num, Literal::Number ); + break; + }} + return literal; + } + + LexFactor *walkLexFactor( lex_factor lexFactor ) + { + LexFactor *factor = 0; + switch ( lexFactor.prodName() ) { + case lex_factor::_Literal: { + String litString = lexFactor.lex_lit().data(); + Literal *literal = Literal::cons( lexFactor.lex_lit().loc(), + litString, Literal::LitString ); + factor = LexFactor::cons( literal ); + break; + } + case lex_factor::_Id: { + String id = lexFactor.lex_id().data(); + factor = lexRlFactorName( id, lexFactor.lex_id().loc() ); + break; + } + case lex_factor::_Range: { + Literal *low = walkLexRangeLit( lexFactor.Low() ); + Literal *high = walkLexRangeLit( lexFactor.High() ); + + Range *range = Range::cons( low, high ); + factor = LexFactor::cons( range ); + break; + } + case lex_factor::_PosOrBlock: { + ReOrBlock *block = walkRegOrData( lexFactor.reg_or_data() ); + factor = LexFactor::cons( ReItem::cons( block, ReItem::OrBlock ) ); + break; + } + case lex_factor::_NegOrBlock: { + ReOrBlock *block = walkRegOrData( lexFactor.reg_or_data() ); + factor = LexFactor::cons( ReItem::cons( block, ReItem::NegOrBlock ) ); + break; + } + case lex_factor::_Number: { + String number = lexFactor.lex_uint().text().c_str(); + factor = LexFactor::cons( Literal::cons( lexFactor.lex_uint().loc(), + number, Literal::Number ) ); + break; + } + case lex_factor::_Hex: { + String number = lexFactor.lex_hex().text().c_str(); + factor = LexFactor::cons( Literal::cons( lexFactor.lex_hex().loc(), + number, Literal::Number ) ); + break; + } + case lex_factor::_Paren: { + lex_expr LexExpr = lexFactor.lex_expr(); + LexExpression *expr = walkLexExpr( LexExpr ); + LexJoin *join = LexJoin::cons( expr ); + factor = LexFactor::cons( join ); + break; + }} + return factor; + } + + LexFactorAug *walkLexFactorAug( lex_factor_rep LexFactorRepTree ) + { + LexFactorRep *factorRep = walkLexFactorRep( LexFactorRepTree ); + return LexFactorAug::cons( factorRep ); + } + + LangExpr *walkCodeExpr( code_expr codeExpr ) + { + LangExpr *expr = 0; + LangExpr *relational = walkCodeRelational( codeExpr.code_relational() ); + + switch ( codeExpr.prodName() ) { + case code_expr::_AmpAmp: { + LangExpr *left = walkCodeExpr( codeExpr._code_expr() ); + + InputLoc loc = codeExpr.AMPAMP().loc(); + expr = LangExpr::cons( loc, left, OP_LogicalAnd, relational ); + break; + } + case code_expr::_BarBar: { + LangExpr *left = walkCodeExpr( codeExpr._code_expr() ); + + InputLoc loc = codeExpr.BARBAR().loc(); + expr = LangExpr::cons( loc, left, OP_LogicalOr, relational ); + break; + } + case code_expr::_Base: { + expr = relational; + break; + }} + return expr; + } + + LangStmt *walkStatement( statement Statement ) + { + LangStmt *stmt = 0; + switch ( Statement.prodName() ) { + case statement::_Print: { + print_stmt printStmt = Statement.print_stmt(); + stmt = walkPrintStmt( printStmt ); + break; + } + case statement::_Expr: { + expr_stmt exprStmt = Statement.expr_stmt(); + stmt = walkExprStmt( exprStmt ); + break; + } + case statement::_VarDef: { + ObjectField *objField = walkVarDef( Statement.var_def() ); + LangExpr *expr = walkOptDefInit( Statement.opt_def_init() ); + stmt = varDef( objField, expr, LangStmt::AssignType ); + break; + } + case statement::_For: { + pushScope(); + + String forDecl = Statement.id().text().c_str(); + TypeRef *typeRef = walkTypeRef( Statement.type_ref() ); + StmtList *stmtList = walkBlockOrSingle( Statement.block_or_single() ); + + IterCall *iterCall = walkIterCall( Statement.iter_call() ); + + stmt = forScope( Statement.id().loc(), forDecl, + curScope, typeRef, iterCall, stmtList ); + + popScope(); + break; + } + case statement::_If: { + pushScope(); + + LangExpr *expr = walkCodeExpr( Statement.code_expr() ); + StmtList *stmtList = walkBlockOrSingle( Statement.block_or_single() ); + + popScope(); + + LangStmt *elsifList = walkElsifList( Statement.elsif_list() ); + stmt = LangStmt::cons( LangStmt::IfType, expr, stmtList, elsifList ); + break; + } + case statement::_While: { + pushScope(); + LangExpr *expr = walkCodeExpr( Statement.code_expr() ); + StmtList *stmtList = walkBlockOrSingle( Statement.block_or_single() ); + stmt = LangStmt::cons( LangStmt::WhileType, expr, stmtList ); + popScope(); + break; + } + case statement::_LhsVarRef: { + LangVarRef *varRef = walkVarRef( Statement.var_ref() ); + LangExpr *expr = walkCodeExpr( Statement.code_expr() ); + stmt = LangStmt::cons( varRef->loc, LangStmt::AssignType, varRef, expr ); + break; + } + case statement::_Yield: { + LangVarRef *varRef = walkVarRef( Statement.var_ref() ); + stmt = LangStmt::cons( LangStmt::YieldType, varRef ); + break; + } + case statement::_Return: { + LangExpr *expr = walkCodeExpr( Statement.code_expr() ); + stmt = LangStmt::cons( Statement.loc(), LangStmt::ReturnType, expr ); + break; + } + case statement::_Break: { + stmt = LangStmt::cons( LangStmt::BreakType ); + break; + } + case statement::_Reject: { + stmt = LangStmt::cons( Statement.REJECT().loc(), LangStmt::RejectType ); + break; + }} + return stmt; + } + + StmtList *walkLangStmtList( lang_stmt_list langStmtList ) + { + StmtList *retList = new StmtList; + _repeat_statement stmtList = langStmtList.StmtList(); + + /* Walk the list of items. */ + while ( !stmtList.end() ) { + statement Statement = stmtList.value(); + LangStmt *stmt = walkStatement( Statement ); + if ( stmt != 0 ) + retList->append( stmt ); + stmtList = stmtList.next(); + } + + require_pattern require = langStmtList.opt_require_stmt().require_pattern(); + if ( require != 0 ) { + pushScope(); + + LangVarRef *varRef = walkVarRef( require.var_ref() ); + PatternItemList *list = walkPattern( require.pattern(), varRef ); + LangExpr *expr = match( require.REQUIRE().loc(), varRef, list ); + + StmtList *reqList = walkLangStmtList( langStmtList.opt_require_stmt().lang_stmt_list() ); + + LangStmt *stmt = LangStmt::cons( LangStmt::IfType, expr, reqList, 0 ); + + popScope(); + + retList->append( stmt ); + } + + return retList; + } + + void walkTokenDef( token_def TokenDef ) + { + String name = TokenDef.id().data(); + + bool niLeft = walkNoIgnoreLeft( TokenDef.no_ignore_left() ); + bool niRight = walkNoIgnoreRight( TokenDef.no_ignore_right() ); + + ObjectDef *objectDef = walkVarDefList( TokenDef.VarDefList() ); + objectDef->name = name; + + LexJoin *join = 0; + if ( TokenDef.opt_lex_expr().lex_expr() != 0 ) { + LexExpression *expr = walkLexExpr( TokenDef.opt_lex_expr().lex_expr() ); + join = LexJoin::cons( expr ); + } + + CodeBlock *translate = walkOptTranslate( TokenDef.opt_translate() ); + + defineToken( TokenDef.id().loc(), name, join, objectDef, + translate, false, niLeft, niRight ); + } + + void walkIgnoreCollector( ic_def IgnoreCollector ) + { + String id = IgnoreCollector.id().data(); + zeroDef( IgnoreCollector.id().loc(), id ); + } + + String walkOptId( opt_id optId ) + { + String name; + if ( optId.prodName() == opt_id::_Id ) + name = optId.id().data(); + return name; + } + + ObjectDef *walkVarDefList( _repeat_var_def varDefList ) + { + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, + String(), pd->nextObjectId++ ); + + while ( !varDefList.end() ) { + ObjectField *varDef = walkVarDef( varDefList.value() ); + objVarDef( objectDef, varDef ); + varDefList = varDefList.next(); + } + + return objectDef; + } + + void walkPreEof( pre_eof_def PreEofDef ) + { + ObjectDef *localFrame = blockOpen(); + StmtList *stmtList = walkLangStmtList( PreEofDef.lang_stmt_list() ); + preEof( PreEofDef.PREEOF().loc(), stmtList, localFrame ); + blockClose(); + } + + void walkIgnoreDef( ignore_def IgnoreDef ) + { + String name = walkOptId( IgnoreDef.opt_id() ); + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, + name, pd->nextObjectId++ ); + + LexJoin *join = 0; + if ( IgnoreDef.opt_lex_expr().lex_expr() != 0 ) { + LexExpression *expr = walkLexExpr( IgnoreDef.opt_lex_expr().lex_expr() ); + join = LexJoin::cons( expr ); + } + + defineToken( IgnoreDef.IGNORE().loc(), name, join, objectDef, + 0, true, false, false ); + } + + LangExpr *walkCodeMultiplicitive( code_multiplicitive mult ) + { + LangExpr *expr = 0; + LangExpr *right = walkCodeUnary( mult.code_unary() ); + switch ( mult.prodName() ) { + case code_multiplicitive::_Star: { + LangExpr *left = walkCodeMultiplicitive( mult._code_multiplicitive() ); + expr = LangExpr::cons( mult.STAR().loc(), left, '*', right ); + break; + } + case code_multiplicitive::_Fslash: { + LangExpr *left = walkCodeMultiplicitive( mult._code_multiplicitive() ); + expr = LangExpr::cons( mult.FSLASH().loc(), left, '/', right ); + break; + } + case code_multiplicitive::_Base: { + expr = right; + break; + }} + return expr; + } + + PatternItemList *walkPatternElTypeOrLit( pattern_el_lel typeOrLit, + LangVarRef *patternVarRef ) + { + NamespaceQual *nspaceQual = walkRegionQual( typeOrLit.region_qual() ); + RepeatType repeatType = walkOptRepeat( typeOrLit.opt_repeat() ); + + PatternItemList *list = 0; + switch ( typeOrLit.prodName() ) { + case pattern_el_lel::_Id: { + String id = typeOrLit.id().data(); + list = patternElNamed( typeOrLit.id().loc(), patternVarRef, + nspaceQual, id, repeatType ); + break; + } + case pattern_el_lel::_Lit: { + String lit = typeOrLit.backtick_lit().data(); + list = patternElType( typeOrLit.backtick_lit().loc(), patternVarRef, + nspaceQual, lit, repeatType ); + break; + }} + + return list; + } + + LangVarRef *walkOptLabel( opt_label optLabel ) + { + LangVarRef *varRef = 0; + if ( optLabel.prodName() == opt_label::_Id ) { + String id = optLabel.id().data(); + varRef = LangVarRef::cons( optLabel.id().loc(), + curContext(), curScope, id ); + } + return varRef; + } + + PatternItemList *walkPatternEl( pattern_el patternEl, LangVarRef *patternVarRef ) + { + PatternItemList *list = 0; + switch ( patternEl.prodName() ) { + case pattern_el::_Dq: { + list = walkLitpatElList( patternEl.LitpatElList(), + patternEl.dq_lit_term().CONS_DQ_NL(), patternVarRef ); + break; + } + case pattern_el::_Sq: { + list = walkPatSqConsDataList( patternEl.SqConsDataList(), + patternEl.sq_lit_term().CONS_SQ_NL() ); + break; + } + case pattern_el::_Tilde: { + String patternData = patternEl.opt_tilde_data().text().c_str(); + patternData += '\n'; + PatternItem *patternItem = PatternItem::cons( PatternItem::InputTextForm, + patternEl.opt_tilde_data().loc(), patternData ); + list = PatternItemList::cons( patternItem ); + break; + } + case pattern_el::_PatternEl: { + PatternItemList *typeOrLitList = walkPatternElTypeOrLit( + patternEl.pattern_el_lel(), patternVarRef ); + LangVarRef *varRef = walkOptLabel( patternEl.opt_label() ); + list = consPatternEl( varRef, typeOrLitList ); + break; + }} + return list; + } + + PatternItemList *walkLitpatEl( litpat_el litpatEl, LangVarRef *patternVarRef ) + { + PatternItemList *list = 0; + switch ( litpatEl.prodName() ) { + case litpat_el::_ConsData: { + String consData = unescape( litpatEl.dq_cons_data().text().c_str() ); + PatternItem *patternItem = PatternItem::cons( PatternItem::InputTextForm, + litpatEl.dq_cons_data().loc(), consData ); + list = PatternItemList::cons( patternItem ); + break; + } + case litpat_el::_SubList: { + list = walkPatternElList( litpatEl.PatternElList(), patternVarRef ); + break; + }} + return list; + } + + PatternItemList *walkPatSqConsDataList( _repeat_sq_cons_data sqConsDataList, CONS_SQ_NL Nl ) + { + PatternItemList *list = new PatternItemList; + while ( !sqConsDataList.end() ) { + String consData = unescape( sqConsDataList.value().text().c_str() ); + PatternItem *patternItem = PatternItem::cons( PatternItem::InputTextForm, + sqConsDataList.value().loc(), consData ); + PatternItemList *tail = PatternItemList::cons( patternItem ); + list = patListConcat( list, tail ); + + sqConsDataList = sqConsDataList.next(); + } + + if ( Nl != 0 ) { + String nl = unescape( Nl.data() ); + PatternItem *patternItem = PatternItem::cons( PatternItem::InputTextForm, + Nl.loc(), nl ); + PatternItemList *term = PatternItemList::cons( patternItem ); + list = patListConcat( list, term ); + } + + return list; + } + + ConsItemList *walkConsSqConsDataList( _repeat_sq_cons_data sqConsDataList, CONS_SQ_NL Nl ) + { + ConsItemList *list = new ConsItemList; + while ( !sqConsDataList.end() ) { + String consData = unescape( sqConsDataList.value().text().c_str() ); + ConsItem *consItem = ConsItem::cons( + sqConsDataList.value().loc(), ConsItem::InputText, consData ); + ConsItemList *tail = ConsItemList::cons( consItem ); + list = consListConcat( list, tail ); + + sqConsDataList = sqConsDataList.next(); + } + + if ( Nl != 0 ) { + String nl = unescape( Nl.data() ); + ConsItem *consItem = ConsItem::cons( + Nl.loc(), ConsItem::InputText, nl ); + ConsItemList *term = ConsItemList::cons( consItem ); + list = consListConcat( list, term ); + } + + return list; + } + + PatternItemList *walkLitpatElList( _repeat_litpat_el litpatElList, CONS_DQ_NL Nl, + LangVarRef *patternVarRef ) + { + PatternItemList *list = new PatternItemList; + while ( !litpatElList.end() ) { + PatternItemList *tail = walkLitpatEl( litpatElList.value(), patternVarRef ); + list = patListConcat( list, tail ); + litpatElList = litpatElList.next(); + } + + if ( Nl != 0 ) { + String nl = unescape( Nl.data() ); + PatternItem *patternItem = PatternItem::cons( PatternItem::InputTextForm, + Nl.loc(), nl ); + PatternItemList *term = PatternItemList::cons( patternItem ); + list = patListConcat( list, term ); + } + + return list; + } + + PatternItemList *walkPatternElList( _repeat_pattern_el patternElList, + LangVarRef *patternVarRef ) + { + PatternItemList *list = new PatternItemList; + while ( !patternElList.end() ) { + PatternItemList *tail = walkPatternEl( patternElList.value(), patternVarRef ); + list = patListConcat( list, tail ); + patternElList = patternElList.next(); + } + return list; + } + + PatternItemList *walkPattternTopEl( pattern_top_el patternTopEl, LangVarRef *patternVarRef ) + { + PatternItemList *list = 0; + switch ( patternTopEl.prodName() ) { + case pattern_top_el::_Dq: { + list = walkLitpatElList( patternTopEl.LitpatElList(), + patternTopEl.dq_lit_term().CONS_DQ_NL(), patternVarRef ); + break; + } + case pattern_top_el::_Sq: { + list = walkPatSqConsDataList( patternTopEl.SqConsDataList(), + patternTopEl.sq_lit_term().CONS_SQ_NL() ); + break; + } + case pattern_top_el::_Tilde: { + String patternData = patternTopEl.opt_tilde_data().text().c_str(); + patternData += '\n'; + PatternItem *patternItem = PatternItem::cons( PatternItem::InputTextForm, + patternTopEl.opt_tilde_data().loc(), patternData ); + list = PatternItemList::cons( patternItem ); + break; + } + case pattern_top_el::_SubList: { + list = walkPatternElList( patternTopEl.PatternElList(), patternVarRef ); + break; + }} + return list; + } + + PatternItemList *walkPatternList( pattern_list patternList, LangVarRef *patternVarRef ) + { + PatternItemList *list = 0; + switch ( patternList.prodName() ) { + case pattern_list::_List: { + PatternItemList *left = walkPatternList( patternList._pattern_list(), patternVarRef ); + PatternItemList *right = walkPattternTopEl( patternList.pattern_top_el(), patternVarRef ); + list = patListConcat( left, right ); + break; + } + case pattern_list::_Base: { + list = walkPattternTopEl( patternList.pattern_top_el(), patternVarRef ); + break; + }} + return list; + } + + PatternItemList *walkPattern( pattern Pattern, LangVarRef *patternVarRef ) + { + return walkPatternList( Pattern.pattern_list(), patternVarRef ); + } + + LangExpr *walkOptDefInit( opt_def_init optDefInit ) + { + LangExpr *expr = 0; + if ( optDefInit.prodName() == opt_def_init::_Init ) + expr = walkCodeExpr( optDefInit.code_expr() ); + return expr; + } + + LangStmt *walkExportDef( export_def exportDef ) + { + ObjectField *objField = walkVarDef( exportDef.var_def() ); + LangExpr *expr = walkOptDefInit( exportDef.opt_def_init() ); + + return exportStmt( objField, LangStmt::AssignType, expr ); + } + + LangStmt *walkGlobalDef( global_def GlobalDef ) + { + ObjectField *objField = walkVarDef( GlobalDef.var_def() ); + LangExpr *expr = walkOptDefInit( GlobalDef.opt_def_init() ); + + return globalDef( objField, expr, LangStmt::AssignType ); + } + + void walkAliasDef( alias_def aliasDef ) + { + String id = aliasDef.id().data(); + TypeRef *typeRef = walkTypeRef( aliasDef.type_ref() ); + alias( aliasDef.id().loc(), id, typeRef ); + } + + CodeBlock *walkOptTranslate( opt_translate optTranslate ) + { + CodeBlock *block = 0; + if ( optTranslate.prodName() == opt_translate::_Translate ) { + ObjectDef *localFrame = blockOpen(); + StmtList *stmtList = walkLangStmtList( optTranslate.lang_stmt_list() ); + block = CodeBlock::cons( stmtList, localFrame ); + block->context = curContext(); + blockClose(); + } + return block; + } + + PredDecl *walkPredToken( pred_token predToken ) + { + NamespaceQual *nspaceQual = walkRegionQual( predToken.region_qual() ); + PredDecl *predDecl = 0; + switch ( predToken.prodName() ) { + case pred_token::_Id: { + String id = predToken.id().data(); + predDecl = predTokenName( predToken.id().loc(), nspaceQual, id ); + break; + } + case pred_token::_Lit: { + String lit = predToken.backtick_lit().data(); + predDecl = predTokenLit( predToken.backtick_lit().loc(), lit, nspaceQual ); + break; + }} + return predDecl; + } + + PredDeclList *walkPredTokenList( pred_token_list predTokenList ) + { + PredDeclList *list = 0; + switch ( predTokenList.prodName() ) { + case pred_token_list::_List: { + list = walkPredTokenList( predTokenList._pred_token_list() ); + PredDecl *predDecl = walkPredToken( predTokenList.pred_token() ); + list->append( predDecl ); + break; + } + case pred_token_list::_Base: { + PredDecl *predDecl = walkPredToken( predTokenList.pred_token() ); + list = new PredDeclList; + list->append( predDecl ); + break; + }} + return list; + } + + PredType walkPredType( pred_type predType ) + { + PredType pt = PredLeft; + switch ( predType.prodName() ) { + case pred_type::_Left: + pt = PredLeft; + break; + case pred_type::_Right: + pt = PredRight; + break; + case pred_type::_NonAssoc: + pt = PredNonassoc; + break; + } + + return pt; + } + + void walkPrecedenceDef( precedence_def precedenceDef ) + { + PredType predType = walkPredType( precedenceDef.pred_type() ); + PredDeclList *predDeclList = walkPredTokenList( precedenceDef.pred_token_list() ); + precedenceStmt( predType, predDeclList ); + } + + StmtList *walkInclude( include Include ) + { + String lit = ""; + _repeat_sq_cons_data sqConsDataList = Include.SqConsDataList(); + while ( !sqConsDataList.end() ) { + colm_data *data = sqConsDataList.value().data(); + lit.append( data->data, data->length ); + sqConsDataList = sqConsDataList.next(); + } + + String file = unescape( lit ); + + const char *argv[2]; + argv[0] = file.data; + argv[1] = 0; + + colm_program *program = colm_new_program( &colm_object ); + colm_run_program( program, 1, argv ); + + /* Extract the parse tree. */ + start Start = ColmTree( program ); + str Error = ColmError( program ); + + if ( Start == 0 ) { + gblErrorCount += 1; + InputLoc loc = Error.loc(); + error(loc) << file.data << ": parse error: " << Error.text() << std::endl; + return 0; + } + + StmtList *stmtList = walkRootItemList( Start.RootItemList() ); + colm_delete_program( program ); + return stmtList; + } + + + NamespaceQual *walkRegionQual( region_qual regionQual ) + { + NamespaceQual *qual = 0; + switch ( regionQual.prodName() ) { + case region_qual::_Qual: { + qual = walkRegionQual( regionQual._region_qual() ); + qual->qualNames.append( String( regionQual.id().data() ) ); + break; + } + case region_qual::_Base: { + qual = NamespaceQual::cons( curNspace() ); + break; + }} + return qual; + } + + RepeatType walkOptRepeat( opt_repeat OptRepeat ) + { + RepeatType repeatType = RepeatNone; + switch ( OptRepeat.prodName() ) { + case opt_repeat::_Star: + repeatType = RepeatRepeat; + break; + case opt_repeat::_Plus: + repeatType = RepeatList; + break; + case opt_repeat::_Question: + repeatType = RepeatOpt; + break; + } + return repeatType; + } + + TypeRef *walkTypeRef( type_ref typeRef ) + { + TypeRef *tr = 0; + switch ( typeRef.prodName() ) { + case type_ref::_Id: { + NamespaceQual *nspaceQual = walkRegionQual( typeRef.region_qual() ); + String id = typeRef.id().data(); + RepeatType repeatType = walkOptRepeat( typeRef.opt_repeat() ); + tr = TypeRef::cons( typeRef.id().loc(), nspaceQual, id, repeatType ); + break; + } + case type_ref::_Ptr: { + NamespaceQual *nspaceQual = walkRegionQual( typeRef.region_qual() ); + String id = typeRef.id().data(); + RepeatType repeatType = walkOptRepeat( typeRef.opt_repeat() ); + TypeRef *inner = TypeRef::cons( typeRef.id().loc(), nspaceQual, id, repeatType ); + tr = TypeRef::cons( typeRef.id().loc(), TypeRef::Ptr, inner ); + break; + } + case type_ref::_Map: { + TypeRef *key = walkTypeRef( typeRef.MapKeyType() ); + TypeRef *value = walkTypeRef( typeRef.MapValueType() ); + tr = TypeRef::cons( typeRef.loc(), TypeRef::Map, 0, key, value ); + break; + } + case type_ref::_List: { + TypeRef *type = walkTypeRef( typeRef._type_ref() ); + tr = TypeRef::cons( typeRef.loc(), TypeRef::List, 0, type, 0 ); + break; + } + case type_ref::_Vector: { + TypeRef *type = walkTypeRef( typeRef._type_ref() ); + tr = TypeRef::cons( typeRef.loc(), TypeRef::Vector, 0, type, 0 ); + break; + } + case type_ref::_Parser: { + TypeRef *type = walkTypeRef( typeRef._type_ref() ); + tr = TypeRef::cons( typeRef.loc(), TypeRef::Parser, 0, type, 0 ); + break; + }} + return tr; + } + + StmtList *walkBlockOrSingle( block_or_single blockOrSingle ) + { + StmtList *stmtList = 0; + switch ( blockOrSingle.prodName() ) { + case block_or_single::_Single: { + stmtList = new StmtList; + LangStmt *stmt = walkStatement( blockOrSingle.statement() ); + stmtList->append( stmt ); + break; + } + case block_or_single::_Block: { + stmtList = walkLangStmtList( blockOrSingle.lang_stmt_list() ); + break; + }} + + return stmtList; + } + + void walkProdEl( const String &defName, ProdElList *list, prod_el El ) + { + ObjectField *captureField = 0; + if ( El.opt_prod_el_name().prodName() == opt_prod_el_name::_Name ) { + String fieldName = El.opt_prod_el_name().id().data(); + captureField = ObjectField::cons( El.opt_prod_el_name().id().loc(), 0, fieldName ); + } + else { + /* default the prod name. */ + if ( El.prodName() == prod_el::_Id ) { + String fieldName = El.id().data(); + opt_repeat::prod_name orpn = El.opt_repeat().prodName(); + if ( orpn == opt_repeat::_Star ) + fieldName = "_repeat_" + fieldName; + else if ( orpn == opt_repeat::_Plus ) + fieldName = "_list_" + fieldName; + else if ( orpn == opt_repeat::_Question ) + fieldName = "_opt_" + fieldName; + else if ( strcmp( fieldName, defName ) == 0 ) + fieldName = "_" + fieldName; + captureField = ObjectField::cons( El.id().loc(), 0, fieldName ); + } + } + + RepeatType repeatType = walkOptRepeat( El.opt_repeat() ); + NamespaceQual *nspaceQual = walkRegionQual( El.region_qual() ); + + switch ( El.prodName() ) { + case prod_el::_Id: { + String typeName = El.id().data(); + ProdEl *prodEl = prodElName( El.id().loc(), typeName, + nspaceQual, captureField, repeatType, false ); + appendProdEl( list, prodEl ); + break; + } + case prod_el::_Lit: { + String lit = El.backtick_lit().data(); + ProdEl *prodEl = prodElLiteral( El.backtick_lit().loc(), lit, + nspaceQual, captureField, repeatType, false ); + appendProdEl( list, prodEl ); + break; + }} + } + + void walkProdElList( const String &defName, ProdElList *list, prod_el_list ProdElList ) + { + if ( ProdElList.prodName() == prod_el_list::_List ) { + prod_el_list RightProdElList = ProdElList._prod_el_list(); + walkProdElList( defName, list, RightProdElList ); + walkProdEl( defName, list, ProdElList.prod_el() ); + } + } + + CodeBlock *walkOptReduce( opt_reduce OptReduce ) + { + CodeBlock *block = 0; + if ( OptReduce.prodName() == opt_reduce::_Reduce ) { + ObjectDef *localFrame = blockOpen(); + StmtList *stmtList = walkLangStmtList( OptReduce.lang_stmt_list() ); + + block = CodeBlock::cons( stmtList, localFrame ); + block->context = curContext(); + + blockClose(); + } + return block; + } + + void walkProdudction( const String &defName, LelDefList *lelDefList, prod Prod ) + { + ProdElList *list = new ProdElList; + + walkProdElList( defName, list, Prod.prod_el_list() ); + + String name; + if ( Prod.opt_prod_name().prodName() == opt_prod_name::_Name ) + name = Prod.opt_prod_name().id().data(); + + CodeBlock *codeBlock = walkOptReduce( Prod.opt_reduce() ); + bool commit = Prod.opt_commit().prodName() == opt_commit::_Commit; + + Production *prod = BaseParser::production( Prod.SQOPEN().loc(), + list, name, commit, codeBlock, 0 ); + prodAppend( lelDefList, prod ); + } + + void walkProdList( const String &name, LelDefList *lelDefList, prod_list ProdList ) + { + if ( ProdList.prodName() == prod_list::_List ) + walkProdList( name, lelDefList, ProdList._prod_list() ); + + walkProdudction( name, lelDefList, ProdList.prod() ); + } + + ReOrItem *walkRegOrChar( reg_or_char regOrChar ) + { + ReOrItem *orItem = 0; + switch ( regOrChar.prodName() ) { + case reg_or_char::_Char: { + String c = unescape( regOrChar.RE_CHAR().data() ); + orItem = ReOrItem::cons( regOrChar.RE_CHAR().loc(), c ); + break; + } + case reg_or_char::_Range: { + String low = unescape( regOrChar.Low().data() ); + String high = unescape( regOrChar.High().data() ); + orItem = ReOrItem::cons( regOrChar.Low().loc(), low[0], high[0] ); + break; + }} + return orItem; + } + + ReOrBlock *walkRegOrData( reg_or_data regOrData ) + { + ReOrBlock *block = 0; + switch ( regOrData.prodName() ) { + case reg_or_data::_Data: { + ReOrBlock *left = walkRegOrData( regOrData._reg_or_data() ); + ReOrItem *right = walkRegOrChar( regOrData.reg_or_char() ); + block = lexRegularExprData( left, right ); + break; + } + case reg_or_data::_Base: { + block = ReOrBlock::cons(); + break; + }} + return block; + } + + LexFactorNeg *walkLexFactorNeg( lex_factor_neg lexFactorNeg ) + { + LexFactorNeg *factorNeg = 0; + switch ( lexFactorNeg.prodName() ) { + case lex_factor_neg::_Caret: { + LexFactorNeg *recNeg = walkLexFactorNeg( lexFactorNeg._lex_factor_neg() ); + factorNeg = LexFactorNeg::cons( recNeg, LexFactorNeg::CharNegateType ); + break; + } + case lex_factor_neg::_Base: { + LexFactor *factor = walkLexFactor( lexFactorNeg.lex_factor() ); + factorNeg = LexFactorNeg::cons( factor ); + break; + }} + return factorNeg; + } + + LexFactorRep *walkLexFactorRep( lex_factor_rep lexFactorRep ) + { + LexFactorRep *factorRep = 0; + LexFactorRep *recRep = 0; + lex_factor_rep::prod_name pn = lexFactorRep.prodName(); + + if ( pn != lex_factor_rep::_Base ) + recRep = walkLexFactorRep( lexFactorRep._lex_factor_rep() ); + + switch ( pn ) { + case lex_factor_rep::_Star: { + factorRep = LexFactorRep::cons( lexFactorRep.LEX_STAR().loc(), + recRep, 0, 0, LexFactorRep::StarType ); + break; + } + case lex_factor_rep::_StarStar: { + factorRep = LexFactorRep::cons( lexFactorRep.LEX_STARSTAR().loc(), + recRep, 0, 0, LexFactorRep::StarStarType ); + break; + } + case lex_factor_rep::_Plus: { + factorRep = LexFactorRep::cons( lexFactorRep.LEX_PLUS().loc(), + recRep, 0, 0, LexFactorRep::PlusType ); + break; + } + case lex_factor_rep::_Question: { + factorRep = LexFactorRep::cons( lexFactorRep.LEX_QUESTION().loc(), + recRep, 0, 0, LexFactorRep::OptionalType ); + break; + } + case lex_factor_rep::_Exact: { + int low = atoi( lexFactorRep.lex_uint().data()->data ); + factorRep = LexFactorRep::cons( lexFactorRep.lex_uint().loc(), + recRep, low, 0, LexFactorRep::ExactType ); + break; + } + case lex_factor_rep::_Max: { + int high = atoi( lexFactorRep.lex_uint().data()->data ); + factorRep = LexFactorRep::cons( lexFactorRep.lex_uint().loc(), + recRep, 0, high, LexFactorRep::MaxType ); + break; + } + case lex_factor_rep::_Min: { + int low = atoi( lexFactorRep.lex_uint().data()->data ); + factorRep = LexFactorRep::cons( lexFactorRep.lex_uint().loc(), + recRep, low, 0, LexFactorRep::MinType ); + break; + } + case lex_factor_rep::_Range: { + int low = atoi( lexFactorRep.Low().data()->data ); + int high = atoi( lexFactorRep.High().data()->data ); + factorRep = LexFactorRep::cons( lexFactorRep.Low().loc(), + recRep, low, high, LexFactorRep::RangeType ); + break; + } + case lex_factor_rep::_Base: { + LexFactorNeg *factorNeg = walkLexFactorNeg( lexFactorRep.lex_factor_neg() ); + factorRep = LexFactorRep::cons( factorNeg ); + }} + + return factorRep; + } + + LexTerm *walkLexTerm( lex_term lexTerm ) + { + LexTerm *term = 0; + lex_term::prod_name pn = lexTerm.prodName(); + + LexTerm *leftTerm = 0; + if ( pn != lex_term::_Base ) + leftTerm = walkLexTerm( lexTerm._lex_term() ); + + LexFactorAug *factorAug = walkLexFactorAug( lexTerm.lex_factor_rep() ); + + switch ( pn ) { + case lex_term::_Dot: + term = LexTerm::cons( leftTerm, factorAug, LexTerm::ConcatType ); + break; + case lex_term::_ColonGt: + term = LexTerm::cons( leftTerm, factorAug, LexTerm::RightStartType ); + break; + case lex_term::_ColonGtGt: + term = LexTerm::cons( leftTerm, factorAug, LexTerm::RightFinishType ); + break; + case lex_term::_LtColon: + term = LexTerm::cons( leftTerm, factorAug, LexTerm::LeftType ); + break; + default: + term = LexTerm::cons( factorAug ); + break; + } + + return term; + } + + LexExpression *walkLexExpr( lex_expr lexExpr ) + { + LexExpression *expr = 0; + lex_expr::prod_name pn = lexExpr.prodName(); + + LexExpression *leftExpr = 0; + if ( pn != lex_expr::_Base ) + leftExpr = walkLexExpr( lexExpr._lex_expr() ); + + LexTerm *term = walkLexTerm( lexExpr.lex_term() ); + + switch ( pn ) { + case lex_expr::_Bar: + expr = LexExpression::cons( leftExpr, term, LexExpression::OrType ); + break; + case lex_expr::_Amp: + expr = LexExpression::cons( leftExpr, term, LexExpression::IntersectType ); + break; + case lex_expr::_Dash: + expr = LexExpression::cons( leftExpr, term, LexExpression::SubtractType ); + break; + case lex_expr::_DashDash: + expr = LexExpression::cons( leftExpr, term, LexExpression::StrongSubtractType ); + break; + case lex_expr::_Base: + expr = LexExpression::cons( term ); + } + return expr; + } + + + void walkRlDef( rl_def rlDef ) + { + String id = rlDef.id().data(); + + lex_expr LexExpr = rlDef.lex_expr(); + LexExpression *expr = walkLexExpr( LexExpr ); + LexJoin *join = LexJoin::cons( expr ); + + addRegularDef( rlDef.id().loc(), curNspace(), id, join ); + } + + void walkLexRegion( region_def regionDef ) + { + pushRegionSet( regionDef.loc() ); + walkRootItemList( regionDef.RootItemList() ); + popRegionSet(); + } + + void walkCflDef( cfl_def cflDef ) + { + String name = cflDef.id().data(); + ObjectDef *objectDef = walkVarDefList( cflDef.VarDefList() ); + objectDef->name = name; + + LelDefList *defList = new LelDefList; + walkProdList( name, defList, cflDef.prod_list() ); + + bool reduceFirst = cflDef.opt_reduce_first().REDUCEFIRST() != 0; + + NtDef *ntDef = NtDef::cons( name, curNspace(), + curContext(), reduceFirst ); + + BaseParser::cflDef( ntDef, objectDef, defList ); + } + + CallArgVect *walkCallArgList( call_arg_list callArgList ) + { + CallArgVect *callArgVect = new CallArgVect; + while ( callArgList.code_expr() != 0 ) { + code_expr codeExpr = callArgList.code_expr(); + LangExpr *expr = walkCodeExpr( codeExpr ); + callArgVect->append( new CallArg(expr) ); + callArgList = callArgList._call_arg_list(); + } + return callArgVect; + } + + LangStmt *walkPrintStmt( print_stmt &printStmt ) + { + CallArgVect *exprVect = walkCallArgList( printStmt.call_arg_list() ); + + LangStmt::Type type = LangStmt::PrintType; + switch ( printStmt.prodName() ) { + case print_stmt::_Tree: + type = LangStmt::PrintType; + break; + case print_stmt::_PrintStream: + type = LangStmt::PrintStreamType; + break; + case print_stmt::_Xml: + type = LangStmt::PrintXMLType; + break; + case print_stmt::_XmlAc: + type = LangStmt::PrintXMLACType; + break; + } + + return LangStmt::cons( printStmt.POPEN().loc(), type, exprVect ); + } + + QualItemVect *walkQual( qual &Qual ) + { + QualItemVect *qualItemVect = 0; + qual RecQual = Qual._qual(); + switch ( Qual.prodName() ) { + case qual::_Dot: + case qual::_Arrow: { + qualItemVect = walkQual( RecQual ); + String id = Qual.id().data(); + QualItem::Form form = Qual.DOT() != 0 ? QualItem::Dot : QualItem::Arrow; + qualItemVect->append( QualItem( form, Qual.id().loc(), id ) ); + break; + } + case qual::_Base: { + qualItemVect = new QualItemVect; + break; + }} + return qualItemVect; + } + + LangVarRef *walkVarRef( var_ref varRef ) + { + qual Qual = varRef.qual(); + QualItemVect *qualItemVect = walkQual( Qual ); + String id = varRef.id().data(); + LangVarRef *langVarRef = LangVarRef::cons( varRef.id().loc(), + curContext(), curScope, qualItemVect, id ); + return langVarRef; + } + + ObjectField *walkOptCapture( opt_capture optCapture ) + { + ObjectField *objField = 0; + if ( optCapture.prodName() == opt_capture::_Id ) { + String id = optCapture.id().data(); + objField = ObjectField::cons( optCapture.id().loc(), 0, id ); + } + return objField; + } + + /* + * Constructor + */ + + ConsItemList *walkLitConsEl( lit_cons_el litConsEl, TypeRef *consTypeRef ) + { + ConsItemList *list = 0; + switch ( litConsEl.prodName() ) { + case lit_cons_el::_ConsData: { + String consData = unescape( litConsEl.dq_cons_data().text().c_str() ); + ConsItem *consItem = ConsItem::cons( litConsEl.dq_cons_data().loc(), + ConsItem::InputText, consData ); + list = ConsItemList::cons( consItem ); + break; + } + case lit_cons_el::_SubList: { + list = walkConsElList( litConsEl.ConsElList(), consTypeRef ); + break; + }} + return list; + } + + ConsItemList *walkLitConsElList( _repeat_lit_cons_el litConsElList, + CONS_DQ_NL Nl, TypeRef *consTypeRef ) + { + ConsItemList *list = new ConsItemList; + while ( !litConsElList.end() ) { + ConsItemList *extension = walkLitConsEl( litConsElList.value(), consTypeRef ); + list = consListConcat( list, extension ); + litConsElList = litConsElList.next(); + } + + if ( Nl != 0 ) { + String consData = unescape( Nl.data() ); + ConsItem *consItem = ConsItem::cons( Nl.loc(), ConsItem::InputText, consData ); + ConsItemList *term = ConsItemList::cons( consItem ); + list = consListConcat( list, term ); + } + + return list; + } + + ConsItemList *walkConsEl( cons_el consEl, TypeRef *consTypeRef ) + { + ConsItemList *list = 0; + switch ( consEl.prodName() ) { + case cons_el::_Lit: { + NamespaceQual *nspaceQual = walkRegionQual( consEl.region_qual() ); + String lit = consEl.backtick_lit().data(); + list = consElLiteral( consEl.backtick_lit().loc(), consTypeRef, lit, nspaceQual ); + break; + } + case cons_el::_Tilde: { + String consData = consEl.opt_tilde_data().text().c_str(); + consData += '\n'; + ConsItem *consItem = ConsItem::cons( consEl.opt_tilde_data().loc(), + ConsItem::InputText, consData ); + list = ConsItemList::cons( consItem ); + break; + } + case cons_el::_Sq: { + list = walkConsSqConsDataList( consEl.SqConsDataList(), + consEl.sq_lit_term().CONS_SQ_NL() ); + break; + } + case cons_el::_CodeExpr: { + LangExpr *consExpr = walkCodeExpr( consEl.code_expr() ); + ConsItem *consItem = ConsItem::cons( consExpr->loc, + ConsItem::ExprType, consExpr ); + list = ConsItemList::cons( consItem ); + break; + } + case cons_el::_Dq: { + list = walkLitConsElList( consEl.LitConsElList(), + consEl.dq_lit_term().CONS_DQ_NL(), consTypeRef ); + break; + }} + return list; + } + + ConsItemList *walkConsElList( _repeat_cons_el consElList, TypeRef *consTypeRef ) + { + ConsItemList *list = new ConsItemList; + while ( !consElList.end() ) { + ConsItemList *extension = walkConsEl( consElList.value(), consTypeRef ); + list = consListConcat( list, extension ); + consElList = consElList.next(); + } + return list; + } + + ConsItemList *walkConsTopEl( cons_top_el consTopEl, TypeRef *consTypeRef ) + { + ConsItemList *list = 0; + switch ( consTopEl.prodName() ) { + case cons_top_el::_Dq: { + list = walkLitConsElList( consTopEl.LitConsElList(), + consTopEl.dq_lit_term().CONS_DQ_NL(), consTypeRef ); + break; + } + case cons_top_el::_Sq: { + list = walkConsSqConsDataList( consTopEl.SqConsDataList(), + consTopEl.sq_lit_term().CONS_SQ_NL() ); + break; + } + case cons_top_el::_Tilde: { + String consData = consTopEl.opt_tilde_data().text().c_str(); + consData += '\n'; + ConsItem *consItem = ConsItem::cons( consTopEl.opt_tilde_data().loc(), + ConsItem::InputText, consData ); + list = ConsItemList::cons( consItem ); + break; + } + case cons_top_el::_SubList: { + list = walkConsElList( consTopEl.ConsElList(), consTypeRef ); + break; + }} + return list; + } + + ConsItemList *walkConsList( cons_list consList, TypeRef *consTypeRef ) + { + ConsItemList *list = walkConsTopEl( consList.cons_top_el(), consTypeRef ); + + if ( consList._cons_list() != 0 ) { + ConsItemList *extension = walkConsList( consList._cons_list(), consTypeRef ); + consListConcat( list, extension ); + } + + return list; + } + + ConsItemList *walkConstructor( constructor Constructor, TypeRef *consTypeRef ) + { + ConsItemList *list = walkConsList( Constructor.cons_list(), consTypeRef ); + return list; + } + + /* + * String + */ + + ConsItemList *walkLitStringEl( lit_string_el litStringEl ) + { + ConsItemList *list = 0; + switch ( litStringEl.prodName() ) { + case lit_string_el::_ConsData: { + String consData = unescape( litStringEl.dq_cons_data().text().c_str() ); + ConsItem *stringItem = ConsItem::cons( litStringEl.dq_cons_data().loc(), + ConsItem::InputText, consData ); + list = ConsItemList::cons( stringItem ); + break; + } + case lit_string_el::_SubList: { + list = walkStringElList( litStringEl.StringElList() ); + break; + }} + return list; + } + + ConsItemList *walkLitStringElList( _repeat_lit_string_el litStringElList, CONS_DQ_NL Nl ) + { + ConsItemList *list = new ConsItemList; + while ( !litStringElList.end() ) { + ConsItemList *extension = walkLitStringEl( litStringElList.value() ); + list = consListConcat( list, extension ); + litStringElList = litStringElList.next(); + } + + if ( Nl != 0 ) { + String consData = unescape( Nl.data() ); + ConsItem *consItem = ConsItem::cons( Nl.loc(), + ConsItem::InputText, consData ); + ConsItemList *term = ConsItemList::cons( consItem ); + list = consListConcat( list, term ); + } + return list; + } + + ConsItemList *walkStringEl( string_el stringEl ) + { + ConsItemList *list = 0; + switch ( stringEl.prodName() ) { + case string_el::_Dq: { + list = walkLitStringElList( stringEl.LitStringElList(), + stringEl.dq_lit_term().CONS_DQ_NL() ); + break; + } + case string_el::_Sq: { + list = walkConsSqConsDataList( stringEl.SqConsDataList(), + stringEl.sq_lit_term().CONS_SQ_NL() ); + break; + } + case string_el::_Tilde: { + String consData = stringEl.opt_tilde_data().text().c_str(); + consData += '\n'; + ConsItem *consItem = ConsItem::cons( stringEl.opt_tilde_data().loc(), + ConsItem::InputText, consData ); + list = ConsItemList::cons( consItem ); + break; + } + case string_el::_CodeExpr: { + LangExpr *consExpr = walkCodeExpr( stringEl.code_expr() ); + ConsItem *consItem = ConsItem::cons( consExpr->loc, + ConsItem::ExprType, consExpr ); + list = ConsItemList::cons( consItem ); + break; + }} + return list; + } + + ConsItemList *walkStringElList( _repeat_string_el stringElList ) + { + ConsItemList *list = new ConsItemList; + while ( !stringElList.end() ) { + ConsItemList *extension = walkStringEl( stringElList.value() ); + list = consListConcat( list, extension ); + stringElList = stringElList.next(); + } + return list; + } + + ConsItemList *walkStringTopEl( string_top_el stringTopEl ) + { + ConsItemList *list = 0; + switch ( stringTopEl.prodName() ) { + case string_top_el::_Dq: { + list = walkLitStringElList( stringTopEl.LitStringElList(), + stringTopEl.dq_lit_term().CONS_DQ_NL() ); + break; + } + case string_el::_Sq: { + list = walkConsSqConsDataList( stringTopEl.SqConsDataList(), + stringTopEl.sq_lit_term().CONS_SQ_NL() ); + break; + } + case string_top_el::_Tilde: { + String consData = stringTopEl.opt_tilde_data().text().c_str(); + consData += '\n'; + ConsItem *consItem = ConsItem::cons( stringTopEl.opt_tilde_data().loc(), + ConsItem::InputText, consData ); + list = ConsItemList::cons( consItem ); + break; + } + case string_top_el::_SubList: { + list = walkStringElList( stringTopEl.StringElList() ); + break; + }} + return list; + } + + ConsItemList *walkStringList( string_list stringList ) + { + ConsItemList *list = walkStringTopEl( stringList.string_top_el() ); + + if ( stringList._string_list() != 0 ) { + ConsItemList *extension = walkStringList( stringList._string_list() ); + consListConcat( list, extension ); + } + + return list; + } + + ConsItemList *walkString( string String ) + { + ConsItemList *list = walkStringList( String.string_list() ); + return list; + } + + /* + * Accum + */ + + ConsItemList *walkLitAccumEl( lit_accum_el litAccumEl ) + { + ConsItemList *list = 0; + switch ( litAccumEl.prodName() ) { + case lit_accum_el::_ConsData: { + String consData = unescape( litAccumEl.dq_cons_data().text().c_str() ); + ConsItem *consItem = ConsItem::cons( litAccumEl.dq_cons_data().loc(), + ConsItem::InputText, consData ); + list = ConsItemList::cons( consItem ); + break; + } + case lit_accum_el::_SubList: { + list = walkAccumElList( litAccumEl.AccumElList() ); + break; + }} + return list; + } + + ConsItemList *walkLitAccumElList( _repeat_lit_accum_el litAccumElList, CONS_DQ_NL Nl ) + { + ConsItemList *list = new ConsItemList; + while ( !litAccumElList.end() ) { + ConsItemList *extension = walkLitAccumEl( litAccumElList.value() ); + list = consListConcat( list, extension ); + litAccumElList = litAccumElList.next(); + } + + if ( Nl != 0 ) { + String consData = unescape( Nl.data() ); + ConsItem *consItem = ConsItem::cons( Nl.loc(), ConsItem::InputText, consData ); + ConsItemList *term = ConsItemList::cons( consItem ); + list = consListConcat( list, term ); + } + + return list; + } + + ConsItemList *walkAccumEl( accum_el accumEl ) + { + ConsItemList *list = 0; + switch ( accumEl.prodName() ) { + case accum_el::_Dq: { + list = walkLitAccumElList( accumEl.LitAccumElList(), + accumEl.dq_lit_term().CONS_DQ_NL() ); + break; + } + case accum_el::_Sq: { + list = walkConsSqConsDataList( accumEl.SqConsDataList(), + accumEl.sq_lit_term().CONS_SQ_NL() ); + break; + } + case accum_el::_Tilde: { + String consData = accumEl.opt_tilde_data().text().c_str(); + consData += '\n'; + ConsItem *consItem = ConsItem::cons( accumEl.opt_tilde_data().loc(), + ConsItem::InputText, consData ); + list = ConsItemList::cons( consItem ); + break; + } + case accum_el::_CodeExpr: { + LangExpr *accumExpr = walkCodeExpr( accumEl.code_expr() ); + ConsItem *consItem = ConsItem::cons( accumExpr->loc, + ConsItem::ExprType, accumExpr ); + list = ConsItemList::cons( consItem ); + break; + }} + return list; + } + + ConsItemList *walkAccumElList( _repeat_accum_el accumElList ) + { + ConsItemList *list = new ConsItemList; + while ( !accumElList.end() ) { + ConsItemList *extension = walkAccumEl( accumElList.value() ); + list = consListConcat( list, extension ); + accumElList = accumElList.next(); + } + return list; + } + + ConsItemList *walkAccumTopEl( accum_top_el accumTopEl ) + { + ConsItemList *list = 0; + switch ( accumTopEl.prodName() ) { + case accum_top_el::_Dq: { + list = walkLitAccumElList( accumTopEl.LitAccumElList(), + accumTopEl.dq_lit_term().CONS_DQ_NL() ); + break; + } + case accum_top_el::_Sq: { + list = walkConsSqConsDataList( accumTopEl.SqConsDataList(), + accumTopEl.sq_lit_term().CONS_SQ_NL() ); + break; + } + case accum_top_el::_Tilde: { + String consData = accumTopEl.opt_tilde_data().text().c_str(); + consData += '\n'; + ConsItem *consItem = ConsItem::cons( accumTopEl.opt_tilde_data().loc(), + ConsItem::InputText, consData ); + list = ConsItemList::cons( consItem ); + break; + } + case accum_top_el::_SubList: { + list = walkAccumElList( accumTopEl.AccumElList() ); + break; + }} + return list; + } + + ConsItemList *walkAccumList( accum_list accumList ) + { + ConsItemList *list = walkAccumTopEl( accumList.accum_top_el() ); + + if ( accumList.prodName() == accum_list::_List ) { + ConsItemList *extension = walkAccumList( accumList._accum_list() ); + consListConcat( list, extension ); + } + + return list; + } + + ConsItemList *walkAccumulate( accumulate Accumulate ) + { + ConsItemList *list = walkAccumList( Accumulate.accum_list() ); + return list; + } + + void walkFieldInit( FieldInitVect *list, field_init fieldInit ) + { + LangExpr *expr = walkCodeExpr( fieldInit.code_expr() ); + FieldInit *init = FieldInit::cons( expr->loc, "_name", expr ); + list->append( init ); + } + + FieldInitVect *walkOptFieldInit( opt_field_init optFieldInit ) + { + FieldInitVect *list = 0; + if ( optFieldInit.prodName() == opt_field_init::_Init ) { + list = new FieldInitVect; + _repeat_field_init fieldInitList = optFieldInit.FieldInitList(); + while ( !fieldInitList.end() ) { + walkFieldInit( list, fieldInitList.value() ); + fieldInitList = fieldInitList.next(); + } + } + return list; + } + + LangExpr *walkCodeFactor( code_factor codeFactor ) + { + LangExpr *expr = 0; + switch ( codeFactor.prodName() ) { + case code_factor::_VarRef: { + LangVarRef *langVarRef = walkVarRef( codeFactor.var_ref() ); + LangTerm *term = LangTerm::cons( langVarRef->loc, + LangTerm::VarRefType, langVarRef ); + expr = LangExpr::cons( term ); + break; + } + case code_factor::_Call: { + LangVarRef *langVarRef = walkVarRef( codeFactor.var_ref() ); + CallArgVect *exprVect = walkCallArgList( codeFactor.call_arg_list() ); + LangTerm *term = LangTerm::cons( langVarRef->loc, langVarRef, exprVect ); + expr = LangExpr::cons( term ); + break; + } + case code_factor::_Number: { + String number = codeFactor.number().text().c_str(); + LangTerm *term = LangTerm::cons( codeFactor.number().loc(), + LangTerm::NumberType, number ); + expr = LangExpr::cons( term ); + break; + } + case code_factor::_Parse: { + /* The type we are parsing. */ + type_ref typeRefTree = codeFactor.type_ref(); + TypeRef *typeRef = walkTypeRef( typeRefTree ); + ObjectField *objField = walkOptCapture( codeFactor.opt_capture() ); + FieldInitVect *init = walkOptFieldInit( codeFactor.opt_field_init() ); + ConsItemList *list = walkAccumulate( codeFactor.accumulate() ); + + expr = parseCmd( codeFactor.PARSE().loc(), false, objField, + typeRef, init, list ); + break; + } + case code_factor::_ParseStop: { + /* The type we are parsing. */ + type_ref typeRefTree = codeFactor.type_ref(); + TypeRef *typeRef = walkTypeRef( typeRefTree ); + ObjectField *objField = walkOptCapture( codeFactor.opt_capture() ); + FieldInitVect *init = walkOptFieldInit( codeFactor.opt_field_init() ); + ConsItemList *list = walkAccumulate( codeFactor.accumulate() ); + + expr = parseCmd( codeFactor.PARSE_STOP().loc(), true, objField, + typeRef, init, list ); + break; + } + case code_factor::_Cons: { + /* The type we are parsing. */ + type_ref typeRefTree = codeFactor.type_ref(); + TypeRef *typeRef = walkTypeRef( typeRefTree ); + ObjectField *objField = walkOptCapture( codeFactor.opt_capture() ); + ConsItemList *list = walkConstructor( codeFactor.constructor(), typeRef ); + FieldInitVect *init = walkOptFieldInit( codeFactor.opt_field_init() ); + + expr = construct( codeFactor.CONS().loc(), objField, list, typeRef, init ); + break; + } + case code_factor::_Send: { + LangVarRef *varRef = walkVarRef( codeFactor.var_ref() ); + ConsItemList *list = walkAccumulate( codeFactor.accumulate() ); + bool eof = walkOptEos( codeFactor.opt_eos() ); + expr = send( codeFactor.SEND().loc(), varRef, list, eof ); + break; + } + case code_factor::_Nil: { + expr = LangExpr::cons( LangTerm::cons( codeFactor.NIL().loc(), + LangTerm::NilType ) ); + break; + } + case code_factor::_True: { + expr = LangExpr::cons( LangTerm::cons( codeFactor.TRUE().loc(), + LangTerm::TrueType ) ); + break; + } + case code_factor::_False: { + expr = LangExpr::cons( LangTerm::cons( codeFactor.FALSE().loc(), + LangTerm::FalseType ) ); + break; + } + case code_factor::_Paren: { + expr = walkCodeExpr( codeFactor.code_expr() ); + break; + } + case code_factor::_String: { + ConsItemList *list = walkString( codeFactor.string() ); + expr = LangExpr::cons( LangTerm::cons( codeFactor.string().loc(), list ) ); + break; + } + case code_factor::_Match: { + LangVarRef *varRef = walkVarRef( codeFactor.var_ref() ); + PatternItemList *list = walkPattern( codeFactor.pattern(), varRef ); + expr = match( codeFactor.loc(), varRef, list ); + break; + } + case code_factor::_In: { + TypeRef *typeRef = walkTypeRef( codeFactor.type_ref() ); + LangVarRef *varRef = walkVarRef( codeFactor.var_ref() ); + expr = LangExpr::cons( LangTerm::cons( typeRef->loc, + LangTerm::SearchType, typeRef, varRef ) ); + break; + } + case code_factor::_MakeTree: { + CallArgVect *exprList = walkCallArgList( codeFactor.call_arg_list() ); + expr = LangExpr::cons( LangTerm::cons( codeFactor.loc(), + LangTerm::MakeTreeType, exprList ) ); + break; + } + case code_factor::_MakeToken: { + CallArgVect *exprList = walkCallArgList( codeFactor.call_arg_list() ); + expr = LangExpr::cons( LangTerm::cons( codeFactor.loc(), + LangTerm::MakeTokenType, exprList ) ); + break; + } + case code_factor::_TypeId: { + TypeRef *typeRef = walkTypeRef( codeFactor.type_ref() ); + expr = LangExpr::cons( LangTerm::cons( codeFactor.loc(), + LangTerm::TypeIdType, typeRef ) ); + break; + } + case code_factor::_New: { + LangExpr *newExpr = walkCodeFactor( codeFactor._code_factor() ); + expr = LangExpr::cons( LangTerm::cons( codeFactor.loc(), + LangTerm::NewType, newExpr ) ); + break; + } + case code_factor::_Cast: { + TypeRef *typeRef = walkTypeRef( codeFactor.type_ref() ); + LangExpr *castExpr = walkCodeFactor( codeFactor._code_factor() ); + expr = LangExpr::cons( LangTerm::cons( codeFactor.loc(), + LangTerm::CastType, typeRef, castExpr ) ); + break; + }} + return expr; + } + + LangExpr *walkCodeAdditive( code_additive additive ) + { + LangExpr *expr = 0; + switch ( additive.prodName() ) { + case code_additive::_Plus: { + LangExpr *left = walkCodeAdditive( additive._code_additive() ); + LangExpr *right = walkCodeMultiplicitive( additive.code_multiplicitive() ); + expr = LangExpr::cons( additive.PLUS().loc(), left, '+', right ); + break; + } + case code_additive::_Minus: { + LangExpr *left = walkCodeAdditive( additive._code_additive() ); + LangExpr *right = walkCodeMultiplicitive( additive.code_multiplicitive() ); + expr = LangExpr::cons( additive.MINUS().loc(), left, '-', right ); + break; + } + case code_additive::_Base: { + expr = walkCodeMultiplicitive( additive.code_multiplicitive() ); + break; + }} + return expr; + } + + LangExpr *walkCodeUnary( code_unary unary ) + { + LangExpr *expr = 0, *factor = walkCodeFactor( unary.code_factor() ); + + switch ( unary.prodName() ) { + case code_unary::_Bang: { + expr = LangExpr::cons( unary.BANG().loc(), '!', factor ); + break; + } + case code_unary::_Dollar: { + expr = LangExpr::cons( unary.DOLLAR().loc(), '$', factor ); + break; + } + case code_unary::_Caret: { + expr = LangExpr::cons( unary.CARET().loc(), '^', factor ); + break; + } + case code_unary::_Percent: { + expr = LangExpr::cons( unary.PERCENT().loc(), '%', factor ); + break; + } + case code_unary::_Base: { + expr = factor; + }} + + return expr; + } + + LangExpr *walkCodeRelational( code_relational codeRelational ) + { + LangExpr *expr = 0, *left = 0; + + if ( codeRelational.prodName() != code_relational::_Base ) + left = walkCodeRelational( codeRelational._code_relational() ); + + LangExpr *additive = walkCodeAdditive( codeRelational.code_additive() ); + + switch ( codeRelational.prodName() ) { + case code_relational::_EqEq: { + expr = LangExpr::cons( codeRelational.loc(), left, OP_DoubleEql, additive ); + break; + } + case code_relational::_Neq: { + expr = LangExpr::cons( codeRelational.loc(), left, OP_NotEql, additive ); + break; + } + case code_relational::_Lt: { + expr = LangExpr::cons( codeRelational.loc(), left, '<', additive ); + break; + } + case code_relational::_Gt: { + expr = LangExpr::cons( codeRelational.loc(), left, '>', additive ); + break; + } + case code_relational::_LtEq: { + expr = LangExpr::cons( codeRelational.loc(), left, OP_LessEql, additive ); + break; + } + case code_relational::_GtEq: { + expr = LangExpr::cons( codeRelational.loc(), left, OP_GrtrEql, additive ); + break; + } + case code_relational::_Base: { + expr = additive; + break; + }} + return expr; + } + + LangStmt *walkExprStmt( expr_stmt exprStmt ) + { + LangExpr *expr = walkCodeExpr( exprStmt.code_expr() ); + LangStmt *stmt = LangStmt::cons( expr->loc, LangStmt::ExprType, expr ); + return stmt; + } + + ObjectField *walkVarDef( var_def varDef ) + { + String id = varDef.id().data(); + TypeRef *typeRef = walkTypeRef( varDef.type_ref() ); + return ObjectField::cons( varDef.id().loc(), typeRef, id ); + } + + IterCall *walkIterCall( iter_call Tree ) + { + IterCall *iterCall = 0; + switch ( Tree.prodName() ) { + case iter_call::_Call: { + LangVarRef *varRef = walkVarRef( Tree.var_ref() ); + CallArgVect *exprVect = walkCallArgList( Tree.call_arg_list() ); + LangTerm *langTerm = LangTerm::cons( varRef->loc, varRef, exprVect ); + iterCall = IterCall::cons( IterCall::IterCallForm, langTerm ); + break; + } + case iter_call::_Id: { + String tree = Tree.id().data(); + LangVarRef *varRef = LangVarRef::cons( Tree.id().loc(), + curContext(), curScope, tree ); + LangTerm *langTerm = LangTerm::cons( Tree.id().loc(), + LangTerm::VarRefType, varRef ); + LangExpr *langExpr = LangExpr::cons( langTerm ); + iterCall = IterCall::cons( IterCall::VarRefForm, langExpr ); + break; + } + case iter_call::_Expr: { + LangExpr *langExpr = walkCodeExpr( Tree.code_expr() ); + iterCall = IterCall::cons( IterCall::ExprForm, langExpr ); + break; + }} + + return iterCall; + } + + LangStmt *walkElsifClause( elsif_clause elsifClause ) + { + pushScope(); + LangExpr *expr = walkCodeExpr( elsifClause.code_expr() ); + StmtList *stmtList = walkBlockOrSingle( elsifClause.block_or_single() ); + LangStmt *stmt = LangStmt::cons( LangStmt::IfType, expr, stmtList, 0 ); + popScope(); + return stmt; + } + + LangStmt *walkOptionalElse( optional_else optionalElse ) + { + LangStmt *stmt = 0; + if ( optionalElse.prodName() == optional_else::_Else ) { + pushScope(); + StmtList *stmtList = walkBlockOrSingle( optionalElse.block_or_single() ); + stmt = LangStmt::cons( LangStmt::ElseType, stmtList ); + popScope(); + } + return stmt; + } + + LangStmt *walkElsifList( elsif_list elsifList ) + { + LangStmt *stmt = 0; + switch ( elsifList.prodName() ) { + case elsif_list::_Clause: + stmt = walkElsifClause( elsifList.elsif_clause() ); + stmt->elsePart = walkElsifList( elsifList._elsif_list() ); + break; + case elsif_list::_OptElse: + stmt = walkOptionalElse( elsifList.optional_else() ); + break; + } + return stmt; + } + + void walkContextVarDef( context_var_def ContextVarDef ) + { + ObjectField *objField = walkVarDef( ContextVarDef.var_def() ); + contextVarDef( objField->loc, objField ); + } + + TypeRef *walkReferenceTypeRef( reference_type_ref ReferenceTypeRef ) + { + TypeRef *typeRef = walkTypeRef( ReferenceTypeRef.type_ref() ); + return TypeRef::cons( ReferenceTypeRef.REF().loc(), TypeRef::Ref, typeRef ); + } + + ObjectField *walkParamVarDef( param_var_def paramVarDef ) + { + String id = paramVarDef.id().data(); + TypeRef *typeRef = 0; + + switch ( paramVarDef.prodName() ) { + case param_var_def::_Type: + typeRef = walkTypeRef( paramVarDef.type_ref() ); + break; + case param_var_def::_Ref: + typeRef = walkReferenceTypeRef( paramVarDef.reference_type_ref() ); + break; + } + + return addParam( paramVarDef.id().loc(), typeRef, id ); + } + + ParameterList *walkParamVarDefList( param_var_def_list paramVarDefList ) + { + ParameterList *paramList = new ParameterList; + while ( paramVarDefList.param_var_def() != 0 ) { + ObjectField *param = walkParamVarDef( paramVarDefList.param_var_def() ); + appendParam( paramList, param ); + paramVarDefList = paramVarDefList._param_var_def_list(); + } + return paramList; + } + + bool walkOptExport( opt_export OptExport ) + { + return OptExport.prodName() == opt_export::_Export; + } + + void walkFunctionDef( function_def FunctionDef ) + { + ObjectDef *localFrame = blockOpen(); + + bool exprt = walkOptExport( FunctionDef.opt_export() ); + TypeRef *typeRef = walkTypeRef( FunctionDef.type_ref() ); + String id = FunctionDef.id().data(); + ParameterList *paramList = walkParamVarDefList( FunctionDef.ParamVarDefList() ); + StmtList *stmtList = walkLangStmtList( FunctionDef.lang_stmt_list() ); + functionDef( stmtList, localFrame, paramList, typeRef, id, exprt ); + + blockClose(); + } + + void walkIterDef( iter_def IterDef ) + { + ObjectDef *localFrame = blockOpen(); + + String id = IterDef.id().data(); + ParameterList *paramList = walkParamVarDefList( IterDef.ParamVarDefList() ); + StmtList *stmtList = walkLangStmtList( IterDef.lang_stmt_list() ); + iterDef( stmtList, localFrame, paramList, id ); + + blockClose(); + } + + void walkContextItem( context_item contextItem ) + { + switch ( contextItem.prodName() ) { + case context_item::_Rl: + walkRlDef( contextItem.rl_def() ); + break; + case context_item::_ContextVar: + walkContextVarDef( contextItem.context_var_def() ); + break; + case context_item::_Token: + walkTokenDef( contextItem.token_def() ); + break; + case context_item::_IgnoreCollector: + walkIgnoreCollector( contextItem.ic_def() ); + break; + case context_item::_Ignore: + walkIgnoreDef( contextItem.ignore_def() ); + break; + case context_item::_Literal: + walkLiteralDef( contextItem.literal_def() ); + break; + case context_item::_Cfl: + walkCflDef( contextItem.cfl_def() ); + break; + case context_item::_Region: + walkLexRegion( contextItem.region_def() ); + break; + case context_item::_Context: + walkContextDef( contextItem.context_def() ); + break; + case context_item::_Function: + walkFunctionDef( contextItem.function_def() ); + break; + case context_item::_Iter: + walkIterDef( contextItem.iter_def() ); + break; + case context_item::_PreEof: + walkPreEof( contextItem.pre_eof_def() ); + break; + case context_item::_Export: + walkExportDef( contextItem.export_def() ); + break; + case context_item::_Precedence: + walkPrecedenceDef( contextItem.precedence_def() ); + break; + } + } + + void walkContextDef( context_def contextDef ) + { + String name = contextDef.id().data(); + contextHead( contextDef.id().loc(), name ); + + _repeat_context_item contextItemList = contextDef.ContextItemList(); + while ( !contextItemList.end() ) { + walkContextItem( contextItemList.value() ); + contextItemList = contextItemList.next(); + } + + contextStack.pop(); + namespaceStack.pop(); + } + + void walkNamespaceDef( namespace_def NamespaceDef ) + { + String name = NamespaceDef.id().data(); + createNamespace( NamespaceDef.id().loc(), name ); + walkNamespaceItemList( NamespaceDef.ItemList() ); + namespaceStack.pop(); + } + + void walkRootItem( root_item rootItem, StmtList *stmtList ) + { + switch ( rootItem.prodName() ) { + case root_item::_Rl: + walkRlDef( rootItem.rl_def() ); + break; + case root_item::_Token: + walkTokenDef( rootItem.token_def() ); + break; + case root_item::_IgnoreCollector: + walkIgnoreCollector( rootItem.ic_def() ); + break; + case root_item::_Ignore: + walkIgnoreDef( rootItem.ignore_def() ); + break; + case root_item::_Literal: + walkLiteralDef( rootItem.literal_def() ); + break; + case root_item::_Cfl: + walkCflDef( rootItem.cfl_def() ); + break; + case root_item::_Region: + walkLexRegion( rootItem.region_def() ); + break; + case root_item::_Statement: { + LangStmt *stmt = walkStatement( rootItem.statement() ); + if ( stmt != 0 ) + stmtList->append( stmt ); + break; + } + case root_item::_Context: + walkContextDef( rootItem.context_def() ); + break; + case root_item::_Namespace: + walkNamespaceDef( rootItem.namespace_def() ); + break; + case root_item::_Function: + walkFunctionDef( rootItem.function_def() ); + break; + case root_item::_Iter: + walkIterDef( rootItem.iter_def() ); + break; + case root_item::_PreEof: + walkPreEof( rootItem.pre_eof_def() ); + break; + case root_item::_Export: { + LangStmt *stmt = walkExportDef( rootItem.export_def() ); + if ( stmt != 0 ) + stmtList->append( stmt ); + break; + } + case root_item::_Alias: + walkAliasDef( rootItem.alias_def() ); + break; + case root_item::_Precedence: + walkPrecedenceDef( rootItem.precedence_def() ); + break; + case root_item::_Include: { + StmtList *includeList = walkInclude( rootItem.include() ); + stmtList->append( *includeList ); + break; + } + case root_item::_Global: { + LangStmt *stmt = walkGlobalDef( rootItem.global_def() ); + if ( stmt != 0 ) + stmtList->append( stmt ); + break; + }} + } + + void walkNamespaceItem( namespace_item item, StmtList *stmtList ) + { + switch ( item.prodName() ) { + case namespace_item::_Rl: + walkRlDef( item.rl_def() ); + break; + case namespace_item::_Token: + walkTokenDef( item.token_def() ); + break; + case root_item::_IgnoreCollector: + walkIgnoreCollector( item.ic_def() ); + break; + case namespace_item::_Ignore: + walkIgnoreDef( item.ignore_def() ); + break; + case namespace_item::_Literal: + walkLiteralDef( item.literal_def() ); + break; + case namespace_item::_Cfl: + walkCflDef( item.cfl_def() ); + break; + case namespace_item::_Region: + walkLexRegion( item.region_def() ); + break; + case namespace_item::_Context: + walkContextDef( item.context_def() ); + break; + case namespace_item::_Namespace: + walkNamespaceDef( item.namespace_def() ); + break; + case namespace_item::_Function: + walkFunctionDef( item.function_def() ); + break; + case namespace_item::_Iter: + walkIterDef( item.iter_def() ); + break; + case namespace_item::_PreEof: + walkPreEof( item.pre_eof_def() ); + break; + case namespace_item::_Alias: + walkAliasDef( item.alias_def() ); + break; + case namespace_item::_Precedence: + walkPrecedenceDef( item.precedence_def() ); + break; + case namespace_item::_Include: { + StmtList *includeList = walkInclude( item.include() ); + stmtList->append( *includeList ); + break; + }} + } + + bool walkNoIgnoreLeft( no_ignore_left OptNoIngore ) + { + return OptNoIngore.prodName() == no_ignore_left::_Ni; + } + + bool walkNoIgnoreRight( no_ignore_right OptNoIngore ) + { + return OptNoIngore.prodName() == no_ignore_right::_Ni; + } + + bool walkOptEos( opt_eos OptEos ) + { + opt_eos::prod_name pn = OptEos.prodName(); + return pn == opt_eos::_Dot || pn == opt_eos::_Eos; + } + + void walkLiteralItem( literal_item literalItem ) + { + bool niLeft = walkNoIgnoreLeft( literalItem.no_ignore_left() ); + bool niRight = walkNoIgnoreRight( literalItem.no_ignore_right() ); + + String lit = literalItem.backtick_lit().data(); + literalDef( literalItem.backtick_lit().loc(), lit, niLeft, niRight ); + } + + void walkLiteralList( literal_list literalList ) + { + if ( literalList.prodName() == literal_list::_Item ) + walkLiteralList( literalList._literal_list() ); + walkLiteralItem( literalList.literal_item() ); + } + + void walkLiteralDef( literal_def literalDef ) + { + walkLiteralList( literalDef.literal_list() ); + } + + StmtList *walkNamespaceItemList( _repeat_namespace_item itemList ) + { + StmtList *stmtList = new StmtList; + + /* Walk the list of items. */ + while ( !itemList.end() ) { + walkNamespaceItem( itemList.value(), stmtList ); + itemList = itemList.next(); + } + return stmtList; + } + + + StmtList *walkRootItemList( _repeat_root_item rootItemList ) + { + StmtList *stmtList = new StmtList; + + /* Walk the list of items. */ + while ( !rootItemList.end() ) { + walkRootItem( rootItemList.value(), stmtList ); + rootItemList = rootItemList.next(); + } + return stmtList; + } + + virtual void go( long activeRealm ); +}; + +void LoadColm::go( long activeRealm ) +{ + LoadColm::init(); + + const char *argv[2]; + argv[0] = inputFileName; + argv[1] = 0; + + colm_program *program = colm_new_program( &colm_object ); + colm_set_debug( program, activeRealm ); + colm_run_program( program, 1, argv ); + + /* Extract the parse tree. */ + start Start = ColmTree( program ); + str Error = ColmError( program ); + + if ( Start == 0 ) { + gblErrorCount += 1; + InputLoc loc = Error.loc(); + error(loc) << inputFileName << ": parse error: " << Error.text() << std::endl; + return; + } + + StmtList *stmtList = walkRootItemList( Start.RootItemList() ); + colm_delete_program( program ); + + pd->rootCodeBlock = CodeBlock::cons( stmtList, 0 ); +} + +BaseParser *consLoadColm( Compiler *pd, const char *inputFileName ) +{ + return new LoadColm( pd, inputFileName ); +} diff --git a/src/loadcolm.h b/src/loadcolm.h new file mode 100644 index 0000000..bfc0589 --- /dev/null +++ b/src/loadcolm.h @@ -0,0 +1,24 @@ +/* + * Copyright 2013 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "parser.h" + +BaseParser *consLoadColm( Compiler *pd, const char *inputFileName ); diff --git a/src/loadinit.cc b/src/loadinit.cc new file mode 100644 index 0000000..6cc76b0 --- /dev/null +++ b/src/loadinit.cc @@ -0,0 +1,386 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <iostream> +#include <string> +#include <errno.h> + +#include "parser.h" +#include "config.h" +#include "avltree.h" +#include "parsedata.h" +#include "parser.h" +#include "global.h" +#include "input.h" +#include "loadinit.h" +#include "if1.h" +#include "colm/colm.h" + +using std::string; + +extern RuntimeData colm_object; + +void LoadInit::walkProdElList( String defName, ProdElList *list, prod_el_list &prodElList ) +{ + if ( prodElList.ProdElList() != 0 ) { + prod_el_list RightProdElList = prodElList.ProdElList(); + walkProdElList( defName, list, RightProdElList ); + } + + if ( prodElList.ProdEl() != 0 ) { + prod_el El = prodElList.ProdEl(); + String typeName = El.Id().text().c_str(); + + ObjectField *captureField = 0; + if ( El.OptName().Name() != 0 ) { + /* Has a capture. */ + String fieldName = El.OptName().Name().text().c_str(); + captureField = ObjectField::cons( internal, 0, fieldName ); + } + else { + /* Default the capture to the name of the type. */ + String fieldName = typeName; + if ( strcmp( fieldName, defName ) == 0 ) + fieldName = "_" + defName; + captureField = ObjectField::cons( internal, 0, fieldName ); + } + + RepeatType repeatType = RepeatNone; + if ( El.OptRepeat().Star() != 0 ) + repeatType = RepeatRepeat; + + ProdEl *prodEl = prodElName( internal, typeName, + NamespaceQual::cons( curNspace() ), + captureField, repeatType, false ); + + appendProdEl( list, prodEl ); + } +} + +void LoadInit::walkProdList( String defName, LelDefList *outProdList, prod_list &prodList ) +{ + if ( prodList.ProdList() != 0 ) { + prod_list RightProdList = prodList.ProdList(); + walkProdList( defName, outProdList, RightProdList ); + } + + ProdElList *outElList = new ProdElList; + prod_el_list prodElList = prodList.Prod().ProdElList(); + walkProdElList( defName, outElList, prodElList ); + + String name; + if ( prodList.Prod().OptName().Name() != 0 ) + name = prodList.Prod().OptName().Name().text().c_str(); + + bool commit = prodList.Prod().OptCommit().Commit() != 0; + + Production *prod = BaseParser::production( internal, outElList, name, commit, 0, 0 ); + prodAppend( outProdList, prod ); +} + +LexFactor *LoadInit::walkLexFactor( lex_factor &lexFactor ) +{ + LexFactor *factor = 0; + if ( lexFactor.Literal() != 0 ) { + String litString = lexFactor.Literal().text().c_str(); + Literal *literal = Literal::cons( internal, litString, Literal::LitString ); + factor = LexFactor::cons( literal ); + } + if ( lexFactor.Id() != 0 ) { + String id = lexFactor.Id().text().c_str(); + factor = lexRlFactorName( id, internal ); + } + else if ( lexFactor.Expr() != 0 ) { + lex_expr LexExpr = lexFactor.Expr(); + LexExpression *expr = walkLexExpr( LexExpr ); + LexJoin *join = LexJoin::cons( expr ); + factor = LexFactor::cons( join ); + } + else if ( lexFactor.Low() != 0 ) { + String low = lexFactor.Low().text().c_str(); + Literal *lowLit = Literal::cons( internal, low, Literal::LitString ); + + String high = lexFactor.High().text().c_str(); + Literal *highLit = Literal::cons( internal, high, Literal::LitString ); + + Range *range = Range::cons( lowLit, highLit ); + factor = LexFactor::cons( range ); + } + return factor; +} + +LexFactorNeg *LoadInit::walkLexFactorNeg( lex_factor_neg &lexFactorNeg ) +{ + if ( lexFactorNeg.FactorNeg() != 0 ) { + lex_factor_neg Rec = lexFactorNeg.FactorNeg(); + LexFactorNeg *recNeg = walkLexFactorNeg( Rec ); + LexFactorNeg *factorNeg = LexFactorNeg::cons( recNeg, LexFactorNeg::CharNegateType ); + return factorNeg; + } + else { + lex_factor LexFactorTree = lexFactorNeg.Factor(); + LexFactor *factor = walkLexFactor( LexFactorTree ); + LexFactorNeg *factorNeg = LexFactorNeg::cons( factor ); + return factorNeg; + } +} + +LexFactorRep *LoadInit::walkLexFactorRep( lex_factor_rep &lexFactorRep ) +{ + LexFactorRep *factorRep = 0; + if ( lexFactorRep.Star() != 0 ) { + lex_factor_rep Rec = lexFactorRep.FactorRep(); + LexFactorRep *recRep = walkLexFactorRep( Rec ); + factorRep = LexFactorRep::cons( internal, recRep, 0, 0, LexFactorRep::StarType ); + } + else if ( lexFactorRep.Plus() != 0 ) { + lex_factor_rep Rec = lexFactorRep.FactorRep(); + LexFactorRep *recRep = walkLexFactorRep( Rec ); + factorRep = LexFactorRep::cons( internal, recRep, 0, 0, LexFactorRep::PlusType ); + } + else { + lex_factor_neg LexFactorNegTree = lexFactorRep.FactorNeg(); + LexFactorNeg *factorNeg = walkLexFactorNeg( LexFactorNegTree ); + factorRep = LexFactorRep::cons( factorNeg ); + } + return factorRep; +} + +LexFactorAug *LoadInit::walkLexFactorAug( lex_factor_rep &lexFactorRep ) +{ + LexFactorRep *factorRep = walkLexFactorRep( lexFactorRep ); + return LexFactorAug::cons( factorRep ); +} + +LexTerm *LoadInit::walkLexTerm( lex_term &lexTerm ) +{ + if ( lexTerm.Term() != 0 ) { + lex_term Rec = lexTerm.Term(); + LexTerm *leftTerm = walkLexTerm( Rec ); + + lex_factor_rep LexFactorRepTree = lexTerm.FactorRep(); + LexFactorAug *factorAug = walkLexFactorAug( LexFactorRepTree ); + LexTerm *term = LexTerm::cons( leftTerm, factorAug, LexTerm::ConcatType ); + return term; + } + else { + lex_factor_rep LexFactorRepTree = lexTerm.FactorRep(); + LexFactorAug *factorAug = walkLexFactorAug( LexFactorRepTree ); + LexTerm *term = LexTerm::cons( factorAug ); + return term; + } +} + +LexExpression *LoadInit::walkLexExpr( lex_expr &LexExprTree ) +{ + if ( LexExprTree.Expr() != 0 ) { + lex_expr Rec = LexExprTree.Expr(); + LexExpression *leftExpr = walkLexExpr( Rec ); + + lex_term lexTerm = LexExprTree.Term(); + LexTerm *term = walkLexTerm( lexTerm ); + LexExpression *expr = LexExpression::cons( leftExpr, term, LexExpression::OrType ); + + return expr; + } + else { + lex_term lexTerm = LexExprTree.Term(); + LexTerm *term = walkLexTerm( lexTerm ); + LexExpression *expr = LexExpression::cons( term ); + return expr; + } +} + +bool walkNoIgnore( opt_ni OptNi ) +{ + return OptNi.Ni() != 0; +} + +void LoadInit::walkTokenList( token_list &tokenList ) +{ + if ( tokenList.TokenList() != 0 ) { + token_list RightTokenList = tokenList.TokenList(); + walkTokenList( RightTokenList ); + } + + if ( tokenList.TokenDef() != 0 ) { + token_def tokenDef = tokenList.TokenDef(); + String name = tokenDef.Id().text().c_str(); + + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ ); + + lex_expr LexExpr = tokenDef.Expr(); + LexExpression *expr = walkLexExpr( LexExpr ); + LexJoin *join = LexJoin::cons( expr ); + + bool leftNi = walkNoIgnore( tokenDef.LeftNi() ); + bool rightNi = walkNoIgnore( tokenDef.RightNi() ); + + defineToken( internal, name, join, objectDef, 0, false, leftNi, rightNi ); + } + + if ( tokenList.IgnoreDef() != 0 ) { + ignore_def IgnoreDef = tokenList.IgnoreDef(); + + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, String(), pd->nextObjectId++ ); + + lex_expr LexExpr = IgnoreDef.Expr(); + LexExpression *expr = walkLexExpr( LexExpr ); + LexJoin *join = LexJoin::cons( expr ); + + defineToken( internal, String(), join, objectDef, 0, true, false, false ); + } +} + +void LoadInit::walkLexRegion( item &LexRegion ) +{ + pushRegionSet( internal ); + + token_list tokenList = LexRegion.TokenList(); + walkTokenList( tokenList ); + + popRegionSet(); +} + +void LoadInit::walkDefinition( item &define ) +{ + prod_list ProdList = define.ProdList(); + + String name = define.DefId().text().c_str(); + + LelDefList *defList = new LelDefList; + walkProdList( name, defList, ProdList ); + + NtDef *ntDef = NtDef::cons( name, curNspace(), curContext(), false ); + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ ); + cflDef( ntDef, objectDef, defList ); +} + +void LoadInit::consParseStmt( StmtList *stmtList ) +{ + /* Parse the "start" def. */ + NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() ); + TypeRef *typeRef = TypeRef::cons( internal, nspaceQual, String("start"), RepeatNone ); + + /* Pop argv, this yields the file name . */ + CallArgVect *popArgs = new CallArgVect; + QualItemVect *popQual = new QualItemVect; + popQual->append( QualItem( QualItem::Dot, internal, String( "argv" ) ) ); + + LangVarRef *popRef = LangVarRef::cons( internal, 0, curLocalFrame->rootScope, popQual, String("pop") ); + LangExpr *pop = LangExpr::cons( LangTerm::cons( InputLoc(), popRef, popArgs ) ); + + /* Construct a literal string 'r', for second arg to open. */ + ConsItem *modeConsItem = ConsItem::cons( internal, ConsItem::InputText, String("r") ); + ConsItemList *modeCons = new ConsItemList; + modeCons->append( modeConsItem ); + LangExpr *modeExpr = LangExpr::cons( LangTerm::cons( internal, modeCons ) ); + + /* Call open. */ + QualItemVect *openQual = new QualItemVect; + LangVarRef *openRef = LangVarRef::cons( internal, + 0, curLocalFrame->rootScope, openQual, String("open") ); + CallArgVect *openArgs = new CallArgVect; + openArgs->append( new CallArg(pop) ); + openArgs->append( new CallArg(modeExpr) ); + LangExpr *open = LangExpr::cons( LangTerm::cons( InputLoc(), openRef, openArgs ) ); + + /* Construct a list containing the open stream. */ + ConsItem *consItem = ConsItem::cons( internal, ConsItem::ExprType, open ); + ConsItemList *list = ConsItemList::cons( consItem ); + + /* Will capture the parser to "P" */ + ObjectField *objField = ObjectField::cons( internal, 0, String("P") ); + + /* Parse the above list. */ + LangExpr *parseExpr = parseCmd( internal, false, objField, typeRef, 0, list ); + LangStmt *parseStmt = LangStmt::cons( internal, LangStmt::ExprType, parseExpr ); + stmtList->append( parseStmt ); +} + +void LoadInit::consExportTree( StmtList *stmtList ) +{ + QualItemVect *qual = new QualItemVect; + LangVarRef *varRef = LangVarRef::cons( internal, 0, curLocalFrame->rootScope, qual, String("P") ); + LangExpr *expr = LangExpr::cons( LangTerm::cons( internal, LangTerm::VarRefType, varRef ) ); + + NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() ); + TypeRef *typeRef = TypeRef::cons( internal, nspaceQual, String("start"), RepeatNone ); + ObjectField *program = ObjectField::cons( internal, typeRef, String("ColmTree") ); + LangStmt *programExport = exportStmt( program, LangStmt::AssignType, expr ); + stmtList->append( programExport ); +} + +void LoadInit::consExportError( StmtList *stmtList ) +{ + QualItemVect *qual = new QualItemVect; + LangVarRef *varRef = LangVarRef::cons( internal, 0, curLocalFrame->rootScope, qual, String("error") ); + LangExpr *expr = LangExpr::cons( LangTerm::cons( internal, LangTerm::VarRefType, varRef ) ); + + NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() ); + TypeRef *typeRef = TypeRef::cons( internal, nspaceQual, String("str"), RepeatNone ); + ObjectField *program = ObjectField::cons( internal, typeRef, String("ColmError") ); + LangStmt *programExport = exportStmt( program, LangStmt::AssignType, expr ); + stmtList->append( programExport ); +} + +void LoadInit::go( long activeRealm ) +{ + LoadInit::init(); + + StmtList *stmtList = new StmtList; + + const char *argv[2]; + argv[0] = inputFileName; + argv[1] = 0; + + colm_program *program = colm_new_program( &colm_object ); + colm_run_program( program, 1, argv ); + + /* Extract the parse tree. */ + start Start = ColmTree( program ); + + if ( Start == 0 ) { + gblErrorCount += 1; + std::cerr << inputFileName << ": parse error" << std::endl; + return; + } + + /* Walk the list of items. */ + _repeat_item ItemList = Start.ItemList(); + while ( !ItemList.end() ) { + + item Item = ItemList.value(); + if ( Item.DefId() != 0 ) + walkDefinition( Item ); + else if ( Item.TokenList() != 0 ) + walkLexRegion( Item ); + ItemList = ItemList.next(); + } + + colm_delete_program( program ); + + consParseStmt( stmtList ); + consExportTree( stmtList ); + consExportError( stmtList ); + + pd->rootCodeBlock = CodeBlock::cons( stmtList, 0 ); +} diff --git a/src/loadinit.h b/src/loadinit.h new file mode 100644 index 0000000..6aea12a --- /dev/null +++ b/src/loadinit.h @@ -0,0 +1,68 @@ +/* + * Copyright 2013 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <iostream> +#include "avltree.h" +#include "parsedata.h" +#include "parser.h" + +struct lex_factor; +struct lex_factor_neg; +struct lex_factor_rep; +struct lex_term; +struct lex_expr; +struct token_list; +struct prod_el_list; +struct prod_list; +struct item; + +struct LoadInit +: + public BaseParser +{ + LoadInit( Compiler *pd, const char *inputFileName ) + : + BaseParser(pd), + inputFileName(inputFileName) + {} + + const char *inputFileName; + + /* Constructing the colm language data structures from the the parse tree. */ + LexFactor *walkLexFactor( lex_factor &LexFactorTree ); + LexFactorNeg *walkLexFactorNeg( lex_factor_neg &LexFactorNegTree ); + LexFactorRep *walkLexFactorRep( lex_factor_rep &LexFactorRepTree ); + LexFactorAug *walkLexFactorAug( lex_factor_rep &LexFactorRepTree ); + LexTerm *walkLexTerm( lex_term &LexTerm ); + LexExpression *walkLexExpr( lex_expr &LexExpr ); + void walkTokenList( token_list &TokenList ); + void walkLexRegion( item &LexRegion ); + void walkProdElList( String defName, ProdElList *list, prod_el_list &prodElList ); + void walkProdList( String defName, LelDefList *list, prod_list &prodList ); + void walkDefinition( item &define ); + + /* Constructing statements needed to parse and export the input. */ + void consParseStmt( StmtList *stmtList ); + void consExportTree( StmtList *stmtList ); + void consExportError( StmtList *stmtList ); + + virtual void go( long activeRealm ); +}; diff --git a/src/lookup.cc b/src/lookup.cc new file mode 100644 index 0000000..3809de3 --- /dev/null +++ b/src/lookup.cc @@ -0,0 +1,243 @@ +/* + * Copyright 2007-2014 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "bytecode.h" +#include "parsedata.h" + +#include <iostream> +#include <assert.h> + +using std::cout; +using std::cerr; +using std::endl; + +ObjectDef *UniqueType::objectDef() +{ + if ( typeId != TYPE_TREE && typeId != TYPE_REF ) { + /* This should have generated a compiler error. */ + assert(false); + } + + return langEl->objectDef; +} + +/* Recurisve find through a single object def's scope. */ +ObjectField *ObjectDef::findFieldInScope( const ObjNameScope *inScope, const String &name ) const +{ + ObjFieldMapEl *objDefMapEl = inScope->objFieldMap->find( name ); + if ( objDefMapEl != 0 ) + return objDefMapEl->value; + if ( inScope->parentScope != 0 ) + return findFieldInScope( inScope->parentScope, name ); + return 0; +} + +ObjectField *ObjNameScope::findField( const String &name ) const +{ + return owner->findFieldInScope( this, name ); +} + +ObjMethod *ObjectDef::findMethod( const String &name ) const +{ + ObjMethodMapEl *objMethodMapEl = objMethodMap->find( name ); + if ( objMethodMapEl != 0 ) + return objMethodMapEl->value; + return 0; +} + +VarRefLookup LangVarRef::lookupQualification( Compiler *pd, ObjNameScope *rootScope ) const +{ + int lastPtrInQual = -1; + ObjNameScope *searchScope = rootScope; + int firstConstPart = -1; + + for ( QualItemVect::Iter qi = *qual; qi.lte(); qi++ ) { + /* Lookup the field int the current qualification. */ + ObjectField *el = searchScope->findField( qi->data ); + if ( el == 0 ) + error(qi->loc) << "cannot resolve qualification " << qi->data << endp; + + /* Lookup the type of the field. */ + el->typeRef->resolveType( pd ); + UniqueType *qualUT = el->typeRef->uniqueType; + + /* If we are dealing with an iterator then dereference it. */ + if ( qualUT->typeId == TYPE_ITER ) + qualUT = el->typeRef->searchUniqueType; + + /* Is it const? */ + if ( firstConstPart < 0 && el->isConst ) + firstConstPart = qi.pos(); + + /* Check for references. When loop is done we will have the last one + * present, if any. */ + if ( qualUT->typeId == TYPE_PTR ) + lastPtrInQual = qi.pos(); + + if ( qi->form == QualItem::Dot ) { + /* Cannot dot a reference. Iterator yes (access of the iterator + * not the current) */ + if ( qualUT->typeId == TYPE_PTR ) + error(loc) << "dot cannot be used to access a pointer" << endp; + } + else if ( qi->form == QualItem::Arrow ) { + if ( qualUT->typeId == TYPE_ITER ) + qualUT = el->typeRef->searchUniqueType; + else if ( qualUT->typeId == TYPE_PTR ) + qualUT = pd->findUniqueType( TYPE_TREE, qualUT->langEl ); + } + + ObjectDef *searchObjDef = qualUT->objectDef(); + searchScope = searchObjDef->rootScope; + } + + return VarRefLookup( lastPtrInQual, firstConstPart, searchScope->owner, searchScope ); +} + +bool LangVarRef::isLocalRef() const +{ + if ( qual->length() > 0 ) { + if ( scope->findField( qual->data[0].data ) != 0 ) + return true; + } + else if ( scope->findField( name ) != 0 ) + return true; + else if ( scope->owner->findMethod( name ) != 0 ) + return true; + + return false; +} + +bool LangVarRef::isContextRef() const +{ + if ( context != 0 ) { + if ( qual->length() > 0 ) { + if ( context->contextObjDef->rootScope->findField( qual->data[0].data ) != 0 ) + return true; + } + else if ( context->contextObjDef->rootScope->findField( name ) != 0 ) + return true; + else if ( context->contextObjDef->findMethod( name ) != 0 ) + return true; + } + + return false; +} + +bool LangVarRef::isCustom() const +{ + if ( qual->length() > 0 ) { + ObjectField *field = scope->findField( qual->data[0].data ); + if ( field != 0 && field->isCustom ) + return true; + } + else { + ObjectField *field = scope->findField( name ); + if ( field != 0 ) { + if ( field->isCustom ) + return true; + } + else { + ObjMethod *method = scope->owner->findMethod( name ); + if ( method != 0 && method->isCustom ) + return true; + } + + } + return false; +} + +VarRefLookup LangVarRef::lookupObj( Compiler *pd ) const +{ + ObjNameScope *rootScope; + if ( isLocalRef() ) + rootScope = scope; + else if ( isContextRef() ) + rootScope = context->contextObjDef->rootScope; + else + rootScope = pd->globalObjectDef->rootScope; + + return lookupQualification( pd, rootScope ); +} + +VarRefLookup LangVarRef::lookupField( Compiler *pd ) const +{ + /* Lookup the object that the field is in. */ + VarRefLookup lookup = lookupObj( pd ); + + /* Lookup the field. */ + ObjectField *field = lookup.inScope->findField( name ); + if ( field == 0 ) + error(loc) << "cannot find name " << name << " in object" << endp; + + lookup.objField = field; + lookup.uniqueType = field->typeRef->uniqueType; + + if ( field->typeRef->searchUniqueType != 0 ) + lookup.iterSearchUT = field->typeRef->searchUniqueType; + + return lookup; +} + +UniqueType *LangVarRef::lookup( Compiler *pd ) const +{ + /* Lookup the loadObj. */ + VarRefLookup lookup = lookupField( pd ); + + ObjectField *el = lookup.objField; + UniqueType *elUT = el->typeRef->resolveType( pd ); + + /* Deref iterators. */ + if ( elUT->typeId == TYPE_ITER ) + elUT = el->typeRef->searchUniqueType; + + return elUT; +} + + +VarRefLookup LangVarRef::lookupMethod( Compiler *pd ) const +{ + /* Lookup the object that the field is in. */ + VarRefLookup lookup = lookupObj( pd ); + + /* Find the method. */ + assert( lookup.inObject->objMethodMap != 0 ); + ObjMethod *method = lookup.inObject->findMethod( name ); + if ( method == 0 ) { + /* Not found as a method, try it as an object on which we will call a + * default function. */ + qual->append( QualItem( QualItem::Dot, loc, name ) ); + + /* Lookup the object that the field is in. */ + VarRefLookup lookup = lookupObj( pd ); + + /* Find the method. */ + assert( lookup.inObject->objMethodMap != 0 ); + method = lookup.inObject->findMethod( "finish" ); + if ( method == 0 ) + error(loc) << "cannot find " << name << "(...) in object" << endp; + } + + lookup.objMethod = method; + lookup.uniqueType = method->returnUT; + + return lookup; +} diff --git a/src/main.cc b/src/main.cc new file mode 100644 index 0000000..aaf46e6 --- /dev/null +++ b/src/main.cc @@ -0,0 +1,670 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <stdlib.h> +#include <string.h> +#include <stdio.h> +#include <iostream> +#include <fstream> +#include <unistd.h> +#include <sstream> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> + +#include "global.h" +#include "debug.h" +#include "pcheck.h" +#include "vector.h" +#include "version.h" +#include "keyops.h" +#include "parsedata.h" +#include "vector.h" +#include "version.h" +#include "fsmcodegen.h" +#include "colm.h" + +#if defined(CONS_INIT) +#include "consinit.h" +#elif defined(LOAD_INIT) +#include "loadinit.h" +#else +#include "loadcolm.h" +#endif + +using std::istream; +using std::ifstream; +using std::ostream; +using std::ios; +using std::cin; +using std::cout; +using std::cerr; +using std::endl; + +/* Graphviz dot file generation. */ +bool genGraphviz = false; + +using std::ostream; +using std::istream; +using std::ifstream; +using std::ofstream; +using std::ios; +using std::cout; +using std::cerr; +using std::cin; +using std::endl; + +InputLoc internal; + +/* Io globals. */ +istream *inStream = 0; +ostream *outStream = 0; +const char *inputFn = 0; +const char *outputFn = 0; +const char *intermedFn = 0; +const char *binaryFn = 0; +const char *exportHeaderFn = 0; +const char *exportCodeFn = 0; +bool exportCode = false; + +bool generateGraphviz = false; +bool verbose = false; +bool logging = false; +bool branchPointInfo = false; +bool addUniqueEmptyProductions = false; +bool gblLibrary = false; +long gblActiveRealm = 0; + +ArgsVector includePaths; + +/* Print version information. */ +void version(); + +/* Total error count. */ +int gblErrorCount = 0; + +HostType hostTypesC[] = +{ + { "char", 0, CHAR_MIN, CHAR_MAX, sizeof(char) }, +}; + +HostLang hostLangC = { hostTypesC, 8, hostTypesC+0, true }; +HostLang *hostLang = &hostLangC; + +/* Print the opening to an error in the input, then return the error ostream. */ +ostream &error( const InputLoc &loc ) +{ + /* Keep the error count. */ + gblErrorCount += 1; + + if ( loc.fileName != 0 ) + cerr << loc.fileName << ":"; + else + cerr << "<input>:"; + + if ( loc.line == -1 ) { + cerr << "INT: "; + } + else { + cerr << loc.line << ":" << loc.col << ": "; + } + return cerr; +} + +/* Print the opening to a program error, then return the error stream. */ +ostream &error() +{ + gblErrorCount += 1; + cerr << "error: " PROGNAME ": "; + return cerr; +} + + +/* Print the opening to a warning, then return the error ostream. */ +ostream &warning( ) +{ + cerr << "warning: " << inputFn << ": "; + return cerr; +} + +/* Print the opening to a warning in the input, then return the error ostream. */ +ostream &warning( const InputLoc &loc ) +{ + assert( inputFn != 0 ); + cerr << "warning: " << inputFn << ":" << + loc.line << ":" << loc.col << ": "; + return cerr; +} + +void escapeLineDirectivePath( std::ostream &out, char *path ) +{ + for ( char *pc = path; *pc != 0; pc++ ) { + if ( *pc == '\\' ) + out << "\\\\"; + else + out << *pc; + } +} + +void escapeLineDirectivePath( std::ostream &out, char *path ); +void scan( char *fileName, istream &input ); + +bool printStatistics = false; + +/* Print a summary of the options. */ +void usage() +{ + cout << +"usage: colm [options] file\n" +"general:\n" +" -h, -H, -?, --help print this usage and exit\n" +" -v --version print version information and exit\n" +" -o <file> write output to <file>\n" +" -c compile only (don't produce binary)\n" +" -e <file> write C++ export header to <file>\n" +" -x <file> write C++ export code to <file>\n" + ; +} + +/* Print version information. */ +void version() +{ + cout << "Colm version " VERSION << " " PUBDATE << endl << + "Copyright (c) 2007-2012 by Adrian D. Thurston" << endl; +} + +/* Scans a string looking for the file extension. If there is a file + * extension then pointer returned points to inside the string + * passed in. Otherwise returns null. */ +const char *findFileExtension( const char *stemFile ) +{ + const char *ppos = stemFile + strlen(stemFile) - 1; + + /* Scan backwards from the end looking for the first dot. + * If we encounter a '/' before the first dot, then stop the scan. */ + while ( 1 ) { + /* If we found a dot or got to the beginning of the string then + * we are done. */ + if ( ppos == stemFile || *ppos == '.' ) + break; + + /* If we hit a / then there is no extension. Done. */ + if ( *ppos == '/' ) { + ppos = stemFile; + break; + } + ppos--; + } + + /* If we got to the front of the string then bail we + * did not find an extension */ + if ( ppos == stemFile ) + ppos = 0; + + return ppos; +} + +/* Make a file name from a stem. Removes the old filename suffix and + * replaces it with a new one. Returns a newed up string. */ +char *fileNameFromStem( const char *stemFile, const char *suffix ) +{ + int len = strlen( stemFile ); + assert( len > 0 ); + + /* Get the extension. */ + const char *ppos = findFileExtension( stemFile ); + + /* If an extension was found, then shorten what we think the len is. */ + if ( ppos != 0 ) + len = ppos - stemFile; + + int slen = suffix != 0 ? strlen( suffix ) : 0; + char *retVal = new char[ len + slen + 1 ]; + strncpy( retVal, stemFile, len ); + if ( suffix != 0 ) + strcpy( retVal + len, suffix ); + retVal[len+slen] = 0; + + return retVal; +} + +void openOutputCompiled() +{ + if ( binaryFn == 0 ) + binaryFn = fileNameFromStem( inputFn, 0 ); + + if ( intermedFn == 0 ) + intermedFn = fileNameFromStem( binaryFn, ".c" ); + + if ( binaryFn != 0 && inputFn != 0 && + strcmp( inputFn, binaryFn ) == 0 ) + { + error() << "output file \"" << binaryFn << + "\" is the same as the input file" << endl; + } + + if ( intermedFn != 0 && inputFn != 0 && + strcmp( inputFn, intermedFn ) == 0 ) + { + error() << "intermediate file \"" << intermedFn << + "\" is the same as the input file" << endl; + } + + if ( intermedFn != 0 ) { + /* Open the output stream, attaching it to the filter. */ + ofstream *outFStream = new ofstream( intermedFn ); + + if ( !outFStream->is_open() ) { + error() << "error opening " << intermedFn << " for writing" << endl; + exit(1); + } + + outStream = outFStream; + } + else { + /* Writing out ot std out. */ + outStream = &cout; + } +} + +void openOutputLibrary() +{ + if ( outputFn == 0 ) + outputFn = fileNameFromStem( inputFn, ".c" ); + + /* Make sure we are not writing to the same file as the input file. */ + if ( outputFn != 0 && inputFn != 0 && + strcmp( inputFn, outputFn ) == 0 ) + { + error() << "output file \"" << outputFn << + "\" is the same as the input file" << endl; + } + + if ( outputFn != 0 ) { + /* Open the output stream, attaching it to the filter. */ + ofstream *outFStream = new ofstream( outputFn ); + + if ( !outFStream->is_open() ) { + error() << "error opening " << outputFn << " for writing" << endl; + exit(1); + } + + outStream = outFStream; + } + else { + /* Writing out ot std out. */ + outStream = &cout; + } +} + +void openExports( ) +{ + /* Make sure we are not writing to the same file as the input file. */ + if ( inputFn != 0 && exportHeaderFn != 0 && strcmp( inputFn, exportHeaderFn ) == 0 ) { + error() << "output file \"" << exportHeaderFn << + "\" is the same as the input file" << endl; + } + + if ( exportHeaderFn != 0 ) { + /* Open the output stream, attaching it to the filter. */ + ofstream *outFStream = new ofstream( exportHeaderFn ); + + if ( !outFStream->is_open() ) { + error() << "error opening " << exportHeaderFn << " for writing" << endl; + exit(1); + } + + outStream = outFStream; + } + else { + /* Writing out ot std out. */ + outStream = &cout; + } +} + +void openExportsImpl( ) +{ + /* Make sure we are not writing to the same file as the input file. */ + if ( inputFn != 0 && exportCodeFn != 0 && strcmp( inputFn, exportCodeFn ) == 0 ) { + error() << "output file \"" << exportCodeFn << + "\" is the same as the input file" << endl; + } + + if ( exportCodeFn != 0 ) { + /* Open the output stream, attaching it to the filter. */ + ofstream *outFStream = new ofstream( exportCodeFn ); + + if ( !outFStream->is_open() ) { + error() << "error opening " << exportCodeFn << " for writing" << endl; + exit(1); + } + + outStream = outFStream; + } + else { + /* Writing out ot std out. */ + outStream = &cout; + } +} + +void compileOutputCommand( const char *command ) +{ + //cout << "compiling with: " << command << endl; + int res = system( command ); + if ( res != 0 ) + error() << "there was a problem compiling the output" << endl; +} + +void compileOutputInstalled( const char *argv0 ) +{ + /* Find the location of the colm program that is executing. */ + char *location = strdup( argv0 ); + char *last = location + strlen(location) - 1; + while ( true ) { + if ( last == location ) { + last[0] = '.'; + last[1] = 0; + break; + } + if ( *last == '/' ) { + last[0] = 0; + break; + } + last -= 1; + } + + int length = 1024 + strlen(intermedFn) + strlen(binaryFn); + char command[length]; + sprintf( command, + "gcc -Wall -Wwrite-strings" + " -I" PREFIX "/include" + " -g" + " -o %s" + " %s" + " -L" PREFIX "/lib" + " -lcolmd", + binaryFn, intermedFn ); + + compileOutputCommand( command ); +} + +void compileOutputInSource( const char *argv0 ) +{ + /* Find the location of the colm program that is executing. */ + char *location = strdup( argv0 ); + char *last = strrchr( location, '/' ); + assert( last != 0 ); + last[0] = 0; + + int length = 1024 + 3 * strlen(location) + strlen(intermedFn) + strlen(binaryFn); + char command[length]; + sprintf( command, + "gcc -Wall -Wwrite-strings" + " -I%s/../aapl" + " -I%s/include" + " -g" + " -o %s" + " %s" + " -L%s" + " -lcolmd", + location, location, + binaryFn, intermedFn, location ); + + compileOutputCommand( command ); +} + +bool inSourceTree( const char *argv0 ) +{ + const char *lastSlash = strrchr( argv0, '/' ); + if ( lastSlash != 0 ) { + int rootLen = lastSlash - argv0 + 1; + char *mainPath = new char[rootLen + 16]; + memcpy( mainPath, argv0, rootLen ); + strcpy( mainPath + rootLen, "main.cc" ); + + struct stat sb; + int res = stat( mainPath, &sb ); + delete[] mainPath; + + if ( res == 0 && S_ISREG( sb.st_mode ) ) + return true; + } + + return false; +} + +void processArgs( int argc, const char **argv ) +{ + ParamCheck pc( "cD:e:x:I:vdlio:S:M:vHh?-:sV", argc, argv ); + + while ( pc.check() ) { + switch ( pc.state ) { + case ParamCheck::match: + switch ( pc.parameter ) { + case 'I': + includePaths.append( pc.parameterArg ); + break; + case 'v': + version(); + exit(0); + break; + case 'd': + verbose = true; + break; + case 'l': + logging = true; + break; + case 'i': + branchPointInfo = true; + break; + /* Output. */ + case 'o': + if ( *pc.parameterArg == 0 ) + error() << "a zero length output file name was given" << endl; + else if ( outputFn != 0 ) + error() << "more than one output file name was given" << endl; + else { + /* Ok, remember the output file name. */ + outputFn = pc.parameterArg; + } + break; + + case 'H': case 'h': case '?': + usage(); + exit(0); + case 's': + printStatistics = true; + break; + case 'V': + generateGraphviz = true; + break; + case '-': + if ( strcasecmp(pc.parameterArg, "help") == 0 ) { + usage(); + exit(0); + } + else if ( strcasecmp(pc.parameterArg, "version") == 0 ) { + version(); + exit(0); + } + else { + error() << "--" << pc.parameterArg << + " is an invalid argument" << endl; + } + break; + case 'c': + gblLibrary = true; + break; + case 'e': + exportHeaderFn = pc.parameterArg; + break; + case 'x': + exportCodeFn = pc.parameterArg; + break; + case 'D': +#if DEBUG + if ( strcmp( pc.parameterArg, "BYTECODE" ) == 0 ) + gblActiveRealm |= REALM_BYTECODE; + else if ( strcmp( pc.parameterArg, "PARSE" ) == 0 ) + gblActiveRealm |= REALM_PARSE; + else if ( strcmp( pc.parameterArg, "MATCH" ) == 0 ) + gblActiveRealm |= REALM_MATCH; + else if ( strcmp( pc.parameterArg, "COMPILE" ) == 0 ) + gblActiveRealm |= REALM_COMPILE; + else if ( strcmp( pc.parameterArg, "POOL" ) == 0 ) + gblActiveRealm |= REALM_POOL; + else if ( strcmp( pc.parameterArg, "PRINT" ) == 0 ) + gblActiveRealm |= REALM_PRINT; + else if ( strcmp( pc.parameterArg, "INPUT" ) == 0 ) + gblActiveRealm |= REALM_INPUT; + else if ( strcmp( pc.parameterArg, "SCAN" ) == 0 ) + gblActiveRealm |= REALM_SCAN; + else + fatal( "unknown argument to -D %s\n", pc.parameterArg ); +#else + fatal( "-D option specified but debugging messsages not compiled in\n" ); +#endif + + } + break; + + case ParamCheck::invalid: + error() << "-" << pc.parameter << " is an invalid argument" << endl; + break; + + case ParamCheck::noparam: + /* It is interpreted as an input file. */ + if ( *pc.curArg == 0 ) + error() << "a zero length input file name was given" << endl; + else if ( inputFn != 0 ) + error() << "more than one input file name was given" << endl; + else { + /* OK, Remember the filename. */ + inputFn = pc.curArg; + } + break; + } + } +} + +/* Main, process args and call yyparse to start scanning input. */ +int main(int argc, const char **argv) +{ + processArgs( argc, argv ); + + if ( verbose ) + gblActiveRealm = 0xffffffff; + + /* Bail on above errors. */ + if ( gblErrorCount > 0 ) + exit(1); + + /* Make sure we are not writing to the same file as the input file. */ + if ( inputFn != 0 && outputFn != 0 && + strcmp( inputFn, outputFn ) == 0 ) + { + error() << "output file \"" << outputFn << + "\" is the same as the input file" << endl; + } + + +#if defined(LOAD_INIT) || defined(LOAD_COLM) + /* Open the input file for reading. */ + if ( inputFn == 0 ) { + error() << "colm: no input file given" << endl; + } + else { + /* Open the input file for reading. */ + ifstream *inFile = new ifstream( inputFn ); + if ( ! inFile->is_open() ) + error() << "could not open " << inputFn << " for reading" << endl; + delete inFile; + } +#endif + + /* Bail on above errors. */ + if ( gblErrorCount > 0 ) + exit(1); + + Compiler *pd = new Compiler; + +#if defined(CONS_INIT) + BaseParser *parser = new ConsInit( pd ); +#elif defined(LOAD_INIT) + BaseParser *parser = new LoadInit( pd, inputFn ); +#else + BaseParser *parser = consLoadColm( pd, inputFn ); +#endif + + parser->go( gblActiveRealm ); + + /* Parsing complete, check for errors.. */ + if ( gblErrorCount > 0 ) + return 1; + + /* Initiate a compile following a parse. */ + pd->compile(); + + /* + * Write output. + */ + if ( generateGraphviz ) { + outStream = &cout; + pd->writeDotFile(); + } + else { + if ( gblLibrary ) + openOutputLibrary(); + else + openOutputCompiled(); + + pd->generateOutput( gblActiveRealm ); + if ( outStream != 0 ) + delete outStream; + + if ( !gblLibrary ) { + if ( inSourceTree( argv[0] ) ) + compileOutputInSource( argv[0] ); + else + compileOutputInstalled( argv[0] ); + } + + if ( exportHeaderFn != 0 ) { + openExports(); + pd->generateExports(); + delete outStream; + } + if ( exportCodeFn != 0 ) { + openExportsImpl(); + pd->generateExportsImpl(); + delete outStream; + } + } + + delete parser; + delete pd; + + /* Bail on above errors. */ + if ( gblErrorCount > 0 ) + exit(1); + + return 0; +} diff --git a/src/map.c b/src/map.c new file mode 100644 index 0000000..4609db5 --- /dev/null +++ b/src/map.c @@ -0,0 +1,763 @@ +/* + * Copyright 2010-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <assert.h> +#include <colm/pdarun.h> +#include <colm/map.h> +#include <colm/pool.h> + +#define true 1 +#define false 0 + +void mapListAbandon( Map *map ) +{ + map->head = map->tail = 0; +} + +void mapListAddBefore( Map *map, MapEl *next_el, MapEl *new_el ) +{ + /* Set the next pointer of the new element to next_el. We do + * this regardless of the state of the list. */ + new_el->next = next_el; + + /* Set reverse pointers. */ + if ( next_el == 0 ) { + /* There is no next elememnt. We are inserting at the tail. */ + new_el->prev = map->tail; + map->tail = new_el; + } + else { + /* There is a next element and we can access next's previous. */ + new_el->prev = next_el->prev; + next_el->prev = new_el; + } + + /* Set forward pointers. */ + if ( new_el->prev == 0 ) { + /* There is no previous element. Set the head pointer.*/ + map->head = new_el; + } + else { + /* There is a previous element, set it's next pointer to new_el. */ + new_el->prev->next = new_el; + } +} + +void mapListAddAfter( Map *map, MapEl *prev_el, MapEl *new_el ) +{ + /* Set the previous pointer of new_el to prev_el. We do + * this regardless of the state of the list. */ + new_el->prev = prev_el; + + /* Set forward pointers. */ + if (prev_el == 0) { + /* There was no prev_el, we are inserting at the head. */ + new_el->next = map->head; + map->head = new_el; + } + else { + /* There was a prev_el, we can access previous next. */ + new_el->next = prev_el->next; + prev_el->next = new_el; + } + + /* Set reverse pointers. */ + if (new_el->next == 0) { + /* There is no next element. Set the tail pointer. */ + map->tail = new_el; + } + else { + /* There is a next element. Set it's prev pointer. */ + new_el->next->prev = new_el; + } +} + + +MapEl *mapListDetach( Map *map, MapEl *el ) +{ + /* Set forward pointers to skip over el. */ + if ( el->prev == 0 ) + map->head = el->next; + else + el->prev->next = el->next; + + /* Set reverse pointers to skip over el. */ + if ( el->next == 0 ) + map->tail = el->prev; + else + el->next->prev = el->prev; + + /* Update List length and return element we detached. */ + return el; +} + + +/* Once an insertion position is found, attach a element to the tree. */ +void mapAttachRebal( Map *map, MapEl *element, MapEl *parentEl, MapEl *lastLess ) +{ + /* Increment the number of element in the tree. */ + map->treeSize += 1; + + /* Set element's parent. */ + element->parent = parentEl; + + /* New element always starts as a leaf with height 1. */ + element->left = 0; + element->right = 0; + element->height = 1; + + /* Are we inserting in the tree somewhere? */ + if ( parentEl != 0 ) { + /* We have a parent so we are somewhere in the tree. If the parent + * equals lastLess, then the last traversal in the insertion went + * left, otherwise it went right. */ + if ( lastLess == parentEl ) { + parentEl->left = element; + + mapListAddBefore( map, parentEl, element ); + } + else { + parentEl->right = element; + + mapListAddAfter( map, parentEl, element ); + } + } + else { + /* No parent element so we are inserting the root. */ + map->root = element; + + mapListAddAfter( map, map->tail, element ); + } + + /* Recalculate the heights. */ + mapRecalcHeights( map, parentEl ); + + /* Find the first unbalance. */ + MapEl *ub = mapFindFirstUnbalGP( map, element ); + + /* rebalance. */ + if ( ub != 0 ) + { + /* We assert that after this single rotation the + * tree is now properly balanced. */ + mapRebalance( map, ub ); + } +} + +#if 0 +/* Recursively delete all the children of a element. */ +void mapDeleteChildrenOf( Map *map, MapEl *element ) +{ + /* Recurse left. */ + if ( element->left ) { + mapDeleteChildrenOf( map, element->left ); + + /* Delete left element. */ + delete element->left; + element->left = 0; + } + + /* Recurse right. */ + if ( element->right ) { + mapDeleteChildrenOf( map, element->right ); + + /* Delete right element. */ + delete element->right; + element->left = 0; + } +} + +void mapEmpty( Map *map ) +{ + if ( map->root ) { + /* Recursively delete from the tree structure. */ + mapDeleteChildrenOf( map, map->root ); + delete map->root; + map->root = 0; + map->treeSize = 0; + + mapListAbandon( map ); + } +} +#endif + +/* rebalance from a element whose gradparent is unbalanced. Only + * call on a element that has a grandparent. */ +MapEl *mapRebalance( Map *map, MapEl *n ) +{ + long lheight, rheight; + MapEl *a, *b, *c; + MapEl *t1, *t2, *t3, *t4; + + MapEl *p = n->parent; /* parent (Non-NUL). L*/ + MapEl *gp = p->parent; /* Grand-parent (Non-NULL). */ + MapEl *ggp = gp->parent; /* Great grand-parent (may be NULL). */ + + if (gp->right == p) + { + /* gp + * * p + p + */ + if (p->right == n) + { + /* gp + * * p + p + * * n + n + */ + a = gp; + b = p; + c = n; + t1 = gp->left; + t2 = p->left; + t3 = n->left; + t4 = n->right; + } + else + { + /* gp + * * p + p + * / + * n + */ + a = gp; + b = n; + c = p; + t1 = gp->left; + t2 = n->left; + t3 = n->right; + t4 = p->right; + } + } + else + { + /* gp + * / + * p + */ + if (p->right == n) + { + /* gp + * / + * p + * * n + n + */ + a = p; + b = n; + c = gp; + t1 = p->left; + t2 = n->left; + t3 = n->right; + t4 = gp->right; + } + else + { + /* gp + * / + * p + * / + * n + */ + a = n; + b = p; + c = gp; + t1 = n->left; + t2 = n->right; + t3 = p->right; + t4 = gp->right; + } + } + + /* Perform rotation. + */ + + /* Tie b to the great grandparent. */ + if ( ggp == 0 ) + map->root = b; + else if ( ggp->left == gp ) + ggp->left = b; + else + ggp->right = b; + b->parent = ggp; + + /* Tie a as a leftchild of b. */ + b->left = a; + a->parent = b; + + /* Tie c as a rightchild of b. */ + b->right = c; + c->parent = b; + + /* Tie t1 as a leftchild of a. */ + a->left = t1; + if ( t1 != 0 ) t1->parent = a; + + /* Tie t2 as a rightchild of a. */ + a->right = t2; + if ( t2 != 0 ) t2->parent = a; + + /* Tie t3 as a leftchild of c. */ + c->left = t3; + if ( t3 != 0 ) t3->parent = c; + + /* Tie t4 as a rightchild of c. */ + c->right = t4; + if ( t4 != 0 ) t4->parent = c; + + /* The heights are all recalculated manualy and the great + * grand-parent is passed to recalcHeights() to ensure + * the heights are correct up the tree. + * + * Note that recalcHeights() cuts out when it comes across + * a height that hasn't changed. + */ + + /* Fix height of a. */ + lheight = a->left ? a->left->height : 0; + rheight = a->right ? a->right->height : 0; + a->height = (lheight > rheight ? lheight : rheight) + 1; + + /* Fix height of c. */ + lheight = c->left ? c->left->height : 0; + rheight = c->right ? c->right->height : 0; + c->height = (lheight > rheight ? lheight : rheight) + 1; + + /* Fix height of b. */ + lheight = a->height; + rheight = c->height; + b->height = (lheight > rheight ? lheight : rheight) + 1; + + /* Fix height of b's parents. */ + mapRecalcHeights( map, ggp ); + return ggp; +} + +/* Recalculates the heights of all the ancestors of element. */ +void mapRecalcHeights( Map *map, MapEl *element ) +{ + while ( element != 0 ) + { + long lheight = element->left ? element->left->height : 0; + long rheight = element->right ? element->right->height : 0; + + long new_height = (lheight > rheight ? lheight : rheight) + 1; + + /* If there is no chage in the height, then there will be no + * change in any of the ancestor's height. We can stop going up. + * If there was a change, continue upward. */ + if (new_height == element->height) + return; + else + element->height = new_height; + + element = element->parent; + } +} + +/* Finds the first element whose grandparent is unbalanced. */ +MapEl *mapFindFirstUnbalGP( Map *map, MapEl *element ) +{ + long lheight, rheight, balanceProp; + MapEl *gp; + + if ( element == 0 || element->parent == 0 || + element->parent->parent == 0 ) + return 0; + + /* Don't do anything if we we have no grandparent. */ + gp = element->parent->parent; + while ( gp != 0 ) + { + lheight = gp->left ? gp->left->height : 0; + rheight = gp->right ? gp->right->height : 0; + balanceProp = lheight - rheight; + + if ( balanceProp < -1 || balanceProp > 1 ) + return element; + + element = element->parent; + gp = gp->parent; + } + return 0; +} + + + +/* Finds the first element that is unbalanced. */ +MapEl *mapFindFirstUnbalEl( Map *map, MapEl *element ) +{ + if ( element == 0 ) + return 0; + + while ( element != 0 ) + { + long lheight = element->left ? + element->left->height : 0; + long rheight = element->right ? + element->right->height : 0; + long balanceProp = lheight - rheight; + + if ( balanceProp < -1 || balanceProp > 1 ) + return element; + + element = element->parent; + } + return 0; +} + +/* Replace a element in the tree with another element not in the tree. */ +void mapReplaceEl( Map *map, MapEl *element, MapEl *replacement ) +{ + MapEl *parent = element->parent, + *left = element->left, + *right = element->right; + + replacement->left = left; + if (left) + left->parent = replacement; + replacement->right = right; + if (right) + right->parent = replacement; + + replacement->parent = parent; + if (parent) + { + if (parent->left == element) + parent->left = replacement; + else + parent->right = replacement; + } + else { + map->root = replacement; + } + + replacement->height = element->height; +} + + +/* Removes a element from a tree and puts filler in it's place. + * Filler should be null or a child of element. */ +void mapRemoveEl( Map *map, MapEl *element, MapEl *filler ) +{ + MapEl *parent = element->parent; + + if ( parent ) + { + if ( parent->left == element ) + parent->left = filler; + else + parent->right = filler; + } + else { + map->root = filler; + } + + if ( filler ) + filler->parent = parent; + + return; +} + +/* Recursive worker for tree copying. */ +MapEl *mapCopyBranch( Program *prg, Map *map, MapEl *el, Kid *oldNextDown, Kid **newNextDown ) +{ + /* Duplicate element. Either the base element's copy constructor or defaul + * constructor will get called. Both will suffice for initting the + * pointers to null when they need to be. */ + MapEl *newEl = mapElAllocate( prg ); + + if ( (Kid*)el == oldNextDown ) + *newNextDown = (Kid*)newEl; + + /* If the left tree is there, copy it. */ + if ( newEl->left ) { + newEl->left = mapCopyBranch( prg, map, newEl->left, oldNextDown, newNextDown ); + newEl->left->parent = newEl; + } + + mapListAddAfter( map, map->tail, newEl ); + + /* If the right tree is there, copy it. */ + if ( newEl->right ) { + newEl->right = mapCopyBranch( prg, map, newEl->right, oldNextDown, newNextDown ); + newEl->right->parent = newEl; + } + + return newEl; +} + +MapEl *mapInsertEl( Program *prg, Map *map, MapEl *element, MapEl **lastFound ) +{ + long keyRelation; + MapEl *curEl = map->root, *parentEl = 0; + MapEl *lastLess = 0; + + while ( true ) { + if ( curEl == 0 ) { + /* We are at an external element and did not find the key we were + * looking for. Attach underneath the leaf and rebalance. */ + mapAttachRebal( map, element, parentEl, lastLess ); + + if ( lastFound != 0 ) + *lastFound = element; + return element; + } + + keyRelation = cmpTree( prg, + element->key, curEl->key ); + + /* Do we go left? */ + if ( keyRelation < 0 ) { + parentEl = lastLess = curEl; + curEl = curEl->left; + } + /* Do we go right? */ + else if ( keyRelation > 0 ) { + parentEl = curEl; + curEl = curEl->right; + } + /* We have hit the target. */ + else { + if ( lastFound != 0 ) + *lastFound = curEl; + return 0; + } + } +} + +MapEl *mapInsertKey( Program *prg, Map *map, Tree *key, MapEl **lastFound ) +{ + long keyRelation; + MapEl *curEl = map->root, *parentEl = 0; + MapEl *lastLess = 0; + + while ( true ) { + if ( curEl == 0 ) { + /* We are at an external element and did not find the key we were + * looking for. Create the new element, attach it underneath the leaf + * and rebalance. */ + MapEl *element = mapElAllocate( prg ); + element->key = key; + element->tree = 0; + mapAttachRebal( map, element, parentEl, lastLess ); + + if ( lastFound != 0 ) + *lastFound = element; + return element; + } + + keyRelation = cmpTree( prg, key, curEl->key ); + + /* Do we go left? */ + if ( keyRelation < 0 ) { + parentEl = lastLess = curEl; + curEl = curEl->left; + } + /* Do we go right? */ + else if ( keyRelation > 0 ) { + parentEl = curEl; + curEl = curEl->right; + } + /* We have hit the target. */ + else { + if ( lastFound != 0 ) + *lastFound = curEl; + return 0; + } + } +} + + +/** + * \brief Find a element in the tree with the given key. + * + * \returns The element if key exists, null if the key does not exist. + */ +MapEl *mapImplFind( Program *prg, Map *map, Tree *key ) +{ + MapEl *curEl = map->root; + long keyRelation; + + while ( curEl != 0 ) { + keyRelation = cmpTree( prg, key, curEl->key ); + + /* Do we go left? */ + if ( keyRelation < 0 ) + curEl = curEl->left; + /* Do we go right? */ + else if ( keyRelation > 0 ) + curEl = curEl->right; + /* We have hit the target. */ + else { + return curEl; + } + } + return 0; +} + + +/** + * \brief Find a element, then detach it from the tree. + * + * The element is not deleted. + * + * \returns The element detached if the key is found, othewise returns null. + */ +MapEl *mapDetachByKey( Program *prg, Map *map, Tree *key ) +{ + MapEl *element = mapImplFind( prg, map, key ); + if ( element ) + mapDetach( prg, map, element ); + + return element; +} + +/** + * \brief Detach a element from the tree. + * + * If the element is not in the tree then undefined behaviour results. + * + * \returns The element given. + */ +MapEl *mapDetach( Program *prg, Map *map, MapEl *element ) +{ + MapEl *replacement, *fixfrom; + long lheight, rheight; + + /* Remove the element from the ordered list. */ + mapListDetach( map, element ); + + /* Update treeSize. */ + map->treeSize--; + + /* Find a replacement element. */ + if (element->right) + { + /* Find the leftmost element of the right subtree. */ + replacement = element->right; + while (replacement->left) + replacement = replacement->left; + + /* If replacing the element the with its child then we need to start + * fixing at the replacement, otherwise we start fixing at the + * parent of the replacement. */ + if (replacement->parent == element) + fixfrom = replacement; + else + fixfrom = replacement->parent; + + mapRemoveEl( map, replacement, replacement->right ); + mapReplaceEl( map, element, replacement ); + } + else if (element->left) + { + /* Find the rightmost element of the left subtree. */ + replacement = element->left; + while (replacement->right) + replacement = replacement->right; + + /* If replacing the element the with its child then we need to start + * fixing at the replacement, otherwise we start fixing at the + * parent of the replacement. */ + if (replacement->parent == element) + fixfrom = replacement; + else + fixfrom = replacement->parent; + + mapRemoveEl( map, replacement, replacement->left ); + mapReplaceEl( map, element, replacement ); + } + else + { + /* We need to start fixing at the parent of the element. */ + fixfrom = element->parent; + + /* The element we are deleting is a leaf element. */ + mapRemoveEl( map, element, 0 ); + } + + /* If fixfrom is null it means we just deleted + * the root of the tree. */ + if ( fixfrom == 0 ) + return element; + + /* Fix the heights after the deletion. */ + mapRecalcHeights( map, fixfrom ); + + /* Fix every unbalanced element going up in the tree. */ + MapEl *ub = mapFindFirstUnbalEl( map, fixfrom ); + while ( ub ) + { + /* Find the element to rebalance by moving down from the first unbalanced + * element 2 levels in the direction of the greatest heights. On the + * second move down, the heights may be equal ( but not on the first ). + * In which case go in the direction of the first move. */ + lheight = ub->left ? ub->left->height : 0; + rheight = ub->right ? ub->right->height : 0; + assert( lheight != rheight ); + if (rheight > lheight) + { + ub = ub->right; + lheight = ub->left ? + ub->left->height : 0; + rheight = ub->right ? + ub->right->height : 0; + if (rheight > lheight) + ub = ub->right; + else if (rheight < lheight) + ub = ub->left; + else + ub = ub->right; + } + else + { + ub = ub->left; + lheight = ub->left ? + ub->left->height : 0; + rheight = ub->right ? + ub->right->height : 0; + if (rheight > lheight) + ub = ub->right; + else if (rheight < lheight) + ub = ub->left; + else + ub = ub->left; + } + + + /* rebalance returns the grandparant of the subtree formed + * by the element that were rebalanced. + * We must continue upward from there rebalancing. */ + fixfrom = mapRebalance( map, ub ); + + /* Find the next unbalaced element. */ + ub = mapFindFirstUnbalEl( map, fixfrom ); + } + + return element; +} + + + diff --git a/src/map.h b/src/map.h new file mode 100644 index 0000000..06007ad --- /dev/null +++ b/src/map.h @@ -0,0 +1,97 @@ +/* + * Copyright 2010-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _MAP_H +#define _MAP_H + +#if defined(__cplusplus) +extern "C" { +#endif + +#include <colm/program.h> + +typedef struct _MapEl +{ + /* Must overlay Kid. */ + Tree *tree; + struct _MapEl *next; + struct _MapEl *prev; + + struct _MapEl *left, *right, *parent; + long height; + Tree *key; +} MapEl; + +typedef struct _Map +{ + /* Must overlay Tree. */ + short id; + unsigned short flags; + long refs; + MapEl *head; + + MapEl *tail; + MapEl *root; + long treeSize; + GenericInfo *genericInfo; +} Map; + +void mapListAbandon( Map *map ); + +void mapListAddBefore( Map *map, MapEl *next_el, MapEl *new_el ); +void mapListAddAfter( Map *map, MapEl *prev_el, MapEl *new_el ); +MapEl *mapListDetach( Map *map, MapEl *el ); +void mapAttachRebal( Map *map, MapEl *element, MapEl *parentEl, MapEl *lastLess ); +void mapDeleteChildrenOf( Map *map, MapEl *element ); +void mapEmpty( Map *map ); +MapEl *mapRebalance( Map *map, MapEl *n ); +void mapRecalcHeights( Map *map, MapEl *element ); +MapEl *mapFindFirstUnbalGP( Map *map, MapEl *element ); +MapEl *mapFindFirstUnbalEl( Map *map, MapEl *element ); +void mapRemoveEl( Map *map, MapEl *element, MapEl *filler ); +void mapReplaceEl( Map *map, MapEl *element, MapEl *replacement ); +MapEl *mapInsertEl( Program *prg, Map *map, MapEl *element, MapEl **lastFound ); +MapEl *mapInsertKey( Program *prg, Map *map, Tree *key, MapEl **lastFound ); +MapEl *mapImplFind( Program *prg, Map *map, Tree *key ); +MapEl *mapDetachByKey( Program *prg, Map *map, Tree *key ); +MapEl *mapDetach( Program *prg, Map *map, MapEl *element ); +MapEl *mapCopyBranch( Program *prg, Map *map, MapEl *el, Kid *oldNextDown, Kid **newNextDown ); + +long cmpTree( Program *prg, const Tree *tree1, const Tree *tree2 ); + +void mapImplRemoveEl( Program *prg, Map *map, MapEl *element ); +int mapImplRemoveKey( Program *prg, Map *map, Tree *key ); + +Tree *mapFind( Program *prg, Map *map, Tree *key ); +long mapLength( Map *map ); +Tree *mapUnstore( Program *prg, Map *map, Tree *key, Tree *existing ); +int mapInsert( Program *prg, Map *map, Tree *key, Tree *element ); +void mapUnremove( Program *prg, Map *map, Tree *key, Tree *element ); +Tree *mapUninsert( Program *prg, Map *map, Tree *key ); +Tree *mapStore( Program *prg, Map *map, Tree *key, Tree *element ); + + +#if defined(__cplusplus) +} +#endif + +#endif + diff --git a/src/parse1.c b/src/parse1.c new file mode 100644 index 0000000..2127891 --- /dev/null +++ b/src/parse1.c @@ -0,0 +1,2329 @@ +#include <colm/pdarun.h> +#include <colm/debug.h> +#include <colm/bytecode.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <assert.h> +#include <colm/config.h> +#include <colm/defs.h> +#include <colm/input.h> +#include <colm/tree.h> +#include <colm/program.h> +#include <colm/colm.h> + + +extern RuntimeData colm_program_text; + +#define parser_start 7 +#define parser_first_final 7 +#define parser_error 0 +#define false 0 +#define true 1 + +static long parser_entryByRegion[] = { + 0, 7, 32, 56, 56 +}; + +static FsmTables fsmTables_start = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + parser_entryByRegion, + + 0, 0, 0, 0, 0, 0, 0, 0, + 4, + + parser_start, + parser_first_final, + parser_error, + + 0, + 0 +}; + +static void fsmExecute( FsmRun *fsmRun, StreamImpl *inputStream ) +{ + fsmRun->start = fsmRun->p; +/*_resume:*/ + if ( fsmRun->cs == 0 ) + goto out; + if ( fsmRun->p == fsmRun->pe ) + goto out_switch; + --fsmRun->p; + + switch ( fsmRun->cs ) + { +tr1: + { fsmRun->p += 1; + fsmRun->matchedToken = 24; + goto out; +} + goto st7; +tr3: + { fsmRun->p += 1; + fsmRun->matchedToken = 28; + goto out; +} + goto st7; +tr12: + { fsmRun->p += 1; + fsmRun->matchedToken = 19; + goto out; +} + goto st7; +tr13: + { fsmRun->p += 1; + fsmRun->matchedToken = 20; + goto out; +} + goto st7; +tr14: + { fsmRun->p += 1; + fsmRun->matchedToken = 29; + goto out; +} + goto st7; +tr15: + { fsmRun->p += 1; + fsmRun->matchedToken = 30; + goto out; +} + goto st7; +tr17: + { fsmRun->p += 1; + fsmRun->matchedToken = 16; + goto out; +} + goto st7; +tr18: + { fsmRun->p += 1; + fsmRun->matchedToken = 17; + goto out; +} + goto st7; +tr20: + { fsmRun->p += 1; + fsmRun->matchedToken = 13; + goto out; +} + goto st7; +tr21: + { fsmRun->p += 1; + fsmRun->matchedToken = 14; + goto out; +} + goto st7; +tr22: + { fsmRun->p += 1; + fsmRun->matchedToken = 22; + goto out; +} + goto st7; +tr30: + { fsmRun->p += 1; + fsmRun->matchedToken = 15; + goto out; +} + goto st7; +tr31: + { fsmRun->matchedToken = 23; + goto out; +} + goto st7; +tr32: + { fsmRun->matchedToken = 18; + goto out; +} + goto st7; +tr33: + { fsmRun->p += 1; + fsmRun->matchedToken = 21; + goto out; +} + goto st7; +tr34: + { fsmRun->toklen = fsmRun->tokend; + switch( fsmRun->act ) { + case 5: + fsmRun->matchedToken = 8; + break; + case 7: + fsmRun->matchedToken = 9; + break; + case 9: + fsmRun->matchedToken = 10; + break; + case 11: + fsmRun->matchedToken = 11; + break; + case 13: + fsmRun->matchedToken = 12; + break; + case 15: + fsmRun->matchedToken = 25; + break; + case 17: + fsmRun->matchedToken = 26; + break; + case 19: + fsmRun->matchedToken = 27; + break; + } + goto skip_toklen; +} + goto st7; +tr35: + { fsmRun->matchedToken = 27; + goto out; +} + goto st7; +st7: +case 7: + if ( ++fsmRun->p == fsmRun->pe ) + goto out7; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 32: goto st8; + case 35: goto st1; + case 39: goto st2; + case 40: goto tr12; + case 41: goto tr13; + case 42: goto tr14; + case 43: goto tr15; + case 46: goto st9; + case 47: goto tr17; + case 58: goto tr18; + case 91: goto tr20; + case 93: goto tr21; + case 94: goto tr22; + case 95: goto tr19; + case 99: goto st11; + case 100: goto st16; + case 101: goto st18; + case 105: goto st20; + case 108: goto st25; + case 110: goto st27; + case 116: goto st28; + case 124: goto tr30; + } + if ( (*fsmRun->p) < 65 ) { + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 11 ) + goto st8; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto st0; +st8: +case 8: + if ( ++fsmRun->p == fsmRun->pe ) + goto out8; + if ( (*fsmRun->p) == 32 ) + goto st8; + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 11 ) + goto st8; + goto tr31; +st1: +case 1: + if ( ++fsmRun->p == fsmRun->pe ) + goto out1; + if ( (*fsmRun->p) == 10 ) + goto tr1; + goto st1; +st2: +case 2: + if ( ++fsmRun->p == fsmRun->pe ) + goto out2; + switch( (*fsmRun->p) ) { + case 39: goto tr3; + case 92: goto st3; + } + goto st2; +st3: +case 3: + if ( ++fsmRun->p == fsmRun->pe ) + goto out3; + goto st2; +st9: +case 9: + if ( ++fsmRun->p == fsmRun->pe ) + goto out9; + if ( (*fsmRun->p) == 46 ) + goto tr33; + goto tr32; +tr19: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 19;} + goto st10; +tr40: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 17;} + goto st10; +tr42: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 5;} + goto st10; +tr44: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 9;} + goto st10; +tr49: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 13;} + goto st10; +tr51: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 7;} + goto st10; +tr52: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 15;} + goto st10; +tr56: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 11;} + goto st10; +st10: +case 10: + if ( ++fsmRun->p == fsmRun->pe ) + goto out10; + if ( (*fsmRun->p) == 95 ) + goto tr19; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr34; +st11: +case 11: + if ( ++fsmRun->p == fsmRun->pe ) + goto out11; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 111: goto st12; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st12: +case 12: + if ( ++fsmRun->p == fsmRun->pe ) + goto out12; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 109: goto st13; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st13: +case 13: + if ( ++fsmRun->p == fsmRun->pe ) + goto out13; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 109: goto st14; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st14: +case 14: + if ( ++fsmRun->p == fsmRun->pe ) + goto out14; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 105: goto st15; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st15: +case 15: + if ( ++fsmRun->p == fsmRun->pe ) + goto out15; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 116: goto tr40; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st16: +case 16: + if ( ++fsmRun->p == fsmRun->pe ) + goto out16; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 101: goto st17; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st17: +case 17: + if ( ++fsmRun->p == fsmRun->pe ) + goto out17; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 102: goto tr42; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st18: +case 18: + if ( ++fsmRun->p == fsmRun->pe ) + goto out18; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 110: goto st19; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st19: +case 19: + if ( ++fsmRun->p == fsmRun->pe ) + goto out19; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 100: goto tr44; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st20: +case 20: + if ( ++fsmRun->p == fsmRun->pe ) + goto out20; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 103: goto st21; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st21: +case 21: + if ( ++fsmRun->p == fsmRun->pe ) + goto out21; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 110: goto st22; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st22: +case 22: + if ( ++fsmRun->p == fsmRun->pe ) + goto out22; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 111: goto st23; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st23: +case 23: + if ( ++fsmRun->p == fsmRun->pe ) + goto out23; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 114: goto st24; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st24: +case 24: + if ( ++fsmRun->p == fsmRun->pe ) + goto out24; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 101: goto tr49; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st25: +case 25: + if ( ++fsmRun->p == fsmRun->pe ) + goto out25; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 101: goto st26; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st26: +case 26: + if ( ++fsmRun->p == fsmRun->pe ) + goto out26; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 120: goto tr51; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st27: +case 27: + if ( ++fsmRun->p == fsmRun->pe ) + goto out27; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 105: goto tr52; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st28: +case 28: + if ( ++fsmRun->p == fsmRun->pe ) + goto out28; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 111: goto st29; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st29: +case 29: + if ( ++fsmRun->p == fsmRun->pe ) + goto out29; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 107: goto st30; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st30: +case 30: + if ( ++fsmRun->p == fsmRun->pe ) + goto out30; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 101: goto st31; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st31: +case 31: + if ( ++fsmRun->p == fsmRun->pe ) + goto out31; + switch( (*fsmRun->p) ) { + case 95: goto tr19; + case 110: goto tr56; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr19; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr19; + } else + goto tr19; + goto tr35; +st0: + goto out0; +tr6: + { fsmRun->p += 1; + fsmRun->matchedToken = 28; + goto out; +} + goto st32; +tr57: + { fsmRun->p += 1; + fsmRun->matchedToken = 19; + goto out; +} + goto st32; +tr58: + { fsmRun->p += 1; + fsmRun->matchedToken = 20; + goto out; +} + goto st32; +tr59: + { fsmRun->p += 1; + fsmRun->matchedToken = 29; + goto out; +} + goto st32; +tr60: + { fsmRun->p += 1; + fsmRun->matchedToken = 30; + goto out; +} + goto st32; +tr62: + { fsmRun->p += 1; + fsmRun->matchedToken = 16; + goto out; +} + goto st32; +tr63: + { fsmRun->p += 1; + fsmRun->matchedToken = 17; + goto out; +} + goto st32; +tr65: + { fsmRun->p += 1; + fsmRun->matchedToken = 13; + goto out; +} + goto st32; +tr66: + { fsmRun->p += 1; + fsmRun->matchedToken = 14; + goto out; +} + goto st32; +tr67: + { fsmRun->p += 1; + fsmRun->matchedToken = 22; + goto out; +} + goto st32; +tr75: + { fsmRun->p += 1; + fsmRun->matchedToken = 15; + goto out; +} + goto st32; +tr76: + { fsmRun->matchedToken = 18; + goto out; +} + goto st32; +tr77: + { fsmRun->p += 1; + fsmRun->matchedToken = 21; + goto out; +} + goto st32; +tr78: + { fsmRun->toklen = fsmRun->tokend; + switch( fsmRun->act ) { + case 6: + fsmRun->matchedToken = 8; + break; + case 8: + fsmRun->matchedToken = 9; + break; + case 10: + fsmRun->matchedToken = 10; + break; + case 12: + fsmRun->matchedToken = 11; + break; + case 14: + fsmRun->matchedToken = 12; + break; + case 16: + fsmRun->matchedToken = 25; + break; + case 18: + fsmRun->matchedToken = 26; + break; + case 20: + fsmRun->matchedToken = 27; + break; + } + goto skip_toklen; +} + goto st32; +tr79: + { fsmRun->matchedToken = 27; + goto out; +} + goto st32; +st32: +case 32: + if ( ++fsmRun->p == fsmRun->pe ) + goto out32; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 39: goto st4; + case 40: goto tr57; + case 41: goto tr58; + case 42: goto tr59; + case 43: goto tr60; + case 46: goto st33; + case 47: goto tr62; + case 58: goto tr63; + case 91: goto tr65; + case 93: goto tr66; + case 94: goto tr67; + case 95: goto tr64; + case 99: goto st35; + case 100: goto st40; + case 101: goto st42; + case 105: goto st44; + case 108: goto st49; + case 110: goto st51; + case 116: goto st52; + case 124: goto tr75; + } + if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else if ( (*fsmRun->p) >= 65 ) + goto tr64; + goto st0; +st4: +case 4: + if ( ++fsmRun->p == fsmRun->pe ) + goto out4; + switch( (*fsmRun->p) ) { + case 39: goto tr6; + case 92: goto st5; + } + goto st4; +st5: +case 5: + if ( ++fsmRun->p == fsmRun->pe ) + goto out5; + goto st4; +st33: +case 33: + if ( ++fsmRun->p == fsmRun->pe ) + goto out33; + if ( (*fsmRun->p) == 46 ) + goto tr77; + goto tr76; +tr64: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 20;} + goto st34; +tr84: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 18;} + goto st34; +tr86: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 6;} + goto st34; +tr88: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 10;} + goto st34; +tr93: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 14;} + goto st34; +tr95: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 8;} + goto st34; +tr96: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 16;} + goto st34; +tr100: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 12;} + goto st34; +st34: +case 34: + if ( ++fsmRun->p == fsmRun->pe ) + goto out34; + if ( (*fsmRun->p) == 95 ) + goto tr64; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr78; +st35: +case 35: + if ( ++fsmRun->p == fsmRun->pe ) + goto out35; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 111: goto st36; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st36: +case 36: + if ( ++fsmRun->p == fsmRun->pe ) + goto out36; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 109: goto st37; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st37: +case 37: + if ( ++fsmRun->p == fsmRun->pe ) + goto out37; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 109: goto st38; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st38: +case 38: + if ( ++fsmRun->p == fsmRun->pe ) + goto out38; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 105: goto st39; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st39: +case 39: + if ( ++fsmRun->p == fsmRun->pe ) + goto out39; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto tr84; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st40: +case 40: + if ( ++fsmRun->p == fsmRun->pe ) + goto out40; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st41; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st41: +case 41: + if ( ++fsmRun->p == fsmRun->pe ) + goto out41; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 102: goto tr86; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st42: +case 42: + if ( ++fsmRun->p == fsmRun->pe ) + goto out42; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 110: goto st43; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st43: +case 43: + if ( ++fsmRun->p == fsmRun->pe ) + goto out43; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 100: goto tr88; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st44: +case 44: + if ( ++fsmRun->p == fsmRun->pe ) + goto out44; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 103: goto st45; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st45: +case 45: + if ( ++fsmRun->p == fsmRun->pe ) + goto out45; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 110: goto st46; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st46: +case 46: + if ( ++fsmRun->p == fsmRun->pe ) + goto out46; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 111: goto st47; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st47: +case 47: + if ( ++fsmRun->p == fsmRun->pe ) + goto out47; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto st48; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st48: +case 48: + if ( ++fsmRun->p == fsmRun->pe ) + goto out48; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto tr93; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st49: +case 49: + if ( ++fsmRun->p == fsmRun->pe ) + goto out49; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st50; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st50: +case 50: + if ( ++fsmRun->p == fsmRun->pe ) + goto out50; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 120: goto tr95; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st51: +case 51: + if ( ++fsmRun->p == fsmRun->pe ) + goto out51; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 105: goto tr96; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st52: +case 52: + if ( ++fsmRun->p == fsmRun->pe ) + goto out52; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 111: goto st53; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st53: +case 53: + if ( ++fsmRun->p == fsmRun->pe ) + goto out53; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 107: goto st54; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st54: +case 54: + if ( ++fsmRun->p == fsmRun->pe ) + goto out54; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st55; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +st55: +case 55: + if ( ++fsmRun->p == fsmRun->pe ) + goto out55; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 110: goto tr100; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr79; +tr9: + { fsmRun->p += 1; + fsmRun->matchedToken = 24; + goto out; +} + goto st56; +tr102: + { fsmRun->matchedToken = 23; + goto out; +} + goto st56; +st56: +case 56: + if ( ++fsmRun->p == fsmRun->pe ) + goto out56; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 32: goto st57; + case 35: goto st6; + } + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 11 ) + goto st57; + goto st0; +st57: +case 57: + if ( ++fsmRun->p == fsmRun->pe ) + goto out57; + if ( (*fsmRun->p) == 32 ) + goto st57; + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 11 ) + goto st57; + goto tr102; +st6: +case 6: + if ( ++fsmRun->p == fsmRun->pe ) + goto out6; + if ( (*fsmRun->p) == 10 ) + goto tr9; + goto st6; + } +out_switch: + switch ( fsmRun->cs ) + { + case 7: out7: fsmRun->cs = 7; goto out; + case 8: out8: if ( fsmRun->eof ) {goto tr31; +}fsmRun->cs = 8; goto out; + case 1: out1: fsmRun->cs = 1; goto out; + case 2: out2: fsmRun->cs = 2; goto out; + case 3: out3: fsmRun->cs = 3; goto out; + case 9: out9: if ( fsmRun->eof ) {goto tr32; +}fsmRun->cs = 9; goto out; + case 10: out10: if ( fsmRun->eof ) {goto tr34; +}fsmRun->cs = 10; goto out; + case 11: out11: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 11; goto out; + case 12: out12: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 12; goto out; + case 13: out13: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 13; goto out; + case 14: out14: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 14; goto out; + case 15: out15: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 15; goto out; + case 16: out16: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 16; goto out; + case 17: out17: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 17; goto out; + case 18: out18: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 18; goto out; + case 19: out19: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 19; goto out; + case 20: out20: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 20; goto out; + case 21: out21: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 21; goto out; + case 22: out22: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 22; goto out; + case 23: out23: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 23; goto out; + case 24: out24: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 24; goto out; + case 25: out25: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 25; goto out; + case 26: out26: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 26; goto out; + case 27: out27: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 27; goto out; + case 28: out28: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 28; goto out; + case 29: out29: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 29; goto out; + case 30: out30: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 30; goto out; + case 31: out31: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 31; goto out; + case 0: out0: fsmRun->cs = 0; goto out; + case 32: out32: fsmRun->cs = 32; goto out; + case 4: out4: fsmRun->cs = 4; goto out; + case 5: out5: fsmRun->cs = 5; goto out; + case 33: out33: if ( fsmRun->eof ) {goto tr76; +}fsmRun->cs = 33; goto out; + case 34: out34: if ( fsmRun->eof ) {goto tr78; +}fsmRun->cs = 34; goto out; + case 35: out35: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 35; goto out; + case 36: out36: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 36; goto out; + case 37: out37: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 37; goto out; + case 38: out38: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 38; goto out; + case 39: out39: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 39; goto out; + case 40: out40: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 40; goto out; + case 41: out41: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 41; goto out; + case 42: out42: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 42; goto out; + case 43: out43: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 43; goto out; + case 44: out44: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 44; goto out; + case 45: out45: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 45; goto out; + case 46: out46: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 46; goto out; + case 47: out47: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 47; goto out; + case 48: out48: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 48; goto out; + case 49: out49: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 49; goto out; + case 50: out50: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 50; goto out; + case 51: out51: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 51; goto out; + case 52: out52: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 52; goto out; + case 53: out53: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 53; goto out; + case 54: out54: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 54; goto out; + case 55: out55: if ( fsmRun->eof ) {goto tr79; +}fsmRun->cs = 55; goto out; + case 56: out56: fsmRun->cs = 56; goto out; + case 57: out57: if ( fsmRun->eof ) {goto tr102; +}fsmRun->cs = 57; goto out; + case 6: out6: fsmRun->cs = 6; goto out; + } +out: + if ( fsmRun->p != 0 ) + fsmRun->toklen += fsmRun->p - fsmRun->start; +skip_toklen: + {} +} + +static void sendNamedLangEl( Program *prg, Tree **tree, PdaRun *pdaRun, + FsmRun *fsmRun, StreamImpl *inputStream ) { } +static void initBindings( PdaRun *pdaRun ) {} +static void popBinding( PdaRun *pdaRun, ParseTree *tree ) {} + + +static int pid_0_parser_indicies[] = { + 4, 3, 5, 62, 98, 4, 3, 6, + 62, 100, 83, 14, 15, 16, 95, 95, + 95, 97, 97, 90, 90, 19, 11, 83, + 18, 20, 90, 40, 93, 93, 93, 94, + 94, 94, 96, 96, 83, 83, 17, 39, + 11, 41, 2, 0, 22, 1, 50, 2, + 13, 12, 8, 95, 95, 7, 10, 9, + 99, 24, 77, 97, 82, 90, 97, 80, + 90, 93, 93, 27, 94, 94, 23, 21, + 25, 82, 35, 57, 96, 32, -1, 96, + 26, -1, 36, 34, 48, 49, 82, 82, + 33, 31, 30, 29, 28, 48, 75, 75, + 101, 47, 56, 75, -1, 101, -1, 5, + 76, 76, 76, 81, 48, 60, 76, 74, + 74, 97, 47, 90, 74, 87, 87, -1, + 81, 89, 89, -1, 87, -1, 38, -1, + 89, -1, 96, -1, -1, 81, 81, 87, + -1, -1, -1, 17, -1, 76, 76, 2, + 0, -1, 1, -1, 2, 13, 12, 8, + 87, 37, 7, 10, 9, -1, -1, 87, + -1, -1, 87, 89, 73, 73, 89, 73, + -1, 73, -1, 23, 21, 25, -1, -1, + -1, -1, 45, 46, -1, 26, 71, 71, + -1, 71, -1, 71, -1, 33, 31, 30, + 29, 28, -1, 35, 71, 71, 32, -1, + 91, 91, 91, 36, 34, -1, -1, -1, + -1, 33, 43, 68, 68, 87, 68, -1, + 68, 89, 63, 63, -1, 63, -1, 63, + 44, 68, 68, 35, -1, -1, 32, -1, + 63, 63, -1, 36, 34, 91, 91, -1, + -1, 33, 31, 30, 29, 42, 64, 64, + -1, 64, 79, 64, 85, 85, 37, 92, + 92, 92, -1, 85, 64, 64, -1, 79, + 35, 54, -1, 32, -1, -1, 52, -1, + 36, 34, -1, 53, 79, 79, 33, 31, + 30, 29, 55, -1, -1, 67, 67, 51, + 67, -1, 67, -1, 92, 92, 85, -1, + -1, 85, -1, 67, 67, 69, 69, -1, + 69, -1, 69, 88, 88, -1, 33, 43, + 84, 84, 88, 69, 69, 70, 70, 84, + 70, 35, 70, -1, 32, -1, -1, -1, + -1, 36, 34, 70, 70, 86, 86, 33, + 31, 58, -1, -1, 86, -1, 33, 31, + 30, 29, 42, 35, 85, 88, 32, 86, + 88, -1, 84, 36, 34, 84, 78, -1, + -1, 33, 31, 30, 59, -1, -1, -1, + 86, -1, -1, 78, -1, -1, -1, 86, + 53, -1, 86, 33, 31, 30, 29, 55, + 78, 78, 65, 65, 51, 65, -1, 65, + 66, 66, -1, 66, -1, 66, -1, -1, + 65, 65, -1, 88, -1, -1, 66, 66, + 84, 72, 72, -1, 72, -1, 72, 77, + 77, 77, -1, -1, -1, -1, -1, 45, + 46, -1, -1, -1, -1, 86, 27, -1, + -1, -1, -1, -1, 33, 31, 58, -1, + -1, -1, -1, 61, -1, -1, -1, -1, + -1, -1, -1, -1, 77, 77, -1, -1, + -1, -1, -1, -1, -1, -1, 33, 31, + 30, 59, -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, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 61 +}; + +static int pid_0_parser_owners[] = { + 0, 0, 1, 2, 3, 4, 4, 6, + 7, 10, 13, 9, 9, 9, 5, 5, + 5, 11, 11, 12, 12, 17, 8, 13, + 11, 18, 12, 25, 14, 14, 14, 15, + 15, 15, 16, 16, 13, 13, 13, 26, + 20, 28, 0, 0, 19, 0, 40, 4, + 9, 9, 4, 5, 5, 5, 8, 8, + 1, 19, 21, 11, 23, 12, 11, 41, + 12, 14, 14, 21, 15, 15, 19, 19, + 20, 23, 22, 46, 16, 22, -1, 16, + 21, -1, 22, 22, 30, 30, 23, 23, + 22, 22, 22, 22, 22, 44, 31, 31, + 0, 31, 44, 31, -1, 4, -1, 1, + 29, 29, 29, 55, 57, 57, 29, 61, + 61, 11, 61, 12, 61, 24, 24, -1, + 55, 27, 27, -1, 24, -1, 24, -1, + 27, -1, 16, -1, -1, 55, 55, 24, + -1, -1, -1, 13, -1, 29, 29, 0, + 0, -1, 0, -1, 4, 9, 9, 4, + 24, 24, 5, 8, 8, -1, -1, 24, + -1, -1, 24, 27, 32, 32, 27, 32, + -1, 32, -1, 19, 19, 20, -1, -1, + -1, -1, 32, 32, -1, 21, 33, 33, + -1, 33, -1, 33, -1, 22, 22, 22, + 22, 22, -1, 34, 33, 33, 34, -1, + 51, 51, 51, 34, 34, -1, -1, -1, + -1, 34, 34, 35, 35, 24, 35, -1, + 35, 27, 36, 36, -1, 36, -1, 36, + 36, 35, 35, 37, -1, -1, 37, -1, + 36, 36, -1, 37, 37, 51, 51, -1, + -1, 37, 37, 37, 37, 37, 38, 38, + -1, 38, 42, 38, 39, 39, 24, 63, + 63, 63, -1, 39, 38, 38, -1, 42, + 43, 42, -1, 43, -1, -1, 39, -1, + 43, 43, -1, 42, 42, 42, 43, 43, + 43, 43, 43, -1, -1, 45, 45, 39, + 45, -1, 45, -1, 63, 63, 39, -1, + -1, 39, -1, 45, 45, 47, 47, -1, + 47, -1, 47, 53, 53, -1, 34, 34, + 54, 54, 53, 47, 47, 48, 48, 54, + 48, 49, 48, -1, 49, -1, -1, -1, + -1, 49, 49, 48, 48, 52, 52, 49, + 49, 49, -1, -1, 52, -1, 37, 37, + 37, 37, 37, 50, 39, 53, 50, 52, + 53, -1, 54, 50, 50, 54, 56, -1, + -1, 50, 50, 50, 50, -1, -1, -1, + 52, -1, -1, 56, -1, -1, -1, 52, + 42, -1, 52, 43, 43, 43, 43, 43, + 56, 56, 58, 58, 39, 58, -1, 58, + 59, 59, -1, 59, -1, 59, -1, -1, + 58, 58, -1, 53, -1, -1, 59, 59, + 54, 60, 60, -1, 60, -1, 60, 62, + 62, 62, -1, -1, -1, -1, -1, 60, + 60, -1, -1, -1, -1, 52, 62, -1, + -1, -1, -1, -1, 49, 49, 49, -1, + -1, -1, -1, 62, -1, -1, -1, -1, + -1, -1, -1, -1, 62, 62, -1, -1, + -1, -1, -1, -1, -1, -1, 50, 50, + 50, 50, -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, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 62 +}; + +static int pid_0_parser_keys[] = { + 8, 154, 52, 153, 104, 104, 104, 104, + 8, 154, 10, 150, 27, 27, 106, 106, + 13, 147, 10, 149, 104, 104, 8, 104, + 8, 104, 14, 143, 10, 48, 10, 48, + 8, 104, 27, 27, 16, 16, 14, 142, + 13, 146, 16, 139, 19, 138, 14, 41, + 8, 145, 27, 27, 17, 17, 8, 104, + 16, 16, 10, 48, 15, 16, 15, 20, + 15, 30, 15, 30, 19, 135, 15, 30, + 15, 30, 19, 138, 15, 30, 8, 144, + 27, 27, 27, 27, 14, 140, 19, 138, + 15, 20, 15, 30, 28, 28, 15, 30, + 15, 30, 19, 136, 19, 137, 10, 48, + 8, 104, 8, 104, 8, 104, 14, 41, + 14, 41, 15, 16, 15, 30, 15, 30, + 15, 30, 15, 20, 10, 139, 10, 48, + 0, 0 +}; + +static unsigned int pid_0_parser_offsets[] = { + 0, 2, 3, 4, 5, 14, 7, 8, + 22, 11, 9, 17, 19, 10, 28, 31, + 34, 21, 25, 44, 40, 58, 74, 60, + 117, 27, 39, 121, 41, 104, 84, 94, + 164, 182, 195, 211, 218, 227, 246, 252, + 46, 63, 250, 264, 93, 285, 75, 301, + 317, 321, 347, 200, 333, 307, 312, 107, + 358, 108, 386, 392, 409, 111, 415, 255, + 0 +}; + +static unsigned int pid_0_parser_targs[] = { + 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, 63, 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 +}; + +static unsigned int pid_0_parser_actInds[] = { + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 48, 51, 53, 55, 57, 59, 61, 63, + 65, 67, 69, 71, 73, 75, 77, 79, + 81, 83, 85, 87, 89, 91, 93, 95, + 97, 99, 101, 103, 105, 107, 109, 111, + 113, 115, 117, 119, 121, 123, 125, 127, + 129, 131, 133, 135, 137, 139, 141, 143, + 145, 147, 149, 151, 153, 155, 157, 159, + 161, 163, 165, 167, 169, 171, 173, 175, + 177, 179, 181, 183, 185, 187, 189, 191, + 193, 195, 197, 199, 201, 203 +}; + +static unsigned int pid_0_parser_actions[] = { + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 74, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 2, + 0, 6, 0, 10, 0, 14, 0, 18, + 0, 22, 0, 26, 0, 30, 0, 34, + 0, 38, 0, 42, 0, 46, 0, 50, + 0, 54, 0, 58, 0, 62, 0, 66, + 0, 70, 0, 78, 0, 82, 0, 86, + 0, 90, 0, 94, 0, 98, 0, 102, + 0, 106, 0, 110, 0, 114, 0, 118, + 0, 122, 0, 126, 0, 130, 0, 134, + 0, 138, 0, 142, 0, 146, 0, 150, + 0, 154, 0, 158, 0 +}; + +static int pid_0_parser_commitLen[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0 +}; + +static int pid_0_parser_tokenRegionInds[] = { + 1, 3, 5, 7, 9, 11, 13, 15, + 17, 19, 21, 23, 25, 27, 29, 31, + 33, 35, 37, 39, 41, 43, 45, 47, + 49, 51, 53, 55, 57, 59, 61, 63, + 65, 67, 69, 71, 73, 75, 77, 79, + 81, 83, 85, 87, 89, 91, 93, 95, + 97, 99, 101, 103, 105, 107, 109, 111, + 113, 115, 117, 119, 121, 123, 125, 127, + 129 +}; + +static int pid_0_parser_tokenRegions[] = { + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 1, 0, 1, 0, 0, + 0, 1, 0, 1, 0, 0, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 0 +}; + +static int pid_0_parser_tokenPreRegions[] = { + 0, -1, 0, -1, 0, -1, 0, -1, + 0, -1, 0, 3, 0, 3, 0, -1, + 0, 3, 0, -1, 0, -1, 0, -1, + 0, -1, 0, 3, 0, -1, 0, -1, + 0, 3, 0, 3, 0, 3, 0, -1, + 0, 3, 0, 3, 0, 3, 0, -1, + 0, 3, 0, -1, 0, 3, 0, -1, + 0, -1, 0, 3, 0, -1, 0, -1, + 0, -1, 0, -1, 0, 3, 0, -1, + 0, 3, 0, 3, 0, 3, 0, -1, + 0, 3, 0, 3, 0, 3, 0, 3, + 0, -1, 0, -1, 0, 3, 0, 3, + 0, 3, 0, 3, 0, 3, 0, 3, + 0, 3, 0, -1, 0, 3, 0, -1, + 0, 3, 0, -1, 0, 3, 0, 3, + 0, -1, 0, -1, 0, 3, 0, -1, + 0, 0 +}; + +static PdaTables pid_0_pdaTables = +{ + pid_0_parser_indicies, + pid_0_parser_owners, + pid_0_parser_keys, + pid_0_parser_offsets, + pid_0_parser_targs, + pid_0_parser_actInds, + pid_0_parser_actions, + pid_0_parser_commitLen, + pid_0_parser_tokenRegionInds, + pid_0_parser_tokenRegions, + pid_0_parser_tokenPreRegions, + + 545, + 130, + 65, + 102, + 102, + 205, + 102, + 130, + 130 +}; + +static LocalInfo locals_0[] = { + { 1, -1 } +}; + +static unsigned char copy_0[] = { + 0, 0 +}; + +static unsigned char copy_1[] = { + 0, 0 +}; + +static unsigned char copy_2[] = { + 0, 1 +}; + +static unsigned char copy_3[] = { + 0, 0, 0, 2 +}; + +static unsigned char copy_4[] = { + 0, 1 +}; + +static unsigned char copy_5[] = { + 0, 0 +}; + +static unsigned char copy_6[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_7[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_8[] = { + 0, 0 +}; + +static unsigned char copy_9[] = { + 0, 0, 0, 2 +}; + +static unsigned char copy_10[] = { + 0, 0 +}; + +static unsigned char copy_11[] = { + 0, 0, 0, 2 +}; + +static unsigned char copy_12[] = { + 0, 0 +}; + +static unsigned char copy_13[] = { + 0, 0 +}; + +static unsigned char copy_15[] = { + 0, 0 +}; + +static unsigned char copy_17[] = { + 0, 0 +}; + +static unsigned char copy_19[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_20[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_22[] = { + 0, 0 +}; + +static unsigned char copy_24[] = { + 0, 1 +}; + +static unsigned char copy_26[] = { + 0, 1, 0, 3, 0, 4 +}; + +static unsigned char copy_27[] = { + 0, 0, 0, 2 +}; + +static unsigned char copy_28[] = { + 0, 0 +}; + +static unsigned char copy_29[] = { + 0, 2 +}; + +static unsigned char copy_30[] = { + 0, 1, 0, 2, 0, 4, 0, 6 +}; + +static unsigned char copy_31[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_32[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_34[] = { + 0, 1 +}; + +static unsigned char copy_35[] = { + 0, 1, 0, 2 +}; + +static unsigned char copy_36[] = { + 0, 0 +}; + +static Code parser_rootCode[] = { + 28, 1, 0, 184, 1, 0, 35, 0, + 0, 31, 31, 222, 32, 223, 31, 87, + 45, 1, 0, 119, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 180, 32, 224, + 168, 29, 31, 160, 162, 0, 0, 177, + 163, 160, 171, 0, 0, 177, 172, 29, + 31, 91, 1, 0, 226, 91, 0, 0, + 31, 39, 255, 255, 29, 37, 255, 255, + 87, 49, 0, 0, 144 +}; + +static LangElInfo parser_lelInfo[] = { + { "__UNUSED", "__UNUSED", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0 }, + { "ptr", "ptr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_void", "void", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_bool", "bool", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_int", "int", 0, 0, 0, 0, -1, 45, 0, 0, 0, 0, -1, 0, 0 }, + { "str", "str", 0, 0, 0, 0, -1, 46, 0, 0, 0, 0, -1, 0, 0 }, + { "stream", "stream", 0, 0, 0, 0, -1, 47, 0, 0, 0, 0, -1, 0, 0 }, + { "il", "il", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "'def'", "_literal_0005", 0, 0, 1, 0, -1, 5, 0, 0, 0, 0, -1, 0, 0 }, + { "'lex'", "_literal_0007", 0, 0, 1, 0, -1, 6, 0, 0, 0, 0, -1, 0, 0 }, + { "'end'", "_literal_0009", 0, 0, 1, 0, -1, 7, 0, 0, 0, 0, -1, 0, 0 }, + { "'token'", "_literal_000b", 0, 0, 1, 0, -1, 8, 0, 0, 0, 0, -1, 0, 0 }, + { "'ignore'", "_literal_000d", 0, 0, 1, 0, -1, 9, 0, 0, 0, 0, -1, 0, 0 }, + { "'['", "_literal_001b", 0, 0, 1, 0, -1, 16, 0, 0, 0, 0, -1, 0, 0 }, + { "']'", "_literal_001d", 0, 0, 1, 0, -1, 17, 0, 0, 0, 0, -1, 0, 0 }, + { "'|'", "_literal_001f", 0, 0, 1, 0, -1, 18, 0, 0, 0, 0, -1, 0, 0 }, + { "'/'", "_literal_0021", 0, 0, 1, 0, -1, 19, 0, 0, 0, 0, -1, 0, 0 }, + { "':'", "_literal_0023", 0, 0, 1, 0, -1, 20, 0, 0, 0, 0, -1, 0, 0 }, + { "'.'", "_literal_0025", 0, 0, 1, 0, -1, 21, 0, 0, 0, 0, -1, 0, 0 }, + { "'('", "_literal_0027", 0, 0, 1, 0, -1, 22, 0, 0, 0, 0, -1, 0, 0 }, + { "')'", "_literal_0029", 0, 0, 1, 0, -1, 23, 0, 0, 0, 0, -1, 0, 0 }, + { "'..'", "_literal_002b", 0, 0, 1, 0, -1, 24, 0, 0, 0, 0, -1, 0, 0 }, + { "'^'", "_literal_002d", 0, 0, 1, 0, -1, 25, 0, 0, 0, 0, -1, 0, 0 }, + { "_ignore_0001", "_ignore_0001", 0, 0, 0, 1, -1, 3, 0, 0, 0, 0, -1, 0, 0 }, + { "_ignore_0003", "_ignore_0003", 0, 0, 0, 1, -1, 4, 0, 0, 0, 0, -1, 0, 0 }, + { "NI", "NI", 0, 0, 0, 0, -1, 10, 0, 0, 0, 0, -1, 0, 0 }, + { "COMMIT", "COMMIT", 0, 0, 0, 0, -1, 11, 0, 0, 0, 0, -1, 0, 0 }, + { "id", "id", 0, 0, 0, 0, -1, 12, 0, 0, 0, 0, -1, 0, 0 }, + { "literal", "literal", 0, 0, 0, 0, -1, 13, 0, 0, 0, 0, -1, 0, 0 }, + { "STAR", "STAR", 0, 0, 0, 0, -1, 14, 0, 0, 0, 0, -1, 0, 0 }, + { "PLUS", "PLUS", 0, 0, 0, 0, -1, 15, 0, 0, 0, 0, -1, 0, 0 }, + { "_ign_0x11bb1a0", "_ign_0x11bb1a0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_T_any", "_T_any", 0, 0, 0, 0, -1, 0, 0, 0, 133, 0, -1, 0, 0 }, + { "_T_lex_factor", "_T_lex_factor", 0, 0, 0, 0, -1, 26, 0, 0, 134, 0, -1, 0, 0 }, + { "_T_lex_factor_neg", "_T_lex_factor_neg", 0, 0, 0, 0, -1, 27, 0, 0, 135, 0, -1, 0, 0 }, + { "_T_lex_factor_rep", "_T_lex_factor_rep", 0, 0, 0, 0, -1, 28, 0, 0, 136, 0, -1, 0, 0 }, + { "_T_lex_term", "_T_lex_term", 0, 0, 0, 0, -1, 29, 0, 0, 137, 0, -1, 0, 0 }, + { "_T_lex_expr", "_T_lex_expr", 0, 0, 0, 0, -1, 30, 0, 0, 138, 0, -1, 0, 0 }, + { "_T_opt_ni", "_T_opt_ni", 0, 0, 0, 0, -1, 31, 0, 0, 139, 0, -1, 0, 0 }, + { "_T_opt_prod_repeat", "_T_opt_prod_repeat", 0, 0, 0, 0, -1, 32, 0, 0, 140, 0, -1, 0, 0 }, + { "_T_opt_prod_el_name", "_T_opt_prod_el_name", 0, 0, 0, 0, -1, 33, 0, 0, 141, 0, -1, 0, 0 }, + { "_T_prod_el", "_T_prod_el", 0, 0, 0, 0, -1, 34, 0, 0, 142, 0, -1, 0, 0 }, + { "_T_prod_el_list", "_T_prod_el_list", 0, 0, 0, 0, -1, 35, 0, 0, 143, 0, -1, 0, 0 }, + { "_T_opt_commit", "_T_opt_commit", 0, 0, 0, 0, -1, 36, 0, 0, 144, 0, -1, 0, 0 }, + { "_T_opt_prod_name", "_T_opt_prod_name", 0, 0, 0, 0, -1, 37, 0, 0, 145, 0, -1, 0, 0 }, + { "_T_prod", "_T_prod", 0, 0, 0, 0, -1, 38, 0, 0, 146, 0, -1, 0, 0 }, + { "_T_prod_list", "_T_prod_list", 0, 0, 0, 0, -1, 39, 0, 0, 147, 0, -1, 0, 0 }, + { "_T_ignore_def", "_T_ignore_def", 0, 0, 0, 0, -1, 40, 0, 0, 148, 0, -1, 0, 0 }, + { "_T_token_def", "_T_token_def", 0, 0, 0, 0, -1, 41, 0, 0, 149, 0, -1, 0, 0 }, + { "_T_token_list", "_T_token_list", 0, 0, 0, 0, -1, 42, 0, 0, 150, 0, -1, 0, 0 }, + { "_T_item", "_T_item", 0, 0, 0, 0, -1, 43, 0, 0, 151, 0, -1, 0, 0 }, + { "_T_start", "_T_start", 0, 0, 0, 0, -1, 44, 0, 0, 152, 0, -1, 0, 0 }, + { "_T___accum0", "_T___accum0", 0, 0, 0, 0, -1, 48, 0, 0, 153, 0, -1, 0, 0 }, + { "_T__repeat_item", "_T__repeat_item", 0, 0, 0, 0, -1, 0, 0, 0, 154, 0, -1, 0, 0 }, + { "_T___list0", "_T___list0", 0, 0, 0, 0, -1, 49, 0, 0, 155, 0, -1, 0, 0 }, + { "_eof_ptr", "_eof_ptr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_void", "_eof_void", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_bool", "_eof_bool", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_int", "_eof_int", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_str", "_eof_str", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_stream", "_eof_stream", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_il", "_eof_il", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_any", "_eof_any", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_0005", "_eof__literal_0005", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_0007", "_eof__literal_0007", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_0009", "_eof__literal_0009", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_000b", "_eof__literal_000b", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_000d", "_eof__literal_000d", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_001b", "_eof__literal_001b", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_001d", "_eof__literal_001d", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_001f", "_eof__literal_001f", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_0021", "_eof__literal_0021", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_0023", "_eof__literal_0023", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_0025", "_eof__literal_0025", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_0027", "_eof__literal_0027", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_0029", "_eof__literal_0029", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_002b", "_eof__literal_002b", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__literal_002d", "_eof__literal_002d", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__ignore_0001", "_eof__ignore_0001", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__ignore_0003", "_eof__ignore_0003", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_NI", "_eof_NI", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_COMMIT", "_eof_COMMIT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_id", "_eof_id", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_literal", "_eof_literal", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_STAR", "_eof_STAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_PLUS", "_eof_PLUS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_factor", "_eof_lex_factor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_factor_neg", "_eof_lex_factor_neg", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_factor_rep", "_eof_lex_factor_rep", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_term", "_eof_lex_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_expr", "_eof_lex_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_ni", "_eof_opt_ni", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_prod_repeat", "_eof_opt_prod_repeat", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_prod_el_name", "_eof_opt_prod_el_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_prod_el", "_eof_prod_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_prod_el_list", "_eof_prod_el_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_commit", "_eof_opt_commit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_prod_name", "_eof_opt_prod_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_prod", "_eof_prod", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_prod_list", "_eof_prod_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_ignore_def", "_eof_ignore_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_token_def", "_eof_token_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_token_list", "_eof_token_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_item", "_eof_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_start", "_eof_start", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__ign_0x11bb1a0", "_eof__ign_0x11bb1a0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof___accum0", "_eof___accum0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_item", "_eof__repeat_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof___list0", "_eof___list0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_any", "_eof__T_any", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lex_factor", "_eof__T_lex_factor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lex_factor_neg", "_eof__T_lex_factor_neg", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lex_factor_rep", "_eof__T_lex_factor_rep", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lex_term", "_eof__T_lex_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lex_expr", "_eof__T_lex_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_ni", "_eof__T_opt_ni", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_prod_repeat", "_eof__T_opt_prod_repeat", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_prod_el_name", "_eof__T_opt_prod_el_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_prod_el", "_eof__T_prod_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_prod_el_list", "_eof__T_prod_el_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_commit", "_eof__T_opt_commit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_prod_name", "_eof__T_opt_prod_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_prod", "_eof__T_prod", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_prod_list", "_eof__T_prod_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_ignore_def", "_eof__T_ignore_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_token_def", "_eof__T_token_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_token_list", "_eof__T_token_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_item", "_eof__T_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_start", "_eof__T_start", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T___accum0", "_eof__T___accum0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_item", "_eof__T__repeat_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T___list0", "_eof__T___list0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_notoken", "_notoken", 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "any", "any", 0, 0, 0, 0, -1, 0, 0, 0, 32, 0, -1, 0, 0 }, + { "lex_factor", "lex_factor", 0, 0, 0, 0, -1, 26, 0, 0, 33, 0, -1, 0, 0 }, + { "lex_factor_neg", "lex_factor_neg", 0, 0, 0, 0, -1, 27, 0, 0, 34, 0, -1, 0, 0 }, + { "lex_factor_rep", "lex_factor_rep", 0, 0, 0, 0, -1, 28, 0, 0, 35, 0, -1, 0, 0 }, + { "lex_term", "lex_term", 0, 0, 0, 0, -1, 29, 0, 0, 36, 0, -1, 0, 0 }, + { "lex_expr", "lex_expr", 0, 0, 0, 0, -1, 30, 0, 0, 37, 0, -1, 0, 0 }, + { "opt_ni", "opt_ni", 0, 0, 0, 0, -1, 31, 0, 0, 38, 0, -1, 0, 0 }, + { "opt_prod_repeat", "opt_prod_repeat", 0, 0, 0, 0, -1, 32, 0, 0, 39, 0, -1, 0, 0 }, + { "opt_prod_el_name", "opt_prod_el_name", 0, 0, 0, 0, -1, 33, 0, 0, 40, 0, -1, 0, 0 }, + { "prod_el", "prod_el", 0, 0, 0, 0, -1, 34, 0, 0, 41, 0, -1, 0, 0 }, + { "prod_el_list", "prod_el_list", 0, 0, 0, 0, -1, 35, 0, 0, 42, 0, -1, 0, 0 }, + { "opt_commit", "opt_commit", 0, 0, 0, 0, -1, 36, 0, 0, 43, 0, -1, 0, 0 }, + { "opt_prod_name", "opt_prod_name", 0, 0, 0, 0, -1, 37, 0, 0, 44, 0, -1, 0, 0 }, + { "prod", "prod", 0, 0, 0, 0, -1, 38, 0, 0, 45, 0, -1, 0, 0 }, + { "prod_list", "prod_list", 0, 0, 0, 0, -1, 39, 0, 0, 46, 0, -1, 0, 0 }, + { "ignore_def", "ignore_def", 0, 0, 0, 0, -1, 40, 0, 0, 47, 0, -1, 0, 0 }, + { "token_def", "token_def", 0, 0, 0, 0, -1, 41, 0, 0, 48, 0, -1, 0, 0 }, + { "token_list", "token_list", 0, 0, 0, 0, -1, 42, 0, 0, 49, 0, -1, 0, 0 }, + { "item", "item", 0, 0, 0, 0, -1, 43, 0, 0, 50, 0, -1, 0, 0 }, + { "start", "start", 0, 0, 0, 0, -1, 44, 0, 0, 51, 0, -1, 0, 0 }, + { "__accum0", "__accum0", 0, 0, 0, 0, -1, 48, 0, 0, 52, 1, -1, 0, 0 }, + { "_repeat_item", "_repeat_item", 1, 0, 0, 0, -1, 0, 0, 0, 53, 0, -1, 0, 0 }, + { "__list0", "__list0", 0, 0, 0, 0, -1, 49, 0, 0, 54, 2, -1, 0, 0 }, + { "_root", "_root", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 } +}; + +static FrameInfo parser_frameInfo[] = { + { 0, 0, 0, 0, locals_0, 1, 0, 1 } +}; + +static ProdInfo parser_prodInfo[] = { + { 134, 0, 1, "lex_factor-1", -1, 1, copy_0, 1, }, + { 134, 3, 1, "lex_factor-4", -1, 1, copy_1, 1, }, + { 134, 1, 3, "lex_factor-2", -1, 1, copy_2, 1, }, + { 134, 2, 3, "lex_factor-3", -1, 1, copy_3, 2, }, + { 135, 0, 2, "lex_factor_neg-1", -1, 1, copy_4, 1, }, + { 135, 1, 1, "lex_factor_neg-2", -1, 1, copy_5, 1, }, + { 136, 0, 2, "lex_factor_rep-1", -1, 1, copy_6, 2, }, + { 136, 1, 2, "lex_factor_rep-2", -1, 1, copy_7, 2, }, + { 136, 2, 1, "lex_factor_rep-3", -1, 1, copy_8, 1, }, + { 137, 0, 3, "lex_term-1", -1, 1, copy_9, 2, }, + { 137, 1, 1, "lex_term-2", -1, 1, copy_10, 1, }, + { 138, 0, 3, "lex_expr-1", -1, 1, copy_11, 2, }, + { 138, 1, 1, "lex_expr-2", -1, 1, copy_12, 1, }, + { 139, 0, 1, "opt_ni-1", -1, 1, copy_13, 1, }, + { 139, 1, 0, "opt_ni-2", -1, 1, 0, 0, }, + { 140, 0, 1, "opt_prod_repeat-1", -1, 1, copy_15, 1, }, + { 140, 1, 0, "opt_prod_repeat-2", -1, 1, 0, 0, }, + { 141, 0, 2, "opt_prod_el_name-1", -1, 1, copy_17, 1, }, + { 141, 1, 0, "opt_prod_el_name-2", -1, 1, 0, 0, }, + { 142, 0, 3, "prod_el-1", -1, 1, copy_19, 3, }, + { 143, 0, 2, "prod_el_list-1", -1, 1, copy_20, 2, }, + { 143, 1, 0, "prod_el_list-2", -1, 1, 0, 0, }, + { 144, 0, 1, "opt_commit-1", -1, 1, copy_22, 1, }, + { 144, 1, 0, "opt_commit-2", -1, 1, 0, 0, }, + { 145, 0, 2, "opt_prod_name-1", -1, 1, copy_24, 1, }, + { 145, 1, 0, "opt_prod_name-2", -1, 1, 0, 0, }, + { 146, 0, 5, "prod-1", -1, 1, copy_26, 3, }, + { 147, 0, 3, "prod_list-1", -1, 1, copy_27, 2, }, + { 147, 1, 1, "prod_list-2", -1, 1, copy_28, 1, }, + { 148, 0, 4, "ignore_def-1", -1, 1, copy_29, 1, }, + { 149, 0, 7, "token_def-1", -1, 1, copy_30, 4, }, + { 150, 0, 2, "token_list-1", -1, 1, copy_31, 2, }, + { 150, 1, 2, "token_list-2", -1, 1, copy_32, 2, }, + { 150, 2, 0, "token_list-3", -1, 1, 0, 0, }, + { 151, 0, 3, "item-1", -1, 1, copy_34, 1, }, + { 151, 1, 3, "item-2", -1, 1, copy_35, 2, }, + { 152, 0, 1, "start-1", -1, 1, copy_36, 1, }, + { 153, 0, 0, "__accum0-1", -1, 1, 0, 0, }, + { 154, 0, 2, "_repeat_item-1", -1, 1, 0, 0, }, + { 154, 1, 0, "_repeat_item-2", -1, 1, 0, 0, }, + { 155, 0, 0, "__list0-1", -1, 1, 0, 0, }, + { 156, 0, 1, "_root-1", -1, 1, 0, 0, }, + { 156, 1, 1, "_root-2", -1, 1, 0, 0, }, + { 156, 2, 1, "_root-3", -1, 1, 0, 0, }, + { 156, 3, 1, "_root-4", -1, 1, 0, 0, }, + { 156, 4, 1, "_root-5", -1, 1, 0, 0, }, + { 156, 5, 1, "_root-6", -1, 1, 0, 0, }, + { 156, 6, 1, "_root-7", -1, 1, 0, 0, }, + { 156, 7, 1, "_root-8", -1, 1, 0, 0, }, + { 156, 8, 1, "_root-9", -1, 1, 0, 0, }, + { 156, 9, 1, "_root-10", -1, 1, 0, 0, }, + { 156, 10, 1, "_root-11", -1, 1, 0, 0, }, + { 156, 11, 1, "_root-12", -1, 1, 0, 0, }, + { 156, 12, 1, "_root-13", -1, 1, 0, 0, }, + { 156, 13, 1, "_root-14", -1, 1, 0, 0, }, + { 156, 14, 1, "_root-15", -1, 1, 0, 0, }, + { 156, 15, 1, "_root-16", -1, 1, 0, 0, }, + { 156, 16, 1, "_root-17", -1, 1, 0, 0, }, + { 156, 17, 1, "_root-18", -1, 1, 0, 0, }, + { 156, 18, 1, "_root-19", -1, 1, 0, 0, }, + { 156, 19, 1, "_root-20", -1, 1, 0, 0, }, + { 156, 20, 1, "_root-21", -1, 1, 0, 0, }, + { 156, 21, 1, "_root-22", -1, 1, 0, 0, }, + { 156, 22, 1, "_root-23", -1, 1, 0, 0, }, + { 156, 23, 1, "_root-24", -1, 1, 0, 0, }, + { 156, 24, 1, "_root-25", -1, 1, 0, 0, }, + { 156, 25, 1, "_root-26", -1, 1, 0, 0, }, + { 156, 26, 1, "_root-27", -1, 1, 0, 0, }, + { 156, 27, 1, "_root-28", -1, 1, 0, 0, }, + { 156, 28, 1, "_root-29", -1, 1, 0, 0, }, + { 156, 29, 1, "_root-30", -1, 1, 0, 0, }, + { 156, 30, 1, "_root-31", -1, 1, 0, 0, }, + { 156, 31, 1, "_root-32", -1, 1, 0, 0, }, + { 156, 32, 1, "_root-33", -1, 1, 0, 0, }, + { 156, 33, 1, "_root-34", -1, 1, 0, 0, }, + { 156, 34, 1, "_root-35", -1, 1, 0, 0, }, + { 156, 35, 1, "_root-36", -1, 1, 0, 0, }, + { 156, 36, 1, "_root-37", -1, 1, 0, 0, }, + { 156, 37, 1, "_root-38", -1, 1, 0, 0, }, + { 156, 38, 1, "_root-39", -1, 1, 0, 0, }, + { 156, 39, 1, "_root-40", -1, 1, 0, 0, }, + { 156, 40, 1, "_root-41", -1, 1, 0, 0, }, + { 156, 41, 1, "_root-42", -1, 1, 0, 0, }, + { 156, 42, 1, "_root-43", -1, 1, 0, 0, }, + { 156, 43, 1, "_root-44", -1, 1, 0, 0, }, + { 156, 44, 1, "_root-45", -1, 1, 0, 0, }, + { 156, 45, 1, "_root-46", -1, 1, 0, 0, }, + { 156, 46, 1, "_root-47", -1, 1, 0, 0, }, + { 156, 47, 1, "_root-48", -1, 1, 0, 0, }, + { 156, 48, 1, "_root-49", -1, 1, 0, 0, }, + { 156, 49, 1, "_root-50", -1, 1, 0, 0, }, + { 156, 50, 1, "_root-51", -1, 1, 0, 0, }, + { 156, 51, 1, "_root-52", -1, 1, 0, 0, }, + { 156, 52, 1, "_root-53", -1, 1, 0, 0, }, + { 156, 53, 1, "_root-54", -1, 1, 0, 0, }, + { 156, 54, 1, "_root-55", -1, 1, 0, 0, }, + { 156, 55, 1, "_root-56", -1, 1, 0, 0, }, + { 156, 56, 1, "_root-57", -1, 1, 0, 0, }, + { 156, 57, 1, "_root-58", -1, 1, 0, 0, }, + { 156, 58, 1, "_root-59", -1, 1, 0, 0, }, + { 156, 59, 1, "_root-60", -1, 1, 0, 0, }, + { 156, 60, 1, "_root-61", -1, 1, 0, 0, }, + { 156, 61, 1, "_root-62", -1, 1, 0, 0, }, + { 156, 62, 1, "_root-63", -1, 1, 0, 0, }, + { 156, 63, 1, "_root-64", -1, 1, 0, 0, }, + { 156, 64, 1, "_root-65", -1, 1, 0, 0, }, + { 156, 65, 1, "_root-66", -1, 1, 0, 0, }, + { 156, 66, 1, "_root-67", -1, 1, 0, 0, }, + { 156, 67, 1, "_root-68", -1, 1, 0, 0, }, + { 156, 68, 1, "_root-69", -1, 1, 0, 0, }, + { 156, 69, 1, "_root-70", -1, 1, 0, 0, }, + { 156, 70, 1, "_root-71", -1, 1, 0, 0, }, + { 156, 71, 1, "_root-72", -1, 1, 0, 0, }, + { 156, 72, 1, "_root-73", -1, 1, 0, 0, }, + { 156, 73, 1, "_root-74", -1, 1, 0, 0, }, + { 156, 74, 1, "_root-75", -1, 1, 0, 0, }, + { 156, 75, 1, "_root-76", -1, 1, 0, 0, }, + { 156, 76, 1, "_root-77", -1, 1, 0, 0, }, + { 156, 77, 1, "_root-78", -1, 1, 0, 0, }, + { 156, 78, 1, "_root-79", -1, 1, 0, 0, }, + { 156, 79, 1, "_root-80", -1, 1, 0, 0, }, + { 156, 80, 1, "_root-81", -1, 1, 0, 0, }, + { 156, 81, 1, "_root-82", -1, 1, 0, 0, }, + { 156, 82, 1, "_root-83", -1, 1, 0, 0, }, + { 156, 83, 1, "_root-84", -1, 1, 0, 0, }, + { 156, 84, 1, "_root-85", -1, 1, 0, 0, }, + { 156, 85, 1, "_root-86", -1, 1, 0, 0, }, + { 156, 86, 1, "_root-87", -1, 1, 0, 0, }, + { 156, 87, 1, "_root-88", -1, 1, 0, 0, }, + { 156, 88, 1, "_root-89", -1, 1, 0, 0, }, + { 156, 89, 1, "_root-90", -1, 1, 0, 0, }, + { 156, 90, 1, "_root-91", -1, 1, 0, 0, }, + { 156, 91, 1, "_root-92", -1, 1, 0, 0, }, + { 156, 92, 1, "_root-93", -1, 1, 0, 0, }, + { 156, 93, 1, "_root-94", -1, 1, 0, 0, }, + { 156, 94, 1, "_root-95", -1, 1, 0, 0, }, + { 156, 95, 1, "_root-96", -1, 1, 0, 0, }, + { 156, 96, 1, "_root-97", -1, 1, 0, 0, }, + { 156, 97, 1, "_root-98", -1, 1, 0, 0, }, + { 156, 98, 1, "_root-99", -1, 1, 0, 0, }, + { 156, 99, 1, "_root-100", -1, 1, 0, 0, }, + { 156, 100, 1, "_root-101", -1, 1, 0, 0, }, + { 156, 101, 1, "_root-102", -1, 1, 0, 0, }, + { 156, 102, 1, "_root-103", -1, 1, 0, 0, }, + { 156, 103, 1, "_root-104", -1, 1, 0, 0, }, + { 156, 104, 1, "_root-105", -1, 1, 0, 0, }, + { 156, 105, 1, "_root-106", -1, 1, 0, 0, }, + { 156, 106, 1, "_root-107", -1, 1, 0, 0, }, + { 156, 107, 1, "_root-108", -1, 1, 0, 0, }, + { 156, 108, 1, "_root-109", -1, 1, 0, 0, }, + { 156, 109, 1, "_root-110", -1, 1, 0, 0, }, + { 156, 110, 1, "_root-111", -1, 1, 0, 0, }, + { 156, 111, 1, "_root-112", -1, 1, 0, 0, }, + { 156, 112, 1, "_root-113", -1, 1, 0, 0, }, + { 156, 113, 1, "_root-114", -1, 1, 0, 0, }, + { 156, 114, 1, "_root-115", -1, 1, 0, 0, }, + { 156, 115, 1, "_root-116", -1, 1, 0, 0, }, + { 156, 116, 1, "_root-117", -1, 1, 0, 0, }, + { 156, 117, 1, "_root-118", -1, 1, 0, 0, }, + { 156, 118, 1, "_root-119", -1, 1, 0, 0, }, + { 156, 119, 1, "_root-120", -1, 1, 0, 0, }, + { 156, 120, 1, "_root-121", -1, 1, 0, 0, }, + { 156, 121, 1, "_root-122", -1, 1, 0, 0, }, + { 156, 122, 1, "_root-123", -1, 1, 0, 0, }, + { 156, 123, 1, "_root-124", -1, 1, 0, 0, }, + { 156, 124, 1, "_root-125", -1, 1, 0, 0, }, + { 156, 125, 1, "_root-126", -1, 1, 0, 0, }, + { 156, 126, 1, "_root-127", -1, 1, 0, 0, }, + { 156, 127, 1, "_root-128", -1, 1, 0, 0, }, + { 156, 128, 1, "_root-129", -1, 1, 0, 0, }, + { 156, 129, 1, "_root-130", -1, 1, 0, 0, }, + { 156, 130, 1, "_root-131", -1, 1, 0, 0, }, + { 156, 131, 1, "_root-132", -1, 1, 0, 0, }, + { 156, 132, 1, "_root-133", -1, 1, 0, 0, }, + { 156, 133, 1, "_root-134", -1, 1, 0, 0, }, + { 156, 134, 1, "_root-135", -1, 1, 0, 0, }, + { 156, 135, 1, "_root-136", -1, 1, 0, 0, }, + { 156, 136, 1, "_root-137", -1, 1, 0, 0, }, + { 156, 137, 1, "_root-138", -1, 1, 0, 0, }, + { 156, 138, 1, "_root-139", -1, 1, 0, 0, }, + { 156, 139, 1, "_root-140", -1, 1, 0, 0, }, + { 156, 140, 1, "_root-141", -1, 1, 0, 0, }, + { 156, 141, 1, "_root-142", -1, 1, 0, 0, }, + { 156, 142, 1, "_root-143", -1, 1, 0, 0, }, + { 156, 143, 1, "_root-144", -1, 1, 0, 0, }, + { 156, 144, 1, "_root-145", -1, 1, 0, 0, }, + { 156, 145, 1, "_root-146", -1, 1, 0, 0, }, + { 156, 146, 1, "_root-147", -1, 1, 0, 0, }, + { 156, 147, 1, "_root-148", -1, 1, 0, 0, }, + { 156, 148, 1, "_root-149", -1, 1, 0, 0, }, + { 156, 149, 1, "_root-150", -1, 1, 0, 0, }, + { 156, 150, 1, "_root-151", -1, 1, 0, 0, }, + { 156, 151, 1, "_root-152", -1, 1, 0, 0, }, + { 156, 152, 1, "_root-153", -1, 1, 0, 0, }, + { 156, 153, 1, "_root-154", -1, 1, 0, 0, }, + { 156, 154, 1, "_root-155", -1, 1, 0, 0, }, + { 156, 155, 1, "_root-156", -1, 1, 0, 0, } +}; + +static PatConsInfo parser_patReplInfo[] = { + { 0, 0 }, +}; + +static PatConsNode parser_patReplNodes[] = { + { 153, 0, -1, -1, 0, 0, 0, -1, -1, 0 }, +}; + +static FunctionInfo parser_functionInfo[] = { + +}; + +static RegionInfo parser_regionInfo[] = { + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 31 } +}; + +static GenericInfo parser_genericInfo[] = { + { 0, 0, 0, 0, 0, 0 }, + { 19, 2, 0, 0, 153, 0 }, + { 16, 2, 0, 0, 155, -1 }, +}; + +static const char *parser_litdata[] = { + "r", +}; + +static long parser_litlen[] = { + 1, }; + +static Head *parser_literals[] = { + 0, }; + +static int startStates[] = { + 0, 1, }; + +static int eofLelIds[] = { + 104, 106, }; + +static int parserLelIds[] = { + 152, 153, }; + +static CaptureAttr captureAttr[] = { +}; + +RuntimeData colm_object = +{ + parser_lelInfo, + 157, + + parser_prodInfo, + 197, + + parser_regionInfo, + 5, + + parser_rootCode, + 69, + 0, + + parser_frameInfo, + 1, + + parser_functionInfo, + 0, + + parser_patReplInfo, + 1, + + parser_patReplNodes, + 1, + + parser_genericInfo, + 3, + 2, + + parser_litdata, + parser_litlen, + parser_literals, + 1, + + captureAttr, + 0, + + &fsmTables_start, + &pid_0_pdaTables, + startStates, eofLelIds, parserLelIds, 2, + + 2, + + 133, + 4, + 5, + 133, + 0, + 132, + &fsmExecute, + &sendNamedLangEl, + &initBindings, + &popBinding, +}; + diff --git a/src/parse2.c b/src/parse2.c new file mode 100644 index 0000000..222ec18 --- /dev/null +++ b/src/parse2.c @@ -0,0 +1,30258 @@ +#include <colm/pdarun.h> +#include <colm/debug.h> +#include <colm/bytecode.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <assert.h> +#include <colm/config.h> +#include <colm/defs.h> +#include <colm/input.h> +#include <colm/tree.h> +#include <colm/program.h> +#include <colm/colm.h> + + +extern RuntimeData colm_program_text; + +#define parser_start 29 +#define parser_first_final 29 +#define parser_error 0 +#define false 0 +#define true 1 + +static long parser_entryByRegion[] = { + 0, 29, 212, 394, 394, 396, 398, 400, + 400, 401, 403, 405, 405, 406, 408, 410, + 410, 411, 423, 434, 434, 436, 437, 438, + 438 +}; + +static FsmTables fsmTables_start = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + parser_entryByRegion, + + 0, 0, 0, 0, 0, 0, 0, 0, + 24, + + parser_start, + parser_first_final, + parser_error, + + 0, + 0 +}; + +static void fsmExecute( FsmRun *fsmRun, StreamImpl *inputStream ) +{ + fsmRun->start = fsmRun->p; +/*_resume:*/ + if ( fsmRun->cs == 0 ) + goto out; + if ( fsmRun->p == fsmRun->pe ) + goto out_switch; + --fsmRun->p; + + switch ( fsmRun->cs ) + { +tr1: + { fsmRun->p += 1; + fsmRun->matchedToken = 101; + goto out; +} + goto st29; +tr2: + { fsmRun->p += 1; + fsmRun->matchedToken = 98; + goto out; +} + goto st29; +tr5: + { fsmRun->p += 1; + fsmRun->matchedToken = 66; + goto out; +} + goto st29; +tr45: + { fsmRun->p += 1; + fsmRun->matchedToken = 67; + goto out; +} + goto st29; +tr46: + { fsmRun->p += 1; + fsmRun->matchedToken = 93; + goto out; +} + goto st29; +tr47: + { fsmRun->p += 1; + fsmRun->matchedToken = 95; + goto out; +} + goto st29; +tr49: + { fsmRun->p += 1; + fsmRun->matchedToken = 68; + goto out; +} + goto st29; +tr50: + { fsmRun->p += 1; + fsmRun->matchedToken = 78; + goto out; +} + goto st29; +tr51: + { fsmRun->p += 1; + fsmRun->matchedToken = 79; + goto out; +} + goto st29; +tr52: + { fsmRun->p += 1; + fsmRun->matchedToken = 82; + goto out; +} + goto st29; +tr53: + { fsmRun->p += 1; + fsmRun->matchedToken = 96; + goto out; +} + goto st29; +tr54: + { fsmRun->p += 1; + fsmRun->matchedToken = 87; + goto out; +} + goto st29; +tr56: + { fsmRun->p += 1; + fsmRun->matchedToken = 76; + goto out; +} + goto st29; +tr57: + { fsmRun->p += 1; + fsmRun->matchedToken = 73; + goto out; +} + goto st29; +tr63: + { fsmRun->p += 1; + fsmRun->matchedToken = 83; + goto out; +} + goto st29; +tr65: + { fsmRun->p += 1; + fsmRun->matchedToken = 70; + goto out; +} + goto st29; +tr66: + { fsmRun->p += 1; + fsmRun->matchedToken = 71; + goto out; +} + goto st29; +tr67: + { fsmRun->p += 1; + fsmRun->matchedToken = 94; + goto out; +} + goto st29; +tr87: + { fsmRun->p += 1; + fsmRun->matchedToken = 80; + goto out; +} + goto st29; +tr89: + { fsmRun->p += 1; + fsmRun->matchedToken = 81; + goto out; +} + goto st29; +tr90: + { fsmRun->p += 1; + fsmRun->matchedToken = 69; + goto out; +} + goto st29; +tr91: + { fsmRun->matchedToken = 100; + goto out; +} + goto st29; +tr92: + { fsmRun->matchedToken = 92; + goto out; +} + goto st29; +tr93: + { fsmRun->p += 1; + fsmRun->matchedToken = 86; + goto out; +} + goto st29; +tr94: + { fsmRun->matchedToken = 97; + goto out; +} + goto st29; +tr95: + { fsmRun->p += 1; + fsmRun->matchedToken = 77; + goto out; +} + goto st29; +tr96: + { fsmRun->matchedToken = 65; + goto out; +} + goto st29; +tr97: + { fsmRun->matchedToken = 74; + goto out; +} + goto st29; +tr98: + { fsmRun->p += 1; + fsmRun->matchedToken = 75; + goto out; +} + goto st29; +tr99: + { fsmRun->matchedToken = 88; + goto out; +} + goto st29; +tr100: + { fsmRun->p += 1; + fsmRun->matchedToken = 90; + goto out; +} + goto st29; +tr101: + { fsmRun->matchedToken = 84; + goto out; +} + goto st29; +tr102: + { fsmRun->p += 1; + fsmRun->matchedToken = 85; + goto out; +} + goto st29; +tr103: + { fsmRun->matchedToken = 89; + goto out; +} + goto st29; +tr104: + { fsmRun->p += 1; + fsmRun->matchedToken = 91; + goto out; +} + goto st29; +tr105: + { fsmRun->toklen = fsmRun->tokend; + switch( fsmRun->act ) { + case 1: + fsmRun->matchedToken = 8; + break; + case 3: + fsmRun->matchedToken = 9; + break; + case 5: + fsmRun->matchedToken = 10; + break; + case 7: + fsmRun->matchedToken = 11; + break; + case 9: + fsmRun->matchedToken = 12; + break; + case 11: + fsmRun->matchedToken = 13; + break; + case 15: + fsmRun->matchedToken = 15; + break; + case 19: + fsmRun->matchedToken = 17; + break; + case 23: + fsmRun->matchedToken = 19; + break; + case 25: + fsmRun->matchedToken = 20; + break; + case 27: + fsmRun->matchedToken = 21; + break; + case 29: + fsmRun->matchedToken = 22; + break; + case 31: + fsmRun->matchedToken = 23; + break; + case 33: + fsmRun->matchedToken = 24; + break; + case 35: + fsmRun->matchedToken = 25; + break; + case 37: + fsmRun->matchedToken = 26; + break; + case 39: + fsmRun->matchedToken = 27; + break; + case 41: + fsmRun->matchedToken = 28; + break; + case 43: + fsmRun->matchedToken = 29; + break; + case 45: + fsmRun->matchedToken = 30; + break; + case 49: + fsmRun->matchedToken = 32; + break; + case 51: + fsmRun->matchedToken = 33; + break; + case 53: + fsmRun->matchedToken = 34; + break; + case 55: + fsmRun->matchedToken = 35; + break; + case 57: + fsmRun->matchedToken = 36; + break; + case 59: + fsmRun->matchedToken = 37; + break; + case 61: + fsmRun->matchedToken = 38; + break; + case 63: + fsmRun->matchedToken = 39; + break; + case 65: + fsmRun->matchedToken = 40; + break; + case 67: + fsmRun->matchedToken = 41; + break; + case 69: + fsmRun->matchedToken = 42; + break; + case 71: + fsmRun->matchedToken = 43; + break; + case 73: + fsmRun->matchedToken = 44; + break; + case 75: + fsmRun->matchedToken = 45; + break; + case 77: + fsmRun->matchedToken = 46; + break; + case 79: + fsmRun->matchedToken = 47; + break; + case 81: + fsmRun->matchedToken = 48; + break; + case 83: + fsmRun->matchedToken = 49; + break; + case 85: + fsmRun->matchedToken = 50; + break; + case 87: + fsmRun->matchedToken = 51; + break; + case 89: + fsmRun->matchedToken = 52; + break; + case 91: + fsmRun->matchedToken = 53; + break; + case 93: + fsmRun->matchedToken = 54; + break; + case 95: + fsmRun->matchedToken = 55; + break; + case 99: + fsmRun->matchedToken = 57; + break; + case 101: + fsmRun->matchedToken = 58; + break; + case 103: + fsmRun->matchedToken = 59; + break; + case 105: + fsmRun->matchedToken = 60; + break; + case 107: + fsmRun->matchedToken = 61; + break; + case 109: + fsmRun->matchedToken = 62; + break; + case 111: + fsmRun->matchedToken = 63; + break; + case 113: + fsmRun->matchedToken = 64; + break; + } + goto skip_toklen; +} + goto st29; +tr106: + { fsmRun->matchedToken = 66; + goto out; +} + goto st29; +tr107: + { fsmRun->matchedToken = 64; + goto out; +} + goto st29; +tr131: + { fsmRun->matchedToken = 20; + goto out; +} + goto st29; +tr175: + { fsmRun->matchedToken = 31; + goto out; +} + goto st29; +tr223: + { fsmRun->matchedToken = 56; + goto out; +} + goto st29; +tr237: + { fsmRun->matchedToken = 18; + goto out; +} + goto st29; +tr250: + { fsmRun->matchedToken = 14; + goto out; +} + goto st29; +tr256: + { fsmRun->matchedToken = 16; + goto out; +} + goto st29; +tr318: + { fsmRun->matchedToken = 72; + goto out; +} + goto st29; +tr319: + { fsmRun->p += 1; + fsmRun->matchedToken = 99; + goto out; +} + goto st29; +st29: +case 29: + if ( ++fsmRun->p == fsmRun->pe ) + goto out29; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 32: goto st30; + case 33: goto st31; + case 34: goto tr45; + case 35: goto st1; + case 36: goto tr46; + case 37: goto tr47; + case 38: goto st2; + case 39: goto tr49; + case 40: goto tr50; + case 41: goto tr51; + case 42: goto tr52; + case 43: goto tr53; + case 44: goto tr54; + case 45: goto st32; + case 46: goto tr56; + case 47: goto tr57; + case 58: goto st34; + case 60: goto st35; + case 61: goto st36; + case 62: goto st37; + case 63: goto tr63; + case 91: goto tr65; + case 93: goto tr66; + case 94: goto tr67; + case 96: goto st3; + case 97: goto st40; + case 98: goto st47; + case 99: goto st51; + case 100: goto st67; + case 101: goto st69; + case 102: goto st79; + case 103: goto st84; + case 105: goto st89; + case 108: goto st101; + case 109: goto st110; + case 110: goto st123; + case 112: goto st139; + case 114: goto st162; + case 115: goto st185; + case 116: goto st188; + case 118: goto st198; + case 119: goto st203; + case 121: goto st207; + case 123: goto tr87; + case 124: goto st211; + case 125: goto tr89; + case 126: goto tr90; + } + if ( (*fsmRun->p) < 48 ) { + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 ) + goto st30; + } else if ( (*fsmRun->p) > 57 ) { + if ( (*fsmRun->p) > 90 ) { + if ( 95 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else if ( (*fsmRun->p) >= 65 ) + goto tr64; + } else + goto st33; + goto st0; +st30: +case 30: + if ( ++fsmRun->p == fsmRun->pe ) + goto out30; + if ( (*fsmRun->p) == 32 ) + goto st30; + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 ) + goto st30; + goto tr91; +st31: +case 31: + if ( ++fsmRun->p == fsmRun->pe ) + goto out31; + if ( (*fsmRun->p) == 61 ) + goto tr93; + goto tr92; +st1: +case 1: + if ( ++fsmRun->p == fsmRun->pe ) + goto out1; + if ( (*fsmRun->p) == 10 ) + goto tr1; + goto st1; +st2: +case 2: + if ( ++fsmRun->p == fsmRun->pe ) + goto out2; + if ( (*fsmRun->p) == 38 ) + goto tr2; + goto st0; +st0: + goto out0; +st32: +case 32: + if ( ++fsmRun->p == fsmRun->pe ) + goto out32; + if ( (*fsmRun->p) == 62 ) + goto tr95; + goto tr94; +st34: +case 34: + if ( ++fsmRun->p == fsmRun->pe ) + goto out34; + if ( (*fsmRun->p) == 58 ) + goto tr98; + goto tr97; +st35: +case 35: + if ( ++fsmRun->p == fsmRun->pe ) + goto out35; + if ( (*fsmRun->p) == 61 ) + goto tr100; + goto tr99; +st36: +case 36: + if ( ++fsmRun->p == fsmRun->pe ) + goto out36; + if ( (*fsmRun->p) == 61 ) + goto tr102; + goto tr101; +st37: +case 37: + if ( ++fsmRun->p == fsmRun->pe ) + goto out37; + if ( (*fsmRun->p) == 61 ) + goto tr104; + goto tr103; +st3: +case 3: + if ( ++fsmRun->p == fsmRun->pe ) + goto out3; + switch( (*fsmRun->p) ) { + case 32: goto st0; + case 93: goto tr5; + } + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 ) + goto st0; + goto st39; +st39: +case 39: + if ( ++fsmRun->p == fsmRun->pe ) + goto out39; + switch( (*fsmRun->p) ) { + case 32: goto tr106; + case 93: goto tr106; + } + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 ) + goto tr106; + goto st39; +st40: +case 40: + if ( ++fsmRun->p == fsmRun->pe ) + goto out40; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 99: goto st41; + case 108: goto st44; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +tr64: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 113;} + goto st38; +tr112: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 49;} + goto st38; +tr115: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 73;} + goto st38; +tr119: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 67;} + goto st38; +tr123: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 85;} + goto st38; +tr128: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 75;} + goto st38; +tr136: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 25;} + goto st38; +tr139: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 95;} + goto st38; +tr141: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 1;} + goto st38; +tr147: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 45;} + goto st38; +tr149: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 43;} + goto st38; +tr150: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 5;} + goto st38; +tr151: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 83;} + goto st38; +tr155: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 63;} + goto st38; +tr160: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 103;} + goto st38; +tr161: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 35;} + goto st38; +tr166: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 81;} + goto st38; +tr167: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 37;} + goto st38; +tr174: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 11;} + goto st38; +tr180: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 111;} + goto st38; +tr182: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 59;} + goto st38; +tr186: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 3;} + goto st38; +tr187: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 105;} + goto st38; +tr190: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 51;} + goto st38; +tr194: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 93;} + goto st38; +tr197: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 55;} + goto st38; +tr206: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 87;} + goto st38; +tr208: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 89;} + goto st38; +tr210: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 27;} + goto st38; +tr221: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 33;} + goto st38; +tr222: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 77;} + goto st38; +tr224: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 99;} + goto st38; +tr230: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 109;} + goto st38; +tr242: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 23;} + goto st38; +tr247: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 79;} + goto st38; +tr252: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 15;} + goto st38; +tr259: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 19;} + goto st38; +tr260: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 57;} + goto st38; +tr263: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 9;} + goto st38; +tr265: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 61;} + goto st38; +tr276: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 71;} + goto st38; +tr279: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 69;} + goto st38; +tr283: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 29;} + goto st38; +tr286: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 65;} + goto st38; +tr289: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 107;} + goto st38; +tr292: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 31;} + goto st38; +tr298: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 7;} + goto st38; +tr300: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 101;} + goto st38; +tr304: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 91;} + goto st38; +tr309: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 53;} + goto st38; +tr313: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 41;} + goto st38; +tr317: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 39;} + goto st38; +st38: +case 38: + if ( ++fsmRun->p == fsmRun->pe ) + goto out38; + if ( (*fsmRun->p) == 95 ) + goto tr64; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr105; +st41: +case 41: + if ( ++fsmRun->p == fsmRun->pe ) + goto out41; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 99: goto st42; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st42: +case 42: + if ( ++fsmRun->p == fsmRun->pe ) + goto out42; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 117: goto st43; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st43: +case 43: + if ( ++fsmRun->p == fsmRun->pe ) + goto out43; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 109: goto tr112; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st44: +case 44: + if ( ++fsmRun->p == fsmRun->pe ) + goto out44; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 105: goto st45; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st45: +case 45: + if ( ++fsmRun->p == fsmRun->pe ) + goto out45; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 97: goto st46; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st46: +case 46: + if ( ++fsmRun->p == fsmRun->pe ) + goto out46; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 115: goto tr115; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st47: +case 47: + if ( ++fsmRun->p == fsmRun->pe ) + goto out47; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto st48; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st48: +case 48: + if ( ++fsmRun->p == fsmRun->pe ) + goto out48; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st49; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st49: +case 49: + if ( ++fsmRun->p == fsmRun->pe ) + goto out49; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 97: goto st50; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st50: +case 50: + if ( ++fsmRun->p == fsmRun->pe ) + goto out50; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 107: goto tr119; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st51: +case 51: + if ( ++fsmRun->p == fsmRun->pe ) + goto out51; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 97: goto st52; + case 111: goto st54; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st52: +case 52: + if ( ++fsmRun->p == fsmRun->pe ) + goto out52; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 115: goto st53; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st53: +case 53: + if ( ++fsmRun->p == fsmRun->pe ) + goto out53; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto tr123; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st54: +case 54: + if ( ++fsmRun->p == fsmRun->pe ) + goto out54; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 109: goto st55; + case 110: goto st58; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st55: +case 55: + if ( ++fsmRun->p == fsmRun->pe ) + goto out55; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 109: goto st56; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st56: +case 56: + if ( ++fsmRun->p == fsmRun->pe ) + goto out56; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 105: goto st57; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st57: +case 57: + if ( ++fsmRun->p == fsmRun->pe ) + goto out57; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto tr128; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st58: +case 58: + if ( ++fsmRun->p == fsmRun->pe ) + goto out58; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 115: goto st59; + case 116: goto st64; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st59: +case 59: + if ( ++fsmRun->p == fsmRun->pe ) + goto out59; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto st60; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr131; +st60: +case 60: + if ( ++fsmRun->p == fsmRun->pe ) + goto out60; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto st61; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st61: +case 61: + if ( ++fsmRun->p == fsmRun->pe ) + goto out61; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 117: goto st62; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st62: +case 62: + if ( ++fsmRun->p == fsmRun->pe ) + goto out62; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 99: goto st63; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st63: +case 63: + if ( ++fsmRun->p == fsmRun->pe ) + goto out63; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto tr136; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st64: +case 64: + if ( ++fsmRun->p == fsmRun->pe ) + goto out64; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st65; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st65: +case 65: + if ( ++fsmRun->p == fsmRun->pe ) + goto out65; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 120: goto st66; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st66: +case 66: + if ( ++fsmRun->p == fsmRun->pe ) + goto out66; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto tr139; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st67: +case 67: + if ( ++fsmRun->p == fsmRun->pe ) + goto out67; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st68; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st68: +case 68: + if ( ++fsmRun->p == fsmRun->pe ) + goto out68; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 102: goto tr141; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st69: +case 69: + if ( ++fsmRun->p == fsmRun->pe ) + goto out69; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 108: goto st70; + case 110: goto st73; + case 111: goto st74; + case 120: goto st75; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st70: +case 70: + if ( ++fsmRun->p == fsmRun->pe ) + goto out70; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 115: goto st71; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st71: +case 71: + if ( ++fsmRun->p == fsmRun->pe ) + goto out71; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto tr147; + case 105: goto st72; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st72: +case 72: + if ( ++fsmRun->p == fsmRun->pe ) + goto out72; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 102: goto tr149; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st73: +case 73: + if ( ++fsmRun->p == fsmRun->pe ) + goto out73; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 100: goto tr150; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st74: +case 74: + if ( ++fsmRun->p == fsmRun->pe ) + goto out74; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 115: goto tr151; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st75: +case 75: + if ( ++fsmRun->p == fsmRun->pe ) + goto out75; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 112: goto st76; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st76: +case 76: + if ( ++fsmRun->p == fsmRun->pe ) + goto out76; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 111: goto st77; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st77: +case 77: + if ( ++fsmRun->p == fsmRun->pe ) + goto out77; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto st78; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st78: +case 78: + if ( ++fsmRun->p == fsmRun->pe ) + goto out78; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto tr155; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st79: +case 79: + if ( ++fsmRun->p == fsmRun->pe ) + goto out79; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 97: goto st80; + case 111: goto st83; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st80: +case 80: + if ( ++fsmRun->p == fsmRun->pe ) + goto out80; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 108: goto st81; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st81: +case 81: + if ( ++fsmRun->p == fsmRun->pe ) + goto out81; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 115: goto st82; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st82: +case 82: + if ( ++fsmRun->p == fsmRun->pe ) + goto out82; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto tr160; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st83: +case 83: + if ( ++fsmRun->p == fsmRun->pe ) + goto out83; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto tr161; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st84: +case 84: + if ( ++fsmRun->p == fsmRun->pe ) + goto out84; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 108: goto st85; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st85: +case 85: + if ( ++fsmRun->p == fsmRun->pe ) + goto out85; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 111: goto st86; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st86: +case 86: + if ( ++fsmRun->p == fsmRun->pe ) + goto out86; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 98: goto st87; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st87: +case 87: + if ( ++fsmRun->p == fsmRun->pe ) + goto out87; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 97: goto st88; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st88: +case 88: + if ( ++fsmRun->p == fsmRun->pe ) + goto out88; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 108: goto tr166; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st89: +case 89: + if ( ++fsmRun->p == fsmRun->pe ) + goto out89; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 102: goto tr167; + case 103: goto st90; + case 110: goto st94; + case 116: goto st99; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st90: +case 90: + if ( ++fsmRun->p == fsmRun->pe ) + goto out90; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 110: goto st91; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st91: +case 91: + if ( ++fsmRun->p == fsmRun->pe ) + goto out91; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 111: goto st92; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st92: +case 92: + if ( ++fsmRun->p == fsmRun->pe ) + goto out92; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto st93; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st93: +case 93: + if ( ++fsmRun->p == fsmRun->pe ) + goto out93; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto tr174; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st94: +case 94: + if ( ++fsmRun->p == fsmRun->pe ) + goto out94; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 99: goto st95; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr175; +st95: +case 95: + if ( ++fsmRun->p == fsmRun->pe ) + goto out95; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 108: goto st96; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st96: +case 96: + if ( ++fsmRun->p == fsmRun->pe ) + goto out96; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 117: goto st97; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st97: +case 97: + if ( ++fsmRun->p == fsmRun->pe ) + goto out97; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 100: goto st98; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st98: +case 98: + if ( ++fsmRun->p == fsmRun->pe ) + goto out98; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto tr180; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st99: +case 99: + if ( ++fsmRun->p == fsmRun->pe ) + goto out99; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st100; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st100: +case 100: + if ( ++fsmRun->p == fsmRun->pe ) + goto out100; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto tr182; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st101: +case 101: + if ( ++fsmRun->p == fsmRun->pe ) + goto out101; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st102; + case 105: goto st104; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st102: +case 102: + if ( ++fsmRun->p == fsmRun->pe ) + goto out102; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 102: goto st103; + case 120: goto tr186; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st103: +case 103: + if ( ++fsmRun->p == fsmRun->pe ) + goto out103; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto tr187; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st104: +case 104: + if ( ++fsmRun->p == fsmRun->pe ) + goto out104; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 115: goto st105; + case 116: goto st106; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st105: +case 105: + if ( ++fsmRun->p == fsmRun->pe ) + goto out105; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto tr190; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st106: +case 106: + if ( ++fsmRun->p == fsmRun->pe ) + goto out106; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st107; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st107: +case 107: + if ( ++fsmRun->p == fsmRun->pe ) + goto out107; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto st108; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st108: +case 108: + if ( ++fsmRun->p == fsmRun->pe ) + goto out108; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 97: goto st109; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st109: +case 109: + if ( ++fsmRun->p == fsmRun->pe ) + goto out109; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 108: goto tr194; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st110: +case 110: + if ( ++fsmRun->p == fsmRun->pe ) + goto out110; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 97: goto st111; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st111: +case 111: + if ( ++fsmRun->p == fsmRun->pe ) + goto out111; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 107: goto st112; + case 112: goto tr197; + case 116: goto st121; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st112: +case 112: + if ( ++fsmRun->p == fsmRun->pe ) + goto out112; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st113; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st113: +case 113: + if ( ++fsmRun->p == fsmRun->pe ) + goto out113; + if ( (*fsmRun->p) == 95 ) + goto st114; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st114: +case 114: + if ( ++fsmRun->p == fsmRun->pe ) + goto out114; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto st115; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st115: +case 115: + if ( ++fsmRun->p == fsmRun->pe ) + goto out115; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 111: goto st116; + case 114: goto st119; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st116: +case 116: + if ( ++fsmRun->p == fsmRun->pe ) + goto out116; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 107: goto st117; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st117: +case 117: + if ( ++fsmRun->p == fsmRun->pe ) + goto out117; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st118; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st118: +case 118: + if ( ++fsmRun->p == fsmRun->pe ) + goto out118; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 110: goto tr206; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st119: +case 119: + if ( ++fsmRun->p == fsmRun->pe ) + goto out119; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st120; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st120: +case 120: + if ( ++fsmRun->p == fsmRun->pe ) + goto out120; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto tr208; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st121: +case 121: + if ( ++fsmRun->p == fsmRun->pe ) + goto out121; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 99: goto st122; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st122: +case 122: + if ( ++fsmRun->p == fsmRun->pe ) + goto out122; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 104: goto tr210; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st123: +case 123: + if ( ++fsmRun->p == fsmRun->pe ) + goto out123; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 97: goto st124; + case 101: goto st131; + case 105: goto st132; + case 111: goto st133; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st124: +case 124: + if ( ++fsmRun->p == fsmRun->pe ) + goto out124; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 109: goto st125; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st125: +case 125: + if ( ++fsmRun->p == fsmRun->pe ) + goto out125; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st126; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st126: +case 126: + if ( ++fsmRun->p == fsmRun->pe ) + goto out126; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 115: goto st127; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st127: +case 127: + if ( ++fsmRun->p == fsmRun->pe ) + goto out127; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 112: goto st128; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st128: +case 128: + if ( ++fsmRun->p == fsmRun->pe ) + goto out128; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 97: goto st129; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st129: +case 129: + if ( ++fsmRun->p == fsmRun->pe ) + goto out129; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 99: goto st130; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st130: +case 130: + if ( ++fsmRun->p == fsmRun->pe ) + goto out130; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto tr221; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st131: +case 131: + if ( ++fsmRun->p == fsmRun->pe ) + goto out131; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 119: goto tr222; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st132: +case 132: + if ( ++fsmRun->p == fsmRun->pe ) + goto out132; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 108: goto tr224; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr223; +st133: +case 133: + if ( ++fsmRun->p == fsmRun->pe ) + goto out133; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 110: goto st134; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st134: +case 134: + if ( ++fsmRun->p == fsmRun->pe ) + goto out134; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 97: goto st135; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st135: +case 135: + if ( ++fsmRun->p == fsmRun->pe ) + goto out135; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 115: goto st136; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st136: +case 136: + if ( ++fsmRun->p == fsmRun->pe ) + goto out136; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 115: goto st137; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st137: +case 137: + if ( ++fsmRun->p == fsmRun->pe ) + goto out137; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 111: goto st138; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st138: +case 138: + if ( ++fsmRun->p == fsmRun->pe ) + goto out138; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 99: goto tr230; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st139: +case 139: + if ( ++fsmRun->p == fsmRun->pe ) + goto out139; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 97: goto st140; + case 114: goto st148; + case 116: goto st161; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st140: +case 140: + if ( ++fsmRun->p == fsmRun->pe ) + goto out140; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto st141; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st141: +case 141: + if ( ++fsmRun->p == fsmRun->pe ) + goto out141; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 115: goto st142; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st142: +case 142: + if ( ++fsmRun->p == fsmRun->pe ) + goto out142; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st143; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st143: +case 143: + if ( ++fsmRun->p == fsmRun->pe ) + goto out143; + switch( (*fsmRun->p) ) { + case 95: goto st144; + case 114: goto tr112; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr237; +st144: +case 144: + if ( ++fsmRun->p == fsmRun->pe ) + goto out144; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 115: goto st145; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st145: +case 145: + if ( ++fsmRun->p == fsmRun->pe ) + goto out145; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto st146; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st146: +case 146: + if ( ++fsmRun->p == fsmRun->pe ) + goto out146; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 111: goto st147; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st147: +case 147: + if ( ++fsmRun->p == fsmRun->pe ) + goto out147; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 112: goto tr242; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st148: +case 148: + if ( ++fsmRun->p == fsmRun->pe ) + goto out148; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st149; + case 105: goto st152; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st149: +case 149: + if ( ++fsmRun->p == fsmRun->pe ) + goto out149; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st150; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st150: +case 150: + if ( ++fsmRun->p == fsmRun->pe ) + goto out150; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 111: goto st151; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st151: +case 151: + if ( ++fsmRun->p == fsmRun->pe ) + goto out151; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 102: goto tr247; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st152: +case 152: + if ( ++fsmRun->p == fsmRun->pe ) + goto out152; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 110: goto st153; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st153: +case 153: + if ( ++fsmRun->p == fsmRun->pe ) + goto out153; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto st154; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st154: +case 154: + if ( ++fsmRun->p == fsmRun->pe ) + goto out154; + switch( (*fsmRun->p) ) { + case 95: goto st155; + case 115: goto tr252; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr250; +st155: +case 155: + if ( ++fsmRun->p == fsmRun->pe ) + goto out155; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 120: goto st156; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st156: +case 156: + if ( ++fsmRun->p == fsmRun->pe ) + goto out156; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 109: goto st157; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st157: +case 157: + if ( ++fsmRun->p == fsmRun->pe ) + goto out157; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 108: goto st158; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st158: +case 158: + if ( ++fsmRun->p == fsmRun->pe ) + goto out158; + if ( (*fsmRun->p) == 95 ) + goto st159; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr256; +st159: +case 159: + if ( ++fsmRun->p == fsmRun->pe ) + goto out159; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 97: goto st160; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st160: +case 160: + if ( ++fsmRun->p == fsmRun->pe ) + goto out160; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 99: goto tr259; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st161: +case 161: + if ( ++fsmRun->p == fsmRun->pe ) + goto out161; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto tr260; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st162: +case 162: + if ( ++fsmRun->p == fsmRun->pe ) + goto out162; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st163; + case 105: goto st182; + case 108: goto tr263; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st163: +case 163: + if ( ++fsmRun->p == fsmRun->pe ) + goto out163; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 100: goto st164; + case 102: goto tr265; + case 106: goto st172; + case 113: goto st175; + case 116: goto st179; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st164: +case 164: + if ( ++fsmRun->p == fsmRun->pe ) + goto out164; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 117: goto st165; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st165: +case 165: + if ( ++fsmRun->p == fsmRun->pe ) + goto out165; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 99: goto st166; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st166: +case 166: + if ( ++fsmRun->p == fsmRun->pe ) + goto out166; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st167; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st167: +case 167: + if ( ++fsmRun->p == fsmRun->pe ) + goto out167; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 102: goto st168; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st168: +case 168: + if ( ++fsmRun->p == fsmRun->pe ) + goto out168; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 105: goto st169; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st169: +case 169: + if ( ++fsmRun->p == fsmRun->pe ) + goto out169; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto st170; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st170: +case 170: + if ( ++fsmRun->p == fsmRun->pe ) + goto out170; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 115: goto st171; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st171: +case 171: + if ( ++fsmRun->p == fsmRun->pe ) + goto out171; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto tr276; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st172: +case 172: + if ( ++fsmRun->p == fsmRun->pe ) + goto out172; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st173; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st173: +case 173: + if ( ++fsmRun->p == fsmRun->pe ) + goto out173; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 99: goto st174; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st174: +case 174: + if ( ++fsmRun->p == fsmRun->pe ) + goto out174; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto tr279; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st175: +case 175: + if ( ++fsmRun->p == fsmRun->pe ) + goto out175; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 117: goto st176; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st176: +case 176: + if ( ++fsmRun->p == fsmRun->pe ) + goto out176; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 105: goto st177; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st177: +case 177: + if ( ++fsmRun->p == fsmRun->pe ) + goto out177; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto st178; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st178: +case 178: + if ( ++fsmRun->p == fsmRun->pe ) + goto out178; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto tr283; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st179: +case 179: + if ( ++fsmRun->p == fsmRun->pe ) + goto out179; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 117: goto st180; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st180: +case 180: + if ( ++fsmRun->p == fsmRun->pe ) + goto out180; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto st181; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st181: +case 181: + if ( ++fsmRun->p == fsmRun->pe ) + goto out181; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 110: goto tr286; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st182: +case 182: + if ( ++fsmRun->p == fsmRun->pe ) + goto out182; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 103: goto st183; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st183: +case 183: + if ( ++fsmRun->p == fsmRun->pe ) + goto out183; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 104: goto st184; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st184: +case 184: + if ( ++fsmRun->p == fsmRun->pe ) + goto out184; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto tr289; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st185: +case 185: + if ( ++fsmRun->p == fsmRun->pe ) + goto out185; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st186; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st186: +case 186: + if ( ++fsmRun->p == fsmRun->pe ) + goto out186; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 110: goto st187; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st187: +case 187: + if ( ++fsmRun->p == fsmRun->pe ) + goto out187; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 100: goto tr292; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st188: +case 188: + if ( ++fsmRun->p == fsmRun->pe ) + goto out188; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 111: goto st189; + case 114: goto st192; + case 121: goto st194; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st189: +case 189: + if ( ++fsmRun->p == fsmRun->pe ) + goto out189; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 107: goto st190; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st190: +case 190: + if ( ++fsmRun->p == fsmRun->pe ) + goto out190; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st191; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st191: +case 191: + if ( ++fsmRun->p == fsmRun->pe ) + goto out191; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 110: goto tr298; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st192: +case 192: + if ( ++fsmRun->p == fsmRun->pe ) + goto out192; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 117: goto st193; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st193: +case 193: + if ( ++fsmRun->p == fsmRun->pe ) + goto out193; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto tr300; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st194: +case 194: + if ( ++fsmRun->p == fsmRun->pe ) + goto out194; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 112: goto st195; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st195: +case 195: + if ( ++fsmRun->p == fsmRun->pe ) + goto out195; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st196; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st196: +case 196: + if ( ++fsmRun->p == fsmRun->pe ) + goto out196; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 105: goto st197; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st197: +case 197: + if ( ++fsmRun->p == fsmRun->pe ) + goto out197; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 100: goto tr304; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st198: +case 198: + if ( ++fsmRun->p == fsmRun->pe ) + goto out198; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st199; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st199: +case 199: + if ( ++fsmRun->p == fsmRun->pe ) + goto out199; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 99: goto st200; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st200: +case 200: + if ( ++fsmRun->p == fsmRun->pe ) + goto out200; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 116: goto st201; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st201: +case 201: + if ( ++fsmRun->p == fsmRun->pe ) + goto out201; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 111: goto st202; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st202: +case 202: + if ( ++fsmRun->p == fsmRun->pe ) + goto out202; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 114: goto tr309; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st203: +case 203: + if ( ++fsmRun->p == fsmRun->pe ) + goto out203; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 104: goto st204; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st204: +case 204: + if ( ++fsmRun->p == fsmRun->pe ) + goto out204; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 105: goto st205; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st205: +case 205: + if ( ++fsmRun->p == fsmRun->pe ) + goto out205; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 108: goto st206; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st206: +case 206: + if ( ++fsmRun->p == fsmRun->pe ) + goto out206; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto tr313; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st207: +case 207: + if ( ++fsmRun->p == fsmRun->pe ) + goto out207; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 105: goto st208; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st208: +case 208: + if ( ++fsmRun->p == fsmRun->pe ) + goto out208; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 101: goto st209; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st209: +case 209: + if ( ++fsmRun->p == fsmRun->pe ) + goto out209; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 108: goto st210; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st210: +case 210: + if ( ++fsmRun->p == fsmRun->pe ) + goto out210; + switch( (*fsmRun->p) ) { + case 95: goto tr64; + case 100: goto tr317; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr64; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr64; + } else + goto tr64; + goto tr107; +st211: +case 211: + if ( ++fsmRun->p == fsmRun->pe ) + goto out211; + if ( (*fsmRun->p) == 124 ) + goto tr319; + goto tr318; +st33: +case 33: + if ( ++fsmRun->p == fsmRun->pe ) + goto out33; + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st33; + goto tr96; +tr6: + { fsmRun->p += 1; + fsmRun->matchedToken = 98; + goto out; +} + goto st212; +tr8: + { fsmRun->p += 1; + fsmRun->matchedToken = 66; + goto out; +} + goto st212; +tr321: + { fsmRun->p += 1; + fsmRun->matchedToken = 67; + goto out; +} + goto st212; +tr322: + { fsmRun->p += 1; + fsmRun->matchedToken = 93; + goto out; +} + goto st212; +tr323: + { fsmRun->p += 1; + fsmRun->matchedToken = 95; + goto out; +} + goto st212; +tr325: + { fsmRun->p += 1; + fsmRun->matchedToken = 68; + goto out; +} + goto st212; +tr326: + { fsmRun->p += 1; + fsmRun->matchedToken = 78; + goto out; +} + goto st212; +tr327: + { fsmRun->p += 1; + fsmRun->matchedToken = 79; + goto out; +} + goto st212; +tr328: + { fsmRun->p += 1; + fsmRun->matchedToken = 82; + goto out; +} + goto st212; +tr329: + { fsmRun->p += 1; + fsmRun->matchedToken = 96; + goto out; +} + goto st212; +tr330: + { fsmRun->p += 1; + fsmRun->matchedToken = 87; + goto out; +} + goto st212; +tr332: + { fsmRun->p += 1; + fsmRun->matchedToken = 76; + goto out; +} + goto st212; +tr333: + { fsmRun->p += 1; + fsmRun->matchedToken = 73; + goto out; +} + goto st212; +tr339: + { fsmRun->p += 1; + fsmRun->matchedToken = 83; + goto out; +} + goto st212; +tr341: + { fsmRun->p += 1; + fsmRun->matchedToken = 70; + goto out; +} + goto st212; +tr342: + { fsmRun->p += 1; + fsmRun->matchedToken = 71; + goto out; +} + goto st212; +tr343: + { fsmRun->p += 1; + fsmRun->matchedToken = 94; + goto out; +} + goto st212; +tr363: + { fsmRun->p += 1; + fsmRun->matchedToken = 80; + goto out; +} + goto st212; +tr365: + { fsmRun->p += 1; + fsmRun->matchedToken = 81; + goto out; +} + goto st212; +tr366: + { fsmRun->p += 1; + fsmRun->matchedToken = 69; + goto out; +} + goto st212; +tr367: + { fsmRun->matchedToken = 92; + goto out; +} + goto st212; +tr368: + { fsmRun->p += 1; + fsmRun->matchedToken = 86; + goto out; +} + goto st212; +tr369: + { fsmRun->matchedToken = 97; + goto out; +} + goto st212; +tr370: + { fsmRun->p += 1; + fsmRun->matchedToken = 77; + goto out; +} + goto st212; +tr371: + { fsmRun->matchedToken = 65; + goto out; +} + goto st212; +tr372: + { fsmRun->matchedToken = 74; + goto out; +} + goto st212; +tr373: + { fsmRun->p += 1; + fsmRun->matchedToken = 75; + goto out; +} + goto st212; +tr374: + { fsmRun->matchedToken = 88; + goto out; +} + goto st212; +tr375: + { fsmRun->p += 1; + fsmRun->matchedToken = 90; + goto out; +} + goto st212; +tr376: + { fsmRun->matchedToken = 84; + goto out; +} + goto st212; +tr377: + { fsmRun->p += 1; + fsmRun->matchedToken = 85; + goto out; +} + goto st212; +tr378: + { fsmRun->matchedToken = 89; + goto out; +} + goto st212; +tr379: + { fsmRun->p += 1; + fsmRun->matchedToken = 91; + goto out; +} + goto st212; +tr380: + { fsmRun->toklen = fsmRun->tokend; + switch( fsmRun->act ) { + case 2: + fsmRun->matchedToken = 8; + break; + case 4: + fsmRun->matchedToken = 9; + break; + case 6: + fsmRun->matchedToken = 10; + break; + case 8: + fsmRun->matchedToken = 11; + break; + case 10: + fsmRun->matchedToken = 12; + break; + case 12: + fsmRun->matchedToken = 13; + break; + case 16: + fsmRun->matchedToken = 15; + break; + case 20: + fsmRun->matchedToken = 17; + break; + case 24: + fsmRun->matchedToken = 19; + break; + case 26: + fsmRun->matchedToken = 20; + break; + case 28: + fsmRun->matchedToken = 21; + break; + case 30: + fsmRun->matchedToken = 22; + break; + case 32: + fsmRun->matchedToken = 23; + break; + case 34: + fsmRun->matchedToken = 24; + break; + case 36: + fsmRun->matchedToken = 25; + break; + case 38: + fsmRun->matchedToken = 26; + break; + case 40: + fsmRun->matchedToken = 27; + break; + case 42: + fsmRun->matchedToken = 28; + break; + case 44: + fsmRun->matchedToken = 29; + break; + case 46: + fsmRun->matchedToken = 30; + break; + case 50: + fsmRun->matchedToken = 32; + break; + case 52: + fsmRun->matchedToken = 33; + break; + case 54: + fsmRun->matchedToken = 34; + break; + case 56: + fsmRun->matchedToken = 35; + break; + case 58: + fsmRun->matchedToken = 36; + break; + case 60: + fsmRun->matchedToken = 37; + break; + case 62: + fsmRun->matchedToken = 38; + break; + case 64: + fsmRun->matchedToken = 39; + break; + case 66: + fsmRun->matchedToken = 40; + break; + case 68: + fsmRun->matchedToken = 41; + break; + case 70: + fsmRun->matchedToken = 42; + break; + case 72: + fsmRun->matchedToken = 43; + break; + case 74: + fsmRun->matchedToken = 44; + break; + case 76: + fsmRun->matchedToken = 45; + break; + case 78: + fsmRun->matchedToken = 46; + break; + case 80: + fsmRun->matchedToken = 47; + break; + case 82: + fsmRun->matchedToken = 48; + break; + case 84: + fsmRun->matchedToken = 49; + break; + case 86: + fsmRun->matchedToken = 50; + break; + case 88: + fsmRun->matchedToken = 51; + break; + case 90: + fsmRun->matchedToken = 52; + break; + case 92: + fsmRun->matchedToken = 53; + break; + case 94: + fsmRun->matchedToken = 54; + break; + case 96: + fsmRun->matchedToken = 55; + break; + case 100: + fsmRun->matchedToken = 57; + break; + case 102: + fsmRun->matchedToken = 58; + break; + case 104: + fsmRun->matchedToken = 59; + break; + case 106: + fsmRun->matchedToken = 60; + break; + case 108: + fsmRun->matchedToken = 61; + break; + case 110: + fsmRun->matchedToken = 62; + break; + case 112: + fsmRun->matchedToken = 63; + break; + case 114: + fsmRun->matchedToken = 64; + break; + } + goto skip_toklen; +} + goto st212; +tr381: + { fsmRun->matchedToken = 66; + goto out; +} + goto st212; +tr382: + { fsmRun->matchedToken = 64; + goto out; +} + goto st212; +tr406: + { fsmRun->matchedToken = 20; + goto out; +} + goto st212; +tr450: + { fsmRun->matchedToken = 31; + goto out; +} + goto st212; +tr498: + { fsmRun->matchedToken = 56; + goto out; +} + goto st212; +tr512: + { fsmRun->matchedToken = 18; + goto out; +} + goto st212; +tr525: + { fsmRun->matchedToken = 14; + goto out; +} + goto st212; +tr531: + { fsmRun->matchedToken = 16; + goto out; +} + goto st212; +tr593: + { fsmRun->matchedToken = 72; + goto out; +} + goto st212; +tr594: + { fsmRun->p += 1; + fsmRun->matchedToken = 99; + goto out; +} + goto st212; +st212: +case 212: + if ( ++fsmRun->p == fsmRun->pe ) + goto out212; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 33: goto st213; + case 34: goto tr321; + case 36: goto tr322; + case 37: goto tr323; + case 38: goto st4; + case 39: goto tr325; + case 40: goto tr326; + case 41: goto tr327; + case 42: goto tr328; + case 43: goto tr329; + case 44: goto tr330; + case 45: goto st214; + case 46: goto tr332; + case 47: goto tr333; + case 58: goto st216; + case 60: goto st217; + case 61: goto st218; + case 62: goto st219; + case 63: goto tr339; + case 91: goto tr341; + case 93: goto tr342; + case 94: goto tr343; + case 96: goto st5; + case 97: goto st222; + case 98: goto st229; + case 99: goto st233; + case 100: goto st249; + case 101: goto st251; + case 102: goto st261; + case 103: goto st266; + case 105: goto st271; + case 108: goto st283; + case 109: goto st292; + case 110: goto st305; + case 112: goto st321; + case 114: goto st344; + case 115: goto st367; + case 116: goto st370; + case 118: goto st380; + case 119: goto st385; + case 121: goto st389; + case 123: goto tr363; + case 124: goto st393; + case 125: goto tr365; + case 126: goto tr366; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st215; + } else if ( (*fsmRun->p) > 90 ) { + if ( 95 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto st0; +st213: +case 213: + if ( ++fsmRun->p == fsmRun->pe ) + goto out213; + if ( (*fsmRun->p) == 61 ) + goto tr368; + goto tr367; +st4: +case 4: + if ( ++fsmRun->p == fsmRun->pe ) + goto out4; + if ( (*fsmRun->p) == 38 ) + goto tr6; + goto st0; +st214: +case 214: + if ( ++fsmRun->p == fsmRun->pe ) + goto out214; + if ( (*fsmRun->p) == 62 ) + goto tr370; + goto tr369; +st216: +case 216: + if ( ++fsmRun->p == fsmRun->pe ) + goto out216; + if ( (*fsmRun->p) == 58 ) + goto tr373; + goto tr372; +st217: +case 217: + if ( ++fsmRun->p == fsmRun->pe ) + goto out217; + if ( (*fsmRun->p) == 61 ) + goto tr375; + goto tr374; +st218: +case 218: + if ( ++fsmRun->p == fsmRun->pe ) + goto out218; + if ( (*fsmRun->p) == 61 ) + goto tr377; + goto tr376; +st219: +case 219: + if ( ++fsmRun->p == fsmRun->pe ) + goto out219; + if ( (*fsmRun->p) == 61 ) + goto tr379; + goto tr378; +st5: +case 5: + if ( ++fsmRun->p == fsmRun->pe ) + goto out5; + switch( (*fsmRun->p) ) { + case 32: goto st0; + case 93: goto tr8; + } + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 ) + goto st0; + goto st221; +st221: +case 221: + if ( ++fsmRun->p == fsmRun->pe ) + goto out221; + switch( (*fsmRun->p) ) { + case 32: goto tr381; + case 93: goto tr381; + } + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 ) + goto tr381; + goto st221; +st222: +case 222: + if ( ++fsmRun->p == fsmRun->pe ) + goto out222; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 99: goto st223; + case 108: goto st226; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +tr340: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 114;} + goto st220; +tr387: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 50;} + goto st220; +tr390: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 74;} + goto st220; +tr394: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 68;} + goto st220; +tr398: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 86;} + goto st220; +tr403: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 76;} + goto st220; +tr411: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 26;} + goto st220; +tr414: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 96;} + goto st220; +tr416: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 2;} + goto st220; +tr422: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 46;} + goto st220; +tr424: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 44;} + goto st220; +tr425: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 6;} + goto st220; +tr426: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 84;} + goto st220; +tr430: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 64;} + goto st220; +tr435: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 104;} + goto st220; +tr436: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 36;} + goto st220; +tr441: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 82;} + goto st220; +tr442: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 38;} + goto st220; +tr449: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 12;} + goto st220; +tr455: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 112;} + goto st220; +tr457: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 60;} + goto st220; +tr461: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 4;} + goto st220; +tr462: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 106;} + goto st220; +tr465: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 52;} + goto st220; +tr469: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 94;} + goto st220; +tr472: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 56;} + goto st220; +tr481: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 88;} + goto st220; +tr483: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 90;} + goto st220; +tr485: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 28;} + goto st220; +tr496: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 34;} + goto st220; +tr497: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 78;} + goto st220; +tr499: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 100;} + goto st220; +tr505: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 110;} + goto st220; +tr517: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 24;} + goto st220; +tr522: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 80;} + goto st220; +tr527: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 16;} + goto st220; +tr534: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 20;} + goto st220; +tr535: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 58;} + goto st220; +tr538: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 10;} + goto st220; +tr540: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 62;} + goto st220; +tr551: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 72;} + goto st220; +tr554: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 70;} + goto st220; +tr558: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 30;} + goto st220; +tr561: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 66;} + goto st220; +tr564: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 108;} + goto st220; +tr567: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 32;} + goto st220; +tr573: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 8;} + goto st220; +tr575: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 102;} + goto st220; +tr579: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 92;} + goto st220; +tr584: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 54;} + goto st220; +tr588: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 42;} + goto st220; +tr592: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 40;} + goto st220; +st220: +case 220: + if ( ++fsmRun->p == fsmRun->pe ) + goto out220; + if ( (*fsmRun->p) == 95 ) + goto tr340; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr380; +st223: +case 223: + if ( ++fsmRun->p == fsmRun->pe ) + goto out223; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 99: goto st224; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st224: +case 224: + if ( ++fsmRun->p == fsmRun->pe ) + goto out224; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 117: goto st225; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st225: +case 225: + if ( ++fsmRun->p == fsmRun->pe ) + goto out225; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 109: goto tr387; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st226: +case 226: + if ( ++fsmRun->p == fsmRun->pe ) + goto out226; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 105: goto st227; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st227: +case 227: + if ( ++fsmRun->p == fsmRun->pe ) + goto out227; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 97: goto st228; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st228: +case 228: + if ( ++fsmRun->p == fsmRun->pe ) + goto out228; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 115: goto tr390; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st229: +case 229: + if ( ++fsmRun->p == fsmRun->pe ) + goto out229; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 114: goto st230; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st230: +case 230: + if ( ++fsmRun->p == fsmRun->pe ) + goto out230; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st231; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st231: +case 231: + if ( ++fsmRun->p == fsmRun->pe ) + goto out231; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 97: goto st232; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st232: +case 232: + if ( ++fsmRun->p == fsmRun->pe ) + goto out232; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 107: goto tr394; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st233: +case 233: + if ( ++fsmRun->p == fsmRun->pe ) + goto out233; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 97: goto st234; + case 111: goto st236; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st234: +case 234: + if ( ++fsmRun->p == fsmRun->pe ) + goto out234; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 115: goto st235; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st235: +case 235: + if ( ++fsmRun->p == fsmRun->pe ) + goto out235; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto tr398; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st236: +case 236: + if ( ++fsmRun->p == fsmRun->pe ) + goto out236; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 109: goto st237; + case 110: goto st240; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st237: +case 237: + if ( ++fsmRun->p == fsmRun->pe ) + goto out237; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 109: goto st238; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st238: +case 238: + if ( ++fsmRun->p == fsmRun->pe ) + goto out238; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 105: goto st239; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st239: +case 239: + if ( ++fsmRun->p == fsmRun->pe ) + goto out239; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto tr403; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st240: +case 240: + if ( ++fsmRun->p == fsmRun->pe ) + goto out240; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 115: goto st241; + case 116: goto st246; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st241: +case 241: + if ( ++fsmRun->p == fsmRun->pe ) + goto out241; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto st242; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr406; +st242: +case 242: + if ( ++fsmRun->p == fsmRun->pe ) + goto out242; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 114: goto st243; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st243: +case 243: + if ( ++fsmRun->p == fsmRun->pe ) + goto out243; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 117: goto st244; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st244: +case 244: + if ( ++fsmRun->p == fsmRun->pe ) + goto out244; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 99: goto st245; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st245: +case 245: + if ( ++fsmRun->p == fsmRun->pe ) + goto out245; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto tr411; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st246: +case 246: + if ( ++fsmRun->p == fsmRun->pe ) + goto out246; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st247; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st247: +case 247: + if ( ++fsmRun->p == fsmRun->pe ) + goto out247; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 120: goto st248; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st248: +case 248: + if ( ++fsmRun->p == fsmRun->pe ) + goto out248; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto tr414; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st249: +case 249: + if ( ++fsmRun->p == fsmRun->pe ) + goto out249; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st250; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st250: +case 250: + if ( ++fsmRun->p == fsmRun->pe ) + goto out250; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 102: goto tr416; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st251: +case 251: + if ( ++fsmRun->p == fsmRun->pe ) + goto out251; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 108: goto st252; + case 110: goto st255; + case 111: goto st256; + case 120: goto st257; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st252: +case 252: + if ( ++fsmRun->p == fsmRun->pe ) + goto out252; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 115: goto st253; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st253: +case 253: + if ( ++fsmRun->p == fsmRun->pe ) + goto out253; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto tr422; + case 105: goto st254; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st254: +case 254: + if ( ++fsmRun->p == fsmRun->pe ) + goto out254; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 102: goto tr424; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st255: +case 255: + if ( ++fsmRun->p == fsmRun->pe ) + goto out255; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 100: goto tr425; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st256: +case 256: + if ( ++fsmRun->p == fsmRun->pe ) + goto out256; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 115: goto tr426; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st257: +case 257: + if ( ++fsmRun->p == fsmRun->pe ) + goto out257; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 112: goto st258; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st258: +case 258: + if ( ++fsmRun->p == fsmRun->pe ) + goto out258; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 111: goto st259; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st259: +case 259: + if ( ++fsmRun->p == fsmRun->pe ) + goto out259; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 114: goto st260; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st260: +case 260: + if ( ++fsmRun->p == fsmRun->pe ) + goto out260; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto tr430; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st261: +case 261: + if ( ++fsmRun->p == fsmRun->pe ) + goto out261; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 97: goto st262; + case 111: goto st265; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st262: +case 262: + if ( ++fsmRun->p == fsmRun->pe ) + goto out262; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 108: goto st263; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st263: +case 263: + if ( ++fsmRun->p == fsmRun->pe ) + goto out263; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 115: goto st264; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st264: +case 264: + if ( ++fsmRun->p == fsmRun->pe ) + goto out264; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto tr435; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st265: +case 265: + if ( ++fsmRun->p == fsmRun->pe ) + goto out265; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 114: goto tr436; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st266: +case 266: + if ( ++fsmRun->p == fsmRun->pe ) + goto out266; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 108: goto st267; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st267: +case 267: + if ( ++fsmRun->p == fsmRun->pe ) + goto out267; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 111: goto st268; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st268: +case 268: + if ( ++fsmRun->p == fsmRun->pe ) + goto out268; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 98: goto st269; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st269: +case 269: + if ( ++fsmRun->p == fsmRun->pe ) + goto out269; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 97: goto st270; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st270: +case 270: + if ( ++fsmRun->p == fsmRun->pe ) + goto out270; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 108: goto tr441; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st271: +case 271: + if ( ++fsmRun->p == fsmRun->pe ) + goto out271; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 102: goto tr442; + case 103: goto st272; + case 110: goto st276; + case 116: goto st281; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st272: +case 272: + if ( ++fsmRun->p == fsmRun->pe ) + goto out272; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 110: goto st273; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st273: +case 273: + if ( ++fsmRun->p == fsmRun->pe ) + goto out273; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 111: goto st274; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st274: +case 274: + if ( ++fsmRun->p == fsmRun->pe ) + goto out274; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 114: goto st275; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st275: +case 275: + if ( ++fsmRun->p == fsmRun->pe ) + goto out275; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto tr449; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st276: +case 276: + if ( ++fsmRun->p == fsmRun->pe ) + goto out276; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 99: goto st277; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr450; +st277: +case 277: + if ( ++fsmRun->p == fsmRun->pe ) + goto out277; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 108: goto st278; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st278: +case 278: + if ( ++fsmRun->p == fsmRun->pe ) + goto out278; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 117: goto st279; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st279: +case 279: + if ( ++fsmRun->p == fsmRun->pe ) + goto out279; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 100: goto st280; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st280: +case 280: + if ( ++fsmRun->p == fsmRun->pe ) + goto out280; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto tr455; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st281: +case 281: + if ( ++fsmRun->p == fsmRun->pe ) + goto out281; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st282; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st282: +case 282: + if ( ++fsmRun->p == fsmRun->pe ) + goto out282; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 114: goto tr457; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st283: +case 283: + if ( ++fsmRun->p == fsmRun->pe ) + goto out283; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st284; + case 105: goto st286; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st284: +case 284: + if ( ++fsmRun->p == fsmRun->pe ) + goto out284; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 102: goto st285; + case 120: goto tr461; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st285: +case 285: + if ( ++fsmRun->p == fsmRun->pe ) + goto out285; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto tr462; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st286: +case 286: + if ( ++fsmRun->p == fsmRun->pe ) + goto out286; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 115: goto st287; + case 116: goto st288; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st287: +case 287: + if ( ++fsmRun->p == fsmRun->pe ) + goto out287; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto tr465; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st288: +case 288: + if ( ++fsmRun->p == fsmRun->pe ) + goto out288; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st289; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st289: +case 289: + if ( ++fsmRun->p == fsmRun->pe ) + goto out289; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 114: goto st290; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st290: +case 290: + if ( ++fsmRun->p == fsmRun->pe ) + goto out290; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 97: goto st291; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st291: +case 291: + if ( ++fsmRun->p == fsmRun->pe ) + goto out291; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 108: goto tr469; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st292: +case 292: + if ( ++fsmRun->p == fsmRun->pe ) + goto out292; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 97: goto st293; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st293: +case 293: + if ( ++fsmRun->p == fsmRun->pe ) + goto out293; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 107: goto st294; + case 112: goto tr472; + case 116: goto st303; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st294: +case 294: + if ( ++fsmRun->p == fsmRun->pe ) + goto out294; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st295; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st295: +case 295: + if ( ++fsmRun->p == fsmRun->pe ) + goto out295; + if ( (*fsmRun->p) == 95 ) + goto st296; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st296: +case 296: + if ( ++fsmRun->p == fsmRun->pe ) + goto out296; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto st297; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st297: +case 297: + if ( ++fsmRun->p == fsmRun->pe ) + goto out297; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 111: goto st298; + case 114: goto st301; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st298: +case 298: + if ( ++fsmRun->p == fsmRun->pe ) + goto out298; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 107: goto st299; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st299: +case 299: + if ( ++fsmRun->p == fsmRun->pe ) + goto out299; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st300; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st300: +case 300: + if ( ++fsmRun->p == fsmRun->pe ) + goto out300; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 110: goto tr481; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st301: +case 301: + if ( ++fsmRun->p == fsmRun->pe ) + goto out301; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st302; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st302: +case 302: + if ( ++fsmRun->p == fsmRun->pe ) + goto out302; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto tr483; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st303: +case 303: + if ( ++fsmRun->p == fsmRun->pe ) + goto out303; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 99: goto st304; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st304: +case 304: + if ( ++fsmRun->p == fsmRun->pe ) + goto out304; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 104: goto tr485; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st305: +case 305: + if ( ++fsmRun->p == fsmRun->pe ) + goto out305; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 97: goto st306; + case 101: goto st313; + case 105: goto st314; + case 111: goto st315; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st306: +case 306: + if ( ++fsmRun->p == fsmRun->pe ) + goto out306; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 109: goto st307; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st307: +case 307: + if ( ++fsmRun->p == fsmRun->pe ) + goto out307; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st308; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st308: +case 308: + if ( ++fsmRun->p == fsmRun->pe ) + goto out308; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 115: goto st309; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st309: +case 309: + if ( ++fsmRun->p == fsmRun->pe ) + goto out309; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 112: goto st310; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st310: +case 310: + if ( ++fsmRun->p == fsmRun->pe ) + goto out310; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 97: goto st311; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st311: +case 311: + if ( ++fsmRun->p == fsmRun->pe ) + goto out311; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 99: goto st312; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st312: +case 312: + if ( ++fsmRun->p == fsmRun->pe ) + goto out312; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto tr496; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st313: +case 313: + if ( ++fsmRun->p == fsmRun->pe ) + goto out313; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 119: goto tr497; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st314: +case 314: + if ( ++fsmRun->p == fsmRun->pe ) + goto out314; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 108: goto tr499; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr498; +st315: +case 315: + if ( ++fsmRun->p == fsmRun->pe ) + goto out315; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 110: goto st316; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st316: +case 316: + if ( ++fsmRun->p == fsmRun->pe ) + goto out316; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 97: goto st317; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st317: +case 317: + if ( ++fsmRun->p == fsmRun->pe ) + goto out317; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 115: goto st318; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st318: +case 318: + if ( ++fsmRun->p == fsmRun->pe ) + goto out318; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 115: goto st319; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st319: +case 319: + if ( ++fsmRun->p == fsmRun->pe ) + goto out319; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 111: goto st320; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st320: +case 320: + if ( ++fsmRun->p == fsmRun->pe ) + goto out320; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 99: goto tr505; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st321: +case 321: + if ( ++fsmRun->p == fsmRun->pe ) + goto out321; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 97: goto st322; + case 114: goto st330; + case 116: goto st343; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st322: +case 322: + if ( ++fsmRun->p == fsmRun->pe ) + goto out322; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 114: goto st323; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st323: +case 323: + if ( ++fsmRun->p == fsmRun->pe ) + goto out323; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 115: goto st324; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st324: +case 324: + if ( ++fsmRun->p == fsmRun->pe ) + goto out324; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st325; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st325: +case 325: + if ( ++fsmRun->p == fsmRun->pe ) + goto out325; + switch( (*fsmRun->p) ) { + case 95: goto st326; + case 114: goto tr387; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr512; +st326: +case 326: + if ( ++fsmRun->p == fsmRun->pe ) + goto out326; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 115: goto st327; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st327: +case 327: + if ( ++fsmRun->p == fsmRun->pe ) + goto out327; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto st328; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st328: +case 328: + if ( ++fsmRun->p == fsmRun->pe ) + goto out328; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 111: goto st329; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st329: +case 329: + if ( ++fsmRun->p == fsmRun->pe ) + goto out329; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 112: goto tr517; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st330: +case 330: + if ( ++fsmRun->p == fsmRun->pe ) + goto out330; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st331; + case 105: goto st334; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st331: +case 331: + if ( ++fsmRun->p == fsmRun->pe ) + goto out331; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st332; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st332: +case 332: + if ( ++fsmRun->p == fsmRun->pe ) + goto out332; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 111: goto st333; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st333: +case 333: + if ( ++fsmRun->p == fsmRun->pe ) + goto out333; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 102: goto tr522; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st334: +case 334: + if ( ++fsmRun->p == fsmRun->pe ) + goto out334; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 110: goto st335; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st335: +case 335: + if ( ++fsmRun->p == fsmRun->pe ) + goto out335; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto st336; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st336: +case 336: + if ( ++fsmRun->p == fsmRun->pe ) + goto out336; + switch( (*fsmRun->p) ) { + case 95: goto st337; + case 115: goto tr527; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr525; +st337: +case 337: + if ( ++fsmRun->p == fsmRun->pe ) + goto out337; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 120: goto st338; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st338: +case 338: + if ( ++fsmRun->p == fsmRun->pe ) + goto out338; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 109: goto st339; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st339: +case 339: + if ( ++fsmRun->p == fsmRun->pe ) + goto out339; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 108: goto st340; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st340: +case 340: + if ( ++fsmRun->p == fsmRun->pe ) + goto out340; + if ( (*fsmRun->p) == 95 ) + goto st341; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr531; +st341: +case 341: + if ( ++fsmRun->p == fsmRun->pe ) + goto out341; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 97: goto st342; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st342: +case 342: + if ( ++fsmRun->p == fsmRun->pe ) + goto out342; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 99: goto tr534; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st343: +case 343: + if ( ++fsmRun->p == fsmRun->pe ) + goto out343; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 114: goto tr535; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st344: +case 344: + if ( ++fsmRun->p == fsmRun->pe ) + goto out344; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st345; + case 105: goto st364; + case 108: goto tr538; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st345: +case 345: + if ( ++fsmRun->p == fsmRun->pe ) + goto out345; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 100: goto st346; + case 102: goto tr540; + case 106: goto st354; + case 113: goto st357; + case 116: goto st361; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st346: +case 346: + if ( ++fsmRun->p == fsmRun->pe ) + goto out346; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 117: goto st347; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st347: +case 347: + if ( ++fsmRun->p == fsmRun->pe ) + goto out347; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 99: goto st348; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st348: +case 348: + if ( ++fsmRun->p == fsmRun->pe ) + goto out348; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st349; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st349: +case 349: + if ( ++fsmRun->p == fsmRun->pe ) + goto out349; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 102: goto st350; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st350: +case 350: + if ( ++fsmRun->p == fsmRun->pe ) + goto out350; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 105: goto st351; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st351: +case 351: + if ( ++fsmRun->p == fsmRun->pe ) + goto out351; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 114: goto st352; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st352: +case 352: + if ( ++fsmRun->p == fsmRun->pe ) + goto out352; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 115: goto st353; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st353: +case 353: + if ( ++fsmRun->p == fsmRun->pe ) + goto out353; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto tr551; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st354: +case 354: + if ( ++fsmRun->p == fsmRun->pe ) + goto out354; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st355; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st355: +case 355: + if ( ++fsmRun->p == fsmRun->pe ) + goto out355; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 99: goto st356; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st356: +case 356: + if ( ++fsmRun->p == fsmRun->pe ) + goto out356; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto tr554; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st357: +case 357: + if ( ++fsmRun->p == fsmRun->pe ) + goto out357; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 117: goto st358; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st358: +case 358: + if ( ++fsmRun->p == fsmRun->pe ) + goto out358; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 105: goto st359; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st359: +case 359: + if ( ++fsmRun->p == fsmRun->pe ) + goto out359; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 114: goto st360; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st360: +case 360: + if ( ++fsmRun->p == fsmRun->pe ) + goto out360; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto tr558; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st361: +case 361: + if ( ++fsmRun->p == fsmRun->pe ) + goto out361; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 117: goto st362; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st362: +case 362: + if ( ++fsmRun->p == fsmRun->pe ) + goto out362; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 114: goto st363; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st363: +case 363: + if ( ++fsmRun->p == fsmRun->pe ) + goto out363; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 110: goto tr561; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st364: +case 364: + if ( ++fsmRun->p == fsmRun->pe ) + goto out364; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 103: goto st365; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st365: +case 365: + if ( ++fsmRun->p == fsmRun->pe ) + goto out365; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 104: goto st366; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st366: +case 366: + if ( ++fsmRun->p == fsmRun->pe ) + goto out366; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto tr564; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st367: +case 367: + if ( ++fsmRun->p == fsmRun->pe ) + goto out367; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st368; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st368: +case 368: + if ( ++fsmRun->p == fsmRun->pe ) + goto out368; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 110: goto st369; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st369: +case 369: + if ( ++fsmRun->p == fsmRun->pe ) + goto out369; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 100: goto tr567; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st370: +case 370: + if ( ++fsmRun->p == fsmRun->pe ) + goto out370; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 111: goto st371; + case 114: goto st374; + case 121: goto st376; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st371: +case 371: + if ( ++fsmRun->p == fsmRun->pe ) + goto out371; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 107: goto st372; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st372: +case 372: + if ( ++fsmRun->p == fsmRun->pe ) + goto out372; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st373; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st373: +case 373: + if ( ++fsmRun->p == fsmRun->pe ) + goto out373; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 110: goto tr573; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st374: +case 374: + if ( ++fsmRun->p == fsmRun->pe ) + goto out374; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 117: goto st375; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st375: +case 375: + if ( ++fsmRun->p == fsmRun->pe ) + goto out375; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto tr575; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st376: +case 376: + if ( ++fsmRun->p == fsmRun->pe ) + goto out376; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 112: goto st377; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st377: +case 377: + if ( ++fsmRun->p == fsmRun->pe ) + goto out377; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st378; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st378: +case 378: + if ( ++fsmRun->p == fsmRun->pe ) + goto out378; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 105: goto st379; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st379: +case 379: + if ( ++fsmRun->p == fsmRun->pe ) + goto out379; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 100: goto tr579; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st380: +case 380: + if ( ++fsmRun->p == fsmRun->pe ) + goto out380; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st381; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st381: +case 381: + if ( ++fsmRun->p == fsmRun->pe ) + goto out381; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 99: goto st382; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st382: +case 382: + if ( ++fsmRun->p == fsmRun->pe ) + goto out382; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 116: goto st383; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st383: +case 383: + if ( ++fsmRun->p == fsmRun->pe ) + goto out383; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 111: goto st384; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st384: +case 384: + if ( ++fsmRun->p == fsmRun->pe ) + goto out384; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 114: goto tr584; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st385: +case 385: + if ( ++fsmRun->p == fsmRun->pe ) + goto out385; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 104: goto st386; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st386: +case 386: + if ( ++fsmRun->p == fsmRun->pe ) + goto out386; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 105: goto st387; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st387: +case 387: + if ( ++fsmRun->p == fsmRun->pe ) + goto out387; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 108: goto st388; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st388: +case 388: + if ( ++fsmRun->p == fsmRun->pe ) + goto out388; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto tr588; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st389: +case 389: + if ( ++fsmRun->p == fsmRun->pe ) + goto out389; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 105: goto st390; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st390: +case 390: + if ( ++fsmRun->p == fsmRun->pe ) + goto out390; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 101: goto st391; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st391: +case 391: + if ( ++fsmRun->p == fsmRun->pe ) + goto out391; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 108: goto st392; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st392: +case 392: + if ( ++fsmRun->p == fsmRun->pe ) + goto out392; + switch( (*fsmRun->p) ) { + case 95: goto tr340; + case 100: goto tr592; + } + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto tr340; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto tr340; + } else + goto tr340; + goto tr382; +st393: +case 393: + if ( ++fsmRun->p == fsmRun->pe ) + goto out393; + if ( (*fsmRun->p) == 124 ) + goto tr594; + goto tr593; +st215: +case 215: + if ( ++fsmRun->p == fsmRun->pe ) + goto out215; + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st215; + goto tr371; +tr10: + { fsmRun->p += 1; + fsmRun->matchedToken = 101; + goto out; +} + goto st394; +tr596: + { fsmRun->matchedToken = 100; + goto out; +} + goto st394; +st394: +case 394: + if ( ++fsmRun->p == fsmRun->pe ) + goto out394; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 32: goto st395; + case 35: goto st6; + } + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 ) + goto st395; + goto st0; +st395: +case 395: + if ( ++fsmRun->p == fsmRun->pe ) + goto out395; + if ( (*fsmRun->p) == 32 ) + goto st395; + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 ) + goto st395; + goto tr596; +st6: +case 6: + if ( ++fsmRun->p == fsmRun->pe ) + goto out6; + if ( (*fsmRun->p) == 10 ) + goto tr10; + goto st6; +tr12: + { fsmRun->toklen = fsmRun->tokend; + switch( fsmRun->act ) { + case 0: goto st0; + case 197: + fsmRun->matchedToken = 106; + break; + } + goto skip_toklen; +} + goto st396; +tr597: + { fsmRun->p += 1; + fsmRun->matchedToken = 103; + goto out; +} + goto st396; +tr598: + { fsmRun->p += 1; + fsmRun->matchedToken = 102; + goto out; +} + goto st396; +tr599: + { fsmRun->p += 1; + fsmRun->matchedToken = 104; + goto out; +} + goto st396; +tr601: + { fsmRun->p += 1; + fsmRun->matchedToken = 105; + goto out; +} + goto st396; +tr602: + { fsmRun->matchedToken = 106; + goto out; +} + goto st396; +st396: + {fsmRun->act = 0;} +case 396: + if ( ++fsmRun->p == fsmRun->pe ) + goto out396; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 10: goto tr597; + case 34: goto tr598; + case 91: goto tr599; + case 92: goto st7; + case 93: goto tr601; + } + goto tr11; +st7: +case 7: + if ( ++fsmRun->p == fsmRun->pe ) + goto out7; + goto tr11; +tr11: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 197;} + goto st397; +st397: +case 397: + if ( ++fsmRun->p == fsmRun->pe ) + goto out397; + switch( (*fsmRun->p) ) { + case 10: goto tr602; + case 34: goto tr602; + case 92: goto st7; + } + if ( 91 <= (*fsmRun->p) && (*fsmRun->p) <= 93 ) + goto tr602; + goto tr11; +tr14: + { fsmRun->toklen = fsmRun->tokend; + switch( fsmRun->act ) { + case 0: goto st0; + case 198: + fsmRun->matchedToken = 106; + break; + } + goto skip_toklen; +} + goto st398; +tr603: + { fsmRun->p += 1; + fsmRun->matchedToken = 103; + goto out; +} + goto st398; +tr604: + { fsmRun->p += 1; + fsmRun->matchedToken = 102; + goto out; +} + goto st398; +tr605: + { fsmRun->p += 1; + fsmRun->matchedToken = 104; + goto out; +} + goto st398; +tr607: + { fsmRun->p += 1; + fsmRun->matchedToken = 105; + goto out; +} + goto st398; +tr608: + { fsmRun->matchedToken = 106; + goto out; +} + goto st398; +st398: + {fsmRun->act = 0;} +case 398: + if ( ++fsmRun->p == fsmRun->pe ) + goto out398; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 10: goto tr603; + case 34: goto tr604; + case 91: goto tr605; + case 92: goto st8; + case 93: goto tr607; + } + goto tr13; +st8: +case 8: + if ( ++fsmRun->p == fsmRun->pe ) + goto out8; + goto tr13; +tr13: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 198;} + goto st399; +st399: +case 399: + if ( ++fsmRun->p == fsmRun->pe ) + goto out399; + switch( (*fsmRun->p) ) { + case 10: goto tr608; + case 34: goto tr608; + case 92: goto st8; + } + if ( 91 <= (*fsmRun->p) && (*fsmRun->p) <= 93 ) + goto tr608; + goto tr13; +tr609: + { fsmRun->p += 1; + fsmRun->matchedToken = 146; + goto out; +} + goto st400; +st400: +case 400: + if ( ++fsmRun->p == fsmRun->pe ) + goto out400; + {fsmRun->tokstart = fsmRun->p;} + goto tr609; +tr16: + { fsmRun->toklen = fsmRun->tokend; + switch( fsmRun->act ) { + case 0: goto st0; + case 203: + fsmRun->matchedToken = 109; + break; + } + goto skip_toklen; +} + goto st401; +tr610: + { fsmRun->p += 1; + fsmRun->matchedToken = 108; + goto out; +} + goto st401; +tr611: + { fsmRun->p += 1; + fsmRun->matchedToken = 107; + goto out; +} + goto st401; +tr613: + { fsmRun->matchedToken = 109; + goto out; +} + goto st401; +st401: + {fsmRun->act = 0;} +case 401: + if ( ++fsmRun->p == fsmRun->pe ) + goto out401; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 10: goto tr610; + case 39: goto tr611; + case 92: goto st9; + } + goto tr15; +st9: +case 9: + if ( ++fsmRun->p == fsmRun->pe ) + goto out9; + goto tr15; +tr15: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 203;} + goto st402; +st402: +case 402: + if ( ++fsmRun->p == fsmRun->pe ) + goto out402; + switch( (*fsmRun->p) ) { + case 10: goto tr613; + case 39: goto tr613; + case 92: goto st9; + } + goto tr15; +tr18: + { fsmRun->toklen = fsmRun->tokend; + switch( fsmRun->act ) { + case 0: goto st0; + case 204: + fsmRun->matchedToken = 109; + break; + } + goto skip_toklen; +} + goto st403; +tr614: + { fsmRun->p += 1; + fsmRun->matchedToken = 108; + goto out; +} + goto st403; +tr615: + { fsmRun->p += 1; + fsmRun->matchedToken = 107; + goto out; +} + goto st403; +tr617: + { fsmRun->matchedToken = 109; + goto out; +} + goto st403; +st403: + {fsmRun->act = 0;} +case 403: + if ( ++fsmRun->p == fsmRun->pe ) + goto out403; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 10: goto tr614; + case 39: goto tr615; + case 92: goto st10; + } + goto tr17; +st10: +case 10: + if ( ++fsmRun->p == fsmRun->pe ) + goto out10; + goto tr17; +tr17: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + {fsmRun->act = 204;} + goto st404; +st404: +case 404: + if ( ++fsmRun->p == fsmRun->pe ) + goto out404; + switch( (*fsmRun->p) ) { + case 10: goto tr617; + case 39: goto tr617; + case 92: goto st10; + } + goto tr17; +tr618: + { fsmRun->p += 1; + fsmRun->matchedToken = 147; + goto out; +} + goto st405; +st405: +case 405: + if ( ++fsmRun->p == fsmRun->pe ) + goto out405; + {fsmRun->tokstart = fsmRun->p;} + goto tr618; +tr620: + { fsmRun->p += 1; + fsmRun->matchedToken = 110; + goto out; +} + goto st406; +tr621: + { fsmRun->matchedToken = 111; + goto out; +} + goto st406; +st406: +case 406: + if ( ++fsmRun->p == fsmRun->pe ) + goto out406; + {fsmRun->tokstart = fsmRun->p;} + if ( (*fsmRun->p) == 10 ) + goto tr620; + goto st407; +st407: +case 407: + if ( ++fsmRun->p == fsmRun->pe ) + goto out407; + if ( (*fsmRun->p) == 10 ) + goto tr621; + goto st407; +tr623: + { fsmRun->p += 1; + fsmRun->matchedToken = 110; + goto out; +} + goto st408; +tr624: + { fsmRun->matchedToken = 111; + goto out; +} + goto st408; +st408: +case 408: + if ( ++fsmRun->p == fsmRun->pe ) + goto out408; + {fsmRun->tokstart = fsmRun->p;} + if ( (*fsmRun->p) == 10 ) + goto tr623; + goto st409; +st409: +case 409: + if ( ++fsmRun->p == fsmRun->pe ) + goto out409; + if ( (*fsmRun->p) == 10 ) + goto tr624; + goto st409; +tr625: + { fsmRun->p += 1; + fsmRun->matchedToken = 148; + goto out; +} + goto st410; +st410: +case 410: + if ( ++fsmRun->p == fsmRun->pe ) + goto out410; + {fsmRun->tokstart = fsmRun->p;} + goto tr625; +tr23: + { fsmRun->p += 1; + fsmRun->matchedToken = 136; + goto out; +} + goto st411; +tr26: + { fsmRun->toklen = fsmRun->tokend; + fsmRun->matchedToken = 113; + goto skip_toklen; +} + goto st411; +tr29: + { fsmRun->p += 1; + fsmRun->matchedToken = 134; + goto out; +} + goto st411; +tr627: + { fsmRun->p += 1; + fsmRun->matchedToken = 118; + goto out; +} + goto st411; +tr628: + { fsmRun->p += 1; + fsmRun->matchedToken = 120; + goto out; +} + goto st411; +tr629: + { fsmRun->p += 1; + fsmRun->matchedToken = 121; + goto out; +} + goto st411; +tr631: + { fsmRun->p += 1; + fsmRun->matchedToken = 125; + goto out; +} + goto st411; +tr634: + { fsmRun->p += 1; + fsmRun->matchedToken = 130; + goto out; +} + goto st411; +tr639: + { fsmRun->p += 1; + fsmRun->matchedToken = 124; + goto out; +} + goto st411; +tr642: + { fsmRun->p += 1; + fsmRun->matchedToken = 126; + goto out; +} + goto st411; +tr643: + { fsmRun->p += 1; + fsmRun->matchedToken = 117; + goto out; +} + goto st411; +tr644: + { fsmRun->matchedToken = 135; + goto out; +} + goto st411; +tr645: + { fsmRun->matchedToken = 115; + goto out; +} + goto st411; +tr646: + { fsmRun->p += 1; + fsmRun->matchedToken = 115; + goto out; +} + goto st411; +tr647: + { fsmRun->matchedToken = 122; + goto out; +} + goto st411; +tr648: + { fsmRun->p += 1; + fsmRun->matchedToken = 123; + goto out; +} + goto st411; +tr649: + { fsmRun->matchedToken = 119; + goto out; +} + goto st411; +tr650: + { fsmRun->p += 1; + fsmRun->matchedToken = 131; + goto out; +} + goto st411; +tr651: + { fsmRun->matchedToken = 116; + goto out; +} + goto st411; +tr652: + { fsmRun->p += 1; + fsmRun->matchedToken = 127; + goto out; +} + goto st411; +tr653: + { fsmRun->matchedToken = 113; + goto out; +} + goto st411; +tr655: + { fsmRun->matchedToken = 114; + goto out; +} + goto st411; +tr656: + { fsmRun->matchedToken = 132; + goto out; +} + goto st411; +tr657: + { fsmRun->p += 1; + fsmRun->matchedToken = 133; + goto out; +} + goto st411; +tr658: + { fsmRun->matchedToken = 112; + goto out; +} + goto st411; +tr659: + { fsmRun->matchedToken = 128; + goto out; +} + goto st411; +tr660: + { fsmRun->p += 1; + fsmRun->matchedToken = 129; + goto out; +} + goto st411; +st411: +case 411: + if ( ++fsmRun->p == fsmRun->pe ) + goto out411; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 32: goto st412; + case 34: goto st11; + case 35: goto st13; + case 38: goto tr627; + case 39: goto st14; + case 40: goto tr628; + case 41: goto tr629; + case 42: goto st414; + case 43: goto tr631; + case 45: goto st415; + case 46: goto st416; + case 47: goto tr634; + case 48: goto tr635; + case 58: goto st17; + case 60: goto st18; + case 63: goto tr639; + case 91: goto st422; + case 94: goto tr642; + case 95: goto st421; + case 124: goto tr643; + } + if ( (*fsmRun->p) < 49 ) { + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 ) + goto st412; + } else if ( (*fsmRun->p) > 57 ) { + if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto st421; + } else if ( (*fsmRun->p) >= 65 ) + goto st421; + } else + goto st418; + goto st0; +st412: +case 412: + if ( ++fsmRun->p == fsmRun->pe ) + goto out412; + if ( (*fsmRun->p) == 32 ) + goto st412; + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 ) + goto st412; + goto tr644; +st11: +case 11: + if ( ++fsmRun->p == fsmRun->pe ) + goto out11; + switch( (*fsmRun->p) ) { + case 34: goto st413; + case 92: goto st12; + } + goto st11; +st413: +case 413: + if ( ++fsmRun->p == fsmRun->pe ) + goto out413; + if ( (*fsmRun->p) == 105 ) + goto tr646; + goto tr645; +st12: +case 12: + if ( ++fsmRun->p == fsmRun->pe ) + goto out12; + goto st11; +st13: +case 13: + if ( ++fsmRun->p == fsmRun->pe ) + goto out13; + if ( (*fsmRun->p) == 10 ) + goto tr23; + goto st13; +st14: +case 14: + if ( ++fsmRun->p == fsmRun->pe ) + goto out14; + switch( (*fsmRun->p) ) { + case 39: goto st413; + case 92: goto st15; + } + goto st14; +st15: +case 15: + if ( ++fsmRun->p == fsmRun->pe ) + goto out15; + goto st14; +st414: +case 414: + if ( ++fsmRun->p == fsmRun->pe ) + goto out414; + if ( (*fsmRun->p) == 42 ) + goto tr648; + goto tr647; +st415: +case 415: + if ( ++fsmRun->p == fsmRun->pe ) + goto out415; + if ( (*fsmRun->p) == 45 ) + goto tr650; + goto tr649; +st416: +case 416: + if ( ++fsmRun->p == fsmRun->pe ) + goto out416; + if ( (*fsmRun->p) == 46 ) + goto tr652; + goto tr651; +tr635: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + goto st417; +st417: +case 417: + if ( ++fsmRun->p == fsmRun->pe ) + goto out417; + if ( (*fsmRun->p) == 120 ) + goto st16; + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st418; + goto tr653; +st16: +case 16: + if ( ++fsmRun->p == fsmRun->pe ) + goto out16; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st419; + } else if ( (*fsmRun->p) > 70 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 102 ) + goto st419; + } else + goto st419; + goto tr26; +st419: +case 419: + if ( ++fsmRun->p == fsmRun->pe ) + goto out419; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st419; + } else if ( (*fsmRun->p) > 70 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 102 ) + goto st419; + } else + goto st419; + goto tr655; +st418: +case 418: + if ( ++fsmRun->p == fsmRun->pe ) + goto out418; + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st418; + goto tr653; +st17: +case 17: + if ( ++fsmRun->p == fsmRun->pe ) + goto out17; + if ( (*fsmRun->p) == 62 ) + goto st420; + goto st0; +st420: +case 420: + if ( ++fsmRun->p == fsmRun->pe ) + goto out420; + if ( (*fsmRun->p) == 62 ) + goto tr657; + goto tr656; +st18: +case 18: + if ( ++fsmRun->p == fsmRun->pe ) + goto out18; + if ( (*fsmRun->p) == 58 ) + goto tr29; + goto st0; +st422: +case 422: + if ( ++fsmRun->p == fsmRun->pe ) + goto out422; + if ( (*fsmRun->p) == 94 ) + goto tr660; + goto tr659; +st421: +case 421: + if ( ++fsmRun->p == fsmRun->pe ) + goto out421; + if ( (*fsmRun->p) == 95 ) + goto st421; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st421; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto st421; + } else + goto st421; + goto tr658; +tr35: + { fsmRun->toklen = fsmRun->tokend; + fsmRun->matchedToken = 113; + goto skip_toklen; +} + goto st423; +tr38: + { fsmRun->p += 1; + fsmRun->matchedToken = 134; + goto out; +} + goto st423; +tr661: + { fsmRun->p += 1; + fsmRun->matchedToken = 118; + goto out; +} + goto st423; +tr662: + { fsmRun->p += 1; + fsmRun->matchedToken = 120; + goto out; +} + goto st423; +tr663: + { fsmRun->p += 1; + fsmRun->matchedToken = 121; + goto out; +} + goto st423; +tr665: + { fsmRun->p += 1; + fsmRun->matchedToken = 125; + goto out; +} + goto st423; +tr668: + { fsmRun->p += 1; + fsmRun->matchedToken = 130; + goto out; +} + goto st423; +tr673: + { fsmRun->p += 1; + fsmRun->matchedToken = 124; + goto out; +} + goto st423; +tr676: + { fsmRun->p += 1; + fsmRun->matchedToken = 126; + goto out; +} + goto st423; +tr677: + { fsmRun->p += 1; + fsmRun->matchedToken = 117; + goto out; +} + goto st423; +tr678: + { fsmRun->matchedToken = 115; + goto out; +} + goto st423; +tr679: + { fsmRun->p += 1; + fsmRun->matchedToken = 115; + goto out; +} + goto st423; +tr680: + { fsmRun->matchedToken = 122; + goto out; +} + goto st423; +tr681: + { fsmRun->p += 1; + fsmRun->matchedToken = 123; + goto out; +} + goto st423; +tr682: + { fsmRun->matchedToken = 119; + goto out; +} + goto st423; +tr683: + { fsmRun->p += 1; + fsmRun->matchedToken = 131; + goto out; +} + goto st423; +tr684: + { fsmRun->matchedToken = 116; + goto out; +} + goto st423; +tr685: + { fsmRun->p += 1; + fsmRun->matchedToken = 127; + goto out; +} + goto st423; +tr686: + { fsmRun->matchedToken = 113; + goto out; +} + goto st423; +tr688: + { fsmRun->matchedToken = 114; + goto out; +} + goto st423; +tr689: + { fsmRun->matchedToken = 132; + goto out; +} + goto st423; +tr690: + { fsmRun->p += 1; + fsmRun->matchedToken = 133; + goto out; +} + goto st423; +tr691: + { fsmRun->matchedToken = 112; + goto out; +} + goto st423; +tr692: + { fsmRun->matchedToken = 128; + goto out; +} + goto st423; +tr693: + { fsmRun->p += 1; + fsmRun->matchedToken = 129; + goto out; +} + goto st423; +st423: +case 423: + if ( ++fsmRun->p == fsmRun->pe ) + goto out423; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 34: goto st19; + case 38: goto tr661; + case 39: goto st21; + case 40: goto tr662; + case 41: goto tr663; + case 42: goto st425; + case 43: goto tr665; + case 45: goto st426; + case 46: goto st427; + case 47: goto tr668; + case 48: goto tr669; + case 58: goto st24; + case 60: goto st25; + case 63: goto tr673; + case 91: goto st433; + case 94: goto tr676; + case 95: goto st432; + case 124: goto tr677; + } + if ( (*fsmRun->p) < 65 ) { + if ( 49 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st429; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto st432; + } else + goto st432; + goto st0; +st19: +case 19: + if ( ++fsmRun->p == fsmRun->pe ) + goto out19; + switch( (*fsmRun->p) ) { + case 34: goto st424; + case 92: goto st20; + } + goto st19; +st424: +case 424: + if ( ++fsmRun->p == fsmRun->pe ) + goto out424; + if ( (*fsmRun->p) == 105 ) + goto tr679; + goto tr678; +st20: +case 20: + if ( ++fsmRun->p == fsmRun->pe ) + goto out20; + goto st19; +st21: +case 21: + if ( ++fsmRun->p == fsmRun->pe ) + goto out21; + switch( (*fsmRun->p) ) { + case 39: goto st424; + case 92: goto st22; + } + goto st21; +st22: +case 22: + if ( ++fsmRun->p == fsmRun->pe ) + goto out22; + goto st21; +st425: +case 425: + if ( ++fsmRun->p == fsmRun->pe ) + goto out425; + if ( (*fsmRun->p) == 42 ) + goto tr681; + goto tr680; +st426: +case 426: + if ( ++fsmRun->p == fsmRun->pe ) + goto out426; + if ( (*fsmRun->p) == 45 ) + goto tr683; + goto tr682; +st427: +case 427: + if ( ++fsmRun->p == fsmRun->pe ) + goto out427; + if ( (*fsmRun->p) == 46 ) + goto tr685; + goto tr684; +tr669: + {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }} + goto st428; +st428: +case 428: + if ( ++fsmRun->p == fsmRun->pe ) + goto out428; + if ( (*fsmRun->p) == 120 ) + goto st23; + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st429; + goto tr686; +st23: +case 23: + if ( ++fsmRun->p == fsmRun->pe ) + goto out23; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st430; + } else if ( (*fsmRun->p) > 70 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 102 ) + goto st430; + } else + goto st430; + goto tr35; +st430: +case 430: + if ( ++fsmRun->p == fsmRun->pe ) + goto out430; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st430; + } else if ( (*fsmRun->p) > 70 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 102 ) + goto st430; + } else + goto st430; + goto tr688; +st429: +case 429: + if ( ++fsmRun->p == fsmRun->pe ) + goto out429; + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st429; + goto tr686; +st24: +case 24: + if ( ++fsmRun->p == fsmRun->pe ) + goto out24; + if ( (*fsmRun->p) == 62 ) + goto st431; + goto st0; +st431: +case 431: + if ( ++fsmRun->p == fsmRun->pe ) + goto out431; + if ( (*fsmRun->p) == 62 ) + goto tr690; + goto tr689; +st25: +case 25: + if ( ++fsmRun->p == fsmRun->pe ) + goto out25; + if ( (*fsmRun->p) == 58 ) + goto tr38; + goto st0; +st433: +case 433: + if ( ++fsmRun->p == fsmRun->pe ) + goto out433; + if ( (*fsmRun->p) == 94 ) + goto tr693; + goto tr692; +st432: +case 432: + if ( ++fsmRun->p == fsmRun->pe ) + goto out432; + if ( (*fsmRun->p) == 95 ) + goto st432; + if ( (*fsmRun->p) < 65 ) { + if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 ) + goto st432; + } else if ( (*fsmRun->p) > 90 ) { + if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 ) + goto st432; + } else + goto st432; + goto tr691; +tr40: + { fsmRun->p += 1; + fsmRun->matchedToken = 136; + goto out; +} + goto st434; +tr695: + { fsmRun->matchedToken = 135; + goto out; +} + goto st434; +st434: +case 434: + if ( ++fsmRun->p == fsmRun->pe ) + goto out434; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 32: goto st435; + case 35: goto st26; + } + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 ) + goto st435; + goto st0; +st435: +case 435: + if ( ++fsmRun->p == fsmRun->pe ) + goto out435; + if ( (*fsmRun->p) == 32 ) + goto st435; + if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 ) + goto st435; + goto tr695; +st26: +case 26: + if ( ++fsmRun->p == fsmRun->pe ) + goto out26; + if ( (*fsmRun->p) == 10 ) + goto tr40; + goto st26; +tr41: + { fsmRun->p += 1; + fsmRun->matchedToken = 138; + goto out; +} + goto st436; +tr696: + { fsmRun->p += 1; + fsmRun->matchedToken = 137; + goto out; +} + goto st436; +tr698: + { fsmRun->p += 1; + fsmRun->matchedToken = 139; + goto out; +} + goto st436; +st436: +case 436: + if ( ++fsmRun->p == fsmRun->pe ) + goto out436; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 45: goto tr696; + case 92: goto st27; + case 93: goto tr698; + } + goto tr41; +st27: +case 27: + if ( ++fsmRun->p == fsmRun->pe ) + goto out27; + goto tr41; +tr42: + { fsmRun->p += 1; + fsmRun->matchedToken = 138; + goto out; +} + goto st437; +tr699: + { fsmRun->p += 1; + fsmRun->matchedToken = 137; + goto out; +} + goto st437; +tr701: + { fsmRun->p += 1; + fsmRun->matchedToken = 139; + goto out; +} + goto st437; +st437: +case 437: + if ( ++fsmRun->p == fsmRun->pe ) + goto out437; + {fsmRun->tokstart = fsmRun->p;} + switch( (*fsmRun->p) ) { + case 45: goto tr699; + case 92: goto st28; + case 93: goto tr701; + } + goto tr42; +st28: +case 28: + if ( ++fsmRun->p == fsmRun->pe ) + goto out28; + goto tr42; +tr702: + { fsmRun->p += 1; + fsmRun->matchedToken = 149; + goto out; +} + goto st438; +st438: +case 438: + if ( ++fsmRun->p == fsmRun->pe ) + goto out438; + {fsmRun->tokstart = fsmRun->p;} + goto tr702; + } +out_switch: + switch ( fsmRun->cs ) + { + case 29: out29: fsmRun->cs = 29; goto out; + case 30: out30: if ( fsmRun->eof ) {goto tr91; +}fsmRun->cs = 30; goto out; + case 31: out31: if ( fsmRun->eof ) {goto tr92; +}fsmRun->cs = 31; goto out; + case 1: out1: fsmRun->cs = 1; goto out; + case 2: out2: fsmRun->cs = 2; goto out; + case 0: out0: fsmRun->cs = 0; goto out; + case 32: out32: if ( fsmRun->eof ) {goto tr94; +}fsmRun->cs = 32; goto out; + case 34: out34: if ( fsmRun->eof ) {goto tr97; +}fsmRun->cs = 34; goto out; + case 35: out35: if ( fsmRun->eof ) {goto tr99; +}fsmRun->cs = 35; goto out; + case 36: out36: if ( fsmRun->eof ) {goto tr101; +}fsmRun->cs = 36; goto out; + case 37: out37: if ( fsmRun->eof ) {goto tr103; +}fsmRun->cs = 37; goto out; + case 3: out3: fsmRun->cs = 3; goto out; + case 39: out39: if ( fsmRun->eof ) {goto tr106; +}fsmRun->cs = 39; goto out; + case 40: out40: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 40; goto out; + case 38: out38: if ( fsmRun->eof ) {goto tr105; +}fsmRun->cs = 38; goto out; + case 41: out41: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 41; goto out; + case 42: out42: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 42; goto out; + case 43: out43: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 43; goto out; + case 44: out44: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 44; goto out; + case 45: out45: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 45; goto out; + case 46: out46: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 46; goto out; + case 47: out47: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 47; goto out; + case 48: out48: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 48; goto out; + case 49: out49: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 49; goto out; + case 50: out50: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 50; goto out; + case 51: out51: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 51; goto out; + case 52: out52: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 52; goto out; + case 53: out53: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 53; goto out; + case 54: out54: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 54; goto out; + case 55: out55: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 55; goto out; + case 56: out56: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 56; goto out; + case 57: out57: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 57; goto out; + case 58: out58: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 58; goto out; + case 59: out59: if ( fsmRun->eof ) {goto tr131; +}fsmRun->cs = 59; goto out; + case 60: out60: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 60; goto out; + case 61: out61: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 61; goto out; + case 62: out62: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 62; goto out; + case 63: out63: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 63; goto out; + case 64: out64: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 64; goto out; + case 65: out65: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 65; goto out; + case 66: out66: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 66; goto out; + case 67: out67: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 67; goto out; + case 68: out68: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 68; goto out; + case 69: out69: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 69; goto out; + case 70: out70: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 70; goto out; + case 71: out71: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 71; goto out; + case 72: out72: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 72; goto out; + case 73: out73: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 73; goto out; + case 74: out74: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 74; goto out; + case 75: out75: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 75; goto out; + case 76: out76: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 76; goto out; + case 77: out77: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 77; goto out; + case 78: out78: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 78; goto out; + case 79: out79: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 79; goto out; + case 80: out80: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 80; goto out; + case 81: out81: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 81; goto out; + case 82: out82: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 82; goto out; + case 83: out83: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 83; goto out; + case 84: out84: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 84; goto out; + case 85: out85: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 85; goto out; + case 86: out86: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 86; goto out; + case 87: out87: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 87; goto out; + case 88: out88: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 88; goto out; + case 89: out89: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 89; goto out; + case 90: out90: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 90; goto out; + case 91: out91: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 91; goto out; + case 92: out92: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 92; goto out; + case 93: out93: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 93; goto out; + case 94: out94: if ( fsmRun->eof ) {goto tr175; +}fsmRun->cs = 94; goto out; + case 95: out95: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 95; goto out; + case 96: out96: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 96; goto out; + case 97: out97: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 97; goto out; + case 98: out98: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 98; goto out; + case 99: out99: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 99; goto out; + case 100: out100: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 100; goto out; + case 101: out101: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 101; goto out; + case 102: out102: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 102; goto out; + case 103: out103: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 103; goto out; + case 104: out104: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 104; goto out; + case 105: out105: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 105; goto out; + case 106: out106: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 106; goto out; + case 107: out107: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 107; goto out; + case 108: out108: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 108; goto out; + case 109: out109: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 109; goto out; + case 110: out110: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 110; goto out; + case 111: out111: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 111; goto out; + case 112: out112: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 112; goto out; + case 113: out113: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 113; goto out; + case 114: out114: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 114; goto out; + case 115: out115: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 115; goto out; + case 116: out116: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 116; goto out; + case 117: out117: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 117; goto out; + case 118: out118: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 118; goto out; + case 119: out119: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 119; goto out; + case 120: out120: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 120; goto out; + case 121: out121: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 121; goto out; + case 122: out122: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 122; goto out; + case 123: out123: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 123; goto out; + case 124: out124: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 124; goto out; + case 125: out125: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 125; goto out; + case 126: out126: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 126; goto out; + case 127: out127: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 127; goto out; + case 128: out128: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 128; goto out; + case 129: out129: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 129; goto out; + case 130: out130: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 130; goto out; + case 131: out131: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 131; goto out; + case 132: out132: if ( fsmRun->eof ) {goto tr223; +}fsmRun->cs = 132; goto out; + case 133: out133: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 133; goto out; + case 134: out134: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 134; goto out; + case 135: out135: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 135; goto out; + case 136: out136: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 136; goto out; + case 137: out137: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 137; goto out; + case 138: out138: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 138; goto out; + case 139: out139: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 139; goto out; + case 140: out140: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 140; goto out; + case 141: out141: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 141; goto out; + case 142: out142: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 142; goto out; + case 143: out143: if ( fsmRun->eof ) {goto tr237; +}fsmRun->cs = 143; goto out; + case 144: out144: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 144; goto out; + case 145: out145: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 145; goto out; + case 146: out146: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 146; goto out; + case 147: out147: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 147; goto out; + case 148: out148: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 148; goto out; + case 149: out149: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 149; goto out; + case 150: out150: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 150; goto out; + case 151: out151: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 151; goto out; + case 152: out152: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 152; goto out; + case 153: out153: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 153; goto out; + case 154: out154: if ( fsmRun->eof ) {goto tr250; +}fsmRun->cs = 154; goto out; + case 155: out155: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 155; goto out; + case 156: out156: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 156; goto out; + case 157: out157: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 157; goto out; + case 158: out158: if ( fsmRun->eof ) {goto tr256; +}fsmRun->cs = 158; goto out; + case 159: out159: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 159; goto out; + case 160: out160: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 160; goto out; + case 161: out161: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 161; goto out; + case 162: out162: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 162; goto out; + case 163: out163: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 163; goto out; + case 164: out164: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 164; goto out; + case 165: out165: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 165; goto out; + case 166: out166: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 166; goto out; + case 167: out167: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 167; goto out; + case 168: out168: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 168; goto out; + case 169: out169: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 169; goto out; + case 170: out170: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 170; goto out; + case 171: out171: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 171; goto out; + case 172: out172: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 172; goto out; + case 173: out173: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 173; goto out; + case 174: out174: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 174; goto out; + case 175: out175: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 175; goto out; + case 176: out176: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 176; goto out; + case 177: out177: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 177; goto out; + case 178: out178: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 178; goto out; + case 179: out179: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 179; goto out; + case 180: out180: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 180; goto out; + case 181: out181: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 181; goto out; + case 182: out182: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 182; goto out; + case 183: out183: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 183; goto out; + case 184: out184: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 184; goto out; + case 185: out185: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 185; goto out; + case 186: out186: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 186; goto out; + case 187: out187: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 187; goto out; + case 188: out188: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 188; goto out; + case 189: out189: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 189; goto out; + case 190: out190: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 190; goto out; + case 191: out191: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 191; goto out; + case 192: out192: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 192; goto out; + case 193: out193: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 193; goto out; + case 194: out194: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 194; goto out; + case 195: out195: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 195; goto out; + case 196: out196: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 196; goto out; + case 197: out197: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 197; goto out; + case 198: out198: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 198; goto out; + case 199: out199: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 199; goto out; + case 200: out200: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 200; goto out; + case 201: out201: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 201; goto out; + case 202: out202: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 202; goto out; + case 203: out203: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 203; goto out; + case 204: out204: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 204; goto out; + case 205: out205: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 205; goto out; + case 206: out206: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 206; goto out; + case 207: out207: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 207; goto out; + case 208: out208: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 208; goto out; + case 209: out209: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 209; goto out; + case 210: out210: if ( fsmRun->eof ) {goto tr107; +}fsmRun->cs = 210; goto out; + case 211: out211: if ( fsmRun->eof ) {goto tr318; +}fsmRun->cs = 211; goto out; + case 33: out33: if ( fsmRun->eof ) {goto tr96; +}fsmRun->cs = 33; goto out; + case 212: out212: fsmRun->cs = 212; goto out; + case 213: out213: if ( fsmRun->eof ) {goto tr367; +}fsmRun->cs = 213; goto out; + case 4: out4: fsmRun->cs = 4; goto out; + case 214: out214: if ( fsmRun->eof ) {goto tr369; +}fsmRun->cs = 214; goto out; + case 216: out216: if ( fsmRun->eof ) {goto tr372; +}fsmRun->cs = 216; goto out; + case 217: out217: if ( fsmRun->eof ) {goto tr374; +}fsmRun->cs = 217; goto out; + case 218: out218: if ( fsmRun->eof ) {goto tr376; +}fsmRun->cs = 218; goto out; + case 219: out219: if ( fsmRun->eof ) {goto tr378; +}fsmRun->cs = 219; goto out; + case 5: out5: fsmRun->cs = 5; goto out; + case 221: out221: if ( fsmRun->eof ) {goto tr381; +}fsmRun->cs = 221; goto out; + case 222: out222: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 222; goto out; + case 220: out220: if ( fsmRun->eof ) {goto tr380; +}fsmRun->cs = 220; goto out; + case 223: out223: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 223; goto out; + case 224: out224: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 224; goto out; + case 225: out225: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 225; goto out; + case 226: out226: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 226; goto out; + case 227: out227: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 227; goto out; + case 228: out228: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 228; goto out; + case 229: out229: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 229; goto out; + case 230: out230: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 230; goto out; + case 231: out231: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 231; goto out; + case 232: out232: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 232; goto out; + case 233: out233: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 233; goto out; + case 234: out234: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 234; goto out; + case 235: out235: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 235; goto out; + case 236: out236: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 236; goto out; + case 237: out237: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 237; goto out; + case 238: out238: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 238; goto out; + case 239: out239: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 239; goto out; + case 240: out240: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 240; goto out; + case 241: out241: if ( fsmRun->eof ) {goto tr406; +}fsmRun->cs = 241; goto out; + case 242: out242: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 242; goto out; + case 243: out243: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 243; goto out; + case 244: out244: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 244; goto out; + case 245: out245: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 245; goto out; + case 246: out246: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 246; goto out; + case 247: out247: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 247; goto out; + case 248: out248: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 248; goto out; + case 249: out249: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 249; goto out; + case 250: out250: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 250; goto out; + case 251: out251: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 251; goto out; + case 252: out252: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 252; goto out; + case 253: out253: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 253; goto out; + case 254: out254: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 254; goto out; + case 255: out255: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 255; goto out; + case 256: out256: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 256; goto out; + case 257: out257: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 257; goto out; + case 258: out258: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 258; goto out; + case 259: out259: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 259; goto out; + case 260: out260: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 260; goto out; + case 261: out261: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 261; goto out; + case 262: out262: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 262; goto out; + case 263: out263: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 263; goto out; + case 264: out264: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 264; goto out; + case 265: out265: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 265; goto out; + case 266: out266: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 266; goto out; + case 267: out267: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 267; goto out; + case 268: out268: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 268; goto out; + case 269: out269: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 269; goto out; + case 270: out270: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 270; goto out; + case 271: out271: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 271; goto out; + case 272: out272: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 272; goto out; + case 273: out273: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 273; goto out; + case 274: out274: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 274; goto out; + case 275: out275: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 275; goto out; + case 276: out276: if ( fsmRun->eof ) {goto tr450; +}fsmRun->cs = 276; goto out; + case 277: out277: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 277; goto out; + case 278: out278: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 278; goto out; + case 279: out279: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 279; goto out; + case 280: out280: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 280; goto out; + case 281: out281: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 281; goto out; + case 282: out282: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 282; goto out; + case 283: out283: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 283; goto out; + case 284: out284: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 284; goto out; + case 285: out285: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 285; goto out; + case 286: out286: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 286; goto out; + case 287: out287: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 287; goto out; + case 288: out288: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 288; goto out; + case 289: out289: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 289; goto out; + case 290: out290: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 290; goto out; + case 291: out291: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 291; goto out; + case 292: out292: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 292; goto out; + case 293: out293: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 293; goto out; + case 294: out294: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 294; goto out; + case 295: out295: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 295; goto out; + case 296: out296: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 296; goto out; + case 297: out297: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 297; goto out; + case 298: out298: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 298; goto out; + case 299: out299: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 299; goto out; + case 300: out300: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 300; goto out; + case 301: out301: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 301; goto out; + case 302: out302: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 302; goto out; + case 303: out303: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 303; goto out; + case 304: out304: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 304; goto out; + case 305: out305: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 305; goto out; + case 306: out306: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 306; goto out; + case 307: out307: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 307; goto out; + case 308: out308: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 308; goto out; + case 309: out309: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 309; goto out; + case 310: out310: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 310; goto out; + case 311: out311: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 311; goto out; + case 312: out312: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 312; goto out; + case 313: out313: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 313; goto out; + case 314: out314: if ( fsmRun->eof ) {goto tr498; +}fsmRun->cs = 314; goto out; + case 315: out315: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 315; goto out; + case 316: out316: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 316; goto out; + case 317: out317: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 317; goto out; + case 318: out318: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 318; goto out; + case 319: out319: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 319; goto out; + case 320: out320: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 320; goto out; + case 321: out321: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 321; goto out; + case 322: out322: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 322; goto out; + case 323: out323: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 323; goto out; + case 324: out324: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 324; goto out; + case 325: out325: if ( fsmRun->eof ) {goto tr512; +}fsmRun->cs = 325; goto out; + case 326: out326: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 326; goto out; + case 327: out327: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 327; goto out; + case 328: out328: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 328; goto out; + case 329: out329: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 329; goto out; + case 330: out330: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 330; goto out; + case 331: out331: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 331; goto out; + case 332: out332: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 332; goto out; + case 333: out333: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 333; goto out; + case 334: out334: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 334; goto out; + case 335: out335: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 335; goto out; + case 336: out336: if ( fsmRun->eof ) {goto tr525; +}fsmRun->cs = 336; goto out; + case 337: out337: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 337; goto out; + case 338: out338: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 338; goto out; + case 339: out339: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 339; goto out; + case 340: out340: if ( fsmRun->eof ) {goto tr531; +}fsmRun->cs = 340; goto out; + case 341: out341: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 341; goto out; + case 342: out342: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 342; goto out; + case 343: out343: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 343; goto out; + case 344: out344: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 344; goto out; + case 345: out345: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 345; goto out; + case 346: out346: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 346; goto out; + case 347: out347: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 347; goto out; + case 348: out348: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 348; goto out; + case 349: out349: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 349; goto out; + case 350: out350: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 350; goto out; + case 351: out351: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 351; goto out; + case 352: out352: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 352; goto out; + case 353: out353: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 353; goto out; + case 354: out354: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 354; goto out; + case 355: out355: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 355; goto out; + case 356: out356: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 356; goto out; + case 357: out357: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 357; goto out; + case 358: out358: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 358; goto out; + case 359: out359: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 359; goto out; + case 360: out360: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 360; goto out; + case 361: out361: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 361; goto out; + case 362: out362: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 362; goto out; + case 363: out363: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 363; goto out; + case 364: out364: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 364; goto out; + case 365: out365: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 365; goto out; + case 366: out366: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 366; goto out; + case 367: out367: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 367; goto out; + case 368: out368: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 368; goto out; + case 369: out369: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 369; goto out; + case 370: out370: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 370; goto out; + case 371: out371: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 371; goto out; + case 372: out372: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 372; goto out; + case 373: out373: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 373; goto out; + case 374: out374: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 374; goto out; + case 375: out375: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 375; goto out; + case 376: out376: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 376; goto out; + case 377: out377: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 377; goto out; + case 378: out378: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 378; goto out; + case 379: out379: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 379; goto out; + case 380: out380: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 380; goto out; + case 381: out381: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 381; goto out; + case 382: out382: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 382; goto out; + case 383: out383: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 383; goto out; + case 384: out384: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 384; goto out; + case 385: out385: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 385; goto out; + case 386: out386: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 386; goto out; + case 387: out387: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 387; goto out; + case 388: out388: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 388; goto out; + case 389: out389: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 389; goto out; + case 390: out390: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 390; goto out; + case 391: out391: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 391; goto out; + case 392: out392: if ( fsmRun->eof ) {goto tr382; +}fsmRun->cs = 392; goto out; + case 393: out393: if ( fsmRun->eof ) {goto tr593; +}fsmRun->cs = 393; goto out; + case 215: out215: if ( fsmRun->eof ) {goto tr371; +}fsmRun->cs = 215; goto out; + case 394: out394: fsmRun->cs = 394; goto out; + case 395: out395: if ( fsmRun->eof ) {goto tr596; +}fsmRun->cs = 395; goto out; + case 6: out6: fsmRun->cs = 6; goto out; + case 396: out396: fsmRun->cs = 396; goto out; + case 7: out7: if ( fsmRun->eof ) {goto tr12; +}fsmRun->cs = 7; goto out; + case 397: out397: if ( fsmRun->eof ) {goto tr602; +}fsmRun->cs = 397; goto out; + case 398: out398: fsmRun->cs = 398; goto out; + case 8: out8: if ( fsmRun->eof ) {goto tr14; +}fsmRun->cs = 8; goto out; + case 399: out399: if ( fsmRun->eof ) {goto tr608; +}fsmRun->cs = 399; goto out; + case 400: out400: fsmRun->cs = 400; goto out; + case 401: out401: fsmRun->cs = 401; goto out; + case 9: out9: if ( fsmRun->eof ) {goto tr16; +}fsmRun->cs = 9; goto out; + case 402: out402: if ( fsmRun->eof ) {goto tr613; +}fsmRun->cs = 402; goto out; + case 403: out403: fsmRun->cs = 403; goto out; + case 10: out10: if ( fsmRun->eof ) {goto tr18; +}fsmRun->cs = 10; goto out; + case 404: out404: if ( fsmRun->eof ) {goto tr617; +}fsmRun->cs = 404; goto out; + case 405: out405: fsmRun->cs = 405; goto out; + case 406: out406: fsmRun->cs = 406; goto out; + case 407: out407: if ( fsmRun->eof ) {goto tr621; +}fsmRun->cs = 407; goto out; + case 408: out408: fsmRun->cs = 408; goto out; + case 409: out409: if ( fsmRun->eof ) {goto tr624; +}fsmRun->cs = 409; goto out; + case 410: out410: fsmRun->cs = 410; goto out; + case 411: out411: fsmRun->cs = 411; goto out; + case 412: out412: if ( fsmRun->eof ) {goto tr644; +}fsmRun->cs = 412; goto out; + case 11: out11: fsmRun->cs = 11; goto out; + case 413: out413: if ( fsmRun->eof ) {goto tr645; +}fsmRun->cs = 413; goto out; + case 12: out12: fsmRun->cs = 12; goto out; + case 13: out13: fsmRun->cs = 13; goto out; + case 14: out14: fsmRun->cs = 14; goto out; + case 15: out15: fsmRun->cs = 15; goto out; + case 414: out414: if ( fsmRun->eof ) {goto tr647; +}fsmRun->cs = 414; goto out; + case 415: out415: if ( fsmRun->eof ) {goto tr649; +}fsmRun->cs = 415; goto out; + case 416: out416: if ( fsmRun->eof ) {goto tr651; +}fsmRun->cs = 416; goto out; + case 417: out417: if ( fsmRun->eof ) {goto tr653; +}fsmRun->cs = 417; goto out; + case 16: out16: if ( fsmRun->eof ) {goto tr26; +}fsmRun->cs = 16; goto out; + case 419: out419: if ( fsmRun->eof ) {goto tr655; +}fsmRun->cs = 419; goto out; + case 418: out418: if ( fsmRun->eof ) {goto tr653; +}fsmRun->cs = 418; goto out; + case 17: out17: fsmRun->cs = 17; goto out; + case 420: out420: if ( fsmRun->eof ) {goto tr656; +}fsmRun->cs = 420; goto out; + case 18: out18: fsmRun->cs = 18; goto out; + case 422: out422: if ( fsmRun->eof ) {goto tr659; +}fsmRun->cs = 422; goto out; + case 421: out421: if ( fsmRun->eof ) {goto tr658; +}fsmRun->cs = 421; goto out; + case 423: out423: fsmRun->cs = 423; goto out; + case 19: out19: fsmRun->cs = 19; goto out; + case 424: out424: if ( fsmRun->eof ) {goto tr678; +}fsmRun->cs = 424; goto out; + case 20: out20: fsmRun->cs = 20; goto out; + case 21: out21: fsmRun->cs = 21; goto out; + case 22: out22: fsmRun->cs = 22; goto out; + case 425: out425: if ( fsmRun->eof ) {goto tr680; +}fsmRun->cs = 425; goto out; + case 426: out426: if ( fsmRun->eof ) {goto tr682; +}fsmRun->cs = 426; goto out; + case 427: out427: if ( fsmRun->eof ) {goto tr684; +}fsmRun->cs = 427; goto out; + case 428: out428: if ( fsmRun->eof ) {goto tr686; +}fsmRun->cs = 428; goto out; + case 23: out23: if ( fsmRun->eof ) {goto tr35; +}fsmRun->cs = 23; goto out; + case 430: out430: if ( fsmRun->eof ) {goto tr688; +}fsmRun->cs = 430; goto out; + case 429: out429: if ( fsmRun->eof ) {goto tr686; +}fsmRun->cs = 429; goto out; + case 24: out24: fsmRun->cs = 24; goto out; + case 431: out431: if ( fsmRun->eof ) {goto tr689; +}fsmRun->cs = 431; goto out; + case 25: out25: fsmRun->cs = 25; goto out; + case 433: out433: if ( fsmRun->eof ) {goto tr692; +}fsmRun->cs = 433; goto out; + case 432: out432: if ( fsmRun->eof ) {goto tr691; +}fsmRun->cs = 432; goto out; + case 434: out434: fsmRun->cs = 434; goto out; + case 435: out435: if ( fsmRun->eof ) {goto tr695; +}fsmRun->cs = 435; goto out; + case 26: out26: fsmRun->cs = 26; goto out; + case 436: out436: fsmRun->cs = 436; goto out; + case 27: out27: fsmRun->cs = 27; goto out; + case 437: out437: fsmRun->cs = 437; goto out; + case 28: out28: fsmRun->cs = 28; goto out; + case 438: out438: fsmRun->cs = 438; goto out; + } +out: + if ( fsmRun->p != 0 ) + fsmRun->toklen += fsmRun->p - fsmRun->start; +skip_toklen: + {} +} + +static void sendNamedLangEl( Program *prg, Tree **tree, PdaRun *pdaRun, + FsmRun *fsmRun, StreamImpl *inputStream ) { } +static void initBindings( PdaRun *pdaRun ) {} +static void popBinding( PdaRun *pdaRun, ParseTree *tree ) {} + + +static int pid_0_parser_indicies[] = { + 25, 26, 112, 23, 21, 24, 48, 49, + 50, 51, 77, 78, 79, 80, 707, 76, + 28, 34, 35, 38, 36, 708, 116, 115, + 101, 97, 99, 95, 93, 30, 113, 43, + 39, 40, 41, 118, 46, 155, 87, 44, + 42, 129, 88, 85, 84, 86, 22, 27, + 154, 72, 73, 74, 59, 60, 61, 47, + 57, 71, 738, 104, 106, 108, 110, 100, + 96, 98, 94, 92, 140, 130, 75, 935, + 53, 145, 143, 156, 119, 856, 120, 856, + 121, 122, 157, 200, 66, 67, 68, 69, + 194, 149, 148, 150, 147, 195, 139, 856, + 138, 136, 711, 137, 711, 754, 712, 135, + 712, 707, 203, 206, 207, 753, 213, 873, + 165, 257, 267, 280, 278, 309, 872, 315, + 974, 856, 316, 320, 303, 304, 310, 311, + 312, 713, 365, 713, 977, 977, 163, 367, + 935, 977, 977, 163, 368, 182, 183, 0, + 2, 20, 18, 45, 935, 369, 17, 19, + 403, 16, 15, 13, 414, 415, 117, 29, + 12, 416, 10, 4, 151, 152, 153, 418, + 11, 176, 177, 935, 8, 9, 3, 423, + 5, 6, 427, 428, 7, 728, 728, 728, + 728, 728, 318, 429, 319, 14, 711, 711, + 430, 434, 712, 712, 436, 441, 442, 983, + 33, 31, 32, 52, 62, 63, 64, 65, + 933, 70, 83, 91, 934, 55, 307, 308, + 146, 873, 165, 446, 53, 713, 713, 466, + 467, 154, 983, 855, 164, 855, 1000, 1000, + 178, 1001, 1001, 161, 787, 160, 220, 222, + 224, 226, 102, 89, 81, 37, 58, 302, + 488, 179, 90, 977, 496, 711, 873, 165, + 977, 712, 1, 445, 133, 58, 25, 26, + 975, 23, 21, 24, 48, 49, 50, 51, + 77, 78, 79, 80, 266, 76, 28, 34, + 35, 38, 36, 973, 713, 489, 101, 97, + 99, 95, 93, 30, 162, 43, 39, 40, + 41, 298, 46, 738, 87, 44, 42, 742, + 88, 85, 84, 86, 22, 27, 1002, 72, + 73, 74, 59, 60, 61, 47, 57, 71, + 737, 104, 106, 108, 110, 128, 58, 862, + 862, 862, 862, 862, 75, 306, 379, 983, + 501, 127, 58, 231, 233, 235, 237, 347, + 1002, 507, 66, 67, 68, 69, 983, 980, + 983, 1000, 508, 509, 1001, 141, 514, 124, + 334, 58, 517, 516, 202, 797, 522, 728, + 728, 976, 976, 393, 978, 862, 862, 862, + 862, 862, 525, 550, 159, 562, 565, 444, + 737, 443, 990, 923, 923, 923, 568, 923, + 502, 503, 504, 577, 581, 452, 453, 454, + 724, 530, 219, 218, 217, 124, 2, 20, + 18, 45, 158, 455, 17, 19, 975, 16, + 15, 13, 873, 165, 990, 29, 12, 544, + 10, 4, 201, 742, 795, 742, 11, 583, + 533, 531, 8, 9, 3, 589, 5, 6, + 988, 988, 7, 862, 862, 862, 862, 862, + 983, 543, 935, 14, 566, 426, 567, 591, + 53, 1001, 1001, 161, 986, 160, 33, 31, + 32, 52, 62, 63, 64, 65, 592, 70, + 83, 91, 445, 124, 593, 100, 96, 98, + 94, 92, 598, 100, 96, 98, 94, 92, + 976, 205, 605, 100, 96, 98, 94, 92, + 977, 977, 163, 100, 96, 98, 94, 92, + 102, 89, 81, 37, 58, 856, 923, 421, + 796, 862, 862, 856, 123, 230, 229, 228, + 175, 610, 983, 856, 307, 308, 725, 977, + 977, 163, 982, 856, 974, 998, 923, 439, + 613, 77, 78, 79, 80, 615, 76, 982, + 996, 996, 421, 617, 112, 618, 623, 100, + 96, 98, 94, 92, 624, 982, 532, 862, + 862, 725, 125, 988, 923, 87, 983, 998, + 627, 88, 85, 84, 86, 631, 633, 632, + 72, 73, 74, 635, 1001, 346, 625, 1006, + 71, 637, 104, 106, 108, 110, 100, 96, + 98, 94, 92, 969, 969, 75, 588, 994, + 202, 992, 992, 644, 159, 452, 453, 454, + 743, 647, 303, 304, 419, 420, 626, 977, + 336, 982, 451, 455, 649, 650, 856, 861, + 861, 861, 861, 861, 656, 862, 862, 658, + 126, 994, 301, 425, 424, 873, 165, 519, + 58, 307, 308, 435, 659, -1, 977, 518, + 420, -1, 728, 728, 728, 728, 728, 861, + 305, 590, 971, 971, -1, 982, 204, 214, + 90, -1, 982, 996, -1, 215, 90, 100, + 96, 98, 94, 92, 975, 216, 90, -1, + -1, 982, 728, 982, -1, 262, 90, 378, + -1, 0, 2, 20, 18, 45, 307, 308, + 17, 19, -1, 16, 15, 13, 935, 856, + 117, 29, 12, -1, 10, 4, 151, 152, + 153, -1, 11, 176, 177, 345, 8, 9, + 3, 969, 5, 6, 992, -1, 7, 100, + 96, 98, 94, 92, 743, 486, 743, 14, + 171, 82, 90, -1, 997, 997, 391, 726, + 390, -1, 33, 31, 32, 52, 62, 63, + 64, 65, 492, 70, 82, 90, 726, 856, + 487, 856, 146, 856, 864, 864, 864, 864, + -1, 102, 89, 81, 132, 58, 164, 371, + 263, 90, 178, 100, 96, 98, 94, 92, + 971, -1, 970, 970, 102, 89, 81, 37, + 58, 302, -1, 179, 90, -1, 970, 970, + 77, 78, 79, 80, 1, 76, 133, 58, + -1, 861, 861, 856, -1, 500, 100, 96, + 98, 94, 92, 977, 977, 163, 266, 880, + 880, 880, -1, 880, 87, 640, -1, 641, + 88, 85, 84, 86, 728, 728, 162, 72, + 73, 74, -1, 298, 726, 726, 1006, 71, + -1, 104, 106, 108, 110, -1, 440, 303, + 304, 264, 90, 984, 75, 972, 972, 997, + -1, 864, 864, 864, 864, 533, 534, 128, + 58, 452, 453, 454, 371, 307, 308, 306, + 379, -1, 389, 127, 58, -1, 747, 455, + -1, 347, -1, 612, 58, 303, 304, -1, + -1, -1, -1, 303, 304, -1, 758, 141, + 758, -1, 334, 58, -1, -1, 202, 449, + 970, 265, 90, 388, 178, 393, 984, 370, + -1, 873, 165, 450, 970, -1, 159, -1, + -1, 444, -1, 443, -1, 866, -1, 866, + -1, -1, 977, -1, -1, -1, 864, 864, + 864, -1, 880, -1, 219, 218, 217, 880, + 2, 20, 18, 45, 158, -1, 17, 19, + -1, 16, 15, 13, -1, 269, 90, 29, + 12, -1, 10, 4, 201, -1, -1, -1, + 11, -1, 499, 392, 8, 9, 3, -1, + 5, 6, -1, 972, 7, 100, 96, 98, + 94, 92, 880, 532, 524, 14, -1, 172, + 82, 90, 1001, 1001, 161, -1, 160, -1, + 33, 31, 32, 52, 62, 63, 64, 65, + 523, 70, 82, 90, 372, 856, 563, 355, + 356, 357, 354, -1, 977, 977, 163, 361, + 102, 89, 81, 132, 58, 352, 556, 359, + 360, 984, 984, 864, 864, 864, 977, 977, + 163, -1, 102, 89, 81, 37, 58, 307, + 308, 758, 231, 233, 235, 237, 123, 230, + 229, 228, 175, 660, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 660, + 660, 439, 660, 660, 660, 660, 660, 660, + 866, -1, -1, 660, 660, 660, 660, 660, + 660, 866, 660, 660, 660, 660, -1, 660, + 532, 660, 660, 660, 125, 660, 660, 660, + 660, 660, 660, -1, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 1001, 660, 660, + 660, 660, 864, 864, 864, 864, -1, -1, + -1, 660, 856, -1, 856, 371, -1, -1, + 588, -1, 202, 977, -1, 159, 159, 660, + 660, 660, 660, -1, -1, -1, 419, 420, + -1, -1, -1, -1, -1, 977, 348, -1, + 349, 350, 351, 358, 362, 353, 564, 274, + 90, -1, 126, 437, 301, 425, 424, 336, + -1, 519, 58, -1, 438, 435, 337, 339, + -1, 518, 420, -1, -1, 860, 303, 304, + -1, -1, 305, -1, 338, -1, 491, -1, + 204, 214, 90, 660, 660, 660, 660, 215, + 90, 660, 660, -1, 660, 660, 660, 216, + 90, -1, 660, 660, -1, 660, 660, 262, + 90, 378, -1, 660, 230, 229, 471, 660, + 660, 660, -1, 660, 660, -1, -1, 660, + 100, 96, 98, 94, 92, 873, 165, -1, + 660, 100, 96, 98, 94, 92, -1, 345, + 303, 304, -1, 660, 660, 660, 660, 660, + 660, 660, 660, -1, 660, 660, 660, 486, + 856, -1, 171, 82, 90, 373, 924, 924, + 924, 856, 924, 307, 308, 494, 547, 548, + 546, 989, 989, 377, 492, 376, 493, 864, + 864, 864, 487, 873, 165, 660, 660, 660, + 660, 660, -1, 102, 89, 81, 132, 58, + -1, 596, 263, 90, -1, 660, 307, 308, + 515, 661, 661, 661, 661, 661, 661, 661, + 661, 661, 661, 661, 661, 661, 661, -1, + 661, 661, 661, 661, 661, 661, -1, 727, + -1, 661, 661, 661, 661, 661, 661, 500, + 661, 661, 661, 661, -1, 661, 727, 661, + 661, 661, 571, 661, 661, 661, 661, 661, + 661, -1, 661, 661, 661, 661, 661, 661, + 661, 661, 661, 608, 661, 661, 661, 661, + 421, -1, 220, 222, 224, 226, -1, 661, + 440, -1, -1, 264, 90, -1, 856, 725, + 856, 924, 597, -1, -1, 661, 661, 661, + 661, -1, -1, -1, 989, -1, -1, -1, + 630, 375, -1, -1, 389, -1, 977, 977, + 163, 924, 277, 90, -1, 612, 58, -1, + -1, 545, 362, 299, 90, 609, 910, 910, + 910, -1, 910, -1, 727, 727, -1, -1, + -1, 449, -1, 265, 90, 388, 178, 924, + -1, 370, -1, -1, 374, 450, -1, -1, + -1, 661, 661, 661, 661, -1, -1, 661, + 661, 660, 661, 661, 661, -1, -1, -1, + 661, 661, -1, 661, 661, 526, 420, -1, + -1, 661, -1, -1, -1, 661, 661, 661, + -1, 661, 661, -1, -1, 661, -1, 269, + 90, 307, 308, -1, -1, -1, 661, 100, + 96, 98, 94, 92, 499, 392, -1, -1, + -1, 661, 661, 661, 661, 661, 661, 661, + 661, -1, 661, 661, 661, 532, 524, -1, + -1, 172, 82, 90, -1, 977, -1, 856, + -1, 100, 96, 98, 94, 92, 219, 218, + 582, 621, 523, -1, -1, -1, 372, -1, + 563, 910, -1, 661, 661, 661, 661, 661, + -1, -1, 102, 89, 81, 132, 58, -1, + 556, 856, -1, 661, 910, -1, 555, 662, + 662, 662, 662, 662, 662, 662, 662, 662, + 662, 662, 662, 662, 662, -1, 662, 662, + 662, 662, 662, 662, -1, -1, -1, 662, + 662, 662, 662, 662, 662, 910, 662, 662, + 662, 662, -1, 662, -1, 662, 662, 662, + 646, 662, 662, 662, 662, 662, 662, -1, + 662, 662, 662, 662, 662, 662, 662, 662, + 662, -1, 662, 662, 662, 662, 303, 304, + 355, 356, 357, 354, -1, 662, -1, -1, + 361, -1, -1, -1, -1, -1, 352, -1, + 359, 360, -1, 662, 662, 662, 662, -1, + 942, 942, 942, 942, 460, 940, 940, 940, + 942, 940, -1, -1, -1, -1, 942, 159, + 942, 942, 940, 940, 457, 458, 459, -1, + -1, 404, 90, -1, -1, -1, -1, -1, + 348, -1, 349, 350, 351, 358, 362, 353, + 564, 274, 90, -1, -1, 437, -1, -1, + -1, -1, -1, -1, -1, -1, 438, 662, + 662, 662, 662, 417, 90, 662, 662, 661, + 662, 662, 662, -1, -1, -1, 662, 662, + 491, 662, 662, -1, -1, -1, -1, 662, + -1, -1, -1, 662, 662, 662, -1, 662, + 662, -1, -1, 662, 231, 233, 235, 237, + -1, 645, -1, -1, 662, -1, 230, 229, + 471, 476, 478, 480, 482, -1, -1, 662, + 662, 662, 662, 662, 662, 662, 662, -1, + 662, 662, 662, 448, 358, 362, 353, -1, + 386, -1, 867, 383, 384, 385, 856, 991, + 856, 600, 601, 602, -1, 989, 989, 377, + 456, 376, 942, 942, 942, 942, 942, 373, + -1, 662, 662, 662, 662, 662, -1, 494, + 761, -1, 761, -1, -1, -1, -1, 761, + 493, 662, -1, -1, -1, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 596, 663, 663, 663, 663, + 663, 663, 515, 723, -1, 663, 663, 663, + 663, 663, 663, -1, 663, 663, 663, 663, + -1, 663, 723, 663, 663, 663, -1, 663, + 663, 663, 663, 663, 663, -1, 663, 663, + 663, 663, 663, 663, 663, 663, 663, -1, + 663, 663, 663, 663, 571, -1, -1, -1, + 989, 989, 377, 663, 376, -1, -1, -1, + -1, -1, 977, 977, 163, 608, -1, -1, + -1, 663, 663, 663, 663, -1, -1, -1, + 989, -1, -1, -1, -1, 375, 230, 229, + 472, -1, -1, -1, 597, -1, 475, 474, + 473, -1, -1, 867, -1, 761, 761, 527, + 382, 599, 630, 375, 867, 381, -1, -1, + 723, 723, -1, -1, 277, 90, -1, -1, + -1, -1, -1, 545, 362, 299, 90, 609, + 485, -1, -1, 761, -1, 663, 663, 663, + 663, -1, -1, 663, 663, 662, 663, 663, + 663, -1, -1, -1, 663, 663, 374, 663, + 663, -1, 380, -1, -1, 663, -1, -1, + -1, 663, 663, 663, -1, 663, 663, -1, + -1, 663, 465, -1, -1, -1, -1, 526, + 420, -1, 663, 989, -1, -1, -1, -1, + 375, 977, -1, -1, -1, 663, 663, 663, + 663, 663, 663, 663, 663, -1, 663, 663, + 663, -1, 947, 947, 947, 947, 947, 947, + 947, 947, 947, 947, 461, 462, 464, 463, + 947, -1, 947, 947, 947, 947, 947, 947, + 947, -1, 570, 490, -1, -1, -1, 663, + 663, 663, 663, 663, -1, -1, -1, -1, + 219, 218, 582, 621, -1, -1, -1, 663, + -1, -1, -1, 664, 664, 664, 664, 664, + 664, 664, 664, 664, 664, 664, 664, 664, + 664, -1, 664, 664, 664, 664, 664, 664, + 555, -1, -1, 664, 664, 664, 664, 664, + 664, -1, 664, 664, 664, 664, -1, 664, + -1, 664, 664, 664, -1, 664, 664, 664, + 664, 664, 664, -1, 664, 664, 664, 664, + 664, 664, 664, 664, 664, -1, 664, 664, + 664, 664, 646, -1, -1, 941, 941, 941, + 941, 664, 956, -1, -1, 941, -1, -1, + -1, -1, -1, 941, -1, 941, 941, 664, + 664, 664, 664, -1, -1, -1, -1, -1, + -1, -1, 947, -1, 947, 947, 947, 947, + 947, -1, 956, 956, 956, 956, 956, 956, + 956, 956, 956, 956, 956, 956, 956, 956, + 956, -1, 956, 956, 956, 956, 956, 956, + 956, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 404, 90, -1, -1, -1, + -1, -1, -1, 664, 664, 664, 664, -1, + -1, 664, 664, 663, 664, 664, 664, -1, + -1, -1, 664, 664, -1, 664, 664, 863, + 863, 863, 863, 664, -1, 417, 90, 664, + 664, 664, -1, 664, 664, -1, -1, 664, + -1, -1, -1, -1, -1, -1, -1, -1, + 664, 100, 96, 98, 94, 92, -1, -1, + -1, -1, -1, 664, 664, 664, 664, 664, + 664, 664, 664, 645, 664, 664, 664, 941, + 941, 941, 941, 941, 881, 881, 881, -1, + 881, 856, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 448, 358, 362, + 353, -1, -1, -1, -1, 664, 664, 664, + 664, 664, 956, -1, 956, 956, 956, 956, + 956, -1, 456, -1, -1, 664, -1, -1, + -1, 665, 665, 665, 665, 665, 665, 665, + 665, 665, 665, 665, 665, 665, 665, -1, + 665, 665, 665, 665, 665, 665, -1, -1, + -1, 665, 665, 665, 665, 665, 665, -1, + 665, 665, 665, 665, -1, 665, -1, 665, + 665, 665, -1, 665, 665, 665, 665, 665, + 665, -1, 665, 665, 665, 665, 665, 665, + 665, 665, 665, 958, 665, 665, 665, 665, + -1, -1, -1, 587, -1, 759, -1, 665, + -1, 760, 585, 760, 863, 863, 863, 881, + 760, 863, 863, 863, 881, 665, 665, 665, + 665, -1, -1, 958, 958, 958, 958, 958, + 958, 958, 958, 958, 958, 958, 958, 958, + 958, 958, -1, 958, 958, 958, 958, 958, + 958, 958, -1, 634, 90, -1, -1, 375, + 230, 229, 472, -1, -1, -1, -1, 881, + 475, 474, 473, -1, -1, -1, -1, -1, + -1, 527, 382, 599, -1, -1, -1, 381, + -1, 665, 665, 665, 665, -1, -1, 665, + 665, 664, 665, 665, 665, -1, -1, -1, + 665, 665, 485, 665, 665, -1, -1, -1, + -1, 665, -1, -1, -1, 665, 665, 665, + -1, 665, 665, -1, 876, 665, 876, 876, + 876, 876, -1, 876, 380, -1, 665, -1, + 584, 586, -1, -1, -1, -1, 760, 760, + -1, 665, 665, 665, 665, 665, 665, 665, + 665, -1, 665, 665, 665, -1, -1, 897, + 897, 897, 375, 897, -1, 876, 759, 977, + 977, 163, -1, -1, 760, -1, -1, -1, + -1, -1, -1, 958, -1, 958, 958, 958, + 958, 958, -1, 665, 665, 665, 665, 665, + -1, -1, -1, -1, -1, 911, 911, 911, + -1, 911, -1, 665, 570, 490, -1, 666, + 666, 666, 666, 666, 666, 666, 666, 666, + 666, 666, 666, 666, 666, -1, 666, 666, + 666, 666, 666, 666, -1, -1, -1, 666, + 666, 666, 666, 666, 666, -1, 666, 666, + 666, 666, -1, 666, -1, 666, 666, 666, + -1, 666, 666, 666, 666, 666, 666, -1, + 666, 666, 666, 666, 666, 666, 666, 666, + 666, 963, 666, 666, 666, 666, -1, -1, + -1, 756, -1, 756, 757, 666, 757, 876, + 756, -1, 897, 757, 876, -1, 977, -1, + 876, 876, -1, 666, 666, 666, 666, -1, + 897, 963, 963, 963, 963, 963, 963, 963, + 963, 963, 963, 963, 963, 963, 963, 963, + 959, 963, 963, 963, 963, 963, 963, 963, + 911, -1, -1, -1, -1, -1, -1, 629, + -1, -1, -1, -1, 897, -1, 876, -1, + -1, -1, -1, 911, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 666, + 666, 666, 666, -1, -1, 666, 666, 665, + 666, 666, 666, -1, -1, -1, 666, 666, + -1, 666, 666, -1, 911, -1, -1, 666, + -1, -1, -1, 666, 666, 666, -1, 666, + 666, -1, 877, 666, 877, 877, 877, 877, + -1, 877, -1, -1, 666, -1, 756, 756, + -1, 757, 757, -1, -1, -1, -1, 666, + 666, 666, 666, 666, 666, 666, 666, -1, + 666, 666, 666, -1, 898, 898, 898, -1, + 898, -1, -1, 877, 756, -1, -1, 757, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 963, -1, 963, 963, 963, 963, 963, + -1, 666, 666, 666, 666, 666, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 666, -1, -1, -1, 667, 667, 667, + 667, 667, 667, 667, 667, 667, 667, 667, + 667, 667, 667, -1, 667, 667, 667, 667, + 667, 667, -1, -1, -1, 667, 667, 667, + 667, 667, 667, -1, 667, 667, 667, 667, + -1, 667, -1, 667, 667, 667, -1, 667, + 667, 667, 667, 667, 667, -1, 667, 667, + 667, 667, 667, 667, 667, 667, 667, 964, + 667, 667, 667, 667, -1, -1, -1, -1, + -1, -1, -1, 667, -1, 877, -1, 898, + -1, -1, 877, -1, -1, -1, 877, 877, + -1, 667, 667, 667, 667, 898, -1, 964, + 964, 964, 964, 964, 964, 964, 964, 964, + 964, 964, 964, 964, 964, 964, -1, 964, + 964, 964, 964, 964, 964, 964, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 898, -1, -1, 877, -1, -1, -1, + -1, -1, -1, -1, -1, 634, 90, -1, + -1, -1, -1, -1, -1, 667, 667, 667, + 667, -1, -1, 667, 667, 666, 667, 667, + 667, -1, -1, -1, 667, 667, -1, 667, + 667, -1, -1, -1, -1, 667, -1, -1, + -1, 667, 667, 667, -1, 667, 667, -1, + 878, 667, 878, 878, 878, 878, -1, 878, + -1, -1, 667, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 667, 667, 667, + 667, 667, 667, 667, 667, -1, 667, 667, + 667, -1, 584, 586, -1, -1, -1, -1, + -1, 878, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 964, + -1, 964, 964, 964, 964, 964, -1, 667, + 667, 667, 667, 667, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 667, + -1, -1, -1, 668, 668, 668, 668, 668, + 668, 668, 668, 668, 668, 668, 668, 668, + 668, -1, 668, 668, 668, 668, 668, 668, + -1, -1, -1, 668, 668, 668, 668, 668, + 668, -1, 668, 668, 668, 668, -1, 668, + -1, 668, 668, 668, -1, 668, 668, 668, + 668, 668, 668, -1, 668, 668, 668, 668, + 668, 668, 668, 668, 668, 1007, 668, 668, + 668, 668, -1, -1, -1, -1, -1, -1, + -1, 668, -1, 878, -1, -1, -1, -1, + 878, -1, -1, -1, 878, 878, -1, 668, + 668, 668, 668, -1, -1, 1007, 1007, 1007, + 1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007, + 1007, 1007, 1007, 1007, 961, 1007, 1007, 1007, + 1007, 1007, 1007, 1007, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 878, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 629, -1, 668, 668, 668, 668, -1, + -1, 668, 668, 667, 668, 668, 668, -1, + -1, -1, 668, 668, -1, 668, 668, -1, + -1, -1, -1, 668, -1, -1, -1, 668, + 668, 668, -1, 668, 668, -1, 386, 668, + 867, 383, 384, 385, -1, -1, -1, -1, + 668, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 668, 668, 668, 668, 668, + 668, 668, 668, -1, 668, 668, 668, -1, + -1, -1, -1, -1, -1, -1, -1, 991, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 1007, -1, 1007, + 1007, 1007, 1007, 1007, -1, 668, 668, 668, + 668, 668, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 668, -1, -1, + -1, 669, 669, 669, 669, 669, 669, 669, + 669, 669, 669, 669, 669, 669, 669, -1, + 669, 669, 669, 669, 669, 669, -1, -1, + -1, 669, 669, 669, 669, 669, 669, -1, + 669, 669, 669, 669, -1, 669, -1, 669, + 669, 669, -1, 669, 669, 669, 669, 669, + 669, -1, 669, 669, 669, 669, 669, 669, + 669, 669, 669, 1008, 669, 669, 669, 669, + -1, -1, -1, -1, -1, -1, -1, 669, + -1, 867, -1, -1, -1, -1, 382, -1, + -1, -1, 867, 381, -1, 669, 669, 669, + 669, -1, -1, 1008, 1008, 1008, 1008, 1008, + 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, + 1008, 1008, 962, 1008, 1008, 1008, 1008, 1008, + 1008, 1008, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 484, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 669, 669, 669, 669, -1, -1, 669, + 669, 668, 669, 669, 669, -1, -1, -1, + 669, 669, -1, 669, 669, -1, -1, -1, + -1, 669, -1, -1, -1, 669, 669, 669, + -1, 669, 669, -1, -1, 669, -1, -1, + -1, -1, -1, -1, -1, -1, 669, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 669, 669, 669, 669, 669, 669, 669, + 669, -1, 669, 669, 669, 355, 356, 357, + 354, -1, -1, -1, -1, 361, 997, 997, + 391, -1, 390, 352, -1, 359, 360, -1, + -1, -1, -1, 1008, -1, 1008, 1008, 1008, + 1008, 1008, -1, 669, 669, 669, 669, 669, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 669, -1, -1, -1, 670, + 670, 670, 670, 670, 670, 670, 670, 670, + 670, 670, 670, 670, 670, -1, 670, 670, + 670, 670, 670, 670, -1, -1, -1, 670, + 670, 670, 670, 670, 670, -1, 670, 670, + 670, 670, -1, 670, -1, 670, 670, 670, + -1, 670, 670, 670, 670, 670, 670, -1, + 670, 670, 670, 670, 670, 670, 670, 670, + 670, -1, 670, 670, 670, 670, -1, -1, + -1, -1, -1, -1, -1, 670, 960, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 997, -1, 670, 670, 670, 670, -1, + -1, -1, -1, -1, 447, -1, 349, 350, + 351, 358, 362, 353, 389, -1, 960, 960, + 960, 960, 960, 960, 960, 960, 960, 960, + 960, 960, 960, 960, 960, 960, 960, 960, + 960, 960, 960, 960, 960, -1, -1, -1, + -1, -1, -1, -1, -1, 498, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 670, + 670, 670, 670, -1, -1, 670, 670, 669, + 670, 670, 670, -1, -1, -1, 670, 670, + -1, 670, 670, -1, -1, -1, -1, 670, + -1, -1, -1, 670, 670, 670, -1, 670, + 670, -1, 386, 670, 867, 383, 384, 385, + -1, 991, -1, -1, 670, 879, -1, 879, + 879, 879, 879, -1, 879, -1, -1, 670, + 670, 670, 670, 670, 670, 670, 670, -1, + 670, 670, 670, -1, -1, -1, 993, 993, + 554, -1, 553, 991, -1, 355, 356, 357, + 354, -1, -1, -1, -1, 361, 879, -1, + -1, -1, -1, 352, -1, 359, 360, -1, + -1, 670, 670, 670, 670, 670, 960, -1, + 960, 960, 960, 960, 960, -1, -1, -1, + -1, 670, -1, -1, -1, 671, 671, 671, + 671, 671, 671, 671, 671, 671, 671, 671, + 671, 671, 671, -1, 671, 671, 671, 671, + 671, 671, -1, -1, -1, 671, 671, 671, + 671, 671, 671, -1, 671, 671, 671, 671, + -1, 671, -1, 671, 671, 671, -1, 671, + 671, 671, 671, 671, 671, -1, 671, 671, + 671, 671, 671, 671, 671, 671, 671, -1, + 671, 671, 671, 671, -1, -1, -1, -1, + -1, -1, -1, 671, -1, 867, -1, -1, + -1, 993, 382, -1, -1, -1, 867, 381, + 879, 671, 671, 671, 671, 879, -1, 552, + -1, 879, 879, -1, -1, -1, -1, -1, + 382, -1, -1, -1, -1, 381, 535, 350, + 351, 358, 362, 353, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 551, 495, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 879, + -1, -1, -1, -1, -1, 671, 671, 671, + 671, -1, 484, 671, 671, 670, 671, 671, + 671, -1, -1, -1, 671, 671, -1, 671, + 671, -1, -1, -1, -1, 671, -1, -1, + -1, 671, 671, 671, -1, 671, 671, -1, + -1, 671, 957, -1, -1, -1, -1, -1, + -1, -1, 671, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 671, 671, 671, + 671, 671, 671, 671, 671, -1, 671, 671, + 671, -1, 957, 957, 957, 957, 957, 957, + 957, 957, 957, 957, 957, 957, 957, 957, + 957, -1, 957, 957, 957, 957, 957, 957, + 957, -1, -1, -1, -1, -1, -1, 671, + 671, 671, 671, 671, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 671, + -1, -1, -1, 672, 672, 672, 672, 672, + 672, 672, 672, 672, 672, 672, 672, 672, + 672, -1, 672, 672, 672, 672, 672, 672, + -1, -1, -1, 672, 672, 672, 672, 672, + 672, -1, 672, 672, 672, 672, -1, 672, + -1, 672, 672, 672, -1, 672, 672, 672, + 672, 672, 672, -1, 672, 672, 672, 672, + 672, 672, 672, 672, 672, -1, 672, 672, + 672, 672, -1, -1, -1, 355, 356, 357, + 354, 672, 860, -1, 860, 361, -1, -1, + -1, 860, -1, 352, -1, 359, 360, 672, + 672, 672, 672, -1, 337, 339, -1, -1, + -1, -1, 957, -1, 957, 957, 957, 957, + 957, -1, 338, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 447, -1, + 349, 350, 351, 358, 362, 353, 389, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 672, 672, 672, 672, -1, + -1, 672, 672, 671, 672, 672, 672, 498, + -1, -1, 672, 672, -1, 672, 672, -1, + -1, -1, -1, 672, -1, -1, -1, 672, + 672, 672, -1, 672, 672, -1, -1, 672, + -1, -1, -1, -1, -1, -1, -1, -1, + 672, -1, -1, -1, -1, -1, -1, 860, + 860, -1, -1, 672, 672, 672, 672, 672, + 672, 672, 672, -1, 672, 672, 672, 542, + 351, 358, 362, 353, -1, -1, -1, -1, + -1, 355, 356, 357, 354, 860, 654, -1, + -1, 361, -1, -1, -1, -1, -1, 352, + -1, 359, 360, -1, -1, 672, 672, 672, + 672, 672, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 672, -1, -1, + -1, 673, 673, 673, 673, 673, 673, 673, + 673, 673, 673, 673, 673, 673, 673, -1, + 673, 673, 673, 673, 673, 673, -1, -1, + -1, 673, 673, 673, 673, 673, 673, -1, + 673, 673, 673, 673, -1, 673, -1, 673, + 673, 673, -1, 673, 673, 673, 673, 673, + 673, -1, 673, 673, 673, 673, 673, 673, + 673, 673, 673, -1, 673, 673, 673, 673, + -1, -1, -1, -1, -1, -1, -1, 673, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 355, 356, 357, 354, 673, 673, 673, + 673, 361, -1, -1, -1, -1, -1, 352, + -1, 359, 360, -1, 382, -1, -1, -1, + -1, 381, 536, 350, 351, 358, 362, 353, + -1, 552, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 535, 350, 351, 358, 362, 353, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 673, 673, 673, 673, 551, 495, 673, + 673, 672, 673, 673, 673, -1, -1, -1, + 673, 673, -1, 673, 673, -1, -1, -1, + -1, 673, -1, -1, -1, 673, 673, 673, + -1, 673, 673, -1, -1, 673, -1, -1, + -1, -1, -1, -1, -1, -1, 673, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 673, 673, 673, 673, 673, 673, 673, + 673, -1, 673, 673, 673, -1, -1, 997, + 997, 391, -1, 390, -1, -1, -1, -1, + -1, -1, 537, 350, 351, 358, 362, 353, + -1, -1, 355, 356, 357, 354, -1, -1, + -1, -1, 361, 673, 673, 673, 673, 673, + 352, -1, 359, 360, -1, -1, -1, -1, + -1, -1, -1, 673, -1, -1, -1, 674, + 674, 674, 674, 674, 674, 674, 674, 674, + 674, 674, 674, 674, 674, -1, 674, 674, + 674, 674, 674, 674, -1, -1, -1, 674, + 674, 674, 674, 674, 674, -1, 674, 674, + 674, 674, -1, 674, -1, 674, 674, 674, + -1, 674, 674, 674, 674, 674, 674, -1, + 674, 674, 674, 674, 674, 674, 674, 674, + 674, -1, 674, 674, 674, 674, -1, -1, + -1, 355, 356, 357, 354, 674, -1, -1, + -1, 361, 997, -1, -1, -1, -1, 352, + -1, 359, 360, 674, 674, 674, 674, -1, + -1, -1, -1, -1, -1, 389, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 538, 350, 351, 358, 362, + 353, -1, -1, -1, -1, -1, 569, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 674, + 674, 674, 674, -1, -1, 674, 674, 673, + 674, 674, 674, -1, -1, -1, 674, 674, + -1, 674, 674, -1, -1, -1, -1, 674, + -1, -1, -1, 674, 674, 674, -1, 674, + 674, -1, -1, 674, -1, -1, -1, -1, + -1, -1, -1, -1, 674, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 674, + 674, 674, 674, 674, 674, 674, 674, -1, + 674, 674, 674, 539, 351, 358, 362, 353, + -1, 874, -1, 874, 874, 874, 874, -1, + 874, -1, -1, -1, -1, -1, -1, -1, + -1, 542, 351, 358, 362, 353, -1, -1, + -1, 674, 674, 674, 674, 674, -1, -1, + 654, -1, -1, -1, -1, -1, -1, -1, + -1, 674, 874, -1, -1, 675, 675, 675, + 675, 675, 675, 675, 675, 675, 675, 675, + 675, 675, 675, -1, 675, 675, 675, 675, + 675, 675, -1, -1, -1, 675, 675, 675, + 675, 675, 675, -1, 675, 675, 675, 675, + -1, 675, -1, 675, 675, 675, -1, 675, + 675, 675, 675, 675, 675, -1, 675, 675, + 675, 675, 675, 675, 675, 675, 675, -1, + 675, 675, 675, 675, -1, -1, -1, 355, + 356, 357, 354, 675, -1, -1, -1, 361, + -1, -1, -1, -1, -1, 352, -1, 359, + 360, 675, 675, 675, 675, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 874, -1, -1, -1, + -1, 874, -1, -1, -1, 874, 874, -1, + -1, -1, -1, -1, 536, 350, 351, 358, + 362, 353, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 675, 675, 675, + 675, -1, -1, 675, 675, 674, 675, 675, + 675, -1, -1, -1, 675, 675, -1, 675, + 675, -1, -1, 874, -1, 675, -1, -1, + -1, 675, 675, 675, -1, 675, 675, -1, + -1, 675, -1, -1, -1, -1, -1, -1, + -1, -1, 675, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 675, 675, 675, + 675, 675, 675, 675, 675, -1, 675, 675, + 675, 540, 351, 358, 362, 353, -1, -1, + -1, 355, 356, 357, 354, -1, -1, -1, + -1, 361, -1, -1, -1, -1, -1, 352, + -1, 359, 360, -1, -1, -1, -1, 675, + 675, 675, 675, 675, 537, 350, 351, 358, + 362, 353, -1, -1, -1, -1, -1, 675, + -1, -1, -1, 676, 676, 676, 676, 676, + 676, 676, 676, 676, 676, 676, 676, 676, + 676, -1, 676, 676, 676, 676, 676, 676, + -1, -1, -1, 676, 676, 676, 676, 676, + 676, -1, 676, 676, 676, 676, -1, 676, + -1, 676, 676, 676, -1, 676, 676, 676, + 676, 676, 676, -1, 676, 676, 676, 676, + 676, 676, 676, 676, 676, -1, 676, 676, + 676, 676, -1, -1, -1, -1, -1, -1, + -1, 676, -1, -1, -1, 942, 942, 942, + 942, 460, 936, 936, 936, 942, 936, 676, + 676, 676, 676, 942, -1, 942, 942, 936, + 936, 457, 458, 459, -1, -1, -1, -1, + -1, -1, -1, 541, 351, 358, 362, 353, + -1, -1, -1, -1, -1, -1, -1, 389, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 538, 350, 351, + 358, 362, 353, 676, 676, 676, 676, -1, + 569, 676, 676, 675, 676, 676, 676, -1, + -1, -1, 676, 676, -1, 676, 676, -1, + -1, -1, -1, 676, -1, -1, -1, 676, + 676, 676, -1, 676, 676, -1, -1, 676, + -1, -1, -1, -1, -1, -1, -1, -1, + 676, 875, -1, 875, 875, 875, 875, -1, + 875, -1, -1, 676, 676, 676, 676, 676, + 676, 676, 676, -1, 676, 676, 676, -1, + -1, -1, -1, -1, -1, 456, -1, 942, + 942, 942, 942, 942, -1, -1, -1, -1, + -1, -1, 875, -1, -1, 539, 351, 358, + 362, 353, -1, -1, -1, 676, 676, 676, + 676, 676, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 676, -1, -1, + -1, 677, 677, 677, 677, 677, 677, 677, + 677, 677, 677, 677, 677, 677, 677, -1, + 677, 677, 677, 677, 677, 677, -1, -1, + -1, 677, 677, 677, 677, 677, 677, -1, + 677, 677, 677, 677, -1, 677, -1, 677, + 677, 677, -1, 677, 677, 677, 677, 677, + 677, -1, 677, 677, 677, 677, 677, 677, + 677, 677, 677, -1, 677, 677, 677, 677, + -1, -1, -1, -1, -1, -1, -1, 677, + 948, -1, -1, -1, 993, 993, 554, -1, + 553, -1, -1, -1, 875, 677, 677, 677, + 677, 875, -1, -1, -1, 875, 875, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 948, 948, 948, 948, 948, 948, 948, 948, + 948, 948, 948, 948, 948, 948, 948, -1, + 948, 948, 948, 948, 948, 948, 948, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 875, -1, -1, -1, -1, + -1, 677, 677, 677, 677, -1, -1, 677, + 677, 676, 677, 677, 677, -1, -1, -1, + 677, 677, -1, 677, 677, -1, -1, -1, + -1, 677, -1, -1, -1, 677, 677, 677, + -1, 677, 677, -1, -1, 677, -1, -1, + -1, -1, -1, -1, -1, -1, 677, -1, + -1, -1, -1, -1, -1, -1, -1, 993, + -1, 677, 677, 677, 677, 677, 677, 677, + 677, -1, 677, 677, 677, 552, -1, -1, + -1, -1, -1, -1, -1, 993, 993, 554, + -1, 553, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 540, 351, 358, 362, 353, + -1, -1, -1, 677, 677, 677, 677, 677, + 948, 595, 948, 948, 948, 948, 948, -1, + -1, -1, -1, 677, -1, -1, -1, 25, + 26, 975, 23, 21, 24, 48, 49, 50, + 51, 77, 78, 79, 80, -1, 76, 28, + 34, 35, 38, 36, -1, -1, -1, 101, + 97, 99, 95, 93, 30, -1, 43, 39, + 40, 41, -1, 46, -1, 87, 44, 42, + -1, 88, 85, 84, 86, 22, 27, -1, + 72, 73, 74, 59, 60, 61, 47, 57, + 71, -1, 104, 106, 108, 110, -1, -1, + -1, -1, -1, -1, -1, 75, -1, 860, + -1, 860, 860, 860, 860, -1, 860, -1, + 993, -1, 336, 66, 67, 68, 69, -1, + -1, 337, 339, -1, -1, -1, 552, -1, + -1, -1, -1, -1, -1, -1, -1, 338, + -1, -1, 355, 356, 357, 354, -1, -1, + 860, -1, 361, -1, -1, -1, -1, -1, + 352, -1, 359, 360, 748, 541, 351, 358, + 362, 353, 628, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 2, + 20, 18, 45, -1, -1, 17, 19, 677, + 16, 15, 13, -1, -1, -1, 29, 12, + -1, 10, 4, -1, -1, -1, -1, 11, + -1, -1, -1, 8, 9, 3, -1, 5, + 6, 363, -1, 7, -1, -1, -1, -1, + -1, -1, -1, -1, 14, 100, 96, 98, + 94, 92, -1, 580, -1, -1, -1, 33, + 31, 32, 52, 62, 63, 64, 65, -1, + 70, 83, 91, -1, -1, -1, -1, -1, + -1, -1, -1, 983, -1, 856, -1, -1, + -1, -1, 860, 606, -1, -1, -1, 860, + 983, -1, -1, 860, 860, -1, -1, 456, + 53, 102, 89, 81, 37, 58, 983, -1, + -1, 364, -1, 349, 350, 351, 358, 362, + 353, 114, 771, 771, 771, 771, 771, 771, + 771, 771, 771, 771, 771, 771, 771, 771, + 771, 771, 771, 771, 771, 771, 771, 771, + 771, 860, 771, 771, 771, 771, 771, 771, + -1, 771, 771, 771, 771, -1, 771, -1, + 771, 771, 771, -1, 771, 771, 771, 771, + 771, 771, 983, 771, 771, 771, 771, 771, + 771, 771, 771, 771, -1, 771, 771, 771, + 771, 579, -1, -1, -1, -1, -1, -1, + 771, -1, -1, 771, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 771, 771, + 771, 771, -1, -1, -1, -1, 983, -1, + -1, -1, -1, 983, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 983, -1, 983, -1, -1, 578, + 90, -1, -1, -1, -1, -1, -1, -1, + 202, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 771, 771, 771, 771, -1, -1, + 771, 771, -1, 771, 771, 771, -1, -1, + -1, 771, 771, -1, 771, 771, -1, -1, + -1, -1, 771, -1, -1, -1, 771, 771, + 771, -1, 771, 771, -1, -1, 771, -1, + -1, -1, -1, -1, -1, -1, 344, 771, + 771, 771, 771, -1, -1, -1, 771, 771, + -1, -1, 771, 771, 771, 771, 771, 771, + 771, 771, -1, 771, 771, 771, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 25, 26, 981, 23, 21, + 24, -1, -1, -1, -1, -1, -1, 552, + -1, -1, -1, 28, 771, 771, 771, 771, + 771, -1, -1, 729, 729, 729, 729, 729, + 30, -1, 256, -1, 771, -1, -1, 46, + -1, 771, 44, -1, -1, -1, -1, -1, + -1, 22, 27, 595, -1, -1, -1, 59, + 60, 61, 47, 729, -1, -1, 77, 78, + 79, 80, -1, 76, -1, -1, -1, -1, + -1, -1, -1, -1, 100, 96, 98, 94, + 92, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 87, -1, -1, -1, 88, 85, + 84, 86, -1, -1, -1, 72, 73, 74, + -1, -1, -1, -1, 1006, 71, -1, 104, + 106, 108, 110, -1, -1, -1, -1, -1, + -1, -1, 75, 860, -1, 860, -1, -1, + -1, -1, 860, -1, -1, -1, 336, -1, + 66, 67, 68, 69, -1, 337, 339, -1, + -1, -1, -1, -1, 255, 253, 45, -1, + -1, 252, 254, 338, -1, -1, 251, -1, + 552, -1, 29, 250, -1, 248, 242, -1, + -1, -1, -1, 249, 240, -1, -1, 246, + 247, 241, -1, 243, 244, -1, -1, 245, + -1, -1, -1, -1, -1, -1, -1, -1, + 771, -1, -1, -1, 628, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 2, 20, 18, 45, 729, 729, 17, + 19, -1, 16, 15, 13, -1, -1, -1, + 29, 12, -1, 10, 4, -1, -1, -1, + -1, 11, -1, -1, -1, 8, 9, 3, + -1, 5, 6, 363, -1, 7, -1, -1, + 860, 860, -1, -1, -1, -1, 14, 131, + 62, 63, 64, 65, -1, 70, 82, 90, + 239, 33, 31, 32, 52, 62, 63, 64, + 65, -1, 70, 82, 90, -1, 860, 653, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 606, 102, 89, + 81, 132, 58, -1, -1, -1, -1, -1, + -1, -1, -1, 102, 89, 81, 37, 58, + -1, -1, -1, 364, -1, 349, 350, 351, + 358, 362, 353, 114, 772, 772, 772, 772, + 772, 772, 772, 772, 772, 772, 772, 772, + 772, 772, 772, 772, 772, 772, 772, 772, + 772, 772, 772, -1, 772, 772, 772, 772, + 772, 772, -1, 772, 772, 772, 772, -1, + 772, -1, 772, 772, 772, -1, 772, 772, + 772, 772, 772, 772, -1, 772, 772, 772, + 772, 772, 772, 772, 772, 772, 949, 772, + 772, 772, 772, 579, -1, -1, -1, -1, + -1, -1, 772, -1, -1, 772, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 772, 772, 772, 772, -1, -1, 949, 949, + 949, 949, 949, 949, 949, 949, 949, 949, + 949, 949, 949, 949, 949, -1, 949, 949, + 949, 949, 949, 949, 949, -1, -1, -1, + -1, 578, 90, -1, -1, -1, -1, -1, + -1, -1, 202, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 772, 772, 772, 772, + -1, -1, 772, 772, -1, 772, 772, 772, + -1, -1, -1, 772, 772, -1, 772, 772, + -1, -1, -1, -1, 772, -1, -1, -1, + 772, 772, 772, -1, 772, 772, -1, -1, + 772, -1, -1, -1, -1, -1, -1, -1, + 344, 772, 772, 772, 772, -1, -1, -1, + 772, 772, -1, -1, 772, 772, 772, 772, + 772, 772, 772, 772, -1, 772, 772, 772, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 949, -1, + 949, 949, 949, 949, 949, -1, 772, 772, + 772, 772, 772, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 772, -1, + -1, -1, -1, 772, -1, 799, 799, 799, + 799, 799, 799, 799, 799, 799, 799, 799, + 799, 799, 799, 799, 799, 799, 799, 799, + 799, 799, 799, 799, -1, 799, 799, 799, + 799, 799, 799, -1, 799, 799, 799, 799, + -1, 799, -1, 799, 799, 799, -1, 799, + 799, 799, 799, 799, 799, -1, 799, 799, + 799, 799, 799, 799, 799, 799, 799, -1, + 799, 799, 799, 799, -1, -1, -1, -1, + -1, -1, -1, 799, -1, -1, 799, -1, + -1, 181, -1, -1, -1, -1, -1, -1, + -1, 799, 799, 799, 799, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 255, 253, + 45, -1, -1, 252, 254, -1, -1, -1, + 251, -1, -1, -1, 29, 250, -1, 248, + 242, -1, -1, -1, -1, 249, 240, -1, + -1, 246, 247, 241, -1, 243, 244, -1, + -1, 245, -1, -1, -1, 799, 799, 799, + 799, -1, 772, 799, 799, -1, 799, 799, + 799, -1, -1, -1, 799, 799, -1, 799, + 799, -1, -1, -1, -1, 799, -1, -1, + -1, 799, 799, 799, -1, 799, 799, -1, + -1, 799, -1, -1, -1, -1, -1, -1, + -1, -1, 799, 799, 799, 799, -1, -1, + -1, 799, 799, -1, 180, 799, 799, 799, + 799, 799, 799, 799, 799, -1, 799, 799, + 799, 131, 62, 63, 64, 65, -1, 70, + 82, 90, 239, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 653, -1, -1, -1, -1, -1, 799, + 799, 799, 799, 799, -1, -1, -1, -1, + 102, 89, 81, 132, 58, -1, -1, 799, + 77, 78, 79, 80, 799, 76, -1, -1, + -1, -1, -1, -1, -1, -1, 100, 96, + 98, 94, 92, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 87, -1, -1, -1, + 88, 85, 84, 86, -1, -1, -1, 72, + 73, 74, -1, -1, -1, -1, 1006, 71, + -1, 104, 106, 108, 110, -1, -1, -1, + -1, -1, -1, -1, 75, -1, -1, -1, + -1, 355, 356, 357, 354, -1, -1, -1, + -1, 361, 66, 67, 68, 69, -1, 352, + -1, 359, 360, 748, -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, 77, 78, 79, 80, -1, 76, + 529, -1, -1, -1, -1, -1, -1, -1, + 100, 96, 98, 94, 92, -1, -1, -1, + -1, -1, -1, 799, -1, -1, 87, -1, + -1, -1, 88, 85, 84, 86, -1, -1, + -1, 72, 73, 74, -1, -1, -1, -1, + 1006, 71, -1, 104, 106, 108, 110, -1, + 860, -1, 860, 860, 860, 860, 75, 860, + -1, 134, 62, 63, 64, 65, -1, 70, + 82, 90, 337, 339, -1, -1, -1, -1, + 364, -1, 349, 350, 351, 358, 362, 353, + 338, -1, -1, -1, -1, -1, -1, -1, + -1, 860, -1, -1, -1, -1, -1, -1, + 102, 89, 81, 132, 58, 832, 832, 832, + 832, 832, 832, 832, 832, 832, 832, 832, + 832, 832, 832, 832, 832, 832, 832, 832, + 832, 832, 832, 832, -1, 832, 832, 832, + 832, 832, 832, -1, 832, 832, 832, 832, + -1, 832, -1, 832, 832, 832, -1, 832, + 832, 832, 832, 832, 832, -1, 832, 832, + 832, 832, 832, 832, 832, 832, 832, 832, + 832, 832, 832, 832, 832, -1, 832, -1, + -1, -1, -1, 199, 832, 832, 832, 832, + -1, 198, 832, 832, -1, 832, 832, 832, + 832, 832, 832, 832, 832, 832, 832, 832, + 832, 173, 82, 90, -1, -1, 832, -1, + -1, -1, -1, 860, 607, -1, -1, -1, + 860, -1, -1, -1, 860, 860, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 102, 89, 81, 132, 58, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 832, 832, 832, + 832, -1, -1, 832, 832, 832, 832, 832, + 832, -1, 860, -1, 832, 832, 832, 832, + 832, -1, -1, -1, -1, 832, -1, -1, + -1, 832, 832, 832, -1, 832, 832, -1, + -1, 832, -1, -1, -1, -1, -1, -1, + -1, -1, 832, 832, 832, 832, 832, -1, + 832, 832, 832, -1, -1, 832, 832, 832, + 832, 832, 832, 832, 832, -1, 832, 832, + 832, -1, -1, -1, 832, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 832, + 832, -1, -1, 832, -1, -1, -1, -1, + 832, -1, -1, -1, -1, 832, -1, 832, + 832, 832, 832, 832, -1, -1, 180, -1, + -1, -1, -1, -1, -1, -1, -1, 832, + -1, 832, -1, -1, 832, 832, -1, -1, + -1, 832, -1, 832, -1, 832, -1, -1, + -1, -1, -1, -1, 77, 78, 79, 80, + -1, 76, -1, -1, -1, -1, -1, -1, + -1, -1, 100, 96, 98, 94, 92, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 87, -1, -1, -1, 88, 85, 84, 86, + -1, -1, -1, 72, 73, 74, -1, -1, + -1, -1, 1006, 71, -1, 104, 106, 108, + 110, -1, -1, -1, -1, -1, -1, -1, + 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 950, -1, -1, -1, 66, 67, + 68, 69, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 950, 950, 950, 950, 950, 950, + 950, 950, 950, 950, 950, 950, 950, 950, + 950, -1, 950, 950, 950, 950, 950, 950, + 950, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 832, -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, 529, -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, 142, 62, 63, + 64, 65, -1, 70, 82, 90, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 134, 62, 63, 64, 65, + -1, 70, 82, 90, 102, 89, 81, 132, + 58, -1, 364, -1, 349, 350, 351, 358, + 362, 353, 950, -1, 950, 950, 950, 950, + 950, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 102, 89, 81, 132, 58, 780, + 780, 780, 780, 780, 780, 780, 780, 780, + 780, 780, 780, 780, 780, 780, 780, 780, + 780, 780, 780, 780, 780, 780, -1, 780, + 780, 780, 780, 780, 780, -1, 780, 780, + 780, 780, -1, 780, -1, 780, 780, 780, + -1, 780, 780, 780, 780, 780, 780, -1, + 780, 780, 780, 780, 780, 780, 780, 780, + 780, -1, 780, 780, 780, 780, -1, -1, + -1, -1, -1, -1, -1, 780, -1, -1, + 780, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 780, 780, 780, 780, -1, + -1, -1, -1, 173, 82, 90, -1, -1, + -1, -1, -1, -1, -1, -1, 607, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 102, 89, 81, 132, + 58, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 780, + 780, 780, 780, -1, -1, 780, 780, -1, + 780, 780, 780, -1, -1, -1, 780, 780, + -1, 780, 780, -1, -1, -1, -1, 780, + -1, -1, -1, 780, 780, 780, -1, 780, + 780, -1, -1, 780, 951, -1, -1, -1, + -1, -1, -1, -1, 780, 780, 780, 780, + -1, -1, -1, 780, 780, -1, -1, 780, + 780, 780, 780, 780, 780, 780, 780, -1, + 780, 780, 780, -1, 951, 951, 951, 951, + 951, 951, 951, 951, 951, 951, 951, 951, + 951, 951, 951, -1, 951, 951, 951, 951, + 951, 951, 951, -1, -1, -1, -1, -1, + -1, 780, 780, 780, 780, 780, -1, -1, + -1, 77, 78, 79, 80, -1, 76, -1, + -1, 780, -1, -1, -1, -1, 780, 100, + 96, 98, 94, 92, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 87, -1, -1, + -1, 88, 85, 84, 86, 968, -1, -1, + 72, 73, 74, -1, -1, -1, -1, 1006, + 71, -1, 104, 106, 108, 110, -1, -1, + -1, -1, -1, -1, -1, 75, -1, -1, + -1, -1, -1, -1, -1, 968, 968, 968, + 968, 968, 968, 968, 968, 968, 968, 968, + 968, 968, 968, 968, -1, 968, 968, 968, + 968, 968, 968, 968, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 951, -1, 951, 951, + 951, 951, 951, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 781, 781, 781, 781, + 781, 781, 781, 781, 781, 781, 781, 781, + 781, 781, 781, 781, 781, 781, 781, 781, + 781, 781, 781, -1, 781, 781, 781, 781, + 781, 781, -1, 781, 781, 781, 781, -1, + 781, -1, 781, 781, 781, 780, 781, 781, + 781, 781, 781, 781, -1, 781, 781, 781, + 781, 781, 781, 781, 781, 781, -1, 781, + 781, 781, 781, -1, -1, -1, -1, -1, + -1, -1, 781, -1, -1, 781, -1, -1, + 174, 82, 90, -1, -1, -1, -1, -1, + 781, 781, 781, 781, -1, 968, -1, 968, + 968, 968, 968, 968, -1, -1, -1, 142, + 62, 63, 64, 65, -1, 70, 82, 90, + -1, 102, 89, 81, 132, 58, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 102, 89, + 81, 132, 58, -1, 781, 781, 781, 781, + -1, -1, 781, 781, -1, 781, 781, 781, + -1, -1, -1, 781, 781, -1, 781, 781, + -1, -1, -1, -1, 781, -1, -1, -1, + 781, 781, 781, -1, 781, 781, -1, -1, + 781, 966, -1, -1, -1, -1, -1, -1, + -1, 781, 781, 781, 781, -1, -1, -1, + 781, 781, -1, -1, 781, 781, 781, 781, + 781, 781, 781, 781, -1, 781, 781, 781, + -1, 966, 966, 966, 966, 966, 966, 966, + 966, 966, 966, 966, 966, 966, 966, 966, + -1, 966, 966, 966, 966, 966, 966, 966, + -1, -1, -1, -1, -1, -1, 781, 781, + 781, 781, 781, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 781, -1, + -1, -1, -1, 781, -1, 805, 805, 805, + 805, 805, 805, 805, 805, 805, 805, 805, + 805, 805, 805, 805, 805, 805, 805, 805, + 805, 805, 805, 805, -1, 805, 805, 805, + 805, 805, 805, -1, 805, 805, 805, 805, + -1, 805, -1, 805, 805, 805, -1, 805, + 805, 805, 805, 805, 805, -1, 805, 805, + 805, 805, 805, 805, 805, 805, 805, -1, + 805, 805, 805, 805, -1, -1, -1, -1, + -1, -1, -1, 805, 967, -1, 805, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 805, 805, 805, 805, -1, -1, 182, + 183, 966, -1, 966, 966, 966, 966, 966, + -1, -1, -1, -1, 967, 967, 967, 967, + 967, 967, 967, 967, 967, 967, 967, 967, + 967, 967, 967, -1, 967, 967, 967, 967, + 967, 967, 967, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 805, 805, 805, + 805, -1, 781, 805, 805, -1, 805, 805, + 805, -1, -1, -1, 805, 805, -1, 805, + 805, -1, -1, -1, -1, 805, -1, -1, + -1, 805, 805, 805, -1, 805, 805, -1, + -1, 805, -1, -1, -1, -1, -1, -1, + -1, -1, 805, 805, 805, 805, -1, -1, + -1, 805, 805, -1, -1, 805, 805, 805, + 805, 805, 805, 805, 805, -1, 805, 805, + 805, -1, -1, -1, -1, -1, 942, 942, + 942, 942, 460, 937, 937, 937, 942, 937, + -1, -1, -1, -1, 942, -1, 942, 942, + 937, 937, 457, 458, 459, -1, -1, 805, + 805, 805, 805, 805, 967, -1, 967, 967, + 967, 967, 967, -1, -1, -1, -1, 805, + -1, -1, -1, -1, 805, -1, 808, 808, + 808, 808, 808, 808, 808, 808, 808, 808, + 808, 808, 808, 808, 808, 808, 808, 808, + 808, 808, 808, 808, 808, -1, 808, 808, + 808, 808, 808, 808, -1, 808, 808, 808, + 808, -1, 808, -1, 808, 808, 808, -1, + 808, 808, 808, 808, 808, 808, -1, 808, + 808, 808, 808, 808, 808, 808, 808, 808, + 808, 808, 808, 808, 808, 808, -1, -1, + -1, -1, -1, -1, 808, 808, 808, 808, + -1, -1, -1, 184, 185, -1, 186, 187, + 188, 189, 808, 808, 808, 808, -1, -1, + 808, 808, 174, 82, 90, -1, 456, 808, + 942, 942, 942, 942, 942, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 102, 89, 81, 132, 58, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 808, 808, + 808, 808, -1, 805, 808, 808, 808, 808, + 808, 808, -1, -1, -1, 808, 808, 808, + 808, 808, -1, -1, -1, -1, 808, -1, + -1, -1, 808, 808, 808, -1, 808, 808, + -1, -1, 808, -1, -1, -1, -1, -1, + -1, -1, -1, 808, 808, 808, 808, 808, + -1, 808, 808, 808, -1, -1, 808, 808, + 808, 808, 808, 808, 808, 808, -1, 808, + 808, 808, -1, -1, -1, 808, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 808, 808, -1, -1, 808, -1, -1, -1, + -1, 808, -1, -1, -1, -1, 808, -1, + 808, 808, 808, 808, 808, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 808, -1, 808, -1, -1, 808, 808, -1, + -1, -1, 808, -1, 808, -1, 808, 815, + 815, 815, 815, 815, 815, 815, 815, 815, + 815, 815, 815, 815, 815, 815, 815, 815, + 815, 815, 815, 815, 815, 815, -1, 815, + 815, 815, 815, 815, 815, -1, 815, 815, + 815, 815, -1, 815, -1, 815, 815, 815, + -1, 815, 815, 815, 815, 815, 815, -1, + 815, 815, 815, 815, 815, 815, 815, 815, + 815, 815, 815, 815, 815, 815, 815, -1, + -1, -1, -1, -1, -1, 815, 815, 815, + 815, -1, -1, -1, 815, 815, -1, 815, + 815, 815, 815, 815, 815, 815, 815, 190, + 191, 815, 815, -1, -1, -1, -1, -1, + 815, -1, -1, -1, -1, -1, 942, 942, + 942, 942, 460, 938, 938, 938, 942, 938, + -1, -1, -1, -1, 942, -1, 942, 942, + 938, 938, 457, 458, 459, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 808, -1, -1, 815, + 815, 815, 815, -1, -1, 815, 815, 815, + 815, 815, 815, -1, -1, -1, 815, 815, + 815, 815, 815, -1, -1, -1, -1, 815, + -1, -1, -1, 815, 815, 815, -1, 815, + 815, -1, -1, 815, -1, -1, -1, -1, + -1, -1, -1, -1, 815, 815, 815, 815, + 815, -1, 815, 815, 815, -1, -1, 815, + 815, 815, 815, 815, 815, 815, 815, -1, + 815, 815, 815, -1, -1, -1, 815, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 815, 815, -1, -1, 815, -1, -1, + -1, -1, 815, -1, -1, -1, -1, 815, + -1, 815, 815, 815, 815, 815, 456, -1, + 942, 942, 942, 942, 942, -1, -1, -1, + -1, 815, -1, 815, -1, -1, 815, 815, + -1, -1, -1, 815, -1, 815, -1, 815, + 818, 818, 818, 818, 818, 818, 818, 818, + 818, 818, 818, 818, 818, 818, 818, 818, + 818, 818, 818, 818, 818, 818, 818, -1, + 818, 818, 818, 818, 818, 818, -1, 818, + 818, 818, 818, -1, 818, -1, 818, 818, + 818, -1, 818, 818, 818, 818, 818, 818, + -1, 818, 818, 818, 818, 818, 818, 818, + 818, 818, 818, 818, 818, 818, 818, 818, + -1, 193, -1, -1, -1, -1, 818, 818, + 818, 818, 192, -1, -1, 818, 818, -1, + 818, 818, 818, 818, 818, 818, 818, 818, + 818, 818, 818, 818, -1, -1, -1, -1, + 456, 818, -1, -1, -1, -1, -1, 942, + 942, 942, 942, 460, 939, 939, 939, 942, + 939, -1, -1, -1, -1, 942, -1, 942, + 942, 939, 939, 457, 458, 459, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 815, -1, -1, + 818, 818, 818, 818, -1, -1, 818, 818, + 818, 818, 818, 818, -1, -1, -1, 818, + 818, 818, 818, 818, -1, -1, -1, -1, + 818, -1, -1, -1, 818, 818, 818, -1, + 818, 818, -1, -1, 818, -1, -1, -1, + -1, -1, -1, -1, -1, 818, 818, 818, + 818, 818, -1, 818, 818, 818, -1, -1, + 818, 818, 818, 818, 818, 818, 818, 818, + -1, 818, 818, 818, -1, -1, -1, 818, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 818, 818, -1, -1, 818, -1, + -1, -1, -1, 818, -1, -1, -1, -1, + 818, -1, 818, 818, 818, 818, 818, 456, + -1, 942, 942, 942, 942, 942, -1, -1, + -1, -1, 818, -1, 818, -1, -1, 818, + 818, -1, -1, -1, 818, -1, 818, -1, + 818, 821, 821, 821, 821, 821, 821, 821, + 821, 821, 821, 821, 821, 821, 821, 821, + 821, 821, 821, 821, 821, 821, 821, 821, + -1, 821, 821, 821, 821, 821, 821, -1, + 821, 821, 821, 821, -1, 821, -1, 821, + 821, 821, -1, 821, 821, 821, 821, 821, + 821, -1, 821, 821, 821, 821, 821, 821, + 821, 821, 821, 821, 821, 821, 821, 821, + 821, -1, 821, -1, -1, -1, -1, 821, + 821, 821, 821, 821, 465, -1, 821, 821, + -1, 821, 821, 821, 821, 821, 821, 821, + 821, 821, 821, 821, 821, -1, -1, -1, + -1, -1, 821, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 944, 944, 944, 944, + 944, 944, 944, 944, 944, 944, 461, 462, + 464, 463, 944, -1, 944, 944, 944, 944, + 944, 944, 944, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 818, -1, + -1, 821, 821, 821, 821, -1, -1, 821, + 821, 821, 821, 821, 821, -1, -1, -1, + 821, 821, 821, 821, 821, -1, -1, -1, + -1, 821, -1, -1, -1, 821, 821, 821, + -1, 821, 821, -1, -1, 821, -1, -1, + -1, -1, -1, -1, -1, -1, 821, 821, + 821, 821, 821, -1, 821, 821, 821, -1, + -1, 821, 821, 821, 821, 821, 821, 821, + 821, -1, 821, 821, 821, -1, -1, -1, + 821, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 821, 821, -1, -1, 821, + -1, -1, -1, -1, 821, -1, -1, -1, + -1, 821, -1, 821, 821, 821, 821, 821, + 456, -1, -1, -1, 944, -1, 944, 944, + 944, 944, 944, 821, -1, 821, -1, -1, + 821, 821, -1, -1, -1, 821, -1, 821, + -1, 821, 826, 826, 826, 826, 826, 826, + 826, 826, 826, 826, 826, 826, 826, 826, + 826, 826, 826, 826, 826, 826, 826, 826, + 826, -1, 826, 826, 826, 826, 826, 826, + -1, 826, 826, 826, 826, -1, 826, -1, + 826, 826, 826, -1, 826, 826, 826, 826, + 826, 826, -1, 826, 826, 826, 826, 826, + 826, 826, 826, 826, 826, 826, 826, 826, + 826, 826, -1, 826, -1, -1, -1, -1, + 826, 826, 826, 826, 826, 465, -1, 826, + 826, -1, 826, 826, 826, 826, 826, 826, + 826, 826, 826, 826, 826, 826, -1, -1, + -1, -1, -1, 826, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 945, 945, 945, + 945, 945, 945, 945, 945, 945, 945, 461, + 462, 464, 463, 945, -1, 945, 945, 945, + 945, 945, 945, 945, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 821, + -1, -1, 826, 826, 826, 826, -1, -1, + 826, 826, 826, 826, 826, 826, -1, -1, + -1, 826, 826, 826, 826, 826, -1, -1, + -1, -1, 826, -1, -1, -1, 826, 826, + 826, -1, 826, 826, -1, -1, 826, -1, + -1, -1, -1, -1, -1, -1, -1, 826, + 826, 826, 826, 826, -1, 826, 826, 826, + -1, -1, 826, 826, 826, 826, 826, 826, + 826, 826, -1, 826, 826, 826, -1, -1, + -1, 826, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 826, 826, -1, -1, + 826, -1, -1, -1, -1, 826, -1, -1, + -1, -1, 826, -1, 826, 826, 826, 826, + 826, 456, -1, -1, -1, 945, -1, 945, + 945, 945, 945, 945, 826, -1, 826, -1, + -1, 826, 826, -1, -1, -1, 826, -1, + 826, -1, 826, 830, 830, 830, 830, 830, + 830, 830, 830, 830, 830, 830, 830, 830, + 830, 830, 830, 830, 830, 830, 830, 830, + 830, 830, -1, 830, 830, 830, 830, 830, + 830, -1, 830, 830, 830, 830, -1, 830, + -1, 830, 830, 830, -1, 830, 830, 830, + 830, 830, 830, -1, 830, 830, 830, 830, + 830, 830, 830, 830, 830, 830, 830, 830, + 830, 830, 830, -1, 830, -1, -1, -1, + -1, 830, 830, 830, 830, 830, 465, -1, + 830, 830, -1, 830, 830, 830, 830, 830, + 830, 830, 830, 830, 830, 830, 830, -1, + -1, -1, -1, -1, 830, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 946, 946, + 946, 946, 946, 946, 946, 946, 946, 946, + 461, 462, 464, 463, 946, -1, 946, 946, + 946, 946, 946, 946, 946, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 826, -1, -1, 830, 830, 830, 830, -1, + -1, 830, 830, 830, 830, 830, 830, -1, + -1, -1, 830, 830, 830, 830, 830, -1, + -1, -1, -1, 830, -1, -1, -1, 830, + 830, 830, -1, 830, 830, -1, -1, 830, + -1, -1, -1, -1, -1, -1, -1, -1, + 830, 830, 830, 830, 830, -1, 830, 830, + 830, -1, -1, 830, 830, 830, 830, 830, + 830, 830, 830, -1, 830, 830, 830, -1, + -1, -1, 830, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 830, 830, -1, + -1, 830, -1, -1, -1, -1, 830, -1, + -1, -1, -1, 830, -1, 830, 830, 830, + 830, 830, -1, -1, -1, -1, 946, -1, + 946, 946, 946, 946, 946, 830, -1, 830, + -1, -1, 830, 830, -1, -1, -1, 830, + -1, 830, -1, 830, 833, 833, 833, 833, + 833, 833, 833, 833, 833, 833, 833, 833, + 833, 833, 833, 833, 833, 833, 833, 833, + 833, 833, 833, -1, 833, 833, 833, 833, + 833, 833, -1, 833, 833, 833, 833, -1, + 833, -1, 833, 833, 833, -1, 833, 833, + 833, 833, 833, 833, -1, 833, 833, 833, + 833, 833, 833, 833, 833, 833, 833, 833, + 833, 833, 833, 833, -1, 833, -1, -1, + -1, -1, 833, 833, 833, 833, 833, 465, + -1, 833, 833, -1, 833, 833, 833, 833, + 833, 833, 833, 833, 833, 833, 833, 833, + -1, -1, -1, -1, -1, 833, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 943, + 943, 943, 943, 943, 943, 943, 943, 943, + 943, 461, 462, 464, 463, 943, -1, 943, + 943, 943, 943, 943, 943, 943, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 830, -1, -1, 833, 833, 833, 833, + -1, -1, 833, 833, 833, 833, 833, 833, + -1, -1, -1, 833, 833, 833, 833, 833, + -1, -1, -1, -1, 833, -1, -1, -1, + 833, 833, 833, -1, 833, 833, -1, -1, + 833, -1, -1, -1, -1, -1, -1, -1, + -1, 833, 833, 833, 833, 833, -1, 833, + 833, 833, -1, -1, 833, 833, 833, 833, + 833, 833, 833, 833, -1, 833, 833, 833, + -1, -1, -1, 833, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 833, 833, + -1, -1, 833, -1, -1, -1, -1, 833, + -1, -1, -1, -1, 833, -1, 833, 833, + 833, 833, 833, -1, -1, -1, -1, 943, + -1, 943, 943, 943, 943, 943, 833, -1, + 833, -1, -1, 833, 833, -1, -1, -1, + 833, -1, 833, -1, 833, 834, 834, 834, + 834, 834, 834, 834, 834, 834, 834, 834, + 834, 834, 834, 834, 834, 834, 834, 834, + 834, 834, 834, 834, -1, 834, 834, 834, + 834, 834, 834, -1, 834, 834, 834, 834, + -1, 834, -1, 834, 834, 834, -1, 834, + 834, 834, 834, 834, 834, -1, 834, 834, + 834, 834, 834, 834, 834, 834, 834, 834, + 834, 834, 834, 834, 834, -1, 834, -1, + -1, -1, -1, 834, 834, 834, 834, 834, + 965, -1, 834, 834, -1, 834, 834, 834, + 834, 834, 834, 834, 834, 834, 834, 834, + 834, -1, -1, -1, -1, -1, 834, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 965, 965, 965, 965, 965, 965, 965, 965, + 965, 965, 965, 965, 965, 965, 965, -1, + 965, 965, 965, 965, 965, 965, 965, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 833, -1, -1, 834, 834, 834, + 834, -1, -1, 834, 834, 834, 834, 834, + 834, -1, -1, -1, 834, 834, 834, 834, + 834, -1, -1, -1, -1, 834, -1, -1, + -1, 834, 834, 834, -1, 834, 834, -1, + -1, 834, -1, -1, -1, -1, -1, -1, + -1, -1, 834, 834, 834, 834, 834, -1, + 834, 834, 834, -1, -1, 834, 834, 834, + 834, 834, 834, 834, 834, -1, 834, 834, + 834, -1, -1, -1, 834, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 834, + 834, -1, -1, 834, -1, -1, -1, -1, + 834, -1, -1, -1, -1, 834, -1, 834, + 834, 834, 834, 834, -1, -1, -1, -1, + 965, -1, 965, 965, 965, 965, 965, 834, + -1, 834, -1, -1, 834, 834, -1, -1, + -1, 834, -1, 834, -1, 834, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, -1, 835, 835, + 835, 835, 835, 835, -1, 835, 835, 835, + 835, -1, 835, -1, 835, 835, 835, -1, + 835, 835, 835, 835, 835, 835, -1, 835, + 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, -1, 835, + -1, -1, -1, -1, 835, 835, 835, 835, + 835, 959, -1, 835, 835, -1, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, -1, -1, -1, -1, -1, 835, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, + -1, 959, 959, 959, 959, 959, 959, 959, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 834, -1, -1, 835, 835, + 835, 835, -1, -1, 835, 835, 835, 835, + 835, 835, -1, -1, -1, 835, 835, 835, + 835, 835, -1, -1, -1, -1, 835, -1, + -1, -1, 835, 835, 835, -1, 835, 835, + -1, -1, 835, -1, -1, -1, -1, -1, + -1, -1, -1, 835, 835, 835, 835, 835, + -1, 835, 835, 835, -1, -1, 835, 835, + 835, 835, 835, 835, 835, 835, -1, 835, + 835, 835, -1, -1, -1, 835, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 835, 835, -1, -1, 835, -1, -1, -1, + -1, 835, -1, -1, -1, -1, 835, -1, + 835, 835, 835, 835, 835, -1, -1, -1, + -1, 959, -1, 959, 959, 959, 959, 959, + 835, -1, 835, -1, -1, 835, 835, -1, + -1, -1, 835, -1, 835, -1, 835, 77, + 78, 79, 80, -1, 76, -1, -1, -1, + -1, -1, -1, -1, -1, 100, 96, 98, + 94, 92, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 87, -1, -1, -1, 88, + 85, 84, 86, -1, -1, -1, 72, 73, + 74, -1, -1, -1, -1, 1006, 71, -1, + 104, 106, 108, 110, -1, -1, -1, -1, + -1, -1, -1, 75, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 66, 67, 68, 69, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 842, 842, 842, 842, + 842, 842, 842, 842, 842, 842, 842, 842, + 842, 842, 842, 842, 842, 842, 842, 842, + 842, 842, 842, -1, 842, 842, 842, 842, + 842, 842, -1, 842, 842, 842, 842, -1, + 842, -1, 842, 842, 842, -1, 842, 842, + 842, 842, 842, 842, 835, 842, 842, 842, + 842, 842, 842, 842, 842, 842, 842, 842, + 842, 842, 842, 842, -1, 842, -1, -1, + -1, -1, 842, 842, 842, 842, 842, -1, + -1, 842, 842, -1, 842, 842, 842, 842, + 842, 842, 842, 842, 842, 842, 842, 842, + -1, -1, -1, -1, -1, 842, -1, -1, + 170, 62, 63, 64, 65, -1, 70, 82, + 90, -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, 102, + 89, 81, 132, 58, 842, 842, 842, 842, + -1, -1, 842, 842, 842, 842, 842, 842, + -1, -1, -1, 842, 842, 842, 842, 842, + -1, -1, -1, -1, 842, -1, -1, -1, + 842, 842, 842, -1, 842, 842, -1, -1, + 842, -1, -1, -1, -1, -1, -1, -1, + -1, 842, 842, 842, 842, 842, -1, 842, + 842, 842, -1, -1, 842, 842, 842, 842, + 842, 842, 842, 842, -1, 842, 842, 842, + -1, -1, -1, 842, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 842, 842, + -1, -1, 842, -1, -1, -1, -1, 842, + -1, -1, -1, -1, 842, -1, 842, 842, + 842, 842, 842, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 842, -1, + 842, -1, -1, 842, 842, -1, -1, -1, + 842, -1, 842, -1, 842, 77, 78, 79, + 80, -1, 76, -1, -1, -1, -1, -1, + -1, -1, -1, 100, 96, 98, 94, 92, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 87, 961, -1, -1, 88, 85, 84, + 86, -1, -1, -1, 72, 73, 74, -1, + -1, -1, -1, 1006, 71, -1, 104, 106, + 108, 110, -1, -1, -1, -1, -1, -1, + -1, 75, 961, 961, 961, 961, 961, 961, + 961, 961, 961, 961, 961, 961, 961, 961, + 961, 961, 961, 961, 961, 961, 961, 961, + 961, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 931, 931, 931, 931, 931, 931, + 931, 931, 931, 931, 931, 931, 931, 931, + 931, 931, 931, 931, 931, 931, 931, 931, + 931, -1, 931, 931, 931, 931, 931, 931, + -1, 931, 931, 931, 931, -1, 931, -1, + 931, 931, 931, -1, 931, 931, 931, 931, + 931, 931, 842, 931, 931, 931, 931, 931, + 931, 931, 931, 931, 931, 931, 931, 931, + 931, 931, -1, 931, -1, -1, -1, -1, + 931, 931, 931, 931, 931, -1, -1, 931, + 931, -1, 931, 931, 931, 931, 931, 931, + 931, 931, 931, 931, 931, 931, -1, -1, + -1, -1, -1, 931, -1, -1, -1, -1, + -1, -1, -1, -1, 144, 82, 90, -1, + -1, -1, 961, -1, 961, 961, 961, 961, + 961, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 102, 89, 81, + 132, 58, 931, 931, 931, 931, -1, -1, + 931, 931, 931, 931, 931, 931, -1, -1, + -1, 931, 931, 931, 931, 931, -1, -1, + -1, -1, 931, -1, -1, -1, 931, 931, + 931, -1, 931, 931, -1, -1, 931, -1, + -1, -1, -1, -1, -1, -1, -1, 931, + 931, 931, 931, 931, -1, 931, 931, 931, + -1, -1, 931, 931, 931, 931, 931, 931, + 931, 931, -1, 931, 931, 931, -1, -1, + -1, 931, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 931, 931, -1, -1, + 931, -1, -1, -1, -1, 931, -1, -1, + -1, -1, 931, -1, 931, 931, 931, 931, + 931, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 962, 931, -1, 931, -1, + -1, 931, 931, -1, -1, -1, 931, -1, + 931, -1, 931, -1, -1, -1, -1, -1, + -1, -1, 170, 62, 63, 64, 65, -1, + 70, 82, 90, 962, 962, 962, 962, 962, + 962, 962, 962, 962, 962, 962, 962, 962, + 962, 962, 962, 962, 962, 962, 962, 962, + 962, 962, -1, -1, -1, -1, -1, -1, + -1, 102, 89, 81, 132, 58, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 930, 930, 930, 930, 930, 930, 930, + 930, 930, 930, 930, 930, 930, 930, 930, + 930, 930, 930, 930, 930, 930, 930, 930, + -1, 930, 930, 930, 930, 930, 930, -1, + 930, 930, 930, 930, -1, 930, -1, 930, + 930, 930, -1, 930, 930, 930, 930, 930, + 930, -1, 930, 930, 930, 930, 930, 930, + 930, 930, 930, 930, 105, 107, 109, 111, + 930, -1, 930, -1, -1, -1, -1, 930, + 930, 930, 930, 930, 952, -1, 930, 930, + 931, 930, 930, 930, 930, 930, 930, 930, + 930, 930, 930, 930, 930, -1, -1, -1, + -1, -1, 930, 962, -1, 962, 962, 962, + 962, 962, -1, -1, 952, 952, 952, 952, + 952, 952, 952, 952, 952, 952, 952, 952, + 952, 952, 952, -1, 952, 952, 952, 952, + 952, 952, 952, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 930, 930, 930, 930, -1, -1, 930, + 930, 930, 930, 930, 930, -1, -1, -1, + 930, 930, 930, 930, 930, -1, -1, -1, + -1, 930, -1, -1, -1, 930, 930, 930, + -1, 930, 930, -1, -1, 930, -1, -1, + -1, -1, -1, -1, -1, -1, 930, 930, + 930, 930, 930, -1, 930, 930, 930, -1, + -1, 930, 930, 930, 930, 930, 930, 930, + 930, -1, 930, 930, 930, -1, -1, -1, + 930, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 930, 930, -1, -1, 930, + -1, -1, -1, -1, 930, -1, -1, -1, + -1, 930, -1, 103, 197, 930, 930, 930, + -1, -1, -1, -1, 952, -1, 952, 952, + 952, 952, 952, 930, -1, 930, -1, -1, + 930, 930, -1, -1, -1, 930, -1, 930, + -1, 930, -1, -1, -1, -1, -1, -1, + -1, -1, 890, 890, 890, 890, -1, 890, + -1, -1, -1, -1, -1, -1, -1, -1, + 890, 890, 890, 890, 890, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 890, -1, + -1, -1, 890, 890, 890, 890, 144, 82, + 90, 890, 890, 890, -1, -1, -1, -1, + 890, 890, -1, 1004, 1004, 1004, 890, 1003, + -1, -1, -1, -1, -1, -1, 890, -1, + -1, -1, -1, -1, -1, -1, -1, 102, + 89, 81, 132, 58, 890, 890, 890, 890, + 77, 78, 79, 80, -1, 76, -1, -1, + -1, -1, -1, -1, -1, -1, 100, 96, + 98, 94, 92, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 87, -1, -1, -1, + 88, 85, 84, 86, -1, -1, -1, 72, + 73, 74, -1, -1, -1, -1, 1006, 71, + -1, 104, 106, 108, 110, -1, -1, 930, + -1, -1, -1, -1, 75, 788, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 66, 67, 68, 69, -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, 890, 890, 890, 890, 890, + -1, 890, 890, 890, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 168, 169, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 167, -1, 890, 890, 890, 890, 890, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 208, + 166, -1, -1, -1, -1, -1, -1, -1, + -1, 209, 62, 63, 64, 65, -1, 70, + 82, 90, -1, -1, -1, -1, -1, -1, + -1, 77, 78, 79, 80, -1, 76, -1, + -1, -1, -1, -1, -1, -1, -1, 100, + 96, 98, 94, 92, -1, -1, -1, -1, + 102, 89, 81, 132, 58, 87, -1, -1, + -1, 88, 85, 84, 86, -1, -1, -1, + 72, 73, 74, -1, -1, -1, -1, 1006, + 71, -1, 104, 106, 108, 110, -1, 77, + 78, 79, 80, -1, 76, 75, 788, -1, + -1, -1, -1, -1, -1, 100, 96, 98, + 94, 92, -1, 66, 67, 68, 69, -1, + -1, -1, -1, 87, -1, -1, -1, 88, + 85, 84, 86, -1, -1, -1, 72, 73, + 74, -1, -1, -1, -1, 1006, 71, -1, + 104, 106, 108, 110, -1, -1, -1, -1, + -1, -1, -1, 75, 788, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 66, 67, 68, 69, -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, + 210, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 209, 62, 63, 64, 65, -1, + 70, 82, 90, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 102, 196, -1, + -1, 77, 78, 79, 80, -1, 76, -1, + -1, 102, 89, 81, 132, 58, 211, 100, + 96, 98, 94, 92, -1, -1, -1, -1, + 209, 62, 63, 64, 65, 87, 70, 82, + 90, 88, 85, 84, 86, -1, -1, -1, + 72, 73, 74, -1, -1, -1, -1, 1006, + 71, -1, 104, 106, 108, 110, -1, -1, + -1, -1, -1, -1, -1, 75, 788, 102, + 89, 81, 132, 58, -1, -1, -1, -1, + -1, -1, -1, 66, 67, 68, 69, -1, + 48, 49, 50, 51, 77, 78, 79, 80, + -1, 76, -1, 34, 35, 38, 36, -1, + -1, -1, 100, 96, 98, 94, 92, -1, + -1, -1, 39, 40, 41, -1, -1, -1, + 87, -1, -1, -1, 88, 85, 84, 86, + -1, -1, -1, 72, 73, 74, -1, -1, + -1, -1, 56, 71, -1, 104, 106, 108, + 110, -1, -1, -1, -1, -1, -1, -1, + 75, -1, 259, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, -1, -1, 182, 183, -1, -1, + -1, -1, -1, 890, 890, 890, 890, -1, + 890, -1, -1, -1, -1, -1, -1, -1, + 212, 890, 890, 890, 890, 890, -1, -1, + -1, -1, 209, 62, 63, 64, 65, 890, + 70, 82, 90, 890, 890, 890, 890, -1, + -1, -1, 890, 890, 890, -1, -1, -1, + -1, 890, 890, -1, 1004, 1004, 1004, 890, + 999, -1, -1, -1, -1, -1, -1, 890, + -1, 102, 89, 81, 132, 58, -1, -1, + -1, -1, -1, -1, -1, 890, 890, 890, + 890, -1, -1, -1, 168, 169, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 260, + -1, -1, 167, -1, -1, 258, -1, -1, + -1, -1, 33, 31, 32, 52, 62, 63, + 64, 65, -1, 70, 82, 90, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 208, 166, -1, -1, -1, -1, -1, + -1, -1, -1, 209, 62, 63, 64, 65, + -1, 70, 82, 90, 102, 89, 81, 37, + 58, -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, 102, 89, 81, 132, 58, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 890, 890, 890, 890, + 890, -1, 890, 890, 890, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 396, 397, -1, -1, -1, + -1, -1, -1, -1, 395, -1, -1, -1, + -1, -1, -1, 890, 890, 890, 890, 890, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 394, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 890, 890, 890, 890, + -1, 890, -1, -1, -1, -1, -1, -1, + -1, -1, 890, 890, 890, 890, 890, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 890, -1, -1, -1, 890, 890, 890, 890, + -1, -1, -1, 890, 890, 890, -1, -1, + -1, -1, 890, 890, -1, 1004, 1004, 1004, + 890, -1, 210, -1, -1, -1, -1, -1, + 890, -1, -1, -1, 209, 62, 63, 64, + 65, -1, 70, 82, 90, -1, 890, 890, + 890, 890, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1003, -1, -1, -1, -1, + -1, -1, -1, 953, -1, -1, -1, -1, + -1, -1, -1, 102, 89, 81, 132, 58, + 211, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 209, 62, 63, 64, 65, -1, + 70, 82, 90, 953, 953, 953, 953, 953, + 953, 953, 953, 953, 953, 953, 953, 953, + 953, 953, -1, 953, 953, 953, 953, 953, + 953, 953, -1, -1, -1, -1, -1, -1, + -1, 102, 89, 81, 132, 58, -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, 890, 890, 890, + 890, 890, -1, 890, 890, 890, -1, -1, + -1, 954, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 168, 169, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 167, -1, 890, 890, 890, 890, + 890, 954, 954, 954, 954, 954, 954, 954, + 954, 954, 954, 954, 954, 954, 954, 954, + -1, 954, 954, 954, 954, 954, 954, 954, + -1, -1, 300, -1, -1, -1, -1, -1, + -1, -1, -1, 953, -1, 953, 953, 953, + 953, 953, 212, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 209, 62, 63, 64, + 65, -1, 70, 82, 90, -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, 102, 89, 81, 132, 58, + -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, 260, -1, -1, -1, -1, -1, 258, + -1, -1, -1, -1, 33, 31, 32, 52, + 62, 63, 64, 65, -1, 70, 82, 90, + -1, 954, -1, 954, 954, 954, 954, 954, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 102, 89, + 81, 37, 58, 832, 832, 832, 832, 832, + 832, 832, 832, 832, 832, 832, 832, 832, + 832, 832, 832, 832, 832, 832, 832, 832, + 832, 832, -1, 832, 832, 832, 832, 832, + 832, -1, 832, 832, 832, 832, -1, 832, + -1, 832, 832, 832, -1, 832, 832, 832, + 832, 832, 832, -1, 832, 832, 832, 832, + 832, 832, 832, 832, 832, 832, 832, 832, + 832, 832, 832, -1, 832, 396, 397, -1, + -1, 199, 832, 832, 832, 832, 395, -1, + 832, 832, -1, 832, 832, 832, 832, 832, + 832, 832, 832, 832, 832, 832, 832, -1, + -1, -1, -1, -1, 832, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 394, -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, 832, 832, 832, 832, -1, + -1, 832, 832, 832, 832, 832, 832, -1, + -1, -1, 832, 832, 832, 832, 832, -1, + -1, -1, -1, 832, -1, -1, -1, 832, + 832, 832, -1, 832, 832, -1, -1, 832, + -1, -1, -1, -1, -1, -1, -1, -1, + 832, 832, 832, 832, 832, -1, 832, 832, + 832, -1, -1, 832, 832, 832, 832, 832, + 832, 832, 832, -1, 832, 832, 832, -1, + -1, -1, 832, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 832, 832, -1, + -1, 832, -1, -1, -1, -1, 832, -1, + -1, -1, -1, 832, -1, 832, 832, 832, + 832, 832, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 832, -1, 832, + -1, -1, 832, 832, -1, -1, -1, 832, + -1, 832, -1, 832, 778, 778, 778, 778, + 778, 778, 778, 778, 778, 778, 778, 778, + 778, 778, 778, 778, 778, 778, 778, 778, + 778, 778, 778, -1, 778, 778, 778, 778, + 778, 778, -1, 778, 778, 778, 778, -1, + 778, -1, 778, 778, 778, -1, 778, 778, + 778, 778, 778, 778, -1, 778, 778, 778, + 778, 778, 778, 778, 778, 778, 955, 778, + 778, 778, 778, -1, -1, -1, -1, -1, + -1, -1, 778, -1, -1, 778, 168, 169, + -1, -1, -1, -1, -1, -1, -1, -1, + 778, 778, 778, 778, 167, -1, 955, 955, + 955, 955, 955, 955, 955, 955, 955, 955, + 955, 955, 955, 955, 955, -1, 955, 955, + 955, 955, 955, 955, 955, -1, -1, -1, + -1, -1, -1, -1, 300, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 832, -1, -1, 778, 778, 778, 778, + -1, -1, 778, 778, -1, 778, 778, 778, + -1, -1, -1, 778, 778, -1, 778, 778, + -1, -1, -1, -1, 778, -1, -1, -1, + 778, 778, 778, -1, 778, 778, -1, -1, + 778, -1, -1, -1, -1, -1, -1, -1, + -1, 778, 778, 778, 778, -1, -1, -1, + 778, 778, -1, -1, 778, 778, 778, 778, + 778, 778, 778, 778, -1, 778, 778, 778, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 955, -1, + 955, 955, 955, 955, 955, -1, 778, 778, + 778, 778, 778, -1, 48, 49, 50, 51, + 77, 78, 79, 80, -1, 76, 778, 34, + 35, 38, 36, 778, -1, -1, 100, 96, + 98, 94, 92, -1, -1, -1, 39, 40, + 41, -1, -1, -1, 87, -1, -1, -1, + 88, 85, 84, 86, -1, -1, -1, 72, + 73, 74, -1, -1, -1, -1, 56, 71, + -1, 104, 106, 108, 110, -1, -1, -1, + -1, -1, -1, -1, 75, -1, 259, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 66, 67, 68, 69, -1, -1, + 182, 183, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 799, 799, 799, 799, 799, 799, 799, 799, + 799, 799, 799, 799, 799, 799, -1, 799, + 799, 799, 799, 799, 799, -1, -1, -1, + 799, 799, 799, 799, 799, 799, -1, 799, + 799, 799, 799, -1, 799, -1, 799, 799, + 799, -1, 799, 799, 799, 799, 799, 799, + -1, 799, 799, 799, 799, 799, 799, 799, + 799, 799, -1, 799, 799, 799, 799, -1, + -1, -1, 778, -1, -1, -1, 799, -1, + -1, -1, -1, -1, 181, -1, -1, -1, + -1, -1, -1, 260, 799, 799, 799, 799, + -1, 261, -1, -1, -1, -1, 33, 31, + 32, 52, 62, 63, 64, 65, -1, 70, + 82, 90, -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, + 102, 89, 81, 37, 58, -1, -1, -1, + 799, 799, 799, 799, -1, -1, 799, 799, + 799, 799, 799, 799, -1, -1, -1, 799, + 799, 799, 799, 799, -1, -1, -1, -1, + 799, -1, -1, -1, 799, 799, 799, -1, + 799, 799, -1, -1, 799, -1, -1, -1, + -1, -1, -1, -1, -1, 799, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 268, + 799, 799, 799, 799, 799, 799, 799, 799, + -1, 799, 799, 799, -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, 799, 799, 799, 799, 799, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 799, -1, 799, -1, 779, 779, + 779, 779, 779, 779, 779, 779, 779, 779, + 779, 779, 779, 779, 779, 779, 779, 779, + 779, 779, 779, 779, 779, -1, 779, 779, + 779, 779, 779, 779, -1, 779, 779, 779, + 779, -1, 779, -1, 779, 779, 779, -1, + 779, 779, 779, 779, 779, 779, -1, 779, + 779, 779, 779, 779, 779, 779, 779, 779, + -1, 779, 779, 779, 779, -1, -1, -1, + -1, -1, -1, -1, 779, -1, -1, 779, + -1, 678, 678, 678, 678, 678, 678, -1, + -1, -1, 779, 779, 779, 779, -1, -1, + 182, 183, -1, -1, -1, -1, -1, -1, + -1, 678, 678, 678, 678, 678, 678, -1, + 678, -1, -1, -1, -1, -1, -1, -1, + 678, -1, -1, -1, -1, -1, -1, 678, + 678, -1, -1, -1, -1, 678, 678, 678, + -1, 678, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 779, 779, + 779, 779, -1, -1, 779, 779, 799, 779, + 779, 779, -1, -1, -1, 779, 779, -1, + 779, 779, -1, -1, -1, -1, 779, -1, + -1, -1, 779, 779, 779, -1, 779, 779, + -1, -1, 779, -1, -1, -1, -1, -1, + -1, -1, -1, 779, 779, 779, 779, -1, + -1, -1, 779, 779, -1, -1, 779, 779, + 779, 779, 779, 779, 779, 779, -1, 779, + 779, 779, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 678, 678, -1, -1, 678, + -1, 678, 678, -1, 678, -1, -1, -1, + 678, 678, 678, 678, 678, -1, -1, -1, + 779, 779, 779, 779, 779, 678, 678, 678, + -1, 678, 678, -1, -1, 678, -1, -1, + 779, -1, -1, -1, -1, 779, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 678, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 678, 678, -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, 678, -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, 260, -1, -1, + -1, -1, -1, 261, -1, -1, -1, -1, + 33, 31, 32, 52, 62, 63, 64, 65, + -1, 70, 82, 90, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 779, -1, -1, -1, + -1, -1, 102, 89, 81, 37, 58, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 847, 847, 847, 847, 847, 847, 847, + 847, 847, 847, 847, 847, 847, 847, 847, + 847, 847, 847, 847, 847, 847, 847, 847, + -1, 847, 847, 847, 847, 847, 847, -1, + 847, 847, 847, 847, -1, 847, -1, 847, + 847, 847, -1, 847, 847, 847, 847, 847, + 847, 268, 847, 847, 847, 847, 847, 847, + 847, 847, 847, 847, 847, 847, 847, 847, + 847, -1, 847, -1, -1, -1, -1, 847, + 847, 847, 847, 847, -1, -1, 847, 847, + -1, 847, 847, 847, 847, 847, 847, 847, + 847, 847, 847, 847, 847, -1, -1, -1, + -1, -1, 847, -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, 847, 847, 847, 847, -1, -1, 847, + 847, 847, 847, 847, 847, -1, -1, -1, + 847, 847, 847, 847, 847, -1, -1, -1, + -1, 847, -1, -1, -1, 847, 847, 847, + -1, 847, 847, -1, -1, 847, -1, -1, + -1, -1, -1, -1, -1, -1, 847, 847, + 847, 847, 847, -1, 847, 847, 847, -1, + -1, 847, 847, 847, 847, 847, 847, 847, + 847, -1, 847, 847, 847, -1, -1, -1, + 847, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 847, 847, -1, -1, 847, + -1, -1, -1, -1, 847, -1, -1, -1, + -1, 847, -1, 847, 847, 847, 847, 847, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 847, -1, 847, -1, -1, + 847, 847, -1, -1, -1, 847, -1, 847, + -1, 847, 48, 49, 50, 51, 77, 78, + 79, 80, 985, 76, -1, 34, 35, 38, + 36, -1, -1, -1, 100, 96, 98, 94, + 92, -1, -1, -1, 39, 40, 41, -1, + -1, -1, 87, -1, -1, -1, 88, 85, + 84, 86, -1, -1, -1, 72, 73, 74, + -1, -1, -1, -1, 56, 71, -1, 104, + 106, 108, 110, -1, -1, -1, -1, -1, + -1, -1, 75, -1, -1, 985, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 66, 67, 68, 69, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 799, 799, + 799, 799, 799, 799, 799, 799, 799, 799, + 799, 799, 799, 799, -1, 799, 799, 799, + 799, 799, 799, -1, -1, -1, 799, 799, + 799, 799, 799, 799, -1, 799, 799, 799, + 799, -1, 799, -1, 799, 799, 799, 847, + 799, 799, 799, 799, 799, 799, -1, 799, + 799, 799, 799, 799, 799, 799, 799, 799, + -1, 799, 799, 799, 799, -1, -1, -1, + -1, -1, -1, -1, 799, -1, -1, -1, + -1, -1, 181, -1, -1, -1, -1, -1, + -1, 272, 799, 799, 799, 799, -1, -1, + 985, 985, 270, -1, 33, 31, 32, 52, + 62, 63, 64, 65, -1, 70, 82, 90, + -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, 102, 89, + 81, 37, 58, -1, -1, -1, 799, 799, + 799, 799, -1, -1, 799, 799, -1, 799, + 799, 799, -1, 271, -1, 799, 799, -1, + 799, 799, -1, -1, -1, -1, 799, -1, + -1, -1, 799, 799, 799, -1, 799, 799, + -1, -1, 799, -1, -1, -1, -1, -1, + -1, -1, -1, 799, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 273, 799, 799, + 799, 799, 799, 799, 799, 799, -1, 799, + 799, 799, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 77, 78, 79, 80, + -1, 76, -1, -1, -1, -1, -1, -1, + -1, -1, 100, 96, 98, 94, 92, -1, + 799, 799, 799, 799, 799, -1, -1, -1, + 87, -1, -1, -1, 88, 85, 84, 86, + 799, -1, -1, 72, 73, 74, -1, -1, + -1, -1, 1006, 71, -1, 104, 106, 108, + 110, -1, 77, 78, 79, 80, -1, 76, + 75, 788, -1, -1, -1, -1, -1, -1, + 100, 96, 98, 94, 92, -1, 66, 67, + 68, 69, -1, -1, -1, -1, 87, -1, + -1, -1, 88, 85, 84, 86, -1, -1, + -1, 72, 73, 74, -1, -1, -1, -1, + 1006, 71, -1, 104, 106, 108, 110, -1, + -1, -1, -1, -1, -1, -1, 75, 788, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 66, 67, 68, 69, + -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, 275, -1, -1, -1, -1, + -1, -1, -1, -1, 799, 209, 62, 63, + 64, 65, -1, 70, 82, 90, -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, 102, 89, 81, 132, + 58, 276, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 209, 62, 63, 64, 65, + -1, 70, 82, 90, -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, 102, 89, 81, 132, 58, -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, + 733, 733, 733, 733, 733, 733, 733, 733, + 733, 733, 733, 733, 733, 733, -1, 733, + 733, 733, 733, 733, 733, -1, -1, -1, + 733, 733, 733, 733, 733, 733, -1, 733, + 733, 733, 733, -1, 733, -1, 733, 733, + 733, -1, 733, 733, 733, 733, 733, 733, + 154, 733, 733, 733, 733, 733, 733, 733, + 733, 733, 738, 733, 733, 733, 733, -1, + -1, -1, -1, -1, -1, -1, 733, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 272, 733, 733, 733, 733, + -1, -1, -1, -1, 270, -1, 33, 31, + 32, 52, 62, 63, 64, 65, -1, 70, + 82, 90, -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, + 102, 89, 81, 37, 58, -1, -1, -1, + 733, 733, 733, 733, -1, -1, 733, 733, + 733, 733, 733, 733, -1, 271, -1, 733, + 733, 733, 733, 733, -1, 279, 153, -1, + 733, 733, -1, -1, 733, 733, 733, -1, + 733, 733, -1, -1, 733, -1, -1, -1, + -1, -1, -1, -1, -1, 733, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 273, + 733, 733, 733, 733, 733, 733, 733, 733, + -1, 733, 733, 733, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 25, 26, 979, 23, 21, 24, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 733, 733, 733, 733, 733, -1, + 729, 729, 729, 729, 729, 30, -1, 43, + -1, -1, 733, -1, 733, 733, -1, 44, + -1, -1, -1, -1, -1, -1, 22, 27, + -1, -1, -1, -1, 59, 60, 61, -1, + 54, -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, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 296, 45, -1, -1, 295, -1, + 282, 294, -1, 293, -1, -1, -1, 29, + 292, 283, 291, 284, -1, -1, -1, -1, + -1, -1, -1, -1, 289, 290, 285, -1, + 286, 287, -1, -1, 288, 275, -1, -1, + -1, -1, -1, -1, -1, -1, 733, 209, + 62, 63, 64, 65, -1, 70, 82, 90, + 297, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 729, 729, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 102, 89, + 81, 132, 58, 276, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 209, 62, 63, + 64, 65, -1, 70, 82, 90, -1, -1, + -1, -1, -1, -1, 281, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 102, 89, 81, 132, + 58, 735, 735, 735, 735, 735, 735, 735, + 735, 735, 735, 735, 735, 735, 735, -1, + 735, 735, 735, 735, 735, 735, -1, -1, + -1, 735, 735, 735, 735, 735, 735, -1, + 735, 735, 735, 735, -1, 735, -1, 735, + 735, 735, -1, 735, 735, 735, 735, 735, + 735, 735, 735, 735, 735, 735, 735, 735, + 735, 735, 735, 735, 735, 735, 735, 735, + -1, -1, -1, -1, -1, -1, -1, 735, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 735, 735, 735, + 735, -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, 735, 735, 735, 735, -1, -1, 735, + 735, 735, 735, 735, 735, -1, -1, -1, + 735, 735, 735, 735, 735, -1, 735, 735, + -1, 735, 735, -1, -1, 735, 735, 735, + -1, 735, 735, -1, -1, 735, -1, -1, + -1, -1, -1, -1, -1, -1, 735, -1, + -1, -1, -1, -1, -1, -1, -1, 279, + 153, 735, 735, 735, 735, 735, 735, 735, + 735, -1, 735, 735, 735, -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, 735, 735, 735, 735, 735, + -1, 890, 890, 890, 890, -1, 890, -1, + -1, -1, -1, 735, -1, 735, 735, 890, + 890, 890, 890, 890, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 890, -1, -1, + -1, 890, 890, 890, 890, -1, -1, -1, + 890, 890, 890, -1, -1, -1, -1, 890, + 890, -1, 1004, 1004, 1004, 890, 1003, -1, + -1, -1, -1, -1, -1, 890, -1, -1, + -1, 77, 78, 79, 80, -1, 76, -1, + -1, -1, -1, 890, 890, 890, 890, 100, + 96, 98, 94, 92, -1, -1, -1, -1, + 1003, -1, -1, -1, -1, 87, -1, -1, + -1, 88, 85, 84, 86, -1, -1, -1, + 72, 73, 74, -1, -1, -1, -1, 1006, + 71, -1, 104, 106, 108, 110, -1, -1, + -1, -1, -1, -1, -1, 75, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 66, 67, 68, 69, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 296, 45, -1, -1, + 295, -1, 282, 294, -1, 293, -1, 735, + -1, 29, 292, 283, 291, 284, -1, -1, + -1, -1, -1, -1, -1, -1, 289, 290, + 285, -1, 286, 287, -1, -1, 288, -1, + -1, -1, 890, 890, 890, 890, 890, -1, + 890, 890, 890, -1, -1, -1, -1, -1, + -1, -1, 297, -1, -1, -1, -1, -1, + -1, 168, 169, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 167, + -1, 890, 890, 890, 890, 890, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 313, 62, 63, 64, 65, 314, + 70, 82, 90, -1, -1, -1, 281, -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, 102, 89, 81, 132, 58, 822, 822, + 822, 822, 822, 822, 822, 822, 822, 822, + 822, 822, 822, 822, 822, 822, 822, 822, + 822, 822, 822, 822, 822, -1, 822, 822, + 822, 822, 822, 822, -1, 822, 822, 822, + 822, -1, 822, -1, 822, 822, 822, -1, + 822, 822, 822, 822, 822, 822, -1, 822, + 822, 822, 822, 822, 822, 822, 822, 822, + 822, 822, 822, 822, 822, 822, -1, 822, + -1, -1, -1, -1, 822, 822, 822, 822, + 822, -1, -1, 822, 822, -1, 822, 822, + 822, 822, 822, 822, 822, 822, 822, 822, + 822, 822, -1, -1, -1, -1, -1, 822, + -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, 822, 822, + 822, 822, -1, -1, 822, 822, 822, 822, + 822, 822, -1, -1, -1, 822, 822, 822, + 822, 822, -1, -1, -1, -1, 822, -1, + -1, -1, 822, 822, 822, -1, 822, 822, + -1, -1, 822, -1, -1, -1, -1, -1, + -1, -1, -1, 822, 822, 822, 822, 822, + -1, 822, 822, 822, -1, -1, 822, 822, + 822, 822, 822, 822, 822, 822, -1, 822, + 822, 822, -1, -1, -1, 822, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 822, 822, -1, -1, 822, -1, -1, -1, + -1, 822, -1, -1, -1, -1, 822, -1, + 822, 822, 822, 822, 822, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 822, -1, 822, -1, -1, 822, 822, -1, + -1, -1, 822, -1, 822, -1, 822, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 77, 78, 79, 80, -1, 76, -1, -1, + -1, -1, -1, -1, -1, -1, 100, 96, + 98, 94, 92, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 87, -1, -1, -1, + 88, 85, 84, 86, -1, -1, -1, 72, + 73, 74, -1, -1, -1, -1, 1006, 71, + -1, 104, 106, 108, 110, -1, -1, -1, + -1, -1, -1, -1, 75, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 66, 67, 68, 69, -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, 822, -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, 168, 169, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 167, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 324, 64, 65, -1, 70, + 82, 90, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 313, 62, 63, 64, + 65, 314, 70, 82, 90, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 102, 89, 81, 132, 58, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 102, 89, 81, 132, 58, + 823, 823, 823, 823, 823, 823, 823, 823, + 823, 823, 823, 823, 823, 823, 823, 823, + 823, 823, 823, 823, 823, 823, 823, -1, + 823, 823, 823, 823, 823, 823, -1, 823, + 823, 823, 823, -1, 823, -1, 823, 823, + 823, -1, 823, 823, 823, 823, 823, 823, + -1, 823, 823, 823, 823, 823, 823, 823, + 823, 823, 823, 823, 823, 823, 823, 823, + -1, 823, -1, -1, -1, -1, 823, 823, + 823, 823, 823, -1, -1, 823, 823, -1, + 823, 823, 823, 823, 823, 823, 823, 823, + 823, 823, 823, 823, -1, -1, -1, -1, + -1, 823, -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, + 823, 823, 823, 823, -1, -1, 823, 823, + 823, 823, 823, 823, -1, -1, -1, 823, + 823, 823, 823, 823, -1, -1, -1, -1, + 823, -1, -1, -1, 823, 823, 823, -1, + 823, 823, -1, -1, 823, -1, -1, -1, + -1, -1, -1, -1, -1, 823, 823, 823, + 823, 823, -1, 823, 823, 823, -1, -1, + 823, 823, 823, 823, 823, 823, 823, 823, + -1, 823, 823, 823, -1, -1, -1, 823, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 823, 823, -1, -1, 823, -1, + -1, -1, -1, 823, -1, -1, -1, -1, + 823, -1, 823, 823, 823, 823, 823, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 823, -1, 823, -1, -1, 823, + 823, -1, -1, -1, 823, -1, 823, -1, + 823, 824, 824, 824, 824, 824, 824, 824, + 824, 824, 824, 824, 824, 824, 824, 824, + 824, 824, 824, 824, 824, 824, 824, 824, + -1, 824, 824, 824, 824, 824, 824, -1, + 824, 824, 824, 824, -1, 824, -1, 824, + 824, 824, -1, 824, 824, 824, 824, 824, + 824, -1, 824, 824, 824, 824, 824, 824, + 824, 824, 824, 824, 824, 824, 824, 824, + 824, -1, 824, -1, -1, -1, -1, 824, + 824, 824, 824, 824, -1, -1, 824, 824, + -1, 824, 824, 824, 824, 824, 824, 824, + 824, 824, 824, 824, 824, -1, -1, -1, + -1, -1, 824, -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, 823, -1, + -1, 824, 824, 824, 824, -1, -1, 824, + 824, 824, 824, 824, 824, -1, -1, -1, + 824, 824, 824, 824, 824, -1, -1, -1, + -1, 824, -1, -1, -1, 824, 824, 824, + -1, 824, 824, -1, -1, 824, -1, -1, + -1, -1, -1, -1, -1, -1, 824, 824, + 824, 824, 824, -1, 824, 824, 824, -1, + -1, 824, 824, 824, 824, 824, 824, 824, + 824, -1, 824, 824, 824, 324, 64, 65, + 824, 70, 82, 90, -1, -1, -1, -1, + -1, -1, -1, 824, 824, -1, -1, 824, + -1, -1, -1, -1, 824, -1, -1, -1, + -1, 824, -1, 824, 824, 824, 824, 824, + -1, -1, 102, 89, 81, 132, 58, -1, + -1, -1, -1, 824, -1, 824, -1, -1, + 824, 824, -1, -1, -1, 824, -1, 824, + -1, 824, 825, 825, 825, 825, 825, 825, + 825, 825, 825, 825, 825, 825, 825, 825, + 825, 825, 825, 825, 825, 825, 825, 825, + 825, -1, 825, 825, 825, 825, 825, 825, + -1, 825, 825, 825, 825, -1, 825, -1, + 825, 825, 825, -1, 825, 825, 825, 825, + 825, 825, -1, 825, 825, 825, 825, 825, + 825, 825, 825, 825, 825, 825, 825, 825, + 825, 825, -1, 825, -1, -1, -1, -1, + 825, 825, 825, 825, 825, -1, -1, 825, + 825, -1, 825, 825, 825, 825, 825, 825, + 825, 825, 825, 825, 825, 825, -1, -1, + -1, -1, -1, 825, -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, 824, + -1, -1, 825, 825, 825, 825, -1, -1, + 825, 825, 825, 825, 825, 825, -1, -1, + -1, 825, 825, 825, 825, 825, -1, -1, + -1, -1, 825, -1, -1, -1, 825, 825, + 825, -1, 825, 825, -1, -1, 825, -1, + -1, -1, -1, -1, -1, -1, -1, 825, + 825, 825, 825, 825, -1, 825, 825, 825, + -1, -1, 825, 825, 825, 825, 825, 825, + 825, 825, -1, 825, 825, 825, -1, -1, + -1, 825, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 825, 825, -1, -1, + 825, -1, -1, -1, -1, 825, -1, -1, + -1, -1, 825, -1, 825, 825, 825, 825, + 825, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 825, -1, 825, -1, + -1, 825, 825, -1, -1, -1, 825, -1, + 825, -1, 825, 710, 710, 710, 710, 710, + 710, 710, 710, 710, 710, 710, 710, 710, + 710, -1, 710, 710, 710, 710, 710, 710, + -1, -1, -1, 710, 710, 710, 710, 710, + 710, -1, 710, 710, 710, 710, -1, 710, + -1, 710, 710, 710, -1, 710, 710, 710, + 710, 710, 710, -1, 710, 710, 710, 710, + 710, 710, 710, 710, 710, -1, 710, 710, + 710, 710, -1, -1, -1, -1, -1, -1, + -1, 710, -1, -1, -1, -1, -1, -1, + -1, -1, 317, -1, -1, -1, -1, 710, + 710, 710, 710, -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, + 825, -1, -1, 710, 710, 710, 710, -1, + -1, 710, 710, 710, 710, 710, 710, -1, + -1, -1, 710, 710, 710, 710, 710, -1, + -1, -1, -1, 710, 710, -1, -1, 710, + 710, 710, -1, 710, 710, -1, -1, 710, + -1, -1, -1, -1, -1, -1, -1, -1, + 710, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 710, 710, 710, 710, 710, + 710, 710, 710, -1, 710, 710, 710, -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, 710, 710, 710, + 710, 710, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 710, -1, 710, + 710, -1, -1, -1, 715, 715, 715, 715, + 715, 715, 715, 715, 715, 715, 715, 715, + 715, 715, -1, 715, 715, 715, 715, 715, + 715, -1, -1, -1, 715, 715, 715, 715, + 715, 715, -1, 715, 715, 715, 715, -1, + 715, -1, 715, 715, 715, -1, 715, 715, + 715, 715, 715, 715, -1, 715, 715, 715, + 715, 715, 715, 715, 715, 715, -1, 715, + 715, 715, 715, -1, -1, -1, -1, -1, + -1, -1, 715, -1, -1, -1, -1, -1, + -1, -1, -1, 715, -1, -1, -1, -1, + 715, 715, 715, 715, -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, 715, 715, 715, 715, + -1, 710, 715, 715, 715, 715, 715, 715, + -1, -1, -1, 715, 715, 715, 715, 715, + -1, -1, -1, -1, 715, 715, -1, -1, + 715, 715, 715, -1, 715, 715, -1, -1, + 715, -1, -1, -1, -1, -1, -1, -1, + -1, 715, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 715, 715, 715, 715, + 715, 715, 715, 715, -1, 715, 715, 715, + -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, 715, 715, + 715, 715, 715, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 715, -1, + 715, 715, 773, 773, 773, 773, 773, 773, + 773, 773, 773, 773, 773, 773, 773, 773, + 773, 773, 773, 773, 773, 773, 773, 773, + 773, -1, 773, 773, 773, 773, 773, 773, + -1, 773, 773, 773, 773, -1, 773, -1, + 773, 773, 773, -1, 773, 773, 773, 773, + 773, 773, -1, 773, 773, 773, 773, 773, + 773, 773, 773, 773, -1, 773, 773, 773, + 773, -1, -1, -1, -1, -1, -1, -1, + 773, -1, -1, 773, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 773, 773, + 773, 773, -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, 773, 773, 773, 773, -1, -1, + 773, 773, 715, 773, 773, 773, -1, -1, + -1, 773, 773, -1, 773, 773, -1, -1, + -1, -1, 773, -1, -1, -1, 773, 773, + 773, -1, 773, 773, -1, -1, 773, -1, + -1, -1, -1, -1, -1, -1, -1, 773, + 773, 773, 773, -1, -1, -1, 773, 773, + -1, -1, 773, 773, 773, 773, 773, 773, + 773, 773, -1, 773, 773, 773, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 77, 78, 79, 80, -1, + 76, -1, -1, -1, 773, 773, 773, 773, + 773, 100, 96, 98, 94, 92, -1, -1, + -1, -1, -1, -1, 773, -1, -1, 87, + -1, 773, -1, 88, 85, 84, 86, -1, + -1, -1, 72, 73, 74, -1, -1, -1, + -1, 1006, 71, -1, 104, 106, 108, 110, + 77, 78, 79, 80, -1, 76, -1, 75, + -1, -1, -1, -1, -1, -1, 100, 96, + 98, 94, 92, -1, -1, 66, 67, 68, + 69, -1, -1, -1, 87, -1, -1, -1, + 88, 85, 84, 86, -1, -1, -1, 72, + 73, 74, -1, -1, -1, -1, 1006, 71, + -1, 104, 106, 108, 110, -1, -1, -1, + -1, -1, -1, -1, 75, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 66, 67, 68, 69, -1, -1, + -1, -1, -1, -1, -1, 77, 78, 79, + 80, -1, 76, -1, -1, -1, -1, -1, + -1, -1, -1, 100, 96, 98, 94, 92, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 87, -1, -1, -1, 88, 85, 84, + 86, -1, -1, -1, 72, 73, 74, -1, + 773, -1, -1, 1006, 71, -1, 104, 106, + 108, 110, -1, -1, 321, 62, 63, 64, + 65, 75, 70, 82, 90, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 66, + 67, 68, 69, -1, -1, -1, -1, -1, + -1, -1, 77, 78, 79, 80, -1, 76, + -1, -1, -1, 102, 89, 81, 132, 58, + 100, 96, 98, 94, 92, -1, -1, -1, + -1, -1, 322, 63, 64, 65, 87, 70, + 82, 90, 88, 85, 84, 86, -1, -1, + -1, 72, 73, 74, -1, -1, -1, -1, + 1006, 71, -1, 104, 106, 108, 110, 77, + 78, 79, 80, -1, 76, -1, 75, -1, + 102, 89, 81, 132, 58, 100, 96, 98, + 94, 92, -1, -1, 66, 67, 68, 69, + -1, -1, -1, 87, -1, -1, -1, 88, + 85, 84, 86, -1, -1, -1, 72, 73, + 74, -1, -1, -1, -1, 1006, 71, -1, + 104, 106, 108, 110, -1, -1, -1, 323, + 63, 64, 65, 75, 70, 82, 90, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 66, 67, 68, 69, -1, -1, -1, + -1, -1, -1, -1, 77, 78, 79, 80, + -1, 76, -1, -1, -1, 102, 89, 81, + 132, 58, 100, 96, 98, 94, 92, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 87, -1, -1, -1, 88, 85, 84, 86, + -1, -1, -1, 72, 73, 74, -1, -1, + -1, -1, 1006, 71, -1, 104, 106, 108, + 110, -1, -1, -1, -1, 325, 64, 65, + 75, 70, 82, 90, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, -1, -1, -1, -1, -1, -1, + -1, 77, 78, 79, 80, -1, 76, -1, + -1, -1, 102, 89, 81, 132, 58, 100, + 96, 98, 94, 92, -1, -1, -1, -1, + -1, -1, 326, 64, 65, 87, 70, 82, + 90, 88, 85, 84, 86, -1, -1, -1, + 72, 73, 74, -1, -1, -1, -1, 1006, + 71, -1, 104, 106, 108, 110, 77, 78, + 79, 80, -1, 76, -1, 75, -1, 102, + 89, 81, 132, 58, 100, 96, 98, 94, + 92, -1, -1, 66, 67, 68, 69, -1, + -1, -1, 87, -1, -1, -1, 88, 85, + 84, 86, -1, -1, -1, 72, 73, 74, + -1, -1, -1, -1, 1006, 71, -1, 104, + 106, 108, 110, -1, -1, -1, -1, 327, + 64, 65, 75, 70, 82, 90, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 66, 67, 68, 69, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 102, 89, 81, 132, + 58, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 77, 78, 79, 80, -1, + 76, -1, -1, -1, -1, -1, -1, -1, + -1, 100, 96, 98, 94, 92, -1, -1, + -1, -1, -1, -1, 328, 64, 65, 87, + 70, 82, 90, 88, 85, 84, 86, -1, + -1, -1, 72, 73, 74, -1, -1, -1, + -1, 1006, 71, -1, 104, 106, 108, 110, + -1, -1, -1, -1, -1, -1, -1, 75, + -1, 102, 89, 81, 132, 58, -1, -1, + -1, -1, -1, -1, -1, 66, 67, 68, + 69, 329, 64, 65, -1, 70, 82, 90, + -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, 102, 89, + 81, 132, 58, -1, -1, -1, 321, 62, + 63, 64, 65, -1, 70, 82, 90, -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, 102, 89, 81, + 132, 58, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 322, 63, 64, 65, + -1, 70, 82, 90, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 330, + 65, -1, 70, 82, 90, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 102, 89, 81, 132, 58, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 102, 89, 81, 132, 58, + -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, 323, 63, 64, 65, -1, 70, 82, + 90, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 77, 78, 79, 80, + -1, 76, -1, -1, -1, -1, -1, -1, + -1, -1, 100, 96, 98, 94, 92, 102, + 89, 81, 132, 58, -1, -1, -1, -1, + 87, -1, -1, -1, 88, 85, 84, 86, + -1, -1, -1, 72, 73, 74, -1, -1, + -1, -1, 1006, 71, -1, 104, 106, 108, + 110, -1, -1, -1, -1, -1, -1, -1, + 75, -1, -1, -1, -1, -1, -1, 325, + 64, 65, -1, 70, 82, 90, 66, 67, + 68, 69, -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, 102, 89, 81, 132, + 58, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 326, 64, 65, -1, + 70, 82, 90, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 77, 78, + 79, 80, -1, 76, -1, -1, -1, -1, + -1, -1, -1, -1, 100, 96, 98, 94, + 92, 102, 89, 81, 132, 58, -1, -1, + -1, -1, 87, -1, -1, -1, 88, 85, + 84, 86, -1, -1, -1, 72, 73, 74, + -1, -1, -1, -1, 1006, 71, -1, 104, + 106, 108, 110, -1, -1, -1, -1, -1, + 331, 65, 75, 70, 82, 90, -1, -1, + -1, 327, 64, 65, -1, 70, 82, 90, + 66, 67, 68, 69, -1, -1, -1, -1, + -1, -1, -1, 77, 78, 79, 80, -1, + 76, -1, -1, -1, 102, 89, 81, 132, + 58, 100, 96, 98, 94, 92, 102, 89, + 81, 132, 58, -1, -1, -1, -1, 87, + -1, -1, -1, 88, 85, 84, 86, -1, + -1, -1, 72, 73, 74, -1, -1, -1, + -1, 1006, 71, -1, 104, 106, 108, 110, + -1, -1, -1, -1, -1, -1, -1, 75, + -1, -1, -1, -1, -1, -1, 328, 64, + 65, -1, 70, 82, 90, 66, 67, 68, + 69, -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, 102, 89, 81, 132, 58, + -1, -1, -1, 333, -1, 70, 82, 90, + -1, -1, -1, 329, 64, 65, -1, 70, + 82, 90, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 102, 89, + 81, 132, 58, -1, -1, -1, -1, -1, + 102, 89, 81, 132, 58, -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, + 332, -1, 70, 82, 90, -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, 102, 89, 81, 132, 58, + -1, 330, 65, -1, 70, 82, 90, -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, 102, 89, 81, + 132, 58, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 860, 860, 860, 860, 860, 860, 860, + 860, 860, 860, 860, 860, 860, 860, 860, + 860, 860, 860, 860, 860, 860, 860, 860, + 860, 860, 860, 860, 860, 860, 860, -1, + 860, 860, 860, 860, 860, 860, -1, 860, + 860, 860, -1, 860, 860, 860, 860, 860, + 860, 860, 860, 860, 860, 860, 860, 860, + 860, 860, 860, -1, 860, 860, 860, 860, + -1, -1, -1, -1, 336, -1, -1, 860, + 860, -1, 860, 337, 339, 860, -1, -1, + -1, -1, 860, -1, -1, 860, 860, 860, + 860, 338, -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, 860, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 860, 860, 860, 860, -1, -1, 860, + 860, 860, 860, 860, 860, -1, 860, 860, + 860, 860, 860, 860, 860, -1, -1, 860, + -1, 860, 860, -1, 860, 860, 860, 860, + -1, 860, 860, -1, -1, 860, -1, -1, + -1, -1, -1, 860, -1, 860, 860, 860, + 860, 860, -1, -1, -1, 860, 860, -1, + 860, 860, 860, 860, 860, 860, 860, 860, + 860, -1, 860, 860, 860, 335, -1, 860, + -1, -1, 331, 65, -1, 70, 82, 90, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 860, 860, 860, -1, -1, 860, 860, + 860, -1, -1, 860, 860, 860, 860, 860, + -1, -1, -1, -1, -1, -1, 102, 89, + 81, 132, 58, 860, -1, 860, 860, 860, + 860, -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, -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, 333, -1, 70, + 82, 90, -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, + 102, 89, 81, 132, 58, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 860, + -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, 332, -1, 70, 82, 90, -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, 102, 89, 81, + 132, 58, 929, 929, 929, 929, 929, 929, + 929, 929, 929, 929, 929, 929, 929, 929, + 929, 929, 929, 929, 929, 929, 929, 929, + 929, -1, 929, 929, 929, 929, 929, 929, + -1, 929, 929, 929, 929, -1, 929, -1, + 929, 929, 929, -1, 929, 929, 929, 929, + 929, 929, -1, 929, 929, 929, 929, 929, + 929, 929, 929, 929, 929, 929, 929, 929, + 929, 929, -1, 929, -1, -1, -1, -1, + 929, 929, 929, 929, 929, -1, -1, 929, + 929, -1, 929, 929, 929, 929, 929, 929, + 929, 929, 929, 929, 929, 929, -1, -1, + -1, -1, -1, 929, -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, 929, 929, 929, 929, -1, -1, + 929, 929, 929, 929, 929, 929, -1, -1, + -1, 929, 929, 929, 929, 929, -1, -1, + -1, -1, 929, -1, -1, -1, 929, 929, + 929, -1, 929, 929, -1, -1, 929, -1, + -1, -1, -1, -1, -1, -1, -1, 929, + 929, 929, 929, 929, -1, 929, 929, 929, + -1, -1, 929, 929, 929, 929, 929, 929, + 929, 929, -1, 929, 929, 929, -1, -1, + -1, 929, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 929, 929, -1, -1, + 929, -1, -1, -1, -1, 929, -1, -1, + -1, -1, 929, -1, 929, 929, 929, 929, + 929, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 929, -1, 929, -1, + -1, 929, 929, -1, -1, -1, 929, -1, + 929, -1, 929, 77, 78, 79, 80, 335, + 76, -1, -1, -1, -1, -1, -1, -1, + -1, 100, 96, 98, 94, 92, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 87, + -1, -1, -1, 88, 85, 84, 86, -1, + -1, -1, 72, 73, 74, -1, -1, -1, + -1, 1006, 71, -1, 104, 106, 108, 110, + -1, 77, 78, 79, 80, -1, 76, 75, + -1, -1, -1, -1, -1, -1, -1, 100, + 96, 98, 94, 92, -1, 66, 67, 68, + 69, -1, -1, -1, -1, 87, -1, -1, + -1, 88, 85, 84, 86, -1, -1, -1, + 72, 73, 74, -1, -1, -1, -1, 1006, + 71, -1, 104, 106, 108, 110, -1, -1, + -1, -1, -1, -1, -1, 75, 788, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 66, 67, 68, 69, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 929, -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, 341, 62, 63, 64, + 65, -1, 70, 82, 90, -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, 102, 89, 81, 132, 58, + 340, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 209, 62, 63, 64, 65, -1, + 70, 82, 90, -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, 102, 89, 81, 132, 58, 932, 932, + 932, 932, 932, 932, 932, 932, 932, 932, + 932, 932, 932, 932, 932, 932, 932, 932, + 932, 932, 932, 932, 932, -1, 932, 932, + 932, 932, 932, 932, -1, 932, 932, 932, + 932, -1, 932, -1, 932, 932, 932, -1, + 932, 932, 932, 932, 932, 932, -1, 932, + 932, 932, 932, 932, 932, 932, 932, 932, + 932, 932, 932, 932, 932, 932, -1, 932, + -1, -1, 342, 343, 932, 932, 932, 932, + 932, -1, 932, 932, 932, -1, 932, 932, + 932, 932, 932, 932, 932, 932, 932, 932, + 932, 932, -1, -1, -1, -1, -1, 932, + -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, 932, 932, + 932, 932, -1, -1, 932, 932, 932, 932, + 932, 932, -1, -1, -1, 932, 932, 932, + 932, 932, -1, -1, -1, -1, 932, -1, + -1, -1, 932, 932, 932, -1, 932, 932, + -1, -1, 932, -1, -1, -1, -1, -1, + -1, -1, -1, 932, 932, 932, 932, 932, + -1, 932, 932, 932, -1, -1, 932, 932, + 932, 932, 932, 932, 932, 932, -1, 932, + 932, 932, -1, -1, -1, 932, -1, -1, + -1, -1, -1, -1, -1, 932, 932, 932, + 932, 932, -1, -1, 932, -1, -1, -1, + -1, 932, -1, 932, 932, 932, 932, -1, + 932, 932, 932, 932, 932, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 932, -1, 932, -1, -1, 932, 932, -1, + -1, -1, 932, -1, 932, -1, 932, -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, 77, 78, 79, 80, -1, 76, + -1, -1, -1, -1, -1, -1, -1, -1, + 100, 96, 98, 94, 92, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 87, -1, + -1, -1, 88, 85, 84, 86, -1, -1, + -1, 72, 73, 74, -1, -1, -1, -1, + 1006, 71, -1, 104, 106, 108, 110, -1, + -1, -1, -1, -1, -1, -1, 75, 788, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 66, 67, 68, 69, + -1, -1, 182, 183, -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, 932, -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, 341, 62, + 63, 64, 65, -1, 70, 82, 90, -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, 366, -1, -1, -1, 102, 89, 81, + 132, 58, 340, 209, 62, 63, 64, 65, + -1, 70, 82, 90, 209, 62, 63, 64, + 65, -1, 70, 82, 90, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 102, 89, 81, 132, 58, -1, + -1, -1, -1, 102, 89, 81, 132, 58, + 745, 745, 745, 745, 745, 745, 745, 745, + 745, 745, 745, 745, 745, 745, -1, 745, + 745, 745, 745, 745, 745, -1, -1, -1, + 745, 745, 745, 745, 745, 745, -1, 745, + 745, 745, 745, -1, 745, -1, 745, 745, + 745, -1, 745, 745, 745, 745, 745, 745, + -1, 745, 745, 745, 745, 745, 745, 745, + 745, 745, -1, 745, 745, 745, 745, -1, + -1, -1, -1, -1, -1, -1, 745, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 745, 745, 745, 745, + -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, + 745, 745, 745, 745, -1, -1, 745, 745, + 745, 745, 745, 745, -1, -1, -1, 745, + 745, 745, 745, 745, -1, -1, -1, -1, + 745, 745, -1, -1, 745, 745, 745, -1, + 745, 745, -1, -1, 745, -1, -1, -1, + -1, -1, -1, -1, -1, 745, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 745, 745, 745, 745, 745, 745, 745, 745, + -1, 745, 745, 745, -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, 745, 745, 745, 745, 745, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 745, -1, 745, 745, -1, -1, + -1, 750, 750, 750, 750, 750, 750, 750, + 750, 750, 750, 750, 750, 750, 750, -1, + 750, 750, 750, 750, 750, 750, -1, -1, + -1, 750, 750, 750, 750, 750, 750, -1, + 750, 750, 750, 750, -1, 750, -1, 750, + 750, 750, -1, 750, 750, 750, 750, 750, + 750, -1, 750, 750, 750, 750, 750, 750, + 750, 750, 750, -1, 750, 750, 750, 750, + -1, -1, -1, -1, -1, -1, -1, 750, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 750, 750, 750, + 750, -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, 750, 750, 750, 750, -1, 745, 750, + 750, 750, 750, 750, 750, -1, -1, -1, + 750, 750, 750, 750, 750, -1, -1, -1, + -1, 750, 750, -1, -1, 750, 750, 750, + -1, 750, 750, -1, -1, 750, -1, -1, + -1, -1, -1, -1, -1, -1, 750, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 750, 750, 750, 750, 750, 750, 750, + 750, -1, 750, 750, 750, -1, -1, -1, + -1, -1, -1, 366, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 209, 62, 63, + 64, 65, -1, 70, 82, 90, -1, -1, + -1, -1, -1, 750, 750, 750, 750, 750, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 750, -1, 750, 750, -1, + -1, -1, -1, -1, 102, 89, 81, 132, + 58, 841, 841, 841, 841, 841, 841, 841, + 841, 841, 841, 841, 841, 841, 841, 841, + 841, 841, 841, 841, 841, 841, 841, 841, + -1, 841, 841, 841, 841, 841, 841, -1, + 841, 841, 841, 841, -1, 841, -1, 841, + 841, 841, -1, 841, 841, 841, 841, 841, + 841, -1, 841, 841, 841, 841, 841, 841, + 841, 841, 841, 841, 841, 841, 841, 841, + 841, -1, 841, -1, -1, -1, -1, 841, + 841, 841, 841, 841, -1, -1, 841, 841, + -1, 841, 841, 841, 841, 841, 841, 841, + 841, 841, 841, 841, 841, -1, -1, -1, + -1, -1, 841, -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, 750, + -1, 841, 841, 841, 841, -1, -1, 841, + 841, 841, 841, 841, 841, -1, -1, -1, + 841, 841, 841, 841, 841, -1, -1, -1, + -1, 841, -1, -1, -1, 841, 841, 841, + -1, 841, 841, -1, -1, 841, -1, -1, + -1, -1, -1, -1, -1, -1, 841, 841, + 841, 841, 841, -1, 841, 841, 841, -1, + -1, 841, 841, 841, 841, 841, 841, 841, + 841, -1, 841, 841, 841, -1, -1, -1, + 841, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 841, 841, -1, -1, 841, + -1, -1, -1, -1, 841, -1, -1, -1, + -1, 841, -1, 841, 841, 841, 841, 841, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 841, -1, 841, -1, -1, + 841, 841, -1, -1, -1, 841, -1, 841, + -1, 841, 888, 888, 888, 888, 888, 888, + 888, 888, 888, 888, 888, 888, 888, 888, + 888, 888, 888, 888, 888, 888, 888, 888, + 888, -1, 888, 888, 888, 888, 888, 888, + -1, 888, 888, 888, 888, -1, 888, -1, + 888, 888, 888, -1, 888, 888, 888, 888, + 888, 888, -1, 888, 888, 888, 888, 888, + 888, 888, 888, 888, 888, 221, 223, 225, + 227, 888, -1, 888, -1, -1, -1, -1, + 888, 888, 888, 888, 888, -1, -1, 888, + 888, -1, 888, 888, 888, 888, 888, 888, + 888, 888, 888, 888, 888, 888, -1, -1, + -1, -1, -1, 888, -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, 841, + -1, -1, 888, 888, 888, 888, -1, -1, + 888, 888, 888, 888, 888, 888, -1, -1, + -1, 888, 888, 888, 888, 888, -1, -1, + -1, -1, 888, -1, -1, -1, 888, 888, + 888, -1, 888, 888, -1, -1, 888, -1, + -1, -1, -1, -1, -1, -1, -1, 888, + 888, 888, 888, 888, -1, 888, 888, 888, + 888, -1, 888, 888, 888, 888, 888, 888, + 888, 888, -1, 888, 888, 888, -1, -1, + -1, 888, -1, -1, -1, -1, -1, -1, + -1, 387, -1, -1, 888, 888, -1, -1, + 888, -1, -1, -1, -1, 888, -1, -1, + -1, -1, 888, -1, 888, 888, 888, 888, + 888, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 888, -1, 888, -1, + -1, 888, 888, -1, -1, -1, 888, -1, + 888, -1, 888, 887, 887, 887, 887, 887, + 887, 887, 887, 887, 887, 887, 887, 887, + 887, 887, 887, 887, 887, 887, 887, 887, + 887, 887, -1, 887, 887, 887, 887, 887, + 887, -1, 887, 887, 887, 887, -1, 887, + -1, 887, 887, 887, -1, 887, 887, 887, + 887, 887, 887, -1, 887, 887, 887, 887, + 887, 887, 887, 887, 887, 887, 887, 887, + 887, 887, 887, -1, 887, -1, -1, -1, + -1, 887, 887, 887, 887, 887, -1, -1, + 887, 887, -1, 887, 887, 887, 887, 887, + 887, 887, 887, 887, 887, 887, 887, -1, + -1, -1, -1, -1, 887, -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, + 888, -1, -1, 887, 887, 887, 887, -1, + -1, 887, 887, 887, 887, 887, 887, -1, + -1, -1, 887, 887, 887, 887, 887, -1, + -1, -1, -1, 887, -1, -1, -1, 887, + 887, 887, -1, 887, 887, -1, -1, 887, + -1, -1, -1, -1, -1, -1, -1, -1, + 887, 887, 887, 887, 887, -1, 887, 887, + 887, 887, -1, 887, 887, 887, 887, 887, + 887, 887, 887, -1, 887, 887, 887, -1, + -1, -1, 887, -1, -1, -1, -1, -1, + -1, -1, 887, -1, -1, 887, 887, -1, + -1, 887, -1, -1, -1, -1, 887, -1, + -1, -1, -1, 887, -1, 887, 887, 887, + 887, 887, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 887, -1, 887, + -1, -1, 887, 887, -1, -1, -1, 887, + -1, 887, -1, 887, 829, 829, 829, 829, + 829, 829, 829, 829, 829, 829, 829, 829, + 829, 829, 829, 829, 829, 829, 829, 829, + 829, 829, 829, -1, 829, 829, 829, 829, + 829, 829, -1, 829, 829, 829, 829, -1, + 829, -1, 829, 829, 829, 401, 829, 829, + 829, 829, 829, 829, -1, 829, 829, 829, + 829, 829, 829, 829, 829, 829, 829, 829, + 829, 829, 829, 829, -1, 829, -1, -1, + 400, -1, 829, 829, 829, 829, 829, -1, + -1, 829, 829, -1, 829, 829, 829, 829, + 829, 829, 829, 829, 829, 829, 829, 829, + -1, -1, -1, -1, -1, 829, -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, 887, -1, -1, 829, 829, 829, 829, + -1, -1, 829, 829, 829, 829, 829, 829, + -1, -1, -1, 829, 829, 829, 829, 829, + -1, -1, -1, -1, 829, -1, -1, -1, + 829, 829, 829, -1, 829, 829, -1, -1, + 829, -1, -1, -1, -1, -1, -1, -1, + -1, 829, 829, 829, 829, 829, -1, 829, + 829, 829, -1, -1, 829, 829, 829, 829, + 829, 829, 829, 829, 399, 829, 829, 829, + -1, -1, -1, 829, -1, -1, -1, -1, + -1, -1, -1, 387, -1, -1, 829, 829, + -1, -1, 829, -1, -1, -1, -1, 829, + -1, -1, -1, -1, 829, -1, 829, 829, + 829, 829, 829, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 829, -1, + 829, -1, -1, 829, 829, -1, -1, -1, + 829, -1, 829, -1, 829, 918, 918, 918, + 918, 918, 918, 918, 918, 918, 918, 918, + 918, 918, 918, 918, 918, 918, 918, 918, + 918, 918, 918, 918, -1, 918, 918, 918, + 918, 918, 918, -1, 918, 918, 918, 918, + -1, 918, -1, 918, 918, 918, 918, 918, + 918, 918, 918, 918, 918, -1, 918, 918, + 918, 918, 918, 918, 918, 918, 918, 918, + 918, 918, 918, 918, 918, -1, 918, -1, + -1, 918, -1, 918, 918, 918, 918, 918, + -1, -1, 918, 918, -1, 918, 918, 918, + 918, 918, 918, 918, 918, 918, 918, 918, + 918, -1, -1, -1, -1, -1, 918, -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, 829, -1, -1, 918, 918, 918, + 918, -1, -1, 918, 918, 918, 918, 918, + 918, -1, -1, -1, 918, 918, 918, 918, + 918, -1, -1, -1, -1, 918, -1, -1, + -1, 918, 918, 918, -1, 918, 918, -1, + -1, 918, -1, -1, -1, -1, -1, -1, + -1, -1, 918, 918, 918, 918, 918, -1, + 918, 918, 918, -1, -1, 918, 918, 918, + 918, 918, 918, 918, 918, 918, 918, 918, + 918, -1, -1, -1, 918, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 918, + 918, -1, -1, 918, -1, -1, -1, -1, + 918, -1, -1, -1, -1, 918, -1, 918, + 918, 918, 918, 918, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 918, + -1, 918, -1, -1, 918, 918, -1, -1, + -1, 918, -1, 918, -1, 918, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 917, + 917, 917, 917, 917, 917, 917, 917, 917, + 917, 917, 917, 917, 917, 917, 917, 917, + 917, 917, 917, 917, 917, 917, -1, 917, + 917, 917, 917, 917, 917, -1, 917, 917, + 917, 917, -1, 917, -1, 917, 917, 917, + 917, 917, 917, 917, 917, 917, 917, -1, + 917, 917, 917, 917, 917, 917, 917, 917, + 917, 917, 232, 234, 236, 238, 917, -1, + 917, -1, -1, 917, -1, 917, 917, 917, + 917, 917, -1, -1, 917, 917, -1, 917, + 917, 917, 917, 917, 917, 917, 917, 917, + 917, 917, 917, -1, -1, -1, -1, -1, + 917, -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, 918, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 917, + 917, 917, 917, -1, -1, 917, 917, 917, + 917, 917, 917, -1, -1, -1, 917, 917, + 917, 917, 917, -1, -1, -1, -1, 917, + -1, -1, -1, 917, 917, 917, -1, 917, + 917, -1, -1, 917, -1, -1, -1, -1, + -1, -1, -1, -1, 917, 917, 917, 917, + 917, -1, 917, 917, 917, -1, 399, 917, + 917, 917, 917, 917, 917, 917, 917, 917, + 917, 917, 917, -1, -1, -1, 917, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 917, 917, -1, -1, 917, -1, -1, + -1, -1, 917, -1, 230, 398, -1, 917, + -1, 917, 917, 917, 917, 917, -1, -1, + 25, 26, 981, 23, 21, 24, -1, -1, + -1, 917, -1, 917, -1, -1, 917, 917, + 28, -1, -1, 917, -1, 917, -1, 917, + 729, 729, 729, 729, 729, 30, -1, 256, + -1, -1, -1, -1, 46, -1, -1, 44, + -1, -1, -1, -1, -1, -1, 22, 27, + -1, -1, -1, -1, 59, 60, 61, 47, + 729, 692, 692, 692, 692, 692, 692, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 692, -1, -1, -1, -1, -1, -1, + -1, 692, 692, 692, 692, 692, 692, -1, + 692, -1, -1, -1, -1, 692, -1, -1, + 692, -1, -1, -1, -1, -1, -1, 692, + 692, -1, -1, -1, -1, 692, 692, 692, + 692, 692, -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, 255, 253, 45, -1, -1, 252, 254, + -1, -1, -1, 251, -1, -1, -1, 29, + 250, -1, 248, 242, -1, 917, -1, -1, + 249, 240, -1, -1, 246, 247, 241, -1, + 243, 244, -1, -1, 245, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 692, 692, 692, -1, -1, 692, + 692, -1, 729, 729, 692, -1, -1, -1, + 692, 692, -1, 692, 692, -1, -1, -1, + -1, 692, 692, -1, -1, 692, 692, 692, + -1, 692, 692, -1, -1, 692, -1, -1, + -1, -1, -1, -1, -1, -1, 693, 693, + 693, 693, 693, 693, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 402, 693, -1, + -1, -1, -1, 692, 692, -1, 693, 693, + 693, 693, 693, 693, -1, 693, -1, -1, + -1, -1, 693, -1, -1, 693, -1, -1, + -1, -1, -1, -1, 693, 693, -1, -1, + -1, -1, 693, 693, 693, 693, 693, 694, + 694, 694, 694, 694, 694, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 692, 694, + -1, -1, -1, -1, -1, -1, -1, 694, + 694, 694, 694, 694, 694, -1, 694, -1, + -1, -1, -1, 694, -1, -1, 694, -1, + -1, -1, -1, -1, -1, 694, 694, -1, + -1, -1, -1, 694, 694, 694, 694, 694, + -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, 693, + 693, 693, -1, -1, 693, 693, -1, -1, + -1, 693, -1, -1, -1, 693, 693, -1, + 693, 693, -1, -1, -1, -1, 693, 693, + -1, -1, 693, 693, 693, -1, 693, 693, + -1, -1, 693, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 694, 694, 694, -1, -1, 694, 694, -1, + 693, 693, 694, -1, -1, -1, 694, 694, + -1, 694, 694, -1, -1, -1, -1, 694, + 694, -1, -1, 694, 694, 694, -1, 694, + 694, -1, -1, 694, -1, -1, -1, -1, + -1, -1, -1, -1, 695, 695, 695, 695, + 695, 695, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 693, 695, -1, -1, -1, + -1, 694, 694, -1, 695, 695, 695, 695, + 695, 695, -1, 695, -1, -1, -1, -1, + 695, -1, -1, 695, -1, -1, 230, 398, + -1, -1, 695, 695, -1, -1, -1, -1, + 695, 695, 695, 695, 695, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 694, -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, -1, -1, + -1, -1, -1, -1, -1, 695, 695, 695, + -1, -1, 695, 695, -1, -1, -1, 695, + -1, -1, -1, 695, 695, -1, 695, 695, + -1, -1, -1, -1, 695, 695, -1, -1, + 695, 695, 695, -1, 695, 695, -1, -1, + 695, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 255, 253, 45, -1, -1, + 252, 254, -1, -1, -1, 251, 695, 695, + -1, 29, 250, -1, 248, 242, -1, -1, + -1, -1, 249, 240, -1, -1, 246, 247, + 241, -1, 243, 244, -1, -1, 245, -1, + -1, -1, 696, 696, 696, 696, 696, 696, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 696, -1, -1, -1, -1, -1, + -1, 695, 696, 696, 696, 696, 696, 696, + -1, 696, -1, -1, -1, -1, 696, -1, + -1, 696, -1, -1, -1, -1, -1, -1, + 696, 696, -1, -1, -1, -1, 696, 696, + 696, 696, 696, 697, 697, 697, 697, 697, + 697, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 697, -1, -1, -1, 402, + -1, -1, -1, 697, 697, 697, 697, 697, + 697, -1, 697, -1, -1, -1, -1, 697, + -1, -1, 697, -1, -1, -1, -1, -1, + -1, 697, 697, -1, -1, -1, -1, 697, + 697, 697, 697, 697, -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, 696, 696, 696, -1, -1, + 696, 696, -1, -1, -1, 696, -1, -1, + -1, 696, 696, -1, 696, 696, -1, -1, + -1, -1, 696, 696, -1, -1, 696, 696, + 696, -1, 696, 696, -1, -1, 696, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 697, 697, 697, -1, + -1, 697, 697, -1, 696, 696, 697, -1, + -1, -1, 697, 697, -1, 697, 697, -1, + -1, -1, -1, 697, 697, -1, -1, 697, + 697, 697, -1, 697, 697, -1, -1, 697, + -1, -1, -1, -1, -1, -1, -1, -1, + 698, 698, 698, 698, 698, 698, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 696, + 698, -1, -1, -1, -1, 697, 697, -1, + 698, 698, 698, 698, 698, 698, -1, 698, + -1, -1, -1, -1, 698, -1, -1, 698, + -1, -1, -1, -1, -1, -1, 698, 698, + -1, -1, -1, -1, 698, 698, 698, 698, + 698, 699, 699, 699, 699, 699, 699, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 697, 699, -1, -1, -1, -1, -1, -1, + -1, 699, 699, 699, 699, 699, 699, -1, + 699, -1, -1, -1, -1, 699, -1, -1, + 699, -1, -1, -1, -1, -1, -1, 699, + 699, -1, -1, -1, -1, 699, 699, 699, + 699, 699, -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, 698, 698, 698, -1, -1, 698, 698, + -1, -1, -1, 698, -1, -1, -1, 698, + 698, -1, 698, 698, -1, -1, -1, -1, + 698, 698, -1, -1, 698, 698, 698, -1, + 698, 698, -1, -1, 698, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 699, 699, 699, -1, -1, 699, + 699, -1, 698, 698, 699, -1, -1, -1, + 699, 699, -1, 699, 699, -1, -1, -1, + -1, 699, 699, -1, -1, 699, 699, 699, + -1, 699, 699, -1, -1, 699, -1, -1, + -1, -1, -1, -1, -1, -1, 700, 700, + 700, 700, 700, 700, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 698, 700, -1, + -1, -1, -1, 699, 699, -1, 700, 700, + 700, 700, 700, 700, -1, 700, -1, -1, + -1, -1, 700, -1, -1, 700, -1, -1, + -1, -1, -1, -1, 700, 700, -1, -1, + -1, -1, 700, 700, 700, 700, 700, 701, + 701, 701, 701, 701, 701, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 699, 701, + -1, -1, -1, -1, -1, -1, -1, 701, + 701, 701, 701, 701, 701, -1, 701, -1, + -1, -1, -1, 701, -1, -1, 701, -1, + -1, -1, -1, -1, -1, 701, 701, -1, + -1, -1, -1, 701, 701, 701, 701, 701, + -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, 700, + 700, 700, -1, -1, 700, 700, -1, -1, + -1, 700, -1, -1, -1, 700, 700, -1, + 700, 700, -1, -1, -1, -1, 700, 700, + -1, -1, 700, 700, 700, -1, 700, 700, + -1, -1, 700, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 701, 701, 701, -1, -1, 701, 701, -1, + 700, 700, 701, -1, -1, -1, 701, 701, + -1, 701, 701, -1, -1, -1, -1, 701, + 701, -1, -1, 701, 701, 701, -1, 701, + 701, -1, -1, 701, -1, -1, -1, -1, + -1, -1, -1, -1, 702, 702, 702, 702, + 702, 702, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 700, 702, -1, -1, -1, + -1, 701, 701, -1, 702, 702, 702, 702, + 702, 702, -1, 702, -1, -1, -1, -1, + 702, -1, -1, 702, -1, -1, -1, -1, + -1, -1, 702, 702, -1, -1, -1, -1, + 702, 702, 702, 702, 702, 703, 703, 703, + 703, 703, 703, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 701, 703, -1, -1, + -1, -1, -1, -1, -1, 703, 703, 703, + 703, 703, 703, -1, 703, -1, -1, -1, + -1, 703, -1, -1, 703, -1, -1, -1, + -1, -1, -1, 703, 703, -1, -1, -1, + -1, 703, 703, 703, 703, 703, -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, 702, 702, 702, + -1, -1, 702, 702, -1, -1, -1, 702, + -1, -1, -1, 702, 702, -1, 702, 702, + -1, -1, -1, -1, 702, 702, -1, -1, + 702, 702, 702, -1, 702, 702, -1, -1, + 702, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 703, 703, + 703, -1, -1, 703, 703, -1, 702, 702, + 703, -1, -1, -1, 703, 703, -1, 703, + 703, -1, -1, -1, -1, 703, 703, -1, + -1, 703, 703, 703, -1, 703, 703, -1, + -1, 703, -1, -1, -1, -1, -1, -1, + -1, -1, 704, 704, 704, 704, 704, 704, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 702, 704, -1, -1, -1, -1, 703, + 703, -1, 704, 704, 704, 704, 704, 704, + -1, 704, -1, -1, -1, -1, 704, -1, + -1, 704, -1, -1, -1, -1, -1, -1, + 704, 704, -1, -1, -1, -1, 704, 704, + 704, 704, 704, 705, 705, 705, 705, 705, + 705, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 703, 705, -1, -1, -1, -1, + -1, -1, -1, 705, 705, 705, 705, 705, + 705, -1, 705, -1, -1, -1, -1, 705, + -1, -1, 705, -1, -1, -1, -1, -1, + -1, 705, 705, -1, -1, -1, -1, 705, + 705, 705, 705, 705, -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, 704, 704, 704, -1, -1, + 704, 704, -1, -1, -1, 704, -1, -1, + -1, 704, 704, -1, 704, 704, -1, -1, + -1, -1, 704, 704, -1, -1, 704, 704, + 704, -1, 704, 704, -1, -1, 704, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 705, 705, 705, -1, + -1, 705, 705, -1, 704, 704, 705, -1, + -1, -1, 705, 705, -1, 705, 705, -1, + -1, -1, -1, 705, 705, -1, -1, 705, + 705, 705, -1, 705, 705, -1, -1, 705, + -1, -1, -1, -1, -1, -1, -1, -1, + 706, 706, 706, 706, 706, 706, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 704, + 706, -1, -1, -1, -1, 705, 705, -1, + 706, 706, 706, 706, 706, 706, -1, 706, + -1, -1, -1, -1, 706, -1, -1, 706, + -1, -1, -1, -1, -1, -1, 706, 706, + -1, -1, -1, -1, 706, 706, 706, 706, + 706, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 705, -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, -1, -1, -1, -1, -1, -1, + -1, 706, 706, 706, -1, -1, 706, 706, + -1, -1, -1, 706, -1, -1, -1, 706, + 706, -1, 706, 706, -1, -1, -1, -1, + 706, 706, -1, -1, 706, 706, 706, -1, + 706, 706, -1, -1, 706, -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, 706, 706, -1, 786, 786, 786, + 786, 786, 786, 786, 786, 786, 786, 786, + 786, 786, 786, 786, 786, 786, 786, 786, + 786, 786, 412, 413, -1, 786, 786, 786, + 786, 786, 786, -1, 786, 786, 786, 786, + -1, 786, -1, 786, 786, 786, -1, 786, + 786, 786, 786, 786, 786, 706, 786, 786, + 786, 786, 786, 786, 786, 786, 786, -1, + 786, 786, 786, 786, -1, -1, -1, -1, + -1, -1, -1, 786, -1, -1, 786, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 786, 786, 786, 786, -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, 786, 786, 786, + 786, -1, -1, 786, 786, -1, 786, 786, + 786, -1, -1, -1, 786, 786, -1, 786, + 786, -1, -1, -1, -1, 786, -1, -1, + -1, 786, 786, 786, -1, 786, 786, -1, + -1, 786, -1, -1, -1, -1, -1, -1, + -1, -1, 786, 407, 409, 411, -1, -1, + -1, 786, 786, -1, -1, 786, 786, 786, + 786, 786, 786, 786, 786, -1, 786, 786, + 786, -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, 786, + 786, 786, 786, 786, -1, 48, 49, 50, + 51, 77, 78, 79, 80, 985, 76, 786, + 34, 35, 38, 36, 786, -1, -1, 100, + 96, 98, 94, 92, -1, -1, -1, 39, + 40, 41, -1, -1, -1, 87, -1, -1, + -1, 88, 85, 84, 86, -1, -1, -1, + 72, 73, 74, -1, -1, -1, -1, 56, + 71, -1, 104, 106, 108, 110, -1, -1, + -1, -1, -1, -1, -1, 75, -1, -1, + 985, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 66, 67, 68, 69, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 793, 793, 793, 793, 793, 793, 793, + 793, 793, 793, 793, 793, 793, 793, 793, + 793, 793, 793, 793, 793, 793, 793, 793, + -1, 793, 793, 793, 793, 793, 793, -1, + 793, 793, 793, 793, -1, 793, -1, 793, + 793, 793, -1, 793, 793, 793, 793, 793, + 793, -1, 793, 793, 793, 793, 793, 793, + 793, 793, 793, -1, 793, 793, 793, 793, + -1, -1, -1, 786, -1, -1, -1, 793, + -1, -1, 793, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 272, 793, 793, 793, + 793, -1, -1, 985, 985, 405, -1, 33, + 31, 32, 52, 62, 63, 64, 65, -1, + 70, 82, 90, -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, 102, 89, 81, 37, 58, -1, -1, + -1, 793, 793, 793, 793, -1, -1, 793, + 793, -1, 793, 793, 793, -1, 271, -1, + 793, 793, -1, 793, 793, -1, -1, -1, + -1, 793, -1, -1, -1, 793, 793, 793, + -1, 793, 793, -1, -1, 793, -1, -1, + -1, -1, -1, -1, -1, -1, 793, 793, + 793, 793, -1, -1, -1, 793, 793, -1, + -1, 793, 793, 793, 793, 793, 793, 793, + 793, -1, 793, 793, 793, -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, 793, 793, 793, 793, 793, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 793, -1, -1, -1, -1, + 793, -1, 776, 776, 776, 776, 776, 776, + 776, 776, 776, 776, 776, 776, 776, 776, + 776, 776, 776, 776, 776, 776, 776, 776, + 776, -1, 776, 776, 776, 776, 776, 776, + -1, 776, 776, 776, 776, -1, 776, -1, + 776, 776, 776, -1, 776, 776, 776, 776, + 776, 776, -1, 776, 776, 776, 776, 776, + 776, 776, 776, 776, -1, 776, 776, 776, + 776, -1, -1, -1, -1, -1, -1, -1, + 776, -1, -1, 776, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 776, 776, + 776, 776, -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, 406, 408, 410, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 776, 776, 776, 776, -1, 793, + 776, 776, -1, 776, 776, 776, -1, -1, + -1, 776, 776, -1, 776, 776, -1, -1, + -1, -1, 776, -1, -1, -1, 776, 776, + 776, -1, 776, 776, -1, -1, 776, -1, + -1, -1, -1, -1, -1, -1, -1, 776, + 776, 776, 776, -1, -1, -1, 776, 776, + -1, -1, 776, 776, 776, 776, 776, 776, + 776, 776, -1, 776, 776, 776, -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, 776, 776, 776, 776, + 776, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 776, -1, -1, -1, + -1, 776, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 720, 720, 720, 720, 720, + 720, 720, 720, 720, 720, 720, 720, 720, + 720, -1, 720, 720, 720, 720, 720, 720, + -1, -1, -1, 720, 720, 720, 720, 720, + 720, -1, 720, 720, 720, 720, -1, 720, + -1, 720, 720, 720, -1, 720, 720, 720, + 720, 720, 720, -1, 720, 720, 720, 720, + 720, 720, 720, 720, 720, -1, 720, 720, + 720, 720, -1, -1, -1, -1, -1, -1, + -1, 720, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 272, 720, + 720, 720, 720, -1, -1, -1, -1, 405, + -1, 33, 31, 32, 52, 62, 63, 64, + 65, -1, 70, 82, 90, -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, + 776, -1, -1, 102, 89, 81, 37, 58, + -1, -1, -1, 720, 720, 720, 720, -1, + -1, 720, 720, 720, 720, 720, 720, -1, + 271, -1, 720, 720, 720, 720, 720, -1, + -1, -1, -1, 720, -1, -1, -1, 720, + 720, 720, -1, 720, 720, -1, -1, 720, + -1, -1, -1, -1, -1, -1, -1, -1, + 720, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 720, 720, 720, 720, 720, + 720, 720, 720, -1, 720, 720, 720, -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, 720, 720, 720, + 720, 720, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 720, -1, 720, + -1, 719, 719, 719, 719, 719, 719, 719, + 719, 719, 719, 719, 719, 719, 719, -1, + 719, 719, 719, 719, 719, 719, -1, -1, + -1, 719, 719, 719, 719, 719, 719, -1, + 719, 719, 719, 719, -1, 719, -1, 719, + 719, 719, -1, 719, 719, 719, 719, 719, + 719, -1, 719, 719, 719, 719, 719, 719, + 719, 719, 719, -1, 719, 719, 719, 719, + -1, -1, -1, -1, -1, -1, -1, 719, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 719, 719, 719, + 719, -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, 719, 719, 719, 719, -1, -1, 719, + 719, 720, 719, 719, 719, -1, -1, -1, + 719, 719, -1, 719, 719, -1, -1, -1, + -1, 719, 719, -1, -1, 719, 719, 719, + -1, 719, 719, -1, -1, 719, -1, -1, + -1, -1, -1, -1, -1, -1, 719, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 719, 719, 719, 719, 719, 719, 719, + 719, -1, 719, 719, 719, -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, 719, 719, 719, 719, 719, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 719, -1, -1, 719, 48, + 49, 50, 51, 77, 78, 79, 80, 985, + 76, -1, 34, 35, 38, 36, -1, -1, + -1, 100, 96, 98, 94, 92, -1, -1, + -1, 39, 40, 41, -1, -1, -1, 87, + -1, -1, -1, 88, 85, 84, 86, -1, + -1, -1, 72, 73, 74, -1, -1, -1, + -1, 56, 71, -1, 104, 106, 108, 110, + -1, -1, -1, -1, -1, -1, -1, 75, + -1, -1, 985, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 66, 67, 68, + 69, -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, -1, -1, -1, -1, -1, 719, + -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, 272, -1, + -1, -1, -1, -1, -1, 985, 985, -1, + -1, 33, 31, 32, 52, 62, 63, 64, + 65, -1, 70, 82, 90, -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, 102, 89, 81, 37, 58, + -1, -1, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, + 422, 721, 721, 721, 721, 721, 721, -1, + -1, -1, 721, 721, 721, 721, 721, 721, + -1, 721, 721, 721, 721, -1, 721, -1, + 721, 721, 721, -1, 721, 721, 721, 721, + 721, 721, -1, 721, 721, 721, 721, 721, + 721, 721, 721, 721, -1, 721, 721, 721, + 721, -1, -1, -1, -1, -1, -1, -1, + 721, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 721, 721, + 721, 721, -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, 721, 721, 721, 721, -1, -1, + 721, 721, -1, 721, 721, 721, -1, -1, + -1, 721, 721, -1, 721, 721, -1, -1, + -1, -1, 721, -1, -1, -1, 721, 721, + 721, -1, 721, 721, -1, -1, 721, -1, + -1, -1, -1, -1, -1, -1, -1, 721, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 721, 721, 721, 721, 721, 721, + 721, 721, -1, 721, 721, 721, -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, 721, 721, 721, 721, + 721, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 721, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 734, -1, + 734, 734, 734, 734, 734, 734, -1, -1, + -1, 734, 734, 734, 734, 734, 734, -1, + 734, 734, 734, 734, -1, 734, -1, 734, + 734, 734, -1, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 734, 734, + -1, -1, -1, -1, -1, -1, -1, 734, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 734, 734, 734, + 734, -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, + 721, 734, 734, 734, 734, -1, -1, 734, + 734, 734, 734, 734, 734, -1, -1, -1, + 734, 734, 734, 734, 734, -1, 734, 734, + -1, 734, 734, -1, -1, 734, 734, 734, + -1, 734, 734, -1, -1, 734, -1, -1, + -1, -1, -1, -1, -1, -1, 734, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 734, 734, 734, 734, 734, 734, 734, + 734, -1, 734, 734, 734, -1, -1, -1, + 272, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 33, 31, 32, 52, 62, + 63, 64, 65, -1, 70, 82, 90, -1, + -1, -1, -1, 734, 734, 734, 734, 734, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 734, -1, 734, 734, -1, + -1, -1, -1, -1, -1, 102, 89, 81, + 37, 58, -1, -1, 740, 740, 740, 740, + 740, 740, 740, 740, 740, 740, 740, 740, + 740, 740, 422, 740, 740, 740, 740, 740, + 740, -1, -1, -1, 740, 740, 740, 740, + 740, 740, -1, 740, 740, 740, 740, -1, + 740, -1, 740, 740, 740, -1, 740, 740, + 740, 740, 740, 740, 740, 740, 740, 740, + 740, 740, 740, 740, 740, 740, 740, 740, + 740, 740, 740, -1, -1, -1, -1, -1, + -1, -1, 740, -1, -1, -1, -1, 25, + 26, 979, 23, 21, 24, -1, -1, -1, + 740, 740, 740, 740, -1, 432, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 729, + 729, 729, 729, 729, 30, -1, 43, -1, + -1, -1, -1, -1, -1, -1, 44, -1, + -1, -1, -1, -1, -1, 22, 27, -1, + -1, -1, -1, 59, 60, 61, -1, 54, + -1, -1, -1, -1, -1, -1, -1, 734, + -1, -1, -1, -1, 740, 740, 740, 740, + -1, -1, 740, 740, 740, 740, 740, 740, + -1, -1, -1, 740, 740, 740, 740, 740, + -1, 740, 740, 431, 740, 740, -1, -1, + 740, 740, 740, -1, 740, 740, -1, -1, + 740, -1, -1, -1, -1, -1, -1, -1, + -1, 740, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 740, 740, 740, 740, + 740, 740, 740, 740, -1, 740, 740, 740, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 296, 45, -1, -1, 295, -1, 282, + 294, -1, 293, -1, -1, -1, 29, 292, + 283, 291, 284, -1, -1, -1, 740, 740, + 740, 740, 740, 289, 290, 285, -1, 286, + 287, -1, -1, 288, -1, -1, 740, -1, + 740, 740, -1, 679, 679, 679, 679, 679, + 679, -1, -1, -1, -1, -1, -1, 297, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 729, 729, 679, 679, 679, 679, 679, + 679, -1, 679, -1, -1, -1, -1, -1, + -1, -1, 679, -1, -1, -1, -1, -1, + -1, 679, 679, -1, -1, -1, -1, 679, + 679, 679, -1, 679, -1, -1, -1, -1, + -1, 680, 680, 680, 680, 680, 680, -1, + -1, -1, -1, 433, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 680, 680, 680, 680, 680, 680, -1, + 680, -1, -1, -1, -1, -1, -1, -1, + 680, -1, -1, -1, -1, -1, -1, 680, + 680, -1, -1, -1, -1, 680, 680, 680, + -1, 680, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 681, + 681, 681, 681, 681, 681, 679, 679, -1, + -1, 679, 740, 679, 679, -1, 679, -1, + -1, -1, 679, 679, 679, 679, 679, 681, + 681, 681, 681, 681, 681, -1, 681, 679, + 679, 679, -1, 679, 679, -1, 681, 679, + -1, -1, -1, -1, -1, 681, 681, -1, + -1, -1, -1, 681, 681, 681, -1, 681, + -1, -1, -1, 679, -1, 682, 682, 682, + 682, 682, 682, 680, 680, 679, 679, 680, + -1, 680, 680, -1, 680, -1, -1, -1, + 680, 680, 680, 680, 680, 682, 682, 682, + 682, 682, 682, -1, 682, 680, 680, 680, + -1, 680, 680, -1, 682, 680, -1, -1, + -1, -1, -1, 682, 682, -1, -1, -1, + -1, 682, 682, 682, -1, 682, -1, 679, + -1, 680, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 680, 680, -1, -1, -1, + -1, -1, -1, 683, 683, 683, 683, 683, + 683, 681, 681, -1, -1, 681, -1, 681, + 681, -1, 681, -1, -1, -1, 681, 681, + 681, 681, 681, 683, 683, 683, 683, 683, + 683, -1, 683, 681, 681, 681, -1, 681, + 681, -1, 683, 681, -1, 680, -1, -1, + -1, 683, 683, -1, -1, -1, -1, 683, + 683, 683, -1, 683, -1, -1, -1, 681, + -1, -1, -1, -1, -1, -1, -1, 682, + 682, 681, 681, 682, -1, 682, 682, -1, + 682, -1, -1, -1, 682, 682, 682, 682, + 682, -1, -1, -1, -1, -1, -1, -1, + -1, 682, 682, 682, -1, 682, 682, -1, + -1, 682, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 681, -1, 682, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 682, + 682, -1, -1, -1, -1, -1, -1, 684, + 684, 684, 684, 684, 684, 683, 683, -1, + -1, 683, -1, 683, 683, -1, 683, -1, + -1, -1, 683, 683, 683, 683, 683, 684, + 684, 684, 684, 684, 684, 431, 684, 683, + 683, 683, -1, 683, 683, -1, 684, 683, + -1, 682, -1, -1, -1, 684, 684, -1, + -1, -1, -1, 684, 684, 684, -1, 684, + -1, -1, -1, 683, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 683, 683, -1, + -1, -1, -1, -1, -1, 685, 685, 685, + 685, 685, 685, 296, 45, -1, -1, 295, + -1, 282, 294, -1, 293, -1, -1, -1, + 29, 292, 283, 291, 284, 685, 685, 685, + 685, 685, 685, -1, 685, 289, 290, 285, + -1, 286, 287, -1, 685, 288, -1, 683, + -1, -1, -1, 685, 685, -1, -1, -1, + -1, 685, 685, 685, -1, 685, -1, -1, + -1, 297, -1, 686, 686, 686, 686, 686, + 686, 684, 684, -1, -1, 684, -1, 684, + 684, -1, 684, -1, -1, -1, 684, 684, + 684, 684, 684, 686, 686, 686, 686, 686, + 686, -1, 686, 684, 684, 684, -1, 684, + 684, -1, 686, 684, -1, -1, -1, -1, + -1, 686, 686, -1, -1, -1, -1, 686, + 686, 686, -1, 686, -1, 433, -1, 684, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 684, 684, -1, -1, -1, -1, -1, + -1, 687, 687, 687, 687, 687, 687, 685, + 685, -1, -1, 685, -1, 685, 685, -1, + 685, -1, -1, -1, 685, 685, 685, 685, + 685, 687, 687, 687, 687, 687, 687, -1, + 687, 685, 685, 685, -1, 685, 685, -1, + 687, 685, -1, 684, -1, -1, -1, 687, + 687, -1, -1, -1, -1, 687, 687, 687, + -1, 687, -1, -1, -1, 685, -1, 688, + 688, 688, 688, 688, 688, 686, 686, 685, + 685, 686, -1, 686, 686, -1, 686, -1, + -1, -1, 686, 686, 686, 686, 686, 688, + 688, 688, 688, 688, 688, -1, 688, 686, + 686, 686, -1, 686, 686, -1, 688, 686, + -1, -1, -1, -1, -1, 688, 688, -1, + -1, -1, -1, 688, 688, 688, -1, 688, + -1, 685, -1, 686, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 686, 686, -1, + -1, -1, -1, -1, -1, 689, 689, 689, + 689, 689, 689, 687, 687, -1, -1, 687, + -1, 687, 687, -1, 687, -1, -1, -1, + 687, 687, 687, 687, 687, 689, 689, 689, + 689, 689, 689, -1, 689, 687, 687, 687, + -1, 687, 687, -1, 689, 687, -1, 686, + -1, -1, -1, 689, 689, -1, -1, -1, + -1, 689, 689, 689, -1, 689, -1, -1, + -1, 687, -1, 690, 690, 690, 690, 690, + 690, 688, 688, 687, 687, 688, -1, 688, + 688, -1, 688, -1, -1, -1, 688, 688, + 688, 688, 688, 690, 690, 690, 690, 690, + 690, -1, 690, 688, 688, 688, -1, 688, + 688, -1, 690, 688, -1, -1, -1, -1, + -1, 690, 690, -1, -1, -1, -1, 690, + 690, 690, -1, 690, -1, 687, -1, 688, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 688, 688, -1, -1, -1, -1, -1, + -1, 691, 691, 691, 691, 691, 691, 689, + 689, -1, -1, 689, -1, 689, 689, -1, + 689, -1, -1, -1, 689, 689, 689, 689, + 689, 691, 691, 691, 691, 691, 691, -1, + 691, 689, 689, 689, -1, 689, 689, -1, + 691, 689, -1, 688, -1, -1, -1, 691, + 691, -1, -1, -1, -1, 691, 691, 691, + -1, 691, -1, -1, -1, 689, -1, 731, + 731, 731, 731, 731, 731, 690, 690, 689, + 689, 690, -1, 690, 690, -1, 690, -1, + -1, -1, 690, 690, 690, 690, 690, 731, + 731, 731, 731, 731, 731, -1, 731, 690, + 690, 690, -1, 690, 690, -1, 731, 690, + -1, -1, -1, -1, -1, 731, 731, -1, + -1, -1, -1, 731, 731, 731, -1, 731, + -1, 689, -1, 690, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 690, 690, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 691, 691, -1, -1, 691, + -1, 691, 691, -1, 691, -1, -1, -1, + 691, 691, 691, 691, 691, -1, -1, -1, + -1, -1, -1, -1, -1, 691, 691, 691, + -1, 691, 691, -1, -1, 691, -1, 690, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 691, -1, -1, -1, -1, -1, -1, + -1, 731, 731, 691, 691, 731, -1, 731, + 731, -1, 731, -1, -1, -1, 731, 731, + 731, 731, 731, -1, -1, -1, -1, -1, + -1, -1, -1, 731, 731, 731, -1, 731, + 731, -1, -1, 731, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 691, -1, 731, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 731, 731, -1, -1, -1, -1, -1, + -1, -1, 800, 800, 800, 800, 800, 800, + 800, 800, 800, 800, 800, 800, 800, 800, + 800, 800, 800, 800, 800, 800, 800, 800, + 800, -1, 800, 800, 800, 800, 800, 800, + -1, 800, 800, 800, 800, 800, 800, -1, + 800, 800, 800, 731, 800, 800, 800, 800, + 800, 800, 800, 800, 800, 800, 800, 800, + 800, 800, 800, 800, -1, 800, 800, 800, + 800, -1, -1, -1, -1, -1, -1, -1, + 800, -1, -1, 800, -1, -1, 800, -1, + -1, -1, -1, -1, -1, -1, 800, 800, + 800, 800, -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, 800, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 800, 800, 800, 800, -1, -1, + 800, 800, 800, 800, 800, 800, -1, -1, + -1, 800, 800, 800, 800, 800, -1, -1, + 800, -1, 800, -1, -1, 800, 800, 800, + 800, -1, 800, 800, -1, -1, 800, -1, + -1, -1, -1, -1, 800, -1, 800, 800, + 800, 800, 800, -1, -1, -1, 800, 800, + -1, 800, 800, 800, 800, 800, 800, 800, + 800, 800, -1, 800, 800, 800, -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, 800, 800, 800, 800, + 800, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 800, -1, 800, -1, + 800, 800, -1, 925, 925, 925, 925, 925, + 925, 925, 925, 925, 925, 925, 925, 925, + 925, 925, 925, 925, 925, 925, 925, 925, + 925, 925, -1, 925, 925, 925, 925, 925, + 925, -1, 925, 925, 925, 925, -1, 925, + -1, 925, 925, 925, -1, 925, 925, 925, + 925, 925, 925, -1, 925, 925, 925, 925, + 925, 925, 925, 925, 925, 925, 925, 925, + 925, 925, 925, -1, 925, -1, -1, -1, + -1, 925, 925, 925, 925, 925, -1, -1, + 925, 925, -1, 925, 925, 925, 925, 925, + 925, 925, 925, 925, 925, 925, 925, -1, + -1, -1, -1, -1, 925, -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, 925, 925, 925, 925, -1, + 800, 925, 925, 925, 925, 925, 925, -1, + -1, -1, 925, 925, 925, 925, 925, -1, + -1, -1, -1, 925, -1, -1, -1, 925, + 925, 925, -1, 925, 925, -1, -1, 925, + -1, -1, -1, -1, -1, -1, -1, -1, + 925, 925, 925, 925, 925, -1, 925, 925, + 925, -1, -1, 925, 925, 925, 925, 925, + 925, 925, 925, -1, 925, 925, 925, -1, + -1, -1, 925, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 925, 925, -1, + -1, 925, -1, -1, -1, -1, 925, -1, + -1, -1, -1, 925, -1, 925, 925, 925, + 925, 925, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 925, -1, 925, + -1, -1, 925, 925, -1, -1, -1, 925, + -1, 925, -1, 925, 868, 868, 868, 868, + 868, 868, 868, 868, 868, 868, 868, 868, + 868, 868, 868, 868, 868, 868, 868, 868, + 868, 868, 868, -1, 868, 868, 868, 868, + 868, 868, -1, 868, 868, 868, 868, -1, + 868, -1, 868, 868, 868, 868, 868, 868, + 868, 868, 868, 868, -1, 868, 868, 868, + 868, 868, 868, 868, 868, 868, 868, 868, + 868, 868, 868, 868, -1, 868, -1, -1, + 868, -1, 868, 868, 868, 868, 868, -1, + -1, 868, 868, -1, 868, 868, 868, 868, + 868, 868, 868, 868, 868, 868, 868, 868, + -1, -1, -1, -1, -1, 868, -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, 925, -1, -1, 868, 868, 868, 868, + -1, -1, 868, 868, 868, 868, 868, 868, + -1, -1, -1, 868, 868, 868, 868, 868, + -1, -1, -1, -1, 868, -1, -1, -1, + 868, 868, 868, -1, 868, 868, -1, -1, + 868, -1, -1, -1, -1, -1, -1, -1, + -1, 868, 868, 868, 868, 868, -1, 868, + 868, 868, 868, -1, 868, 868, 868, 868, + 868, 868, 868, 868, 868, 868, 868, 868, + -1, -1, -1, 868, 868, -1, -1, -1, + 868, 868, -1, 868, -1, -1, 868, 868, + -1, -1, 868, -1, 868, 868, -1, 868, + -1, 868, 868, -1, 868, -1, 868, 868, + 868, 868, 868, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 868, -1, + 868, -1, -1, 868, 868, -1, 868, -1, + 868, -1, 868, -1, 868, 869, 869, 869, + 869, 869, 869, 869, 869, 869, 869, 869, + 869, 869, 869, 869, 869, 869, 869, 869, + 869, 869, 869, 869, -1, 869, 869, 869, + 869, 869, 869, -1, 869, 869, 869, 869, + -1, 869, -1, 869, 869, 869, 869, 869, + 869, 869, 869, 869, 869, -1, 869, 869, + 869, 869, 869, 869, 869, 869, 869, 869, + 869, 869, 869, 869, 869, -1, 869, -1, + -1, 869, -1, 869, 869, 869, 869, 869, + -1, -1, 869, 869, -1, 869, 869, 869, + 869, 869, 869, 869, 869, 869, 869, 869, + 869, -1, -1, -1, -1, -1, 869, -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, 868, -1, -1, 869, 869, 869, + 869, -1, -1, 869, 869, 869, 869, 869, + 869, -1, -1, -1, 869, 869, 869, 869, + 869, -1, -1, -1, -1, 869, -1, -1, + -1, 869, 869, 869, -1, 869, 869, -1, + -1, 869, -1, -1, -1, -1, -1, -1, + -1, -1, 869, 869, 869, 869, 869, -1, + 869, 869, 869, 869, -1, 869, 869, 869, + 869, 869, 869, 869, 869, 869, 869, 869, + 869, -1, -1, -1, 869, 869, -1, -1, + -1, 869, 869, -1, 869, -1, -1, 869, + 869, -1, -1, 869, -1, 869, 869, -1, + 869, -1, 869, 869, -1, 869, -1, 869, + 869, 869, 869, 869, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 869, + -1, 869, -1, -1, 869, 869, -1, 869, + -1, 869, -1, 869, -1, 869, 926, 926, + 926, 926, 926, 926, 926, 926, 926, 926, + 926, 926, 926, 926, 926, 926, 926, 926, + 926, 926, 926, 926, 926, -1, 926, 926, + 926, 926, 926, 926, -1, 926, 926, 926, + 926, -1, 926, -1, 926, 926, 926, -1, + 926, 926, 926, 926, 926, 926, -1, 926, + 926, 926, 926, 926, 926, 926, 926, 926, + 926, 926, 926, 926, 926, 926, -1, 926, + -1, -1, -1, -1, 926, 926, 926, 926, + 926, -1, -1, 926, 926, -1, 926, 926, + 926, 926, 926, 926, 926, 926, 926, 926, + 926, 926, -1, -1, -1, -1, -1, 926, + -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, 869, -1, -1, 926, 926, + 926, 926, -1, -1, 926, 926, 926, 926, + 926, 926, -1, -1, -1, 926, 926, 926, + 926, 926, -1, -1, -1, -1, 926, -1, + -1, -1, 926, 926, 926, -1, 926, 926, + -1, -1, 926, -1, -1, -1, -1, -1, + -1, -1, -1, 926, 926, 926, 926, 926, + -1, 926, 926, 926, -1, -1, 926, 926, + 926, 926, 926, 926, 926, 926, -1, 926, + 926, 926, -1, -1, -1, 926, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 926, 926, -1, -1, 926, -1, -1, -1, + -1, 926, -1, -1, -1, -1, 926, -1, + 926, 926, 926, 926, 926, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 926, -1, 926, -1, -1, 926, 926, -1, + -1, -1, 926, -1, 926, -1, 926, 870, + 870, 870, 870, 870, 870, 870, 870, 870, + 870, 870, 870, 870, 870, 870, 870, 870, + 870, 870, 870, 870, 870, 870, -1, 870, + 870, 870, 870, 870, 870, -1, 870, 870, + 870, 870, -1, 870, -1, 870, 870, 870, + 870, 870, 870, 870, 870, 870, 870, -1, + 870, 870, 870, 870, 870, 870, 870, 870, + 870, 870, 870, 870, 870, 870, 870, -1, + 870, -1, -1, 870, -1, 870, 870, 870, + 870, 870, -1, -1, 870, 870, -1, 870, + 870, 870, 870, 870, 870, 870, 870, 870, + 870, 870, 870, -1, -1, -1, -1, -1, + 870, -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, 926, -1, -1, 870, + 870, 870, 870, -1, -1, 870, 870, 870, + 870, 870, 870, -1, -1, -1, 870, 870, + 870, 870, 870, -1, -1, -1, -1, 870, + 870, -1, -1, 870, 870, 870, -1, 870, + 870, -1, -1, 870, -1, -1, -1, -1, + -1, -1, -1, -1, 870, 870, 870, 870, + 870, -1, 870, 870, 870, 870, -1, 870, + 870, 870, 870, 870, 870, 870, 870, 870, + 870, 870, 870, -1, -1, -1, 870, 870, + -1, -1, -1, 870, 870, -1, 870, -1, + -1, 870, 870, -1, -1, 870, -1, 870, + 870, -1, 870, -1, 870, 870, -1, 870, + -1, 870, 870, 870, 870, 870, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 870, -1, 870, 870, -1, 870, 870, + -1, 870, -1, 870, -1, 870, -1, 870, + 871, 871, 871, 871, 871, 871, 871, 871, + 871, 871, 871, 871, 871, 871, 871, 871, + 871, 871, 871, 871, 871, 871, 871, -1, + 871, 871, 871, 871, 871, 871, -1, 871, + 871, 871, 871, -1, 871, -1, 871, 871, + 871, 871, 871, 871, 871, 871, 871, 871, + -1, 871, 871, 871, 871, 871, 871, 871, + 871, 871, 871, 871, 871, 871, 871, 871, + -1, 871, -1, -1, 871, -1, 871, 871, + 871, 871, 871, -1, -1, 871, 871, -1, + 871, 871, 871, 871, 871, 871, 871, 871, + 871, 871, 871, 871, -1, -1, -1, -1, + -1, 871, -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, 870, -1, -1, + 871, 871, 871, 871, -1, -1, 871, 871, + 871, 871, 871, 871, -1, -1, -1, 871, + 871, 871, 871, 871, -1, -1, -1, -1, + 871, 871, -1, -1, 871, 871, 871, -1, + 871, 871, -1, -1, 871, -1, -1, -1, + -1, -1, -1, -1, -1, 871, 871, 871, + 871, 871, -1, 871, 871, 871, 871, -1, + 871, 871, 871, 871, 871, 871, 871, 871, + 871, 871, 871, 871, -1, -1, -1, 871, + 871, -1, -1, -1, 871, 871, -1, 871, + -1, -1, 871, 871, -1, -1, 871, -1, + 871, 871, -1, 871, -1, 871, 871, -1, + 871, -1, 871, 871, 871, 871, 871, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 871, -1, 871, 871, -1, 871, + 871, -1, 871, -1, 871, -1, 871, -1, + 871, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, + -1, 927, 927, 927, 927, 927, 927, -1, + 927, 927, 927, 927, -1, 927, -1, 927, + 927, 927, -1, 927, 927, 927, 927, 927, + 927, -1, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, + 927, -1, 927, -1, -1, -1, -1, 927, + 927, 927, 927, 927, -1, -1, 927, 927, + -1, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, -1, -1, -1, + -1, -1, 927, -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, 871, -1, + -1, 927, 927, 927, 927, -1, -1, 927, + 927, 927, 927, 927, 927, -1, -1, -1, + 927, 927, 927, 927, 927, -1, -1, -1, + -1, 927, -1, -1, -1, 927, 927, 927, + -1, 927, 927, -1, -1, 927, -1, -1, + -1, -1, -1, -1, -1, -1, 927, 927, + 927, 927, 927, -1, 927, 927, 927, -1, + -1, 927, 927, 927, 927, 927, 927, 927, + 927, -1, 927, 927, 927, -1, -1, -1, + 927, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 927, 927, -1, -1, 927, + -1, -1, -1, -1, 927, -1, -1, -1, + -1, 927, -1, 927, 927, 927, 927, 927, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 927, -1, 927, -1, -1, + 927, 927, -1, -1, -1, 927, -1, 927, + -1, 927, 922, 922, 922, 922, -1, 922, + -1, -1, -1, -1, -1, -1, -1, -1, + 922, 922, 922, 922, 922, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 922, -1, + -1, -1, 922, 922, 922, 922, -1, -1, + -1, 922, 922, 922, -1, -1, -1, -1, + 922, 922, -1, 922, 922, 922, 922, 922, + -1, -1, -1, -1, -1, -1, 922, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 922, 922, 922, 922, + -1, -1, 182, 183, -1, -1, -1, -1, + -1, 922, -1, -1, -1, -1, -1, 928, + 928, 928, 928, 928, 928, 928, 928, 928, + 928, 928, 928, 928, 928, 928, 928, 928, + 928, 928, 928, 928, 928, 928, -1, 928, + 928, 928, 928, 928, 928, -1, 928, 928, + 928, 928, -1, 928, -1, 928, 928, 928, + -1, 928, 928, 928, 928, 928, 928, 927, + 928, 928, 928, 928, 928, 928, 928, 928, + 928, 928, 928, 928, 928, 928, 928, -1, + 928, -1, -1, -1, -1, 928, 928, 928, + 928, 928, -1, -1, 928, 928, -1, 928, + 928, 928, 928, 928, 928, 928, 928, 928, + 928, 928, 928, -1, -1, -1, -1, -1, + 928, -1, -1, 922, 922, 922, 922, 922, + -1, 922, 922, 922, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 922, 922, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 922, -1, 922, 922, 922, 922, 922, 928, + 928, 928, 928, -1, -1, 928, 928, 928, + 928, 928, 928, -1, -1, -1, 928, 928, + 928, 928, 928, -1, -1, -1, -1, 928, + 922, -1, -1, 928, 928, 928, -1, 928, + 928, -1, -1, 928, -1, -1, -1, -1, + -1, -1, -1, -1, 928, 928, 928, 928, + 928, -1, 928, 928, 928, -1, -1, 928, + 928, 928, 928, 928, 928, 928, 928, -1, + 928, 928, 928, -1, -1, -1, 928, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 928, 928, -1, -1, 928, -1, -1, + -1, -1, 928, -1, -1, -1, -1, 928, + -1, 928, 928, 928, 928, 928, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 928, -1, 928, -1, -1, 928, 928, + -1, -1, -1, 928, -1, 928, -1, 928, + 836, 836, 836, 836, 836, 836, 836, 836, + 836, 836, 836, 836, 836, 836, 836, 836, + 836, 836, 836, 836, 836, 836, 836, -1, + 836, 836, 836, 836, 836, 836, -1, 836, + 836, 836, 836, -1, 836, -1, 836, 836, + 836, -1, 836, 836, 836, 836, 836, 836, + -1, 836, 836, 836, 836, 836, 836, 836, + 836, 836, 836, 836, 836, 836, 836, 836, + -1, 836, -1, -1, -1, -1, 836, 836, + 836, 836, 836, -1, -1, 836, 836, -1, + 836, 836, 836, 836, 836, 836, 836, 836, + 836, 836, 836, 836, -1, -1, -1, -1, + -1, 836, -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, 928, -1, -1, + 836, 836, 836, 836, -1, -1, 836, 836, + 836, 836, 836, 836, -1, -1, -1, 836, + 836, 836, 836, 836, -1, -1, -1, -1, + 836, -1, -1, -1, 836, 836, 836, -1, + 836, 836, -1, -1, 836, -1, -1, -1, + -1, -1, -1, -1, -1, 836, 836, 836, + 836, 836, -1, 836, 836, 836, -1, -1, + 836, 836, 836, 836, 836, 836, 836, 836, + -1, 836, 836, 836, -1, -1, -1, 836, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 836, 836, -1, -1, 836, -1, + -1, -1, -1, 836, -1, -1, -1, -1, + 836, -1, 836, 836, 836, 836, 836, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 836, -1, 836, -1, -1, 836, + 836, -1, -1, -1, 836, -1, 836, -1, + 836, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, -1, + 716, 716, 716, 716, 716, 716, -1, -1, + -1, 716, 716, 716, 716, 716, 716, -1, + 716, 716, 716, 716, -1, 716, -1, 716, + 716, 716, -1, 716, 716, 716, 716, 716, + 716, -1, 716, 716, 716, 716, 716, 716, + 716, 716, 716, -1, 716, 716, 716, 716, + -1, -1, -1, -1, 336, -1, -1, 716, + -1, -1, -1, -1, -1, -1, -1, -1, + 716, -1, -1, -1, -1, 716, 716, 716, + 716, -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, 836, -1, + -1, 716, 716, 716, 716, -1, -1, 716, + 716, 716, 716, 716, 716, -1, -1, -1, + 716, 716, 716, 716, 716, -1, -1, -1, + -1, 716, 716, -1, -1, 716, 716, 716, + -1, 716, 716, -1, -1, 716, -1, -1, + -1, -1, -1, -1, -1, -1, 716, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 716, 716, 716, 716, 716, 716, 716, + 716, -1, 716, 716, 716, -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, 716, 716, 716, 716, 716, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 716, -1, 716, 716, -1, + -1, -1, 717, 717, 717, 717, 717, 717, + 717, 717, 717, 717, 717, 717, 717, 717, + -1, 717, 717, 717, 717, 717, 717, -1, + -1, -1, 717, 717, 717, 717, 717, 717, + -1, 717, 717, 717, 717, -1, 717, -1, + 717, 717, 717, -1, 717, 717, 717, 717, + 717, 717, -1, 717, 717, 717, 717, 717, + 717, 717, 717, 717, -1, 717, 717, 717, + 717, -1, -1, -1, -1, -1, -1, -1, + 717, -1, -1, -1, -1, -1, -1, -1, + -1, 717, -1, -1, -1, -1, 717, 717, + 717, 717, -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, 717, 717, 717, 717, -1, 716, + 717, 717, 717, 717, 717, 717, -1, -1, + -1, 717, 717, 717, 717, 717, -1, -1, + -1, -1, 717, 717, -1, -1, 717, 717, + 717, -1, 717, 717, -1, -1, 717, -1, + -1, -1, -1, -1, -1, -1, -1, 717, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 717, 717, 717, 717, 717, 717, + 717, 717, -1, 717, 717, 717, -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, 717, 717, 717, 717, + 717, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 717, -1, 717, 717, + -1, -1, -1, 798, 798, 798, 798, 798, + 798, 798, 798, 798, 798, 798, 798, 798, + 798, 798, 798, 798, 798, 798, 798, 798, + 798, 798, -1, 798, 798, 798, 798, 798, + 798, -1, 798, 798, 798, 798, -1, 798, + -1, 798, 798, 798, -1, 798, 798, 798, + 798, 798, 798, -1, 798, 798, 798, 798, + 798, 798, 798, 798, 798, -1, 798, 798, + 798, 798, -1, -1, -1, -1, -1, -1, + -1, 798, -1, -1, 798, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 798, + 798, 798, 798, -1, -1, 182, 183, -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, 798, 798, 798, 798, -1, + 717, 798, 798, 798, 798, 798, 798, -1, + -1, -1, 798, 798, 798, 798, 798, -1, + -1, -1, -1, 798, -1, -1, -1, 798, + 798, 798, -1, 798, 798, -1, -1, 798, + -1, -1, -1, -1, -1, -1, -1, -1, + 798, 798, 798, 798, -1, -1, -1, 798, + 798, -1, -1, 798, 798, 798, 798, 798, + 798, 798, 798, -1, 798, 798, 798, -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, 798, 798, 798, + 798, 798, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 798, -1, 798, + -1, -1, 798, -1, 806, 806, 806, 806, + 806, 806, 806, 806, 806, 806, 806, 806, + 806, 806, 806, 806, 806, 806, 806, 806, + 806, 806, 806, -1, 806, 806, 806, 806, + 806, 806, -1, 806, 806, 806, 806, -1, + 806, -1, 806, 806, 806, -1, 806, 806, + 806, 806, 806, 806, -1, 806, 806, 806, + 806, 806, 806, 806, 806, 806, 806, 806, + 806, 806, 806, 806, -1, -1, -1, -1, + -1, -1, 806, 806, 806, 806, -1, -1, + -1, 184, 185, -1, 186, 187, 188, 189, + 806, 806, 806, 806, -1, -1, 806, 806, + -1, -1, -1, -1, -1, 806, -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, 806, 806, 806, 806, + -1, 798, 806, 806, 806, 806, 806, 806, + -1, -1, -1, 806, 806, 806, 806, 806, + -1, -1, -1, -1, 806, -1, -1, -1, + 806, 806, 806, -1, 806, 806, -1, -1, + 806, -1, -1, -1, -1, -1, -1, -1, + -1, 806, 806, 806, 806, 806, -1, 806, + 806, 806, -1, -1, 806, 806, 806, 806, + 806, 806, 806, 806, -1, 806, 806, 806, + -1, -1, -1, 806, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 806, 806, + -1, -1, 806, -1, -1, -1, -1, 806, + -1, -1, -1, -1, 806, -1, 806, 806, + 806, 806, 806, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 806, -1, + 806, -1, -1, 806, 806, -1, -1, -1, + 806, -1, 806, -1, 806, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, -1, 807, 807, 807, + 807, 807, 807, -1, 807, 807, 807, 807, + -1, 807, -1, 807, 807, 807, -1, 807, + 807, 807, 807, 807, 807, -1, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, -1, -1, -1, + -1, -1, -1, 807, 807, 807, 807, -1, + -1, -1, 184, 185, -1, 186, 187, 188, + 189, 807, 807, 807, 807, -1, -1, 807, + 807, -1, -1, -1, -1, -1, 807, -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, 806, -1, -1, 807, 807, 807, + 807, -1, -1, 807, 807, 807, 807, 807, + 807, -1, -1, -1, 807, 807, 807, 807, + 807, -1, -1, -1, -1, 807, -1, -1, + -1, 807, 807, 807, -1, 807, 807, -1, + -1, 807, -1, -1, -1, -1, -1, -1, + -1, -1, 807, 807, 807, 807, 807, -1, + 807, 807, 807, -1, -1, 807, 807, 807, + 807, 807, 807, 807, 807, -1, 807, 807, + 807, -1, -1, -1, 807, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 807, + 807, -1, -1, 807, -1, -1, -1, -1, + 807, -1, -1, -1, -1, 807, -1, 807, + 807, 807, 807, 807, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 807, + -1, 807, -1, -1, 807, 807, -1, -1, + -1, 807, -1, 807, -1, 807, 809, 809, + 809, 809, 809, 809, 809, 809, 809, 809, + 809, 809, 809, 809, 809, 809, 809, 809, + 809, 809, 809, 809, 809, -1, 809, 809, + 809, 809, 809, 809, -1, 809, 809, 809, + 809, -1, 809, -1, 809, 809, 809, -1, + 809, 809, 809, 809, 809, 809, -1, 809, + 809, 809, 809, 809, 809, 809, 809, 809, + 809, 809, 809, 809, 809, 809, -1, -1, + -1, -1, -1, -1, 809, 809, 809, 809, + -1, -1, -1, 809, 809, -1, 809, 809, + 809, 809, 809, 809, 809, 809, 190, 191, + 809, 809, -1, -1, -1, -1, -1, 809, + -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, 807, -1, -1, 809, 809, + 809, 809, -1, -1, 809, 809, 809, 809, + 809, 809, -1, -1, -1, 809, 809, 809, + 809, 809, -1, -1, -1, -1, 809, -1, + -1, -1, 809, 809, 809, -1, 809, 809, + -1, -1, 809, -1, -1, -1, -1, -1, + -1, -1, -1, 809, 809, 809, 809, 809, + -1, 809, 809, 809, -1, -1, 809, 809, + 809, 809, 809, 809, 809, 809, -1, 809, + 809, 809, -1, -1, -1, 809, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 809, 809, -1, -1, 809, -1, -1, -1, + -1, 809, -1, -1, -1, -1, 809, -1, + 809, 809, 809, 809, 809, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 809, -1, 809, -1, -1, 809, 809, -1, + -1, -1, 809, -1, 809, -1, 809, 810, + 810, 810, 810, 810, 810, 810, 810, 810, + 810, 810, 810, 810, 810, 810, 810, 810, + 810, 810, 810, 810, 810, 810, -1, 810, + 810, 810, 810, 810, 810, -1, 810, 810, + 810, 810, -1, 810, -1, 810, 810, 810, + -1, 810, 810, 810, 810, 810, 810, -1, + 810, 810, 810, 810, 810, 810, 810, 810, + 810, 810, 810, 810, 810, 810, 810, -1, + -1, -1, -1, -1, -1, 810, 810, 810, + 810, -1, -1, -1, 810, 810, -1, 810, + 810, 810, 810, 810, 810, 810, 810, 190, + 191, 810, 810, -1, -1, -1, -1, -1, + 810, -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, 809, -1, -1, 810, + 810, 810, 810, -1, -1, 810, 810, 810, + 810, 810, 810, -1, -1, -1, 810, 810, + 810, 810, 810, -1, -1, -1, -1, 810, + -1, -1, -1, 810, 810, 810, -1, 810, + 810, -1, -1, 810, -1, -1, -1, -1, + -1, -1, -1, -1, 810, 810, 810, 810, + 810, -1, 810, 810, 810, -1, -1, 810, + 810, 810, 810, 810, 810, 810, 810, -1, + 810, 810, 810, -1, -1, -1, 810, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 810, 810, -1, -1, 810, -1, -1, + -1, -1, 810, -1, -1, -1, -1, 810, + -1, 810, 810, 810, 810, 810, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 810, -1, 810, -1, -1, 810, 810, + -1, -1, -1, 810, -1, 810, -1, 810, + 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, -1, + 811, 811, 811, 811, 811, 811, -1, 811, + 811, 811, 811, -1, 811, -1, 811, 811, + 811, -1, 811, 811, 811, 811, 811, 811, + -1, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, + -1, -1, -1, -1, -1, -1, 811, 811, + 811, 811, -1, -1, -1, 811, 811, -1, + 811, 811, 811, 811, 811, 811, 811, 811, + 190, 191, 811, 811, -1, -1, -1, -1, + -1, 811, -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, 810, -1, -1, + 811, 811, 811, 811, -1, -1, 811, 811, + 811, 811, 811, 811, -1, -1, -1, 811, + 811, 811, 811, 811, -1, -1, -1, -1, + 811, -1, -1, -1, 811, 811, 811, -1, + 811, 811, -1, -1, 811, -1, -1, -1, + -1, -1, -1, -1, -1, 811, 811, 811, + 811, 811, -1, 811, 811, 811, -1, -1, + 811, 811, 811, 811, 811, 811, 811, 811, + -1, 811, 811, 811, -1, -1, -1, 811, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 811, 811, -1, -1, 811, -1, + -1, -1, -1, 811, -1, -1, -1, -1, + 811, -1, 811, 811, 811, 811, 811, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 811, -1, 811, -1, -1, 811, + 811, -1, -1, -1, 811, -1, 811, -1, + 811, 812, 812, 812, 812, 812, 812, 812, + 812, 812, 812, 812, 812, 812, 812, 812, + 812, 812, 812, 812, 812, 812, 812, 812, + -1, 812, 812, 812, 812, 812, 812, -1, + 812, 812, 812, 812, -1, 812, -1, 812, + 812, 812, -1, 812, 812, 812, 812, 812, + 812, -1, 812, 812, 812, 812, 812, 812, + 812, 812, 812, 812, 812, 812, 812, 812, + 812, -1, -1, -1, -1, -1, -1, 812, + 812, 812, 812, -1, -1, -1, 812, 812, + -1, 812, 812, 812, 812, 812, 812, 812, + 812, 190, 191, 812, 812, -1, -1, -1, + -1, -1, 812, -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, 811, -1, + -1, 812, 812, 812, 812, -1, -1, 812, + 812, 812, 812, 812, 812, -1, -1, -1, + 812, 812, 812, 812, 812, -1, -1, -1, + -1, 812, -1, -1, -1, 812, 812, 812, + -1, 812, 812, -1, -1, 812, -1, -1, + -1, -1, -1, -1, -1, -1, 812, 812, + 812, 812, 812, -1, 812, 812, 812, -1, + -1, 812, 812, 812, 812, 812, 812, 812, + 812, -1, 812, 812, 812, -1, -1, -1, + 812, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 812, 812, -1, -1, 812, + -1, -1, -1, -1, 812, -1, -1, -1, + -1, 812, -1, 812, 812, 812, 812, 812, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 812, -1, 812, -1, -1, + 812, 812, -1, -1, -1, 812, -1, 812, + -1, 812, 813, 813, 813, 813, 813, 813, + 813, 813, 813, 813, 813, 813, 813, 813, + 813, 813, 813, 813, 813, 813, 813, 813, + 813, -1, 813, 813, 813, 813, 813, 813, + -1, 813, 813, 813, 813, -1, 813, -1, + 813, 813, 813, -1, 813, 813, 813, 813, + 813, 813, -1, 813, 813, 813, 813, 813, + 813, 813, 813, 813, 813, 813, 813, 813, + 813, 813, -1, -1, -1, -1, -1, -1, + 813, 813, 813, 813, -1, -1, -1, 813, + 813, -1, 813, 813, 813, 813, 813, 813, + 813, 813, 190, 191, 813, 813, -1, -1, + -1, -1, -1, 813, -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, 812, + -1, -1, 813, 813, 813, 813, -1, -1, + 813, 813, 813, 813, 813, 813, -1, -1, + -1, 813, 813, 813, 813, 813, -1, -1, + -1, -1, 813, -1, -1, -1, 813, 813, + 813, -1, 813, 813, -1, -1, 813, -1, + -1, -1, -1, -1, -1, -1, -1, 813, + 813, 813, 813, 813, -1, 813, 813, 813, + -1, -1, 813, 813, 813, 813, 813, 813, + 813, 813, -1, 813, 813, 813, -1, -1, + -1, 813, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 813, 813, -1, -1, + 813, -1, -1, -1, -1, 813, -1, -1, + -1, -1, 813, -1, 813, 813, 813, 813, + 813, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 813, -1, 813, -1, + -1, 813, 813, -1, -1, -1, 813, -1, + 813, -1, 813, 814, 814, 814, 814, 814, + 814, 814, 814, 814, 814, 814, 814, 814, + 814, 814, 814, 814, 814, 814, 814, 814, + 814, 814, -1, 814, 814, 814, 814, 814, + 814, -1, 814, 814, 814, 814, -1, 814, + -1, 814, 814, 814, -1, 814, 814, 814, + 814, 814, 814, -1, 814, 814, 814, 814, + 814, 814, 814, 814, 814, 814, 814, 814, + 814, 814, 814, -1, -1, -1, -1, -1, + -1, 814, 814, 814, 814, -1, -1, -1, + 814, 814, -1, 814, 814, 814, 814, 814, + 814, 814, 814, 190, 191, 814, 814, -1, + -1, -1, -1, -1, 814, -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, + 813, -1, -1, 814, 814, 814, 814, -1, + -1, 814, 814, 814, 814, 814, 814, -1, + -1, -1, 814, 814, 814, 814, 814, -1, + -1, -1, -1, 814, -1, -1, -1, 814, + 814, 814, -1, 814, 814, -1, -1, 814, + -1, -1, -1, -1, -1, -1, -1, -1, + 814, 814, 814, 814, 814, -1, 814, 814, + 814, -1, -1, 814, 814, 814, 814, 814, + 814, 814, 814, -1, 814, 814, 814, -1, + -1, -1, 814, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 814, 814, -1, + -1, 814, -1, -1, -1, -1, 814, -1, + -1, -1, -1, 814, -1, 814, 814, 814, + 814, 814, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 814, -1, 814, + -1, -1, 814, 814, -1, -1, -1, 814, + -1, 814, -1, 814, 816, 816, 816, 816, + 816, 816, 816, 816, 816, 816, 816, 816, + 816, 816, 816, 816, 816, 816, 816, 816, + 816, 816, 816, -1, 816, 816, 816, 816, + 816, 816, -1, 816, 816, 816, 816, -1, + 816, -1, 816, 816, 816, -1, 816, 816, + 816, 816, 816, 816, -1, 816, 816, 816, + 816, 816, 816, 816, 816, 816, 816, 816, + 816, 816, 816, 816, -1, 193, -1, -1, + -1, -1, 816, 816, 816, 816, 192, -1, + -1, 816, 816, -1, 816, 816, 816, 816, + 816, 816, 816, 816, 816, 816, 816, 816, + -1, -1, -1, -1, -1, 816, -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, 814, -1, -1, 816, 816, 816, 816, + -1, -1, 816, 816, 816, 816, 816, 816, + -1, -1, -1, 816, 816, 816, 816, 816, + -1, -1, -1, -1, 816, -1, -1, -1, + 816, 816, 816, -1, 816, 816, -1, -1, + 816, -1, -1, -1, -1, -1, -1, -1, + -1, 816, 816, 816, 816, 816, -1, 816, + 816, 816, -1, -1, 816, 816, 816, 816, + 816, 816, 816, 816, -1, 816, 816, 816, + -1, -1, -1, 816, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 816, 816, + -1, -1, 816, -1, -1, -1, -1, 816, + -1, -1, -1, -1, 816, -1, 816, 816, + 816, 816, 816, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 816, -1, + 816, -1, -1, 816, 816, -1, -1, -1, + 816, -1, 816, -1, 816, 817, 817, 817, + 817, 817, 817, 817, 817, 817, 817, 817, + 817, 817, 817, 817, 817, 817, 817, 817, + 817, 817, 817, 817, -1, 817, 817, 817, + 817, 817, 817, -1, 817, 817, 817, 817, + -1, 817, -1, 817, 817, 817, -1, 817, + 817, 817, 817, 817, 817, -1, 817, 817, + 817, 817, 817, 817, 817, 817, 817, 817, + 817, 817, 817, 817, 817, -1, 193, -1, + -1, -1, -1, 817, 817, 817, 817, 192, + -1, -1, 817, 817, -1, 817, 817, 817, + 817, 817, 817, 817, 817, 817, 817, 817, + 817, -1, -1, -1, -1, -1, 817, -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, 816, -1, -1, 817, 817, 817, + 817, -1, -1, 817, 817, 817, 817, 817, + 817, -1, -1, -1, 817, 817, 817, 817, + 817, -1, -1, -1, -1, 817, -1, -1, + -1, 817, 817, 817, -1, 817, 817, -1, + -1, 817, -1, -1, -1, -1, -1, -1, + -1, -1, 817, 817, 817, 817, 817, -1, + 817, 817, 817, -1, -1, 817, 817, 817, + 817, 817, 817, 817, 817, -1, 817, 817, + 817, -1, -1, -1, 817, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 817, + 817, -1, -1, 817, -1, -1, -1, -1, + 817, -1, -1, -1, -1, 817, -1, 817, + 817, 817, 817, 817, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 817, + -1, 817, -1, -1, 817, 817, -1, -1, + -1, 817, -1, 817, -1, 817, 820, 820, + 820, 820, 820, 820, 820, 820, 820, 820, + 820, 820, 820, 820, 820, 820, 820, 820, + 820, 820, 820, 820, 820, -1, 820, 820, + 820, 820, 820, 820, -1, 820, 820, 820, + 820, -1, 820, -1, 820, 820, 820, -1, + 820, 820, 820, 820, 820, 820, -1, 820, + 820, 820, 820, 820, 820, 820, 820, 820, + 820, 820, 820, 820, 820, 820, -1, 820, + -1, -1, -1, -1, 820, 820, 820, 820, + 820, -1, -1, 820, 820, -1, 820, 820, + 820, 820, 820, 820, 820, 820, 820, 820, + 820, 820, -1, -1, -1, -1, -1, 820, + -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, 817, -1, -1, 820, 820, + 820, 820, -1, -1, 820, 820, 820, 820, + 820, 820, -1, -1, -1, 820, 820, 820, + 820, 820, -1, -1, -1, -1, 820, -1, + -1, -1, 820, 820, 820, -1, 820, 820, + -1, -1, 820, -1, -1, -1, -1, -1, + -1, -1, -1, 820, 820, 820, 820, 820, + -1, 820, 820, 820, -1, -1, 820, 820, + 820, 820, 820, 820, 820, 820, -1, 820, + 820, 820, -1, -1, -1, 820, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 820, 820, -1, -1, 820, -1, -1, -1, + -1, 820, -1, -1, -1, -1, 820, -1, + 820, 820, 820, 820, 820, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 820, -1, 820, -1, -1, 820, 820, -1, + -1, -1, 820, -1, 820, -1, 820, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, -1, 819, + 819, 819, 819, 819, 819, -1, 819, 819, + 819, 819, -1, 819, -1, 819, 819, 819, + -1, 819, 819, 819, 819, 819, 819, -1, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, -1, + 819, -1, -1, -1, -1, 819, 819, 819, + 819, 819, -1, -1, 819, 819, -1, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, -1, -1, -1, -1, -1, + 819, -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, 820, -1, -1, 819, + 819, 819, 819, -1, -1, 819, 819, 819, + 819, 819, 819, -1, -1, -1, 819, 819, + 819, 819, 819, -1, -1, -1, -1, 819, + -1, -1, -1, 819, 819, 819, -1, 819, + 819, -1, -1, 819, -1, -1, -1, -1, + -1, -1, -1, -1, 819, 819, 819, 819, + 819, -1, 819, 819, 819, -1, -1, 819, + 819, 819, 819, 819, 819, 819, 819, -1, + 819, 819, 819, -1, -1, -1, 819, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 819, 819, -1, -1, 819, -1, -1, + -1, -1, 819, -1, -1, -1, -1, 819, + -1, 819, 819, 819, 819, 819, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 819, -1, 819, -1, -1, 819, 819, + -1, -1, -1, 819, -1, 819, -1, 819, + 843, 843, 843, 843, 843, 843, 843, 843, + 843, 843, 843, 843, 843, 843, 843, 843, + 843, 843, 843, 843, 843, 843, 843, -1, + 843, 843, 843, 843, 843, 843, -1, 843, + 843, 843, 843, -1, 843, -1, 843, 843, + 843, -1, 843, 843, 843, 843, 843, 843, + -1, 843, 843, 843, 843, 843, 843, 843, + 843, 843, 843, 843, 843, 843, 843, 843, + -1, 843, -1, -1, -1, -1, 843, 843, + 843, 843, 843, -1, -1, 843, 843, -1, + 843, 843, 843, 843, 843, 843, 843, 843, + 843, 843, 843, 843, -1, -1, -1, -1, + -1, 843, -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, 819, -1, -1, + 843, 843, 843, 843, -1, -1, 843, 843, + 843, 843, 843, 843, -1, -1, -1, 843, + 843, 843, 843, 843, -1, -1, -1, -1, + 843, -1, -1, -1, 843, 843, 843, -1, + 843, 843, -1, -1, 843, -1, -1, -1, + -1, -1, -1, -1, -1, 843, 843, 843, + 843, 843, -1, 843, 843, 843, -1, -1, + 843, 843, 843, 843, 843, 843, 843, 843, + -1, 843, 843, 843, -1, -1, -1, 843, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 843, 843, -1, -1, 843, -1, + -1, -1, -1, 843, -1, -1, -1, -1, + 843, -1, 843, 843, 843, 843, 843, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 843, -1, 843, -1, -1, 843, + 843, -1, -1, -1, 843, -1, 843, -1, + 843, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, -1, + 849, 849, 849, 849, 849, 849, -1, 849, + 849, 849, -1, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, -1, 849, 849, 849, 849, + -1, -1, -1, -1, -1, -1, -1, 849, + 849, -1, 849, -1, -1, 849, -1, -1, + -1, -1, 849, -1, -1, 849, 849, 849, + 849, -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, 849, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 843, -1, + -1, 849, 849, 849, 849, -1, -1, 849, + 849, 849, 849, 849, 849, -1, 849, 849, + 849, 849, 849, 849, 849, -1, -1, 849, + -1, 849, 849, -1, 849, 849, 849, 849, + -1, 849, 849, -1, -1, 849, -1, -1, + -1, -1, -1, 849, -1, 849, 849, 849, + 849, 849, -1, -1, -1, 849, 849, -1, + 849, 849, 849, 849, 849, 849, 849, 849, + 849, -1, 849, 849, 849, -1, -1, 849, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 849, 849, 849, -1, -1, 849, 849, + 849, -1, -1, 849, 849, 849, 849, 849, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 849, -1, 849, 849, 849, + 849, -1, 857, 857, 857, 857, 857, 857, + 857, 857, 857, 857, 857, 857, 857, 857, + 857, 857, 857, 857, 857, 857, 857, 857, + 857, 857, 857, 857, 857, 857, 857, 857, + -1, 857, 857, 857, 857, 857, 857, -1, + 857, 857, 857, -1, 857, 857, 857, 857, + 857, 857, 857, 857, 857, 857, 857, 857, + 857, 857, 857, 857, 857, 857, 857, 857, + 857, 857, -1, -1, -1, -1, -1, -1, + 857, 857, -1, 857, -1, -1, 857, -1, + -1, -1, -1, 857, -1, -1, 857, 857, + 857, 857, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 857, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 857, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 857, 857, 857, 857, -1, 849, + 857, 857, 857, 857, 857, 857, -1, 857, + 857, 857, 857, 857, 857, 857, -1, -1, + 857, -1, 857, 857, -1, 857, 857, 857, + 857, -1, 857, 857, -1, -1, 857, 857, + 857, -1, -1, -1, 857, -1, 857, 857, + 857, 857, 857, -1, -1, -1, 857, 857, + -1, 857, 857, 857, 857, 857, 857, 857, + 857, 857, -1, 857, 857, 857, -1, -1, + 857, -1, 857, -1, -1, -1, 857, 857, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 857, 857, 857, -1, -1, 857, + 857, 857, -1, -1, 857, 857, 857, 857, + 857, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 857, -1, 857, 857, + 857, 857, -1, -1, 857, -1, -1, -1, + -1, 858, 858, 858, 858, 858, 858, 858, + 858, 858, 858, 858, 858, 858, 858, 858, + 858, 858, 858, 858, 858, 858, 858, 858, + 858, 858, 858, 858, 858, 858, 858, -1, + 858, 858, 858, 858, 858, 858, -1, 858, + 858, 858, -1, 858, 858, 858, 858, 858, + 858, 858, 858, 858, 858, 858, 858, 858, + 858, 858, 858, 858, 858, 858, 858, 858, + 858, -1, -1, -1, -1, -1, -1, 858, + 858, -1, 858, -1, -1, 858, -1, -1, + -1, -1, 858, -1, -1, 858, 858, 858, + 858, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 858, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 858, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 857, 858, 858, 858, 858, -1, -1, 858, + 858, 858, 858, 858, 858, -1, 858, 858, + 858, 858, 858, 858, 858, -1, -1, 858, + -1, 858, 858, -1, 858, 858, 858, 858, + -1, 858, 858, -1, -1, 858, 858, 858, + -1, -1, -1, 858, -1, 858, 858, 858, + 858, 858, -1, -1, -1, 858, 858, -1, + 858, 858, 858, 858, 858, 858, 858, 858, + 858, -1, 858, 858, 858, -1, -1, 858, + -1, 858, -1, -1, -1, 858, 858, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 858, 858, 858, -1, -1, 858, 858, + 858, -1, -1, 858, 858, 858, 858, 858, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 858, -1, 858, 858, 858, + 858, -1, -1, 858, -1, -1, -1, -1, + 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, -1, 859, + 859, 859, 859, 859, 859, -1, 859, 859, + 859, -1, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, + -1, -1, -1, -1, -1, -1, 859, 859, + -1, 859, -1, -1, 859, -1, -1, -1, + -1, 859, -1, -1, 859, 859, 859, 859, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 859, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 859, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 858, + 859, 859, 859, 859, -1, -1, 859, 859, + 859, 859, 859, 859, -1, 859, 859, 859, + 859, 859, 859, 859, -1, -1, 859, -1, + 859, 859, -1, 859, 859, 859, 859, -1, + 859, 859, -1, -1, 859, 859, 859, -1, + -1, -1, 859, -1, 859, 859, 859, 859, + 859, -1, -1, -1, 859, 859, -1, 859, + 859, 859, 859, 859, 859, 859, 859, 859, + -1, 859, 859, 859, -1, -1, 859, -1, + 859, -1, -1, -1, 859, 859, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 859, 859, 859, -1, -1, 859, 859, 859, + -1, -1, 859, 859, 859, 859, 859, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 859, -1, 859, 859, 859, 859, + -1, -1, 859, -1, -1, -1, -1, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, -1, 777, + 777, 777, 777, 777, 777, -1, 777, 777, + 777, 777, -1, 777, -1, 777, 777, 777, + -1, 777, 777, 777, 777, 777, 777, -1, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, -1, 777, 777, 777, 777, -1, -1, + -1, -1, -1, -1, -1, 777, -1, -1, + 777, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 777, 777, 777, 777, -1, + -1, 182, 183, -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, 859, 777, + 777, 777, 777, -1, -1, 777, 777, -1, + 777, 777, 777, -1, -1, -1, 777, 777, + -1, 777, 777, -1, -1, -1, -1, 777, + -1, -1, -1, 777, 777, 777, -1, 777, + 777, -1, -1, 777, -1, -1, -1, -1, + -1, -1, -1, -1, 777, 777, 777, 777, + -1, -1, -1, 777, 777, -1, -1, 777, + 777, 777, 777, 777, 777, 777, 777, -1, + 777, 777, 777, -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, 777, 777, 777, 777, 777, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 777, -1, -1, -1, -1, 777, -1, + 801, 801, 801, 801, 801, 801, 801, 801, + 801, 801, 801, 801, 801, 801, 801, 801, + 801, 801, 801, 801, 801, 801, 801, -1, + 801, 801, 801, 801, 801, 801, -1, 801, + 801, 801, 801, -1, 801, -1, 801, 801, + 801, -1, 801, 801, 801, 801, 801, 801, + -1, 801, 801, 801, 801, 801, 801, 801, + 801, 801, -1, 801, 801, 801, 801, -1, + -1, -1, -1, -1, -1, -1, 801, -1, + -1, 801, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 801, 801, 801, 801, + -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, + 801, 801, 801, 801, -1, 777, 801, 801, + -1, 801, 801, 801, -1, -1, -1, 801, + 801, -1, 801, 801, -1, -1, -1, -1, + 801, -1, -1, -1, 801, 801, 801, -1, + 801, 801, -1, -1, 801, -1, -1, -1, + -1, -1, -1, -1, -1, 801, 801, 801, + 801, -1, -1, -1, 801, 801, -1, -1, + 801, 801, 801, 801, 801, 801, 801, 801, + -1, 801, 801, 801, -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, 801, 801, 801, 801, 801, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 801, -1, -1, -1, -1, 801, + -1, 802, 802, 802, 802, 802, 802, 802, + 802, 802, 802, 802, 802, 802, 802, 802, + 802, 802, 802, 802, 802, 802, 802, 802, + -1, 802, 802, 802, 802, 802, 802, -1, + 802, 802, 802, 802, -1, 802, -1, 802, + 802, 802, -1, 802, 802, 802, 802, 802, + 802, -1, 802, 802, 802, 802, 802, 802, + 802, 802, 802, -1, 802, 802, 802, 802, + -1, -1, -1, -1, -1, -1, -1, 802, + -1, -1, 802, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 802, 802, 802, + 802, -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, 802, 802, 802, 802, -1, 801, 802, + 802, -1, 802, 802, 802, -1, -1, -1, + 802, 802, -1, 802, 802, -1, -1, -1, + -1, 802, -1, -1, -1, 802, 802, 802, + -1, 802, 802, -1, -1, 802, -1, -1, + -1, -1, -1, -1, -1, -1, 802, 802, + 802, 802, -1, -1, -1, 802, 802, -1, + -1, 802, 802, 802, 802, 802, 802, 802, + 802, -1, 802, 802, 802, -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, 802, 802, 802, 802, 802, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 802, -1, -1, -1, -1, + 802, -1, 803, 803, 803, 803, 803, 803, + 803, 803, 803, 803, 803, 803, 803, 803, + 803, 803, 803, 803, 803, 803, 803, 803, + 803, -1, 803, 803, 803, 803, 803, 803, + -1, 803, 803, 803, 803, -1, 803, -1, + 803, 803, 803, -1, 803, 803, 803, 803, + 803, 803, -1, 803, 803, 803, 803, 803, + 803, 803, 803, 803, -1, 803, 803, 803, + 803, -1, -1, -1, -1, -1, -1, -1, + 803, -1, -1, 803, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 803, 803, + 803, 803, -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, 803, 803, 803, 803, -1, 802, + 803, 803, -1, 803, 803, 803, -1, -1, + -1, 803, 803, -1, 803, 803, -1, -1, + -1, -1, 803, -1, -1, -1, 803, 803, + 803, -1, 803, 803, -1, -1, 803, -1, + -1, -1, -1, -1, -1, -1, -1, 803, + 803, 803, 803, -1, -1, -1, 803, 803, + -1, -1, 803, 803, 803, 803, 803, 803, + 803, 803, -1, 803, 803, 803, -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, 803, 803, 803, 803, + 803, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 803, -1, -1, -1, + -1, 803, -1, 804, 804, 804, 804, 804, + 804, 804, 804, 804, 804, 804, 804, 804, + 804, 804, 804, 804, 804, 804, 804, 804, + 804, 804, -1, 804, 804, 804, 804, 804, + 804, -1, 804, 804, 804, 804, -1, 804, + -1, 804, 804, 804, -1, 804, 804, 804, + 804, 804, 804, -1, 804, 804, 804, 804, + 804, 804, 804, 804, 804, -1, 804, 804, + 804, 804, -1, -1, -1, -1, -1, -1, + -1, 804, -1, -1, 804, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 804, + 804, 804, 804, 77, 78, 79, 80, -1, + 76, -1, -1, -1, -1, -1, -1, -1, + -1, 100, 96, 98, 94, 92, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 87, + -1, -1, -1, 88, 85, 84, 86, -1, + -1, -1, 72, 73, 74, -1, -1, -1, + -1, 1006, 71, -1, 104, 106, 108, 110, + -1, -1, -1, 804, 804, 804, 804, 75, + 803, 804, 804, -1, 804, 804, 804, -1, + -1, -1, 804, 804, -1, 804, 804, -1, + -1, -1, -1, 804, -1, -1, -1, 804, + 804, 804, -1, 804, 804, -1, -1, 804, + -1, -1, -1, -1, -1, -1, -1, -1, + 804, 804, 804, 804, -1, -1, -1, 804, + 804, -1, -1, 804, 804, 804, 804, 804, + 804, 804, 804, -1, 804, 804, 804, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 77, 78, 79, 80, + -1, 76, -1, -1, -1, 804, 804, 804, + 804, 804, 100, 96, 98, 94, 92, -1, + -1, -1, -1, -1, -1, 804, -1, -1, + 87, -1, 804, -1, 88, 85, 84, 86, + -1, -1, -1, 72, 73, 74, -1, -1, + -1, -1, 1006, 71, -1, 104, 106, 108, + 110, -1, 521, 82, 90, -1, -1, -1, + 75, 987, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 102, 89, 81, 132, 58, + -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, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 804, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 470, 62, 63, + 64, 65, -1, 70, 82, 90, -1, -1, + -1, 469, -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, 102, 89, 81, 132, + 58, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 468, 886, 886, 886, 886, 886, + 886, 886, 886, 886, 886, 886, 886, 886, + 886, 886, 886, 886, 886, 886, 886, 886, + 886, 886, -1, 886, 886, 886, 886, 886, + 886, -1, 886, 886, 886, 886, -1, 886, + -1, 886, 886, 886, -1, 886, 886, 886, + 886, 886, 886, -1, 886, 886, 886, 886, + 886, 886, 886, 886, 886, 886, 886, 886, + 886, 886, 886, -1, 886, -1, -1, -1, + -1, 886, 886, 886, 886, 886, -1, -1, + 886, 886, -1, 886, 886, 886, 886, 886, + 886, 886, 886, 886, 886, 886, 886, -1, + -1, -1, -1, -1, 886, -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, 886, 886, 886, 886, -1, + -1, 886, 886, 886, 886, 886, 886, -1, + -1, -1, 886, 886, 886, 886, 886, -1, + -1, -1, -1, 886, -1, -1, -1, 886, + 886, 886, -1, 886, 886, -1, -1, 886, + -1, -1, -1, -1, -1, -1, -1, -1, + 886, 886, 886, 886, 886, -1, 886, 886, + 886, 886, -1, 886, 886, 886, 886, 886, + 886, 886, 886, -1, 886, 886, 886, -1, + -1, -1, 886, -1, -1, -1, -1, -1, + -1, -1, 886, -1, -1, 886, 886, -1, + -1, 886, -1, -1, -1, -1, 886, -1, + -1, -1, -1, 886, -1, 886, 886, 886, + 886, 886, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 886, -1, 886, + -1, -1, 886, 886, -1, -1, -1, 886, + -1, 886, -1, 886, -1, -1, -1, -1, + 890, 890, 890, 890, -1, 890, -1, -1, + -1, -1, -1, -1, -1, -1, 890, 890, + 890, 890, 890, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 890, -1, -1, -1, + 890, 890, 890, 890, -1, -1, -1, 890, + 890, 890, -1, -1, -1, -1, 890, 890, + -1, 1004, 1004, 1004, 890, -1, -1, -1, + -1, -1, -1, -1, 890, -1, -1, -1, + -1, -1, -1, -1, 521, 82, 90, -1, + -1, -1, 890, 890, 890, 890, 890, 890, + 890, 890, -1, 890, -1, -1, -1, 999, + -1, -1, -1, -1, 890, 890, 890, 890, + 890, -1, -1, -1, -1, 102, 89, 81, + 132, 58, 890, -1, -1, -1, 890, 890, + 890, 890, -1, -1, -1, 890, 890, 890, + -1, -1, -1, -1, 890, 890, -1, 1004, + 1004, 1004, 890, 999, -1, -1, -1, -1, + -1, 886, 890, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 890, 890, 890, 890, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 999, -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, 890, 890, 890, 890, 890, -1, 890, + 890, 890, -1, -1, -1, -1, -1, 470, + 62, 63, 64, 65, -1, 70, 82, 90, + 396, 397, -1, 469, -1, -1, -1, -1, + -1, 395, -1, -1, -1, -1, -1, -1, + 890, 890, 890, 890, 890, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 102, 89, + 81, 132, 58, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 497, -1, -1, -1, + -1, -1, -1, -1, 468, -1, -1, 890, + 890, 890, 890, 890, -1, 890, 890, 890, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 396, 397, + -1, -1, -1, -1, -1, -1, -1, 395, + -1, -1, -1, -1, -1, -1, 890, 890, + 890, 890, 890, 77, 78, 79, 80, -1, + 76, -1, -1, -1, -1, -1, -1, -1, + -1, 100, 96, 98, 94, 92, -1, -1, + -1, -1, 506, -1, -1, -1, -1, 87, + -1, -1, -1, 88, 85, 84, 86, -1, + -1, -1, 72, 73, 74, -1, -1, -1, + -1, 1006, 71, -1, 104, 106, 108, 110, + -1, -1, -1, -1, -1, -1, -1, 75, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 66, 67, 68, + 69, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 916, 916, 916, 916, 916, 916, 916, 916, + 916, 916, 916, 916, 916, 916, 916, 916, + 916, 916, 916, 916, 916, 916, 916, -1, + 916, 916, 916, 916, 916, 916, -1, 916, + 916, 916, 916, -1, 916, -1, 916, 916, + 916, 916, 916, 916, 916, 916, 916, 916, + -1, 916, 916, 916, 916, 916, 916, 916, + 916, 916, 916, 916, 916, 916, 916, 916, + -1, 916, -1, -1, 916, -1, 916, 916, + 916, 916, 916, -1, -1, 916, 916, -1, + 916, 916, 916, 916, 916, 916, 916, 916, + 916, 916, 916, 916, -1, -1, -1, -1, + -1, 916, -1, -1, 505, 62, 63, 64, + 65, -1, 70, 82, 90, -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, 102, 89, 81, 132, 58, + 916, 916, 916, 916, -1, -1, 916, 916, + 916, 916, 916, 916, -1, -1, -1, 916, + 916, 916, 916, 916, -1, -1, -1, -1, + 916, -1, -1, -1, 916, 916, 916, -1, + 916, 916, -1, -1, 916, -1, -1, -1, + -1, -1, -1, -1, -1, 916, 916, 916, + 916, 916, -1, 916, 916, 916, -1, -1, + 916, 916, 916, 916, 916, 916, 916, 916, + 916, 916, 916, 916, -1, -1, -1, 916, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 916, 916, -1, -1, 916, -1, + -1, -1, -1, 916, -1, -1, -1, -1, + 916, -1, 916, 916, 916, 916, 916, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 916, -1, 916, -1, -1, 916, + 916, -1, -1, -1, 916, -1, 916, -1, + 916, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 865, 865, 865, 865, + -1, 865, -1, -1, -1, -1, -1, -1, + -1, -1, 865, 865, 865, 865, 865, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 865, -1, -1, -1, 865, 865, 865, 865, + -1, -1, -1, 865, 865, 865, -1, -1, + -1, -1, 865, 865, -1, 865, 865, 865, + 865, -1, -1, -1, -1, -1, -1, -1, + 865, 865, -1, -1, -1, -1, -1, -1, + -1, -1, 396, 397, -1, -1, 865, 865, + 865, 865, -1, 395, 182, 183, -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, 497, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 916, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 396, 397, -1, -1, -1, -1, -1, -1, + -1, 395, -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, 506, 865, 865, 865, + 865, 865, -1, 865, 865, 865, -1, -1, + -1, 865, -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, 865, 865, 865, 865, + 865, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 865, -1, -1, -1, -1, -1, + -1, -1, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, + 837, -1, 837, 837, 837, 837, 837, 837, + -1, 837, 837, 837, 837, -1, 837, -1, + 837, 837, 837, -1, 837, 837, 837, 837, + 837, 837, -1, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, -1, 837, -1, -1, -1, -1, + 837, 837, 837, 837, 837, -1, -1, 837, + 837, -1, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, -1, -1, + -1, -1, -1, 837, -1, -1, 505, 62, + 63, 64, 65, -1, 70, 82, 90, -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, 102, 89, 81, + 132, 58, 837, 837, 837, 837, -1, -1, + 837, 837, 837, 837, 837, 837, -1, -1, + -1, 837, 837, 837, 837, 837, -1, -1, + -1, -1, 837, -1, -1, -1, 837, 837, + 837, -1, 837, 837, -1, -1, 837, -1, + -1, -1, -1, -1, -1, -1, -1, 837, + 837, 837, 837, 837, -1, 837, 837, 837, + -1, -1, 837, 837, 837, 837, 837, 837, + 837, 837, -1, 837, 837, 837, -1, -1, + -1, 837, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 837, 837, -1, -1, + 837, -1, -1, -1, -1, 837, -1, -1, + -1, -1, 837, -1, 837, 837, 837, 837, + 837, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 837, -1, 837, -1, + -1, 837, 837, -1, -1, -1, 837, -1, + 837, -1, 837, 827, 827, 827, 827, 827, + 827, 827, 827, 827, 827, 827, 827, 827, + 827, 827, 827, 827, 827, 827, 827, 827, + 827, 827, -1, 827, 827, 827, 827, 827, + 827, -1, 827, 827, 827, 827, -1, 827, + -1, 827, 827, 827, -1, 827, 827, 827, + 827, 827, 827, -1, 827, 827, 827, 827, + 827, 827, 827, 827, 827, 827, 827, 827, + 827, 827, 827, -1, 827, -1, -1, -1, + -1, 827, 827, 827, 827, 827, -1, -1, + 827, 827, -1, 827, 827, 827, 827, 827, + 827, 827, 827, 827, 827, 827, 827, -1, + -1, -1, -1, -1, 827, -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, + 837, -1, -1, 827, 827, 827, 827, -1, + -1, 827, 827, 827, 827, 827, 827, -1, + -1, -1, 827, 827, 827, 827, 827, -1, + -1, -1, -1, 827, -1, -1, -1, 827, + 827, 827, -1, 827, 827, -1, -1, 827, + -1, -1, -1, -1, -1, -1, -1, -1, + 827, 827, 827, 827, 827, -1, 827, 827, + 827, -1, -1, 827, 827, 827, 827, 827, + 827, 827, 827, -1, 827, 827, 827, -1, + -1, -1, 827, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 827, 827, -1, + -1, 827, -1, -1, -1, -1, 827, -1, + -1, -1, -1, 827, -1, 827, 827, 827, + 827, 827, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 827, -1, 827, + -1, -1, 827, 827, -1, -1, -1, 827, + -1, 827, -1, 827, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, -1, 828, 828, 828, 828, + 828, 828, -1, 828, 828, 828, 828, -1, + 828, -1, 828, 828, 828, -1, 828, 828, + 828, 828, 828, 828, -1, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, -1, 828, -1, -1, + -1, -1, 828, 828, 828, 828, 828, -1, + -1, 828, 828, -1, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, + -1, -1, -1, -1, -1, 828, -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, 827, -1, -1, 828, 828, 828, 828, + -1, -1, 828, 828, 828, 828, 828, 828, + -1, -1, -1, 828, 828, 828, 828, 828, + -1, -1, -1, -1, 828, -1, -1, -1, + 828, 828, 828, -1, 828, 828, -1, -1, + 828, -1, -1, -1, -1, -1, -1, -1, + -1, 828, 828, 828, 828, 828, -1, 828, + 828, 828, -1, -1, 828, 828, 828, 828, + 828, 828, 828, 828, -1, 828, 828, 828, + -1, -1, -1, 828, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 828, 828, + -1, -1, 828, -1, -1, -1, -1, 828, + -1, -1, -1, -1, 828, -1, 828, 828, + 828, 828, 828, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 828, -1, + 828, -1, -1, 828, 828, -1, -1, -1, + 828, -1, 828, -1, 828, 741, 741, 741, + 741, 741, 741, 741, 741, 741, 741, 741, + 741, 741, 741, -1, 741, 741, 741, 741, + 741, 741, -1, -1, -1, 741, 741, 741, + 741, 741, 741, -1, 741, 741, 741, 741, + -1, 741, -1, 741, 741, 741, -1, 741, + 741, 741, 741, 741, 741, -1, 741, 741, + 741, 741, 741, 741, 741, 741, 741, -1, + 741, 741, 741, 741, -1, -1, -1, -1, + -1, -1, -1, 741, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 741, 741, 741, 741, -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, 828, -1, -1, 741, 741, 741, + 741, -1, -1, 741, 741, -1, 741, 741, + 741, -1, -1, -1, 741, 741, -1, 741, + 741, -1, -1, -1, -1, 741, 741, -1, + -1, 741, 741, 741, -1, 741, 741, -1, + -1, 741, -1, -1, -1, -1, -1, -1, + -1, -1, 741, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 741, 741, 741, + 741, 741, 741, 741, 741, -1, 741, 741, + 741, -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, 741, + 741, 741, 741, 741, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 741, + -1, -1, 741, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, -1, 775, 775, 775, 775, 775, + 775, -1, 775, 775, 775, 775, -1, 775, + -1, 775, 775, 775, -1, 775, 775, 775, + 775, 775, 775, -1, 775, 775, 775, 775, + 775, 775, 775, 775, 775, -1, 775, 775, + 775, 775, -1, -1, -1, -1, -1, -1, + -1, 775, -1, -1, 775, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 775, + 775, 775, 775, -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, 775, 775, 775, 775, -1, + -1, 775, 775, 741, 775, 775, 775, -1, + -1, -1, 775, 775, -1, 775, 775, -1, + -1, -1, -1, 775, -1, -1, -1, 775, + 775, 775, -1, 775, 775, -1, -1, 775, + -1, -1, -1, -1, -1, -1, -1, -1, + 775, 775, 775, 775, -1, -1, -1, 775, + 775, -1, -1, 775, 775, 775, 775, 775, + 775, 775, 775, -1, 775, 775, 775, -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, 775, 775, 775, + 775, 775, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 775, -1, -1, + -1, -1, 775, -1, 786, 786, 786, 786, + 786, 786, 786, 786, 786, 786, 786, 786, + 786, 786, 786, 786, 786, 786, 786, 786, + 786, 412, 413, -1, 786, 786, 786, 786, + 786, 786, -1, 786, 786, 786, 786, -1, + 786, -1, 786, 786, 786, -1, 786, 786, + 786, 786, 786, 786, -1, 786, 786, 786, + 786, 786, 786, 786, 786, 786, -1, 786, + 786, 786, 786, -1, -1, -1, -1, -1, + -1, -1, 786, -1, -1, 786, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 786, 786, 786, 786, -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, 786, 786, 786, 786, + -1, 775, 786, 786, -1, 786, 786, 786, + -1, -1, -1, 786, 786, -1, 786, 786, + -1, -1, -1, -1, 786, -1, -1, -1, + 786, 786, 786, -1, 786, 786, -1, -1, + 786, -1, -1, -1, -1, -1, -1, -1, + -1, 786, 513, 409, 411, -1, -1, -1, + 786, 786, -1, -1, 786, 786, 786, 786, + 786, 786, 786, 786, -1, 786, 786, 786, + -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, 786, 786, + 786, 786, 786, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 786, -1, + -1, -1, -1, 786, -1, 783, 783, 783, + 783, 783, 783, 783, 783, 783, 783, 783, + 783, 783, 783, 783, 783, 783, 783, 783, + 783, 783, 783, 783, -1, 783, 783, 783, + 783, 783, 783, -1, 783, 783, 783, 783, + -1, 783, -1, 783, 783, 783, -1, 783, + 783, 783, 783, 783, 783, -1, 783, 783, + 783, 783, 783, 783, 783, 783, 783, -1, + 783, 783, 783, 783, -1, -1, -1, -1, + -1, -1, -1, 783, -1, -1, 783, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 783, 783, 783, 783, -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, 783, 783, 783, + 783, -1, 786, 783, 783, -1, 783, 783, + 783, -1, -1, -1, 783, 783, -1, 783, + 783, -1, -1, -1, -1, 783, -1, -1, + -1, 783, 783, 783, -1, 783, 783, -1, + -1, 783, -1, -1, -1, -1, -1, -1, + -1, -1, 783, 783, 783, 783, -1, -1, + -1, 783, 783, -1, -1, 783, 783, 783, + 783, 783, 783, 783, 783, -1, 783, 783, + 783, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 77, 78, + 79, 80, -1, 76, -1, -1, -1, 783, + 783, 783, 783, 783, 100, 96, 98, 94, + 92, -1, -1, -1, -1, -1, -1, 783, + -1, -1, 87, -1, 783, -1, 88, 85, + 84, 86, -1, -1, -1, 72, 73, 74, + -1, -1, -1, -1, 1006, 71, -1, 104, + 106, 108, 110, -1, -1, -1, -1, -1, + -1, -1, 75, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 66, 67, 68, 69, 48, 49, 50, 51, + 77, 78, 79, 80, -1, 76, -1, 34, + 35, 38, 36, -1, -1, -1, 100, 96, + 98, 94, 92, -1, -1, -1, 39, 40, + 41, -1, -1, -1, 87, -1, -1, -1, + 88, 85, 84, 86, -1, -1, -1, 72, + 73, 74, -1, -1, -1, -1, 56, 71, + -1, 104, 106, 108, 110, -1, -1, -1, + -1, -1, -1, -1, 75, -1, 259, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 66, 67, 68, 69, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 783, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 510, + 62, 63, 64, 65, -1, 70, 82, 90, + -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, 102, 89, + 81, 132, 58, -1, 512, 408, 410, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 260, -1, -1, -1, -1, + -1, 511, -1, -1, -1, -1, 33, 31, + 32, 52, 62, 63, 64, 65, -1, 70, + 82, 90, -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, + 102, 89, 81, 37, 58, 854, 854, 854, + 854, 854, 854, 854, 854, 854, 854, 854, + 854, 854, 854, 854, 854, 854, 854, 854, + 854, 854, 854, 854, 854, 854, 854, 854, + 854, 854, 854, -1, 854, 854, 854, 854, + 854, 854, -1, 854, 854, 854, -1, 854, + 854, 854, 854, 854, 854, 854, 854, 854, + 854, 854, 854, 854, 854, 854, 854, -1, + 854, 854, 854, 854, -1, -1, -1, -1, + -1, -1, -1, 854, 854, -1, 854, -1, + -1, 854, -1, -1, -1, -1, 854, -1, + -1, 854, 854, 854, 854, -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, 854, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 854, 854, 854, + 854, -1, -1, 854, 854, 854, 854, 854, + 854, -1, 854, 854, 854, 854, 854, 854, + 854, -1, -1, 854, -1, 854, 854, -1, + 854, 854, 854, 854, -1, 854, 854, -1, + -1, 854, -1, -1, -1, -1, -1, 854, + -1, 854, 854, 854, 854, 854, -1, -1, + -1, 854, 854, -1, 854, 854, 854, 854, + 854, 854, 854, 854, 854, -1, 854, 854, + 854, -1, -1, 854, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 854, 854, 854, + -1, -1, 854, 854, 854, -1, -1, 854, + 854, 854, 854, 854, -1, -1, -1, -1, + 909, 909, 909, 909, -1, 909, -1, 854, + -1, 854, 854, 854, 854, -1, 909, 909, + 909, 909, 909, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 909, -1, -1, -1, + 909, 909, 909, 909, -1, -1, -1, 909, + 909, 909, -1, -1, -1, -1, 909, 909, + -1, 909, 909, 909, 909, 909, -1, -1, + -1, -1, -1, -1, 909, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 909, 909, 909, 909, -1, -1, + 182, 183, -1, -1, -1, -1, -1, 909, + -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, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 854, -1, -1, -1, -1, + -1, 510, 62, 63, 64, 65, -1, 70, + 82, 90, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 909, 909, 909, 909, 909, -1, 909, + 909, 909, -1, -1, -1, -1, -1, -1, + 102, 89, 81, 132, 58, -1, -1, -1, + 909, 909, -1, -1, -1, -1, -1, -1, + -1, 909, -1, -1, -1, -1, -1, -1, + 909, 909, 909, 909, 909, 260, -1, -1, + -1, -1, -1, 511, -1, -1, -1, -1, + 33, 31, 32, 52, 62, 63, 64, 65, + -1, 70, 82, 90, 909, -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, 102, 89, 81, 37, 58, 852, + 852, 852, 852, 852, 852, 852, 852, 852, + 852, 852, 852, 852, 852, 852, 852, 852, + 852, 852, 852, 852, 852, 852, 852, 852, + 852, 852, 852, 852, 852, -1, 852, 852, + 852, 852, 852, 852, -1, 852, 852, 852, + -1, 852, 852, 852, 852, 852, 852, 852, + 852, 852, 852, 852, 852, 852, 852, 852, + 852, -1, 852, 852, 852, 852, -1, -1, + -1, -1, -1, -1, -1, 852, 852, -1, + 852, -1, -1, 852, -1, -1, -1, -1, + 852, -1, -1, 852, 852, 852, 852, -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, 852, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 852, + 852, 852, 852, -1, -1, 852, 852, 852, + 852, 852, 852, -1, 852, 852, 852, 852, + 852, 852, 852, -1, -1, 852, -1, 852, + 852, -1, 852, 852, 852, 852, -1, 852, + 852, -1, -1, 852, -1, -1, -1, -1, + -1, 852, -1, 852, 852, 852, 852, 852, + -1, -1, -1, 852, 852, -1, 852, 852, + 852, 852, 852, 852, 852, 852, 852, -1, + 852, 852, 852, -1, -1, 852, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 852, + 852, 852, -1, -1, 852, 852, 852, -1, + -1, 852, 852, 852, 852, 852, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 852, -1, 852, 852, 852, 852, -1, + 853, 853, 853, 853, 853, 853, 853, 853, + 853, 853, 853, 853, 853, 853, 853, 853, + 853, 853, 853, 853, 853, 853, 853, 853, + 853, 853, 853, 853, 853, 853, -1, 853, + 853, 853, 853, 853, 853, -1, 853, 853, + 853, -1, 853, 853, 853, 853, 853, 853, + 853, 853, 853, 853, 853, 853, 853, 853, + 853, 853, -1, 853, 853, 853, 853, -1, + -1, -1, -1, -1, -1, -1, 853, 853, + -1, 853, -1, -1, 853, -1, -1, -1, + -1, 853, -1, -1, 853, 853, 853, 853, + -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, 853, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 853, 853, 853, 853, -1, 852, 853, 853, + 853, 853, 853, 853, -1, 853, 853, 853, + 853, 853, 853, 853, -1, -1, 853, -1, + 853, 853, -1, 853, 853, 853, 853, -1, + 853, 853, -1, -1, 853, -1, -1, -1, + -1, -1, 853, -1, 853, 853, 853, 853, + 853, -1, -1, -1, 853, 853, -1, 853, + 853, 853, 853, 853, 853, 853, 853, 853, + -1, 853, 853, 853, -1, -1, 853, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 853, 853, 853, -1, -1, 853, 853, 853, + -1, -1, 853, 853, 853, 853, 853, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 853, -1, 853, 853, 853, 853, + -1, 718, 718, 718, 718, 718, 718, 718, + 718, 718, 718, 718, 718, 718, 718, -1, + 718, 718, 718, 718, 718, 718, -1, -1, + -1, 718, 718, 718, 718, 718, 718, -1, + 718, 718, 718, 718, -1, 718, -1, 718, + 718, 718, -1, 718, 718, 718, 718, 718, + 718, -1, 718, 718, 718, 718, 718, 718, + 718, 718, 718, -1, 718, 718, 718, 718, + -1, -1, -1, -1, -1, -1, -1, 718, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 718, 718, 718, + 718, -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, 718, 718, 718, 718, -1, 853, 718, + 718, 718, 718, 718, 718, -1, -1, -1, + 718, 718, 718, 718, 718, -1, -1, -1, + -1, 718, 718, -1, -1, 718, 718, 718, + -1, 718, 718, -1, -1, 718, -1, -1, + -1, -1, -1, -1, -1, -1, 718, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 718, 718, 718, 718, 718, 718, 718, + 718, -1, 718, 718, 718, -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, 718, 718, 718, 718, 718, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 718, -1, 718, 718, 48, + 49, 50, 51, 77, 78, 79, 80, 985, + 76, -1, 34, 35, 38, 36, -1, -1, + -1, 100, 96, 98, 94, 92, -1, -1, + -1, 39, 40, 41, -1, -1, -1, 87, + -1, -1, -1, 88, 85, 84, 86, -1, + -1, -1, 72, 73, 74, -1, -1, -1, + -1, 56, 71, -1, 104, 106, 108, 110, + -1, -1, -1, -1, -1, -1, -1, 75, + -1, -1, 985, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 66, 67, 68, + 69, -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, -1, -1, -1, -1, -1, 718, + -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, 272, -1, + -1, -1, -1, -1, -1, 985, 985, 520, + -1, 33, 31, 32, 52, 62, 63, 64, + 65, -1, 70, 82, 90, -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, 102, 89, 81, 37, 58, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 271, 845, 845, 845, 845, 845, 845, 845, + 845, 845, 845, 845, 845, 845, 845, 845, + 845, 845, 845, 845, 845, 845, 845, 845, + -1, 845, 845, 845, 845, 845, 845, -1, + 845, 845, 845, 845, -1, 845, -1, 845, + 845, 845, -1, 845, 845, 845, 845, 845, + 845, -1, 845, 845, 845, 845, 845, 845, + 845, 845, 845, 845, 845, 845, 845, 845, + 845, -1, 845, -1, -1, -1, -1, 845, + 845, 845, 845, 845, -1, -1, 845, 845, + -1, 845, 845, 845, 845, 845, 845, 845, + 845, 845, 845, 845, 845, -1, -1, -1, + -1, -1, 845, -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, 845, 845, 845, 845, -1, -1, 845, + 845, 845, 845, 845, 845, -1, -1, -1, + 845, 845, 845, 845, 845, -1, -1, -1, + -1, 845, -1, -1, -1, 845, 845, 845, + -1, 845, 845, -1, -1, 845, -1, -1, + -1, -1, -1, -1, -1, -1, 845, 845, + 845, 845, 845, -1, 845, 845, 845, -1, + -1, 845, 845, 845, 845, 845, 845, 845, + 845, -1, 845, 845, 845, -1, -1, -1, + 845, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 845, 845, -1, -1, 845, + -1, -1, -1, -1, 845, -1, -1, -1, + -1, 845, -1, 845, 845, 845, 845, 845, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 845, -1, 845, -1, -1, + 845, 845, -1, -1, -1, 845, -1, 845, + -1, 845, -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, -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, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 845, + -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, + 272, -1, -1, -1, -1, -1, -1, -1, + -1, 520, -1, 33, 31, 32, 52, 62, + 63, 64, 65, -1, 70, 82, 90, -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, 102, 89, 81, + 37, 58, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 271, 844, 844, 844, 844, 844, + 844, 844, 844, 844, 844, 844, 844, 844, + 844, 844, 844, 844, 844, 844, 844, 844, + 844, 844, -1, 844, 844, 844, 844, 844, + 844, -1, 844, 844, 844, 844, -1, 844, + -1, 844, 844, 844, -1, 844, 844, 844, + 844, 844, 844, -1, 844, 844, 844, 844, + 844, 844, 844, 844, 844, 844, 844, 844, + 844, 844, 844, -1, 844, -1, -1, -1, + -1, 844, 844, 844, 844, 844, -1, -1, + 844, 844, -1, 844, 844, 844, 844, 844, + 844, 844, 844, 844, 844, 844, 844, -1, + -1, -1, -1, -1, 844, -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, 844, 844, 844, 844, -1, + -1, 844, 844, 844, 844, 844, 844, -1, + -1, -1, 844, 844, 844, 844, 844, -1, + -1, -1, -1, 844, -1, -1, -1, 844, + 844, 844, -1, 844, 844, -1, -1, 844, + -1, -1, -1, -1, -1, -1, -1, -1, + 844, 844, 844, 844, 844, -1, 844, 844, + 844, -1, -1, 844, 844, 844, 844, 844, + 844, 844, 844, -1, 844, 844, 844, -1, + -1, -1, 844, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 844, 844, -1, + -1, 844, -1, -1, -1, -1, 844, -1, + -1, -1, -1, 844, -1, 844, 844, 844, + 844, 844, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 844, -1, 844, + -1, -1, 844, 844, -1, -1, -1, 844, + -1, 844, -1, 844, 846, 846, 846, 846, + 846, 846, 846, 846, 846, 846, 846, 846, + 846, 846, 846, 846, 846, 846, 846, 846, + 846, 846, 846, -1, 846, 846, 846, 846, + 846, 846, -1, 846, 846, 846, 846, -1, + 846, -1, 846, 846, 846, -1, 846, 846, + 846, 846, 846, 846, -1, 846, 846, 846, + 846, 846, 846, 846, 846, 846, 846, 846, + 846, 846, 846, 846, -1, 846, -1, -1, + -1, -1, 846, 846, 846, 846, 846, -1, + -1, 846, 846, -1, 846, 846, 846, 846, + 846, 846, 846, 846, 846, 846, 846, 846, + -1, -1, -1, -1, -1, 846, -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, 844, -1, -1, 846, 846, 846, 846, + -1, -1, 846, 846, 846, 846, 846, 846, + -1, -1, -1, 846, 846, 846, 846, 846, + -1, -1, -1, -1, 846, -1, -1, -1, + 846, 846, 846, -1, 846, 846, -1, -1, + 846, -1, -1, -1, -1, -1, -1, -1, + -1, 846, 846, 846, 846, 846, -1, 846, + 846, 846, -1, -1, 846, 846, 846, 846, + 846, 846, 846, 846, -1, 846, 846, 846, + -1, -1, -1, 846, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 846, 846, + -1, -1, 846, -1, -1, -1, -1, 846, + -1, -1, -1, -1, 846, -1, 846, 846, + 846, 846, 846, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 846, -1, + 846, -1, -1, 846, 846, -1, -1, -1, + 846, -1, 846, -1, 846, 736, 736, 736, + 736, 736, 736, 736, 736, 736, 736, 736, + 736, 736, 736, -1, 736, 736, 736, 736, + 736, 736, -1, -1, -1, 736, 736, 736, + 736, 736, 736, -1, 736, 736, 736, 736, + -1, 736, -1, 736, 736, 736, -1, 736, + 736, 736, 736, 736, 736, 736, 736, 736, + 736, 736, 736, 736, 736, 736, 736, 736, + 736, 736, 736, 736, -1, -1, -1, -1, + -1, -1, -1, 736, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 736, 736, 736, 736, -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, 846, -1, -1, 736, 736, 736, + 736, -1, -1, 736, 736, 736, 736, 736, + 736, -1, -1, -1, 736, 736, 736, 736, + 736, -1, 736, 736, -1, 736, 736, -1, + -1, 736, 736, 736, -1, 736, 736, -1, + -1, 736, -1, -1, -1, -1, -1, -1, + -1, -1, 736, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 736, 736, 736, + 736, 736, 736, 736, 736, -1, 736, 736, + 736, -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, 736, + 736, 736, 736, 736, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 736, + -1, 736, 736, -1, -1, -1, 732, 732, + 732, 732, 732, 732, 732, 732, 732, 732, + 732, 732, 732, 732, -1, 732, 732, 732, + 732, 732, 732, -1, -1, -1, 732, 732, + 732, 732, 732, 732, -1, 732, 732, 732, + 732, -1, 732, -1, 732, 732, 732, -1, + 732, 732, 732, 732, 732, 732, -1, 732, + 732, 732, 732, 732, 732, 732, 732, 732, + -1, 732, 732, 732, 732, -1, -1, -1, + -1, -1, -1, -1, 732, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 732, 732, 732, 732, -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, 732, 732, + 732, 732, -1, 736, 732, 732, 732, 732, + 732, 732, -1, -1, -1, 732, 732, 732, + 732, 732, -1, -1, -1, -1, 732, 732, + -1, -1, 732, 732, 732, -1, 732, 732, + -1, -1, 732, -1, -1, -1, -1, -1, + -1, -1, -1, 732, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 732, 732, + 732, 732, 732, 732, 732, 732, -1, 732, + 732, 732, -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, + 732, 732, 732, 732, 732, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 732, -1, 732, 732, 709, 709, 709, 709, + 709, 709, 709, 709, 709, 709, 709, 709, + 709, 709, -1, 709, 709, 709, 709, 709, + 709, -1, -1, -1, 709, 709, 709, 709, + 709, 709, -1, 709, 709, 709, 709, -1, + 709, -1, 709, 709, 709, -1, 709, 709, + 709, 709, 709, 709, -1, 709, 709, 709, + 709, 709, 709, 709, 709, 709, -1, 709, + 709, 709, 709, -1, -1, -1, -1, -1, + -1, -1, 709, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 709, 709, 709, 709, -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, 709, 709, 709, 709, + -1, -1, 709, 709, 732, 709, 709, 709, + -1, -1, -1, 709, 709, -1, 709, 709, + -1, -1, -1, -1, 709, 709, -1, -1, + 709, 709, 709, -1, 709, 709, -1, -1, + 709, -1, -1, -1, -1, -1, -1, -1, + -1, 709, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 709, 709, 709, 709, + 709, 709, 709, 709, -1, 709, 709, 709, + -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, 709, 709, + 709, 709, 709, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 709, -1, + -1, 709, -1, -1, -1, 714, 714, 714, + 714, 714, 714, 714, 714, 714, 714, 714, + 714, 714, 714, -1, 714, 714, 714, 714, + 714, 714, -1, -1, -1, 714, 714, 714, + 714, 714, 714, -1, 714, 714, 714, 714, + -1, 714, -1, 714, 714, 714, -1, 714, + 714, 714, 714, 714, 714, -1, 714, 714, + 714, 714, 714, 714, 714, 714, 714, -1, + 714, 714, 714, 714, -1, -1, -1, -1, + -1, -1, -1, 714, -1, -1, -1, -1, + -1, -1, -1, -1, 714, -1, -1, -1, + -1, 714, 714, 714, 714, -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, 714, 714, 714, + 714, -1, 709, 714, 714, 714, 714, 714, + 714, -1, -1, -1, 714, 714, 714, 714, + 714, -1, -1, -1, -1, 714, 714, -1, + -1, 714, 714, 714, -1, 714, 714, -1, + -1, 714, -1, -1, -1, -1, -1, -1, + -1, -1, 714, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 714, 714, 714, + 714, 714, 714, 714, 714, -1, 714, 714, + 714, -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, 714, + 714, 714, 714, 714, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 714, + -1, 714, 714, -1, -1, -1, 831, 831, + 831, 831, 831, 831, 831, 831, 831, 831, + 831, 831, 831, 831, 831, 831, 831, 831, + 831, 831, 831, 831, 831, -1, 831, 831, + 831, 831, 831, 831, -1, 831, 831, 831, + 831, -1, 831, -1, 831, 831, 831, -1, + 831, 831, 831, 831, 831, 831, -1, 831, + 831, 831, 831, 831, 831, 831, 831, 831, + 831, 831, 831, 831, 831, 831, -1, 831, + -1, -1, -1, -1, 831, 831, 831, 831, + 831, -1, -1, 831, 831, -1, 831, 831, + 831, 831, 831, 831, 831, 831, 831, 831, + 831, 831, -1, -1, -1, -1, -1, 831, + -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, 831, 831, + 831, 831, -1, 714, 831, 831, 831, 831, + 831, 831, -1, -1, -1, 831, 831, 831, + 831, 831, -1, -1, -1, -1, 831, -1, + -1, -1, 831, 831, 831, -1, 831, 831, + -1, -1, 831, -1, -1, -1, -1, -1, + -1, -1, -1, 831, 831, 831, 831, 831, + -1, 831, 831, 831, -1, -1, 831, 831, + 831, 831, 831, 831, 831, 831, -1, 831, + 831, 831, -1, -1, -1, 831, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 831, 831, -1, -1, 831, -1, -1, -1, + -1, 831, -1, -1, -1, -1, 831, -1, + 831, 831, 831, 831, 831, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 831, -1, 831, -1, -1, 831, 831, -1, + -1, -1, 831, -1, 831, -1, 831, 744, + 744, 744, 744, 744, 744, 744, 744, 744, + 744, 744, 744, 744, 744, -1, 744, 744, + 744, 744, 744, 744, -1, -1, -1, 744, + 744, 744, 744, 744, 744, -1, 744, 744, + 744, 744, -1, 744, -1, 744, 744, 744, + -1, 744, 744, 744, 744, 744, 744, -1, + 744, 744, 744, 744, 744, 744, 744, 744, + 744, -1, 744, 744, 744, 744, -1, 528, + -1, -1, -1, -1, -1, 744, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 744, 744, 744, 744, -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, 831, -1, -1, 744, + 744, 744, 744, -1, -1, 744, 744, 744, + 744, 744, 744, -1, -1, -1, 744, 744, + 744, 744, 744, -1, -1, -1, -1, 744, + 744, -1, -1, 744, 744, 744, -1, 744, + 744, -1, -1, 744, -1, -1, -1, -1, + -1, -1, -1, -1, 744, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 744, + 744, 744, 744, 744, 744, 744, 744, -1, + 744, 744, 744, -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, 744, 744, 744, 744, 744, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 744, -1, 744, 744, -1, -1, -1, + 770, 770, 770, 770, 770, 770, 770, 770, + 770, 770, 770, 770, 770, 770, -1, 770, + 770, 770, 770, 770, 770, -1, -1, -1, + 770, 770, 770, 770, 770, 770, -1, 770, + 770, 770, 770, -1, 770, -1, 770, 770, + 770, -1, 770, 770, 770, 770, 770, 770, + -1, 770, 770, 770, 770, 770, 770, 770, + 770, 770, -1, 770, 770, 770, 770, -1, + 770, -1, -1, -1, -1, -1, 770, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 770, 770, 770, 770, + -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, + 770, 770, 770, 770, -1, 744, 770, 770, + 770, 770, 770, 770, -1, -1, -1, 770, + 770, 770, 770, 770, -1, -1, -1, -1, + 770, 770, -1, -1, 770, 770, 770, -1, + 770, 770, -1, -1, 770, -1, -1, -1, + -1, -1, -1, -1, -1, 770, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 770, 770, 770, 770, 770, 770, 770, 770, + -1, 770, 770, 770, -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, 770, 770, 770, 770, 770, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 770, -1, 770, 770, -1, -1, + -1, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, -1, + 746, 746, 746, 746, 746, 746, -1, -1, + -1, 746, 746, 746, 746, 746, 746, -1, + 746, 746, 746, 746, -1, 746, -1, 746, + 746, 746, -1, 746, 746, 746, 746, 746, + 746, -1, 746, 746, 746, 746, 746, 746, + 746, 746, 746, -1, 746, 746, 746, 746, + -1, -1, -1, -1, -1, -1, -1, 746, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 746, 746, 746, + 746, -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, 746, 746, 746, 746, -1, 770, 746, + 746, 746, 746, 746, 746, -1, -1, -1, + 746, 746, 746, 746, 746, -1, -1, -1, + -1, 746, 746, -1, -1, 746, 746, 746, + -1, 746, 746, -1, -1, 746, -1, -1, + -1, -1, -1, -1, -1, -1, 746, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 746, 746, 746, 746, 746, 746, 746, + 746, -1, 746, 746, 746, -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, 746, 746, 746, 746, 746, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 746, -1, 746, 746, -1, + -1, -1, 755, 755, 755, 755, 755, 755, + 755, 755, 755, 755, 755, 755, 755, 755, + -1, 755, 755, 755, 755, 755, 755, -1, + -1, -1, 755, 755, 755, 755, 755, 755, + -1, 755, 755, 755, 755, -1, 755, -1, + 755, 755, 755, -1, 755, 755, 755, 755, + 755, 755, -1, 755, 755, 755, 755, 755, + 755, 755, 755, 755, -1, 755, 755, 755, + 755, -1, -1, -1, -1, -1, -1, -1, + 755, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 755, 755, + 755, 755, -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, 755, 755, 755, 755, -1, 746, + 755, 755, 755, 755, 755, 755, -1, -1, + -1, 755, 755, 755, 755, 755, -1, -1, + -1, -1, 755, 755, -1, -1, 755, 755, + 755, -1, 755, 755, -1, -1, 755, -1, + -1, -1, -1, -1, -1, -1, -1, 755, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 755, 755, 755, 755, 755, 755, + 755, 755, -1, 755, 755, 755, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 77, 78, 79, 80, + -1, 76, -1, -1, 755, 755, 755, 755, + 755, -1, 100, 96, 98, 94, 92, -1, + -1, -1, -1, -1, 755, -1, 755, 755, + 87, -1, -1, -1, 88, 85, 84, 86, + -1, -1, -1, 72, 73, 74, -1, -1, + -1, -1, 1006, 71, -1, 104, 106, 108, + 110, -1, -1, -1, -1, -1, -1, -1, + 75, 987, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, -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, -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, + 755, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 470, 62, 63, + 64, 65, -1, 70, 82, 90, -1, -1, + -1, 469, -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, 102, 89, 81, 132, + 58, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 549, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, -1, 838, 838, 838, 838, 838, + 838, -1, 838, 838, 838, 838, -1, 838, + -1, 838, 838, 838, -1, 838, 838, 838, + 838, 838, 838, -1, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, 838, -1, 838, -1, -1, -1, + -1, 838, 838, 838, 838, 838, -1, -1, + 838, 838, -1, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, -1, + -1, -1, -1, -1, 838, -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, 838, 838, 838, 838, -1, + -1, 838, 838, 838, 838, 838, 838, -1, + -1, -1, 838, 838, 838, 838, 838, -1, + -1, -1, -1, 838, -1, -1, -1, 838, + 838, 838, -1, 838, 838, -1, -1, 838, + -1, -1, -1, -1, -1, -1, -1, -1, + 838, 838, 838, 838, 838, -1, 838, 838, + 838, -1, -1, 838, 838, 838, 838, 838, + 838, 838, 838, -1, 838, 838, 838, -1, + -1, -1, 838, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 838, 838, -1, + -1, 838, -1, -1, -1, -1, 838, -1, + -1, -1, -1, 838, -1, 838, 838, 838, + 838, 838, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 838, -1, 838, + -1, -1, 838, 838, -1, -1, -1, 838, + -1, 838, -1, 838, -1, -1, -1, -1, + 890, 890, 890, 890, -1, 890, -1, -1, + -1, -1, -1, -1, -1, -1, 890, 890, + 890, 890, 890, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 890, -1, -1, -1, + 890, 890, 890, 890, -1, -1, -1, 890, + 890, 890, -1, -1, -1, -1, 1004, 890, + 889, 1004, 1004, 1004, 890, 995, -1, -1, + -1, -1, -1, -1, 890, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 890, 890, 890, 890, -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, 838, -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, 890, 890, 890, 890, 890, -1, 890, + 890, 1004, -1, -1, -1, -1, -1, 470, + 62, 63, 64, 65, -1, 70, 82, 90, + 559, 560, -1, 469, 558, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 890, 890, 890, 890, 890, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 102, 89, + 81, 132, 58, -1, -1, -1, -1, -1, + -1, -1, 557, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 549, 839, 839, 839, + 839, 839, 839, 839, 839, 839, 839, 839, + 839, 839, 839, 839, 839, 839, 839, 839, + 839, 839, 839, 839, -1, 839, 839, 839, + 839, 839, 839, -1, 839, 839, 839, 839, + -1, 839, -1, 839, 839, 839, -1, 839, + 839, 839, 839, 839, 839, -1, 839, 839, + 839, 839, 839, 839, 839, 839, 839, 839, + 839, 839, 839, 839, 839, -1, 839, -1, + -1, -1, -1, 839, 839, 839, 839, 839, + -1, -1, 839, 839, -1, 839, 839, 839, + 839, 839, 839, 839, 839, 839, 839, 839, + 839, -1, -1, -1, -1, -1, 839, -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, 839, 839, 839, + 839, -1, -1, 839, 839, 839, 839, 839, + 839, -1, -1, -1, 839, 839, 839, 839, + 839, -1, -1, -1, -1, 839, -1, -1, + -1, 839, 839, 839, -1, 839, 839, -1, + -1, 839, -1, -1, -1, -1, -1, -1, + -1, -1, 839, 839, 839, 839, 839, -1, + 839, 839, 839, -1, -1, 839, 839, 839, + 839, 839, 839, 839, 839, -1, 839, 839, + 839, -1, -1, -1, 839, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 839, + 839, -1, -1, 839, -1, -1, -1, -1, + 839, -1, -1, -1, -1, 839, -1, 839, + 839, 839, 839, 839, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 839, + -1, 839, -1, -1, 839, 839, -1, -1, + -1, 839, -1, 839, -1, 839, 840, 840, + 840, 840, 840, 840, 840, 840, 840, 840, + 840, 840, 840, 840, 840, 840, 840, 840, + 840, 840, 840, 840, 840, -1, 840, 840, + 840, 840, 840, 840, -1, 840, 840, 840, + 840, -1, 840, -1, 840, 840, 840, -1, + 840, 840, 840, 840, 840, 840, -1, 840, + 840, 840, 840, 840, 840, 840, 840, 840, + 840, 840, 840, 840, 840, 840, -1, 840, + -1, -1, -1, -1, 840, 840, 840, 840, + 840, -1, -1, 840, 840, -1, 840, 840, + 840, 840, 840, 840, 840, 840, 840, 840, + 840, 840, -1, -1, -1, -1, -1, 840, + -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, 839, -1, -1, 840, 840, + 840, 840, -1, -1, 840, 840, 840, 840, + 840, 840, -1, -1, -1, 840, 840, 840, + 840, 840, -1, -1, -1, -1, 840, -1, + -1, -1, 840, 840, 840, -1, 840, 840, + -1, -1, 840, -1, -1, -1, -1, -1, + -1, -1, -1, 840, 840, 840, 840, 840, + -1, 840, 840, 840, -1, -1, 840, 840, + 840, 840, 840, 840, 840, 840, -1, 840, + 840, 840, -1, -1, -1, 840, -1, -1, + -1, -1, 559, 560, -1, -1, 558, -1, + 840, 840, -1, -1, 840, -1, -1, -1, + -1, 840, -1, -1, -1, -1, 840, -1, + 840, 840, 840, 840, 840, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 840, -1, 840, -1, 557, 840, 840, -1, + -1, -1, 840, -1, 840, -1, 840, 905, + 905, 905, 905, 905, 905, 905, 905, 905, + 905, 905, 905, 905, 905, 905, 905, 905, + 905, 905, 905, 905, 905, 905, -1, 905, + 905, 905, 905, 905, 905, -1, 905, 905, + 905, 905, -1, 905, -1, 905, 905, 905, + -1, 905, 905, 905, 905, 905, 905, -1, + 905, 905, 905, 905, 905, 905, 905, 905, + 905, 905, 905, 905, 905, 905, 905, -1, + 905, -1, -1, -1, -1, 905, 905, 905, + 905, 905, -1, -1, 905, 905, -1, 905, + 905, 905, 905, 905, 905, 905, 905, 905, + 905, 905, 905, -1, -1, -1, -1, -1, + 905, -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, 840, -1, -1, 905, + 905, 905, 905, -1, -1, 905, 905, 905, + 905, 905, 905, -1, -1, -1, 905, 905, + 905, 905, 905, -1, -1, -1, -1, 905, + -1, -1, -1, 905, 905, 905, -1, 905, + 905, -1, -1, 905, -1, -1, -1, -1, + -1, -1, -1, -1, 905, 905, 905, 905, + 905, -1, 905, 905, 905, -1, -1, 905, + 905, 905, 905, 905, 905, 905, 905, -1, + 905, 905, 905, -1, -1, -1, 905, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 905, 905, -1, -1, 905, -1, -1, + -1, -1, 905, -1, -1, -1, -1, 905, + -1, 905, 905, 905, 905, 905, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 905, -1, 905, -1, -1, 905, 905, + -1, -1, -1, 905, -1, 905, -1, 905, + 904, 904, 904, 904, 904, 904, 904, 904, + 904, 904, 904, 904, 904, 904, 904, 904, + 904, 904, 904, 904, 904, 904, 904, -1, + 904, 904, 904, 904, 904, 904, -1, 904, + 904, 904, 904, -1, 904, -1, 904, 904, + 904, -1, 904, 904, 904, 904, 904, 904, + -1, 904, 904, 904, 904, 904, 904, 904, + 904, 904, 904, 477, 479, 481, 483, 904, + -1, 904, -1, -1, -1, -1, 904, 904, + 904, 904, 904, -1, -1, 904, 904, -1, + 904, 904, 904, 904, 904, 904, 904, 904, + 904, 904, 904, 904, -1, -1, -1, -1, + -1, 904, -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, 905, -1, -1, + 904, 904, 904, 904, -1, -1, 904, 904, + 904, 904, 904, 904, -1, -1, -1, 904, + 904, 904, 904, 904, -1, -1, -1, -1, + 904, -1, -1, -1, 904, 904, 904, -1, + 904, 904, -1, -1, 904, -1, -1, -1, + -1, -1, -1, -1, -1, 904, 904, 904, + 904, 904, -1, 904, 904, 904, -1, -1, + 904, 904, 904, 904, 904, 904, 904, 904, + -1, 904, 904, 904, -1, -1, -1, 904, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 904, 904, -1, -1, 904, -1, + 475, 561, -1, 904, -1, -1, -1, -1, + 904, -1, 904, 904, 904, 904, 904, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 904, -1, 904, -1, -1, 904, + 904, -1, -1, -1, 904, -1, 904, -1, + 904, 882, 882, 882, 882, 882, 882, 882, + 882, 882, 882, 882, 882, 882, 882, 882, + 882, 882, 882, 882, 882, 882, 882, 882, + -1, 882, 882, 882, 882, 882, 882, -1, + 882, 882, 882, 882, -1, 882, -1, 882, + 882, 882, -1, 882, 882, 882, 882, 882, + 882, -1, 882, 882, 882, 882, 882, 882, + 882, 882, 882, 882, 882, 882, 882, 882, + 882, -1, 882, -1, -1, -1, -1, 882, + 882, 882, 882, 882, -1, -1, 882, 882, + -1, 882, 882, 882, 882, 882, 882, 882, + 882, 882, 882, 882, 882, -1, -1, -1, + -1, -1, 882, -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, 904, -1, + -1, 882, 882, 882, 882, -1, -1, 882, + 882, 882, 882, 882, 882, -1, -1, -1, + 882, 882, 882, 882, 882, -1, -1, -1, + -1, 882, -1, -1, -1, 882, 882, 882, + -1, 882, 882, -1, -1, 882, -1, -1, + -1, -1, -1, -1, -1, -1, 882, 882, + 882, 882, 882, -1, 882, 882, 882, 882, + -1, 882, 882, 882, 882, 882, 882, 882, + 882, -1, 882, 882, 882, -1, -1, -1, + 882, -1, -1, -1, -1, -1, -1, -1, + 882, -1, -1, 882, 882, -1, -1, 882, + -1, -1, -1, -1, 882, -1, -1, -1, + -1, 882, -1, 882, 882, 882, 882, 882, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 882, -1, 882, -1, -1, + 882, 882, -1, -1, -1, 882, -1, 882, + -1, 882, 883, 883, 883, 883, 883, 883, + 883, 883, 883, 883, 883, 883, 883, 883, + 883, 883, 883, 883, 883, 883, 883, 883, + 883, -1, 883, 883, 883, 883, 883, 883, + -1, 883, 883, 883, 883, -1, 883, -1, + 883, 883, 883, -1, 883, 883, 883, 883, + 883, 883, -1, 883, 883, 883, 883, 883, + 883, 883, 883, 883, 883, 883, 883, 883, + 883, 883, -1, 883, -1, -1, -1, -1, + 883, 883, 883, 883, 883, -1, -1, 883, + 883, -1, 883, 883, 883, 883, 883, 883, + 883, 883, 883, 883, 883, 883, -1, -1, + -1, -1, -1, 883, -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, 882, + -1, -1, 883, 883, 883, 883, -1, -1, + 883, 883, 883, 883, 883, 883, -1, -1, + -1, 883, 883, 883, 883, 883, -1, -1, + -1, -1, 883, -1, -1, -1, 883, 883, + 883, -1, 883, 883, -1, -1, 883, -1, + -1, -1, -1, -1, -1, -1, -1, 883, + 883, 883, 883, 883, -1, 883, 883, 883, + 883, -1, 883, 883, 883, 883, 883, 883, + 883, 883, -1, 883, 883, 883, -1, -1, + -1, 883, -1, -1, -1, -1, -1, -1, + -1, 883, -1, -1, 883, 883, -1, -1, + 883, -1, 475, 561, -1, 883, -1, -1, + -1, -1, 883, -1, 883, 883, 883, 883, + 883, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 883, -1, 883, -1, + -1, 883, 883, -1, -1, -1, 883, -1, + 883, -1, 883, 884, 884, 884, 884, 884, + 884, 884, 884, 884, 884, 884, 884, 884, + 884, 884, 884, 884, 884, 884, 884, 884, + 884, 884, -1, 884, 884, 884, 884, 884, + 884, -1, 884, 884, 884, 884, -1, 884, + -1, 884, 884, 884, -1, 884, 884, 884, + 884, 884, 884, -1, 884, 884, 884, 884, + 884, 884, 884, 884, 884, 884, 884, 884, + 884, 884, 884, -1, 884, -1, -1, -1, + -1, 884, 884, 884, 884, 884, -1, -1, + 884, 884, -1, 884, 884, 884, 884, 884, + 884, 884, 884, 884, 884, 884, 884, -1, + -1, -1, -1, -1, 884, -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, + 883, -1, -1, 884, 884, 884, 884, -1, + -1, 884, 884, 884, 884, 884, 884, -1, + -1, -1, 884, 884, 884, 884, 884, -1, + -1, -1, -1, 884, -1, -1, -1, 884, + 884, 884, -1, 884, 884, -1, -1, 884, + -1, -1, -1, -1, -1, -1, -1, -1, + 884, 884, 884, 884, 884, -1, 884, 884, + 884, 884, -1, 884, 884, 884, 884, 884, + 884, 884, 884, -1, 884, 884, 884, -1, + -1, -1, 884, -1, -1, -1, -1, -1, + -1, -1, 884, -1, -1, 884, 884, -1, + -1, 884, -1, -1, -1, -1, 884, -1, + -1, -1, -1, 884, -1, 884, 884, 884, + 884, 884, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 884, -1, 884, + -1, -1, 884, 884, -1, -1, -1, 884, + -1, 884, -1, 884, 885, 885, 885, 885, + 885, 885, 885, 885, 885, 885, 885, 885, + 885, 885, 885, 885, 885, 885, 885, 885, + 885, 885, 885, -1, 885, 885, 885, 885, + 885, 885, -1, 885, 885, 885, 885, -1, + 885, -1, 885, 885, 885, -1, 885, 885, + 885, 885, 885, 885, -1, 885, 885, 885, + 885, 885, 885, 885, 885, 885, 885, 885, + 885, 885, 885, 885, -1, 885, -1, -1, + -1, -1, 885, 885, 885, 885, 885, -1, + -1, 885, 885, -1, 885, 885, 885, 885, + 885, 885, 885, 885, 885, 885, 885, 885, + -1, -1, -1, -1, -1, 885, -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, 884, -1, -1, 885, 885, 885, 885, + -1, -1, 885, 885, 885, 885, 885, 885, + -1, -1, -1, 885, 885, 885, 885, 885, + -1, -1, -1, -1, 885, -1, -1, -1, + 885, 885, 885, -1, 885, 885, -1, -1, + 885, -1, -1, -1, -1, -1, -1, -1, + -1, 885, 885, 885, 885, 885, -1, 885, + 885, 885, 885, -1, 885, 885, 885, 885, + 885, 885, 885, 885, -1, 885, 885, 885, + -1, -1, -1, 885, -1, -1, -1, -1, + -1, -1, -1, 885, -1, -1, 885, 885, + -1, -1, 885, -1, -1, -1, -1, 885, + -1, -1, -1, -1, 885, -1, 885, 885, + 885, 885, 885, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 885, -1, + 885, -1, -1, 885, 885, -1, -1, -1, + 885, -1, 885, -1, 885, 912, 912, 912, + 912, 912, 912, 912, 912, 912, 912, 912, + 912, 912, 912, 912, 912, 912, 912, 912, + 912, 912, 912, 912, -1, 912, 912, 912, + 912, 912, 912, -1, 912, 912, 912, 912, + -1, 912, -1, 912, 912, 912, 912, 912, + 912, 912, 912, 912, 912, -1, 912, 912, + 912, 912, 912, 912, 912, 912, 912, 912, + 912, 912, 912, 912, 912, -1, 912, -1, + -1, 912, -1, 912, 912, 912, 912, 912, + -1, -1, 912, 912, -1, 912, 912, 912, + 912, 912, 912, 912, 912, 912, 912, 912, + 912, -1, -1, -1, -1, -1, 912, -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, 885, -1, -1, 912, 912, 912, + 912, -1, -1, 912, 912, 912, 912, 912, + 912, -1, -1, -1, 912, 912, 912, 912, + 912, -1, -1, -1, -1, 912, -1, -1, + -1, 912, 912, 912, -1, 912, 912, -1, + -1, 912, -1, -1, -1, -1, -1, -1, + -1, -1, 912, 912, 912, 912, 912, -1, + 912, 912, 912, -1, -1, 912, 912, 912, + 912, 912, 912, 912, 912, 912, 912, 912, + 912, -1, -1, -1, 912, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 912, + 912, -1, -1, 912, -1, -1, -1, -1, + 912, -1, 912, 912, -1, 912, -1, 912, + 912, 912, 912, 912, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 912, + -1, 912, -1, -1, 912, 912, -1, -1, + -1, 912, -1, 912, -1, 912, 913, 913, + 913, 913, 913, 913, 913, 913, 913, 913, + 913, 913, 913, 913, 913, 913, 913, 913, + 913, 913, 913, 913, 913, -1, 913, 913, + 913, 913, 913, 913, -1, 913, 913, 913, + 913, -1, 913, -1, 913, 913, 913, 913, + 913, 913, 913, 913, 913, 913, -1, 913, + 913, 913, 913, 913, 913, 913, 913, 913, + 913, 913, 913, 913, 913, 913, -1, 913, + -1, -1, 913, -1, 913, 913, 913, 913, + 913, -1, -1, 913, 913, -1, 913, 913, + 913, 913, 913, 913, 913, 913, 913, 913, + 913, 913, -1, -1, -1, -1, -1, 913, + -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, 912, -1, -1, 913, 913, + 913, 913, -1, -1, 913, 913, 913, 913, + 913, 913, -1, -1, -1, 913, 913, 913, + 913, 913, -1, -1, -1, -1, 913, -1, + -1, -1, 913, 913, 913, -1, 913, 913, + -1, -1, 913, -1, -1, -1, -1, -1, + -1, -1, -1, 913, 913, 913, 913, 913, + -1, 913, 913, 913, -1, -1, 913, 913, + 913, 913, 913, 913, 913, 913, 913, 913, + 913, 913, -1, -1, -1, 913, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 913, 913, -1, -1, 913, -1, -1, -1, + -1, 913, -1, 913, 913, -1, 913, -1, + 913, 913, 913, 913, 913, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 913, -1, 913, -1, -1, 913, 913, -1, + -1, -1, 913, -1, 913, -1, 913, 914, + 914, 914, 914, 914, 914, 914, 914, 914, + 914, 914, 914, 914, 914, 914, 914, 914, + 914, 914, 914, 914, 914, 914, -1, 914, + 914, 914, 914, 914, 914, -1, 914, 914, + 914, 914, -1, 914, -1, 914, 914, 914, + 914, 914, 914, 914, 914, 914, 914, -1, + 914, 914, 914, 914, 914, 914, 914, 914, + 914, 914, 914, 914, 914, 914, 914, -1, + 914, -1, -1, 914, -1, 914, 914, 914, + 914, 914, -1, -1, 914, 914, -1, 914, + 914, 914, 914, 914, 914, 914, 914, 914, + 914, 914, 914, -1, -1, -1, -1, -1, + 914, -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, 913, -1, -1, 914, + 914, 914, 914, -1, -1, 914, 914, 914, + 914, 914, 914, -1, -1, -1, 914, 914, + 914, 914, 914, -1, -1, -1, -1, 914, + -1, -1, -1, 914, 914, 914, -1, 914, + 914, -1, -1, 914, -1, -1, -1, -1, + -1, -1, -1, -1, 914, 914, 914, 914, + 914, -1, 914, 914, 914, -1, -1, 914, + 914, 914, 914, 914, 914, 914, 914, 914, + 914, 914, 914, -1, -1, -1, 914, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 914, 914, -1, -1, 914, -1, -1, + -1, -1, 914, -1, 914, 914, -1, 914, + -1, 914, 914, 914, 914, 914, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 914, -1, 914, -1, -1, 914, 914, + -1, -1, -1, 914, -1, 914, -1, 914, + 915, 915, 915, 915, 915, 915, 915, 915, + 915, 915, 915, 915, 915, 915, 915, 915, + 915, 915, 915, 915, 915, 915, 915, -1, + 915, 915, 915, 915, 915, 915, -1, 915, + 915, 915, 915, -1, 915, -1, 915, 915, + 915, 915, 915, 915, 915, 915, 915, 915, + -1, 915, 915, 915, 915, 915, 915, 915, + 915, 915, 915, 915, 915, 915, 915, 915, + -1, 915, -1, -1, 915, -1, 915, 915, + 915, 915, 915, -1, -1, 915, 915, -1, + 915, 915, 915, 915, 915, 915, 915, 915, + 915, 915, 915, 915, -1, -1, -1, -1, + -1, 915, -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, 914, -1, -1, + 915, 915, 915, 915, -1, -1, 915, 915, + 915, 915, 915, 915, -1, -1, -1, 915, + 915, 915, 915, 915, -1, -1, -1, -1, + 915, -1, -1, -1, 915, 915, 915, -1, + 915, 915, -1, -1, 915, -1, -1, -1, + -1, -1, -1, -1, -1, 915, 915, 915, + 915, 915, -1, 915, 915, 915, -1, -1, + 915, 915, 915, 915, 915, 915, 915, 915, + 915, 915, 915, 915, -1, -1, -1, 915, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 915, 915, -1, -1, 915, -1, + -1, -1, -1, 915, -1, 915, 915, -1, + 915, -1, 915, 915, 915, 915, 915, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 915, -1, 915, -1, -1, 915, + 915, -1, -1, -1, 915, -1, 915, -1, + 915, 891, 891, 891, 891, -1, 891, -1, + -1, -1, -1, -1, -1, -1, -1, 891, + 891, 891, 891, 891, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 891, -1, -1, + -1, 891, 891, 891, 891, -1, -1, -1, + 891, 891, 891, -1, -1, -1, -1, 1009, + 891, -1, 891, 891, 891, 891, -1, -1, + -1, -1, -1, -1, -1, 891, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 891, 891, 891, 891, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 792, 792, + 792, 792, 792, 792, 792, 792, 792, 792, + 792, 792, 792, 792, 792, 792, 792, 792, + 792, 792, 792, 792, 792, -1, 792, 792, + 792, 792, 792, 792, -1, 792, 792, 792, + 792, -1, 792, -1, 792, 792, 792, -1, + 792, 792, 792, 792, 792, 792, 915, 792, + 792, 792, 792, 792, 792, 792, 792, 792, + -1, 792, 792, 792, 792, -1, -1, -1, + -1, -1, -1, -1, 792, -1, -1, 792, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 792, 792, 792, 792, -1, -1, + -1, 572, -1, -1, -1, -1, -1, -1, + -1, -1, 891, 891, 891, 891, 891, -1, + 891, 891, 891, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 573, 574, 575, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 891, 891, 891, 1005, 1005, 792, 792, + 792, 792, -1, -1, 792, 792, -1, 792, + 792, 792, -1, -1, -1, 792, 792, -1, + 792, 792, -1, -1, -1, -1, 792, -1, + -1, -1, 792, 792, 792, -1, 792, 792, + -1, -1, 792, -1, -1, -1, -1, -1, + -1, -1, -1, 792, 792, 792, 792, -1, + -1, -1, 792, 792, -1, -1, 792, 792, + 792, 792, 792, 792, 792, 792, -1, 792, + 792, 792, -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, + 792, 792, 792, 792, 792, -1, 48, 49, + 50, 51, 77, 78, 79, 80, -1, 76, + 792, 34, 35, 38, 36, 792, -1, -1, + 100, 96, 98, 94, 92, -1, -1, -1, + 39, 40, 41, -1, -1, -1, 87, -1, + -1, -1, 88, 85, 84, 86, -1, -1, + -1, 72, 73, 74, -1, -1, -1, -1, + 56, 71, -1, 104, 106, 108, 110, -1, + -1, -1, -1, -1, -1, -1, 75, -1, + 259, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 66, 67, 68, 69, + -1, -1, 182, 183, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 785, 785, 785, 785, 785, 785, + 785, 785, 785, 785, 785, 785, 785, 785, + 785, 785, 785, 785, 785, 785, 785, 785, + 785, -1, 785, 785, 785, 785, 785, 785, + -1, 785, 785, 785, 785, -1, 785, -1, + 785, 785, 785, -1, 785, 785, 785, 785, + 785, 785, -1, 785, 785, 785, 785, 785, + 785, 785, 785, 785, -1, 785, 785, 785, + 785, -1, -1, -1, 792, -1, -1, -1, + 785, -1, -1, 785, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 260, 785, 785, + 785, 785, -1, 576, -1, -1, -1, -1, + 33, 31, 32, 52, 62, 63, 64, 65, + -1, 70, 82, 90, -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, 102, 89, 81, 37, 58, -1, + -1, -1, 785, 785, 785, 785, -1, -1, + 785, 785, -1, 785, 785, 785, -1, -1, + -1, 785, 785, -1, 785, 785, -1, -1, + -1, -1, 785, -1, -1, -1, 785, 785, + 785, -1, 785, 785, -1, -1, 785, -1, + -1, -1, -1, -1, -1, -1, -1, 785, + 785, 785, 785, -1, -1, -1, 785, 785, + -1, -1, 785, 785, 785, 785, 785, 785, + 785, 785, -1, 785, 785, 785, -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, 785, 785, 785, 785, + 785, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 785, -1, -1, -1, + -1, 785, -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, 572, -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, 573, 574, 575, 782, 782, + 782, 782, 782, 782, 782, 782, 782, 782, + 782, 782, 782, 782, 782, 782, 782, 782, + 782, 782, 782, 782, 782, -1, 782, 782, + 782, 782, 782, 782, -1, 782, 782, 782, + 782, -1, 782, -1, 782, 782, 782, -1, + 782, 782, 782, 782, 782, 782, -1, 782, + 782, 782, 782, 782, 782, 782, 782, 782, + -1, 782, 782, 782, 782, -1, -1, -1, + -1, -1, -1, -1, 782, -1, -1, 782, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 782, 782, 782, 782, -1, -1, + 785, -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, 782, 782, + 782, 782, -1, -1, 782, 782, -1, 782, + 782, 782, -1, -1, -1, 782, 782, -1, + 782, 782, -1, -1, -1, -1, 782, -1, + -1, -1, 782, 782, 782, -1, 782, 782, + -1, -1, 782, -1, -1, -1, -1, -1, + -1, -1, -1, 782, 782, 782, 782, -1, + -1, -1, 782, 782, -1, -1, 782, 782, + 782, 782, 782, 782, 782, 782, -1, 782, + 782, 782, -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, + 782, 782, 782, 782, 782, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 782, -1, -1, -1, -1, 782, -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, 260, + -1, -1, -1, -1, -1, 576, -1, -1, + -1, -1, 33, 31, 32, 52, 62, 63, + 64, 65, -1, 70, 82, 90, -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, 102, 89, 81, 37, + 58, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, + 851, -1, 851, 851, 851, 851, 851, 851, + -1, 851, 851, 851, 782, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, -1, 851, 851, + 851, 851, -1, -1, -1, -1, -1, -1, + -1, 851, 851, -1, 851, -1, -1, 851, + -1, -1, -1, -1, 851, -1, -1, 851, + 851, 851, 851, -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, 851, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 851, 851, 851, 851, -1, + -1, 851, 851, 851, 851, 851, 851, -1, + 851, 851, 851, 851, 851, 851, 851, -1, + -1, 851, -1, 851, 851, -1, 851, 851, + 851, 851, -1, 851, 851, -1, -1, 851, + -1, -1, -1, -1, -1, 851, -1, 851, + 851, 851, 851, 851, -1, -1, -1, 851, + 851, -1, 851, 851, 851, 851, 851, 851, + 851, 851, 851, -1, 851, 851, 851, -1, + -1, 851, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 851, 851, 851, -1, -1, + 851, 851, 851, -1, -1, 851, 851, 851, + 851, 851, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 851, -1, 851, + 851, 851, 851, -1, 848, 848, 848, 848, + 848, 848, 848, 848, 848, 848, 848, 848, + 848, 848, 848, 848, 848, 848, 848, 848, + 848, 848, 848, -1, 848, 848, 848, 848, + 848, 848, -1, 848, 848, 848, 848, -1, + 848, -1, 848, 848, 848, -1, 848, 848, + 848, 848, 848, 848, -1, 848, 848, 848, + 848, 848, 848, 848, 848, 848, 848, 848, + 848, 848, 848, 848, -1, 848, -1, -1, + -1, -1, 848, 848, 848, 848, 848, -1, + -1, 848, 848, -1, 848, 848, 848, 848, + 848, 848, 848, 848, 848, 848, 848, 848, + -1, -1, -1, -1, -1, 848, -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, 848, 848, 848, 848, + -1, 851, 848, 848, 848, 848, 848, 848, + -1, -1, -1, 848, 848, 848, 848, 848, + -1, -1, -1, -1, 848, -1, -1, -1, + 848, 848, 848, -1, 848, 848, -1, -1, + 848, -1, -1, -1, -1, -1, -1, -1, + -1, 848, 848, 848, 848, 848, -1, 848, + 848, 848, -1, -1, 848, 848, 848, 848, + 848, 848, 848, 848, -1, 848, 848, 848, + -1, -1, -1, 848, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 848, 848, + -1, -1, 848, -1, -1, -1, -1, 848, + -1, -1, -1, -1, 848, -1, 848, 848, + 848, 848, 848, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 848, -1, + 848, -1, -1, 848, 848, -1, -1, -1, + 848, -1, 848, -1, 848, 739, 739, 739, + 739, 739, 739, 739, 739, 739, 739, 739, + 739, 739, 739, -1, 739, 739, 739, 739, + 739, 739, -1, -1, -1, 739, 739, 739, + 739, 739, 739, -1, 739, 739, 739, 739, + -1, 739, -1, 739, 739, 739, -1, 739, + 739, 739, 739, 739, 739, 739, 739, 739, + 739, 739, 739, 739, 739, 739, 739, 739, + 739, 739, 739, 739, -1, -1, -1, -1, + -1, -1, -1, 739, -1, 739, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 739, 739, 739, 739, -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, 848, -1, -1, 739, 739, 739, + 739, -1, -1, 739, 739, 739, 739, 739, + 739, -1, -1, -1, 739, 739, 739, 739, + 739, -1, 739, 739, -1, 739, 739, -1, + -1, 739, 739, 739, -1, 739, 739, 739, + -1, 739, -1, -1, -1, -1, -1, -1, + -1, -1, 739, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 739, 739, 739, + 739, 739, 739, 739, 739, -1, 739, 739, + 739, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 919, + 919, 919, 919, -1, 919, -1, -1, 739, + 739, 739, 739, 739, -1, 919, 919, 919, + 919, 919, -1, -1, -1, -1, -1, 739, + -1, 739, 739, 919, -1, -1, -1, 919, + 919, 919, 919, -1, -1, -1, 919, 919, + 919, -1, -1, -1, -1, 919, 919, -1, + 919, 919, 919, 919, 919, -1, -1, -1, + -1, -1, -1, 919, -1, -1, -1, 920, + 920, 920, 920, -1, 920, -1, -1, -1, + -1, 919, 919, 919, 919, 920, 920, 920, + 920, 920, -1, -1, -1, -1, 919, -1, + -1, -1, -1, 920, -1, -1, -1, 920, + 920, 920, 920, -1, -1, -1, 920, 920, + 920, -1, -1, -1, -1, 920, 920, -1, + 920, 920, 920, 920, 920, -1, -1, -1, + -1, -1, -1, 920, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 920, 920, 920, 920, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 920, -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, 739, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 919, 919, 919, 919, 919, -1, 919, 919, + 919, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 919, + 919, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 919, -1, 919, + 919, 919, 919, 919, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 920, 920, 920, 920, 920, 919, 920, 920, + 920, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 920, + 920, -1, -1, -1, -1, -1, -1, 921, + 921, 921, 921, -1, 921, 920, -1, 920, + 920, 920, 920, 920, -1, 921, 921, 921, + 921, 921, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 921, -1, -1, -1, 921, + 921, 921, 921, -1, -1, 920, 921, 921, + 921, -1, -1, -1, -1, 921, 921, -1, + 921, 921, 921, 921, 921, -1, -1, -1, + -1, -1, -1, 921, -1, -1, -1, 890, + 890, 890, 890, -1, 890, -1, -1, -1, + -1, 921, 921, 921, 921, 890, 890, 890, + 890, 890, -1, -1, -1, -1, 921, -1, + -1, -1, -1, 890, -1, -1, -1, 890, + 890, 890, 890, -1, -1, -1, 890, 890, + 890, -1, -1, -1, -1, 1004, 890, 889, + 1004, 1004, 1004, 890, -1, -1, -1, -1, + -1, -1, -1, 890, -1, -1, -1, -1, + -1, -1, 890, 890, 890, 890, -1, 890, + -1, 890, 890, 890, 890, -1, -1, -1, + 890, 890, 890, 890, 890, -1, 995, -1, + -1, -1, -1, -1, -1, -1, 890, -1, + -1, -1, 890, 890, 890, 890, -1, -1, + -1, 890, 890, 890, -1, -1, -1, -1, + 1004, 890, 889, 1004, 1004, 1004, 890, 995, + -1, -1, -1, -1, -1, -1, 890, -1, + 921, 921, 921, 921, 921, -1, 921, 921, + 921, -1, -1, -1, 890, 890, 890, 890, + -1, -1, -1, -1, -1, -1, -1, 921, + 921, 995, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 921, -1, 921, + 921, 921, 921, 921, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 890, 890, 890, 890, 890, 921, 890, 890, + 1004, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 559, + 560, -1, -1, 558, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 890, + 890, 890, 890, 890, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 594, -1, 890, 890, 890, 890, 890, + -1, 890, 890, 1004, -1, -1, -1, -1, + -1, -1, -1, -1, 77, 78, 79, 80, + -1, 76, 559, 560, -1, -1, 558, -1, + -1, -1, 100, 96, 98, 94, 92, -1, + -1, -1, 890, 890, 890, 890, 890, -1, + 87, -1, -1, -1, 88, 85, 84, 86, + -1, -1, -1, 72, 73, 74, -1, -1, + -1, -1, 1006, 71, 604, 104, 106, 108, + 110, -1, -1, -1, -1, -1, -1, -1, + 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 903, 903, 903, 903, 903, 903, 903, + 903, 903, 903, 903, 903, 903, 903, 903, + 903, 903, 903, 903, 903, 903, 903, 903, + -1, 903, 903, 903, 903, 903, 903, -1, + 903, 903, 903, 903, -1, 903, -1, 903, + 903, 903, -1, 903, 903, 903, 903, 903, + 903, -1, 903, 903, 903, 903, 903, 903, + 903, 903, 903, 903, 903, 903, 903, 903, + 903, -1, 903, -1, -1, -1, -1, 903, + 903, 903, 903, 903, -1, -1, 903, 903, + -1, 903, 903, 903, 903, 903, 903, 903, + 903, 903, 903, 903, 903, -1, -1, -1, + -1, -1, 903, -1, -1, 603, 62, 63, + 64, 65, -1, 70, 82, 90, -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, 102, 89, 81, 132, + 58, 903, 903, 903, 903, -1, -1, 903, + 903, 903, 903, 903, 903, -1, -1, -1, + 903, 903, 903, 903, 903, -1, -1, -1, + -1, 903, -1, -1, -1, 903, 903, 903, + -1, 903, 903, -1, -1, 903, -1, -1, + -1, -1, -1, -1, -1, -1, 903, 903, + 903, 903, 903, -1, 903, 903, 903, -1, + -1, 903, 903, 903, 903, 903, 903, 903, + 903, -1, 903, 903, 903, -1, -1, -1, + 903, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 903, 903, -1, -1, 903, + -1, -1, -1, -1, 903, -1, -1, -1, + -1, 903, -1, 903, 903, 903, 903, 903, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 903, -1, 903, -1, -1, + 903, 903, -1, -1, -1, 903, -1, 903, + -1, 903, 48, 49, 50, 51, 77, 78, + 79, 80, -1, 76, -1, 34, 35, 38, + 36, -1, -1, -1, 100, 96, 98, 94, + 92, -1, -1, -1, 39, 40, 41, -1, + -1, -1, 87, -1, -1, -1, 88, 85, + 84, 86, -1, -1, -1, 72, 73, 74, + -1, -1, -1, -1, 56, 71, -1, 104, + 106, 108, 110, 77, 78, 79, 80, -1, + 76, -1, 75, -1, 259, -1, -1, -1, + -1, 100, 96, 98, 94, 92, -1, -1, + 66, 67, 68, 69, -1, -1, -1, 87, + -1, -1, -1, 88, 85, 84, 86, -1, + -1, -1, 72, 73, 74, -1, -1, -1, + -1, 1006, 71, -1, 104, 106, 108, 110, + -1, -1, -1, -1, -1, -1, -1, 75, + -1, 559, 560, -1, -1, 558, -1, -1, + -1, -1, -1, -1, -1, 66, 67, 68, + 69, -1, -1, -1, -1, -1, -1, 903, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 594, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 260, -1, -1, 559, 560, -1, 611, + 558, -1, -1, -1, 33, 31, 32, 52, + 62, 63, 64, 65, -1, 70, 82, 90, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 604, -1, + -1, -1, -1, -1, -1, -1, 102, 89, + 81, 37, 58, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 614, 62, 63, 64, + 65, -1, 70, 82, 90, -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, 102, 89, 81, 132, 58, + -1, -1, -1, -1, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, -1, 784, 784, 784, 784, + 784, 784, -1, 784, 784, 784, 784, -1, + 784, -1, 784, 784, 784, -1, 784, 784, + 784, 784, 784, 784, -1, 784, 784, 784, + 784, 784, 784, 784, 784, 784, -1, 784, + 784, 784, 784, -1, -1, -1, -1, -1, + -1, -1, 784, -1, -1, 784, -1, 603, + 62, 63, 64, 65, -1, 70, 82, 90, + 784, 784, 784, 784, -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, 102, 89, + 81, 132, 58, -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, 784, 784, 784, 784, + -1, -1, 784, 784, -1, 784, 784, 784, + -1, -1, -1, 784, 784, -1, 784, 784, + -1, -1, -1, -1, 784, -1, -1, -1, + 784, 784, 784, -1, 784, 784, -1, -1, + 784, -1, -1, -1, -1, -1, -1, -1, + -1, 784, 784, 784, 784, -1, -1, -1, + 784, 784, -1, -1, 784, 784, 784, 784, + 784, 784, 784, 784, -1, 784, 784, 784, + -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, 784, 784, + 784, 784, 784, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 784, -1, + -1, -1, -1, 784, -1, -1, -1, -1, + -1, -1, -1, 48, 49, 50, 51, 77, + 78, 79, 80, 985, 76, -1, 34, 35, + 38, 36, -1, -1, -1, 100, 96, 98, + 94, 92, -1, -1, -1, 39, 40, 41, + -1, -1, -1, 87, -1, -1, -1, 88, + 85, 84, 86, -1, -1, -1, 72, 73, + 74, -1, -1, -1, -1, 56, 71, -1, + 104, 106, 108, 110, -1, -1, -1, -1, + -1, -1, -1, 75, -1, -1, 985, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 66, 67, 68, 69, -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, 784, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 260, -1, -1, -1, -1, + -1, 611, -1, -1, -1, -1, 33, 31, + 32, 52, 62, 63, 64, 65, -1, 70, + 82, 90, 272, -1, -1, -1, -1, -1, + -1, 985, 985, 616, -1, 33, 31, 32, + 52, 62, 63, 64, 65, -1, 70, 82, + 90, -1, -1, -1, -1, -1, -1, -1, + 102, 89, 81, 37, 58, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 614, 62, + 63, 64, 65, -1, 70, 82, 90, 102, + 89, 81, 37, 58, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 271, -1, -1, -1, + -1, -1, -1, -1, -1, 102, 89, 81, + 132, 58, 850, 850, 850, 850, 850, 850, + 850, 850, 850, 850, 850, 850, 850, 850, + 850, 850, 850, 850, 850, 850, 850, 850, + 850, 850, 850, 850, 850, 850, 850, 850, + -1, 850, 850, 850, 850, 850, 850, -1, + 850, 850, 850, -1, 850, 850, 850, 850, + 850, 850, 850, 850, 850, 850, 850, 850, + 850, 850, 850, 850, -1, 850, 850, 850, + 850, -1, -1, -1, -1, -1, -1, -1, + 850, 850, -1, 850, -1, -1, 850, -1, + -1, -1, -1, 850, -1, -1, 850, 850, + 850, 850, -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, 850, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 850, 850, 850, 850, -1, -1, + 850, 850, 850, 850, 850, 850, -1, 850, + 850, 850, 850, 850, 850, 850, -1, -1, + 850, -1, 850, 850, -1, 850, 850, 850, + 850, -1, 850, 850, -1, -1, 850, -1, + -1, -1, -1, -1, 850, -1, 850, 850, + 850, 850, 850, -1, -1, -1, 850, 850, + -1, 850, 850, 850, 850, 850, 850, 850, + 850, 850, -1, 850, 850, 850, -1, -1, + 850, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 850, 850, 850, -1, -1, 850, + 850, 850, -1, -1, 850, 850, 850, 850, + 850, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 850, -1, 850, 850, + 850, 850, -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, 794, 794, 794, 794, + 794, 794, 794, 794, 794, 794, -1, 794, + 794, 794, 794, -1, -1, -1, 794, 794, + 794, 794, 794, -1, -1, -1, 794, 794, + 794, -1, -1, -1, 794, -1, -1, -1, + 794, 794, 794, 794, -1, -1, -1, 794, + 794, 794, -1, -1, -1, -1, 794, 794, + -1, 794, 794, 794, 794, -1, -1, -1, + -1, -1, -1, -1, 794, -1, -1, 794, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 794, 794, 794, 794, -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, + 850, -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, 272, -1, -1, -1, + -1, -1, -1, -1, -1, 616, -1, 33, + 31, 32, 52, 62, 63, 64, 65, -1, + 70, 82, 90, 794, -1, -1, -1, -1, + -1, -1, 794, 794, 794, -1, 794, 794, + 794, 794, 794, 794, 794, 794, -1, 794, + 794, 794, -1, -1, -1, -1, -1, -1, + -1, 102, 89, 81, 37, 58, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 271, -1, + 794, 794, 794, 794, 794, -1, -1, 765, + 765, 765, 765, 765, 765, 765, 765, 765, + 765, 765, 765, 765, 765, 794, 765, 765, + 765, 765, 765, 765, -1, -1, -1, 765, + 765, 765, 765, 765, 765, -1, 765, 765, + 765, 765, -1, 765, 765, 765, 765, 765, + -1, 765, 765, 765, 765, 765, 765, -1, + 765, 765, 765, 765, 765, 765, 765, 765, + 765, -1, 765, 765, 765, 765, -1, 765, + -1, 620, -1, -1, -1, 765, -1, 765, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 765, 765, 765, 765, -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, 765, + 765, 765, 765, -1, -1, 765, 765, 765, + 765, 765, 765, -1, -1, -1, 765, 765, + 765, 765, 765, -1, -1, -1, -1, 765, + 765, -1, -1, 765, 765, 765, -1, 765, + 765, -1, -1, 765, -1, -1, -1, 765, + 619, -1, 765, -1, 765, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 765, + 765, 765, 765, 765, 765, 765, 765, -1, + 765, 765, 765, -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, 765, 765, 765, 765, 765, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 765, -1, 765, 765, -1, -1, -1, + 769, 769, 769, 769, 769, 769, 769, 769, + 769, 769, 769, 769, 769, 769, -1, 769, + 769, 769, 769, 769, 769, -1, -1, -1, + 769, 769, 769, 769, 769, 769, -1, 769, + 769, 769, 769, -1, 769, -1, 769, 769, + 769, -1, 769, 769, 769, 769, 769, 769, + -1, 769, 769, 769, 769, 769, 769, 769, + 769, 769, -1, 769, 769, 769, 769, -1, + 769, -1, -1, -1, -1, -1, 769, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 769, 769, 769, 769, + -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, + 769, 769, 769, 769, -1, 765, 769, 769, + 769, 769, 769, 769, -1, -1, -1, 769, + 769, 769, 769, 769, -1, -1, -1, -1, + 769, 769, -1, -1, 769, 769, 769, -1, + 769, 769, -1, -1, 769, -1, -1, -1, + -1, -1, -1, -1, -1, 769, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 769, 769, 769, 769, 769, 769, 769, 769, + -1, 769, 769, 769, -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, 769, 769, 769, 769, 769, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 769, -1, 769, 769, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 740, + 740, 740, 740, 740, 740, 740, 740, 740, + 740, 740, 740, 740, 740, -1, 740, 740, + 740, 740, 740, 740, -1, -1, -1, 740, + 740, 740, 740, 740, 740, -1, 740, 740, + 740, 740, -1, 740, -1, 740, 740, 740, + -1, 740, 740, 740, 740, 740, 740, -1, + 740, 740, 740, 740, 740, 740, 740, 740, + 740, -1, 740, 740, 740, 740, -1, -1, + -1, -1, -1, -1, -1, 740, -1, 740, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 740, 740, 740, 740, -1, + 432, -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, 769, 740, + 740, 740, 740, -1, -1, 740, 740, 740, + 740, 740, 740, -1, -1, -1, 740, 740, + 740, 740, 740, -1, -1, -1, 622, 740, + 740, -1, -1, 740, 740, 740, -1, 740, + 740, 740, -1, 740, -1, -1, -1, -1, + -1, -1, -1, -1, 740, -1, -1, -1, + -1, -1, 619, -1, -1, -1, -1, 740, + 740, 740, 740, 740, 740, 740, 740, -1, + 740, 740, 740, -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, 740, 740, 740, 740, 740, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 740, -1, 740, 740, -1, -1, -1, + 899, 899, 899, 899, 899, 899, 899, 899, + 899, 899, 899, 899, 899, 899, 899, 899, + 899, 899, 899, 899, 899, 899, 899, -1, + 899, 899, 899, 899, 899, 899, -1, 899, + 899, 899, 899, -1, 899, -1, 899, 899, + 899, -1, 899, 899, 899, 899, 899, 899, + -1, 899, 899, 899, 899, 899, 899, 899, + 899, 899, 899, 899, 899, 899, 899, 899, + -1, 899, -1, -1, -1, -1, 899, 899, + 899, 899, 899, -1, -1, 899, 899, -1, + 899, 899, 899, 899, 899, 899, 899, 899, + 899, 899, 899, 899, -1, -1, -1, -1, + -1, 899, -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, + 899, 899, 899, 899, -1, 740, 899, 899, + 899, 899, 899, 899, -1, -1, -1, 899, + 899, 899, 899, 899, -1, -1, -1, -1, + 899, -1, -1, -1, 899, 899, 899, -1, + 899, 899, -1, -1, 899, -1, -1, -1, + -1, -1, -1, -1, -1, 899, 899, 899, + 899, 899, -1, 899, 899, 899, -1, -1, + 899, 899, 899, 899, 899, 899, 899, 899, + -1, 899, 899, 899, -1, -1, -1, 899, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 899, 899, -1, -1, 899, -1, + 899, 899, -1, 899, -1, -1, -1, -1, + 899, -1, 899, 899, 899, 899, 899, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 899, -1, 899, -1, -1, 899, + 899, -1, -1, -1, 899, -1, 899, -1, + 899, 900, 900, 900, 900, 900, 900, 900, + 900, 900, 900, 900, 900, 900, 900, 900, + 900, 900, 900, 900, 900, 900, 900, 900, + -1, 900, 900, 900, 900, 900, 900, -1, + 900, 900, 900, 900, -1, 900, -1, 900, + 900, 900, -1, 900, 900, 900, 900, 900, + 900, -1, 900, 900, 900, 900, 900, 900, + 900, 900, 900, 900, 900, 900, 900, 900, + 900, -1, 900, -1, -1, -1, -1, 900, + 900, 900, 900, 900, -1, -1, 900, 900, + -1, 900, 900, 900, 900, 900, 900, 900, + 900, 900, 900, 900, 900, -1, -1, -1, + -1, -1, 900, -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, 899, -1, + -1, 900, 900, 900, 900, -1, -1, 900, + 900, 900, 900, 900, 900, -1, -1, -1, + 900, 900, 900, 900, 900, -1, -1, -1, + -1, 900, -1, -1, -1, 900, 900, 900, + 622, 900, 900, -1, -1, 900, -1, -1, + -1, -1, -1, -1, -1, -1, 900, 900, + 900, 900, 900, -1, 900, 900, 900, -1, + -1, 900, 900, 900, 900, 900, 900, 900, + 900, -1, 900, 900, 900, -1, -1, -1, + 900, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 900, 900, -1, -1, 900, + -1, 900, 900, -1, 900, -1, -1, -1, + -1, 900, -1, 900, 900, 900, 900, 900, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 900, -1, 900, -1, -1, + 900, 900, -1, -1, -1, 900, -1, 900, + -1, 900, 901, 901, 901, 901, 901, 901, + 901, 901, 901, 901, 901, 901, 901, 901, + 901, 901, 901, 901, 901, 901, 901, 901, + 901, -1, 901, 901, 901, 901, 901, 901, + -1, 901, 901, 901, 901, -1, 901, -1, + 901, 901, 901, -1, 901, 901, 901, 901, + 901, 901, -1, 901, 901, 901, 901, 901, + 901, 901, 901, 901, 901, 901, 901, 901, + 901, 901, -1, 901, -1, -1, -1, -1, + 901, 901, 901, 901, 901, -1, -1, 901, + 901, -1, 901, 901, 901, 901, 901, 901, + 901, 901, 901, 901, 901, 901, -1, -1, + -1, -1, -1, 901, -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, 900, + -1, -1, 901, 901, 901, 901, -1, -1, + 901, 901, 901, 901, 901, 901, -1, -1, + -1, 901, 901, 901, 901, 901, -1, -1, + -1, -1, 901, -1, -1, -1, 901, 901, + 901, -1, 901, 901, -1, -1, 901, -1, + -1, -1, -1, -1, -1, -1, -1, 901, + 901, 901, 901, 901, -1, 901, 901, 901, + -1, -1, 901, 901, 901, 901, 901, 901, + 901, 901, -1, 901, 901, 901, -1, -1, + -1, 901, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 901, 901, -1, -1, + 901, -1, 901, 901, -1, 901, -1, -1, + -1, -1, 901, -1, 901, 901, 901, 901, + 901, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 901, -1, 901, -1, + -1, 901, 901, -1, -1, -1, 901, -1, + 901, -1, 901, 896, 896, 896, 896, -1, + 896, -1, -1, -1, -1, -1, -1, -1, + -1, 896, 896, 896, 896, 896, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 896, + -1, -1, -1, 896, 896, 896, 896, -1, + -1, -1, 896, 896, 896, -1, -1, -1, + -1, 896, 896, 896, 896, 896, 896, 896, + 896, -1, -1, -1, -1, -1, -1, 896, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 896, 896, 896, + 896, -1, -1, 182, 183, -1, -1, -1, + -1, -1, 896, -1, -1, -1, -1, -1, + 902, 902, 902, 902, 902, 902, 902, 902, + 902, 902, 902, 902, 902, 902, 902, 902, + 902, 902, 902, 902, 902, 902, 902, -1, + 902, 902, 902, 902, 902, 902, -1, 902, + 902, 902, 902, -1, 902, -1, 902, 902, + 902, -1, 902, 902, 902, 902, 902, 902, + 901, 902, 902, 902, 902, 902, 902, 902, + 902, 902, 902, 902, 902, 902, 902, 902, + -1, 902, -1, -1, -1, -1, 902, 902, + 902, 902, 902, -1, -1, 902, 902, -1, + 902, 902, 902, 902, 902, 902, 902, 902, + 902, 902, 902, 902, -1, -1, -1, -1, + -1, 902, -1, -1, 896, 896, 896, 896, + 896, -1, 896, 896, 896, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 896, 896, -1, -1, 896, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 896, 896, 896, 896, 896, + 902, 902, 902, 902, -1, -1, 902, 902, + 902, 902, 902, 902, -1, -1, -1, 902, + 902, 902, 902, 902, -1, 896, -1, -1, + 902, -1, -1, -1, 902, 902, 902, -1, + 902, 902, -1, -1, 902, -1, -1, -1, + -1, -1, -1, -1, -1, 902, 902, 902, + 902, 902, -1, 902, 902, 902, -1, -1, + 902, 902, 902, 902, 902, 902, 902, 902, + -1, 902, 902, 902, -1, -1, -1, 902, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 902, 902, -1, -1, 902, -1, + 902, 902, -1, 902, -1, -1, -1, -1, + 902, -1, 902, 902, 902, 902, 902, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 902, -1, 902, -1, -1, 902, + 902, -1, -1, -1, 902, -1, 902, -1, + 902, 906, 906, 906, 906, -1, 906, -1, + -1, -1, -1, -1, -1, -1, -1, 906, + 906, 906, 906, 906, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 906, -1, -1, + -1, 906, 906, 906, 906, -1, -1, -1, + 906, 906, 906, -1, -1, -1, -1, 906, + 906, -1, 906, 906, 906, 906, 906, -1, + -1, -1, -1, -1, -1, 906, -1, -1, + -1, -1, -1, -1, -1, 907, 907, 907, + 907, -1, 907, 906, 906, 906, 906, -1, + -1, -1, -1, 907, 907, 907, 907, 907, + 906, -1, -1, -1, -1, -1, -1, -1, + -1, 907, -1, -1, -1, 907, 907, 907, + 907, -1, -1, -1, 907, 907, 907, -1, + -1, -1, -1, 907, 907, -1, 907, 907, + 907, 907, 907, -1, -1, -1, -1, -1, + -1, 907, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 902, 907, + 907, 907, 907, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 907, -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, 906, 906, 906, 906, 906, -1, + 906, 906, 906, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 906, 906, -1, -1, -1, -1, -1, + -1, -1, 906, -1, -1, -1, -1, -1, + -1, 906, 906, 906, 906, 906, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 906, 907, 907, + 907, 907, 907, -1, 907, 907, 907, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 907, 907, -1, + -1, -1, -1, -1, -1, -1, 907, -1, + -1, -1, -1, -1, -1, 907, 907, 907, + 907, 907, 908, 908, 908, 908, -1, 908, + -1, -1, -1, -1, -1, -1, -1, -1, + 908, 908, 908, 908, 908, -1, -1, -1, + -1, 907, -1, -1, -1, -1, 908, -1, + -1, -1, 908, 908, 908, 908, -1, -1, + -1, 908, 908, 908, -1, -1, -1, -1, + 908, 908, -1, 908, 908, 908, 908, 908, + -1, -1, -1, -1, -1, -1, 908, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 908, 908, 908, 908, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 908, -1, -1, -1, -1, -1, 774, + 774, 774, 774, 774, 774, 774, 774, 774, + 774, 774, 774, 774, 774, 774, 774, 774, + 774, 774, 774, 774, 774, 774, -1, 774, + 774, 774, 774, 774, 774, -1, 774, 774, + 774, 774, -1, 774, -1, 774, 774, 774, + -1, 774, 774, 774, 774, 774, 774, -1, + 774, 774, 774, 774, 774, 774, 774, 774, + 774, -1, 774, 774, 774, 774, -1, -1, + -1, -1, -1, -1, -1, 774, -1, -1, + 774, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 774, 774, 774, 774, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 908, 908, 908, 908, 908, + -1, 908, 908, 908, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 908, 908, -1, -1, -1, -1, + -1, -1, -1, 908, -1, -1, -1, -1, + -1, -1, 908, 908, 908, 908, 908, 774, + 774, 774, 774, -1, -1, 774, 774, -1, + 774, 774, 774, -1, -1, -1, 774, 774, + -1, 774, 774, -1, -1, -1, 908, 774, + -1, -1, -1, 774, 774, 774, -1, 774, + 774, -1, -1, 774, -1, -1, -1, -1, + -1, -1, -1, -1, 774, 774, 774, 774, + -1, -1, -1, 774, 774, -1, -1, 774, + 774, 774, 774, 774, 774, 774, 774, -1, + 774, 774, 774, -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, 774, 774, 774, 774, 774, -1, 790, + 790, 790, 790, 790, 790, 790, 790, -1, + 790, 774, 790, 790, 790, 790, 774, -1, + -1, 790, 790, 790, 790, 790, -1, -1, + -1, 790, 790, 790, -1, -1, -1, 790, + -1, -1, -1, 790, 790, 790, 790, -1, + -1, -1, 790, 790, 790, -1, -1, -1, + -1, 790, 790, -1, 790, 790, 790, 790, + -1, -1, -1, -1, -1, -1, -1, 790, + -1, 790, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 790, 790, 790, + 790, -1, 791, 791, 791, 791, 791, 791, + 791, 791, -1, 791, -1, 791, 791, 791, + 791, -1, -1, -1, 791, 791, 791, 791, + 791, -1, -1, -1, 791, 791, 791, -1, + -1, -1, 791, -1, -1, -1, 791, 791, + 791, 791, -1, -1, -1, 791, 791, 791, + -1, -1, -1, -1, 791, 791, -1, 791, + 791, 791, 791, -1, -1, -1, -1, -1, + -1, -1, 791, -1, 791, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 791, 791, 791, 791, -1, 774, 182, 183, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 790, -1, + -1, -1, -1, -1, 790, -1, -1, -1, + -1, 790, 790, 790, 790, 790, 790, 790, + 790, -1, 790, 790, 790, -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, 790, 790, 790, 790, 790, + -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, 791, -1, -1, -1, -1, -1, 791, + -1, -1, -1, -1, 791, 791, 791, 791, + 791, 791, 791, 791, -1, 791, 791, 791, + -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, 791, 791, + 791, 791, 791, 48, 49, 50, 51, 77, + 78, 79, 80, 985, 76, -1, 34, 35, + 38, 36, -1, -1, -1, 100, 96, 98, + 94, 92, -1, -1, -1, 39, 40, 41, + -1, -1, -1, 87, -1, -1, -1, 88, + 85, 84, 86, -1, -1, -1, 72, 73, + 74, -1, -1, -1, -1, 56, 71, -1, + 104, 106, 108, 110, -1, -1, -1, -1, + -1, -1, -1, 75, -1, -1, 985, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 66, 67, 68, 69, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 763, + 763, 763, 763, 763, 763, 763, 763, 763, + 763, 763, 763, 763, 763, -1, 763, 763, + 763, 763, 763, 763, -1, -1, -1, 763, + 763, 763, 763, 763, 763, -1, 763, 763, + 763, 763, -1, 763, 639, 763, 763, 763, + -1, 763, 763, 763, 763, 763, 763, -1, + 763, 763, 763, 763, 763, 763, 763, 763, + 763, -1, 763, 763, 763, 763, -1, 763, + -1, -1, -1, -1, -1, 763, -1, 763, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 272, 763, 763, 763, 763, -1, + -1, 985, 985, 636, -1, 33, 31, 32, + 52, 62, 63, 64, 65, -1, 70, 82, + 90, -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, 102, + 89, 81, 37, 58, -1, -1, -1, 763, + 763, 763, 763, -1, -1, 763, 763, 763, + 763, 763, 763, -1, 271, -1, 763, 763, + 763, 763, 763, -1, -1, -1, -1, 763, + 763, -1, -1, 763, 763, 763, -1, 763, + 763, -1, -1, 763, -1, -1, -1, 638, + -1, -1, 763, -1, 763, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 763, + 763, 763, 763, 763, 763, 763, 763, -1, + 763, 763, 763, -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, 763, 763, 763, 763, 763, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 763, -1, 763, 763, -1, -1, -1, + 752, 752, 752, 752, 752, 752, 752, 752, + 752, 752, 752, 752, 752, 752, -1, 752, + 752, 752, 752, 752, 752, -1, -1, -1, + 752, 752, 752, 752, 752, 752, -1, 752, + 752, 752, 752, -1, 752, -1, 752, 752, + 752, -1, 752, 752, 752, 752, 752, 752, + -1, 752, 752, 752, 752, 752, 752, 752, + 752, 752, -1, 752, 752, 752, 752, -1, + -1, -1, -1, -1, -1, -1, 752, -1, + 643, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 752, 752, 752, 752, + -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, + 752, 752, 752, 752, -1, 763, 752, 752, + 752, 752, 752, 752, -1, -1, -1, 752, + 752, 752, 752, 752, -1, -1, -1, -1, + 752, 752, -1, -1, 752, 752, 752, -1, + 752, 752, 642, -1, 752, -1, -1, -1, + -1, -1, -1, -1, -1, 752, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 752, 752, 752, 752, 752, 752, 752, 752, + -1, 752, 752, 752, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 892, 892, 892, 892, -1, 892, + -1, -1, 752, 752, 752, 752, 752, -1, + 892, 892, 892, 892, 892, -1, -1, -1, + -1, -1, 752, -1, 752, 752, 892, -1, + -1, -1, 892, 892, 892, 892, -1, -1, + -1, 892, 892, 892, -1, -1, -1, -1, + 892, 892, 892, 892, 892, 892, 892, 892, + -1, -1, -1, -1, -1, -1, 892, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 892, 892, 892, 892, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 892, -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, 272, -1, -1, -1, + -1, -1, -1, -1, -1, 636, -1, 33, + 31, 32, 52, 62, 63, 64, 65, -1, + 70, 82, 90, -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, 752, -1, + -1, 102, 89, 81, 37, 58, -1, -1, + -1, -1, -1, 892, 892, 892, 892, 892, + -1, 892, 892, 892, -1, -1, 271, -1, + -1, -1, -1, -1, 77, 78, 79, 80, + -1, 76, 892, 892, -1, -1, 892, -1, + -1, -1, 100, 96, 98, 94, 92, -1, + -1, 638, 892, 892, 892, 892, 892, -1, + 87, -1, -1, -1, 88, 85, 84, 86, + -1, -1, -1, 72, 73, 74, -1, -1, + -1, -1, 1006, 71, 892, 104, 106, 108, + 110, -1, -1, -1, -1, -1, -1, -1, + 75, 788, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 722, 722, 722, 722, 722, 722, 722, + 722, 722, 722, 722, 722, 722, 722, -1, + 722, 722, 722, 722, 722, 722, -1, -1, + -1, 722, 722, 722, 722, 722, 722, -1, + 722, 722, 722, 722, -1, 722, -1, 722, + 722, 722, -1, 722, 722, 722, 722, 722, + 722, -1, 722, 722, 722, 722, 722, 722, + 722, 722, 722, -1, 722, 722, 722, 722, + -1, -1, -1, -1, -1, -1, -1, 722, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 722, 722, 722, + 722, -1, -1, 648, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 209, 62, 63, + 64, 65, -1, 70, 82, 90, -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, 102, 89, 81, 132, + 58, 722, 722, 722, 722, -1, -1, 722, + 722, 722, 722, 722, 722, -1, -1, -1, + 722, 722, 722, 722, 722, -1, -1, -1, + -1, 722, 722, -1, -1, 722, 722, 722, + -1, 722, 722, -1, -1, 722, -1, -1, + -1, -1, -1, -1, 642, -1, 722, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 722, 722, 722, 722, 722, 722, 722, + 722, -1, 722, 722, 722, -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, 722, 722, 722, 722, 722, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 722, -1, 722, 722, -1, + -1, -1, 764, 764, 764, 764, 764, 764, + 764, 764, 764, 764, 764, 764, 764, 764, + -1, 764, 764, 764, 764, 764, 764, -1, + -1, -1, 764, 764, 764, 764, 764, 764, + -1, 764, 764, 764, 764, -1, 764, 764, + 764, 764, 764, -1, 764, 764, 764, 764, + 764, 764, -1, 764, 764, 764, 764, 764, + 764, 764, 764, 764, -1, 764, 764, 764, + 764, -1, 764, -1, -1, -1, -1, -1, + 764, -1, 764, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 764, 764, + 764, 764, -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, 764, 764, 764, 764, -1, 722, + 764, 764, 764, 764, 764, 764, -1, -1, + -1, 764, 764, 764, 764, 764, -1, -1, + -1, -1, 764, 764, -1, -1, 764, 764, + 764, -1, 764, 764, -1, -1, 764, -1, + -1, -1, 764, -1, -1, 764, -1, 764, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 764, 764, 764, 764, 764, 764, + 764, 764, -1, 764, 764, 764, -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, 764, 764, 764, 764, + 764, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 764, -1, 764, 764, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 768, 768, 768, 768, 768, + 768, 768, 768, 768, 768, 768, 768, 768, + 768, -1, 768, 768, 768, 768, 768, 768, + -1, -1, -1, 768, 768, 768, 768, 768, + 768, -1, 768, 768, 768, 768, -1, 768, + -1, 768, 768, 768, -1, 768, 768, 768, + 768, 768, 768, -1, 768, 768, 768, 768, + 768, 768, 768, 768, 768, -1, 768, 768, + 768, 768, -1, 768, -1, -1, -1, -1, + -1, 768, -1, 652, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 768, + 768, 768, 768, -1, -1, 648, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 209, + 62, 63, 64, 65, -1, 70, 82, 90, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 764, -1, -1, -1, -1, -1, 102, 89, + 81, 132, 58, 768, 768, 768, 768, -1, + -1, 768, 768, 768, 768, 768, 768, -1, + -1, -1, 768, 768, 768, 768, 768, -1, + -1, -1, -1, 768, 768, -1, -1, 768, + 768, 768, -1, 768, 768, -1, -1, 768, + -1, -1, -1, -1, -1, -1, 651, -1, + 768, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 768, 768, 768, 768, 768, + 768, 768, 768, -1, 768, 768, 768, -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, 768, 768, 768, + 768, 768, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 768, -1, 768, + 768, -1, -1, -1, 762, 762, 762, 762, + 762, 762, 762, 762, 762, 762, 762, 762, + 762, 762, -1, 762, 762, 762, 762, 762, + 762, -1, -1, -1, 762, 762, 762, 762, + 762, 762, -1, 762, 762, 762, 762, -1, + 762, -1, 762, 762, 762, -1, 762, 762, + 762, 762, 762, 762, -1, 762, 762, 762, + 762, 762, 762, 762, 762, 762, -1, 762, + 762, 762, 762, -1, 762, -1, -1, -1, + -1, -1, 762, -1, 762, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 762, 762, 762, 762, -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, 762, 762, 762, 762, + -1, 768, 762, 762, 762, 762, 762, 762, + -1, -1, -1, 762, 762, 762, 762, 762, + -1, -1, -1, -1, 762, 762, -1, -1, + 762, 762, 762, -1, 762, 762, -1, -1, + 762, -1, -1, -1, -1, -1, -1, 762, + -1, 762, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 762, 762, 762, 762, + 762, 762, 762, 762, -1, 762, 762, 762, + -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, 762, 762, + 762, 762, 762, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 762, -1, + 762, 762, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 749, 749, 749, 749, 749, + 749, 749, 749, 749, 749, 749, 749, 749, + 749, -1, 749, 749, 749, 749, 749, 749, + -1, -1, -1, 749, 749, 749, 749, 749, + 749, -1, 749, 749, 749, 749, -1, 749, + -1, 749, 749, 749, -1, 749, 749, 749, + 749, 749, 749, -1, 749, 749, 749, 749, + 749, 749, 749, 749, 749, -1, 749, 749, + 749, 749, -1, -1, -1, -1, -1, -1, + -1, 749, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 749, + 749, 749, 749, -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, 762, 749, 749, 749, 749, -1, + -1, 749, 749, 749, 749, 749, 749, -1, + -1, -1, 749, 749, 749, 749, 749, -1, + -1, -1, -1, 749, 749, -1, -1, 749, + 749, 749, -1, 749, 749, -1, -1, 749, + -1, -1, -1, -1, -1, -1, -1, -1, + 749, -1, -1, -1, -1, -1, -1, -1, + 651, -1, -1, 749, 749, 749, 749, 749, + 749, 749, 749, -1, 749, 749, 749, -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, 749, 749, 749, + 749, 749, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 749, -1, 749, + 749, 48, 49, 50, 51, 77, 78, 79, + 80, 985, 76, -1, 34, 35, 38, 36, + -1, -1, -1, 100, 96, 98, 94, 92, + -1, -1, -1, 39, 40, 41, -1, -1, + -1, 87, -1, -1, -1, 88, 85, 84, + 86, -1, -1, -1, 72, 73, 74, -1, + -1, -1, -1, 56, 71, -1, 104, 106, + 108, 110, -1, -1, -1, -1, -1, -1, + -1, 75, -1, -1, 985, 893, 893, 893, + 893, -1, 893, -1, -1, -1, -1, 66, + 67, 68, 69, 893, 893, 893, 893, 893, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 893, -1, -1, -1, 893, 893, 893, + 893, -1, -1, -1, 893, 893, 893, -1, + -1, -1, -1, 893, 893, 893, 893, 893, + 893, 893, 893, -1, -1, -1, -1, -1, + -1, 893, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 893, + 893, 893, 893, -1, -1, -1, -1, -1, + -1, 749, -1, -1, 893, -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, + 272, -1, -1, -1, -1, -1, -1, 985, + 985, 655, -1, 33, 31, 32, 52, 62, + 63, 64, 65, -1, 70, 82, 90, -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, 102, 89, 81, + 37, 58, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 271, -1, -1, -1, 893, 893, + 893, 893, 893, -1, 893, 893, 893, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 893, 893, -1, + -1, 893, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 893, 893, 893, + 893, 893, 894, 894, 894, 894, -1, 894, + -1, -1, -1, -1, -1, -1, -1, -1, + 894, 894, 894, 894, 894, -1, -1, 893, + -1, -1, -1, -1, -1, -1, 894, -1, + -1, -1, 894, 894, 894, 894, -1, -1, + -1, 894, 894, 894, -1, -1, -1, -1, + 894, 894, 894, 894, 894, 894, 894, 894, + -1, -1, -1, -1, -1, -1, 894, -1, + -1, -1, -1, -1, 895, 895, 895, 895, + -1, 895, -1, -1, 894, 894, 894, 894, + -1, -1, 895, 895, 895, 895, 895, -1, + -1, 894, -1, -1, -1, -1, -1, -1, + 895, -1, -1, -1, 895, 895, 895, 895, + -1, -1, -1, 895, 895, 895, -1, -1, + -1, -1, 895, 895, 895, 895, 895, 895, + 895, 895, -1, -1, -1, -1, -1, -1, + 895, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 895, 895, + 895, 895, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 895, -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, 894, 894, 894, 894, 894, + -1, 894, 894, 894, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 894, 894, -1, -1, 894, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 894, 894, 894, 894, 894, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 894, 895, 895, 895, + 895, 895, -1, 895, 895, 895, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 895, 895, -1, -1, + 895, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 895, 895, 895, 895, + 895, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 895, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 730, + 730, 730, 730, 730, 730, 730, 730, 730, + 730, 730, 730, 730, 730, -1, 730, 730, + 730, 730, 730, 730, -1, -1, -1, 730, + 730, 730, 730, 730, 730, -1, 730, 730, + 730, 730, -1, 730, -1, 730, 730, 730, + -1, 730, 730, 730, 730, 730, 730, -1, + 730, 730, 730, 730, 730, 730, 730, 730, + 730, -1, 730, 730, 730, 730, -1, -1, + -1, -1, -1, -1, -1, 730, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 272, 730, 730, 730, 730, -1, + -1, -1, -1, 655, -1, 33, 31, 32, + 52, 62, 63, 64, 65, -1, 70, 82, + 90, -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, 102, + 89, 81, 37, 58, -1, -1, -1, 730, + 730, 730, 730, -1, -1, 730, 730, 730, + 730, 730, 730, -1, 271, -1, 730, 730, + 730, 730, 730, -1, -1, -1, -1, 730, + 730, -1, -1, 730, 730, 730, -1, 730, + 730, -1, -1, 730, -1, -1, -1, -1, + -1, -1, -1, -1, 730, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 730, + 730, 730, 730, 730, 730, 730, 730, -1, + 730, 730, 730, -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, 730, 730, 730, 730, 730, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 730, -1, 730, 730, -1, -1, -1, + 766, 766, 766, 766, 766, 766, 766, 766, + 766, 766, 766, 766, 766, 766, -1, 766, + 766, 766, 766, 766, 766, -1, -1, -1, + 766, 766, 766, 766, 766, 766, -1, 766, + 766, 766, 766, -1, 766, -1, 766, 766, + 766, -1, 766, 766, 766, 766, 766, 766, + -1, 766, 766, 766, 766, 766, 766, 766, + 766, 766, -1, 766, 766, 766, 766, -1, + 766, -1, -1, -1, -1, -1, 766, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 766, 766, 766, 766, + -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, + 766, 766, 766, 766, -1, 730, 766, 766, + 766, 766, 766, 766, -1, -1, -1, 766, + 766, 766, 766, 766, -1, -1, -1, -1, + 766, 766, -1, -1, 766, 766, 766, -1, + 766, 766, -1, -1, 766, -1, -1, -1, + -1, -1, -1, -1, -1, 766, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 766, 766, 766, 766, 766, 766, 766, 766, + -1, 766, 766, 766, -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, 766, 766, 766, 766, 766, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 766, -1, 766, 766, 48, 49, + 50, 51, 77, 78, 79, 80, 985, 76, + -1, 34, 35, 38, 36, -1, -1, -1, + 100, 96, 98, 94, 92, -1, -1, -1, + 39, 40, 41, -1, -1, -1, 87, -1, + -1, -1, 88, 85, 84, 86, -1, -1, + -1, 72, 73, 74, -1, -1, -1, -1, + 56, 71, -1, 104, 106, 108, 110, -1, + -1, -1, -1, -1, -1, -1, 75, -1, + -1, 985, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 66, 67, 68, 69, + 789, 789, 789, 789, 789, 789, 789, 789, + -1, 789, -1, 789, 789, 789, 789, -1, + -1, -1, 789, 789, 789, 789, 789, -1, + -1, -1, 789, 789, 789, -1, -1, -1, + 789, -1, -1, -1, 789, 789, 789, 789, + -1, -1, -1, 789, 789, 789, -1, -1, + -1, -1, 789, 789, -1, 789, 789, 789, + 789, -1, -1, -1, -1, -1, -1, -1, + 789, -1, 789, -1, -1, -1, 766, -1, + -1, -1, -1, -1, -1, -1, 789, 789, + 789, 789, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 272, -1, -1, + -1, -1, -1, -1, 985, 985, 657, -1, + 33, 31, 32, 52, 62, 63, 64, 65, + -1, 70, 82, 90, -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, 102, 89, 81, 37, 58, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 271, + -1, -1, -1, -1, -1, -1, -1, 789, + -1, -1, -1, -1, -1, 789, -1, -1, + -1, -1, 789, 789, 789, 789, 789, 789, + 789, 789, -1, 789, 789, 789, -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, 789, 789, 789, 789, + 789, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, -1, + 751, 751, 751, 751, 751, 751, -1, -1, + -1, 751, 751, 751, 751, 751, 751, -1, + 751, 751, 751, 751, -1, 751, -1, 751, + 751, 751, -1, 751, 751, 751, 751, 751, + 751, -1, 751, 751, 751, 751, 751, 751, + 751, 751, 751, -1, 751, 751, 751, 751, + -1, -1, -1, -1, -1, -1, -1, 751, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 751, 751, 751, + 751, -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, 751, 751, 751, 751, -1, -1, 751, + 751, 751, 751, 751, 751, -1, -1, -1, + 751, 751, 751, 751, 751, -1, -1, -1, + -1, 751, 751, -1, -1, 751, 751, 751, + -1, 751, 751, -1, -1, 751, -1, -1, + -1, -1, -1, -1, -1, -1, 751, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 751, 751, 751, 751, 751, 751, 751, + 751, -1, 751, 751, 751, -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, 751, 751, 751, 751, 751, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 751, -1, 751, 751, -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, 767, 767, 767, 767, + 767, 767, 767, 767, 767, 767, 767, 767, + 767, 767, -1, 767, 767, 767, 767, 767, + 767, -1, -1, -1, 767, 767, 767, 767, + 767, 767, -1, 767, 767, 767, 767, -1, + 767, -1, 767, 767, 767, -1, 767, 767, + 767, 767, 767, 767, -1, 767, 767, 767, + 767, 767, 767, 767, 767, 767, -1, 767, + 767, 767, 767, -1, 767, -1, -1, -1, + -1, -1, 767, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 272, + 767, 767, 767, 767, -1, -1, -1, 751, + 657, -1, 33, 31, 32, 52, 62, 63, + 64, 65, -1, 70, 82, 90, -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, 102, 89, 81, 37, + 58, -1, -1, -1, 767, 767, 767, 767, + -1, -1, 767, 767, 767, 767, 767, 767, + -1, 271, -1, 767, 767, 767, 767, 767, + -1, -1, -1, -1, 767, 767, -1, -1, + 767, 767, 767, -1, 767, 767, -1, -1, + 767, -1, -1, -1, -1, -1, -1, -1, + -1, 767, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 767, 767, 767, 767, + 767, 767, 767, 767, -1, 767, 767, 767, + -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, 767, 767, + 767, 767, 767, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 767, -1, + 767, 767, -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, -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, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 767 +}; + +static int pid_0_parser_owners[] = { + 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 3, 23, 25, + 0, 0, 0, 0, 0, 0, 27, 0, + 0, 0, 0, 26, 0, 29, 0, 0, + 0, 30, 0, 0, 0, 0, 0, 0, + 24, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 24, 0, 0, 0, 0, 31, + 31, 31, 31, 31, 32, 36, 0, 40, + 44, 46, 48, 49, 50, 47, 51, 47, + 52, 53, 55, 56, 0, 0, 0, 0, + 80, 81, 82, 83, 85, 87, 88, 31, + 89, 90, 57, 91, 57, 26, 58, 92, + 58, 98, 100, 102, 103, 104, 110, 96, + 96, 116, 126, 139, 140, 150, 151, 152, + 161, 125, 156, 165, 144, 144, 154, 154, + 154, 59, 193, 59, 95, 95, 95, 195, + 74, 142, 142, 142, 196, 156, 156, 0, + 0, 0, 0, 0, 78, 197, 0, 0, + 216, 0, 0, 0, 239, 240, 26, 0, + 0, 241, 0, 0, 24, 24, 24, 243, + 0, 47, 47, 180, 0, 0, 0, 247, + 0, 0, 251, 252, 0, 45, 45, 45, + 45, 45, 164, 253, 164, 0, 57, 57, + 254, 258, 58, 58, 277, 297, 317, 99, + 0, 0, 0, 0, 0, 0, 0, 0, + 319, 0, 0, 0, 320, 45, 148, 148, + 44, 207, 207, 324, 99, 59, 59, 335, + 340, 189, 99, 313, 96, 313, 278, 278, + 47, 94, 94, 94, 343, 94, 113, 113, + 113, 113, 0, 0, 0, 0, 0, 144, + 356, 31, 31, 95, 357, 57, 214, 214, + 142, 58, 0, 322, 40, 40, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 125, 4, 4, 4, + 4, 4, 4, 1, 59, 363, 4, 4, + 4, 4, 4, 4, 95, 4, 4, 4, + 4, 142, 4, 189, 4, 4, 4, 323, + 4, 4, 4, 4, 4, 4, 291, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 255, 4, 4, 4, 4, 74, 74, 75, + 75, 75, 75, 75, 4, 148, 207, 99, + 370, 78, 78, 114, 114, 114, 114, 189, + 291, 371, 4, 4, 4, 4, 99, 379, + 99, 278, 381, 382, 94, 45, 391, 75, + 180, 180, 393, 395, 99, 398, 406, 45, + 45, 282, 282, 214, 407, 76, 76, 76, + 76, 76, 413, 442, 94, 454, 462, 322, + 255, 322, 465, 146, 146, 146, 467, 146, + 373, 373, 373, 484, 486, 421, 421, 421, + 487, 421, 113, 113, 113, 76, 4, 4, + 4, 4, 94, 421, 4, 4, 0, 4, + 4, 4, 289, 289, 465, 4, 4, 439, + 4, 4, 99, 323, 489, 323, 4, 495, + 423, 423, 4, 4, 4, 498, 4, 4, + 455, 455, 4, 77, 77, 77, 77, 77, + 101, 439, 400, 4, 464, 248, 464, 513, + 101, 145, 145, 145, 518, 145, 4, 4, + 4, 4, 4, 4, 4, 4, 512, 4, + 4, 4, 497, 77, 512, 109, 109, 109, + 109, 109, 525, 111, 111, 111, 111, 111, + 282, 101, 526, 112, 112, 112, 112, 112, + 149, 149, 149, 121, 121, 121, 121, 121, + 4, 4, 4, 4, 4, 109, 146, 244, + 248, 75, 75, 111, 75, 114, 114, 114, + 4, 540, 101, 112, 275, 275, 244, 206, + 206, 206, 321, 121, 161, 476, 146, 289, + 543, 64, 64, 64, 64, 549, 64, 321, + 468, 468, 394, 552, 1, 556, 559, 64, + 64, 64, 64, 64, 560, 321, 423, 76, + 76, 394, 76, 455, 146, 64, 101, 476, + 563, 64, 64, 64, 64, 568, 581, 568, + 64, 64, 64, 585, 145, 186, 562, 64, + 64, 589, 64, 64, 64, 64, 122, 122, + 122, 122, 122, 501, 501, 64, 497, 573, + 101, 564, 564, 595, 145, 325, 325, 325, + 186, 599, 351, 351, 244, 244, 562, 149, + 600, 321, 325, 325, 603, 605, 122, 198, + 198, 198, 198, 198, 617, 77, 77, 624, + 77, 573, 145, 248, 248, 362, 362, 400, + 400, 355, 355, 275, 626, -1, 206, 394, + 394, -1, 233, 233, 233, 233, 233, 198, + 149, 502, 502, 502, -1, 321, 101, 109, + 109, -1, 321, 468, -1, 111, 111, 123, + 123, 123, 123, 123, 4, 112, 112, -1, + -1, 321, 233, 321, -1, 121, 121, 206, + -1, 0, 0, 0, 0, 0, 369, 369, + 0, 0, -1, 0, 0, 0, 542, 123, + 26, 0, 0, -1, 0, 0, 24, 24, + 24, -1, 0, 47, 47, 186, 0, 0, + 0, 501, 0, 0, 564, -1, 0, 124, + 124, 124, 124, 124, 186, 351, 186, 0, + 64, 64, 64, -1, 212, 212, 212, 547, + 212, -1, 0, 0, 0, 0, 0, 0, + 0, 0, 362, 0, 0, 0, 547, 124, + 355, 294, 44, 294, 199, 199, 199, 199, + -1, 64, 64, 64, 64, 64, 96, 199, + 122, 122, 47, 129, 129, 129, 129, 129, + 502, -1, 336, 336, 0, 0, 0, 0, + 0, 144, -1, 31, 31, -1, 337, 337, + 65, 65, 65, 65, 0, 65, 40, 40, + -1, 198, 198, 129, -1, 369, 65, 65, + 65, 65, 65, 213, 213, 213, 125, 353, + 353, 353, -1, 353, 65, 590, -1, 590, + 65, 65, 65, 65, 233, 233, 95, 65, + 65, 65, -1, 142, 547, 547, 65, 65, + -1, 65, 65, 65, 65, -1, 294, 365, + 365, 123, 123, 396, 65, 592, 592, 212, + -1, 200, 200, 200, 200, 424, 424, 74, + 74, 341, 341, 341, 200, 412, 412, 148, + 207, -1, 212, 78, 78, -1, 341, 341, + -1, 189, -1, 542, 542, 411, 411, -1, + -1, -1, -1, 460, 460, -1, 587, 45, + 587, -1, 180, 180, -1, -1, 99, 336, + 336, 124, 124, 212, 294, 214, 396, 199, + -1, 452, 452, 337, 337, -1, 94, -1, + -1, 322, -1, 322, -1, 459, -1, 459, + -1, -1, 213, -1, -1, -1, 199, 199, + 199, -1, 353, -1, 113, 113, 113, 353, + 4, 4, 4, 4, 94, -1, 4, 4, + -1, 4, 4, 4, -1, 129, 129, 4, + 4, -1, 4, 4, 99, -1, -1, -1, + 4, -1, 365, 213, 4, 4, 4, -1, + 4, 4, -1, 592, 4, 133, 133, 133, + 133, 133, 353, 424, 412, 4, -1, 65, + 65, 65, 287, 287, 287, -1, 287, -1, + 4, 4, 4, 4, 4, 4, 4, 4, + 411, 4, 4, 4, 200, 133, 460, 191, + 191, 191, 191, -1, 288, 288, 288, 191, + 65, 65, 65, 65, 65, 191, 452, 191, + 191, 396, 396, 200, 200, 200, 361, 361, + 361, -1, 4, 4, 4, 4, 4, 461, + 461, 587, 347, 347, 347, 347, 75, 114, + 114, 114, 4, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 289, 5, 5, 5, 5, 5, 5, + 459, -1, -1, 5, 5, 5, 5, 5, + 5, 459, 5, 5, 5, 5, -1, 5, + 423, 5, 5, 5, 76, 5, 5, 5, + 5, 5, 5, -1, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 287, 5, 5, + 5, 5, 201, 201, 201, 201, -1, -1, + -1, 5, 359, -1, 359, 201, -1, -1, + 497, -1, 101, 288, -1, 287, 145, 5, + 5, 5, 5, -1, -1, -1, 244, 244, + -1, -1, -1, -1, -1, 361, 191, -1, + 191, 191, 191, 191, 191, 191, 461, 133, + 133, -1, 77, 287, 145, 248, 248, 392, + -1, 400, 400, -1, 288, 275, 392, 392, + -1, 394, 394, -1, -1, 392, 520, 520, + -1, -1, 149, -1, 392, -1, 361, -1, + 101, 109, 109, 5, 5, 5, 5, 111, + 111, 5, 5, -1, 5, 5, 5, 112, + 112, -1, 5, 5, -1, 5, 5, 121, + 121, 206, -1, 5, 347, 347, 347, 5, + 5, 5, -1, 5, 5, -1, -1, 5, + 136, 136, 136, 136, 136, 474, 474, -1, + 5, 143, 143, 143, 143, 143, -1, 186, + 538, 538, -1, 5, 5, 5, 5, 5, + 5, 5, 5, -1, 5, 5, 5, 351, + 136, -1, 64, 64, 64, 201, 410, 410, + 410, 143, 410, 524, 524, 359, 440, 440, + 440, 205, 205, 205, 362, 205, 359, 201, + 201, 201, 355, 571, 571, 5, 5, 5, + 5, 5, -1, 64, 64, 64, 64, 64, + -1, 520, 122, 122, -1, 5, 539, 539, + 392, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, -1, + 6, 6, 6, 6, 6, 6, -1, 548, + -1, 6, 6, 6, 6, 6, 6, 369, + 6, 6, 6, 6, -1, 6, 548, 6, + 6, 6, 474, 6, 6, 6, 6, 6, + 6, -1, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 538, 6, 6, 6, 6, + 415, -1, 488, 488, 488, 488, -1, 6, + 294, -1, -1, 123, 123, -1, 555, 415, + 555, 410, 524, -1, -1, 6, 6, 6, + 6, -1, -1, -1, 205, -1, -1, -1, + 571, 205, -1, -1, 212, -1, 451, 451, + 451, 410, 136, 136, -1, 542, 542, -1, + -1, 440, 440, 143, 143, 539, 367, 367, + 367, -1, 367, -1, 548, 548, -1, -1, + -1, 336, -1, 124, 124, 212, 294, 410, + -1, 199, -1, -1, 205, 337, -1, -1, + -1, 6, 6, 6, 6, -1, -1, 6, + 6, 5, 6, 6, 6, -1, -1, -1, + 6, 6, -1, 6, 6, 415, 415, -1, + -1, 6, -1, -1, -1, 6, 6, 6, + -1, 6, 6, -1, -1, 6, -1, 129, + 129, 598, 598, -1, -1, -1, 6, 234, + 234, 234, 234, 234, 365, 213, -1, -1, + -1, 6, 6, 6, 6, 6, 6, 6, + 6, -1, 6, 6, 6, 424, 412, -1, + -1, 65, 65, 65, -1, 451, -1, 234, + -1, 242, 242, 242, 242, 242, 488, 488, + 488, 555, 411, -1, -1, -1, 200, -1, + 460, 367, -1, 6, 6, 6, 6, 6, + -1, -1, 65, 65, 65, 65, 65, -1, + 452, 242, -1, 6, 367, -1, 451, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, -1, 7, 7, + 7, 7, 7, 7, -1, -1, -1, 7, + 7, 7, 7, 7, 7, 367, 7, 7, + 7, 7, -1, 7, -1, 7, 7, 7, + 598, 7, 7, 7, 7, 7, 7, -1, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, -1, 7, 7, 7, 7, 597, 597, + 329, 329, 329, 329, -1, 7, -1, -1, + 329, -1, -1, -1, -1, -1, 329, -1, + 329, 329, -1, 7, 7, 7, 7, -1, + 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, -1, -1, -1, -1, 326, 287, + 326, 326, 326, 326, 326, 326, 326, -1, + -1, 234, 234, -1, -1, -1, -1, -1, + 191, -1, 191, 191, 191, 191, 191, 191, + 461, 133, 133, -1, -1, 287, -1, -1, + -1, -1, -1, -1, -1, -1, 288, 7, + 7, 7, 7, 242, 242, 7, 7, 6, + 7, 7, 7, -1, -1, -1, 7, 7, + 361, 7, 7, -1, -1, -1, -1, 7, + -1, -1, -1, 7, 7, 7, -1, 7, + 7, -1, -1, 7, 349, 349, 349, 349, + -1, 597, -1, -1, 7, -1, 347, 347, + 347, 350, 350, 350, 350, -1, -1, 7, + 7, 7, 7, 7, 7, 7, 7, -1, + 7, 7, 7, 329, 329, 329, 329, -1, + 208, -1, 208, 208, 208, 208, 528, 208, + 528, 528, 528, 528, -1, 352, 352, 352, + 326, 352, 326, 326, 326, 326, 326, 201, + -1, 7, 7, 7, 7, 7, -1, 359, + 419, -1, 419, -1, -1, -1, -1, 419, + 359, 7, -1, -1, -1, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 520, 8, 8, 8, 8, + 8, 8, 392, 618, -1, 8, 8, 8, + 8, 8, 8, -1, 8, 8, 8, 8, + -1, 8, 618, 8, 8, 8, -1, 8, + 8, 8, 8, 8, 8, -1, 8, 8, + 8, 8, 8, 8, 8, 8, 8, -1, + 8, 8, 8, 8, 474, -1, -1, -1, + 360, 360, 360, 8, 360, -1, -1, -1, + -1, -1, 473, 473, 473, 538, -1, -1, + -1, 8, 8, 8, 8, -1, -1, -1, + 352, -1, -1, -1, -1, 352, 349, 349, + 349, -1, -1, -1, 524, -1, 350, 350, + 350, -1, -1, 208, -1, 419, 419, 419, + 208, 528, 571, 205, 208, 208, -1, -1, + 618, 618, -1, -1, 136, 136, -1, -1, + -1, -1, -1, 440, 440, 143, 143, 539, + 352, -1, -1, 419, -1, 8, 8, 8, + 8, -1, -1, 8, 8, 7, 8, 8, + 8, -1, -1, -1, 8, 8, 205, 8, + 8, -1, 208, -1, -1, 8, -1, -1, + -1, 8, 8, 8, -1, 8, 8, -1, + -1, 8, 327, -1, -1, -1, -1, 415, + 415, -1, 8, 360, -1, -1, -1, -1, + 360, 473, -1, -1, -1, 8, 8, 8, + 8, 8, 8, 8, 8, -1, 8, 8, + 8, -1, 327, 327, 327, 327, 327, 327, + 327, 327, 327, 327, 327, 327, 327, 327, + 327, -1, 327, 327, 327, 327, 327, 327, + 327, -1, 473, 360, -1, -1, -1, 8, + 8, 8, 8, 8, -1, -1, -1, -1, + 488, 488, 488, 555, -1, -1, -1, 8, + -1, -1, -1, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, -1, 9, 9, 9, 9, 9, 9, + 451, -1, -1, 9, 9, 9, 9, 9, + 9, -1, 9, 9, 9, 9, -1, 9, + -1, 9, 9, 9, -1, 9, 9, 9, + 9, 9, 9, -1, 9, 9, 9, 9, + 9, 9, 9, 9, 9, -1, 9, 9, + 9, 9, 598, -1, -1, 434, 434, 434, + 434, 9, 328, -1, -1, 434, -1, -1, + -1, -1, -1, 434, -1, 434, 434, 9, + 9, 9, 9, -1, -1, -1, -1, -1, + -1, -1, 327, -1, 327, 327, 327, 327, + 327, -1, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, -1, 328, 328, 328, 328, 328, 328, + 328, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 234, 234, -1, -1, -1, + -1, -1, -1, 9, 9, 9, 9, -1, + -1, 9, 9, 8, 9, 9, 9, -1, + -1, -1, 9, 9, -1, 9, 9, 519, + 519, 519, 519, 9, -1, 242, 242, 9, + 9, 9, -1, 9, 9, -1, -1, 9, + -1, -1, -1, -1, -1, -1, -1, -1, + 9, 584, 584, 584, 584, 584, -1, -1, + -1, -1, -1, 9, 9, 9, 9, 9, + 9, 9, 9, 597, 9, 9, 9, 434, + 434, 434, 434, 434, 531, 531, 531, -1, + 531, 584, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 329, 329, 329, + 329, -1, -1, -1, -1, 9, 9, 9, + 9, 9, 328, -1, 328, 328, 328, 328, + 328, -1, 326, -1, -1, 9, -1, -1, + -1, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, -1, + 10, 10, 10, 10, 10, 10, -1, -1, + -1, 10, 10, 10, 10, 10, 10, -1, + 10, 10, 10, 10, -1, 10, -1, 10, + 10, 10, -1, 10, 10, 10, 10, 10, + 10, -1, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 330, 10, 10, 10, 10, + -1, -1, -1, 496, -1, 496, -1, 10, + -1, 553, 496, 553, 519, 519, 519, 531, + 553, 519, 519, 519, 531, 10, 10, 10, + 10, -1, -1, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, -1, 330, 330, 330, 330, 330, + 330, 330, -1, 584, 584, -1, -1, 352, + 349, 349, 349, -1, -1, -1, -1, 531, + 350, 350, 350, -1, -1, -1, -1, -1, + -1, 419, 208, 528, -1, -1, -1, 208, + -1, 10, 10, 10, 10, -1, -1, 10, + 10, 9, 10, 10, 10, -1, -1, -1, + 10, 10, 352, 10, 10, -1, -1, -1, + -1, 10, -1, -1, -1, 10, 10, 10, + -1, 10, 10, -1, 463, 10, 463, 463, + 463, 463, -1, 463, 208, -1, 10, -1, + 496, 496, -1, -1, -1, -1, 553, 553, + -1, 10, 10, 10, 10, 10, 10, 10, + 10, -1, 10, 10, 10, -1, -1, 522, + 522, 522, 360, 522, -1, 463, 496, 570, + 570, 570, -1, -1, 553, -1, -1, -1, + -1, -1, -1, 330, -1, 330, 330, 330, + 330, 330, -1, 10, 10, 10, 10, 10, + -1, -1, -1, -1, -1, 537, 537, 537, + -1, 537, -1, 10, 473, 360, -1, 11, + 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, -1, 11, 11, + 11, 11, 11, 11, -1, -1, -1, 11, + 11, 11, 11, 11, 11, -1, 11, 11, + 11, 11, -1, 11, -1, 11, 11, 11, + -1, 11, 11, 11, 11, 11, 11, -1, + 11, 11, 11, 11, 11, 11, 11, 11, + 11, 331, 11, 11, 11, 11, -1, -1, + -1, 622, -1, 622, 623, 11, 623, 463, + 622, -1, 522, 623, 463, -1, 570, -1, + 463, 463, -1, 11, 11, 11, 11, -1, + 522, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, + 537, -1, -1, -1, -1, -1, -1, 570, + -1, -1, -1, -1, 522, -1, 463, -1, + -1, -1, -1, 537, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 11, + 11, 11, 11, -1, -1, 11, 11, 10, + 11, 11, 11, -1, -1, -1, 11, 11, + -1, 11, 11, -1, 537, -1, -1, 11, + -1, -1, -1, 11, 11, 11, -1, 11, + 11, -1, 532, 11, 532, 532, 532, 532, + -1, 532, -1, -1, 11, -1, 622, 622, + -1, 623, 623, -1, -1, -1, -1, 11, + 11, 11, 11, 11, 11, 11, 11, -1, + 11, 11, 11, -1, 596, 596, 596, -1, + 596, -1, -1, 532, 622, -1, -1, 623, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 331, -1, 331, 331, 331, 331, 331, + -1, 11, 11, 11, 11, 11, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 11, -1, -1, -1, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, -1, 12, 12, 12, 12, + 12, 12, -1, -1, -1, 12, 12, 12, + 12, 12, 12, -1, 12, 12, 12, 12, + -1, 12, -1, 12, 12, 12, -1, 12, + 12, 12, 12, 12, 12, -1, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 332, + 12, 12, 12, 12, -1, -1, -1, -1, + -1, -1, -1, 12, -1, 532, -1, 596, + -1, -1, 532, -1, -1, -1, 532, 532, + -1, 12, 12, 12, 12, 596, -1, 332, + 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, -1, 332, + 332, 332, 332, 332, 332, 332, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 596, -1, -1, 532, -1, -1, -1, + -1, -1, -1, -1, -1, 584, 584, -1, + -1, -1, -1, -1, -1, 12, 12, 12, + 12, -1, -1, 12, 12, 11, 12, 12, + 12, -1, -1, -1, 12, 12, -1, 12, + 12, -1, -1, -1, -1, 12, -1, -1, + -1, 12, 12, 12, -1, 12, 12, -1, + 533, 12, 533, 533, 533, 533, -1, 533, + -1, -1, 12, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 12, 12, 12, + 12, 12, 12, 12, 12, -1, 12, 12, + 12, -1, 496, 496, -1, -1, -1, -1, + -1, 533, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 332, + -1, 332, 332, 332, 332, 332, -1, 12, + 12, 12, 12, 12, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 12, + -1, -1, -1, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, -1, 13, 13, 13, 13, 13, 13, + -1, -1, -1, 13, 13, 13, 13, 13, + 13, -1, 13, 13, 13, 13, -1, 13, + -1, 13, 13, 13, -1, 13, 13, 13, + 13, 13, 13, -1, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 333, 13, 13, + 13, 13, -1, -1, -1, -1, -1, -1, + -1, 13, -1, 533, -1, -1, -1, -1, + 533, -1, -1, -1, 533, 533, -1, 13, + 13, 13, 13, -1, -1, 333, 333, 333, + 333, 333, 333, 333, 333, 333, 333, 333, + 333, 333, 333, 333, 333, 333, 333, 333, + 333, 333, 333, 333, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 533, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 570, -1, 13, 13, 13, 13, -1, + -1, 13, 13, 12, 13, 13, 13, -1, + -1, -1, 13, 13, -1, 13, 13, -1, + -1, -1, -1, 13, -1, -1, -1, 13, + 13, 13, -1, 13, 13, -1, 354, 13, + 354, 354, 354, 354, -1, -1, -1, -1, + 13, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 13, 13, 13, 13, 13, + 13, 13, 13, -1, 13, 13, 13, -1, + -1, -1, -1, -1, -1, -1, -1, 354, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 333, -1, 333, + 333, 333, 333, 333, -1, 13, 13, 13, + 13, 13, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 13, -1, -1, + -1, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, -1, + 14, 14, 14, 14, 14, 14, -1, -1, + -1, 14, 14, 14, 14, 14, 14, -1, + 14, 14, 14, 14, -1, 14, -1, 14, + 14, 14, -1, 14, 14, 14, 14, 14, + 14, -1, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 334, 14, 14, 14, 14, + -1, -1, -1, -1, -1, -1, -1, 14, + -1, 354, -1, -1, -1, -1, 354, -1, + -1, -1, 354, 354, -1, 14, 14, 14, + 14, -1, -1, 334, 334, 334, 334, 334, + 334, 334, 334, 334, 334, 334, 334, 334, + 334, 334, 334, 334, 334, 334, 334, 334, + 334, 334, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 354, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 14, 14, 14, 14, -1, -1, 14, + 14, 13, 14, 14, 14, -1, -1, -1, + 14, 14, -1, 14, 14, -1, -1, -1, + -1, 14, -1, -1, -1, 14, 14, 14, + -1, 14, 14, -1, -1, 14, -1, -1, + -1, -1, -1, -1, -1, -1, 14, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 14, 14, 14, 14, 14, 14, 14, + 14, -1, 14, 14, 14, 338, 338, 338, + 338, -1, -1, -1, -1, 338, 366, 366, + 366, -1, 366, 338, -1, 338, 338, -1, + -1, -1, -1, 334, -1, 334, 334, 334, + 334, 334, -1, 14, 14, 14, 14, 14, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 14, -1, -1, -1, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, -1, 15, 15, + 15, 15, 15, 15, -1, -1, -1, 15, + 15, 15, 15, 15, 15, -1, 15, 15, + 15, 15, -1, 15, -1, 15, 15, 15, + -1, 15, 15, 15, 15, 15, 15, -1, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, -1, 15, 15, 15, 15, -1, -1, + -1, -1, -1, -1, -1, 15, 339, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 366, -1, 15, 15, 15, 15, -1, + -1, -1, -1, -1, 338, -1, 338, 338, + 338, 338, 338, 338, 366, -1, 339, 339, + 339, 339, 339, 339, 339, 339, 339, 339, + 339, 339, 339, 339, 339, 339, 339, 339, + 339, 339, 339, 339, 339, -1, -1, -1, + -1, -1, -1, -1, -1, 366, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 15, + 15, 15, 15, -1, -1, 15, 15, 14, + 15, 15, 15, -1, -1, -1, 15, 15, + -1, 15, 15, -1, -1, -1, -1, 15, + -1, -1, -1, 15, 15, 15, -1, 15, + 15, -1, 358, 15, 358, 358, 358, 358, + -1, 358, -1, -1, 15, 534, -1, 534, + 534, 534, 534, -1, 534, -1, -1, 15, + 15, 15, 15, 15, 15, 15, 15, -1, + 15, 15, 15, -1, -1, -1, 450, 450, + 450, -1, 450, 358, -1, 426, 426, 426, + 426, -1, -1, -1, -1, 426, 534, -1, + -1, -1, -1, 426, -1, 426, 426, -1, + -1, 15, 15, 15, 15, 15, 339, -1, + 339, 339, 339, 339, 339, -1, -1, -1, + -1, 15, -1, -1, -1, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, -1, 16, 16, 16, 16, + 16, 16, -1, -1, -1, 16, 16, 16, + 16, 16, 16, -1, 16, 16, 16, 16, + -1, 16, -1, 16, 16, 16, -1, 16, + 16, 16, 16, 16, 16, -1, 16, 16, + 16, 16, 16, 16, 16, 16, 16, -1, + 16, 16, 16, 16, -1, -1, -1, -1, + -1, -1, -1, 16, -1, 358, -1, -1, + -1, 450, 358, -1, -1, -1, 358, 358, + 534, 16, 16, 16, 16, 534, -1, 450, + -1, 534, 534, -1, -1, -1, -1, -1, + 354, -1, -1, -1, -1, 354, 426, 426, + 426, 426, 426, 426, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 450, 358, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 534, + -1, -1, -1, -1, -1, 16, 16, 16, + 16, -1, 354, 16, 16, 15, 16, 16, + 16, -1, -1, -1, 16, 16, -1, 16, + 16, -1, -1, -1, -1, 16, -1, -1, + -1, 16, 16, 16, -1, 16, 16, -1, + -1, 16, 422, -1, -1, -1, -1, -1, + -1, -1, 16, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 16, 16, 16, + 16, 16, 16, 16, 16, -1, 16, 16, + 16, -1, 422, 422, 422, 422, 422, 422, + 422, 422, 422, 422, 422, 422, 422, 422, + 422, -1, 422, 422, 422, 422, 422, 422, + 422, -1, -1, -1, -1, -1, -1, 16, + 16, 16, 16, 16, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 16, + -1, -1, -1, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, -1, 17, 17, 17, 17, 17, 17, + -1, -1, -1, 17, 17, 17, 17, 17, + 17, -1, 17, 17, 17, 17, -1, 17, + -1, 17, 17, 17, -1, 17, 17, 17, + 17, 17, 17, -1, 17, 17, 17, 17, + 17, 17, 17, 17, 17, -1, 17, 17, + 17, 17, -1, -1, -1, 430, 430, 430, + 430, 17, 610, -1, 610, 430, -1, -1, + -1, 610, -1, 430, -1, 430, 430, 17, + 17, 17, 17, -1, 610, 610, -1, -1, + -1, -1, 422, -1, 422, 422, 422, 422, + 422, -1, 610, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 338, -1, + 338, 338, 338, 338, 338, 338, 366, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 17, 17, 17, 17, -1, + -1, 17, 17, 16, 17, 17, 17, 366, + -1, -1, 17, 17, -1, 17, 17, -1, + -1, -1, -1, 17, -1, -1, -1, 17, + 17, 17, -1, 17, 17, -1, -1, 17, + -1, -1, -1, -1, -1, -1, -1, -1, + 17, -1, -1, -1, -1, -1, -1, 610, + 610, -1, -1, 17, 17, 17, 17, 17, + 17, 17, 17, -1, 17, 17, 17, 430, + 430, 430, 430, 430, -1, -1, -1, -1, + -1, 427, 427, 427, 427, 610, 610, -1, + -1, 427, -1, -1, -1, -1, -1, 427, + -1, 427, 427, -1, -1, 17, 17, 17, + 17, 17, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 17, -1, -1, + -1, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, -1, + 18, 18, 18, 18, 18, 18, -1, -1, + -1, 18, 18, 18, 18, 18, 18, -1, + 18, 18, 18, 18, -1, 18, -1, 18, + 18, 18, -1, 18, 18, 18, 18, 18, + 18, -1, 18, 18, 18, 18, 18, 18, + 18, 18, 18, -1, 18, 18, 18, 18, + -1, -1, -1, -1, -1, -1, -1, 18, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 428, 428, 428, 428, 18, 18, 18, + 18, 428, -1, -1, -1, -1, -1, 428, + -1, 428, 428, -1, 358, -1, -1, -1, + -1, 358, 427, 427, 427, 427, 427, 427, + -1, 450, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 426, 426, 426, 426, 426, 426, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 18, 18, 18, 18, 450, 358, 18, + 18, 17, 18, 18, 18, -1, -1, -1, + 18, 18, -1, 18, 18, -1, -1, -1, + -1, 18, -1, -1, -1, 18, 18, 18, + -1, 18, 18, -1, -1, 18, -1, -1, + -1, -1, -1, -1, -1, -1, 18, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 18, 18, 18, 18, 18, 18, 18, + 18, -1, 18, 18, 18, -1, -1, 472, + 472, 472, -1, 472, -1, -1, -1, -1, + -1, -1, 428, 428, 428, 428, 428, 428, + -1, -1, 429, 429, 429, 429, -1, -1, + -1, -1, 429, 18, 18, 18, 18, 18, + 429, -1, 429, 429, -1, -1, -1, -1, + -1, -1, -1, 18, -1, -1, -1, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, -1, 19, 19, + 19, 19, 19, 19, -1, -1, -1, 19, + 19, 19, 19, 19, 19, -1, 19, 19, + 19, 19, -1, 19, -1, 19, 19, 19, + -1, 19, 19, 19, 19, 19, 19, -1, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, -1, 19, 19, 19, 19, -1, -1, + -1, 431, 431, 431, 431, 19, -1, -1, + -1, 431, 472, -1, -1, -1, -1, 431, + -1, 431, 431, 19, 19, 19, 19, -1, + -1, -1, -1, -1, -1, 472, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 429, 429, 429, 429, 429, + 429, -1, -1, -1, -1, -1, 472, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 19, + 19, 19, 19, -1, -1, 19, 19, 18, + 19, 19, 19, -1, -1, -1, 19, 19, + -1, 19, 19, -1, -1, -1, -1, 19, + -1, -1, -1, 19, 19, 19, -1, 19, + 19, -1, -1, 19, -1, -1, -1, -1, + -1, -1, -1, -1, 19, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 19, + 19, 19, 19, 19, 19, 19, 19, -1, + 19, 19, 19, 431, 431, 431, 431, 431, + -1, 575, -1, 575, 575, 575, 575, -1, + 575, -1, -1, -1, -1, -1, -1, -1, + -1, 430, 430, 430, 430, 430, -1, -1, + -1, 19, 19, 19, 19, 19, -1, -1, + 610, -1, -1, -1, -1, -1, -1, -1, + -1, 19, 575, -1, -1, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, -1, 20, 20, 20, 20, + 20, 20, -1, -1, -1, 20, 20, 20, + 20, 20, 20, -1, 20, 20, 20, 20, + -1, 20, -1, 20, 20, 20, -1, 20, + 20, 20, 20, 20, 20, -1, 20, 20, + 20, 20, 20, 20, 20, 20, 20, -1, + 20, 20, 20, 20, -1, -1, -1, 432, + 432, 432, 432, 20, -1, -1, -1, 432, + -1, -1, -1, -1, -1, 432, -1, 432, + 432, 20, 20, 20, 20, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 575, -1, -1, -1, + -1, 575, -1, -1, -1, 575, 575, -1, + -1, -1, -1, -1, 427, 427, 427, 427, + 427, 427, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 20, 20, 20, + 20, -1, -1, 20, 20, 19, 20, 20, + 20, -1, -1, -1, 20, 20, -1, 20, + 20, -1, -1, 575, -1, 20, -1, -1, + -1, 20, 20, 20, -1, 20, 20, -1, + -1, 20, -1, -1, -1, -1, -1, -1, + -1, -1, 20, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 20, 20, 20, + 20, 20, 20, 20, 20, -1, 20, 20, + 20, 432, 432, 432, 432, 432, -1, -1, + -1, 433, 433, 433, 433, -1, -1, -1, + -1, 433, -1, -1, -1, -1, -1, 433, + -1, 433, 433, -1, -1, -1, -1, 20, + 20, 20, 20, 20, 428, 428, 428, 428, + 428, 428, -1, -1, -1, -1, -1, 20, + -1, -1, -1, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, -1, 21, 21, 21, 21, 21, 21, + -1, -1, -1, 21, 21, 21, 21, 21, + 21, -1, 21, 21, 21, 21, -1, 21, + -1, 21, 21, 21, -1, 21, 21, 21, + 21, 21, 21, -1, 21, 21, 21, 21, + 21, 21, 21, 21, 21, -1, 21, 21, + 21, 21, -1, -1, -1, -1, -1, -1, + -1, 21, -1, -1, -1, 504, 504, 504, + 504, 504, 504, 504, 504, 504, 504, 21, + 21, 21, 21, 504, -1, 504, 504, 504, + 504, 504, 504, 504, -1, -1, -1, -1, + -1, -1, -1, 433, 433, 433, 433, 433, + -1, -1, -1, -1, -1, -1, -1, 472, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 429, 429, 429, + 429, 429, 429, 21, 21, 21, 21, -1, + 472, 21, 21, 20, 21, 21, 21, -1, + -1, -1, 21, 21, -1, 21, 21, -1, + -1, -1, -1, 21, -1, -1, -1, 21, + 21, 21, -1, 21, 21, -1, -1, 21, + -1, -1, -1, -1, -1, -1, -1, -1, + 21, 576, -1, 576, 576, 576, 576, -1, + 576, -1, -1, 21, 21, 21, 21, 21, + 21, 21, 21, -1, 21, 21, 21, -1, + -1, -1, -1, -1, -1, 504, -1, 504, + 504, 504, 504, 504, -1, -1, -1, -1, + -1, -1, 576, -1, -1, 431, 431, 431, + 431, 431, -1, -1, -1, 21, 21, 21, + 21, 21, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 21, -1, -1, + -1, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, -1, + 22, 22, 22, 22, 22, 22, -1, -1, + -1, 22, 22, 22, 22, 22, 22, -1, + 22, 22, 22, 22, -1, 22, -1, 22, + 22, 22, -1, 22, 22, 22, 22, 22, + 22, -1, 22, 22, 22, 22, 22, 22, + 22, 22, 22, -1, 22, 22, 22, 22, + -1, -1, -1, -1, -1, -1, -1, 22, + 435, -1, -1, -1, 521, 521, 521, -1, + 521, -1, -1, -1, 576, 22, 22, 22, + 22, 576, -1, -1, -1, 576, 576, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 435, 435, 435, 435, 435, 435, 435, 435, + 435, 435, 435, 435, 435, 435, 435, -1, + 435, 435, 435, 435, 435, 435, 435, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 576, -1, -1, -1, -1, + -1, 22, 22, 22, 22, -1, -1, 22, + 22, 21, 22, 22, 22, -1, -1, -1, + 22, 22, -1, 22, 22, -1, -1, -1, + -1, 22, -1, -1, -1, 22, 22, 22, + -1, 22, 22, -1, -1, 22, -1, -1, + -1, -1, -1, -1, -1, -1, 22, -1, + -1, -1, -1, -1, -1, -1, -1, 521, + -1, 22, 22, 22, 22, 22, 22, 22, + 22, -1, 22, 22, 22, 521, -1, -1, + -1, -1, -1, -1, -1, 569, 569, 569, + -1, 569, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 432, 432, 432, 432, 432, + -1, -1, -1, 22, 22, 22, 22, 22, + 435, 521, 435, 435, 435, 435, 435, -1, + -1, -1, -1, 22, -1, -1, -1, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, -1, 28, 28, + 28, 28, 28, 28, -1, -1, -1, 28, + 28, 28, 28, 28, 28, -1, 28, 28, + 28, 28, -1, 28, -1, 28, 28, 28, + -1, 28, 28, 28, 28, 28, 28, -1, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, -1, 28, 28, 28, 28, -1, -1, + -1, -1, -1, -1, -1, 28, -1, 535, + -1, 535, 535, 535, 535, -1, 535, -1, + 569, -1, 535, 28, 28, 28, 28, -1, + -1, 535, 535, -1, -1, -1, 569, -1, + -1, -1, -1, -1, -1, -1, -1, 535, + -1, -1, 192, 192, 192, 192, -1, -1, + 535, -1, 192, -1, -1, -1, -1, -1, + 192, -1, 192, 192, 192, 433, 433, 433, + 433, 433, 569, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 28, + 28, 28, 28, -1, -1, 28, 28, 22, + 28, 28, 28, -1, -1, -1, 28, 28, + -1, 28, 28, -1, -1, -1, -1, 28, + -1, -1, -1, 28, 28, 28, -1, 28, + 28, 192, -1, 28, -1, -1, -1, -1, + -1, -1, -1, -1, 28, 485, 485, 485, + 485, 485, -1, 485, -1, -1, -1, 28, + 28, 28, 28, 28, 28, 28, 28, -1, + 28, 28, 28, -1, -1, -1, -1, -1, + -1, -1, -1, 187, -1, 485, -1, -1, + -1, -1, 535, 535, -1, -1, -1, 535, + 187, -1, -1, 535, 535, -1, -1, 504, + 187, 28, 28, 28, 28, 28, 187, -1, + -1, 192, -1, 192, 192, 192, 192, 192, + 192, 28, 33, 33, 33, 33, 33, 33, + 33, 33, 33, 33, 33, 33, 33, 33, + 33, 33, 33, 33, 33, 33, 33, 33, + 33, 535, 33, 33, 33, 33, 33, 33, + -1, 33, 33, 33, 33, -1, 33, -1, + 33, 33, 33, -1, 33, 33, 33, 33, + 33, 33, 187, 33, 33, 33, 33, 33, + 33, 33, 33, 33, -1, 33, 33, 33, + 33, 485, -1, -1, -1, -1, -1, -1, + 33, -1, -1, 33, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 33, 33, + 33, 33, -1, -1, -1, -1, 187, -1, + -1, -1, -1, 187, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 187, -1, 187, -1, -1, 485, + 485, -1, -1, -1, -1, -1, -1, -1, + 187, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 33, 33, 33, 33, -1, -1, + 33, 33, -1, 33, 33, 33, -1, -1, + -1, 33, 33, -1, 33, 33, -1, -1, + -1, -1, 33, -1, -1, -1, 33, 33, + 33, -1, 33, 33, -1, -1, 33, -1, + -1, -1, -1, -1, -1, -1, 187, 33, + 33, 33, 33, -1, -1, -1, 33, 33, + -1, -1, 33, 33, 33, 33, 33, 33, + 33, 33, -1, 33, 33, 33, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 115, 115, 115, 115, 115, + 115, -1, -1, -1, -1, -1, -1, 521, + -1, -1, -1, 115, 33, 33, 33, 33, + 33, -1, -1, 115, 115, 115, 115, 115, + 115, -1, 115, -1, 33, -1, -1, 115, + -1, 33, 115, -1, -1, -1, -1, -1, + -1, 115, 115, 521, -1, -1, -1, 115, + 115, 115, 115, 115, -1, -1, 37, 37, + 37, 37, -1, 37, -1, -1, -1, -1, + -1, -1, -1, -1, 37, 37, 37, 37, + 37, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 37, -1, -1, -1, 37, 37, + 37, 37, -1, -1, -1, 37, 37, 37, + -1, -1, -1, -1, 37, 37, -1, 37, + 37, 37, 37, -1, -1, -1, -1, -1, + -1, -1, 37, 609, -1, 609, -1, -1, + -1, -1, 609, -1, -1, -1, 609, -1, + 37, 37, 37, 37, -1, 609, 609, -1, + -1, -1, -1, -1, 115, 115, 115, -1, + -1, 115, 115, 609, -1, -1, 115, -1, + 569, -1, 115, 115, -1, 115, 115, -1, + -1, -1, -1, 115, 115, -1, -1, 115, + 115, 115, -1, 115, 115, -1, -1, 115, + -1, -1, -1, -1, -1, -1, -1, -1, + 33, -1, -1, -1, 569, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 28, 28, 28, 28, 115, 115, 28, + 28, -1, 28, 28, 28, -1, -1, -1, + 28, 28, -1, 28, 28, -1, -1, -1, + -1, 28, -1, -1, -1, 28, 28, 28, + -1, 28, 28, 192, -1, 28, -1, -1, + 609, 609, -1, -1, -1, -1, 28, 37, + 37, 37, 37, 37, -1, 37, 37, 37, + 115, 28, 28, 28, 28, 28, 28, 28, + 28, -1, 28, 28, 28, -1, 609, 609, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 535, 37, 37, + 37, 37, 37, -1, -1, -1, -1, -1, + -1, -1, -1, 28, 28, 28, 28, 28, + -1, -1, -1, 192, -1, 192, 192, 192, + 192, 192, 192, 28, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, -1, 34, 34, 34, 34, + 34, 34, -1, 34, 34, 34, 34, -1, + 34, -1, 34, 34, 34, -1, 34, 34, + 34, 34, 34, 34, -1, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 436, 34, + 34, 34, 34, 485, -1, -1, -1, -1, + -1, -1, 34, -1, -1, 34, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 34, 34, 34, 34, -1, -1, 436, 436, + 436, 436, 436, 436, 436, 436, 436, 436, + 436, 436, 436, 436, 436, -1, 436, 436, + 436, 436, 436, 436, 436, -1, -1, -1, + -1, 485, 485, -1, -1, -1, -1, -1, + -1, -1, 187, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 34, 34, 34, 34, + -1, -1, 34, 34, -1, 34, 34, 34, + -1, -1, -1, 34, 34, -1, 34, 34, + -1, -1, -1, -1, 34, -1, -1, -1, + 34, 34, 34, -1, 34, 34, -1, -1, + 34, -1, -1, -1, -1, -1, -1, -1, + 187, 34, 34, 34, 34, -1, -1, -1, + 34, 34, -1, -1, 34, 34, 34, 34, + 34, 34, 34, 34, -1, 34, 34, 34, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 436, -1, + 436, 436, 436, 436, 436, -1, 34, 34, + 34, 34, 34, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 34, -1, + -1, -1, -1, 34, -1, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, -1, 35, 35, 35, + 35, 35, 35, -1, 35, 35, 35, 35, + -1, 35, -1, 35, 35, 35, -1, 35, + 35, 35, 35, 35, 35, -1, 35, 35, + 35, 35, 35, 35, 35, 35, 35, -1, + 35, 35, 35, 35, -1, -1, -1, -1, + -1, -1, -1, 35, -1, -1, 35, -1, + -1, 35, -1, -1, -1, -1, -1, -1, + -1, 35, 35, 35, 35, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 115, 115, + 115, -1, -1, 115, 115, -1, -1, -1, + 115, -1, -1, -1, 115, 115, -1, 115, + 115, -1, -1, -1, -1, 115, 115, -1, + -1, 115, 115, 115, -1, 115, 115, -1, + -1, 115, -1, -1, -1, 35, 35, 35, + 35, -1, 34, 35, 35, -1, 35, 35, + 35, -1, -1, -1, 35, 35, -1, 35, + 35, -1, -1, -1, -1, 35, -1, -1, + -1, 35, 35, 35, -1, 35, 35, -1, + -1, 35, -1, -1, -1, -1, -1, -1, + -1, -1, 35, 35, 35, 35, -1, -1, + -1, 35, 35, -1, 35, 35, 35, 35, + 35, 35, 35, 35, 35, -1, 35, 35, + 35, 37, 37, 37, 37, 37, -1, 37, + 37, 37, 115, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 609, -1, -1, -1, -1, -1, 35, + 35, 35, 35, 35, -1, -1, -1, -1, + 37, 37, 37, 37, 37, -1, -1, 35, + 38, 38, 38, 38, 35, 38, -1, -1, + -1, -1, -1, -1, -1, -1, 38, 38, + 38, 38, 38, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 38, -1, -1, -1, + 38, 38, 38, 38, -1, -1, -1, 38, + 38, 38, -1, -1, -1, -1, 38, 38, + -1, 38, 38, 38, 38, -1, -1, -1, + -1, -1, -1, -1, 38, -1, -1, -1, + -1, 420, 420, 420, 420, -1, -1, -1, + -1, 420, 38, 38, 38, 38, -1, 420, + -1, 420, 420, 420, -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, 66, 66, 66, 66, -1, 66, + 420, -1, -1, -1, -1, -1, -1, -1, + 66, 66, 66, 66, 66, -1, -1, -1, + -1, -1, -1, 35, -1, -1, 66, -1, + -1, -1, 66, 66, 66, 66, -1, -1, + -1, 66, 66, 66, -1, -1, -1, -1, + 66, 66, -1, 66, 66, 66, 66, -1, + 536, -1, 536, 536, 536, 536, 66, 536, + -1, 38, 38, 38, 38, 38, -1, 38, + 38, 38, 536, 536, -1, -1, -1, -1, + 420, -1, 420, 420, 420, 420, 420, 420, + 536, -1, -1, -1, -1, -1, -1, -1, + -1, 536, -1, -1, -1, -1, -1, -1, + 38, 38, 38, 38, 38, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, -1, 39, 39, 39, + 39, 39, 39, -1, 39, 39, 39, 39, + -1, 39, -1, 39, 39, 39, -1, 39, + 39, 39, 39, 39, 39, -1, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, -1, 39, -1, + -1, -1, -1, 39, 39, 39, 39, 39, + -1, 39, 39, 39, -1, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, + 39, 66, 66, 66, -1, -1, 39, -1, + -1, -1, -1, 536, 536, -1, -1, -1, + 536, -1, -1, -1, 536, 536, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 66, 66, 66, 66, 66, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 39, 39, 39, + 39, -1, -1, 39, 39, 39, 39, 39, + 39, -1, 536, -1, 39, 39, 39, 39, + 39, -1, -1, -1, -1, 39, -1, -1, + -1, 39, 39, 39, -1, 39, 39, -1, + -1, 39, -1, -1, -1, -1, -1, -1, + -1, -1, 39, 39, 39, 39, 39, -1, + 39, 39, 39, -1, -1, 39, 39, 39, + 39, 39, 39, 39, 39, -1, 39, 39, + 39, -1, -1, -1, 39, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 39, + 39, -1, -1, 39, -1, -1, -1, -1, + 39, -1, -1, -1, -1, 39, -1, 39, + 39, 39, 39, 39, -1, -1, 35, -1, + -1, -1, -1, -1, -1, -1, -1, 39, + -1, 39, -1, -1, 39, 39, -1, -1, + -1, 39, -1, 39, -1, 39, -1, -1, + -1, -1, -1, -1, 41, 41, 41, 41, + -1, 41, -1, -1, -1, -1, -1, -1, + -1, -1, 41, 41, 41, 41, 41, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 41, -1, -1, -1, 41, 41, 41, 41, + -1, -1, -1, 41, 41, 41, -1, -1, + -1, -1, 41, 41, -1, 41, 41, 41, + 41, -1, -1, -1, -1, -1, -1, -1, + 41, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 437, -1, -1, -1, 41, 41, + 41, 41, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, + 437, -1, 437, 437, 437, 437, 437, 437, + 437, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 39, -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, 420, -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, 41, 41, 41, + 41, 41, -1, 41, 41, 41, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 38, 38, 38, 38, 38, + -1, 38, 38, 38, 41, 41, 41, 41, + 41, -1, 420, -1, 420, 420, 420, 420, + 420, 420, 437, -1, 437, 437, 437, 437, + 437, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 38, 38, 38, 38, 38, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, -1, 42, + 42, 42, 42, 42, 42, -1, 42, 42, + 42, 42, -1, 42, -1, 42, 42, 42, + -1, 42, 42, 42, 42, 42, 42, -1, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, -1, 42, 42, 42, 42, -1, -1, + -1, -1, -1, -1, -1, 42, -1, -1, + 42, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 42, 42, 42, 42, -1, + -1, -1, -1, 66, 66, 66, -1, -1, + -1, -1, -1, -1, -1, -1, 536, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 66, 66, 66, 66, + 66, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 42, + 42, 42, 42, -1, -1, 42, 42, -1, + 42, 42, 42, -1, -1, -1, 42, 42, + -1, 42, 42, -1, -1, -1, -1, 42, + -1, -1, -1, 42, 42, 42, -1, 42, + 42, -1, -1, 42, 438, -1, -1, -1, + -1, -1, -1, -1, 42, 42, 42, 42, + -1, -1, -1, 42, 42, -1, -1, 42, + 42, 42, 42, 42, 42, 42, 42, -1, + 42, 42, 42, -1, 438, 438, 438, 438, + 438, 438, 438, 438, 438, 438, 438, 438, + 438, 438, 438, -1, 438, 438, 438, 438, + 438, 438, 438, -1, -1, -1, -1, -1, + -1, 42, 42, 42, 42, 42, -1, -1, + -1, 67, 67, 67, 67, -1, 67, -1, + -1, 42, -1, -1, -1, -1, 42, 67, + 67, 67, 67, 67, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 67, -1, -1, + -1, 67, 67, 67, 67, 499, -1, -1, + 67, 67, 67, -1, -1, -1, -1, 67, + 67, -1, 67, 67, 67, 67, -1, -1, + -1, -1, -1, -1, -1, 67, -1, -1, + -1, -1, -1, -1, -1, 499, 499, 499, + 499, 499, 499, 499, 499, 499, 499, 499, + 499, 499, 499, 499, -1, 499, 499, 499, + 499, 499, 499, 499, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 438, -1, 438, 438, + 438, 438, 438, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, -1, 43, 43, 43, 43, + 43, 43, -1, 43, 43, 43, 43, -1, + 43, -1, 43, 43, 43, 42, 43, 43, + 43, 43, 43, 43, -1, 43, 43, 43, + 43, 43, 43, 43, 43, 43, -1, 43, + 43, 43, 43, -1, -1, -1, -1, -1, + -1, -1, 43, -1, -1, 43, -1, -1, + 67, 67, 67, -1, -1, -1, -1, -1, + 43, 43, 43, 43, -1, 499, -1, 499, + 499, 499, 499, 499, -1, -1, -1, 41, + 41, 41, 41, 41, -1, 41, 41, 41, + -1, 67, 67, 67, 67, 67, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 41, 41, + 41, 41, 41, -1, 43, 43, 43, 43, + -1, -1, 43, 43, -1, 43, 43, 43, + -1, -1, -1, 43, 43, -1, 43, 43, + -1, -1, -1, -1, 43, -1, -1, -1, + 43, 43, 43, -1, 43, 43, -1, -1, + 43, 500, -1, -1, -1, -1, -1, -1, + -1, 43, 43, 43, 43, -1, -1, -1, + 43, 43, -1, -1, 43, 43, 43, 43, + 43, 43, 43, 43, -1, 43, 43, 43, + -1, 500, 500, 500, 500, 500, 500, 500, + 500, 500, 500, 500, 500, 500, 500, 500, + -1, 500, 500, 500, 500, 500, 500, 500, + -1, -1, -1, -1, -1, -1, 43, 43, + 43, 43, 43, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 43, -1, + -1, -1, -1, 43, -1, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, -1, 54, 54, 54, + 54, 54, 54, -1, 54, 54, 54, 54, + -1, 54, -1, 54, 54, 54, -1, 54, + 54, 54, 54, 54, 54, -1, 54, 54, + 54, 54, 54, 54, 54, 54, 54, -1, + 54, 54, 54, 54, -1, -1, -1, -1, + -1, -1, -1, 54, 503, -1, 54, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 54, 54, 54, 54, -1, -1, 54, + 54, 500, -1, 500, 500, 500, 500, 500, + -1, -1, -1, -1, 503, 503, 503, 503, + 503, 503, 503, 503, 503, 503, 503, 503, + 503, 503, 503, -1, 503, 503, 503, 503, + 503, 503, 503, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 54, 54, 54, + 54, -1, 43, 54, 54, -1, 54, 54, + 54, -1, -1, -1, 54, 54, -1, 54, + 54, -1, -1, -1, -1, 54, -1, -1, + -1, 54, 54, 54, -1, 54, 54, -1, + -1, 54, -1, -1, -1, -1, -1, -1, + -1, -1, 54, 54, 54, 54, -1, -1, + -1, 54, 54, -1, -1, 54, 54, 54, + 54, 54, 54, 54, 54, -1, 54, 54, + 54, -1, -1, -1, -1, -1, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, + -1, -1, -1, -1, 505, -1, 505, 505, + 505, 505, 505, 505, 505, -1, -1, 54, + 54, 54, 54, 54, 503, -1, 503, 503, + 503, 503, 503, -1, -1, -1, -1, 54, + -1, -1, -1, -1, 54, -1, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, -1, 60, 60, + 60, 60, 60, 60, -1, 60, 60, 60, + 60, -1, 60, -1, 60, 60, 60, -1, + 60, 60, 60, 60, 60, 60, -1, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, -1, -1, + -1, -1, -1, -1, 60, 60, 60, 60, + -1, -1, -1, 60, 60, -1, 60, 60, + 60, 60, 60, 60, 60, 60, -1, -1, + 60, 60, 67, 67, 67, -1, 505, 60, + 505, 505, 505, 505, 505, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 67, 67, 67, 67, 67, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 60, 60, + 60, 60, -1, 54, 60, 60, 60, 60, + 60, 60, -1, -1, -1, 60, 60, 60, + 60, 60, -1, -1, -1, -1, 60, -1, + -1, -1, 60, 60, 60, -1, 60, 60, + -1, -1, 60, -1, -1, -1, -1, -1, + -1, -1, -1, 60, 60, 60, 60, 60, + -1, 60, 60, 60, -1, -1, 60, 60, + 60, 60, 60, 60, 60, 60, -1, 60, + 60, 60, -1, -1, -1, 60, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 60, 60, -1, -1, 60, -1, -1, -1, + -1, 60, -1, -1, -1, -1, 60, -1, + 60, 60, 60, 60, 60, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 60, -1, 60, -1, -1, 60, 60, -1, + -1, -1, 60, -1, 60, -1, 60, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, -1, 61, + 61, 61, 61, 61, 61, -1, 61, 61, + 61, 61, -1, 61, -1, 61, 61, 61, + -1, 61, 61, 61, 61, 61, 61, -1, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, -1, + -1, -1, -1, -1, -1, 61, 61, 61, + 61, -1, -1, -1, 61, 61, -1, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, -1, -1, -1, -1, -1, + 61, -1, -1, -1, -1, -1, 506, 506, + 506, 506, 506, 506, 506, 506, 506, 506, + -1, -1, -1, -1, 506, -1, 506, 506, + 506, 506, 506, 506, 506, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 60, -1, -1, 61, + 61, 61, 61, -1, -1, 61, 61, 61, + 61, 61, 61, -1, -1, -1, 61, 61, + 61, 61, 61, -1, -1, -1, -1, 61, + -1, -1, -1, 61, 61, 61, -1, 61, + 61, -1, -1, 61, -1, -1, -1, -1, + -1, -1, -1, -1, 61, 61, 61, 61, + 61, -1, 61, 61, 61, -1, -1, 61, + 61, 61, 61, 61, 61, 61, 61, -1, + 61, 61, 61, -1, -1, -1, 61, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 61, 61, -1, -1, 61, -1, -1, + -1, -1, 61, -1, -1, -1, -1, 61, + -1, 61, 61, 61, 61, 61, 506, -1, + 506, 506, 506, 506, 506, -1, -1, -1, + -1, 61, -1, 61, -1, -1, 61, 61, + -1, -1, -1, 61, -1, 61, -1, 61, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, -1, + 62, 62, 62, 62, 62, 62, -1, 62, + 62, 62, 62, -1, 62, -1, 62, 62, + 62, -1, 62, 62, 62, 62, 62, 62, + -1, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + -1, 62, -1, -1, -1, -1, 62, 62, + 62, 62, 62, -1, -1, 62, 62, -1, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, -1, -1, -1, -1, + 505, 62, -1, -1, -1, -1, -1, 507, + 507, 507, 507, 507, 507, 507, 507, 507, + 507, -1, -1, -1, -1, 507, -1, 507, + 507, 507, 507, 507, 507, 507, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 61, -1, -1, + 62, 62, 62, 62, -1, -1, 62, 62, + 62, 62, 62, 62, -1, -1, -1, 62, + 62, 62, 62, 62, -1, -1, -1, -1, + 62, -1, -1, -1, 62, 62, 62, -1, + 62, 62, -1, -1, 62, -1, -1, -1, + -1, -1, -1, -1, -1, 62, 62, 62, + 62, 62, -1, 62, 62, 62, -1, -1, + 62, 62, 62, 62, 62, 62, 62, 62, + -1, 62, 62, 62, -1, -1, -1, 62, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 62, 62, -1, -1, 62, -1, + -1, -1, -1, 62, -1, -1, -1, -1, + 62, -1, 62, 62, 62, 62, 62, 507, + -1, 507, 507, 507, 507, 507, -1, -1, + -1, -1, 62, -1, 62, -1, -1, 62, + 62, -1, -1, -1, 62, -1, 62, -1, + 62, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + -1, 63, 63, 63, 63, 63, 63, -1, + 63, 63, 63, 63, -1, 63, -1, 63, + 63, 63, -1, 63, 63, 63, 63, 63, + 63, -1, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, -1, 63, -1, -1, -1, -1, 63, + 63, 63, 63, 63, 508, -1, 63, 63, + -1, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, -1, -1, -1, + -1, -1, 63, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 508, 508, 508, 508, + 508, 508, 508, 508, 508, 508, 508, 508, + 508, 508, 508, -1, 508, 508, 508, 508, + 508, 508, 508, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 62, -1, + -1, 63, 63, 63, 63, -1, -1, 63, + 63, 63, 63, 63, 63, -1, -1, -1, + 63, 63, 63, 63, 63, -1, -1, -1, + -1, 63, -1, -1, -1, 63, 63, 63, + -1, 63, 63, -1, -1, 63, -1, -1, + -1, -1, -1, -1, -1, -1, 63, 63, + 63, 63, 63, -1, 63, 63, 63, -1, + -1, 63, 63, 63, 63, 63, 63, 63, + 63, -1, 63, 63, 63, -1, -1, -1, + 63, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 63, 63, -1, -1, 63, + -1, -1, -1, -1, 63, -1, -1, -1, + -1, 63, -1, 63, 63, 63, 63, 63, + 506, -1, -1, -1, 508, -1, 508, 508, + 508, 508, 508, 63, -1, 63, -1, -1, + 63, 63, -1, -1, -1, 63, -1, 63, + -1, 63, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, + 68, -1, 68, 68, 68, 68, 68, 68, + -1, 68, 68, 68, 68, -1, 68, -1, + 68, 68, 68, -1, 68, 68, 68, 68, + 68, 68, -1, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, -1, 68, -1, -1, -1, -1, + 68, 68, 68, 68, 68, 509, -1, 68, + 68, -1, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, -1, -1, + -1, -1, -1, 68, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, -1, 509, 509, 509, + 509, 509, 509, 509, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 63, + -1, -1, 68, 68, 68, 68, -1, -1, + 68, 68, 68, 68, 68, 68, -1, -1, + -1, 68, 68, 68, 68, 68, -1, -1, + -1, -1, 68, -1, -1, -1, 68, 68, + 68, -1, 68, 68, -1, -1, 68, -1, + -1, -1, -1, -1, -1, -1, -1, 68, + 68, 68, 68, 68, -1, 68, 68, 68, + -1, -1, 68, 68, 68, 68, 68, 68, + 68, 68, -1, 68, 68, 68, -1, -1, + -1, 68, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 68, 68, -1, -1, + 68, -1, -1, -1, -1, 68, -1, -1, + -1, -1, 68, -1, 68, 68, 68, 68, + 68, 507, -1, -1, -1, 509, -1, 509, + 509, 509, 509, 509, 68, -1, 68, -1, + -1, 68, 68, -1, -1, -1, 68, -1, + 68, -1, 68, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, -1, 69, 69, 69, 69, 69, + 69, -1, 69, 69, 69, 69, -1, 69, + -1, 69, 69, 69, -1, 69, 69, 69, + 69, 69, 69, -1, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, -1, 69, -1, -1, -1, + -1, 69, 69, 69, 69, 69, 510, -1, + 69, 69, -1, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, -1, + -1, -1, -1, -1, 69, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 510, 510, + 510, 510, 510, 510, 510, 510, 510, 510, + 510, 510, 510, 510, 510, -1, 510, 510, + 510, 510, 510, 510, 510, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 68, -1, -1, 69, 69, 69, 69, -1, + -1, 69, 69, 69, 69, 69, 69, -1, + -1, -1, 69, 69, 69, 69, 69, -1, + -1, -1, -1, 69, -1, -1, -1, 69, + 69, 69, -1, 69, 69, -1, -1, 69, + -1, -1, -1, -1, -1, -1, -1, -1, + 69, 69, 69, 69, 69, -1, 69, 69, + 69, -1, -1, 69, 69, 69, 69, 69, + 69, 69, 69, -1, 69, 69, 69, -1, + -1, -1, 69, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 69, 69, -1, + -1, 69, -1, -1, -1, -1, 69, -1, + -1, -1, -1, 69, -1, 69, 69, 69, + 69, 69, -1, -1, -1, -1, 510, -1, + 510, 510, 510, 510, 510, 69, -1, 69, + -1, -1, 69, 69, -1, -1, -1, 69, + -1, 69, -1, 69, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, -1, 70, 70, 70, 70, + 70, 70, -1, 70, 70, 70, 70, -1, + 70, -1, 70, 70, 70, -1, 70, 70, + 70, 70, 70, 70, -1, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, -1, 70, -1, -1, + -1, -1, 70, 70, 70, 70, 70, 511, + -1, 70, 70, -1, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + -1, -1, -1, -1, -1, 70, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 511, + 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, -1, 511, + 511, 511, 511, 511, 511, 511, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 69, -1, -1, 70, 70, 70, 70, + -1, -1, 70, 70, 70, 70, 70, 70, + -1, -1, -1, 70, 70, 70, 70, 70, + -1, -1, -1, -1, 70, -1, -1, -1, + 70, 70, 70, -1, 70, 70, -1, -1, + 70, -1, -1, -1, -1, -1, -1, -1, + -1, 70, 70, 70, 70, 70, -1, 70, + 70, 70, -1, -1, 70, 70, 70, 70, + 70, 70, 70, 70, -1, 70, 70, 70, + -1, -1, -1, 70, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 70, 70, + -1, -1, 70, -1, -1, -1, -1, 70, + -1, -1, -1, -1, 70, -1, 70, 70, + 70, 70, 70, -1, -1, -1, -1, 511, + -1, 511, 511, 511, 511, 511, 70, -1, + 70, -1, -1, 70, 70, -1, -1, -1, + 70, -1, 70, -1, 70, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, -1, 71, 71, 71, + 71, 71, 71, -1, 71, 71, 71, 71, + -1, 71, -1, 71, 71, 71, -1, 71, + 71, 71, 71, 71, 71, -1, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, -1, 71, -1, + -1, -1, -1, 71, 71, 71, 71, 71, + 514, -1, 71, 71, -1, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, -1, -1, -1, -1, -1, 71, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 514, 514, 514, 514, 514, 514, 514, 514, + 514, 514, 514, 514, 514, 514, 514, -1, + 514, 514, 514, 514, 514, 514, 514, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 70, -1, -1, 71, 71, 71, + 71, -1, -1, 71, 71, 71, 71, 71, + 71, -1, -1, -1, 71, 71, 71, 71, + 71, -1, -1, -1, -1, 71, -1, -1, + -1, 71, 71, 71, -1, 71, 71, -1, + -1, 71, -1, -1, -1, -1, -1, -1, + -1, -1, 71, 71, 71, 71, 71, -1, + 71, 71, 71, -1, -1, 71, 71, 71, + 71, 71, 71, 71, 71, -1, 71, 71, + 71, -1, -1, -1, 71, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 71, + 71, -1, -1, 71, -1, -1, -1, -1, + 71, -1, -1, -1, -1, 71, -1, 71, + 71, 71, 71, 71, -1, -1, -1, -1, + 514, -1, 514, 514, 514, 514, 514, 71, + -1, 71, -1, -1, 71, 71, -1, -1, + -1, 71, -1, 71, -1, 71, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, -1, 72, 72, + 72, 72, 72, 72, -1, 72, 72, 72, + 72, -1, 72, -1, 72, 72, 72, -1, + 72, 72, 72, 72, 72, 72, -1, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, -1, 72, + -1, -1, -1, -1, 72, 72, 72, 72, + 72, 515, -1, 72, 72, -1, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, -1, -1, -1, -1, -1, 72, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 515, 515, 515, 515, 515, 515, 515, + 515, 515, 515, 515, 515, 515, 515, 515, + -1, 515, 515, 515, 515, 515, 515, 515, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 71, -1, -1, 72, 72, + 72, 72, -1, -1, 72, 72, 72, 72, + 72, 72, -1, -1, -1, 72, 72, 72, + 72, 72, -1, -1, -1, -1, 72, -1, + -1, -1, 72, 72, 72, -1, 72, 72, + -1, -1, 72, -1, -1, -1, -1, -1, + -1, -1, -1, 72, 72, 72, 72, 72, + -1, 72, 72, 72, -1, -1, 72, 72, + 72, 72, 72, 72, 72, 72, -1, 72, + 72, 72, -1, -1, -1, 72, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 72, 72, -1, -1, 72, -1, -1, -1, + -1, 72, -1, -1, -1, -1, 72, -1, + 72, 72, 72, 72, 72, -1, -1, -1, + -1, 515, -1, 515, 515, 515, 515, 515, + 72, -1, 72, -1, -1, 72, 72, -1, + -1, -1, 72, -1, 72, -1, 72, 73, + 73, 73, 73, -1, 73, -1, -1, -1, + -1, -1, -1, -1, -1, 73, 73, 73, + 73, 73, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 73, -1, -1, -1, 73, + 73, 73, 73, -1, -1, -1, 73, 73, + 73, -1, -1, -1, -1, 73, 73, -1, + 73, 73, 73, 73, -1, -1, -1, -1, + -1, -1, -1, 73, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 73, 73, 73, 73, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, -1, 79, 79, 79, 79, + 79, 79, -1, 79, 79, 79, 79, -1, + 79, -1, 79, 79, 79, -1, 79, 79, + 79, 79, 79, 79, 72, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, -1, 79, -1, -1, + -1, -1, 79, 79, 79, 79, 79, -1, + -1, 79, 79, -1, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + -1, -1, -1, -1, -1, 79, -1, -1, + 73, 73, 73, 73, 73, -1, 73, 73, + 73, -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, 73, + 73, 73, 73, 73, 79, 79, 79, 79, + -1, -1, 79, 79, 79, 79, 79, 79, + -1, -1, -1, 79, 79, 79, 79, 79, + -1, -1, -1, -1, 79, -1, -1, -1, + 79, 79, 79, -1, 79, 79, -1, -1, + 79, -1, -1, -1, -1, -1, -1, -1, + -1, 79, 79, 79, 79, 79, -1, 79, + 79, 79, -1, -1, 79, 79, 79, 79, + 79, 79, 79, 79, -1, 79, 79, 79, + -1, -1, -1, 79, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 79, 79, + -1, -1, 79, -1, -1, -1, -1, 79, + -1, -1, -1, -1, 79, -1, 79, 79, + 79, 79, 79, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 79, -1, + 79, -1, -1, 79, 79, -1, -1, -1, + 79, -1, 79, -1, 79, 84, 84, 84, + 84, -1, 84, -1, -1, -1, -1, -1, + -1, -1, -1, 84, 84, 84, 84, 84, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 84, 516, -1, -1, 84, 84, 84, + 84, -1, -1, -1, 84, 84, 84, -1, + -1, -1, -1, 84, 84, -1, 84, 84, + 84, 84, -1, -1, -1, -1, -1, -1, + -1, 84, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, + 516, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, + 86, -1, 86, 86, 86, 86, 86, 86, + -1, 86, 86, 86, 86, -1, 86, -1, + 86, 86, 86, -1, 86, 86, 86, 86, + 86, 86, 79, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, -1, 86, -1, -1, -1, -1, + 86, 86, 86, 86, 86, -1, -1, 86, + 86, -1, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, -1, -1, + -1, -1, -1, 86, -1, -1, -1, -1, + -1, -1, -1, -1, 84, 84, 84, -1, + -1, -1, 516, -1, 516, 516, 516, 516, + 516, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 84, 84, 84, + 84, 84, 86, 86, 86, 86, -1, -1, + 86, 86, 86, 86, 86, 86, -1, -1, + -1, 86, 86, 86, 86, 86, -1, -1, + -1, -1, 86, -1, -1, -1, 86, 86, + 86, -1, 86, 86, -1, -1, 86, -1, + -1, -1, -1, -1, -1, -1, -1, 86, + 86, 86, 86, 86, -1, 86, 86, 86, + -1, -1, 86, 86, 86, 86, 86, 86, + 86, 86, -1, 86, 86, 86, -1, -1, + -1, 86, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 86, 86, -1, -1, + 86, -1, -1, -1, -1, 86, -1, -1, + -1, -1, 86, -1, 86, 86, 86, 86, + 86, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 517, 86, -1, 86, -1, + -1, 86, 86, -1, -1, -1, 86, -1, + 86, -1, 86, -1, -1, -1, -1, -1, + -1, -1, 73, 73, 73, 73, 73, -1, + 73, 73, 73, 517, 517, 517, 517, 517, + 517, 517, 517, 517, 517, 517, 517, 517, + 517, 517, 517, 517, 517, 517, 517, 517, + 517, 517, -1, -1, -1, -1, -1, -1, + -1, 73, 73, 73, 73, 73, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 93, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 93, 93, 93, + -1, 93, 93, 93, 93, 93, 93, -1, + 93, 93, 93, 93, -1, 93, -1, 93, + 93, 93, -1, 93, 93, 93, 93, 93, + 93, -1, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 93, 93, 93, + 93, -1, 93, -1, -1, -1, -1, 93, + 93, 93, 93, 93, 561, -1, 93, 93, + 86, 93, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, -1, -1, -1, + -1, -1, 93, 517, -1, 517, 517, 517, + 517, 517, -1, -1, 561, 561, 561, 561, + 561, 561, 561, 561, 561, 561, 561, 561, + 561, 561, 561, -1, 561, 561, 561, 561, + 561, 561, 561, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 93, 93, 93, 93, -1, -1, 93, + 93, 93, 93, 93, 93, -1, -1, -1, + 93, 93, 93, 93, 93, -1, -1, -1, + -1, 93, -1, -1, -1, 93, 93, 93, + -1, 93, 93, -1, -1, 93, -1, -1, + -1, -1, -1, -1, -1, -1, 93, 93, + 93, 93, 93, -1, 93, 93, 93, -1, + -1, 93, 93, 93, 93, 93, 93, 93, + 93, -1, 93, 93, 93, -1, -1, -1, + 93, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 93, 93, -1, -1, 93, + -1, -1, -1, -1, 93, -1, -1, -1, + -1, 93, -1, 93, 93, 93, 93, 93, + -1, -1, -1, -1, 561, -1, 561, 561, + 561, 561, 561, 93, -1, 93, -1, -1, + 93, 93, -1, -1, -1, 93, -1, 93, + -1, 93, -1, -1, -1, -1, -1, -1, + -1, -1, 97, 97, 97, 97, -1, 97, + -1, -1, -1, -1, -1, -1, -1, -1, + 97, 97, 97, 97, 97, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 97, -1, + -1, -1, 97, 97, 97, 97, 84, 84, + 84, 97, 97, 97, -1, -1, -1, -1, + 97, 97, -1, 97, 97, 97, 97, 97, + -1, -1, -1, -1, -1, -1, 97, -1, + -1, -1, -1, -1, -1, -1, -1, 84, + 84, 84, 84, 84, 97, 97, 97, 97, + 105, 105, 105, 105, -1, 105, -1, -1, + -1, -1, -1, -1, -1, -1, 105, 105, + 105, 105, 105, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 105, -1, -1, -1, + 105, 105, 105, 105, -1, -1, -1, 105, + 105, 105, -1, -1, -1, -1, 105, 105, + -1, 105, 105, 105, 105, -1, -1, 93, + -1, -1, -1, -1, 105, 105, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 105, 105, 105, 105, -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, 97, 97, 97, 97, 97, + -1, 97, 97, 97, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 97, 97, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 97, -1, 97, 97, 97, 97, 97, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 105, + 97, -1, -1, -1, -1, -1, -1, -1, + -1, 105, 105, 105, 105, 105, -1, 105, + 105, 105, -1, -1, -1, -1, -1, -1, + -1, 106, 106, 106, 106, -1, 106, -1, + -1, -1, -1, -1, -1, -1, -1, 106, + 106, 106, 106, 106, -1, -1, -1, -1, + 105, 105, 105, 105, 105, 106, -1, -1, + -1, 106, 106, 106, 106, -1, -1, -1, + 106, 106, 106, -1, -1, -1, -1, 106, + 106, -1, 106, 106, 106, 106, -1, 107, + 107, 107, 107, -1, 107, 106, 106, -1, + -1, -1, -1, -1, -1, 107, 107, 107, + 107, 107, -1, 106, 106, 106, 106, -1, + -1, -1, -1, 107, -1, -1, -1, 107, + 107, 107, 107, -1, -1, -1, 107, 107, + 107, -1, -1, -1, -1, 107, 107, -1, + 107, 107, 107, 107, -1, -1, -1, -1, + -1, -1, -1, 107, 107, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 107, 107, 107, 107, -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, + 106, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 106, 106, 106, 106, 106, -1, + 106, 106, 106, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 93, 93, -1, + -1, 108, 108, 108, 108, -1, 108, -1, + -1, 106, 106, 106, 106, 106, 107, 108, + 108, 108, 108, 108, -1, -1, -1, -1, + 107, 107, 107, 107, 107, 108, 107, 107, + 107, 108, 108, 108, 108, -1, -1, -1, + 108, 108, 108, -1, -1, -1, -1, 108, + 108, -1, 108, 108, 108, 108, -1, -1, + -1, -1, -1, -1, -1, 108, 108, 107, + 107, 107, 107, 107, -1, -1, -1, -1, + -1, -1, -1, 108, 108, 108, 108, -1, + 117, 117, 117, 117, 117, 117, 117, 117, + -1, 117, -1, 117, 117, 117, 117, -1, + -1, -1, 117, 117, 117, 117, 117, -1, + -1, -1, 117, 117, 117, -1, -1, -1, + 117, -1, -1, -1, 117, 117, 117, 117, + -1, -1, -1, 117, 117, 117, -1, -1, + -1, -1, 117, 117, -1, 117, 117, 117, + 117, -1, -1, -1, -1, -1, -1, -1, + 117, -1, 117, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 117, 117, + 117, 117, -1, -1, 117, 117, -1, -1, + -1, -1, -1, 215, 215, 215, 215, -1, + 215, -1, -1, -1, -1, -1, -1, -1, + 108, 215, 215, 215, 215, 215, -1, -1, + -1, -1, 108, 108, 108, 108, 108, 215, + 108, 108, 108, 215, 215, 215, 215, -1, + -1, -1, 215, 215, 215, -1, -1, -1, + -1, 215, 215, -1, 215, 215, 215, 215, + 215, -1, -1, -1, -1, -1, -1, 215, + -1, 108, 108, 108, 108, 108, -1, -1, + -1, -1, -1, -1, -1, 215, 215, 215, + 215, -1, -1, -1, 97, 97, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 117, + -1, -1, 97, -1, -1, 117, -1, -1, + -1, -1, 117, 117, 117, 117, 117, 117, + 117, 117, -1, 117, 117, 117, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 105, 97, -1, -1, -1, -1, -1, + -1, -1, -1, 105, 105, 105, 105, 105, + -1, 105, 105, 105, 117, 117, 117, 117, + 117, -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, 105, 105, 105, 105, 105, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 215, 215, 215, 215, + 215, -1, 215, 215, 215, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 215, 215, -1, -1, -1, + -1, -1, -1, -1, 215, -1, -1, -1, + -1, -1, -1, 215, 215, 215, 215, 215, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 215, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 147, 147, 147, 147, + -1, 147, -1, -1, -1, -1, -1, -1, + -1, -1, 147, 147, 147, 147, 147, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 147, -1, -1, -1, 147, 147, 147, 147, + -1, -1, -1, 147, 147, 147, -1, -1, + -1, -1, 147, 147, -1, 147, 147, 147, + 147, -1, 106, -1, -1, -1, -1, -1, + 147, -1, -1, -1, 106, 106, 106, 106, + 106, -1, 106, 106, 106, -1, 147, 147, + 147, 147, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 147, -1, -1, -1, -1, + -1, -1, -1, 593, -1, -1, -1, -1, + -1, -1, -1, 106, 106, 106, 106, 106, + 107, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 107, 107, 107, 107, 107, -1, + 107, 107, 107, 593, 593, 593, 593, 593, + 593, 593, 593, 593, 593, 593, 593, 593, + 593, 593, -1, 593, 593, 593, 593, 593, + 593, 593, -1, -1, -1, -1, -1, -1, + -1, 107, 107, 107, 107, 107, -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, 147, 147, 147, + 147, 147, -1, 147, 147, 147, -1, -1, + -1, 594, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 147, 147, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 147, -1, 147, 147, 147, 147, + 147, 594, 594, 594, 594, 594, 594, 594, + 594, 594, 594, 594, 594, 594, 594, 594, + -1, 594, 594, 594, 594, 594, 594, 594, + -1, -1, 147, -1, -1, -1, -1, -1, + -1, -1, -1, 593, -1, 593, 593, 593, + 593, 593, 108, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 108, 108, 108, 108, + 108, -1, 108, 108, 108, -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, 108, 108, 108, 108, 108, + -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, 117, -1, -1, -1, -1, -1, 117, + -1, -1, -1, -1, 117, 117, 117, 117, + 117, 117, 117, 117, -1, 117, 117, 117, + -1, 594, -1, 594, 594, 594, 594, 594, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 117, 117, + 117, 117, 117, 118, 118, 118, 118, 118, + 118, 118, 118, 118, 118, 118, 118, 118, + 118, 118, 118, 118, 118, 118, 118, 118, + 118, 118, -1, 118, 118, 118, 118, 118, + 118, -1, 118, 118, 118, 118, -1, 118, + -1, 118, 118, 118, -1, 118, 118, 118, + 118, 118, 118, -1, 118, 118, 118, 118, + 118, 118, 118, 118, 118, 118, 118, 118, + 118, 118, 118, -1, 118, 215, 215, -1, + -1, 118, 118, 118, 118, 118, 215, -1, + 118, 118, -1, 118, 118, 118, 118, 118, + 118, 118, 118, 118, 118, 118, 118, -1, + -1, -1, -1, -1, 118, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 215, -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, 118, 118, 118, 118, -1, + -1, 118, 118, 118, 118, 118, 118, -1, + -1, -1, 118, 118, 118, 118, 118, -1, + -1, -1, -1, 118, -1, -1, -1, 118, + 118, 118, -1, 118, 118, -1, -1, 118, + -1, -1, -1, -1, -1, -1, -1, -1, + 118, 118, 118, 118, 118, -1, 118, 118, + 118, -1, -1, 118, 118, 118, 118, 118, + 118, 118, 118, -1, 118, 118, 118, -1, + -1, -1, 118, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 118, 118, -1, + -1, 118, -1, -1, -1, -1, 118, -1, + -1, -1, -1, 118, -1, 118, 118, 118, + 118, 118, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 118, -1, 118, + -1, -1, 118, 118, -1, -1, -1, 118, + -1, 118, -1, 118, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, -1, 119, 119, 119, 119, + 119, 119, -1, 119, 119, 119, 119, -1, + 119, -1, 119, 119, 119, -1, 119, 119, + 119, 119, 119, 119, -1, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 613, 119, + 119, 119, 119, -1, -1, -1, -1, -1, + -1, -1, 119, -1, -1, 119, 147, 147, + -1, -1, -1, -1, -1, -1, -1, -1, + 119, 119, 119, 119, 147, -1, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, -1, 613, 613, + 613, 613, 613, 613, 613, -1, -1, -1, + -1, -1, -1, -1, 147, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 118, -1, -1, 119, 119, 119, 119, + -1, -1, 119, 119, -1, 119, 119, 119, + -1, -1, -1, 119, 119, -1, 119, 119, + -1, -1, -1, -1, 119, -1, -1, -1, + 119, 119, 119, -1, 119, 119, -1, -1, + 119, -1, -1, -1, -1, -1, -1, -1, + -1, 119, 119, 119, 119, -1, -1, -1, + 119, 119, -1, -1, 119, 119, 119, 119, + 119, 119, 119, 119, -1, 119, 119, 119, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 613, -1, + 613, 613, 613, 613, 613, -1, 119, 119, + 119, 119, 119, -1, 120, 120, 120, 120, + 120, 120, 120, 120, -1, 120, 119, 120, + 120, 120, 120, 119, -1, -1, 120, 120, + 120, 120, 120, -1, -1, -1, 120, 120, + 120, -1, -1, -1, 120, -1, -1, -1, + 120, 120, 120, 120, -1, -1, -1, 120, + 120, 120, -1, -1, -1, -1, 120, 120, + -1, 120, 120, 120, 120, -1, -1, -1, + -1, -1, -1, -1, 120, -1, 120, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 120, 120, 120, 120, -1, -1, + 120, 120, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, -1, 127, + 127, 127, 127, 127, 127, -1, -1, -1, + 127, 127, 127, 127, 127, 127, -1, 127, + 127, 127, 127, -1, 127, -1, 127, 127, + 127, -1, 127, 127, 127, 127, 127, 127, + -1, 127, 127, 127, 127, 127, 127, 127, + 127, 127, -1, 127, 127, 127, 127, -1, + -1, -1, 119, -1, -1, -1, 127, -1, + -1, -1, -1, -1, 127, -1, -1, -1, + -1, -1, -1, 120, 127, 127, 127, 127, + -1, 120, -1, -1, -1, -1, 120, 120, + 120, 120, 120, 120, 120, 120, -1, 120, + 120, 120, -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, + 120, 120, 120, 120, 120, -1, -1, -1, + 127, 127, 127, 127, -1, -1, 127, 127, + 127, 127, 127, 127, -1, -1, -1, 127, + 127, 127, 127, 127, -1, -1, -1, -1, + 127, -1, -1, -1, 127, 127, 127, -1, + 127, 127, -1, -1, 127, -1, -1, -1, + -1, -1, -1, -1, -1, 127, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + -1, 127, 127, 127, -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, 127, 127, 127, 127, 127, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 127, -1, 127, -1, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, -1, 128, 128, + 128, 128, 128, 128, -1, 128, 128, 128, + 128, -1, 128, -1, 128, 128, 128, -1, + 128, 128, 128, 128, 128, 128, -1, 128, + 128, 128, 128, 128, 128, 128, 128, 128, + -1, 128, 128, 128, 128, -1, -1, -1, + -1, -1, -1, -1, 128, -1, -1, 128, + -1, 260, 260, 260, 260, 260, 260, -1, + -1, -1, 128, 128, 128, 128, -1, -1, + 128, 128, -1, -1, -1, -1, -1, -1, + -1, 260, 260, 260, 260, 260, 260, -1, + 260, -1, -1, -1, -1, -1, -1, -1, + 260, -1, -1, -1, -1, -1, -1, 260, + 260, -1, -1, -1, -1, 260, 260, 260, + -1, 260, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 128, 128, + 128, 128, -1, -1, 128, 128, 127, 128, + 128, 128, -1, -1, -1, 128, 128, -1, + 128, 128, -1, -1, -1, -1, 128, -1, + -1, -1, 128, 128, 128, -1, 128, 128, + -1, -1, 128, -1, -1, -1, -1, -1, + -1, -1, -1, 128, 128, 128, 128, -1, + -1, -1, 128, 128, -1, -1, 128, 128, + 128, 128, 128, 128, 128, 128, -1, 128, + 128, 128, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 260, 260, -1, -1, 260, + -1, 260, 260, -1, 260, -1, -1, -1, + 260, 260, 260, 260, 260, -1, -1, -1, + 128, 128, 128, 128, 128, 260, 260, 260, + -1, 260, 260, -1, -1, 260, -1, -1, + 128, -1, -1, -1, -1, 128, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 260, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 260, 260, -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, 260, -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, 120, -1, -1, + -1, -1, -1, 120, -1, -1, -1, -1, + 120, 120, 120, 120, 120, 120, 120, 120, + -1, 120, 120, 120, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 128, -1, -1, -1, + -1, -1, 120, 120, 120, 120, 120, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + -1, 130, 130, 130, 130, 130, 130, -1, + 130, 130, 130, 130, -1, 130, -1, 130, + 130, 130, -1, 130, 130, 130, 130, 130, + 130, 127, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, -1, 130, -1, -1, -1, -1, 130, + 130, 130, 130, 130, -1, -1, 130, 130, + -1, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, -1, -1, -1, + -1, -1, 130, -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, 130, 130, 130, 130, -1, -1, 130, + 130, 130, 130, 130, 130, -1, -1, -1, + 130, 130, 130, 130, 130, -1, -1, -1, + -1, 130, -1, -1, -1, 130, 130, 130, + -1, 130, 130, -1, -1, 130, -1, -1, + -1, -1, -1, -1, -1, -1, 130, 130, + 130, 130, 130, -1, 130, 130, 130, -1, + -1, 130, 130, 130, 130, 130, 130, 130, + 130, -1, 130, 130, 130, -1, -1, -1, + 130, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 130, 130, -1, -1, 130, + -1, -1, -1, -1, 130, -1, -1, -1, + -1, 130, -1, 130, 130, 130, 130, 130, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 130, -1, 130, -1, -1, + 130, 130, -1, -1, -1, 130, -1, 130, + -1, 130, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, -1, 131, 131, 131, + 131, -1, -1, -1, 131, 131, 131, 131, + 131, -1, -1, -1, 131, 131, 131, -1, + -1, -1, 131, -1, -1, -1, 131, 131, + 131, 131, -1, -1, -1, 131, 131, 131, + -1, -1, -1, -1, 131, 131, -1, 131, + 131, 131, 131, -1, -1, -1, -1, -1, + -1, -1, 131, -1, -1, 131, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 131, 131, 131, 131, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, -1, 132, 132, 132, + 132, 132, 132, -1, -1, -1, 132, 132, + 132, 132, 132, 132, -1, 132, 132, 132, + 132, -1, 132, -1, 132, 132, 132, 130, + 132, 132, 132, 132, 132, 132, -1, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + -1, 132, 132, 132, 132, -1, -1, -1, + -1, -1, -1, -1, 132, -1, -1, -1, + -1, -1, 132, -1, -1, -1, -1, -1, + -1, 131, 132, 132, 132, 132, -1, -1, + 131, 131, 131, -1, 131, 131, 131, 131, + 131, 131, 131, 131, -1, 131, 131, 131, + -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, 131, 131, + 131, 131, 131, -1, -1, -1, 132, 132, + 132, 132, -1, -1, 132, 132, -1, 132, + 132, 132, -1, 131, -1, 132, 132, -1, + 132, 132, -1, -1, -1, -1, 132, -1, + -1, -1, 132, 132, 132, -1, 132, 132, + -1, -1, 132, -1, -1, -1, -1, -1, + -1, -1, -1, 132, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 132, 132, 132, + 132, 132, 132, 132, 132, 132, -1, 132, + 132, 132, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 134, 134, 134, 134, + -1, 134, -1, -1, -1, -1, -1, -1, + -1, -1, 134, 134, 134, 134, 134, -1, + 132, 132, 132, 132, 132, -1, -1, -1, + 134, -1, -1, -1, 134, 134, 134, 134, + 132, -1, -1, 134, 134, 134, -1, -1, + -1, -1, 134, 134, -1, 134, 134, 134, + 134, -1, 135, 135, 135, 135, -1, 135, + 134, 134, -1, -1, -1, -1, -1, -1, + 135, 135, 135, 135, 135, -1, 134, 134, + 134, 134, -1, -1, -1, -1, 135, -1, + -1, -1, 135, 135, 135, 135, -1, -1, + -1, 135, 135, 135, -1, -1, -1, -1, + 135, 135, -1, 135, 135, 135, 135, -1, + -1, -1, -1, -1, -1, -1, 135, 135, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 135, 135, 135, 135, + -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, 134, -1, -1, -1, -1, + -1, -1, -1, -1, 132, 134, 134, 134, + 134, 134, -1, 134, 134, 134, -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, 134, 134, 134, 134, + 134, 135, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 135, 135, 135, 135, 135, + -1, 135, 135, 135, -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, 135, 135, 135, 135, 135, -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, + 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, -1, 137, + 137, 137, 137, 137, 137, -1, -1, -1, + 137, 137, 137, 137, 137, 137, -1, 137, + 137, 137, 137, -1, 137, -1, 137, 137, + 137, -1, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, -1, + -1, -1, -1, -1, -1, -1, 137, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 131, 137, 137, 137, 137, + -1, -1, -1, -1, 131, -1, 131, 131, + 131, 131, 131, 131, 131, 131, -1, 131, + 131, 131, -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, + 131, 131, 131, 131, 131, -1, -1, -1, + 137, 137, 137, 137, -1, -1, 137, 137, + 137, 137, 137, 137, -1, 131, -1, 137, + 137, 137, 137, 137, -1, 137, 137, -1, + 137, 137, -1, -1, 137, 137, 137, -1, + 137, 137, -1, -1, 137, -1, -1, -1, + -1, -1, -1, -1, -1, 137, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 132, + 137, 137, 137, 137, 137, 137, 137, 137, + -1, 137, 137, 137, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 141, 141, 141, 141, 141, 141, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 137, 137, 137, 137, 137, -1, + 141, 141, 141, 141, 141, 141, -1, 141, + -1, -1, 137, -1, 137, 137, -1, 141, + -1, -1, -1, -1, -1, -1, 141, 141, + -1, -1, -1, -1, 141, 141, 141, -1, + 141, -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, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 141, 141, -1, -1, 141, -1, + 141, 141, -1, 141, -1, -1, -1, 141, + 141, 141, 141, 141, -1, -1, -1, -1, + -1, -1, -1, -1, 141, 141, 141, -1, + 141, 141, -1, -1, 141, 134, -1, -1, + -1, -1, -1, -1, -1, -1, 137, 134, + 134, 134, 134, 134, -1, 134, 134, 134, + 141, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 141, 141, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 134, 134, + 134, 134, 134, 135, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 135, 135, 135, + 135, 135, -1, 135, 135, 135, -1, -1, + -1, -1, -1, -1, 141, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 135, 135, 135, 135, + 135, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, -1, + 138, 138, 138, 138, 138, 138, -1, -1, + -1, 138, 138, 138, 138, 138, 138, -1, + 138, 138, 138, 138, -1, 138, -1, 138, + 138, 138, -1, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, + -1, -1, -1, -1, -1, -1, -1, 138, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 138, 138, 138, + 138, -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, 138, 138, 138, 138, -1, -1, 138, + 138, 138, 138, 138, 138, -1, -1, -1, + 138, 138, 138, 138, 138, -1, 138, 138, + -1, 138, 138, -1, -1, 138, 138, 138, + -1, 138, 138, -1, -1, 138, -1, -1, + -1, -1, -1, -1, -1, -1, 138, -1, + -1, -1, -1, -1, -1, -1, -1, 137, + 137, 138, 138, 138, 138, 138, 138, 138, + 138, -1, 138, 138, 138, -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, 138, 138, 138, 138, 138, + -1, 153, 153, 153, 153, -1, 153, -1, + -1, -1, -1, 138, -1, 138, 138, 153, + 153, 153, 153, 153, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 153, -1, -1, + -1, 153, 153, 153, 153, -1, -1, -1, + 153, 153, 153, -1, -1, -1, -1, 153, + 153, -1, 153, 153, 153, 153, 153, -1, + -1, -1, -1, -1, -1, 153, -1, -1, + -1, 155, 155, 155, 155, -1, 155, -1, + -1, -1, -1, 153, 153, 153, 153, 155, + 155, 155, 155, 155, -1, -1, -1, -1, + 153, -1, -1, -1, -1, 155, -1, -1, + -1, 155, 155, 155, 155, -1, -1, -1, + 155, 155, 155, -1, -1, -1, -1, 155, + 155, -1, 155, 155, 155, 155, -1, -1, + -1, -1, -1, -1, -1, 155, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 155, 155, 155, 155, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 141, 141, -1, -1, + 141, -1, 141, 141, -1, 141, -1, 138, + -1, 141, 141, 141, 141, 141, -1, -1, + -1, -1, -1, -1, -1, -1, 141, 141, + 141, -1, 141, 141, -1, -1, 141, -1, + -1, -1, 153, 153, 153, 153, 153, -1, + 153, 153, 153, -1, -1, -1, -1, -1, + -1, -1, 141, -1, -1, -1, -1, -1, + -1, 153, 153, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 153, + -1, 153, 153, 153, 153, 153, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 155, 155, 155, 155, 155, 153, + 155, 155, 155, -1, -1, -1, 141, -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, 155, 155, 155, 155, 155, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, -1, 157, 157, + 157, 157, 157, 157, -1, 157, 157, 157, + 157, -1, 157, -1, 157, 157, 157, -1, + 157, 157, 157, 157, 157, 157, -1, 157, + 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, -1, 157, + -1, -1, -1, -1, 157, 157, 157, 157, + 157, -1, -1, 157, 157, -1, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, -1, -1, -1, -1, -1, 157, + -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, 157, 157, + 157, 157, -1, -1, 157, 157, 157, 157, + 157, 157, -1, -1, -1, 157, 157, 157, + 157, 157, -1, -1, -1, -1, 157, -1, + -1, -1, 157, 157, 157, -1, 157, 157, + -1, -1, 157, -1, -1, -1, -1, -1, + -1, -1, -1, 157, 157, 157, 157, 157, + -1, 157, 157, 157, -1, -1, 157, 157, + 157, 157, 157, 157, 157, 157, -1, 157, + 157, 157, -1, -1, -1, 157, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 157, 157, -1, -1, 157, -1, -1, -1, + -1, 157, -1, -1, -1, -1, 157, -1, + 157, 157, 157, 157, 157, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 157, -1, 157, -1, -1, 157, 157, -1, + -1, -1, 157, -1, 157, -1, 157, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 170, 170, 170, 170, -1, 170, -1, -1, + -1, -1, -1, -1, -1, -1, 170, 170, + 170, 170, 170, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 170, -1, -1, -1, + 170, 170, 170, 170, -1, -1, -1, 170, + 170, 170, -1, -1, -1, -1, 170, 170, + -1, 170, 170, 170, 170, -1, -1, -1, + -1, -1, -1, -1, 170, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 170, 170, 170, 170, -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, 157, -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, 153, 153, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 153, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 170, 170, 170, -1, 170, + 170, 170, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 155, 155, 155, 155, + 155, 153, 155, 155, 155, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 170, 170, 170, 170, 170, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 155, 155, 155, 155, 155, + 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, -1, + 158, 158, 158, 158, 158, 158, -1, 158, + 158, 158, 158, -1, 158, -1, 158, 158, + 158, -1, 158, 158, 158, 158, 158, 158, + -1, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, + -1, 158, -1, -1, -1, -1, 158, 158, + 158, 158, 158, -1, -1, 158, 158, -1, + 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, -1, -1, -1, -1, + -1, 158, -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, + 158, 158, 158, 158, -1, -1, 158, 158, + 158, 158, 158, 158, -1, -1, -1, 158, + 158, 158, 158, 158, -1, -1, -1, -1, + 158, -1, -1, -1, 158, 158, 158, -1, + 158, 158, -1, -1, 158, -1, -1, -1, + -1, -1, -1, -1, -1, 158, 158, 158, + 158, 158, -1, 158, 158, 158, -1, -1, + 158, 158, 158, 158, 158, 158, 158, 158, + -1, 158, 158, 158, -1, -1, -1, 158, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 158, 158, -1, -1, 158, -1, + -1, -1, -1, 158, -1, -1, -1, -1, + 158, -1, 158, 158, 158, 158, 158, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 158, -1, 158, -1, -1, 158, + 158, -1, -1, -1, 158, -1, 158, -1, + 158, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, + -1, 159, 159, 159, 159, 159, 159, -1, + 159, 159, 159, 159, -1, 159, -1, 159, + 159, 159, -1, 159, 159, 159, 159, 159, + 159, -1, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, + 159, -1, 159, -1, -1, -1, -1, 159, + 159, 159, 159, 159, -1, -1, 159, 159, + -1, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, -1, -1, -1, + -1, -1, 159, -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, 158, -1, + -1, 159, 159, 159, 159, -1, -1, 159, + 159, 159, 159, 159, 159, -1, -1, -1, + 159, 159, 159, 159, 159, -1, -1, -1, + -1, 159, -1, -1, -1, 159, 159, 159, + -1, 159, 159, -1, -1, 159, -1, -1, + -1, -1, -1, -1, -1, -1, 159, 159, + 159, 159, 159, -1, 159, 159, 159, -1, + -1, 159, 159, 159, 159, 159, 159, 159, + 159, -1, 159, 159, 159, 170, 170, 170, + 159, 170, 170, 170, -1, -1, -1, -1, + -1, -1, -1, 159, 159, -1, -1, 159, + -1, -1, -1, -1, 159, -1, -1, -1, + -1, 159, -1, 159, 159, 159, 159, 159, + -1, -1, 170, 170, 170, 170, 170, -1, + -1, -1, -1, 159, -1, 159, -1, -1, + 159, 159, -1, -1, -1, 159, -1, 159, + -1, 159, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, -1, 160, 160, 160, 160, 160, 160, + -1, 160, 160, 160, 160, -1, 160, -1, + 160, 160, 160, -1, 160, 160, 160, 160, + 160, 160, -1, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, -1, 160, -1, -1, -1, -1, + 160, 160, 160, 160, 160, -1, -1, 160, + 160, -1, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, -1, -1, + -1, -1, -1, 160, -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, 159, + -1, -1, 160, 160, 160, 160, -1, -1, + 160, 160, 160, 160, 160, 160, -1, -1, + -1, 160, 160, 160, 160, 160, -1, -1, + -1, -1, 160, -1, -1, -1, 160, 160, + 160, -1, 160, 160, -1, -1, 160, -1, + -1, -1, -1, -1, -1, -1, -1, 160, + 160, 160, 160, 160, -1, 160, 160, 160, + -1, -1, 160, 160, 160, 160, 160, 160, + 160, 160, -1, 160, 160, 160, -1, -1, + -1, 160, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 160, 160, -1, -1, + 160, -1, -1, -1, -1, 160, -1, -1, + -1, -1, 160, -1, 160, 160, 160, 160, + 160, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 160, -1, 160, -1, + -1, 160, 160, -1, -1, -1, 160, -1, + 160, -1, 160, 162, 162, 162, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 162, + 162, -1, 162, 162, 162, 162, 162, 162, + -1, -1, -1, 162, 162, 162, 162, 162, + 162, -1, 162, 162, 162, 162, -1, 162, + -1, 162, 162, 162, -1, 162, 162, 162, + 162, 162, 162, -1, 162, 162, 162, 162, + 162, 162, 162, 162, 162, -1, 162, 162, + 162, 162, -1, -1, -1, -1, -1, -1, + -1, 162, -1, -1, -1, -1, -1, -1, + -1, -1, 162, -1, -1, -1, -1, 162, + 162, 162, 162, -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, + 160, -1, -1, 162, 162, 162, 162, -1, + -1, 162, 162, 162, 162, 162, 162, -1, + -1, -1, 162, 162, 162, 162, 162, -1, + -1, -1, -1, 162, 162, -1, -1, 162, + 162, 162, -1, 162, 162, -1, -1, 162, + -1, -1, -1, -1, -1, -1, -1, -1, + 162, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 162, 162, 162, 162, 162, + 162, 162, 162, -1, 162, 162, 162, -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, 162, 162, 162, + 162, 162, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 162, -1, 162, + 162, -1, -1, -1, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 163, + 163, 163, -1, 163, 163, 163, 163, 163, + 163, -1, -1, -1, 163, 163, 163, 163, + 163, 163, -1, 163, 163, 163, 163, -1, + 163, -1, 163, 163, 163, -1, 163, 163, + 163, 163, 163, 163, -1, 163, 163, 163, + 163, 163, 163, 163, 163, 163, -1, 163, + 163, 163, 163, -1, -1, -1, -1, -1, + -1, -1, 163, -1, -1, -1, -1, -1, + -1, -1, -1, 163, -1, -1, -1, -1, + 163, 163, 163, 163, -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, 163, 163, 163, 163, + -1, 162, 163, 163, 163, 163, 163, 163, + -1, -1, -1, 163, 163, 163, 163, 163, + -1, -1, -1, -1, 163, 163, -1, -1, + 163, 163, 163, -1, 163, 163, -1, -1, + 163, -1, -1, -1, -1, -1, -1, -1, + -1, 163, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 163, 163, 163, 163, + 163, 163, 163, 163, -1, 163, 163, 163, + -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, 163, 163, + 163, 163, 163, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 163, -1, + 163, 163, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, -1, 166, 166, 166, 166, 166, 166, + -1, 166, 166, 166, 166, -1, 166, -1, + 166, 166, 166, -1, 166, 166, 166, 166, + 166, 166, -1, 166, 166, 166, 166, 166, + 166, 166, 166, 166, -1, 166, 166, 166, + 166, -1, -1, -1, -1, -1, -1, -1, + 166, -1, -1, 166, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 166, 166, + 166, 166, -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, 166, 166, 166, 166, -1, -1, + 166, 166, 163, 166, 166, 166, -1, -1, + -1, 166, 166, -1, 166, 166, -1, -1, + -1, -1, 166, -1, -1, -1, 166, 166, + 166, -1, 166, 166, -1, -1, 166, -1, + -1, -1, -1, -1, -1, -1, -1, 166, + 166, 166, 166, -1, -1, -1, 166, 166, + -1, -1, 166, 166, 166, 166, 166, 166, + 166, 166, -1, 166, 166, 166, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 167, 167, 167, 167, -1, + 167, -1, -1, -1, 166, 166, 166, 166, + 166, 167, 167, 167, 167, 167, -1, -1, + -1, -1, -1, -1, 166, -1, -1, 167, + -1, 166, -1, 167, 167, 167, 167, -1, + -1, -1, 167, 167, 167, -1, -1, -1, + -1, 167, 167, -1, 167, 167, 167, 167, + 168, 168, 168, 168, -1, 168, -1, 167, + -1, -1, -1, -1, -1, -1, 168, 168, + 168, 168, 168, -1, -1, 167, 167, 167, + 167, -1, -1, -1, 168, -1, -1, -1, + 168, 168, 168, 168, -1, -1, -1, 168, + 168, 168, -1, -1, -1, -1, 168, 168, + -1, 168, 168, 168, 168, -1, -1, -1, + -1, -1, -1, -1, 168, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 168, 168, 168, 168, -1, -1, + -1, -1, -1, -1, -1, 169, 169, 169, + 169, -1, 169, -1, -1, -1, -1, -1, + -1, -1, -1, 169, 169, 169, 169, 169, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 169, -1, -1, -1, 169, 169, 169, + 169, -1, -1, -1, 169, 169, 169, -1, + 166, -1, -1, 169, 169, -1, 169, 169, + 169, 169, -1, -1, 167, 167, 167, 167, + 167, 169, 167, 167, 167, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 169, + 169, 169, 169, -1, -1, -1, -1, -1, + -1, -1, 171, 171, 171, 171, -1, 171, + -1, -1, -1, 167, 167, 167, 167, 167, + 171, 171, 171, 171, 171, -1, -1, -1, + -1, -1, 168, 168, 168, 168, 171, 168, + 168, 168, 171, 171, 171, 171, -1, -1, + -1, 171, 171, 171, -1, -1, -1, -1, + 171, 171, -1, 171, 171, 171, 171, 172, + 172, 172, 172, -1, 172, -1, 171, -1, + 168, 168, 168, 168, 168, 172, 172, 172, + 172, 172, -1, -1, 171, 171, 171, 171, + -1, -1, -1, 172, -1, -1, -1, 172, + 172, 172, 172, -1, -1, -1, 172, 172, + 172, -1, -1, -1, -1, 172, 172, -1, + 172, 172, 172, 172, -1, -1, -1, 169, + 169, 169, 169, 172, 169, 169, 169, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 172, 172, 172, 172, -1, -1, -1, + -1, -1, -1, -1, 173, 173, 173, 173, + -1, 173, -1, -1, -1, 169, 169, 169, + 169, 169, 173, 173, 173, 173, 173, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 173, -1, -1, -1, 173, 173, 173, 173, + -1, -1, -1, 173, 173, 173, -1, -1, + -1, -1, 173, 173, -1, 173, 173, 173, + 173, -1, -1, -1, -1, 171, 171, 171, + 173, 171, 171, 171, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 173, 173, + 173, 173, -1, -1, -1, -1, -1, -1, + -1, 174, 174, 174, 174, -1, 174, -1, + -1, -1, 171, 171, 171, 171, 171, 174, + 174, 174, 174, 174, -1, -1, -1, -1, + -1, -1, 172, 172, 172, 174, 172, 172, + 172, 174, 174, 174, 174, -1, -1, -1, + 174, 174, 174, -1, -1, -1, -1, 174, + 174, -1, 174, 174, 174, 174, 175, 175, + 175, 175, -1, 175, -1, 174, -1, 172, + 172, 172, 172, 172, 175, 175, 175, 175, + 175, -1, -1, 174, 174, 174, 174, -1, + -1, -1, 175, -1, -1, -1, 175, 175, + 175, 175, -1, -1, -1, 175, 175, 175, + -1, -1, -1, -1, 175, 175, -1, 175, + 175, 175, 175, -1, -1, -1, -1, 173, + 173, 173, 175, 173, 173, 173, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 175, 175, 175, 175, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 173, 173, 173, 173, + 173, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 176, 176, 176, 176, -1, + 176, -1, -1, -1, -1, -1, -1, -1, + -1, 176, 176, 176, 176, 176, -1, -1, + -1, -1, -1, -1, 174, 174, 174, 176, + 174, 174, 174, 176, 176, 176, 176, -1, + -1, -1, 176, 176, 176, -1, -1, -1, + -1, 176, 176, -1, 176, 176, 176, 176, + -1, -1, -1, -1, -1, -1, -1, 176, + -1, 174, 174, 174, 174, 174, -1, -1, + -1, -1, -1, -1, -1, 176, 176, 176, + 176, 175, 175, 175, -1, 175, 175, 175, + -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, 175, 175, + 175, 175, 175, -1, -1, -1, 167, 167, + 167, 167, 167, -1, 167, 167, 167, -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, 167, 167, 167, + 167, 167, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 168, 168, 168, 168, + -1, 168, 168, 168, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 176, + 176, -1, 176, 176, 176, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 168, 168, 168, 168, 168, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 176, 176, 176, 176, 176, + -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, 169, 169, 169, 169, -1, 169, 169, + 169, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 177, 177, 177, 177, + -1, 177, -1, -1, -1, -1, -1, -1, + -1, -1, 177, 177, 177, 177, 177, 169, + 169, 169, 169, 169, -1, -1, -1, -1, + 177, -1, -1, -1, 177, 177, 177, 177, + -1, -1, -1, 177, 177, 177, -1, -1, + -1, -1, 177, 177, -1, 177, 177, 177, + 177, -1, -1, -1, -1, -1, -1, -1, + 177, -1, -1, -1, -1, -1, -1, 171, + 171, 171, -1, 171, 171, 171, 177, 177, + 177, 177, -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, 171, 171, 171, 171, + 171, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 172, 172, 172, -1, + 172, 172, 172, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 178, 178, + 178, 178, -1, 178, -1, -1, -1, -1, + -1, -1, -1, -1, 178, 178, 178, 178, + 178, 172, 172, 172, 172, 172, -1, -1, + -1, -1, 178, -1, -1, -1, 178, 178, + 178, 178, -1, -1, -1, 178, 178, 178, + -1, -1, -1, -1, 178, 178, -1, 178, + 178, 178, 178, -1, -1, -1, -1, -1, + 177, 177, 178, 177, 177, 177, -1, -1, + -1, 173, 173, 173, -1, 173, 173, 173, + 178, 178, 178, 178, -1, -1, -1, -1, + -1, -1, -1, 179, 179, 179, 179, -1, + 179, -1, -1, -1, 177, 177, 177, 177, + 177, 179, 179, 179, 179, 179, 173, 173, + 173, 173, 173, -1, -1, -1, -1, 179, + -1, -1, -1, 179, 179, 179, 179, -1, + -1, -1, 179, 179, 179, -1, -1, -1, + -1, 179, 179, -1, 179, 179, 179, 179, + -1, -1, -1, -1, -1, -1, -1, 179, + -1, -1, -1, -1, -1, -1, 174, 174, + 174, -1, 174, 174, 174, 179, 179, 179, + 179, -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, 174, 174, 174, 174, 174, + -1, -1, -1, 178, -1, 178, 178, 178, + -1, -1, -1, 175, 175, 175, -1, 175, + 175, 175, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 178, 178, + 178, 178, 178, -1, -1, -1, -1, -1, + 175, 175, 175, 175, 175, -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, + 179, -1, 179, 179, 179, -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, 179, 179, 179, 179, 179, + -1, 176, 176, -1, 176, 176, 176, -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, 176, 176, 176, + 176, 176, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 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, -1, + 181, 181, 181, 181, 181, 181, -1, 181, + 181, 181, -1, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 181, -1, 181, 181, 181, 181, + -1, -1, -1, -1, 181, -1, -1, 181, + 181, -1, 181, 181, 181, 181, -1, -1, + -1, -1, 181, -1, -1, 181, 181, 181, + 181, 181, -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, 181, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 181, 181, 181, 181, -1, -1, 181, + 181, 181, 181, 181, 181, -1, 181, 181, + 181, 181, 181, 181, 181, -1, -1, 181, + -1, 181, 181, -1, 181, 181, 181, 181, + -1, 181, 181, -1, -1, 181, -1, -1, + -1, -1, -1, 181, -1, 181, 181, 181, + 181, 181, -1, -1, -1, 181, 181, -1, + 181, 181, 181, 181, 181, 181, 181, 181, + 181, -1, 181, 181, 181, 181, -1, 181, + -1, -1, 177, 177, -1, 177, 177, 177, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 181, 181, 181, -1, -1, 181, 181, + 181, -1, -1, 181, 181, 181, 181, 181, + -1, -1, -1, -1, -1, -1, 177, 177, + 177, 177, 177, 181, -1, 181, 181, 181, + 181, -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, -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, 178, -1, 178, + 178, 178, -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, + 178, 178, 178, 178, 178, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 181, + -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, 179, -1, 179, 179, 179, -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, 179, 179, 179, + 179, 179, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, + 182, -1, 182, 182, 182, 182, 182, 182, + -1, 182, 182, 182, 182, -1, 182, -1, + 182, 182, 182, -1, 182, 182, 182, 182, + 182, 182, -1, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, -1, 182, -1, -1, -1, -1, + 182, 182, 182, 182, 182, -1, -1, 182, + 182, -1, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, -1, -1, + -1, -1, -1, 182, -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, 182, 182, 182, 182, -1, -1, + 182, 182, 182, 182, 182, 182, -1, -1, + -1, 182, 182, 182, 182, 182, -1, -1, + -1, -1, 182, -1, -1, -1, 182, 182, + 182, -1, 182, 182, -1, -1, 182, -1, + -1, -1, -1, -1, -1, -1, -1, 182, + 182, 182, 182, 182, -1, 182, 182, 182, + -1, -1, 182, 182, 182, 182, 182, 182, + 182, 182, -1, 182, 182, 182, -1, -1, + -1, 182, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 182, 182, -1, -1, + 182, -1, -1, -1, -1, 182, -1, -1, + -1, -1, 182, -1, 182, 182, 182, 182, + 182, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 182, -1, 182, -1, + -1, 182, 182, -1, -1, -1, 182, -1, + 182, -1, 182, 183, 183, 183, 183, 181, + 183, -1, -1, -1, -1, -1, -1, -1, + -1, 183, 183, 183, 183, 183, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 183, + -1, -1, -1, 183, 183, 183, 183, -1, + -1, -1, 183, 183, 183, -1, -1, -1, + -1, 183, 183, -1, 183, 183, 183, 183, + -1, 184, 184, 184, 184, -1, 184, 183, + -1, -1, -1, -1, -1, -1, -1, 184, + 184, 184, 184, 184, -1, 183, 183, 183, + 183, -1, -1, -1, -1, 184, -1, -1, + -1, 184, 184, 184, 184, -1, -1, -1, + 184, 184, 184, -1, -1, -1, -1, 184, + 184, -1, 184, 184, 184, 184, -1, -1, + -1, -1, -1, -1, -1, 184, 184, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 184, 184, 184, 184, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 182, -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, 183, 183, 183, 183, + 183, -1, 183, 183, 183, -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, 183, 183, 183, 183, 183, + 184, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 184, 184, 184, 184, 184, -1, + 184, 184, 184, -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, 184, 184, 184, 184, 184, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, -1, 185, 185, + 185, 185, 185, 185, -1, 185, 185, 185, + 185, -1, 185, -1, 185, 185, 185, -1, + 185, 185, 185, 185, 185, 185, -1, 185, + 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, -1, 185, + -1, -1, 185, 185, 185, 185, 185, 185, + 185, -1, 185, 185, 185, -1, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, -1, -1, -1, -1, -1, 185, + -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, 185, 185, + 185, 185, -1, -1, 185, 185, 185, 185, + 185, 185, -1, -1, -1, 185, 185, 185, + 185, 185, -1, -1, -1, -1, 185, -1, + -1, -1, 185, 185, 185, -1, 185, 185, + -1, -1, 185, -1, -1, -1, -1, -1, + -1, -1, -1, 185, 185, 185, 185, 185, + -1, 185, 185, 185, -1, -1, 185, 185, + 185, 185, 185, 185, 185, 185, -1, 185, + 185, 185, -1, -1, -1, 185, -1, -1, + -1, -1, -1, -1, -1, 185, 185, 185, + 185, 185, -1, -1, 185, -1, -1, -1, + -1, 185, -1, 185, 185, 185, 185, -1, + 185, 185, 185, 185, 185, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 185, -1, 185, -1, -1, 185, 185, -1, + -1, -1, 185, -1, 185, -1, 185, -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, 194, 194, 194, 194, -1, 194, + -1, -1, -1, -1, -1, -1, -1, -1, + 194, 194, 194, 194, 194, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 194, -1, + -1, -1, 194, 194, 194, 194, -1, -1, + -1, 194, 194, 194, -1, -1, -1, -1, + 194, 194, -1, 194, 194, 194, 194, -1, + -1, -1, -1, -1, -1, -1, 194, 194, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 194, 194, 194, 194, + -1, -1, 194, 194, -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, 185, -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, 183, 183, + 183, 183, 183, -1, 183, 183, 183, -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, 194, -1, -1, -1, 183, 183, 183, + 183, 183, 184, 194, 194, 194, 194, 194, + -1, 194, 194, 194, 184, 184, 184, 184, + 184, -1, 184, 184, 184, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 194, 194, 194, 194, 194, -1, + -1, -1, -1, 184, 184, 184, 184, 184, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, -1, 188, + 188, 188, 188, 188, 188, -1, -1, -1, + 188, 188, 188, 188, 188, 188, -1, 188, + 188, 188, 188, -1, 188, -1, 188, 188, + 188, -1, 188, 188, 188, 188, 188, 188, + -1, 188, 188, 188, 188, 188, 188, 188, + 188, 188, -1, 188, 188, 188, 188, -1, + -1, -1, -1, -1, -1, -1, 188, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 188, 188, 188, 188, + -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, + 188, 188, 188, 188, -1, -1, 188, 188, + 188, 188, 188, 188, -1, -1, -1, 188, + 188, 188, 188, 188, -1, -1, -1, -1, + 188, 188, -1, -1, 188, 188, 188, -1, + 188, 188, -1, -1, 188, -1, -1, -1, + -1, -1, -1, -1, -1, 188, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 188, 188, 188, 188, 188, 188, 188, 188, + -1, 188, 188, 188, -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, 188, 188, 188, 188, 188, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 188, -1, 188, 188, -1, -1, + -1, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, -1, + 190, 190, 190, 190, 190, 190, -1, -1, + -1, 190, 190, 190, 190, 190, 190, -1, + 190, 190, 190, 190, -1, 190, -1, 190, + 190, 190, -1, 190, 190, 190, 190, 190, + 190, -1, 190, 190, 190, 190, 190, 190, + 190, 190, 190, -1, 190, 190, 190, 190, + -1, -1, -1, -1, -1, -1, -1, 190, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 190, 190, 190, + 190, -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, 190, 190, 190, 190, -1, 188, 190, + 190, 190, 190, 190, 190, -1, -1, -1, + 190, 190, 190, 190, 190, -1, -1, -1, + -1, 190, 190, -1, -1, 190, 190, 190, + -1, 190, 190, -1, -1, 190, -1, -1, + -1, -1, -1, -1, -1, -1, 190, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 190, 190, 190, 190, 190, 190, 190, + 190, -1, 190, 190, 190, -1, -1, -1, + -1, -1, -1, 194, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 194, 194, 194, + 194, 194, -1, 194, 194, 194, -1, -1, + -1, -1, -1, 190, 190, 190, 190, 190, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 190, -1, 190, 190, -1, + -1, -1, -1, -1, 194, 194, 194, 194, + 194, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, + -1, 202, 202, 202, 202, 202, 202, -1, + 202, 202, 202, 202, -1, 202, -1, 202, + 202, 202, -1, 202, 202, 202, 202, 202, + 202, -1, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, + 202, -1, 202, -1, -1, -1, -1, 202, + 202, 202, 202, 202, -1, -1, 202, 202, + -1, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, -1, -1, -1, + -1, -1, 202, -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, 190, + -1, 202, 202, 202, 202, -1, -1, 202, + 202, 202, 202, 202, 202, -1, -1, -1, + 202, 202, 202, 202, 202, -1, -1, -1, + -1, 202, -1, -1, -1, 202, 202, 202, + -1, 202, 202, -1, -1, 202, -1, -1, + -1, -1, -1, -1, -1, -1, 202, 202, + 202, 202, 202, -1, 202, 202, 202, -1, + -1, 202, 202, 202, 202, 202, 202, 202, + 202, -1, 202, 202, 202, -1, -1, -1, + 202, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 202, 202, -1, -1, 202, + -1, -1, -1, -1, 202, -1, -1, -1, + -1, 202, -1, 202, 202, 202, 202, 202, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 202, -1, 202, -1, -1, + 202, 202, -1, -1, -1, 202, -1, 202, + -1, 202, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, + 203, -1, 203, 203, 203, 203, 203, 203, + -1, 203, 203, 203, 203, -1, 203, -1, + 203, 203, 203, -1, 203, 203, 203, 203, + 203, 203, -1, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, -1, 203, -1, -1, -1, -1, + 203, 203, 203, 203, 203, -1, -1, 203, + 203, -1, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, -1, -1, + -1, -1, -1, 203, -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, 202, + -1, -1, 203, 203, 203, 203, -1, -1, + 203, 203, 203, 203, 203, 203, -1, -1, + -1, 203, 203, 203, 203, 203, -1, -1, + -1, -1, 203, -1, -1, -1, 203, 203, + 203, -1, 203, 203, -1, -1, 203, -1, + -1, -1, -1, -1, -1, -1, -1, 203, + 203, 203, 203, 203, -1, 203, 203, 203, + 203, -1, 203, 203, 203, 203, 203, 203, + 203, 203, -1, 203, 203, 203, -1, -1, + -1, 203, -1, -1, -1, -1, -1, -1, + -1, 203, -1, -1, 203, 203, -1, -1, + 203, -1, -1, -1, -1, 203, -1, -1, + -1, -1, 203, -1, 203, 203, 203, 203, + 203, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 203, -1, 203, -1, + -1, 203, 203, -1, -1, -1, 203, -1, + 203, -1, 203, 204, 204, 204, 204, 204, + 204, 204, 204, 204, 204, 204, 204, 204, + 204, 204, 204, 204, 204, 204, 204, 204, + 204, 204, -1, 204, 204, 204, 204, 204, + 204, -1, 204, 204, 204, 204, -1, 204, + -1, 204, 204, 204, -1, 204, 204, 204, + 204, 204, 204, -1, 204, 204, 204, 204, + 204, 204, 204, 204, 204, 204, 204, 204, + 204, 204, 204, -1, 204, -1, -1, -1, + -1, 204, 204, 204, 204, 204, -1, -1, + 204, 204, -1, 204, 204, 204, 204, 204, + 204, 204, 204, 204, 204, 204, 204, -1, + -1, -1, -1, -1, 204, -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, + 203, -1, -1, 204, 204, 204, 204, -1, + -1, 204, 204, 204, 204, 204, 204, -1, + -1, -1, 204, 204, 204, 204, 204, -1, + -1, -1, -1, 204, -1, -1, -1, 204, + 204, 204, -1, 204, 204, -1, -1, 204, + -1, -1, -1, -1, -1, -1, -1, -1, + 204, 204, 204, 204, 204, -1, 204, 204, + 204, 204, -1, 204, 204, 204, 204, 204, + 204, 204, 204, -1, 204, 204, 204, -1, + -1, -1, 204, -1, -1, -1, -1, -1, + -1, -1, 204, -1, -1, 204, 204, -1, + -1, 204, -1, -1, -1, -1, 204, -1, + -1, -1, -1, 204, -1, 204, 204, 204, + 204, 204, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 204, -1, 204, + -1, -1, 204, 204, -1, -1, -1, 204, + -1, 204, -1, 204, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, -1, 209, 209, 209, 209, + 209, 209, -1, 209, 209, 209, 209, -1, + 209, -1, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, -1, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, -1, 209, -1, -1, + 209, -1, 209, 209, 209, 209, 209, -1, + -1, 209, 209, -1, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, + -1, -1, -1, -1, -1, 209, -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, 204, -1, -1, 209, 209, 209, 209, + -1, -1, 209, 209, 209, 209, 209, 209, + -1, -1, -1, 209, 209, 209, 209, 209, + -1, -1, -1, -1, 209, -1, -1, -1, + 209, 209, 209, -1, 209, 209, -1, -1, + 209, -1, -1, -1, -1, -1, -1, -1, + -1, 209, 209, 209, 209, 209, -1, 209, + 209, 209, -1, -1, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, + -1, -1, -1, 209, -1, -1, -1, -1, + -1, -1, -1, 203, -1, -1, 209, 209, + -1, -1, 209, -1, -1, -1, -1, 209, + -1, -1, -1, -1, 209, -1, 209, 209, + 209, 209, 209, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 209, -1, + 209, -1, -1, 209, 209, -1, -1, -1, + 209, -1, 209, -1, 209, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, -1, 210, 210, 210, + 210, 210, 210, -1, 210, 210, 210, 210, + -1, 210, -1, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, -1, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, -1, 210, -1, + -1, 210, -1, 210, 210, 210, 210, 210, + -1, -1, 210, 210, -1, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, + 210, -1, -1, -1, -1, -1, 210, -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, 209, -1, -1, 210, 210, 210, + 210, -1, -1, 210, 210, 210, 210, 210, + 210, -1, -1, -1, 210, 210, 210, 210, + 210, -1, -1, -1, -1, 210, -1, -1, + -1, 210, 210, 210, -1, 210, 210, -1, + -1, 210, -1, -1, -1, -1, -1, -1, + -1, -1, 210, 210, 210, 210, 210, -1, + 210, 210, 210, -1, -1, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, + 210, -1, -1, -1, 210, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 210, + 210, -1, -1, 210, -1, -1, -1, -1, + 210, -1, -1, -1, -1, 210, -1, 210, + 210, 210, 210, 210, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 210, + -1, 210, -1, -1, 210, 210, -1, -1, + -1, 210, -1, 210, -1, 210, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 211, + 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, 211, 211, 211, -1, 211, + 211, 211, 211, 211, 211, -1, 211, 211, + 211, 211, -1, 211, -1, 211, 211, 211, + 211, 211, 211, 211, 211, 211, 211, -1, + 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, 211, 211, 211, 211, -1, + 211, -1, -1, 211, -1, 211, 211, 211, + 211, 211, -1, -1, 211, 211, -1, 211, + 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, -1, -1, -1, -1, -1, + 211, -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, 210, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 211, + 211, 211, 211, -1, -1, 211, 211, 211, + 211, 211, 211, -1, -1, -1, 211, 211, + 211, 211, 211, -1, -1, -1, -1, 211, + -1, -1, -1, 211, 211, 211, -1, 211, + 211, -1, -1, 211, -1, -1, -1, -1, + -1, -1, -1, -1, 211, 211, 211, 211, + 211, -1, 211, 211, 211, -1, 209, 211, + 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, -1, -1, -1, 211, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 211, 211, -1, -1, 211, -1, -1, + -1, -1, 211, -1, 211, 211, -1, 211, + -1, 211, 211, 211, 211, 211, -1, -1, + 217, 217, 217, 217, 217, 217, -1, -1, + -1, 211, -1, 211, -1, -1, 211, 211, + 217, -1, -1, 211, -1, 211, -1, 211, + 217, 217, 217, 217, 217, 217, -1, 217, + -1, -1, -1, -1, 217, -1, -1, 217, + -1, -1, -1, -1, -1, -1, 217, 217, + -1, -1, -1, -1, 217, 217, 217, 217, + 217, 218, 218, 218, 218, 218, 218, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 218, -1, -1, -1, -1, -1, -1, + -1, 218, 218, 218, 218, 218, 218, -1, + 218, -1, -1, -1, -1, 218, -1, -1, + 218, -1, -1, -1, -1, -1, -1, 218, + 218, -1, -1, -1, -1, 218, 218, 218, + 218, 218, -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, 217, 217, 217, -1, -1, 217, 217, + -1, -1, -1, 217, -1, -1, -1, 217, + 217, -1, 217, 217, -1, 211, -1, -1, + 217, 217, -1, -1, 217, 217, 217, -1, + 217, 217, -1, -1, 217, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 218, 218, 218, -1, -1, 218, + 218, -1, 217, 217, 218, -1, -1, -1, + 218, 218, -1, 218, 218, -1, -1, -1, + -1, 218, 218, -1, -1, 218, 218, 218, + -1, 218, 218, -1, -1, 218, -1, -1, + -1, -1, -1, -1, -1, -1, 219, 219, + 219, 219, 219, 219, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 217, 219, -1, + -1, -1, -1, 218, 218, -1, 219, 219, + 219, 219, 219, 219, -1, 219, -1, -1, + -1, -1, 219, -1, -1, 219, -1, -1, + -1, -1, -1, -1, 219, 219, -1, -1, + -1, -1, 219, 219, 219, 219, 219, 220, + 220, 220, 220, 220, 220, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 218, 220, + -1, -1, -1, -1, -1, -1, -1, 220, + 220, 220, 220, 220, 220, -1, 220, -1, + -1, -1, -1, 220, -1, -1, 220, -1, + -1, -1, -1, -1, -1, 220, 220, -1, + -1, -1, -1, 220, 220, 220, 220, 220, + -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, 219, + 219, 219, -1, -1, 219, 219, -1, -1, + -1, 219, -1, -1, -1, 219, 219, -1, + 219, 219, -1, -1, -1, -1, 219, 219, + -1, -1, 219, 219, 219, -1, 219, 219, + -1, -1, 219, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 220, 220, 220, -1, -1, 220, 220, -1, + 219, 219, 220, -1, -1, -1, 220, 220, + -1, 220, 220, -1, -1, -1, -1, 220, + 220, -1, -1, 220, 220, 220, -1, 220, + 220, -1, -1, 220, -1, -1, -1, -1, + -1, -1, -1, -1, 221, 221, 221, 221, + 221, 221, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 219, 221, -1, -1, -1, + -1, 220, 220, -1, 221, 221, 221, 221, + 221, 221, -1, 221, -1, -1, -1, -1, + 221, -1, -1, 221, -1, -1, 211, 211, + -1, -1, 221, 221, -1, -1, -1, -1, + 221, 221, 221, 221, 221, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 220, -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, -1, -1, + -1, -1, -1, -1, -1, 221, 221, 221, + -1, -1, 221, 221, -1, -1, -1, 221, + -1, -1, -1, 221, 221, -1, 221, 221, + -1, -1, -1, -1, 221, 221, -1, -1, + 221, 221, 221, -1, 221, 221, -1, -1, + 221, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 217, 217, 217, -1, -1, + 217, 217, -1, -1, -1, 217, 221, 221, + -1, 217, 217, -1, 217, 217, -1, -1, + -1, -1, 217, 217, -1, -1, 217, 217, + 217, -1, 217, 217, -1, -1, 217, -1, + -1, -1, 222, 222, 222, 222, 222, 222, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 222, -1, -1, -1, -1, -1, + -1, 221, 222, 222, 222, 222, 222, 222, + -1, 222, -1, -1, -1, -1, 222, -1, + -1, 222, -1, -1, -1, -1, -1, -1, + 222, 222, -1, -1, -1, -1, 222, 222, + 222, 222, 222, 223, 223, 223, 223, 223, + 223, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 223, -1, -1, -1, 217, + -1, -1, -1, 223, 223, 223, 223, 223, + 223, -1, 223, -1, -1, -1, -1, 223, + -1, -1, 223, -1, -1, -1, -1, -1, + -1, 223, 223, -1, -1, -1, -1, 223, + 223, 223, 223, 223, -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, 222, 222, 222, -1, -1, + 222, 222, -1, -1, -1, 222, -1, -1, + -1, 222, 222, -1, 222, 222, -1, -1, + -1, -1, 222, 222, -1, -1, 222, 222, + 222, -1, 222, 222, -1, -1, 222, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 223, 223, 223, -1, + -1, 223, 223, -1, 222, 222, 223, -1, + -1, -1, 223, 223, -1, 223, 223, -1, + -1, -1, -1, 223, 223, -1, -1, 223, + 223, 223, -1, 223, 223, -1, -1, 223, + -1, -1, -1, -1, -1, -1, -1, -1, + 224, 224, 224, 224, 224, 224, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 222, + 224, -1, -1, -1, -1, 223, 223, -1, + 224, 224, 224, 224, 224, 224, -1, 224, + -1, -1, -1, -1, 224, -1, -1, 224, + -1, -1, -1, -1, -1, -1, 224, 224, + -1, -1, -1, -1, 224, 224, 224, 224, + 224, 225, 225, 225, 225, 225, 225, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 223, 225, -1, -1, -1, -1, -1, -1, + -1, 225, 225, 225, 225, 225, 225, -1, + 225, -1, -1, -1, -1, 225, -1, -1, + 225, -1, -1, -1, -1, -1, -1, 225, + 225, -1, -1, -1, -1, 225, 225, 225, + 225, 225, -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, 224, 224, 224, -1, -1, 224, 224, + -1, -1, -1, 224, -1, -1, -1, 224, + 224, -1, 224, 224, -1, -1, -1, -1, + 224, 224, -1, -1, 224, 224, 224, -1, + 224, 224, -1, -1, 224, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 225, 225, 225, -1, -1, 225, + 225, -1, 224, 224, 225, -1, -1, -1, + 225, 225, -1, 225, 225, -1, -1, -1, + -1, 225, 225, -1, -1, 225, 225, 225, + -1, 225, 225, -1, -1, 225, -1, -1, + -1, -1, -1, -1, -1, -1, 226, 226, + 226, 226, 226, 226, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 224, 226, -1, + -1, -1, -1, 225, 225, -1, 226, 226, + 226, 226, 226, 226, -1, 226, -1, -1, + -1, -1, 226, -1, -1, 226, -1, -1, + -1, -1, -1, -1, 226, 226, -1, -1, + -1, -1, 226, 226, 226, 226, 226, 227, + 227, 227, 227, 227, 227, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 225, 227, + -1, -1, -1, -1, -1, -1, -1, 227, + 227, 227, 227, 227, 227, -1, 227, -1, + -1, -1, -1, 227, -1, -1, 227, -1, + -1, -1, -1, -1, -1, 227, 227, -1, + -1, -1, -1, 227, 227, 227, 227, 227, + -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, 226, + 226, 226, -1, -1, 226, 226, -1, -1, + -1, 226, -1, -1, -1, 226, 226, -1, + 226, 226, -1, -1, -1, -1, 226, 226, + -1, -1, 226, 226, 226, -1, 226, 226, + -1, -1, 226, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 227, 227, 227, -1, -1, 227, 227, -1, + 226, 226, 227, -1, -1, -1, 227, 227, + -1, 227, 227, -1, -1, -1, -1, 227, + 227, -1, -1, 227, 227, 227, -1, 227, + 227, -1, -1, 227, -1, -1, -1, -1, + -1, -1, -1, -1, 228, 228, 228, 228, + 228, 228, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 226, 228, -1, -1, -1, + -1, 227, 227, -1, 228, 228, 228, 228, + 228, 228, -1, 228, -1, -1, -1, -1, + 228, -1, -1, 228, -1, -1, -1, -1, + -1, -1, 228, 228, -1, -1, -1, -1, + 228, 228, 228, 228, 228, 229, 229, 229, + 229, 229, 229, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 227, 229, -1, -1, + -1, -1, -1, -1, -1, 229, 229, 229, + 229, 229, 229, -1, 229, -1, -1, -1, + -1, 229, -1, -1, 229, -1, -1, -1, + -1, -1, -1, 229, 229, -1, -1, -1, + -1, 229, 229, 229, 229, 229, -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, 228, 228, 228, + -1, -1, 228, 228, -1, -1, -1, 228, + -1, -1, -1, 228, 228, -1, 228, 228, + -1, -1, -1, -1, 228, 228, -1, -1, + 228, 228, 228, -1, 228, 228, -1, -1, + 228, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 229, 229, + 229, -1, -1, 229, 229, -1, 228, 228, + 229, -1, -1, -1, 229, 229, -1, 229, + 229, -1, -1, -1, -1, 229, 229, -1, + -1, 229, 229, 229, -1, 229, 229, -1, + -1, 229, -1, -1, -1, -1, -1, -1, + -1, -1, 230, 230, 230, 230, 230, 230, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 228, 230, -1, -1, -1, -1, 229, + 229, -1, 230, 230, 230, 230, 230, 230, + -1, 230, -1, -1, -1, -1, 230, -1, + -1, 230, -1, -1, -1, -1, -1, -1, + 230, 230, -1, -1, -1, -1, 230, 230, + 230, 230, 230, 231, 231, 231, 231, 231, + 231, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 229, 231, -1, -1, -1, -1, + -1, -1, -1, 231, 231, 231, 231, 231, + 231, -1, 231, -1, -1, -1, -1, 231, + -1, -1, 231, -1, -1, -1, -1, -1, + -1, 231, 231, -1, -1, -1, -1, 231, + 231, 231, 231, 231, -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, 230, 230, 230, -1, -1, + 230, 230, -1, -1, -1, 230, -1, -1, + -1, 230, 230, -1, 230, 230, -1, -1, + -1, -1, 230, 230, -1, -1, 230, 230, + 230, -1, 230, 230, -1, -1, 230, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 231, 231, 231, -1, + -1, 231, 231, -1, 230, 230, 231, -1, + -1, -1, 231, 231, -1, 231, 231, -1, + -1, -1, -1, 231, 231, -1, -1, 231, + 231, 231, -1, 231, 231, -1, -1, 231, + -1, -1, -1, -1, -1, -1, -1, -1, + 232, 232, 232, 232, 232, 232, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 230, + 232, -1, -1, -1, -1, 231, 231, -1, + 232, 232, 232, 232, 232, 232, -1, 232, + -1, -1, -1, -1, 232, -1, -1, 232, + -1, -1, -1, -1, -1, -1, 232, 232, + -1, -1, -1, -1, 232, 232, 232, 232, + 232, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 231, -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, -1, -1, -1, -1, -1, -1, + -1, 232, 232, 232, -1, -1, 232, 232, + -1, -1, -1, 232, -1, -1, -1, 232, + 232, -1, 232, 232, -1, -1, -1, -1, + 232, 232, -1, -1, 232, 232, 232, -1, + 232, 232, -1, -1, 232, -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, 232, 232, -1, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, -1, 235, 235, 235, + 235, 235, 235, -1, 235, 235, 235, 235, + -1, 235, -1, 235, 235, 235, -1, 235, + 235, 235, 235, 235, 235, 232, 235, 235, + 235, 235, 235, 235, 235, 235, 235, -1, + 235, 235, 235, 235, -1, -1, -1, -1, + -1, -1, -1, 235, -1, -1, 235, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 235, 235, 235, 235, -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, 235, 235, 235, + 235, -1, -1, 235, 235, -1, 235, 235, + 235, -1, -1, -1, 235, 235, -1, 235, + 235, -1, -1, -1, -1, 235, -1, -1, + -1, 235, 235, 235, -1, 235, 235, -1, + -1, 235, -1, -1, -1, -1, -1, -1, + -1, -1, 235, 235, 235, 235, -1, -1, + -1, 235, 235, -1, -1, 235, 235, 235, + 235, 235, 235, 235, 235, -1, 235, 235, + 235, -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, 235, + 235, 235, 235, 235, -1, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 235, + 236, 236, 236, 236, 235, -1, -1, 236, + 236, 236, 236, 236, -1, -1, -1, 236, + 236, 236, -1, -1, -1, 236, -1, -1, + -1, 236, 236, 236, 236, -1, -1, -1, + 236, 236, 236, -1, -1, -1, -1, 236, + 236, -1, 236, 236, 236, 236, -1, -1, + -1, -1, -1, -1, -1, 236, -1, -1, + 236, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 236, 236, 236, 236, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, + -1, 237, 237, 237, 237, 237, 237, -1, + 237, 237, 237, 237, -1, 237, -1, 237, + 237, 237, -1, 237, 237, 237, 237, 237, + 237, -1, 237, 237, 237, 237, 237, 237, + 237, 237, 237, -1, 237, 237, 237, 237, + -1, -1, -1, 235, -1, -1, -1, 237, + -1, -1, 237, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 236, 237, 237, 237, + 237, -1, -1, 236, 236, 236, -1, 236, + 236, 236, 236, 236, 236, 236, 236, -1, + 236, 236, 236, -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, 236, 236, 236, 236, 236, -1, -1, + -1, 237, 237, 237, 237, -1, -1, 237, + 237, -1, 237, 237, 237, -1, 236, -1, + 237, 237, -1, 237, 237, -1, -1, -1, + -1, 237, -1, -1, -1, 237, 237, 237, + -1, 237, 237, -1, -1, 237, -1, -1, + -1, -1, -1, -1, -1, -1, 237, 237, + 237, 237, -1, -1, -1, 237, 237, -1, + -1, 237, 237, 237, 237, 237, 237, 237, + 237, -1, 237, 237, 237, -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, 237, 237, 237, 237, 237, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 237, -1, -1, -1, -1, + 237, -1, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, + 238, -1, 238, 238, 238, 238, 238, 238, + -1, 238, 238, 238, 238, -1, 238, -1, + 238, 238, 238, -1, 238, 238, 238, 238, + 238, 238, -1, 238, 238, 238, 238, 238, + 238, 238, 238, 238, -1, 238, 238, 238, + 238, -1, -1, -1, -1, -1, -1, -1, + 238, -1, -1, 238, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 238, 238, + 238, 238, -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, 235, 235, 235, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 238, 238, 238, 238, -1, 237, + 238, 238, -1, 238, 238, 238, -1, -1, + -1, 238, 238, -1, 238, 238, -1, -1, + -1, -1, 238, -1, -1, -1, 238, 238, + 238, -1, 238, 238, -1, -1, 238, -1, + -1, -1, -1, -1, -1, -1, -1, 238, + 238, 238, 238, -1, -1, -1, 238, 238, + -1, -1, 238, 238, 238, 238, 238, 238, + 238, 238, -1, 238, 238, 238, -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, 238, 238, 238, 238, + 238, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 238, -1, -1, -1, + -1, 238, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, + 245, -1, 245, 245, 245, 245, 245, 245, + -1, -1, -1, 245, 245, 245, 245, 245, + 245, -1, 245, 245, 245, 245, -1, 245, + -1, 245, 245, 245, -1, 245, 245, 245, + 245, 245, 245, -1, 245, 245, 245, 245, + 245, 245, 245, 245, 245, -1, 245, 245, + 245, 245, -1, -1, -1, -1, -1, -1, + -1, 245, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 236, 245, + 245, 245, 245, -1, -1, -1, -1, 236, + -1, 236, 236, 236, 236, 236, 236, 236, + 236, -1, 236, 236, 236, -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, + 238, -1, -1, 236, 236, 236, 236, 236, + -1, -1, -1, 245, 245, 245, 245, -1, + -1, 245, 245, 245, 245, 245, 245, -1, + 236, -1, 245, 245, 245, 245, 245, -1, + -1, -1, -1, 245, -1, -1, -1, 245, + 245, 245, -1, 245, 245, -1, -1, 245, + -1, -1, -1, -1, -1, -1, -1, -1, + 245, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 245, 245, 245, 245, 245, + 245, 245, 245, -1, 245, 245, 245, -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, 245, 245, 245, + 245, 245, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 245, -1, 245, + -1, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, -1, + 246, 246, 246, 246, 246, 246, -1, -1, + -1, 246, 246, 246, 246, 246, 246, -1, + 246, 246, 246, 246, -1, 246, -1, 246, + 246, 246, -1, 246, 246, 246, 246, 246, + 246, -1, 246, 246, 246, 246, 246, 246, + 246, 246, 246, -1, 246, 246, 246, 246, + -1, -1, -1, -1, -1, -1, -1, 246, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 246, 246, 246, + 246, -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, 246, 246, 246, 246, -1, -1, 246, + 246, 245, 246, 246, 246, -1, -1, -1, + 246, 246, -1, 246, 246, -1, -1, -1, + -1, 246, 246, -1, -1, 246, 246, 246, + -1, 246, 246, -1, -1, 246, -1, -1, + -1, -1, -1, -1, -1, -1, 246, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 246, 246, 246, 246, 246, 246, 246, + 246, -1, 246, 246, 246, -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, 246, 246, 246, 246, 246, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 246, -1, -1, 246, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, -1, 249, 249, 249, 249, -1, -1, + -1, 249, 249, 249, 249, 249, -1, -1, + -1, 249, 249, 249, -1, -1, -1, 249, + -1, -1, -1, 249, 249, 249, 249, -1, + -1, -1, 249, 249, 249, -1, -1, -1, + -1, 249, 249, -1, 249, 249, 249, 249, + -1, -1, -1, -1, -1, -1, -1, 249, + -1, -1, 249, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 249, 249, 249, + 249, -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, -1, -1, -1, -1, -1, 246, + -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, 249, -1, + -1, -1, -1, -1, -1, 249, 249, -1, + -1, 249, 249, 249, 249, 249, 249, 249, + 249, -1, 249, 249, 249, -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, 249, 249, 249, 249, 249, + -1, -1, 250, 250, 250, 250, 250, 250, + 250, 250, 250, 250, 250, 250, 250, 250, + 249, 250, 250, 250, 250, 250, 250, -1, + -1, -1, 250, 250, 250, 250, 250, 250, + -1, 250, 250, 250, 250, -1, 250, -1, + 250, 250, 250, -1, 250, 250, 250, 250, + 250, 250, -1, 250, 250, 250, 250, 250, + 250, 250, 250, 250, -1, 250, 250, 250, + 250, -1, -1, -1, -1, -1, -1, -1, + 250, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 250, 250, + 250, 250, -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, 250, 250, 250, 250, -1, -1, + 250, 250, -1, 250, 250, 250, -1, -1, + -1, 250, 250, -1, 250, 250, -1, -1, + -1, -1, 250, -1, -1, -1, 250, 250, + 250, -1, 250, 250, -1, -1, 250, -1, + -1, -1, -1, -1, -1, -1, -1, 250, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 250, 250, 250, 250, 250, 250, + 250, 250, -1, 250, 250, 250, -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, 250, 250, 250, 250, + 250, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 250, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, -1, + 256, 256, 256, 256, 256, 256, -1, -1, + -1, 256, 256, 256, 256, 256, 256, -1, + 256, 256, 256, 256, -1, 256, -1, 256, + 256, 256, -1, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + -1, -1, -1, -1, -1, -1, -1, 256, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 256, 256, 256, + 256, -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, + 250, 256, 256, 256, 256, -1, -1, 256, + 256, 256, 256, 256, 256, -1, -1, -1, + 256, 256, 256, 256, 256, -1, 256, 256, + -1, 256, 256, -1, -1, 256, 256, 256, + -1, 256, 256, -1, -1, 256, -1, -1, + -1, -1, -1, -1, -1, -1, 256, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 256, 256, 256, 256, 256, 256, 256, + 256, -1, 256, 256, 256, -1, -1, -1, + 249, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 249, 249, 249, 249, 249, + 249, 249, 249, -1, 249, 249, 249, -1, + -1, -1, -1, 256, 256, 256, 256, 256, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 256, -1, 256, 256, -1, + -1, -1, -1, -1, -1, 249, 249, 249, + 249, 249, -1, -1, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, 257, + 257, 257, 249, 257, 257, 257, 257, 257, + 257, -1, -1, -1, 257, 257, 257, 257, + 257, 257, -1, 257, 257, 257, 257, -1, + 257, -1, 257, 257, 257, -1, 257, 257, + 257, 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, -1, -1, -1, -1, -1, + -1, -1, 257, -1, -1, -1, -1, 259, + 259, 259, 259, 259, 259, -1, -1, -1, + 257, 257, 257, 257, -1, 257, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 259, + 259, 259, 259, 259, 259, -1, 259, -1, + -1, -1, -1, -1, -1, -1, 259, -1, + -1, -1, -1, -1, -1, 259, 259, -1, + -1, -1, -1, 259, 259, 259, -1, 259, + -1, -1, -1, -1, -1, -1, -1, 256, + -1, -1, -1, -1, 257, 257, 257, 257, + -1, -1, 257, 257, 257, 257, 257, 257, + -1, -1, -1, 257, 257, 257, 257, 257, + -1, 257, 257, 257, 257, 257, -1, -1, + 257, 257, 257, -1, 257, 257, -1, -1, + 257, -1, -1, -1, -1, -1, -1, -1, + -1, 257, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 257, 257, 257, 257, + 257, 257, 257, 257, -1, 257, 257, 257, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 259, 259, -1, -1, 259, -1, 259, + 259, -1, 259, -1, -1, -1, 259, 259, + 259, 259, 259, -1, -1, -1, 257, 257, + 257, 257, 257, 259, 259, 259, -1, 259, + 259, -1, -1, 259, -1, -1, 257, -1, + 257, 257, -1, 261, 261, 261, 261, 261, + 261, -1, -1, -1, -1, -1, -1, 259, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 259, 259, 261, 261, 261, 261, 261, + 261, -1, 261, -1, -1, -1, -1, -1, + -1, -1, 261, -1, -1, -1, -1, -1, + -1, 261, 261, -1, -1, -1, -1, 261, + 261, 261, -1, 261, -1, -1, -1, -1, + -1, 262, 262, 262, 262, 262, 262, -1, + -1, -1, -1, 259, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 262, 262, 262, 262, 262, 262, -1, + 262, -1, -1, -1, -1, -1, -1, -1, + 262, -1, -1, -1, -1, -1, -1, 262, + 262, -1, -1, -1, -1, 262, 262, 262, + -1, 262, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 263, + 263, 263, 263, 263, 263, 261, 261, -1, + -1, 261, 257, 261, 261, -1, 261, -1, + -1, -1, 261, 261, 261, 261, 261, 263, + 263, 263, 263, 263, 263, -1, 263, 261, + 261, 261, -1, 261, 261, -1, 263, 261, + -1, -1, -1, -1, -1, 263, 263, -1, + -1, -1, -1, 263, 263, 263, -1, 263, + -1, -1, -1, 261, -1, 264, 264, 264, + 264, 264, 264, 262, 262, 261, 261, 262, + -1, 262, 262, -1, 262, -1, -1, -1, + 262, 262, 262, 262, 262, 264, 264, 264, + 264, 264, 264, -1, 264, 262, 262, 262, + -1, 262, 262, -1, 264, 262, -1, -1, + -1, -1, -1, 264, 264, -1, -1, -1, + -1, 264, 264, 264, -1, 264, -1, 261, + -1, 262, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 262, 262, -1, -1, -1, + -1, -1, -1, 265, 265, 265, 265, 265, + 265, 263, 263, -1, -1, 263, -1, 263, + 263, -1, 263, -1, -1, -1, 263, 263, + 263, 263, 263, 265, 265, 265, 265, 265, + 265, -1, 265, 263, 263, 263, -1, 263, + 263, -1, 265, 263, -1, 262, -1, -1, + -1, 265, 265, -1, -1, -1, -1, 265, + 265, 265, -1, 265, -1, -1, -1, 263, + -1, -1, -1, -1, -1, -1, -1, 264, + 264, 263, 263, 264, -1, 264, 264, -1, + 264, -1, -1, -1, 264, 264, 264, 264, + 264, -1, -1, -1, -1, -1, -1, -1, + -1, 264, 264, 264, -1, 264, 264, -1, + -1, 264, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 263, -1, 264, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 264, + 264, -1, -1, -1, -1, -1, -1, 266, + 266, 266, 266, 266, 266, 265, 265, -1, + -1, 265, -1, 265, 265, -1, 265, -1, + -1, -1, 265, 265, 265, 265, 265, 266, + 266, 266, 266, 266, 266, 257, 266, 265, + 265, 265, -1, 265, 265, -1, 266, 265, + -1, 264, -1, -1, -1, 266, 266, -1, + -1, -1, -1, 266, 266, 266, -1, 266, + -1, -1, -1, 265, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 265, 265, -1, + -1, -1, -1, -1, -1, 267, 267, 267, + 267, 267, 267, 259, 259, -1, -1, 259, + -1, 259, 259, -1, 259, -1, -1, -1, + 259, 259, 259, 259, 259, 267, 267, 267, + 267, 267, 267, -1, 267, 259, 259, 259, + -1, 259, 259, -1, 267, 259, -1, 265, + -1, -1, -1, 267, 267, -1, -1, -1, + -1, 267, 267, 267, -1, 267, -1, -1, + -1, 259, -1, 268, 268, 268, 268, 268, + 268, 266, 266, -1, -1, 266, -1, 266, + 266, -1, 266, -1, -1, -1, 266, 266, + 266, 266, 266, 268, 268, 268, 268, 268, + 268, -1, 268, 266, 266, 266, -1, 266, + 266, -1, 268, 266, -1, -1, -1, -1, + -1, 268, 268, -1, -1, -1, -1, 268, + 268, 268, -1, 268, -1, 259, -1, 266, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 266, 266, -1, -1, -1, -1, -1, + -1, 269, 269, 269, 269, 269, 269, 267, + 267, -1, -1, 267, -1, 267, 267, -1, + 267, -1, -1, -1, 267, 267, 267, 267, + 267, 269, 269, 269, 269, 269, 269, -1, + 269, 267, 267, 267, -1, 267, 267, -1, + 269, 267, -1, 266, -1, -1, -1, 269, + 269, -1, -1, -1, -1, 269, 269, 269, + -1, 269, -1, -1, -1, 267, -1, 270, + 270, 270, 270, 270, 270, 268, 268, 267, + 267, 268, -1, 268, 268, -1, 268, -1, + -1, -1, 268, 268, 268, 268, 268, 270, + 270, 270, 270, 270, 270, -1, 270, 268, + 268, 268, -1, 268, 268, -1, 270, 268, + -1, -1, -1, -1, -1, 270, 270, -1, + -1, -1, -1, 270, 270, 270, -1, 270, + -1, 267, -1, 268, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 268, 268, -1, + -1, -1, -1, -1, -1, 271, 271, 271, + 271, 271, 271, 269, 269, -1, -1, 269, + -1, 269, 269, -1, 269, -1, -1, -1, + 269, 269, 269, 269, 269, 271, 271, 271, + 271, 271, 271, -1, 271, 269, 269, 269, + -1, 269, 269, -1, 271, 269, -1, 268, + -1, -1, -1, 271, 271, -1, -1, -1, + -1, 271, 271, 271, -1, 271, -1, -1, + -1, 269, -1, 272, 272, 272, 272, 272, + 272, 270, 270, 269, 269, 270, -1, 270, + 270, -1, 270, -1, -1, -1, 270, 270, + 270, 270, 270, 272, 272, 272, 272, 272, + 272, -1, 272, 270, 270, 270, -1, 270, + 270, -1, 272, 270, -1, -1, -1, -1, + -1, 272, 272, -1, -1, -1, -1, 272, + 272, 272, -1, 272, -1, 269, -1, 270, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 270, 270, -1, -1, -1, -1, -1, + -1, 273, 273, 273, 273, 273, 273, 271, + 271, -1, -1, 271, -1, 271, 271, -1, + 271, -1, -1, -1, 271, 271, 271, 271, + 271, 273, 273, 273, 273, 273, 273, -1, + 273, 271, 271, 271, -1, 271, 271, -1, + 273, 271, -1, 270, -1, -1, -1, 273, + 273, -1, -1, -1, -1, 273, 273, 273, + -1, 273, -1, -1, -1, 271, -1, 274, + 274, 274, 274, 274, 274, 272, 272, 271, + 271, 272, -1, 272, 272, -1, 272, -1, + -1, -1, 272, 272, 272, 272, 272, 274, + 274, 274, 274, 274, 274, -1, 274, 272, + 272, 272, -1, 272, 272, -1, 274, 272, + -1, -1, -1, -1, -1, 274, 274, -1, + -1, -1, -1, 274, 274, 274, -1, 274, + -1, 271, -1, 272, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 272, 272, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 273, 273, -1, -1, 273, + -1, 273, 273, -1, 273, -1, -1, -1, + 273, 273, 273, 273, 273, -1, -1, -1, + -1, -1, -1, -1, -1, 273, 273, 273, + -1, 273, 273, -1, -1, 273, -1, 272, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 273, -1, -1, -1, -1, -1, -1, + -1, 274, 274, 273, 273, 274, -1, 274, + 274, -1, 274, -1, -1, -1, 274, 274, + 274, 274, 274, -1, -1, -1, -1, -1, + -1, -1, -1, 274, 274, 274, -1, 274, + 274, -1, -1, 274, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 273, -1, 274, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 274, 274, -1, -1, -1, -1, -1, + -1, -1, 276, 276, 276, 276, 276, 276, + 276, 276, 276, 276, 276, 276, 276, 276, + 276, 276, 276, 276, 276, 276, 276, 276, + 276, -1, 276, 276, 276, 276, 276, 276, + -1, 276, 276, 276, 276, 276, 276, -1, + 276, 276, 276, 274, 276, 276, 276, 276, + 276, 276, 276, 276, 276, 276, 276, 276, + 276, 276, 276, 276, -1, 276, 276, 276, + 276, -1, -1, -1, -1, -1, -1, -1, + 276, -1, -1, 276, -1, -1, 276, -1, + -1, -1, -1, -1, -1, -1, 276, 276, + 276, 276, -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, 276, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 276, 276, 276, 276, -1, -1, + 276, 276, 276, 276, 276, 276, -1, -1, + -1, 276, 276, 276, 276, 276, -1, -1, + 276, -1, 276, -1, -1, 276, 276, 276, + 276, -1, 276, 276, -1, -1, 276, -1, + -1, -1, -1, -1, 276, -1, 276, 276, + 276, 276, 276, -1, -1, -1, 276, 276, + -1, 276, 276, 276, 276, 276, 276, 276, + 276, 276, -1, 276, 276, 276, -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, 276, 276, 276, 276, + 276, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 276, -1, 276, -1, + 276, 276, -1, 279, 279, 279, 279, 279, + 279, 279, 279, 279, 279, 279, 279, 279, + 279, 279, 279, 279, 279, 279, 279, 279, + 279, 279, -1, 279, 279, 279, 279, 279, + 279, -1, 279, 279, 279, 279, -1, 279, + -1, 279, 279, 279, -1, 279, 279, 279, + 279, 279, 279, -1, 279, 279, 279, 279, + 279, 279, 279, 279, 279, 279, 279, 279, + 279, 279, 279, -1, 279, -1, -1, -1, + -1, 279, 279, 279, 279, 279, -1, -1, + 279, 279, -1, 279, 279, 279, 279, 279, + 279, 279, 279, 279, 279, 279, 279, -1, + -1, -1, -1, -1, 279, -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, 279, 279, 279, 279, -1, + 276, 279, 279, 279, 279, 279, 279, -1, + -1, -1, 279, 279, 279, 279, 279, -1, + -1, -1, -1, 279, -1, -1, -1, 279, + 279, 279, -1, 279, 279, -1, -1, 279, + -1, -1, -1, -1, -1, -1, -1, -1, + 279, 279, 279, 279, 279, -1, 279, 279, + 279, -1, -1, 279, 279, 279, 279, 279, + 279, 279, 279, -1, 279, 279, 279, -1, + -1, -1, 279, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 279, 279, -1, + -1, 279, -1, -1, -1, -1, 279, -1, + -1, -1, -1, 279, -1, 279, 279, 279, + 279, 279, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 279, -1, 279, + -1, -1, 279, 279, -1, -1, -1, 279, + -1, 279, -1, 279, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, -1, 280, 280, 280, 280, + 280, 280, -1, 280, 280, 280, 280, -1, + 280, -1, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, -1, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, -1, 280, -1, -1, + 280, -1, 280, 280, 280, 280, 280, -1, + -1, 280, 280, -1, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + -1, -1, -1, -1, -1, 280, -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, 279, -1, -1, 280, 280, 280, 280, + -1, -1, 280, 280, 280, 280, 280, 280, + -1, -1, -1, 280, 280, 280, 280, 280, + -1, -1, -1, -1, 280, -1, -1, -1, + 280, 280, 280, -1, 280, 280, -1, -1, + 280, -1, -1, -1, -1, -1, -1, -1, + -1, 280, 280, 280, 280, 280, -1, 280, + 280, 280, 280, -1, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + -1, -1, -1, 280, 280, -1, -1, -1, + 280, 280, -1, 280, -1, -1, 280, 280, + -1, -1, 280, -1, 280, 280, -1, 280, + -1, 280, 280, -1, 280, -1, 280, 280, + 280, 280, 280, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 280, -1, + 280, -1, -1, 280, 280, -1, 280, -1, + 280, -1, 280, -1, 280, 281, 281, 281, + 281, 281, 281, 281, 281, 281, 281, 281, + 281, 281, 281, 281, 281, 281, 281, 281, + 281, 281, 281, 281, -1, 281, 281, 281, + 281, 281, 281, -1, 281, 281, 281, 281, + -1, 281, -1, 281, 281, 281, 281, 281, + 281, 281, 281, 281, 281, -1, 281, 281, + 281, 281, 281, 281, 281, 281, 281, 281, + 281, 281, 281, 281, 281, -1, 281, -1, + -1, 281, -1, 281, 281, 281, 281, 281, + -1, -1, 281, 281, -1, 281, 281, 281, + 281, 281, 281, 281, 281, 281, 281, 281, + 281, -1, -1, -1, -1, -1, 281, -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, 280, -1, -1, 281, 281, 281, + 281, -1, -1, 281, 281, 281, 281, 281, + 281, -1, -1, -1, 281, 281, 281, 281, + 281, -1, -1, -1, -1, 281, -1, -1, + -1, 281, 281, 281, -1, 281, 281, -1, + -1, 281, -1, -1, -1, -1, -1, -1, + -1, -1, 281, 281, 281, 281, 281, -1, + 281, 281, 281, 281, -1, 281, 281, 281, + 281, 281, 281, 281, 281, 281, 281, 281, + 281, -1, -1, -1, 281, 281, -1, -1, + -1, 281, 281, -1, 281, -1, -1, 281, + 281, -1, -1, 281, -1, 281, 281, -1, + 281, -1, 281, 281, -1, 281, -1, 281, + 281, 281, 281, 281, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 281, + -1, 281, -1, -1, 281, 281, -1, 281, + -1, 281, -1, 281, -1, 281, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, -1, 283, 283, + 283, 283, 283, 283, -1, 283, 283, 283, + 283, -1, 283, -1, 283, 283, 283, -1, + 283, 283, 283, 283, 283, 283, -1, 283, + 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, -1, 283, + -1, -1, -1, -1, 283, 283, 283, 283, + 283, -1, -1, 283, 283, -1, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, -1, -1, -1, -1, -1, 283, + -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, 281, -1, -1, 283, 283, + 283, 283, -1, -1, 283, 283, 283, 283, + 283, 283, -1, -1, -1, 283, 283, 283, + 283, 283, -1, -1, -1, -1, 283, -1, + -1, -1, 283, 283, 283, -1, 283, 283, + -1, -1, 283, -1, -1, -1, -1, -1, + -1, -1, -1, 283, 283, 283, 283, 283, + -1, 283, 283, 283, -1, -1, 283, 283, + 283, 283, 283, 283, 283, 283, -1, 283, + 283, 283, -1, -1, -1, 283, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 283, 283, -1, -1, 283, -1, -1, -1, + -1, 283, -1, -1, -1, -1, 283, -1, + 283, 283, 283, 283, 283, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 283, -1, 283, -1, -1, 283, 283, -1, + -1, -1, 283, -1, 283, -1, 283, 284, + 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, -1, 284, + 284, 284, 284, 284, 284, -1, 284, 284, + 284, 284, -1, 284, -1, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, -1, + 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, -1, + 284, -1, -1, 284, -1, 284, 284, 284, + 284, 284, -1, -1, 284, 284, -1, 284, + 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, -1, -1, -1, -1, -1, + 284, -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, 283, -1, -1, 284, + 284, 284, 284, -1, -1, 284, 284, 284, + 284, 284, 284, -1, -1, -1, 284, 284, + 284, 284, 284, -1, -1, -1, -1, 284, + 284, -1, -1, 284, 284, 284, -1, 284, + 284, -1, -1, 284, -1, -1, -1, -1, + -1, -1, -1, -1, 284, 284, 284, 284, + 284, -1, 284, 284, 284, 284, -1, 284, + 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, -1, -1, -1, 284, 284, + -1, -1, -1, 284, 284, -1, 284, -1, + -1, 284, 284, -1, -1, 284, -1, 284, + 284, -1, 284, -1, 284, 284, -1, 284, + -1, 284, 284, 284, 284, 284, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 284, -1, 284, 284, -1, 284, 284, + -1, 284, -1, 284, -1, 284, -1, 284, + 285, 285, 285, 285, 285, 285, 285, 285, + 285, 285, 285, 285, 285, 285, 285, 285, + 285, 285, 285, 285, 285, 285, 285, -1, + 285, 285, 285, 285, 285, 285, -1, 285, + 285, 285, 285, -1, 285, -1, 285, 285, + 285, 285, 285, 285, 285, 285, 285, 285, + -1, 285, 285, 285, 285, 285, 285, 285, + 285, 285, 285, 285, 285, 285, 285, 285, + -1, 285, -1, -1, 285, -1, 285, 285, + 285, 285, 285, -1, -1, 285, 285, -1, + 285, 285, 285, 285, 285, 285, 285, 285, + 285, 285, 285, 285, -1, -1, -1, -1, + -1, 285, -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, 284, -1, -1, + 285, 285, 285, 285, -1, -1, 285, 285, + 285, 285, 285, 285, -1, -1, -1, 285, + 285, 285, 285, 285, -1, -1, -1, -1, + 285, 285, -1, -1, 285, 285, 285, -1, + 285, 285, -1, -1, 285, -1, -1, -1, + -1, -1, -1, -1, -1, 285, 285, 285, + 285, 285, -1, 285, 285, 285, 285, -1, + 285, 285, 285, 285, 285, 285, 285, 285, + 285, 285, 285, 285, -1, -1, -1, 285, + 285, -1, -1, -1, 285, 285, -1, 285, + -1, -1, 285, 285, -1, -1, 285, -1, + 285, 285, -1, 285, -1, 285, 285, -1, + 285, -1, 285, 285, 285, 285, 285, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 285, -1, 285, 285, -1, 285, + 285, -1, 285, -1, 285, -1, 285, -1, + 285, 286, 286, 286, 286, 286, 286, 286, + 286, 286, 286, 286, 286, 286, 286, 286, + 286, 286, 286, 286, 286, 286, 286, 286, + -1, 286, 286, 286, 286, 286, 286, -1, + 286, 286, 286, 286, -1, 286, -1, 286, + 286, 286, -1, 286, 286, 286, 286, 286, + 286, -1, 286, 286, 286, 286, 286, 286, + 286, 286, 286, 286, 286, 286, 286, 286, + 286, -1, 286, -1, -1, -1, -1, 286, + 286, 286, 286, 286, -1, -1, 286, 286, + -1, 286, 286, 286, 286, 286, 286, 286, + 286, 286, 286, 286, 286, -1, -1, -1, + -1, -1, 286, -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, 285, -1, + -1, 286, 286, 286, 286, -1, -1, 286, + 286, 286, 286, 286, 286, -1, -1, -1, + 286, 286, 286, 286, 286, -1, -1, -1, + -1, 286, -1, -1, -1, 286, 286, 286, + -1, 286, 286, -1, -1, 286, -1, -1, + -1, -1, -1, -1, -1, -1, 286, 286, + 286, 286, 286, -1, 286, 286, 286, -1, + -1, 286, 286, 286, 286, 286, 286, 286, + 286, -1, 286, 286, 286, -1, -1, -1, + 286, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 286, 286, -1, -1, 286, + -1, -1, -1, -1, 286, -1, -1, -1, + -1, 286, -1, 286, 286, 286, 286, 286, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 286, -1, 286, -1, -1, + 286, 286, -1, -1, -1, 286, -1, 286, + -1, 286, 290, 290, 290, 290, -1, 290, + -1, -1, -1, -1, -1, -1, -1, -1, + 290, 290, 290, 290, 290, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 290, -1, + -1, -1, 290, 290, 290, 290, -1, -1, + -1, 290, 290, 290, -1, -1, -1, -1, + 290, 290, -1, 290, 290, 290, 290, 290, + -1, -1, -1, -1, -1, -1, 290, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 290, 290, 290, 290, + -1, -1, 290, 290, -1, -1, -1, -1, + -1, 290, -1, -1, -1, -1, -1, 292, + 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, -1, 292, + 292, 292, 292, 292, 292, -1, 292, 292, + 292, 292, -1, 292, -1, 292, 292, 292, + -1, 292, 292, 292, 292, 292, 292, 286, + 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, -1, + 292, -1, -1, -1, -1, 292, 292, 292, + 292, 292, -1, -1, 292, 292, -1, 292, + 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, -1, -1, -1, -1, -1, + 292, -1, -1, 290, 290, 290, 290, 290, + -1, 290, 290, 290, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 290, 290, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 290, -1, 290, 290, 290, 290, 290, 292, + 292, 292, 292, -1, -1, 292, 292, 292, + 292, 292, 292, -1, -1, -1, 292, 292, + 292, 292, 292, -1, -1, -1, -1, 292, + 290, -1, -1, 292, 292, 292, -1, 292, + 292, -1, -1, 292, -1, -1, -1, -1, + -1, -1, -1, -1, 292, 292, 292, 292, + 292, -1, 292, 292, 292, -1, -1, 292, + 292, 292, 292, 292, 292, 292, 292, -1, + 292, 292, 292, -1, -1, -1, 292, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 292, 292, -1, -1, 292, -1, -1, + -1, -1, 292, -1, -1, -1, -1, 292, + -1, 292, 292, 292, 292, 292, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 292, -1, 292, -1, -1, 292, 292, + -1, -1, -1, 292, -1, 292, -1, 292, + 293, 293, 293, 293, 293, 293, 293, 293, + 293, 293, 293, 293, 293, 293, 293, 293, + 293, 293, 293, 293, 293, 293, 293, -1, + 293, 293, 293, 293, 293, 293, -1, 293, + 293, 293, 293, -1, 293, -1, 293, 293, + 293, -1, 293, 293, 293, 293, 293, 293, + -1, 293, 293, 293, 293, 293, 293, 293, + 293, 293, 293, 293, 293, 293, 293, 293, + -1, 293, -1, -1, -1, -1, 293, 293, + 293, 293, 293, -1, -1, 293, 293, -1, + 293, 293, 293, 293, 293, 293, 293, 293, + 293, 293, 293, 293, -1, -1, -1, -1, + -1, 293, -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, 292, -1, -1, + 293, 293, 293, 293, -1, -1, 293, 293, + 293, 293, 293, 293, -1, -1, -1, 293, + 293, 293, 293, 293, -1, -1, -1, -1, + 293, -1, -1, -1, 293, 293, 293, -1, + 293, 293, -1, -1, 293, -1, -1, -1, + -1, -1, -1, -1, -1, 293, 293, 293, + 293, 293, -1, 293, 293, 293, -1, -1, + 293, 293, 293, 293, 293, 293, 293, 293, + -1, 293, 293, 293, -1, -1, -1, 293, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 293, 293, -1, -1, 293, -1, + -1, -1, -1, 293, -1, -1, -1, -1, + 293, -1, 293, 293, 293, 293, 293, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 293, -1, 293, -1, -1, 293, + 293, -1, -1, -1, 293, -1, 293, -1, + 293, 295, 295, 295, 295, 295, 295, 295, + 295, 295, 295, 295, 295, 295, 295, -1, + 295, 295, 295, 295, 295, 295, -1, -1, + -1, 295, 295, 295, 295, 295, 295, -1, + 295, 295, 295, 295, -1, 295, -1, 295, + 295, 295, -1, 295, 295, 295, 295, 295, + 295, -1, 295, 295, 295, 295, 295, 295, + 295, 295, 295, -1, 295, 295, 295, 295, + -1, -1, -1, -1, 295, -1, -1, 295, + -1, -1, -1, -1, -1, -1, -1, -1, + 295, -1, -1, -1, -1, 295, 295, 295, + 295, -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, 293, -1, + -1, 295, 295, 295, 295, -1, -1, 295, + 295, 295, 295, 295, 295, -1, -1, -1, + 295, 295, 295, 295, 295, -1, -1, -1, + -1, 295, 295, -1, -1, 295, 295, 295, + -1, 295, 295, -1, -1, 295, -1, -1, + -1, -1, -1, -1, -1, -1, 295, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 295, 295, 295, 295, 295, 295, 295, + 295, -1, 295, 295, 295, -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, 295, 295, 295, 295, 295, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 295, -1, 295, 295, -1, + -1, -1, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + -1, 296, 296, 296, 296, 296, 296, -1, + -1, -1, 296, 296, 296, 296, 296, 296, + -1, 296, 296, 296, 296, -1, 296, -1, + 296, 296, 296, -1, 296, 296, 296, 296, + 296, 296, -1, 296, 296, 296, 296, 296, + 296, 296, 296, 296, -1, 296, 296, 296, + 296, -1, -1, -1, -1, -1, -1, -1, + 296, -1, -1, -1, -1, -1, -1, -1, + -1, 296, -1, -1, -1, -1, 296, 296, + 296, 296, -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, 296, 296, 296, 296, -1, 295, + 296, 296, 296, 296, 296, 296, -1, -1, + -1, 296, 296, 296, 296, 296, -1, -1, + -1, -1, 296, 296, -1, -1, 296, 296, + 296, -1, 296, 296, -1, -1, 296, -1, + -1, -1, -1, -1, -1, -1, -1, 296, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 296, 296, 296, 296, 296, 296, + 296, 296, -1, 296, 296, 296, -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, 296, 296, 296, 296, + 296, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 296, -1, 296, 296, + -1, -1, -1, 298, 298, 298, 298, 298, + 298, 298, 298, 298, 298, 298, 298, 298, + 298, 298, 298, 298, 298, 298, 298, 298, + 298, 298, -1, 298, 298, 298, 298, 298, + 298, -1, 298, 298, 298, 298, -1, 298, + -1, 298, 298, 298, -1, 298, 298, 298, + 298, 298, 298, -1, 298, 298, 298, 298, + 298, 298, 298, 298, 298, -1, 298, 298, + 298, 298, -1, -1, -1, -1, -1, -1, + -1, 298, -1, -1, 298, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 298, + 298, 298, 298, -1, -1, 298, 298, -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, 298, 298, 298, 298, -1, + 296, 298, 298, 298, 298, 298, 298, -1, + -1, -1, 298, 298, 298, 298, 298, -1, + -1, -1, -1, 298, -1, -1, -1, 298, + 298, 298, -1, 298, 298, -1, -1, 298, + -1, -1, -1, -1, -1, -1, -1, -1, + 298, 298, 298, 298, -1, -1, -1, 298, + 298, -1, -1, 298, 298, 298, 298, 298, + 298, 298, 298, -1, 298, 298, 298, -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, 298, 298, 298, + 298, 298, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 298, -1, 298, + -1, -1, 298, -1, 299, 299, 299, 299, + 299, 299, 299, 299, 299, 299, 299, 299, + 299, 299, 299, 299, 299, 299, 299, 299, + 299, 299, 299, -1, 299, 299, 299, 299, + 299, 299, -1, 299, 299, 299, 299, -1, + 299, -1, 299, 299, 299, -1, 299, 299, + 299, 299, 299, 299, -1, 299, 299, 299, + 299, 299, 299, 299, 299, 299, 299, 299, + 299, 299, 299, 299, -1, -1, -1, -1, + -1, -1, 299, 299, 299, 299, -1, -1, + -1, 299, 299, -1, 299, 299, 299, 299, + 299, 299, 299, 299, -1, -1, 299, 299, + -1, -1, -1, -1, -1, 299, -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, 299, 299, 299, 299, + -1, 298, 299, 299, 299, 299, 299, 299, + -1, -1, -1, 299, 299, 299, 299, 299, + -1, -1, -1, -1, 299, -1, -1, -1, + 299, 299, 299, -1, 299, 299, -1, -1, + 299, -1, -1, -1, -1, -1, -1, -1, + -1, 299, 299, 299, 299, 299, -1, 299, + 299, 299, -1, -1, 299, 299, 299, 299, + 299, 299, 299, 299, -1, 299, 299, 299, + -1, -1, -1, 299, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 299, 299, + -1, -1, 299, -1, -1, -1, -1, 299, + -1, -1, -1, -1, 299, -1, 299, 299, + 299, 299, 299, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 299, -1, + 299, -1, -1, 299, 299, -1, -1, -1, + 299, -1, 299, -1, 299, 300, 300, 300, + 300, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 300, -1, 300, 300, 300, + 300, 300, 300, -1, 300, 300, 300, 300, + -1, 300, -1, 300, 300, 300, -1, 300, + 300, 300, 300, 300, 300, -1, 300, 300, + 300, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 300, 300, -1, -1, -1, + -1, -1, -1, 300, 300, 300, 300, -1, + -1, -1, 300, 300, -1, 300, 300, 300, + 300, 300, 300, 300, 300, -1, -1, 300, + 300, -1, -1, -1, -1, -1, 300, -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, 299, -1, -1, 300, 300, 300, + 300, -1, -1, 300, 300, 300, 300, 300, + 300, -1, -1, -1, 300, 300, 300, 300, + 300, -1, -1, -1, -1, 300, -1, -1, + -1, 300, 300, 300, -1, 300, 300, -1, + -1, 300, -1, -1, -1, -1, -1, -1, + -1, -1, 300, 300, 300, 300, 300, -1, + 300, 300, 300, -1, -1, 300, 300, 300, + 300, 300, 300, 300, 300, -1, 300, 300, + 300, -1, -1, -1, 300, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 300, + 300, -1, -1, 300, -1, -1, -1, -1, + 300, -1, -1, -1, -1, 300, -1, 300, + 300, 300, 300, 300, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 300, + -1, 300, -1, -1, 300, 300, -1, -1, + -1, 300, -1, 300, -1, 300, 301, 301, + 301, 301, 301, 301, 301, 301, 301, 301, + 301, 301, 301, 301, 301, 301, 301, 301, + 301, 301, 301, 301, 301, -1, 301, 301, + 301, 301, 301, 301, -1, 301, 301, 301, + 301, -1, 301, -1, 301, 301, 301, -1, + 301, 301, 301, 301, 301, 301, -1, 301, + 301, 301, 301, 301, 301, 301, 301, 301, + 301, 301, 301, 301, 301, 301, -1, -1, + -1, -1, -1, -1, 301, 301, 301, 301, + -1, -1, -1, 301, 301, -1, 301, 301, + 301, 301, 301, 301, 301, 301, 301, 301, + 301, 301, -1, -1, -1, -1, -1, 301, + -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, 300, -1, -1, 301, 301, + 301, 301, -1, -1, 301, 301, 301, 301, + 301, 301, -1, -1, -1, 301, 301, 301, + 301, 301, -1, -1, -1, -1, 301, -1, + -1, -1, 301, 301, 301, -1, 301, 301, + -1, -1, 301, -1, -1, -1, -1, -1, + -1, -1, -1, 301, 301, 301, 301, 301, + -1, 301, 301, 301, -1, -1, 301, 301, + 301, 301, 301, 301, 301, 301, -1, 301, + 301, 301, -1, -1, -1, 301, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 301, 301, -1, -1, 301, -1, -1, -1, + -1, 301, -1, -1, -1, -1, 301, -1, + 301, 301, 301, 301, 301, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 301, -1, 301, -1, -1, 301, 301, -1, + -1, -1, 301, -1, 301, -1, 301, 302, + 302, 302, 302, 302, 302, 302, 302, 302, + 302, 302, 302, 302, 302, 302, 302, 302, + 302, 302, 302, 302, 302, 302, -1, 302, + 302, 302, 302, 302, 302, -1, 302, 302, + 302, 302, -1, 302, -1, 302, 302, 302, + -1, 302, 302, 302, 302, 302, 302, -1, + 302, 302, 302, 302, 302, 302, 302, 302, + 302, 302, 302, 302, 302, 302, 302, -1, + -1, -1, -1, -1, -1, 302, 302, 302, + 302, -1, -1, -1, 302, 302, -1, 302, + 302, 302, 302, 302, 302, 302, 302, 302, + 302, 302, 302, -1, -1, -1, -1, -1, + 302, -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, 301, -1, -1, 302, + 302, 302, 302, -1, -1, 302, 302, 302, + 302, 302, 302, -1, -1, -1, 302, 302, + 302, 302, 302, -1, -1, -1, -1, 302, + -1, -1, -1, 302, 302, 302, -1, 302, + 302, -1, -1, 302, -1, -1, -1, -1, + -1, -1, -1, -1, 302, 302, 302, 302, + 302, -1, 302, 302, 302, -1, -1, 302, + 302, 302, 302, 302, 302, 302, 302, -1, + 302, 302, 302, -1, -1, -1, 302, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 302, 302, -1, -1, 302, -1, -1, + -1, -1, 302, -1, -1, -1, -1, 302, + -1, 302, 302, 302, 302, 302, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 302, -1, 302, -1, -1, 302, 302, + -1, -1, -1, 302, -1, 302, -1, 302, + 303, 303, 303, 303, 303, 303, 303, 303, + 303, 303, 303, 303, 303, 303, 303, 303, + 303, 303, 303, 303, 303, 303, 303, -1, + 303, 303, 303, 303, 303, 303, -1, 303, + 303, 303, 303, -1, 303, -1, 303, 303, + 303, -1, 303, 303, 303, 303, 303, 303, + -1, 303, 303, 303, 303, 303, 303, 303, + 303, 303, 303, 303, 303, 303, 303, 303, + -1, -1, -1, -1, -1, -1, 303, 303, + 303, 303, -1, -1, -1, 303, 303, -1, + 303, 303, 303, 303, 303, 303, 303, 303, + 303, 303, 303, 303, -1, -1, -1, -1, + -1, 303, -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, 302, -1, -1, + 303, 303, 303, 303, -1, -1, 303, 303, + 303, 303, 303, 303, -1, -1, -1, 303, + 303, 303, 303, 303, -1, -1, -1, -1, + 303, -1, -1, -1, 303, 303, 303, -1, + 303, 303, -1, -1, 303, -1, -1, -1, + -1, -1, -1, -1, -1, 303, 303, 303, + 303, 303, -1, 303, 303, 303, -1, -1, + 303, 303, 303, 303, 303, 303, 303, 303, + -1, 303, 303, 303, -1, -1, -1, 303, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 303, 303, -1, -1, 303, -1, + -1, -1, -1, 303, -1, -1, -1, -1, + 303, -1, 303, 303, 303, 303, 303, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 303, -1, 303, -1, -1, 303, + 303, -1, -1, -1, 303, -1, 303, -1, + 303, 304, 304, 304, 304, 304, 304, 304, + 304, 304, 304, 304, 304, 304, 304, 304, + 304, 304, 304, 304, 304, 304, 304, 304, + -1, 304, 304, 304, 304, 304, 304, -1, + 304, 304, 304, 304, -1, 304, -1, 304, + 304, 304, -1, 304, 304, 304, 304, 304, + 304, -1, 304, 304, 304, 304, 304, 304, + 304, 304, 304, 304, 304, 304, 304, 304, + 304, -1, -1, -1, -1, -1, -1, 304, + 304, 304, 304, -1, -1, -1, 304, 304, + -1, 304, 304, 304, 304, 304, 304, 304, + 304, 304, 304, 304, 304, -1, -1, -1, + -1, -1, 304, -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, 303, -1, + -1, 304, 304, 304, 304, -1, -1, 304, + 304, 304, 304, 304, 304, -1, -1, -1, + 304, 304, 304, 304, 304, -1, -1, -1, + -1, 304, -1, -1, -1, 304, 304, 304, + -1, 304, 304, -1, -1, 304, -1, -1, + -1, -1, -1, -1, -1, -1, 304, 304, + 304, 304, 304, -1, 304, 304, 304, -1, + -1, 304, 304, 304, 304, 304, 304, 304, + 304, -1, 304, 304, 304, -1, -1, -1, + 304, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 304, 304, -1, -1, 304, + -1, -1, -1, -1, 304, -1, -1, -1, + -1, 304, -1, 304, 304, 304, 304, 304, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 304, -1, 304, -1, -1, + 304, 304, -1, -1, -1, 304, -1, 304, + -1, 304, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, + 305, -1, 305, 305, 305, 305, 305, 305, + -1, 305, 305, 305, 305, -1, 305, -1, + 305, 305, 305, -1, 305, 305, 305, 305, + 305, 305, -1, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, -1, -1, -1, -1, -1, -1, + 305, 305, 305, 305, -1, -1, -1, 305, + 305, -1, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, -1, -1, + -1, -1, -1, 305, -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, 304, + -1, -1, 305, 305, 305, 305, -1, -1, + 305, 305, 305, 305, 305, 305, -1, -1, + -1, 305, 305, 305, 305, 305, -1, -1, + -1, -1, 305, -1, -1, -1, 305, 305, + 305, -1, 305, 305, -1, -1, 305, -1, + -1, -1, -1, -1, -1, -1, -1, 305, + 305, 305, 305, 305, -1, 305, 305, 305, + -1, -1, 305, 305, 305, 305, 305, 305, + 305, 305, -1, 305, 305, 305, -1, -1, + -1, 305, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 305, 305, -1, -1, + 305, -1, -1, -1, -1, 305, -1, -1, + -1, -1, 305, -1, 305, 305, 305, 305, + 305, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 305, -1, 305, -1, + -1, 305, 305, -1, -1, -1, 305, -1, + 305, -1, 305, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, -1, 306, 306, 306, 306, 306, + 306, -1, 306, 306, 306, 306, -1, 306, + -1, 306, 306, 306, -1, 306, 306, 306, + 306, 306, 306, -1, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, -1, -1, -1, -1, -1, + -1, 306, 306, 306, 306, -1, -1, -1, + 306, 306, -1, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, -1, + -1, -1, -1, -1, 306, -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, + 305, -1, -1, 306, 306, 306, 306, -1, + -1, 306, 306, 306, 306, 306, 306, -1, + -1, -1, 306, 306, 306, 306, 306, -1, + -1, -1, -1, 306, -1, -1, -1, 306, + 306, 306, -1, 306, 306, -1, -1, 306, + -1, -1, -1, -1, -1, -1, -1, -1, + 306, 306, 306, 306, 306, -1, 306, 306, + 306, -1, -1, 306, 306, 306, 306, 306, + 306, 306, 306, -1, 306, 306, 306, -1, + -1, -1, 306, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 306, 306, -1, + -1, 306, -1, -1, -1, -1, 306, -1, + -1, -1, -1, 306, -1, 306, 306, 306, + 306, 306, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 306, -1, 306, + -1, -1, 306, 306, -1, -1, -1, 306, + -1, 306, -1, 306, 307, 307, 307, 307, + 307, 307, 307, 307, 307, 307, 307, 307, + 307, 307, 307, 307, 307, 307, 307, 307, + 307, 307, 307, -1, 307, 307, 307, 307, + 307, 307, -1, 307, 307, 307, 307, -1, + 307, -1, 307, 307, 307, -1, 307, 307, + 307, 307, 307, 307, -1, 307, 307, 307, + 307, 307, 307, 307, 307, 307, 307, 307, + 307, 307, 307, 307, -1, 307, -1, -1, + -1, -1, 307, 307, 307, 307, 307, -1, + -1, 307, 307, -1, 307, 307, 307, 307, + 307, 307, 307, 307, 307, 307, 307, 307, + -1, -1, -1, -1, -1, 307, -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, 306, -1, -1, 307, 307, 307, 307, + -1, -1, 307, 307, 307, 307, 307, 307, + -1, -1, -1, 307, 307, 307, 307, 307, + -1, -1, -1, -1, 307, -1, -1, -1, + 307, 307, 307, -1, 307, 307, -1, -1, + 307, -1, -1, -1, -1, -1, -1, -1, + -1, 307, 307, 307, 307, 307, -1, 307, + 307, 307, -1, -1, 307, 307, 307, 307, + 307, 307, 307, 307, -1, 307, 307, 307, + -1, -1, -1, 307, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 307, 307, + -1, -1, 307, -1, -1, -1, -1, 307, + -1, -1, -1, -1, 307, -1, 307, 307, + 307, 307, 307, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 307, -1, + 307, -1, -1, 307, 307, -1, -1, -1, + 307, -1, 307, -1, 307, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, -1, 308, 308, 308, + 308, 308, 308, -1, 308, 308, 308, 308, + -1, 308, -1, 308, 308, 308, -1, 308, + 308, 308, 308, 308, 308, -1, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, -1, 308, -1, + -1, -1, -1, 308, 308, 308, 308, 308, + -1, -1, 308, 308, -1, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, -1, -1, -1, -1, -1, 308, -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, 307, -1, -1, 308, 308, 308, + 308, -1, -1, 308, 308, 308, 308, 308, + 308, -1, -1, -1, 308, 308, 308, 308, + 308, -1, -1, -1, -1, 308, -1, -1, + -1, 308, 308, 308, -1, 308, 308, -1, + -1, 308, -1, -1, -1, -1, -1, -1, + -1, -1, 308, 308, 308, 308, 308, -1, + 308, 308, 308, -1, -1, 308, 308, 308, + 308, 308, 308, 308, 308, -1, 308, 308, + 308, -1, -1, -1, 308, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 308, + 308, -1, -1, 308, -1, -1, -1, -1, + 308, -1, -1, -1, -1, 308, -1, 308, + 308, 308, 308, 308, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 308, + -1, 308, -1, -1, 308, 308, -1, -1, + -1, 308, -1, 308, -1, 308, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, + 309, 309, 309, 309, 309, -1, 309, 309, + 309, 309, 309, 309, -1, 309, 309, 309, + 309, -1, 309, -1, 309, 309, 309, -1, + 309, 309, 309, 309, 309, 309, -1, 309, + 309, 309, 309, 309, 309, 309, 309, 309, + 309, 309, 309, 309, 309, 309, -1, 309, + -1, -1, -1, -1, 309, 309, 309, 309, + 309, -1, -1, 309, 309, -1, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, + 309, 309, -1, -1, -1, -1, -1, 309, + -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, 308, -1, -1, 309, 309, + 309, 309, -1, -1, 309, 309, 309, 309, + 309, 309, -1, -1, -1, 309, 309, 309, + 309, 309, -1, -1, -1, -1, 309, -1, + -1, -1, 309, 309, 309, -1, 309, 309, + -1, -1, 309, -1, -1, -1, -1, -1, + -1, -1, -1, 309, 309, 309, 309, 309, + -1, 309, 309, 309, -1, -1, 309, 309, + 309, 309, 309, 309, 309, 309, -1, 309, + 309, 309, -1, -1, -1, 309, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 309, 309, -1, -1, 309, -1, -1, -1, + -1, 309, -1, -1, -1, -1, 309, -1, + 309, 309, 309, 309, 309, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 309, -1, 309, -1, -1, 309, 309, -1, + -1, -1, 309, -1, 309, -1, 309, 310, + 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 310, 310, -1, 310, + 310, 310, 310, 310, 310, -1, 310, 310, + 310, 310, -1, 310, -1, 310, 310, 310, + -1, 310, 310, 310, 310, 310, 310, -1, + 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 310, -1, + 310, -1, -1, -1, -1, 310, 310, 310, + 310, 310, -1, -1, 310, 310, -1, 310, + 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, -1, -1, -1, -1, -1, + 310, -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, 309, -1, -1, 310, + 310, 310, 310, -1, -1, 310, 310, 310, + 310, 310, 310, -1, -1, -1, 310, 310, + 310, 310, 310, -1, -1, -1, -1, 310, + -1, -1, -1, 310, 310, 310, -1, 310, + 310, -1, -1, 310, -1, -1, -1, -1, + -1, -1, -1, -1, 310, 310, 310, 310, + 310, -1, 310, 310, 310, -1, -1, 310, + 310, 310, 310, 310, 310, 310, 310, -1, + 310, 310, 310, -1, -1, -1, 310, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 310, 310, -1, -1, 310, -1, -1, + -1, -1, 310, -1, -1, -1, -1, 310, + -1, 310, 310, 310, 310, 310, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 310, -1, 310, -1, -1, 310, 310, + -1, -1, -1, 310, -1, 310, -1, 310, + 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, -1, + 311, 311, 311, 311, 311, 311, -1, 311, + 311, 311, 311, -1, 311, -1, 311, 311, + 311, -1, 311, 311, 311, 311, 311, 311, + -1, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, + -1, 311, -1, -1, -1, -1, 311, 311, + 311, 311, 311, -1, -1, 311, 311, -1, + 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, -1, -1, -1, -1, + -1, 311, -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, 310, -1, -1, + 311, 311, 311, 311, -1, -1, 311, 311, + 311, 311, 311, 311, -1, -1, -1, 311, + 311, 311, 311, 311, -1, -1, -1, -1, + 311, -1, -1, -1, 311, 311, 311, -1, + 311, 311, -1, -1, 311, -1, -1, -1, + -1, -1, -1, -1, -1, 311, 311, 311, + 311, 311, -1, 311, 311, 311, -1, -1, + 311, 311, 311, 311, 311, 311, 311, 311, + -1, 311, 311, 311, -1, -1, -1, 311, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 311, 311, -1, -1, 311, -1, + -1, -1, -1, 311, -1, -1, -1, -1, + 311, -1, 311, 311, 311, 311, 311, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 311, -1, 311, -1, -1, 311, + 311, -1, -1, -1, 311, -1, 311, -1, + 311, 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, -1, + 312, 312, 312, 312, 312, 312, -1, 312, + 312, 312, -1, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, -1, 312, 312, 312, 312, + -1, -1, -1, -1, -1, -1, -1, 312, + 312, -1, 312, -1, -1, 312, -1, -1, + -1, -1, 312, -1, -1, 312, 312, 312, + 312, -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, 312, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 311, -1, + -1, 312, 312, 312, 312, -1, -1, 312, + 312, 312, 312, 312, 312, -1, 312, 312, + 312, 312, 312, 312, 312, -1, -1, 312, + -1, 312, 312, -1, 312, 312, 312, 312, + -1, 312, 312, -1, -1, 312, -1, -1, + -1, -1, -1, 312, -1, 312, 312, 312, + 312, 312, -1, -1, -1, 312, 312, -1, + 312, 312, 312, 312, 312, 312, 312, 312, + 312, -1, 312, 312, 312, -1, -1, 312, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 312, 312, 312, -1, -1, 312, 312, + 312, -1, -1, 312, 312, 312, 312, 312, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 312, -1, 312, 312, 312, + 312, -1, 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, + -1, 314, 314, 314, 314, 314, 314, -1, + 314, 314, 314, -1, 314, 314, 314, 314, + 314, 314, 314, 314, 314, 314, 314, 314, + 314, 314, 314, 314, 314, 314, 314, 314, + 314, 314, -1, -1, -1, -1, -1, -1, + 314, 314, -1, 314, -1, -1, 314, -1, + -1, -1, -1, 314, -1, -1, 314, 314, + 314, 314, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 314, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 314, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 314, 314, 314, 314, -1, 312, + 314, 314, 314, 314, 314, 314, -1, 314, + 314, 314, 314, 314, 314, 314, -1, -1, + 314, -1, 314, 314, -1, 314, 314, 314, + 314, -1, 314, 314, -1, -1, 314, 314, + 314, -1, -1, -1, 314, -1, 314, 314, + 314, 314, 314, -1, -1, -1, 314, 314, + -1, 314, 314, 314, 314, 314, 314, 314, + 314, 314, -1, 314, 314, 314, -1, -1, + 314, -1, 314, -1, -1, -1, 314, 314, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 314, 314, 314, -1, -1, 314, + 314, 314, -1, -1, 314, 314, 314, 314, + 314, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 314, -1, 314, 314, + 314, 314, -1, -1, 314, -1, -1, -1, + -1, 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, -1, + 315, 315, 315, 315, 315, 315, -1, 315, + 315, 315, -1, 315, 315, 315, 315, 315, + 315, 315, 315, 315, 315, 315, 315, 315, + 315, 315, 315, 315, 315, 315, 315, 315, + 315, -1, -1, -1, -1, -1, -1, 315, + 315, -1, 315, -1, -1, 315, -1, -1, + -1, -1, 315, -1, -1, 315, 315, 315, + 315, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 315, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 315, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 314, 315, 315, 315, 315, -1, -1, 315, + 315, 315, 315, 315, 315, -1, 315, 315, + 315, 315, 315, 315, 315, -1, -1, 315, + -1, 315, 315, -1, 315, 315, 315, 315, + -1, 315, 315, -1, -1, 315, 315, 315, + -1, -1, -1, 315, -1, 315, 315, 315, + 315, 315, -1, -1, -1, 315, 315, -1, + 315, 315, 315, 315, 315, 315, 315, 315, + 315, -1, 315, 315, 315, -1, -1, 315, + -1, 315, -1, -1, -1, 315, 315, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 315, 315, 315, -1, -1, 315, 315, + 315, -1, -1, 315, 315, 315, 315, 315, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 315, -1, 315, 315, 315, + 315, -1, -1, 315, -1, -1, -1, -1, + 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, -1, 316, + 316, 316, 316, 316, 316, -1, 316, 316, + 316, -1, 316, 316, 316, 316, 316, 316, + 316, 316, 316, 316, 316, 316, 316, 316, + 316, 316, 316, 316, 316, 316, 316, 316, + -1, -1, -1, -1, -1, -1, 316, 316, + -1, 316, -1, -1, 316, -1, -1, -1, + -1, 316, -1, -1, 316, 316, 316, 316, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 316, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 316, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 315, + 316, 316, 316, 316, -1, -1, 316, 316, + 316, 316, 316, 316, -1, 316, 316, 316, + 316, 316, 316, 316, -1, -1, 316, -1, + 316, 316, -1, 316, 316, 316, 316, -1, + 316, 316, -1, -1, 316, 316, 316, -1, + -1, -1, 316, -1, 316, 316, 316, 316, + 316, -1, -1, -1, 316, 316, -1, 316, + 316, 316, 316, 316, 316, 316, 316, 316, + -1, 316, 316, 316, -1, -1, 316, -1, + 316, -1, -1, -1, 316, 316, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 316, 316, 316, -1, -1, 316, 316, 316, + -1, -1, 316, 316, 316, 316, 316, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 316, -1, 316, 316, 316, 316, + -1, -1, 316, -1, -1, -1, -1, 318, + 318, 318, 318, 318, 318, 318, 318, 318, + 318, 318, 318, 318, 318, 318, 318, 318, + 318, 318, 318, 318, 318, 318, -1, 318, + 318, 318, 318, 318, 318, -1, 318, 318, + 318, 318, -1, 318, -1, 318, 318, 318, + -1, 318, 318, 318, 318, 318, 318, -1, + 318, 318, 318, 318, 318, 318, 318, 318, + 318, -1, 318, 318, 318, 318, -1, -1, + -1, -1, -1, -1, -1, 318, -1, -1, + 318, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 318, 318, 318, 318, -1, + -1, 318, 318, -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, 316, 318, + 318, 318, 318, -1, -1, 318, 318, -1, + 318, 318, 318, -1, -1, -1, 318, 318, + -1, 318, 318, -1, -1, -1, -1, 318, + -1, -1, -1, 318, 318, 318, -1, 318, + 318, -1, -1, 318, -1, -1, -1, -1, + -1, -1, -1, -1, 318, 318, 318, 318, + -1, -1, -1, 318, 318, -1, -1, 318, + 318, 318, 318, 318, 318, 318, 318, -1, + 318, 318, 318, -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, 318, 318, 318, 318, 318, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 318, -1, -1, -1, -1, 318, -1, + 342, 342, 342, 342, 342, 342, 342, 342, + 342, 342, 342, 342, 342, 342, 342, 342, + 342, 342, 342, 342, 342, 342, 342, -1, + 342, 342, 342, 342, 342, 342, -1, 342, + 342, 342, 342, -1, 342, -1, 342, 342, + 342, -1, 342, 342, 342, 342, 342, 342, + -1, 342, 342, 342, 342, 342, 342, 342, + 342, 342, -1, 342, 342, 342, 342, -1, + -1, -1, -1, -1, -1, -1, 342, -1, + -1, 342, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 342, 342, 342, 342, + -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, + 342, 342, 342, 342, -1, 318, 342, 342, + -1, 342, 342, 342, -1, -1, -1, 342, + 342, -1, 342, 342, -1, -1, -1, -1, + 342, -1, -1, -1, 342, 342, 342, -1, + 342, 342, -1, -1, 342, -1, -1, -1, + -1, -1, -1, -1, -1, 342, 342, 342, + 342, -1, -1, -1, 342, 342, -1, -1, + 342, 342, 342, 342, 342, 342, 342, 342, + -1, 342, 342, 342, -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, 342, 342, 342, 342, 342, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 342, -1, -1, -1, -1, 342, + -1, 344, 344, 344, 344, 344, 344, 344, + 344, 344, 344, 344, 344, 344, 344, 344, + 344, 344, 344, 344, 344, 344, 344, 344, + -1, 344, 344, 344, 344, 344, 344, -1, + 344, 344, 344, 344, -1, 344, -1, 344, + 344, 344, -1, 344, 344, 344, 344, 344, + 344, -1, 344, 344, 344, 344, 344, 344, + 344, 344, 344, -1, 344, 344, 344, 344, + -1, -1, -1, -1, -1, -1, -1, 344, + -1, -1, 344, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 344, 344, 344, + 344, -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, 344, 344, 344, 344, -1, 342, 344, + 344, -1, 344, 344, 344, -1, -1, -1, + 344, 344, -1, 344, 344, -1, -1, -1, + -1, 344, -1, -1, -1, 344, 344, 344, + -1, 344, 344, -1, -1, 344, -1, -1, + -1, -1, -1, -1, -1, -1, 344, 344, + 344, 344, -1, -1, -1, 344, 344, -1, + -1, 344, 344, 344, 344, 344, 344, 344, + 344, -1, 344, 344, 344, -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, 344, 344, 344, 344, 344, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 344, -1, -1, -1, -1, + 344, -1, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, + 345, -1, 345, 345, 345, 345, 345, 345, + -1, 345, 345, 345, 345, -1, 345, -1, + 345, 345, 345, -1, 345, 345, 345, 345, + 345, 345, -1, 345, 345, 345, 345, 345, + 345, 345, 345, 345, -1, 345, 345, 345, + 345, -1, -1, -1, -1, -1, -1, -1, + 345, -1, -1, 345, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 345, 345, + 345, 345, -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, 345, 345, 345, 345, -1, 344, + 345, 345, -1, 345, 345, 345, -1, -1, + -1, 345, 345, -1, 345, 345, -1, -1, + -1, -1, 345, -1, -1, -1, 345, 345, + 345, -1, 345, 345, -1, -1, 345, -1, + -1, -1, -1, -1, -1, -1, -1, 345, + 345, 345, 345, -1, -1, -1, 345, 345, + -1, -1, 345, 345, 345, 345, 345, 345, + 345, 345, -1, 345, 345, 345, -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, 345, 345, 345, 345, + 345, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 345, -1, -1, -1, + -1, 345, -1, 346, 346, 346, 346, 346, + 346, 346, 346, 346, 346, 346, 346, 346, + 346, 346, 346, 346, 346, 346, 346, 346, + 346, 346, -1, 346, 346, 346, 346, 346, + 346, -1, 346, 346, 346, 346, -1, 346, + -1, 346, 346, 346, -1, 346, 346, 346, + 346, 346, 346, -1, 346, 346, 346, 346, + 346, 346, 346, 346, 346, -1, 346, 346, + 346, 346, -1, -1, -1, -1, -1, -1, + -1, 346, -1, -1, 346, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 346, + 346, 346, 346, 401, 401, 401, 401, -1, + 401, -1, -1, -1, -1, -1, -1, -1, + -1, 401, 401, 401, 401, 401, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 401, + -1, -1, -1, 401, 401, 401, 401, -1, + -1, -1, 401, 401, 401, -1, -1, -1, + -1, 401, 401, -1, 401, 401, 401, 401, + -1, -1, -1, 346, 346, 346, 346, 401, + 345, 346, 346, -1, 346, 346, 346, -1, + -1, -1, 346, 346, -1, 346, 346, -1, + -1, -1, -1, 346, -1, -1, -1, 346, + 346, 346, -1, 346, 346, -1, -1, 346, + -1, -1, -1, -1, -1, -1, -1, -1, + 346, 346, 346, 346, -1, -1, -1, 346, + 346, -1, -1, 346, 346, 346, 346, 346, + 346, 346, 346, -1, 346, 346, 346, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 348, 348, 348, 348, + -1, 348, -1, -1, -1, 346, 346, 346, + 346, 346, 348, 348, 348, 348, 348, -1, + -1, -1, -1, -1, -1, 346, -1, -1, + 348, -1, 346, -1, 348, 348, 348, 348, + -1, -1, -1, 348, 348, 348, -1, -1, + -1, -1, 348, 348, -1, 348, 348, 348, + 348, -1, 401, 401, 401, -1, -1, -1, + 348, 348, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 348, 348, + 348, 348, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 401, 401, 401, 401, 401, + -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, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 346, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 348, 348, 348, + 348, 348, -1, 348, 348, 348, -1, -1, + -1, 348, -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, 348, 348, 348, 348, + 348, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 348, 364, 364, 364, 364, 364, + 364, 364, 364, 364, 364, 364, 364, 364, + 364, 364, 364, 364, 364, 364, 364, 364, + 364, 364, -1, 364, 364, 364, 364, 364, + 364, -1, 364, 364, 364, 364, -1, 364, + -1, 364, 364, 364, -1, 364, 364, 364, + 364, 364, 364, -1, 364, 364, 364, 364, + 364, 364, 364, 364, 364, 364, 364, 364, + 364, 364, 364, -1, 364, -1, -1, -1, + -1, 364, 364, 364, 364, 364, -1, -1, + 364, 364, -1, 364, 364, 364, 364, 364, + 364, 364, 364, 364, 364, 364, 364, -1, + -1, -1, -1, -1, 364, -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, 364, 364, 364, 364, -1, + -1, 364, 364, 364, 364, 364, 364, -1, + -1, -1, 364, 364, 364, 364, 364, -1, + -1, -1, -1, 364, -1, -1, -1, 364, + 364, 364, -1, 364, 364, -1, -1, 364, + -1, -1, -1, -1, -1, -1, -1, -1, + 364, 364, 364, 364, 364, -1, 364, 364, + 364, 364, -1, 364, 364, 364, 364, 364, + 364, 364, 364, -1, 364, 364, 364, -1, + -1, -1, 364, -1, -1, -1, -1, -1, + -1, -1, 364, -1, -1, 364, 364, -1, + -1, 364, -1, -1, -1, -1, 364, -1, + -1, -1, -1, 364, -1, 364, 364, 364, + 364, 364, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 364, -1, 364, + -1, -1, 364, 364, -1, -1, -1, 364, + -1, 364, -1, 364, -1, -1, -1, -1, + 368, 368, 368, 368, -1, 368, -1, -1, + -1, -1, -1, -1, -1, -1, 368, 368, + 368, 368, 368, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 368, -1, -1, -1, + 368, 368, 368, 368, -1, -1, -1, 368, + 368, 368, -1, -1, -1, -1, 368, 368, + -1, 368, 368, 368, 368, -1, -1, -1, + -1, -1, -1, -1, 368, -1, -1, -1, + -1, -1, -1, -1, 401, 401, 401, -1, + -1, -1, 368, 368, 368, 368, 372, 372, + 372, 372, -1, 372, -1, -1, -1, 368, + -1, -1, -1, -1, 372, 372, 372, 372, + 372, -1, -1, -1, -1, 401, 401, 401, + 401, 401, 372, -1, -1, -1, 372, 372, + 372, 372, -1, -1, -1, 372, 372, 372, + -1, -1, -1, -1, 372, 372, -1, 372, + 372, 372, 372, 372, -1, -1, -1, -1, + -1, 364, 372, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 372, 372, 372, 372, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 372, -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, 368, 368, 368, 368, 368, -1, 368, + 368, 368, -1, -1, -1, -1, -1, 348, + 348, 348, 348, 348, -1, 348, 348, 348, + 368, 368, -1, 348, -1, -1, -1, -1, + -1, 368, -1, -1, -1, -1, -1, -1, + 368, 368, 368, 368, 368, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 348, 348, + 348, 348, 348, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 368, -1, -1, -1, + -1, -1, -1, -1, 348, -1, -1, 372, + 372, 372, 372, 372, -1, 372, 372, 372, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 372, 372, + -1, -1, -1, -1, -1, -1, -1, 372, + -1, -1, -1, -1, -1, -1, 372, 372, + 372, 372, 372, 374, 374, 374, 374, -1, + 374, -1, -1, -1, -1, -1, -1, -1, + -1, 374, 374, 374, 374, 374, -1, -1, + -1, -1, 372, -1, -1, -1, -1, 374, + -1, -1, -1, 374, 374, 374, 374, -1, + -1, -1, 374, 374, 374, -1, -1, -1, + -1, 374, 374, -1, 374, 374, 374, 374, + -1, -1, -1, -1, -1, -1, -1, 374, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 374, 374, 374, + 374, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 375, 375, 375, 375, 375, 375, 375, 375, + 375, 375, 375, 375, 375, 375, 375, 375, + 375, 375, 375, 375, 375, 375, 375, -1, + 375, 375, 375, 375, 375, 375, -1, 375, + 375, 375, 375, -1, 375, -1, 375, 375, + 375, 375, 375, 375, 375, 375, 375, 375, + -1, 375, 375, 375, 375, 375, 375, 375, + 375, 375, 375, 375, 375, 375, 375, 375, + -1, 375, -1, -1, 375, -1, 375, 375, + 375, 375, 375, -1, -1, 375, 375, -1, + 375, 375, 375, 375, 375, 375, 375, 375, + 375, 375, 375, 375, -1, -1, -1, -1, + -1, 375, -1, -1, 374, 374, 374, 374, + 374, -1, 374, 374, 374, -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, 374, 374, 374, 374, 374, + 375, 375, 375, 375, -1, -1, 375, 375, + 375, 375, 375, 375, -1, -1, -1, 375, + 375, 375, 375, 375, -1, -1, -1, -1, + 375, -1, -1, -1, 375, 375, 375, -1, + 375, 375, -1, -1, 375, -1, -1, -1, + -1, -1, -1, -1, -1, 375, 375, 375, + 375, 375, -1, 375, 375, 375, -1, -1, + 375, 375, 375, 375, 375, 375, 375, 375, + 375, 375, 375, 375, -1, -1, -1, 375, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 375, 375, -1, -1, 375, -1, + -1, -1, -1, 375, -1, -1, -1, -1, + 375, -1, 375, 375, 375, 375, 375, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 375, -1, 375, -1, -1, 375, + 375, -1, -1, -1, 375, -1, 375, -1, + 375, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 444, 444, 444, 444, + -1, 444, -1, -1, -1, -1, -1, -1, + -1, -1, 444, 444, 444, 444, 444, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 444, -1, -1, -1, 444, 444, 444, 444, + -1, -1, -1, 444, 444, 444, -1, -1, + -1, -1, 444, 444, -1, 444, 444, 444, + 444, -1, -1, -1, -1, -1, -1, -1, + 444, 444, -1, -1, -1, -1, -1, -1, + -1, -1, 368, 368, -1, -1, 444, 444, + 444, 444, -1, 368, 444, 444, -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, 368, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 375, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 372, 372, -1, -1, -1, -1, -1, -1, + -1, 372, -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, 372, 444, 444, 444, + 444, 444, -1, 444, 444, 444, -1, -1, + -1, 444, -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, 444, 444, 444, 444, + 444, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 444, -1, -1, -1, -1, -1, + -1, -1, 376, 376, 376, 376, 376, 376, + 376, 376, 376, 376, 376, 376, 376, 376, + 376, 376, 376, 376, 376, 376, 376, 376, + 376, -1, 376, 376, 376, 376, 376, 376, + -1, 376, 376, 376, 376, -1, 376, -1, + 376, 376, 376, -1, 376, 376, 376, 376, + 376, 376, -1, 376, 376, 376, 376, 376, + 376, 376, 376, 376, 376, 376, 376, 376, + 376, 376, -1, 376, -1, -1, -1, -1, + 376, 376, 376, 376, 376, -1, -1, 376, + 376, -1, 376, 376, 376, 376, 376, 376, + 376, 376, 376, 376, 376, 376, -1, -1, + -1, -1, -1, 376, -1, -1, 374, 374, + 374, 374, 374, -1, 374, 374, 374, -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, 374, 374, 374, + 374, 374, 376, 376, 376, 376, -1, -1, + 376, 376, 376, 376, 376, 376, -1, -1, + -1, 376, 376, 376, 376, 376, -1, -1, + -1, -1, 376, -1, -1, -1, 376, 376, + 376, -1, 376, 376, -1, -1, 376, -1, + -1, -1, -1, -1, -1, -1, -1, 376, + 376, 376, 376, 376, -1, 376, 376, 376, + -1, -1, 376, 376, 376, 376, 376, 376, + 376, 376, -1, 376, 376, 376, -1, -1, + -1, 376, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 376, 376, -1, -1, + 376, -1, -1, -1, -1, 376, -1, -1, + -1, -1, 376, -1, 376, 376, 376, 376, + 376, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 376, -1, 376, -1, + -1, 376, 376, -1, -1, -1, 376, -1, + 376, -1, 376, 377, 377, 377, 377, 377, + 377, 377, 377, 377, 377, 377, 377, 377, + 377, 377, 377, 377, 377, 377, 377, 377, + 377, 377, -1, 377, 377, 377, 377, 377, + 377, -1, 377, 377, 377, 377, -1, 377, + -1, 377, 377, 377, -1, 377, 377, 377, + 377, 377, 377, -1, 377, 377, 377, 377, + 377, 377, 377, 377, 377, 377, 377, 377, + 377, 377, 377, -1, 377, -1, -1, -1, + -1, 377, 377, 377, 377, 377, -1, -1, + 377, 377, -1, 377, 377, 377, 377, 377, + 377, 377, 377, 377, 377, 377, 377, -1, + -1, -1, -1, -1, 377, -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, + 376, -1, -1, 377, 377, 377, 377, -1, + -1, 377, 377, 377, 377, 377, 377, -1, + -1, -1, 377, 377, 377, 377, 377, -1, + -1, -1, -1, 377, -1, -1, -1, 377, + 377, 377, -1, 377, 377, -1, -1, 377, + -1, -1, -1, -1, -1, -1, -1, -1, + 377, 377, 377, 377, 377, -1, 377, 377, + 377, -1, -1, 377, 377, 377, 377, 377, + 377, 377, 377, -1, 377, 377, 377, -1, + -1, -1, 377, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 377, 377, -1, + -1, 377, -1, -1, -1, -1, 377, -1, + -1, -1, -1, 377, -1, 377, 377, 377, + 377, 377, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 377, -1, 377, + -1, -1, 377, 377, -1, -1, -1, 377, + -1, 377, -1, 377, 378, 378, 378, 378, + 378, 378, 378, 378, 378, 378, 378, 378, + 378, 378, 378, 378, 378, 378, 378, 378, + 378, 378, 378, -1, 378, 378, 378, 378, + 378, 378, -1, 378, 378, 378, 378, -1, + 378, -1, 378, 378, 378, -1, 378, 378, + 378, 378, 378, 378, -1, 378, 378, 378, + 378, 378, 378, 378, 378, 378, 378, 378, + 378, 378, 378, 378, -1, 378, -1, -1, + -1, -1, 378, 378, 378, 378, 378, -1, + -1, 378, 378, -1, 378, 378, 378, 378, + 378, 378, 378, 378, 378, 378, 378, 378, + -1, -1, -1, -1, -1, 378, -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, 377, -1, -1, 378, 378, 378, 378, + -1, -1, 378, 378, 378, 378, 378, 378, + -1, -1, -1, 378, 378, 378, 378, 378, + -1, -1, -1, -1, 378, -1, -1, -1, + 378, 378, 378, -1, 378, 378, -1, -1, + 378, -1, -1, -1, -1, -1, -1, -1, + -1, 378, 378, 378, 378, 378, -1, 378, + 378, 378, -1, -1, 378, 378, 378, 378, + 378, 378, 378, 378, -1, 378, 378, 378, + -1, -1, -1, 378, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 378, 378, + -1, -1, 378, -1, -1, -1, -1, 378, + -1, -1, -1, -1, 378, -1, 378, 378, + 378, 378, 378, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 378, -1, + 378, -1, -1, 378, 378, -1, -1, -1, + 378, -1, 378, -1, 378, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, -1, 380, 380, 380, 380, + 380, 380, -1, -1, -1, 380, 380, 380, + 380, 380, 380, -1, 380, 380, 380, 380, + -1, 380, -1, 380, 380, 380, -1, 380, + 380, 380, 380, 380, 380, -1, 380, 380, + 380, 380, 380, 380, 380, 380, 380, -1, + 380, 380, 380, 380, -1, -1, -1, -1, + -1, -1, -1, 380, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 380, 380, 380, 380, -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, 378, -1, -1, 380, 380, 380, + 380, -1, -1, 380, 380, -1, 380, 380, + 380, -1, -1, -1, 380, 380, -1, 380, + 380, -1, -1, -1, -1, 380, 380, -1, + -1, 380, 380, 380, -1, 380, 380, -1, + -1, 380, -1, -1, -1, -1, -1, -1, + -1, -1, 380, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 380, 380, 380, + 380, 380, 380, 380, 380, -1, 380, 380, + 380, -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, 380, + 380, 380, 380, 380, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 380, + -1, -1, 380, 383, 383, 383, 383, 383, + 383, 383, 383, 383, 383, 383, 383, 383, + 383, 383, 383, 383, 383, 383, 383, 383, + 383, 383, -1, 383, 383, 383, 383, 383, + 383, -1, 383, 383, 383, 383, -1, 383, + -1, 383, 383, 383, -1, 383, 383, 383, + 383, 383, 383, -1, 383, 383, 383, 383, + 383, 383, 383, 383, 383, -1, 383, 383, + 383, 383, -1, -1, -1, -1, -1, -1, + -1, 383, -1, -1, 383, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 383, + 383, 383, 383, -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, 383, 383, 383, 383, -1, + -1, 383, 383, 380, 383, 383, 383, -1, + -1, -1, 383, 383, -1, 383, 383, -1, + -1, -1, -1, 383, -1, -1, -1, 383, + 383, 383, -1, 383, 383, -1, -1, 383, + -1, -1, -1, -1, -1, -1, -1, -1, + 383, 383, 383, 383, -1, -1, -1, 383, + 383, -1, -1, 383, 383, 383, 383, 383, + 383, 383, 383, -1, 383, 383, 383, -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, 383, 383, 383, + 383, 383, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 383, -1, -1, + -1, -1, 383, -1, 384, 384, 384, 384, + 384, 384, 384, 384, 384, 384, 384, 384, + 384, 384, 384, 384, 384, 384, 384, 384, + 384, 384, 384, -1, 384, 384, 384, 384, + 384, 384, -1, 384, 384, 384, 384, -1, + 384, -1, 384, 384, 384, -1, 384, 384, + 384, 384, 384, 384, -1, 384, 384, 384, + 384, 384, 384, 384, 384, 384, -1, 384, + 384, 384, 384, -1, -1, -1, -1, -1, + -1, -1, 384, -1, -1, 384, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 384, 384, 384, 384, -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, 384, 384, 384, 384, + -1, 383, 384, 384, -1, 384, 384, 384, + -1, -1, -1, 384, 384, -1, 384, 384, + -1, -1, -1, -1, 384, -1, -1, -1, + 384, 384, 384, -1, 384, 384, -1, -1, + 384, -1, -1, -1, -1, -1, -1, -1, + -1, 384, 384, 384, 384, -1, -1, -1, + 384, 384, -1, -1, 384, 384, 384, 384, + 384, 384, 384, 384, -1, 384, 384, 384, + -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, 384, 384, + 384, 384, 384, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 384, -1, + -1, -1, -1, 384, -1, 385, 385, 385, + 385, 385, 385, 385, 385, 385, 385, 385, + 385, 385, 385, 385, 385, 385, 385, 385, + 385, 385, 385, 385, -1, 385, 385, 385, + 385, 385, 385, -1, 385, 385, 385, 385, + -1, 385, -1, 385, 385, 385, -1, 385, + 385, 385, 385, 385, 385, -1, 385, 385, + 385, 385, 385, 385, 385, 385, 385, -1, + 385, 385, 385, 385, -1, -1, -1, -1, + -1, -1, -1, 385, -1, -1, 385, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 385, 385, 385, 385, -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, 385, 385, 385, + 385, -1, 384, 385, 385, -1, 385, 385, + 385, -1, -1, -1, 385, 385, -1, 385, + 385, -1, -1, -1, -1, 385, -1, -1, + -1, 385, 385, 385, -1, 385, 385, -1, + -1, 385, -1, -1, -1, -1, -1, -1, + -1, -1, 385, 385, 385, 385, -1, -1, + -1, 385, 385, -1, -1, 385, 385, 385, + 385, 385, 385, 385, 385, -1, 385, 385, + 385, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 386, 386, + 386, 386, -1, 386, -1, -1, -1, 385, + 385, 385, 385, 385, 386, 386, 386, 386, + 386, -1, -1, -1, -1, -1, -1, 385, + -1, -1, 386, -1, 385, -1, 386, 386, + 386, 386, -1, -1, -1, 386, 386, 386, + -1, -1, -1, -1, 386, 386, -1, 386, + 386, 386, 386, -1, -1, -1, -1, -1, + -1, -1, 386, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 386, 386, 386, 386, 387, 387, 387, 387, + 387, 387, 387, 387, -1, 387, -1, 387, + 387, 387, 387, -1, -1, -1, 387, 387, + 387, 387, 387, -1, -1, -1, 387, 387, + 387, -1, -1, -1, 387, -1, -1, -1, + 387, 387, 387, 387, -1, -1, -1, 387, + 387, 387, -1, -1, -1, -1, 387, 387, + -1, 387, 387, 387, 387, -1, -1, -1, + -1, -1, -1, -1, 387, -1, 387, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 387, 387, 387, 387, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 385, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 386, + 386, 386, 386, 386, -1, 386, 386, 386, + -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, 386, 386, + 386, 386, 386, -1, 384, 384, 384, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 387, -1, -1, -1, -1, + -1, 387, -1, -1, -1, -1, 387, 387, + 387, 387, 387, 387, 387, 387, -1, 387, + 387, 387, -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, + 387, 387, 387, 387, 387, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, -1, 388, 388, 388, 388, + 388, 388, -1, 388, 388, 388, -1, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, -1, + 388, 388, 388, 388, -1, -1, -1, -1, + -1, -1, -1, 388, 388, -1, 388, -1, + -1, 388, -1, -1, -1, -1, 388, -1, + -1, 388, 388, 388, 388, -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, 388, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 388, 388, 388, + 388, -1, -1, 388, 388, 388, 388, 388, + 388, -1, 388, 388, 388, 388, 388, 388, + 388, -1, -1, 388, -1, 388, 388, -1, + 388, 388, 388, 388, -1, 388, 388, -1, + -1, 388, -1, -1, -1, -1, -1, 388, + -1, 388, 388, 388, 388, 388, -1, -1, + -1, 388, 388, -1, 388, 388, 388, 388, + 388, 388, 388, 388, 388, -1, 388, 388, + 388, -1, -1, 388, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 388, 388, 388, + -1, -1, 388, 388, 388, -1, -1, 388, + 388, 388, 388, 388, -1, -1, -1, -1, + 475, 475, 475, 475, -1, 475, -1, 388, + -1, 388, 388, 388, 388, -1, 475, 475, + 475, 475, 475, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 475, -1, -1, -1, + 475, 475, 475, 475, -1, -1, -1, 475, + 475, 475, -1, -1, -1, -1, 475, 475, + -1, 475, 475, 475, 475, 475, -1, -1, + -1, -1, -1, -1, 475, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 475, 475, 475, 475, -1, -1, + 475, 475, -1, -1, -1, -1, -1, 475, + -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, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 388, -1, -1, -1, -1, + -1, 386, 386, 386, 386, 386, -1, 386, + 386, 386, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 475, 475, 475, 475, 475, -1, 475, + 475, 475, -1, -1, -1, -1, -1, -1, + 386, 386, 386, 386, 386, -1, -1, -1, + 475, 475, -1, -1, -1, -1, -1, -1, + -1, 475, -1, -1, -1, -1, -1, -1, + 475, 475, 475, 475, 475, 387, -1, -1, + -1, -1, -1, 387, -1, -1, -1, -1, + 387, 387, 387, 387, 387, 387, 387, 387, + -1, 387, 387, 387, 475, -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, 387, 387, 387, 387, 387, 389, + 389, 389, 389, 389, 389, 389, 389, 389, + 389, 389, 389, 389, 389, 389, 389, 389, + 389, 389, 389, 389, 389, 389, 389, 389, + 389, 389, 389, 389, 389, -1, 389, 389, + 389, 389, 389, 389, -1, 389, 389, 389, + -1, 389, 389, 389, 389, 389, 389, 389, + 389, 389, 389, 389, 389, 389, 389, 389, + 389, -1, 389, 389, 389, 389, -1, -1, + -1, -1, -1, -1, -1, 389, 389, -1, + 389, -1, -1, 389, -1, -1, -1, -1, + 389, -1, -1, 389, 389, 389, 389, -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, 389, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 389, + 389, 389, 389, -1, -1, 389, 389, 389, + 389, 389, 389, -1, 389, 389, 389, 389, + 389, 389, 389, -1, -1, 389, -1, 389, + 389, -1, 389, 389, 389, 389, -1, 389, + 389, -1, -1, 389, -1, -1, -1, -1, + -1, 389, -1, 389, 389, 389, 389, 389, + -1, -1, -1, 389, 389, -1, 389, 389, + 389, 389, 389, 389, 389, 389, 389, -1, + 389, 389, 389, -1, -1, 389, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 389, + 389, 389, -1, -1, 389, 389, 389, -1, + -1, 389, 389, 389, 389, 389, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 389, -1, 389, 389, 389, 389, -1, + 390, 390, 390, 390, 390, 390, 390, 390, + 390, 390, 390, 390, 390, 390, 390, 390, + 390, 390, 390, 390, 390, 390, 390, 390, + 390, 390, 390, 390, 390, 390, -1, 390, + 390, 390, 390, 390, 390, -1, 390, 390, + 390, -1, 390, 390, 390, 390, 390, 390, + 390, 390, 390, 390, 390, 390, 390, 390, + 390, 390, -1, 390, 390, 390, 390, -1, + -1, -1, -1, -1, -1, -1, 390, 390, + -1, 390, -1, -1, 390, -1, -1, -1, + -1, 390, -1, -1, 390, 390, 390, 390, + -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, 390, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 390, 390, 390, 390, -1, 389, 390, 390, + 390, 390, 390, 390, -1, 390, 390, 390, + 390, 390, 390, 390, -1, -1, 390, -1, + 390, 390, -1, 390, 390, 390, 390, -1, + 390, 390, -1, -1, 390, -1, -1, -1, + -1, -1, 390, -1, 390, 390, 390, 390, + 390, -1, -1, -1, 390, 390, -1, 390, + 390, 390, 390, 390, 390, 390, 390, 390, + -1, 390, 390, 390, -1, -1, 390, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 390, 390, 390, -1, -1, 390, 390, 390, + -1, -1, 390, 390, 390, 390, 390, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 390, -1, 390, 390, 390, 390, + -1, 397, 397, 397, 397, 397, 397, 397, + 397, 397, 397, 397, 397, 397, 397, -1, + 397, 397, 397, 397, 397, 397, -1, -1, + -1, 397, 397, 397, 397, 397, 397, -1, + 397, 397, 397, 397, -1, 397, -1, 397, + 397, 397, -1, 397, 397, 397, 397, 397, + 397, -1, 397, 397, 397, 397, 397, 397, + 397, 397, 397, -1, 397, 397, 397, 397, + -1, -1, -1, -1, -1, -1, -1, 397, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 397, 397, 397, + 397, -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, 397, 397, 397, 397, -1, 390, 397, + 397, 397, 397, 397, 397, -1, -1, -1, + 397, 397, 397, 397, 397, -1, -1, -1, + -1, 397, 397, -1, -1, 397, 397, 397, + -1, 397, 397, -1, -1, 397, -1, -1, + -1, -1, -1, -1, -1, -1, 397, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 397, 397, 397, 397, 397, 397, 397, + 397, -1, 397, 397, 397, -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, 397, 397, 397, 397, 397, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 397, -1, 397, 397, 399, + 399, 399, 399, 399, 399, 399, 399, 399, + 399, -1, 399, 399, 399, 399, -1, -1, + -1, 399, 399, 399, 399, 399, -1, -1, + -1, 399, 399, 399, -1, -1, -1, 399, + -1, -1, -1, 399, 399, 399, 399, -1, + -1, -1, 399, 399, 399, -1, -1, -1, + -1, 399, 399, -1, 399, 399, 399, 399, + -1, -1, -1, -1, -1, -1, -1, 399, + -1, -1, 399, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 399, 399, 399, + 399, -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, -1, -1, -1, -1, -1, 397, + -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, 399, -1, + -1, -1, -1, -1, -1, 399, 399, 399, + -1, 399, 399, 399, 399, 399, 399, 399, + 399, -1, 399, 399, 399, -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, 399, 399, 399, 399, 399, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 399, 402, 402, 402, 402, 402, 402, 402, + 402, 402, 402, 402, 402, 402, 402, 402, + 402, 402, 402, 402, 402, 402, 402, 402, + -1, 402, 402, 402, 402, 402, 402, -1, + 402, 402, 402, 402, -1, 402, -1, 402, + 402, 402, -1, 402, 402, 402, 402, 402, + 402, -1, 402, 402, 402, 402, 402, 402, + 402, 402, 402, 402, 402, 402, 402, 402, + 402, -1, 402, -1, -1, -1, -1, 402, + 402, 402, 402, 402, -1, -1, 402, 402, + -1, 402, 402, 402, 402, 402, 402, 402, + 402, 402, 402, 402, 402, -1, -1, -1, + -1, -1, 402, -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, 402, 402, 402, 402, -1, -1, 402, + 402, 402, 402, 402, 402, -1, -1, -1, + 402, 402, 402, 402, 402, -1, -1, -1, + -1, 402, -1, -1, -1, 402, 402, 402, + -1, 402, 402, -1, -1, 402, -1, -1, + -1, -1, -1, -1, -1, -1, 402, 402, + 402, 402, 402, -1, 402, 402, 402, -1, + -1, 402, 402, 402, 402, 402, 402, 402, + 402, -1, 402, 402, 402, -1, -1, -1, + 402, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 402, 402, -1, -1, 402, + -1, -1, -1, -1, 402, -1, -1, -1, + -1, 402, -1, 402, 402, 402, 402, 402, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 402, -1, 402, -1, -1, + 402, 402, -1, -1, -1, 402, -1, 402, + -1, 402, -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, -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, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 402, + -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, + 399, -1, -1, -1, -1, -1, -1, -1, + -1, 399, -1, 399, 399, 399, 399, 399, + 399, 399, 399, -1, 399, 399, 399, -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, 399, 399, 399, + 399, 399, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 399, 403, 403, 403, 403, 403, + 403, 403, 403, 403, 403, 403, 403, 403, + 403, 403, 403, 403, 403, 403, 403, 403, + 403, 403, -1, 403, 403, 403, 403, 403, + 403, -1, 403, 403, 403, 403, -1, 403, + -1, 403, 403, 403, -1, 403, 403, 403, + 403, 403, 403, -1, 403, 403, 403, 403, + 403, 403, 403, 403, 403, 403, 403, 403, + 403, 403, 403, -1, 403, -1, -1, -1, + -1, 403, 403, 403, 403, 403, -1, -1, + 403, 403, -1, 403, 403, 403, 403, 403, + 403, 403, 403, 403, 403, 403, 403, -1, + -1, -1, -1, -1, 403, -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, 403, 403, 403, 403, -1, + -1, 403, 403, 403, 403, 403, 403, -1, + -1, -1, 403, 403, 403, 403, 403, -1, + -1, -1, -1, 403, -1, -1, -1, 403, + 403, 403, -1, 403, 403, -1, -1, 403, + -1, -1, -1, -1, -1, -1, -1, -1, + 403, 403, 403, 403, 403, -1, 403, 403, + 403, -1, -1, 403, 403, 403, 403, 403, + 403, 403, 403, -1, 403, 403, 403, -1, + -1, -1, 403, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 403, 403, -1, + -1, 403, -1, -1, -1, -1, 403, -1, + -1, -1, -1, 403, -1, 403, 403, 403, + 403, 403, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 403, -1, 403, + -1, -1, 403, 403, -1, -1, -1, 403, + -1, 403, -1, 403, 404, 404, 404, 404, + 404, 404, 404, 404, 404, 404, 404, 404, + 404, 404, 404, 404, 404, 404, 404, 404, + 404, 404, 404, -1, 404, 404, 404, 404, + 404, 404, -1, 404, 404, 404, 404, -1, + 404, -1, 404, 404, 404, -1, 404, 404, + 404, 404, 404, 404, -1, 404, 404, 404, + 404, 404, 404, 404, 404, 404, 404, 404, + 404, 404, 404, 404, -1, 404, -1, -1, + -1, -1, 404, 404, 404, 404, 404, -1, + -1, 404, 404, -1, 404, 404, 404, 404, + 404, 404, 404, 404, 404, 404, 404, 404, + -1, -1, -1, -1, -1, 404, -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, 403, -1, -1, 404, 404, 404, 404, + -1, -1, 404, 404, 404, 404, 404, 404, + -1, -1, -1, 404, 404, 404, 404, 404, + -1, -1, -1, -1, 404, -1, -1, -1, + 404, 404, 404, -1, 404, 404, -1, -1, + 404, -1, -1, -1, -1, -1, -1, -1, + -1, 404, 404, 404, 404, 404, -1, 404, + 404, 404, -1, -1, 404, 404, 404, 404, + 404, 404, 404, 404, -1, 404, 404, 404, + -1, -1, -1, 404, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 404, 404, + -1, -1, 404, -1, -1, -1, -1, 404, + -1, -1, -1, -1, 404, -1, 404, 404, + 404, 404, 404, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 404, -1, + 404, -1, -1, 404, 404, -1, -1, -1, + 404, -1, 404, -1, 404, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, -1, 405, 405, 405, 405, + 405, 405, -1, -1, -1, 405, 405, 405, + 405, 405, 405, -1, 405, 405, 405, 405, + -1, 405, -1, 405, 405, 405, -1, 405, + 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, -1, -1, -1, -1, + -1, -1, -1, 405, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 405, 405, 405, 405, -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, 404, -1, -1, 405, 405, 405, + 405, -1, -1, 405, 405, 405, 405, 405, + 405, -1, -1, -1, 405, 405, 405, 405, + 405, -1, 405, 405, -1, 405, 405, -1, + -1, 405, 405, 405, -1, 405, 405, -1, + -1, 405, -1, -1, -1, -1, -1, -1, + -1, -1, 405, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 405, 405, 405, + 405, 405, 405, 405, 405, -1, 405, 405, + 405, -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, 405, + 405, 405, 405, 405, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 405, + -1, 405, 405, -1, -1, -1, 408, 408, + 408, 408, 408, 408, 408, 408, 408, 408, + 408, 408, 408, 408, -1, 408, 408, 408, + 408, 408, 408, -1, -1, -1, 408, 408, + 408, 408, 408, 408, -1, 408, 408, 408, + 408, -1, 408, -1, 408, 408, 408, -1, + 408, 408, 408, 408, 408, 408, -1, 408, + 408, 408, 408, 408, 408, 408, 408, 408, + -1, 408, 408, 408, 408, -1, -1, -1, + -1, -1, -1, -1, 408, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 408, 408, 408, 408, -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, 408, 408, + 408, 408, -1, 405, 408, 408, 408, 408, + 408, 408, -1, -1, -1, 408, 408, 408, + 408, 408, -1, -1, -1, -1, 408, 408, + -1, -1, 408, 408, 408, -1, 408, 408, + -1, -1, 408, -1, -1, -1, -1, -1, + -1, -1, -1, 408, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 408, 408, + 408, 408, 408, 408, 408, 408, -1, 408, + 408, 408, -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, + 408, 408, 408, 408, 408, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 408, -1, 408, 408, 409, 409, 409, 409, + 409, 409, 409, 409, 409, 409, 409, 409, + 409, 409, -1, 409, 409, 409, 409, 409, + 409, -1, -1, -1, 409, 409, 409, 409, + 409, 409, -1, 409, 409, 409, 409, -1, + 409, -1, 409, 409, 409, -1, 409, 409, + 409, 409, 409, 409, -1, 409, 409, 409, + 409, 409, 409, 409, 409, 409, -1, 409, + 409, 409, 409, -1, -1, -1, -1, -1, + -1, -1, 409, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 409, 409, 409, 409, -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, 409, 409, 409, 409, + -1, -1, 409, 409, 408, 409, 409, 409, + -1, -1, -1, 409, 409, -1, 409, 409, + -1, -1, -1, -1, 409, 409, -1, -1, + 409, 409, 409, -1, 409, 409, -1, -1, + 409, -1, -1, -1, -1, -1, -1, -1, + -1, 409, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 409, 409, 409, 409, + 409, 409, 409, 409, -1, 409, 409, 409, + -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, 409, 409, + 409, 409, 409, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 409, -1, + -1, 409, -1, -1, -1, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, -1, 414, 414, 414, 414, + 414, 414, -1, -1, -1, 414, 414, 414, + 414, 414, 414, -1, 414, 414, 414, 414, + -1, 414, -1, 414, 414, 414, -1, 414, + 414, 414, 414, 414, 414, -1, 414, 414, + 414, 414, 414, 414, 414, 414, 414, -1, + 414, 414, 414, 414, -1, -1, -1, -1, + -1, -1, -1, 414, -1, -1, -1, -1, + -1, -1, -1, -1, 414, -1, -1, -1, + -1, 414, 414, 414, 414, -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, 414, 414, 414, + 414, -1, 409, 414, 414, 414, 414, 414, + 414, -1, -1, -1, 414, 414, 414, 414, + 414, -1, -1, -1, -1, 414, 414, -1, + -1, 414, 414, 414, -1, 414, 414, -1, + -1, 414, -1, -1, -1, -1, -1, -1, + -1, -1, 414, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 414, 414, 414, + 414, 414, 414, 414, 414, -1, 414, 414, + 414, -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, 414, + 414, 414, 414, 414, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 414, + -1, 414, 414, -1, -1, -1, 416, 416, + 416, 416, 416, 416, 416, 416, 416, 416, + 416, 416, 416, 416, 416, 416, 416, 416, + 416, 416, 416, 416, 416, -1, 416, 416, + 416, 416, 416, 416, -1, 416, 416, 416, + 416, -1, 416, -1, 416, 416, 416, -1, + 416, 416, 416, 416, 416, 416, -1, 416, + 416, 416, 416, 416, 416, 416, 416, 416, + 416, 416, 416, 416, 416, 416, -1, 416, + -1, -1, -1, -1, 416, 416, 416, 416, + 416, -1, -1, 416, 416, -1, 416, 416, + 416, 416, 416, 416, 416, 416, 416, 416, + 416, 416, -1, -1, -1, -1, -1, 416, + -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, 416, 416, + 416, 416, -1, 414, 416, 416, 416, 416, + 416, 416, -1, -1, -1, 416, 416, 416, + 416, 416, -1, -1, -1, -1, 416, -1, + -1, -1, 416, 416, 416, -1, 416, 416, + -1, -1, 416, -1, -1, -1, -1, -1, + -1, -1, -1, 416, 416, 416, 416, 416, + -1, 416, 416, 416, -1, -1, 416, 416, + 416, 416, 416, 416, 416, 416, -1, 416, + 416, 416, -1, -1, -1, 416, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 416, 416, -1, -1, 416, -1, -1, -1, + -1, 416, -1, -1, -1, -1, 416, -1, + 416, 416, 416, 416, 416, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 416, -1, 416, -1, -1, 416, 416, -1, + -1, -1, 416, -1, 416, -1, 416, 417, + 417, 417, 417, 417, 417, 417, 417, 417, + 417, 417, 417, 417, 417, -1, 417, 417, + 417, 417, 417, 417, -1, -1, -1, 417, + 417, 417, 417, 417, 417, -1, 417, 417, + 417, 417, -1, 417, -1, 417, 417, 417, + -1, 417, 417, 417, 417, 417, 417, -1, + 417, 417, 417, 417, 417, 417, 417, 417, + 417, -1, 417, 417, 417, 417, -1, 417, + -1, -1, -1, -1, -1, 417, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 417, 417, 417, 417, -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, 416, -1, -1, 417, + 417, 417, 417, -1, -1, 417, 417, 417, + 417, 417, 417, -1, -1, -1, 417, 417, + 417, 417, 417, -1, -1, -1, -1, 417, + 417, -1, -1, 417, 417, 417, -1, 417, + 417, -1, -1, 417, -1, -1, -1, -1, + -1, -1, -1, -1, 417, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 417, + 417, 417, 417, 417, 417, 417, 417, -1, + 417, 417, 417, -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, 417, 417, 417, 417, 417, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 417, -1, 417, 417, -1, -1, -1, + 418, 418, 418, 418, 418, 418, 418, 418, + 418, 418, 418, 418, 418, 418, -1, 418, + 418, 418, 418, 418, 418, -1, -1, -1, + 418, 418, 418, 418, 418, 418, -1, 418, + 418, 418, 418, -1, 418, -1, 418, 418, + 418, -1, 418, 418, 418, 418, 418, 418, + -1, 418, 418, 418, 418, 418, 418, 418, + 418, 418, -1, 418, 418, 418, 418, -1, + 418, -1, -1, -1, -1, -1, 418, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 418, 418, 418, 418, + -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, + 418, 418, 418, 418, -1, 417, 418, 418, + 418, 418, 418, 418, -1, -1, -1, 418, + 418, 418, 418, 418, -1, -1, -1, -1, + 418, 418, -1, -1, 418, 418, 418, -1, + 418, 418, -1, -1, 418, -1, -1, -1, + -1, -1, -1, -1, -1, 418, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 418, 418, 418, 418, 418, 418, 418, 418, + -1, 418, 418, 418, -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, 418, 418, 418, 418, 418, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 418, -1, 418, 418, -1, -1, + -1, 425, 425, 425, 425, 425, 425, 425, + 425, 425, 425, 425, 425, 425, 425, -1, + 425, 425, 425, 425, 425, 425, -1, -1, + -1, 425, 425, 425, 425, 425, 425, -1, + 425, 425, 425, 425, -1, 425, -1, 425, + 425, 425, -1, 425, 425, 425, 425, 425, + 425, -1, 425, 425, 425, 425, 425, 425, + 425, 425, 425, -1, 425, 425, 425, 425, + -1, -1, -1, -1, -1, -1, -1, 425, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 425, 425, 425, + 425, -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, 425, 425, 425, 425, -1, 418, 425, + 425, 425, 425, 425, 425, -1, -1, -1, + 425, 425, 425, 425, 425, -1, -1, -1, + -1, 425, 425, -1, -1, 425, 425, 425, + -1, 425, 425, -1, -1, 425, -1, -1, + -1, -1, -1, -1, -1, -1, 425, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 425, 425, 425, 425, 425, 425, 425, + 425, -1, 425, 425, 425, -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, 425, 425, 425, 425, 425, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 425, -1, 425, 425, -1, + -1, -1, 441, 441, 441, 441, 441, 441, + 441, 441, 441, 441, 441, 441, 441, 441, + -1, 441, 441, 441, 441, 441, 441, -1, + -1, -1, 441, 441, 441, 441, 441, 441, + -1, 441, 441, 441, 441, -1, 441, -1, + 441, 441, 441, -1, 441, 441, 441, 441, + 441, 441, -1, 441, 441, 441, 441, 441, + 441, 441, 441, 441, -1, 441, 441, 441, + 441, -1, -1, -1, -1, -1, -1, -1, + 441, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 441, 441, + 441, 441, -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, 441, 441, 441, 441, -1, 425, + 441, 441, 441, 441, 441, 441, -1, -1, + -1, 441, 441, 441, 441, 441, -1, -1, + -1, -1, 441, 441, -1, -1, 441, 441, + 441, -1, 441, 441, -1, -1, 441, -1, + -1, -1, -1, -1, -1, -1, -1, 441, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 441, 441, 441, 441, 441, 441, + 441, 441, -1, 441, 441, 441, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 443, 443, 443, 443, + -1, 443, -1, -1, 441, 441, 441, 441, + 441, -1, 443, 443, 443, 443, 443, -1, + -1, -1, -1, -1, 441, -1, 441, 441, + 443, -1, -1, -1, 443, 443, 443, 443, + -1, -1, -1, 443, 443, 443, -1, -1, + -1, -1, 443, 443, -1, 443, 443, 443, + 443, -1, -1, -1, -1, -1, -1, -1, + 443, 443, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 443, + 443, 443, -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, -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, + 441, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 443, 443, 443, + 443, 443, -1, 443, 443, 443, -1, -1, + -1, 443, -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, 443, 443, 443, 443, + 443, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 443, 445, 445, 445, 445, 445, + 445, 445, 445, 445, 445, 445, 445, 445, + 445, 445, 445, 445, 445, 445, 445, 445, + 445, 445, -1, 445, 445, 445, 445, 445, + 445, -1, 445, 445, 445, 445, -1, 445, + -1, 445, 445, 445, -1, 445, 445, 445, + 445, 445, 445, -1, 445, 445, 445, 445, + 445, 445, 445, 445, 445, 445, 445, 445, + 445, 445, 445, -1, 445, -1, -1, -1, + -1, 445, 445, 445, 445, 445, -1, -1, + 445, 445, -1, 445, 445, 445, 445, 445, + 445, 445, 445, 445, 445, 445, 445, -1, + -1, -1, -1, -1, 445, -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, 445, 445, 445, 445, -1, + -1, 445, 445, 445, 445, 445, 445, -1, + -1, -1, 445, 445, 445, 445, 445, -1, + -1, -1, -1, 445, -1, -1, -1, 445, + 445, 445, -1, 445, 445, -1, -1, 445, + -1, -1, -1, -1, -1, -1, -1, -1, + 445, 445, 445, 445, 445, -1, 445, 445, + 445, -1, -1, 445, 445, 445, 445, 445, + 445, 445, 445, -1, 445, 445, 445, -1, + -1, -1, 445, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 445, 445, -1, + -1, 445, -1, -1, -1, -1, 445, -1, + -1, -1, -1, 445, -1, 445, 445, 445, + 445, 445, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 445, -1, 445, + -1, -1, 445, 445, -1, -1, -1, 445, + -1, 445, -1, 445, -1, -1, -1, -1, + 453, 453, 453, 453, -1, 453, -1, -1, + -1, -1, -1, -1, -1, -1, 453, 453, + 453, 453, 453, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 453, -1, -1, -1, + 453, 453, 453, 453, -1, -1, -1, 453, + 453, 453, -1, -1, -1, -1, 453, 453, + 453, 453, 453, 453, 453, 453, -1, -1, + -1, -1, -1, -1, 453, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 453, 453, 453, 453, -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, 445, -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, 453, 453, 453, 453, 453, -1, 453, + 453, 453, -1, -1, -1, -1, -1, 443, + 443, 443, 443, 443, -1, 443, 443, 443, + 453, 453, -1, 443, 453, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 453, 453, 453, 453, 453, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 443, + 443, 443, 443, -1, -1, -1, -1, -1, + -1, -1, 453, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 443, 446, 446, 446, + 446, 446, 446, 446, 446, 446, 446, 446, + 446, 446, 446, 446, 446, 446, 446, 446, + 446, 446, 446, 446, -1, 446, 446, 446, + 446, 446, 446, -1, 446, 446, 446, 446, + -1, 446, -1, 446, 446, 446, -1, 446, + 446, 446, 446, 446, 446, -1, 446, 446, + 446, 446, 446, 446, 446, 446, 446, 446, + 446, 446, 446, 446, 446, -1, 446, -1, + -1, -1, -1, 446, 446, 446, 446, 446, + -1, -1, 446, 446, -1, 446, 446, 446, + 446, 446, 446, 446, 446, 446, 446, 446, + 446, -1, -1, -1, -1, -1, 446, -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, 446, 446, 446, + 446, -1, -1, 446, 446, 446, 446, 446, + 446, -1, -1, -1, 446, 446, 446, 446, + 446, -1, -1, -1, -1, 446, -1, -1, + -1, 446, 446, 446, -1, 446, 446, -1, + -1, 446, -1, -1, -1, -1, -1, -1, + -1, -1, 446, 446, 446, 446, 446, -1, + 446, 446, 446, -1, -1, 446, 446, 446, + 446, 446, 446, 446, 446, -1, 446, 446, + 446, -1, -1, -1, 446, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 446, + 446, -1, -1, 446, -1, -1, -1, -1, + 446, -1, -1, -1, -1, 446, -1, 446, + 446, 446, 446, 446, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 446, + -1, 446, -1, -1, 446, 446, -1, -1, + -1, 446, -1, 446, -1, 446, 447, 447, + 447, 447, 447, 447, 447, 447, 447, 447, + 447, 447, 447, 447, 447, 447, 447, 447, + 447, 447, 447, 447, 447, -1, 447, 447, + 447, 447, 447, 447, -1, 447, 447, 447, + 447, -1, 447, -1, 447, 447, 447, -1, + 447, 447, 447, 447, 447, 447, -1, 447, + 447, 447, 447, 447, 447, 447, 447, 447, + 447, 447, 447, 447, 447, 447, -1, 447, + -1, -1, -1, -1, 447, 447, 447, 447, + 447, -1, -1, 447, 447, -1, 447, 447, + 447, 447, 447, 447, 447, 447, 447, 447, + 447, 447, -1, -1, -1, -1, -1, 447, + -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, 446, -1, -1, 447, 447, + 447, 447, -1, -1, 447, 447, 447, 447, + 447, 447, -1, -1, -1, 447, 447, 447, + 447, 447, -1, -1, -1, -1, 447, -1, + -1, -1, 447, 447, 447, -1, 447, 447, + -1, -1, 447, -1, -1, -1, -1, -1, + -1, -1, -1, 447, 447, 447, 447, 447, + -1, 447, 447, 447, -1, -1, 447, 447, + 447, 447, 447, 447, 447, 447, -1, 447, + 447, 447, -1, -1, -1, 447, -1, -1, + -1, -1, 453, 453, -1, -1, 453, -1, + 447, 447, -1, -1, 447, -1, -1, -1, + -1, 447, -1, -1, -1, -1, 447, -1, + 447, 447, 447, 447, 447, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 447, -1, 447, -1, 453, 447, 447, -1, + -1, -1, 447, -1, 447, -1, 447, 448, + 448, 448, 448, 448, 448, 448, 448, 448, + 448, 448, 448, 448, 448, 448, 448, 448, + 448, 448, 448, 448, 448, 448, -1, 448, + 448, 448, 448, 448, 448, -1, 448, 448, + 448, 448, -1, 448, -1, 448, 448, 448, + -1, 448, 448, 448, 448, 448, 448, -1, + 448, 448, 448, 448, 448, 448, 448, 448, + 448, 448, 448, 448, 448, 448, 448, -1, + 448, -1, -1, -1, -1, 448, 448, 448, + 448, 448, -1, -1, 448, 448, -1, 448, + 448, 448, 448, 448, 448, 448, 448, 448, + 448, 448, 448, -1, -1, -1, -1, -1, + 448, -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, 447, -1, -1, 448, + 448, 448, 448, -1, -1, 448, 448, 448, + 448, 448, 448, -1, -1, -1, 448, 448, + 448, 448, 448, -1, -1, -1, -1, 448, + -1, -1, -1, 448, 448, 448, -1, 448, + 448, -1, -1, 448, -1, -1, -1, -1, + -1, -1, -1, -1, 448, 448, 448, 448, + 448, -1, 448, 448, 448, -1, -1, 448, + 448, 448, 448, 448, 448, 448, 448, -1, + 448, 448, 448, -1, -1, -1, 448, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 448, 448, -1, -1, 448, -1, -1, + -1, -1, 448, -1, -1, -1, -1, 448, + -1, 448, 448, 448, 448, 448, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 448, -1, 448, -1, -1, 448, 448, + -1, -1, -1, 448, -1, 448, -1, 448, + 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, -1, + 449, 449, 449, 449, 449, 449, -1, 449, + 449, 449, 449, -1, 449, -1, 449, 449, + 449, -1, 449, 449, 449, 449, 449, 449, + -1, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, + -1, 449, -1, -1, -1, -1, 449, 449, + 449, 449, 449, -1, -1, 449, 449, -1, + 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, -1, -1, -1, -1, + -1, 449, -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, 448, -1, -1, + 449, 449, 449, 449, -1, -1, 449, 449, + 449, 449, 449, 449, -1, -1, -1, 449, + 449, 449, 449, 449, -1, -1, -1, -1, + 449, -1, -1, -1, 449, 449, 449, -1, + 449, 449, -1, -1, 449, -1, -1, -1, + -1, -1, -1, -1, -1, 449, 449, 449, + 449, 449, -1, 449, 449, 449, -1, -1, + 449, 449, 449, 449, 449, 449, 449, 449, + -1, 449, 449, 449, -1, -1, -1, 449, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 449, 449, -1, -1, 449, -1, + 449, 449, -1, 449, -1, -1, -1, -1, + 449, -1, 449, 449, 449, 449, 449, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 449, -1, 449, -1, -1, 449, + 449, -1, -1, -1, 449, -1, 449, -1, + 449, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, + -1, 456, 456, 456, 456, 456, 456, -1, + 456, 456, 456, 456, -1, 456, -1, 456, + 456, 456, -1, 456, 456, 456, 456, 456, + 456, -1, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, + 456, -1, 456, -1, -1, -1, -1, 456, + 456, 456, 456, 456, -1, -1, 456, 456, + -1, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, -1, -1, -1, + -1, -1, 456, -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, 449, -1, + -1, 456, 456, 456, 456, -1, -1, 456, + 456, 456, 456, 456, 456, -1, -1, -1, + 456, 456, 456, 456, 456, -1, -1, -1, + -1, 456, -1, -1, -1, 456, 456, 456, + -1, 456, 456, -1, -1, 456, -1, -1, + -1, -1, -1, -1, -1, -1, 456, 456, + 456, 456, 456, -1, 456, 456, 456, 456, + -1, 456, 456, 456, 456, 456, 456, 456, + 456, -1, 456, 456, 456, -1, -1, -1, + 456, -1, -1, -1, -1, -1, -1, -1, + 456, -1, -1, 456, 456, -1, -1, 456, + -1, -1, -1, -1, 456, -1, -1, -1, + -1, 456, -1, 456, 456, 456, 456, 456, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 456, -1, 456, -1, -1, + 456, 456, -1, -1, -1, 456, -1, 456, + -1, 456, 457, 457, 457, 457, 457, 457, + 457, 457, 457, 457, 457, 457, 457, 457, + 457, 457, 457, 457, 457, 457, 457, 457, + 457, -1, 457, 457, 457, 457, 457, 457, + -1, 457, 457, 457, 457, -1, 457, -1, + 457, 457, 457, -1, 457, 457, 457, 457, + 457, 457, -1, 457, 457, 457, 457, 457, + 457, 457, 457, 457, 457, 457, 457, 457, + 457, 457, -1, 457, -1, -1, -1, -1, + 457, 457, 457, 457, 457, -1, -1, 457, + 457, -1, 457, 457, 457, 457, 457, 457, + 457, 457, 457, 457, 457, 457, -1, -1, + -1, -1, -1, 457, -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, 456, + -1, -1, 457, 457, 457, 457, -1, -1, + 457, 457, 457, 457, 457, 457, -1, -1, + -1, 457, 457, 457, 457, 457, -1, -1, + -1, -1, 457, -1, -1, -1, 457, 457, + 457, -1, 457, 457, -1, -1, 457, -1, + -1, -1, -1, -1, -1, -1, -1, 457, + 457, 457, 457, 457, -1, 457, 457, 457, + 457, -1, 457, 457, 457, 457, 457, 457, + 457, 457, -1, 457, 457, 457, -1, -1, + -1, 457, -1, -1, -1, -1, -1, -1, + -1, 457, -1, -1, 457, 457, -1, -1, + 457, -1, 449, 449, -1, 457, -1, -1, + -1, -1, 457, -1, 457, 457, 457, 457, + 457, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 457, -1, 457, -1, + -1, 457, 457, -1, -1, -1, 457, -1, + 457, -1, 457, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, -1, 458, 458, 458, 458, 458, + 458, -1, 458, 458, 458, 458, -1, 458, + -1, 458, 458, 458, -1, 458, 458, 458, + 458, 458, 458, -1, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, -1, 458, -1, -1, -1, + -1, 458, 458, 458, 458, 458, -1, -1, + 458, 458, -1, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, -1, + -1, -1, -1, -1, 458, -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, + 457, -1, -1, 458, 458, 458, 458, -1, + -1, 458, 458, 458, 458, 458, 458, -1, + -1, -1, 458, 458, 458, 458, 458, -1, + -1, -1, -1, 458, -1, -1, -1, 458, + 458, 458, -1, 458, 458, -1, -1, 458, + -1, -1, -1, -1, -1, -1, -1, -1, + 458, 458, 458, 458, 458, -1, 458, 458, + 458, 458, -1, 458, 458, 458, 458, 458, + 458, 458, 458, -1, 458, 458, 458, -1, + -1, -1, 458, -1, -1, -1, -1, -1, + -1, -1, 458, -1, -1, 458, 458, -1, + -1, 458, -1, -1, -1, -1, 458, -1, + -1, -1, -1, 458, -1, 458, 458, 458, + 458, 458, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 458, -1, 458, + -1, -1, 458, 458, -1, -1, -1, 458, + -1, 458, -1, 458, 466, 466, 466, 466, + 466, 466, 466, 466, 466, 466, 466, 466, + 466, 466, 466, 466, 466, 466, 466, 466, + 466, 466, 466, -1, 466, 466, 466, 466, + 466, 466, -1, 466, 466, 466, 466, -1, + 466, -1, 466, 466, 466, -1, 466, 466, + 466, 466, 466, 466, -1, 466, 466, 466, + 466, 466, 466, 466, 466, 466, 466, 466, + 466, 466, 466, 466, -1, 466, -1, -1, + -1, -1, 466, 466, 466, 466, 466, -1, + -1, 466, 466, -1, 466, 466, 466, 466, + 466, 466, 466, 466, 466, 466, 466, 466, + -1, -1, -1, -1, -1, 466, -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, 458, -1, -1, 466, 466, 466, 466, + -1, -1, 466, 466, 466, 466, 466, 466, + -1, -1, -1, 466, 466, 466, 466, 466, + -1, -1, -1, -1, 466, -1, -1, -1, + 466, 466, 466, -1, 466, 466, -1, -1, + 466, -1, -1, -1, -1, -1, -1, -1, + -1, 466, 466, 466, 466, 466, -1, 466, + 466, 466, 466, -1, 466, 466, 466, 466, + 466, 466, 466, 466, -1, 466, 466, 466, + -1, -1, -1, 466, -1, -1, -1, -1, + -1, -1, -1, 466, -1, -1, 466, 466, + -1, -1, 466, -1, -1, -1, -1, 466, + -1, -1, -1, -1, 466, -1, 466, 466, + 466, 466, 466, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 466, -1, + 466, -1, -1, 466, 466, -1, -1, -1, + 466, -1, 466, -1, 466, 469, 469, 469, + 469, 469, 469, 469, 469, 469, 469, 469, + 469, 469, 469, 469, 469, 469, 469, 469, + 469, 469, 469, 469, -1, 469, 469, 469, + 469, 469, 469, -1, 469, 469, 469, 469, + -1, 469, -1, 469, 469, 469, 469, 469, + 469, 469, 469, 469, 469, -1, 469, 469, + 469, 469, 469, 469, 469, 469, 469, 469, + 469, 469, 469, 469, 469, -1, 469, -1, + -1, 469, -1, 469, 469, 469, 469, 469, + -1, -1, 469, 469, -1, 469, 469, 469, + 469, 469, 469, 469, 469, 469, 469, 469, + 469, -1, -1, -1, -1, -1, 469, -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, 466, -1, -1, 469, 469, 469, + 469, -1, -1, 469, 469, 469, 469, 469, + 469, -1, -1, -1, 469, 469, 469, 469, + 469, -1, -1, -1, -1, 469, -1, -1, + -1, 469, 469, 469, -1, 469, 469, -1, + -1, 469, -1, -1, -1, -1, -1, -1, + -1, -1, 469, 469, 469, 469, 469, -1, + 469, 469, 469, -1, -1, 469, 469, 469, + 469, 469, 469, 469, 469, 469, 469, 469, + 469, -1, -1, -1, 469, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 469, + 469, -1, -1, 469, -1, -1, -1, -1, + 469, -1, 469, 469, -1, 469, -1, 469, + 469, 469, 469, 469, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 469, + -1, 469, -1, -1, 469, 469, -1, -1, + -1, 469, -1, 469, -1, 469, 470, 470, + 470, 470, 470, 470, 470, 470, 470, 470, + 470, 470, 470, 470, 470, 470, 470, 470, + 470, 470, 470, 470, 470, -1, 470, 470, + 470, 470, 470, 470, -1, 470, 470, 470, + 470, -1, 470, -1, 470, 470, 470, 470, + 470, 470, 470, 470, 470, 470, -1, 470, + 470, 470, 470, 470, 470, 470, 470, 470, + 470, 470, 470, 470, 470, 470, -1, 470, + -1, -1, 470, -1, 470, 470, 470, 470, + 470, -1, -1, 470, 470, -1, 470, 470, + 470, 470, 470, 470, 470, 470, 470, 470, + 470, 470, -1, -1, -1, -1, -1, 470, + -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, 469, -1, -1, 470, 470, + 470, 470, -1, -1, 470, 470, 470, 470, + 470, 470, -1, -1, -1, 470, 470, 470, + 470, 470, -1, -1, -1, -1, 470, -1, + -1, -1, 470, 470, 470, -1, 470, 470, + -1, -1, 470, -1, -1, -1, -1, -1, + -1, -1, -1, 470, 470, 470, 470, 470, + -1, 470, 470, 470, -1, -1, 470, 470, + 470, 470, 470, 470, 470, 470, 470, 470, + 470, 470, -1, -1, -1, 470, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 470, 470, -1, -1, 470, -1, -1, -1, + -1, 470, -1, 470, 470, -1, 470, -1, + 470, 470, 470, 470, 470, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 470, -1, 470, -1, -1, 470, 470, -1, + -1, -1, 470, -1, 470, -1, 470, 471, + 471, 471, 471, 471, 471, 471, 471, 471, + 471, 471, 471, 471, 471, 471, 471, 471, + 471, 471, 471, 471, 471, 471, -1, 471, + 471, 471, 471, 471, 471, -1, 471, 471, + 471, 471, -1, 471, -1, 471, 471, 471, + 471, 471, 471, 471, 471, 471, 471, -1, + 471, 471, 471, 471, 471, 471, 471, 471, + 471, 471, 471, 471, 471, 471, 471, -1, + 471, -1, -1, 471, -1, 471, 471, 471, + 471, 471, -1, -1, 471, 471, -1, 471, + 471, 471, 471, 471, 471, 471, 471, 471, + 471, 471, 471, -1, -1, -1, -1, -1, + 471, -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, 470, -1, -1, 471, + 471, 471, 471, -1, -1, 471, 471, 471, + 471, 471, 471, -1, -1, -1, 471, 471, + 471, 471, 471, -1, -1, -1, -1, 471, + -1, -1, -1, 471, 471, 471, -1, 471, + 471, -1, -1, 471, -1, -1, -1, -1, + -1, -1, -1, -1, 471, 471, 471, 471, + 471, -1, 471, 471, 471, -1, -1, 471, + 471, 471, 471, 471, 471, 471, 471, 471, + 471, 471, 471, -1, -1, -1, 471, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 471, 471, -1, -1, 471, -1, -1, + -1, -1, 471, -1, 471, 471, -1, 471, + -1, 471, 471, 471, 471, 471, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 471, -1, 471, -1, -1, 471, 471, + -1, -1, -1, 471, -1, 471, -1, 471, + 477, 477, 477, 477, 477, 477, 477, 477, + 477, 477, 477, 477, 477, 477, 477, 477, + 477, 477, 477, 477, 477, 477, 477, -1, + 477, 477, 477, 477, 477, 477, -1, 477, + 477, 477, 477, -1, 477, -1, 477, 477, + 477, 477, 477, 477, 477, 477, 477, 477, + -1, 477, 477, 477, 477, 477, 477, 477, + 477, 477, 477, 477, 477, 477, 477, 477, + -1, 477, -1, -1, 477, -1, 477, 477, + 477, 477, 477, -1, -1, 477, 477, -1, + 477, 477, 477, 477, 477, 477, 477, 477, + 477, 477, 477, 477, -1, -1, -1, -1, + -1, 477, -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, 471, -1, -1, + 477, 477, 477, 477, -1, -1, 477, 477, + 477, 477, 477, 477, -1, -1, -1, 477, + 477, 477, 477, 477, -1, -1, -1, -1, + 477, -1, -1, -1, 477, 477, 477, -1, + 477, 477, -1, -1, 477, -1, -1, -1, + -1, -1, -1, -1, -1, 477, 477, 477, + 477, 477, -1, 477, 477, 477, -1, -1, + 477, 477, 477, 477, 477, 477, 477, 477, + 477, 477, 477, 477, -1, -1, -1, 477, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 477, 477, -1, -1, 477, -1, + -1, -1, -1, 477, -1, 477, 477, -1, + 477, -1, 477, 477, 477, 477, 477, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 477, -1, 477, -1, -1, 477, + 477, -1, -1, -1, 477, -1, 477, -1, + 477, 478, 478, 478, 478, -1, 478, -1, + -1, -1, -1, -1, -1, -1, -1, 478, + 478, 478, 478, 478, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 478, -1, -1, + -1, 478, 478, 478, 478, -1, -1, -1, + 478, 478, 478, -1, -1, -1, -1, 478, + 478, -1, 478, 478, 478, 478, -1, -1, + -1, -1, -1, -1, -1, 478, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 478, 478, 478, 478, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 479, 479, + 479, 479, 479, 479, 479, 479, 479, 479, + 479, 479, 479, 479, 479, 479, 479, 479, + 479, 479, 479, 479, 479, -1, 479, 479, + 479, 479, 479, 479, -1, 479, 479, 479, + 479, -1, 479, -1, 479, 479, 479, -1, + 479, 479, 479, 479, 479, 479, 477, 479, + 479, 479, 479, 479, 479, 479, 479, 479, + -1, 479, 479, 479, 479, -1, -1, -1, + -1, -1, -1, -1, 479, -1, -1, 479, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 479, 479, 479, 479, -1, -1, + -1, 478, -1, -1, -1, -1, -1, -1, + -1, -1, 478, 478, 478, 478, 478, -1, + 478, 478, 478, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 478, 478, 478, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 478, 478, 478, 478, 478, 479, 479, + 479, 479, -1, -1, 479, 479, -1, 479, + 479, 479, -1, -1, -1, 479, 479, -1, + 479, 479, -1, -1, -1, -1, 479, -1, + -1, -1, 479, 479, 479, -1, 479, 479, + -1, -1, 479, -1, -1, -1, -1, -1, + -1, -1, -1, 479, 479, 479, 479, -1, + -1, -1, 479, 479, -1, -1, 479, 479, + 479, 479, 479, 479, 479, 479, -1, 479, + 479, 479, -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, + 479, 479, 479, 479, 479, -1, 480, 480, + 480, 480, 480, 480, 480, 480, -1, 480, + 479, 480, 480, 480, 480, 479, -1, -1, + 480, 480, 480, 480, 480, -1, -1, -1, + 480, 480, 480, -1, -1, -1, 480, -1, + -1, -1, 480, 480, 480, 480, -1, -1, + -1, 480, 480, 480, -1, -1, -1, -1, + 480, 480, -1, 480, 480, 480, 480, -1, + -1, -1, -1, -1, -1, -1, 480, -1, + 480, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 480, 480, 480, 480, + -1, -1, 480, 480, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 481, 481, 481, 481, 481, 481, + 481, 481, 481, 481, 481, 481, 481, 481, + 481, 481, 481, 481, 481, 481, 481, 481, + 481, -1, 481, 481, 481, 481, 481, 481, + -1, 481, 481, 481, 481, -1, 481, -1, + 481, 481, 481, -1, 481, 481, 481, 481, + 481, 481, -1, 481, 481, 481, 481, 481, + 481, 481, 481, 481, -1, 481, 481, 481, + 481, -1, -1, -1, 479, -1, -1, -1, + 481, -1, -1, 481, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 480, 481, 481, + 481, 481, -1, 480, -1, -1, -1, -1, + 480, 480, 480, 480, 480, 480, 480, 480, + -1, 480, 480, 480, -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, 480, 480, 480, 480, 480, -1, + -1, -1, 481, 481, 481, 481, -1, -1, + 481, 481, -1, 481, 481, 481, -1, -1, + -1, 481, 481, -1, 481, 481, -1, -1, + -1, -1, 481, -1, -1, -1, 481, 481, + 481, -1, 481, 481, -1, -1, 481, -1, + -1, -1, -1, -1, -1, -1, -1, 481, + 481, 481, 481, -1, -1, -1, 481, 481, + -1, -1, 481, 481, 481, 481, 481, 481, + 481, 481, -1, 481, 481, 481, -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, 481, 481, 481, 481, + 481, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 481, -1, -1, -1, + -1, 481, -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, 478, -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, 478, 478, 478, 482, 482, + 482, 482, 482, 482, 482, 482, 482, 482, + 482, 482, 482, 482, 482, 482, 482, 482, + 482, 482, 482, 482, 482, -1, 482, 482, + 482, 482, 482, 482, -1, 482, 482, 482, + 482, -1, 482, -1, 482, 482, 482, -1, + 482, 482, 482, 482, 482, 482, -1, 482, + 482, 482, 482, 482, 482, 482, 482, 482, + -1, 482, 482, 482, 482, -1, -1, -1, + -1, -1, -1, -1, 482, -1, -1, 482, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 482, 482, 482, 482, -1, -1, + 481, -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, 482, 482, + 482, 482, -1, -1, 482, 482, -1, 482, + 482, 482, -1, -1, -1, 482, 482, -1, + 482, 482, -1, -1, -1, -1, 482, -1, + -1, -1, 482, 482, 482, -1, 482, 482, + -1, -1, 482, -1, -1, -1, -1, -1, + -1, -1, -1, 482, 482, 482, 482, -1, + -1, -1, 482, 482, -1, -1, 482, 482, + 482, 482, 482, 482, 482, 482, -1, 482, + 482, 482, -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, + 482, 482, 482, 482, 482, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 482, -1, -1, -1, -1, 482, -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, 480, + -1, -1, -1, -1, -1, 480, -1, -1, + -1, -1, 480, 480, 480, 480, 480, 480, + 480, 480, -1, 480, 480, 480, -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, 480, 480, 480, 480, + 480, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, -1, 483, 483, 483, 483, 483, 483, + -1, 483, 483, 483, 482, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, -1, 483, 483, + 483, 483, -1, -1, -1, -1, -1, -1, + -1, 483, 483, -1, 483, -1, -1, 483, + -1, -1, -1, -1, 483, -1, -1, 483, + 483, 483, 483, -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, 483, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 483, 483, 483, 483, -1, + -1, 483, 483, 483, 483, 483, 483, -1, + 483, 483, 483, 483, 483, 483, 483, -1, + -1, 483, -1, 483, 483, -1, 483, 483, + 483, 483, -1, 483, 483, -1, -1, 483, + -1, -1, -1, -1, -1, 483, -1, 483, + 483, 483, 483, 483, -1, -1, -1, 483, + 483, -1, 483, 483, 483, 483, 483, 483, + 483, 483, 483, -1, 483, 483, 483, -1, + -1, 483, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 483, 483, 483, -1, -1, + 483, 483, 483, -1, -1, 483, 483, 483, + 483, 483, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 483, -1, 483, + 483, 483, 483, -1, 490, 490, 490, 490, + 490, 490, 490, 490, 490, 490, 490, 490, + 490, 490, 490, 490, 490, 490, 490, 490, + 490, 490, 490, -1, 490, 490, 490, 490, + 490, 490, -1, 490, 490, 490, 490, -1, + 490, -1, 490, 490, 490, -1, 490, 490, + 490, 490, 490, 490, -1, 490, 490, 490, + 490, 490, 490, 490, 490, 490, 490, 490, + 490, 490, 490, 490, -1, 490, -1, -1, + -1, -1, 490, 490, 490, 490, 490, -1, + -1, 490, 490, -1, 490, 490, 490, 490, + 490, 490, 490, 490, 490, 490, 490, 490, + -1, -1, -1, -1, -1, 490, -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, 490, 490, 490, 490, + -1, 483, 490, 490, 490, 490, 490, 490, + -1, -1, -1, 490, 490, 490, 490, 490, + -1, -1, -1, -1, 490, -1, -1, -1, + 490, 490, 490, -1, 490, 490, -1, -1, + 490, -1, -1, -1, -1, -1, -1, -1, + -1, 490, 490, 490, 490, 490, -1, 490, + 490, 490, -1, -1, 490, 490, 490, 490, + 490, 490, 490, 490, -1, 490, 490, 490, + -1, -1, -1, 490, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 490, 490, + -1, -1, 490, -1, -1, -1, -1, 490, + -1, -1, -1, -1, 490, -1, 490, 490, + 490, 490, 490, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 490, -1, + 490, -1, -1, 490, 490, -1, -1, -1, + 490, -1, 490, -1, 490, 491, 491, 491, + 491, 491, 491, 491, 491, 491, 491, 491, + 491, 491, 491, -1, 491, 491, 491, 491, + 491, 491, -1, -1, -1, 491, 491, 491, + 491, 491, 491, -1, 491, 491, 491, 491, + -1, 491, -1, 491, 491, 491, -1, 491, + 491, 491, 491, 491, 491, 491, 491, 491, + 491, 491, 491, 491, 491, 491, 491, 491, + 491, 491, 491, 491, -1, -1, -1, -1, + -1, -1, -1, 491, -1, 491, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 491, 491, 491, 491, -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, 490, -1, -1, 491, 491, 491, + 491, -1, -1, 491, 491, 491, 491, 491, + 491, -1, -1, -1, 491, 491, 491, 491, + 491, -1, 491, 491, -1, 491, 491, -1, + -1, 491, 491, 491, -1, 491, 491, 491, + -1, 491, -1, -1, -1, -1, -1, -1, + -1, -1, 491, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 491, 491, 491, + 491, 491, 491, 491, 491, -1, 491, 491, + 491, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 492, + 492, 492, 492, -1, 492, -1, -1, 491, + 491, 491, 491, 491, -1, 492, 492, 492, + 492, 492, -1, -1, -1, -1, -1, 491, + -1, 491, 491, 492, -1, -1, -1, 492, + 492, 492, 492, -1, -1, -1, 492, 492, + 492, -1, -1, -1, -1, 492, 492, -1, + 492, 492, 492, 492, 492, -1, -1, -1, + -1, -1, -1, 492, -1, -1, -1, 493, + 493, 493, 493, -1, 493, -1, -1, -1, + -1, 492, 492, 492, 492, 493, 493, 493, + 493, 493, -1, -1, -1, -1, 492, -1, + -1, -1, -1, 493, -1, -1, -1, 493, + 493, 493, 493, -1, -1, -1, 493, 493, + 493, -1, -1, -1, -1, 493, 493, -1, + 493, 493, 493, 493, 493, -1, -1, -1, + -1, -1, -1, 493, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 493, 493, 493, 493, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 493, -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, 491, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 492, 492, 492, 492, 492, -1, 492, 492, + 492, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 492, + 492, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 492, -1, 492, + 492, 492, 492, 492, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 493, 493, 493, 493, 493, 492, 493, 493, + 493, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 493, + 493, -1, -1, -1, -1, -1, -1, 494, + 494, 494, 494, -1, 494, 493, -1, 493, + 493, 493, 493, 493, -1, 494, 494, 494, + 494, 494, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 494, -1, -1, -1, 494, + 494, 494, 494, -1, -1, 493, 494, 494, + 494, -1, -1, -1, -1, 494, 494, -1, + 494, 494, 494, 494, 494, -1, -1, -1, + -1, -1, -1, 494, -1, -1, -1, 523, + 523, 523, 523, -1, 523, -1, -1, -1, + -1, 494, 494, 494, 494, 523, 523, 523, + 523, 523, -1, -1, -1, -1, 494, -1, + -1, -1, -1, 523, -1, -1, -1, 523, + 523, 523, 523, -1, -1, -1, 523, 523, + 523, -1, -1, -1, -1, 523, 523, 523, + 523, 523, 523, 523, -1, -1, -1, -1, + -1, -1, -1, 523, -1, -1, -1, -1, + -1, -1, 527, 527, 527, 527, -1, 527, + -1, 523, 523, 523, 523, -1, -1, -1, + 527, 527, 527, 527, 527, -1, 523, -1, + -1, -1, -1, -1, -1, -1, 527, -1, + -1, -1, 527, 527, 527, 527, -1, -1, + -1, 527, 527, 527, -1, -1, -1, -1, + 527, 527, 527, 527, 527, 527, 527, 527, + -1, -1, -1, -1, -1, -1, 527, -1, + 494, 494, 494, 494, 494, -1, 494, 494, + 494, -1, -1, -1, 527, 527, 527, 527, + -1, -1, -1, -1, -1, -1, -1, 494, + 494, 527, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 494, -1, 494, + 494, 494, 494, 494, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 523, 523, 523, 523, 523, 494, 523, 523, + 523, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 523, + 523, -1, -1, 523, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 523, + 523, 523, 523, 523, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 523, -1, 527, 527, 527, 527, 527, + -1, 527, 527, 527, -1, -1, -1, -1, + -1, -1, -1, -1, 529, 529, 529, 529, + -1, 529, 527, 527, -1, -1, 527, -1, + -1, -1, 529, 529, 529, 529, 529, -1, + -1, -1, 527, 527, 527, 527, 527, -1, + 529, -1, -1, -1, 529, 529, 529, 529, + -1, -1, -1, 529, 529, 529, -1, -1, + -1, -1, 529, 529, 527, 529, 529, 529, + 529, -1, -1, -1, -1, -1, -1, -1, + 529, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 529, 529, + 529, 529, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 530, 530, 530, 530, 530, 530, 530, + 530, 530, 530, 530, 530, 530, 530, 530, + 530, 530, 530, 530, 530, 530, 530, 530, + -1, 530, 530, 530, 530, 530, 530, -1, + 530, 530, 530, 530, -1, 530, -1, 530, + 530, 530, -1, 530, 530, 530, 530, 530, + 530, -1, 530, 530, 530, 530, 530, 530, + 530, 530, 530, 530, 530, 530, 530, 530, + 530, -1, 530, -1, -1, -1, -1, 530, + 530, 530, 530, 530, -1, -1, 530, 530, + -1, 530, 530, 530, 530, 530, 530, 530, + 530, 530, 530, 530, 530, -1, -1, -1, + -1, -1, 530, -1, -1, 529, 529, 529, + 529, 529, -1, 529, 529, 529, -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, 529, 529, 529, 529, + 529, 530, 530, 530, 530, -1, -1, 530, + 530, 530, 530, 530, 530, -1, -1, -1, + 530, 530, 530, 530, 530, -1, -1, -1, + -1, 530, -1, -1, -1, 530, 530, 530, + -1, 530, 530, -1, -1, 530, -1, -1, + -1, -1, -1, -1, -1, -1, 530, 530, + 530, 530, 530, -1, 530, 530, 530, -1, + -1, 530, 530, 530, 530, 530, 530, 530, + 530, -1, 530, 530, 530, -1, -1, -1, + 530, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 530, 530, -1, -1, 530, + -1, -1, -1, -1, 530, -1, -1, -1, + -1, 530, -1, 530, 530, 530, 530, 530, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 530, -1, 530, -1, -1, + 530, 530, -1, -1, -1, 530, -1, 530, + -1, 530, 541, 541, 541, 541, 541, 541, + 541, 541, -1, 541, -1, 541, 541, 541, + 541, -1, -1, -1, 541, 541, 541, 541, + 541, -1, -1, -1, 541, 541, 541, -1, + -1, -1, 541, -1, -1, -1, 541, 541, + 541, 541, -1, -1, -1, 541, 541, 541, + -1, -1, -1, -1, 541, 541, -1, 541, + 541, 541, 541, 544, 544, 544, 544, -1, + 544, -1, 541, -1, 541, -1, -1, -1, + -1, 544, 544, 544, 544, 544, -1, -1, + 541, 541, 541, 541, -1, -1, -1, 544, + -1, -1, -1, 544, 544, 544, 544, -1, + -1, -1, 544, 544, 544, -1, -1, -1, + -1, 544, 544, -1, 544, 544, 544, 544, + -1, -1, -1, -1, -1, -1, -1, 544, + -1, 523, 523, -1, -1, 523, -1, -1, + -1, -1, -1, -1, -1, 544, 544, 544, + 544, -1, -1, -1, -1, -1, -1, 530, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 523, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 541, -1, -1, 527, 527, -1, 541, + 527, -1, -1, -1, 541, 541, 541, 541, + 541, 541, 541, 541, -1, 541, 541, 541, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 527, -1, + -1, -1, -1, -1, -1, -1, 541, 541, + 541, 541, 541, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 544, 544, 544, 544, + 544, -1, 544, 544, 544, -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, 544, 544, 544, 544, 544, + -1, -1, -1, -1, 545, 545, 545, 545, + 545, 545, 545, 545, 545, 545, 545, 545, + 545, 545, 545, 545, 545, 545, 545, 545, + 545, 545, 545, -1, 545, 545, 545, 545, + 545, 545, -1, 545, 545, 545, 545, -1, + 545, -1, 545, 545, 545, -1, 545, 545, + 545, 545, 545, 545, -1, 545, 545, 545, + 545, 545, 545, 545, 545, 545, -1, 545, + 545, 545, 545, -1, -1, -1, -1, -1, + -1, -1, 545, -1, -1, 545, -1, 529, + 529, 529, 529, 529, -1, 529, 529, 529, + 545, 545, 545, 545, -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, 529, 529, + 529, 529, 529, -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, 545, 545, 545, 545, + -1, -1, 545, 545, -1, 545, 545, 545, + -1, -1, -1, 545, 545, -1, 545, 545, + -1, -1, -1, -1, 545, -1, -1, -1, + 545, 545, 545, -1, 545, 545, -1, -1, + 545, -1, -1, -1, -1, -1, -1, -1, + -1, 545, 545, 545, 545, -1, -1, -1, + 545, 545, -1, -1, 545, 545, 545, 545, + 545, 545, 545, 545, -1, 545, 545, 545, + -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, 545, 545, + 545, 545, 545, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 545, -1, + -1, -1, -1, 545, -1, -1, -1, -1, + -1, -1, -1, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, -1, 550, 550, + 550, 550, -1, -1, -1, 550, 550, 550, + 550, 550, -1, -1, -1, 550, 550, 550, + -1, -1, -1, 550, -1, -1, -1, 550, + 550, 550, 550, -1, -1, -1, 550, 550, + 550, -1, -1, -1, -1, 550, 550, -1, + 550, 550, 550, 550, -1, -1, -1, -1, + -1, -1, -1, 550, -1, -1, 550, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 550, 550, 550, 550, -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, 545, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 541, -1, -1, -1, -1, + -1, 541, -1, -1, -1, -1, 541, 541, + 541, 541, 541, 541, 541, 541, -1, 541, + 541, 541, 550, -1, -1, -1, -1, -1, + -1, 550, 550, 550, -1, 550, 550, 550, + 550, 550, 550, 550, 550, -1, 550, 550, + 550, -1, -1, -1, -1, -1, -1, -1, + 541, 541, 541, 541, 541, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 544, 544, + 544, 544, 544, -1, 544, 544, 544, 550, + 550, 550, 550, 550, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 550, -1, -1, -1, + -1, -1, -1, -1, -1, 544, 544, 544, + 544, 544, 546, 546, 546, 546, 546, 546, + 546, 546, 546, 546, 546, 546, 546, 546, + 546, 546, 546, 546, 546, 546, 546, 546, + 546, 546, 546, 546, 546, 546, 546, 546, + -1, 546, 546, 546, 546, 546, 546, -1, + 546, 546, 546, -1, 546, 546, 546, 546, + 546, 546, 546, 546, 546, 546, 546, 546, + 546, 546, 546, 546, -1, 546, 546, 546, + 546, -1, -1, -1, -1, -1, -1, -1, + 546, 546, -1, 546, -1, -1, 546, -1, + -1, -1, -1, 546, -1, -1, 546, 546, + 546, 546, -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, 546, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 546, 546, 546, 546, -1, -1, + 546, 546, 546, 546, 546, 546, -1, 546, + 546, 546, 546, 546, 546, 546, -1, -1, + 546, -1, 546, 546, -1, 546, 546, 546, + 546, -1, 546, 546, -1, -1, 546, -1, + -1, -1, -1, -1, 546, -1, 546, 546, + 546, 546, 546, -1, -1, -1, 546, 546, + -1, 546, 546, 546, 546, 546, 546, 546, + 546, 546, -1, 546, 546, 546, -1, -1, + 546, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 546, 546, 546, -1, -1, 546, + 546, 546, -1, -1, 546, 546, 546, 546, + 546, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 546, -1, 546, 546, + 546, 546, -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, 551, 551, 551, 551, + 551, 551, 551, 551, 551, 551, -1, 551, + 551, 551, 551, -1, -1, -1, 551, 551, + 551, 551, 551, -1, -1, -1, 551, 551, + 551, -1, -1, -1, 551, -1, -1, -1, + 551, 551, 551, 551, -1, -1, -1, 551, + 551, 551, -1, -1, -1, -1, 551, 551, + -1, 551, 551, 551, 551, -1, -1, -1, + -1, -1, -1, -1, 551, -1, -1, 551, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 551, 551, 551, 551, -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, + 546, -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, 550, -1, -1, -1, + -1, -1, -1, -1, -1, 550, -1, 550, + 550, 550, 550, 550, 550, 550, 550, -1, + 550, 550, 550, 551, -1, -1, -1, -1, + -1, -1, 551, 551, 551, -1, 551, 551, + 551, 551, 551, 551, 551, 551, -1, 551, + 551, 551, -1, -1, -1, -1, -1, -1, + -1, 550, 550, 550, 550, 550, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 550, -1, + 551, 551, 551, 551, 551, -1, -1, 554, + 554, 554, 554, 554, 554, 554, 554, 554, + 554, 554, 554, 554, 554, 551, 554, 554, + 554, 554, 554, 554, -1, -1, -1, 554, + 554, 554, 554, 554, 554, -1, 554, 554, + 554, 554, -1, 554, 554, 554, 554, 554, + -1, 554, 554, 554, 554, 554, 554, -1, + 554, 554, 554, 554, 554, 554, 554, 554, + 554, -1, 554, 554, 554, 554, -1, 554, + -1, 554, -1, -1, -1, 554, -1, 554, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 554, 554, 554, 554, -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, 554, + 554, 554, 554, -1, -1, 554, 554, 554, + 554, 554, 554, -1, -1, -1, 554, 554, + 554, 554, 554, -1, -1, -1, -1, 554, + 554, -1, -1, 554, 554, 554, -1, 554, + 554, -1, -1, 554, -1, -1, -1, 554, + 554, -1, 554, -1, 554, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 554, + 554, 554, 554, 554, 554, 554, 554, -1, + 554, 554, 554, -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, 554, 554, 554, 554, 554, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 554, -1, 554, 554, -1, -1, -1, + 557, 557, 557, 557, 557, 557, 557, 557, + 557, 557, 557, 557, 557, 557, -1, 557, + 557, 557, 557, 557, 557, -1, -1, -1, + 557, 557, 557, 557, 557, 557, -1, 557, + 557, 557, 557, -1, 557, -1, 557, 557, + 557, -1, 557, 557, 557, 557, 557, 557, + -1, 557, 557, 557, 557, 557, 557, 557, + 557, 557, -1, 557, 557, 557, 557, -1, + 557, -1, -1, -1, -1, -1, 557, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 557, 557, 557, 557, + -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, + 557, 557, 557, 557, -1, 554, 557, 557, + 557, 557, 557, 557, -1, -1, -1, 557, + 557, 557, 557, 557, -1, -1, -1, -1, + 557, 557, -1, -1, 557, 557, 557, -1, + 557, 557, -1, -1, 557, -1, -1, -1, + -1, -1, -1, -1, -1, 557, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 557, 557, 557, 557, 557, 557, 557, 557, + -1, 557, 557, 557, -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, 557, 557, 557, 557, 557, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 557, -1, 557, 557, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 558, + 558, 558, 558, 558, 558, 558, 558, 558, + 558, 558, 558, 558, 558, -1, 558, 558, + 558, 558, 558, 558, -1, -1, -1, 558, + 558, 558, 558, 558, 558, -1, 558, 558, + 558, 558, -1, 558, -1, 558, 558, 558, + -1, 558, 558, 558, 558, 558, 558, -1, + 558, 558, 558, 558, 558, 558, 558, 558, + 558, -1, 558, 558, 558, 558, -1, -1, + -1, -1, -1, -1, -1, 558, -1, 558, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 558, 558, 558, 558, -1, + 558, -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, 557, 558, + 558, 558, 558, -1, -1, 558, 558, 558, + 558, 558, 558, -1, -1, -1, 558, 558, + 558, 558, 558, -1, -1, -1, 558, 558, + 558, -1, -1, 558, 558, 558, -1, 558, + 558, 558, -1, 558, -1, -1, -1, -1, + -1, -1, -1, -1, 558, -1, -1, -1, + -1, -1, 554, -1, -1, -1, -1, 558, + 558, 558, 558, 558, 558, 558, 558, -1, + 558, 558, 558, -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, 558, 558, 558, 558, 558, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 558, -1, 558, 558, -1, -1, -1, + 565, 565, 565, 565, 565, 565, 565, 565, + 565, 565, 565, 565, 565, 565, 565, 565, + 565, 565, 565, 565, 565, 565, 565, -1, + 565, 565, 565, 565, 565, 565, -1, 565, + 565, 565, 565, -1, 565, -1, 565, 565, + 565, -1, 565, 565, 565, 565, 565, 565, + -1, 565, 565, 565, 565, 565, 565, 565, + 565, 565, 565, 565, 565, 565, 565, 565, + -1, 565, -1, -1, -1, -1, 565, 565, + 565, 565, 565, -1, -1, 565, 565, -1, + 565, 565, 565, 565, 565, 565, 565, 565, + 565, 565, 565, 565, -1, -1, -1, -1, + -1, 565, -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, + 565, 565, 565, 565, -1, 558, 565, 565, + 565, 565, 565, 565, -1, -1, -1, 565, + 565, 565, 565, 565, -1, -1, -1, -1, + 565, -1, -1, -1, 565, 565, 565, -1, + 565, 565, -1, -1, 565, -1, -1, -1, + -1, -1, -1, -1, -1, 565, 565, 565, + 565, 565, -1, 565, 565, 565, -1, -1, + 565, 565, 565, 565, 565, 565, 565, 565, + -1, 565, 565, 565, -1, -1, -1, 565, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 565, 565, -1, -1, 565, -1, + 565, 565, -1, 565, -1, -1, -1, -1, + 565, -1, 565, 565, 565, 565, 565, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 565, -1, 565, -1, -1, 565, + 565, -1, -1, -1, 565, -1, 565, -1, + 565, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, + -1, 566, 566, 566, 566, 566, 566, -1, + 566, 566, 566, 566, -1, 566, -1, 566, + 566, 566, -1, 566, 566, 566, 566, 566, + 566, -1, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, + 566, -1, 566, -1, -1, -1, -1, 566, + 566, 566, 566, 566, -1, -1, 566, 566, + -1, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, -1, -1, -1, + -1, -1, 566, -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, 565, -1, + -1, 566, 566, 566, 566, -1, -1, 566, + 566, 566, 566, 566, 566, -1, -1, -1, + 566, 566, 566, 566, 566, -1, -1, -1, + -1, 566, -1, -1, -1, 566, 566, 566, + 558, 566, 566, -1, -1, 566, -1, -1, + -1, -1, -1, -1, -1, -1, 566, 566, + 566, 566, 566, -1, 566, 566, 566, -1, + -1, 566, 566, 566, 566, 566, 566, 566, + 566, -1, 566, 566, 566, -1, -1, -1, + 566, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 566, 566, -1, -1, 566, + -1, 566, 566, -1, 566, -1, -1, -1, + -1, 566, -1, 566, 566, 566, 566, 566, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 566, -1, 566, -1, -1, + 566, 566, -1, -1, -1, 566, -1, 566, + -1, 566, 567, 567, 567, 567, 567, 567, + 567, 567, 567, 567, 567, 567, 567, 567, + 567, 567, 567, 567, 567, 567, 567, 567, + 567, -1, 567, 567, 567, 567, 567, 567, + -1, 567, 567, 567, 567, -1, 567, -1, + 567, 567, 567, -1, 567, 567, 567, 567, + 567, 567, -1, 567, 567, 567, 567, 567, + 567, 567, 567, 567, 567, 567, 567, 567, + 567, 567, -1, 567, -1, -1, -1, -1, + 567, 567, 567, 567, 567, -1, -1, 567, + 567, -1, 567, 567, 567, 567, 567, 567, + 567, 567, 567, 567, 567, 567, -1, -1, + -1, -1, -1, 567, -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, 566, + -1, -1, 567, 567, 567, 567, -1, -1, + 567, 567, 567, 567, 567, 567, -1, -1, + -1, 567, 567, 567, 567, 567, -1, -1, + -1, -1, 567, -1, -1, -1, 567, 567, + 567, -1, 567, 567, -1, -1, 567, -1, + -1, -1, -1, -1, -1, -1, -1, 567, + 567, 567, 567, 567, -1, 567, 567, 567, + -1, -1, 567, 567, 567, 567, 567, 567, + 567, 567, -1, 567, 567, 567, -1, -1, + -1, 567, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 567, 567, -1, -1, + 567, -1, 567, 567, -1, 567, -1, -1, + -1, -1, 567, -1, 567, 567, 567, 567, + 567, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 567, -1, 567, -1, + -1, 567, 567, -1, -1, -1, 567, -1, + 567, -1, 567, 572, 572, 572, 572, -1, + 572, -1, -1, -1, -1, -1, -1, -1, + -1, 572, 572, 572, 572, 572, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 572, + -1, -1, -1, 572, 572, 572, 572, -1, + -1, -1, 572, 572, 572, -1, -1, -1, + -1, 572, 572, 572, 572, 572, 572, 572, + 572, -1, -1, -1, -1, -1, -1, 572, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 572, 572, 572, + 572, -1, -1, 572, 572, -1, -1, -1, + -1, -1, 572, -1, -1, -1, -1, -1, + 574, 574, 574, 574, 574, 574, 574, 574, + 574, 574, 574, 574, 574, 574, 574, 574, + 574, 574, 574, 574, 574, 574, 574, -1, + 574, 574, 574, 574, 574, 574, -1, 574, + 574, 574, 574, -1, 574, -1, 574, 574, + 574, -1, 574, 574, 574, 574, 574, 574, + 567, 574, 574, 574, 574, 574, 574, 574, + 574, 574, 574, 574, 574, 574, 574, 574, + -1, 574, -1, -1, -1, -1, 574, 574, + 574, 574, 574, -1, -1, 574, 574, -1, + 574, 574, 574, 574, 574, 574, 574, 574, + 574, 574, 574, 574, -1, -1, -1, -1, + -1, 574, -1, -1, 572, 572, 572, 572, + 572, -1, 572, 572, 572, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 572, 572, -1, -1, 572, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 572, 572, 572, 572, 572, + 574, 574, 574, 574, -1, -1, 574, 574, + 574, 574, 574, 574, -1, -1, -1, 574, + 574, 574, 574, 574, -1, 572, -1, -1, + 574, -1, -1, -1, 574, 574, 574, -1, + 574, 574, -1, -1, 574, -1, -1, -1, + -1, -1, -1, -1, -1, 574, 574, 574, + 574, 574, -1, 574, 574, 574, -1, -1, + 574, 574, 574, 574, 574, 574, 574, 574, + -1, 574, 574, 574, -1, -1, -1, 574, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 574, 574, -1, -1, 574, -1, + 574, 574, -1, 574, -1, -1, -1, -1, + 574, -1, 574, 574, 574, 574, 574, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 574, -1, 574, -1, -1, 574, + 574, -1, -1, -1, 574, -1, 574, -1, + 574, 577, 577, 577, 577, -1, 577, -1, + -1, -1, -1, -1, -1, -1, -1, 577, + 577, 577, 577, 577, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 577, -1, -1, + -1, 577, 577, 577, 577, -1, -1, -1, + 577, 577, 577, -1, -1, -1, -1, 577, + 577, -1, 577, 577, 577, 577, 577, -1, + -1, -1, -1, -1, -1, 577, -1, -1, + -1, -1, -1, -1, -1, 578, 578, 578, + 578, -1, 578, 577, 577, 577, 577, -1, + -1, -1, -1, 578, 578, 578, 578, 578, + 577, -1, -1, -1, -1, -1, -1, -1, + -1, 578, -1, -1, -1, 578, 578, 578, + 578, -1, -1, -1, 578, 578, 578, -1, + -1, -1, -1, 578, 578, -1, 578, 578, + 578, 578, 578, -1, -1, -1, -1, -1, + -1, 578, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 574, 578, + 578, 578, 578, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 578, -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, 577, 577, 577, 577, 577, -1, + 577, 577, 577, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 577, 577, -1, -1, -1, -1, -1, + -1, -1, 577, -1, -1, -1, -1, -1, + -1, 577, 577, 577, 577, 577, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 577, 578, 578, + 578, 578, 578, -1, 578, 578, 578, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 578, 578, -1, + -1, -1, -1, -1, -1, -1, 578, -1, + -1, -1, -1, -1, -1, 578, 578, 578, + 578, 578, 579, 579, 579, 579, -1, 579, + -1, -1, -1, -1, -1, -1, -1, -1, + 579, 579, 579, 579, 579, -1, -1, -1, + -1, 578, -1, -1, -1, -1, 579, -1, + -1, -1, 579, 579, 579, 579, -1, -1, + -1, 579, 579, 579, -1, -1, -1, -1, + 579, 579, -1, 579, 579, 579, 579, 579, + -1, -1, -1, -1, -1, -1, 579, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 579, 579, 579, 579, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 579, -1, -1, -1, -1, -1, 580, + 580, 580, 580, 580, 580, 580, 580, 580, + 580, 580, 580, 580, 580, 580, 580, 580, + 580, 580, 580, 580, 580, 580, -1, 580, + 580, 580, 580, 580, 580, -1, 580, 580, + 580, 580, -1, 580, -1, 580, 580, 580, + -1, 580, 580, 580, 580, 580, 580, -1, + 580, 580, 580, 580, 580, 580, 580, 580, + 580, -1, 580, 580, 580, 580, -1, -1, + -1, -1, -1, -1, -1, 580, -1, -1, + 580, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 580, 580, 580, 580, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 579, 579, 579, 579, 579, + -1, 579, 579, 579, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 579, 579, -1, -1, -1, -1, + -1, -1, -1, 579, -1, -1, -1, -1, + -1, -1, 579, 579, 579, 579, 579, 580, + 580, 580, 580, -1, -1, 580, 580, -1, + 580, 580, 580, -1, -1, -1, 580, 580, + -1, 580, 580, -1, -1, -1, 579, 580, + -1, -1, -1, 580, 580, 580, -1, 580, + 580, -1, -1, 580, -1, -1, -1, -1, + -1, -1, -1, -1, 580, 580, 580, 580, + -1, -1, -1, 580, 580, -1, -1, 580, + 580, 580, 580, 580, 580, 580, 580, -1, + 580, 580, 580, -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, 580, 580, 580, 580, 580, -1, 582, + 582, 582, 582, 582, 582, 582, 582, -1, + 582, 580, 582, 582, 582, 582, 580, -1, + -1, 582, 582, 582, 582, 582, -1, -1, + -1, 582, 582, 582, -1, -1, -1, 582, + -1, -1, -1, 582, 582, 582, 582, -1, + -1, -1, 582, 582, 582, -1, -1, -1, + -1, 582, 582, -1, 582, 582, 582, 582, + -1, -1, -1, -1, -1, -1, -1, 582, + -1, 582, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 582, 582, 582, + 582, -1, 583, 583, 583, 583, 583, 583, + 583, 583, -1, 583, -1, 583, 583, 583, + 583, -1, -1, -1, 583, 583, 583, 583, + 583, -1, -1, -1, 583, 583, 583, -1, + -1, -1, 583, -1, -1, -1, 583, 583, + 583, 583, -1, -1, -1, 583, 583, 583, + -1, -1, -1, -1, 583, 583, -1, 583, + 583, 583, 583, -1, -1, -1, -1, -1, + -1, -1, 583, -1, 583, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 583, 583, 583, 583, -1, 580, 583, 583, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 582, -1, + -1, -1, -1, -1, 582, -1, -1, -1, + -1, 582, 582, 582, 582, 582, 582, 582, + 582, -1, 582, 582, 582, -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, 582, 582, 582, 582, 582, + -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, 583, -1, -1, -1, -1, -1, 583, + -1, -1, -1, -1, 583, 583, 583, 583, + 583, 583, 583, 583, -1, 583, 583, 583, + -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, 583, 583, + 583, 583, 583, 586, 586, 586, 586, 586, + 586, 586, 586, 586, 586, -1, 586, 586, + 586, 586, -1, -1, -1, 586, 586, 586, + 586, 586, -1, -1, -1, 586, 586, 586, + -1, -1, -1, 586, -1, -1, -1, 586, + 586, 586, 586, -1, -1, -1, 586, 586, + 586, -1, -1, -1, -1, 586, 586, -1, + 586, 586, 586, 586, -1, -1, -1, -1, + -1, -1, -1, 586, -1, -1, 586, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 586, 586, 586, 586, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 588, + 588, 588, 588, 588, 588, 588, 588, 588, + 588, 588, 588, 588, 588, -1, 588, 588, + 588, 588, 588, 588, -1, -1, -1, 588, + 588, 588, 588, 588, 588, -1, 588, 588, + 588, 588, -1, 588, 588, 588, 588, 588, + -1, 588, 588, 588, 588, 588, 588, -1, + 588, 588, 588, 588, 588, 588, 588, 588, + 588, -1, 588, 588, 588, 588, -1, 588, + -1, -1, -1, -1, -1, 588, -1, 588, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 586, 588, 588, 588, 588, -1, + -1, 586, 586, 586, -1, 586, 586, 586, + 586, 586, 586, 586, 586, -1, 586, 586, + 586, -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, 586, + 586, 586, 586, 586, -1, -1, -1, 588, + 588, 588, 588, -1, -1, 588, 588, 588, + 588, 588, 588, -1, 586, -1, 588, 588, + 588, 588, 588, -1, -1, -1, -1, 588, + 588, -1, -1, 588, 588, 588, -1, 588, + 588, -1, -1, 588, -1, -1, -1, 588, + -1, -1, 588, -1, 588, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 588, + 588, 588, 588, 588, 588, 588, 588, -1, + 588, 588, 588, -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, 588, 588, 588, 588, 588, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 588, -1, 588, 588, -1, -1, -1, + 591, 591, 591, 591, 591, 591, 591, 591, + 591, 591, 591, 591, 591, 591, -1, 591, + 591, 591, 591, 591, 591, -1, -1, -1, + 591, 591, 591, 591, 591, 591, -1, 591, + 591, 591, 591, -1, 591, -1, 591, 591, + 591, -1, 591, 591, 591, 591, 591, 591, + -1, 591, 591, 591, 591, 591, 591, 591, + 591, 591, -1, 591, 591, 591, 591, -1, + -1, -1, -1, -1, -1, -1, 591, -1, + 591, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 591, 591, 591, 591, + -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, + 591, 591, 591, 591, -1, 588, 591, 591, + 591, 591, 591, 591, -1, -1, -1, 591, + 591, 591, 591, 591, -1, -1, -1, -1, + 591, 591, -1, -1, 591, 591, 591, -1, + 591, 591, 591, -1, 591, -1, -1, -1, + -1, -1, -1, -1, -1, 591, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 591, 591, 591, 591, 591, 591, 591, 591, + -1, 591, 591, 591, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 601, 601, 601, 601, -1, 601, + -1, -1, 591, 591, 591, 591, 591, -1, + 601, 601, 601, 601, 601, -1, -1, -1, + -1, -1, 591, -1, 591, 591, 601, -1, + -1, -1, 601, 601, 601, 601, -1, -1, + -1, 601, 601, 601, -1, -1, -1, -1, + 601, 601, 601, 601, 601, 601, 601, 601, + -1, -1, -1, -1, -1, -1, 601, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 601, 601, 601, 601, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 601, -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, 586, -1, -1, -1, + -1, -1, -1, -1, -1, 586, -1, 586, + 586, 586, 586, 586, 586, 586, 586, -1, + 586, 586, 586, -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, 591, -1, + -1, 586, 586, 586, 586, 586, -1, -1, + -1, -1, -1, 601, 601, 601, 601, 601, + -1, 601, 601, 601, -1, -1, 586, -1, + -1, -1, -1, -1, 602, 602, 602, 602, + -1, 602, 601, 601, -1, -1, 601, -1, + -1, -1, 602, 602, 602, 602, 602, -1, + -1, 588, 601, 601, 601, 601, 601, -1, + 602, -1, -1, -1, 602, 602, 602, 602, + -1, -1, -1, 602, 602, 602, -1, -1, + -1, -1, 602, 602, 601, 602, 602, 602, + 602, -1, -1, -1, -1, -1, -1, -1, + 602, 602, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 602, 602, + 602, 602, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 604, 604, 604, 604, 604, 604, 604, + 604, 604, 604, 604, 604, 604, 604, -1, + 604, 604, 604, 604, 604, 604, -1, -1, + -1, 604, 604, 604, 604, 604, 604, -1, + 604, 604, 604, 604, -1, 604, -1, 604, + 604, 604, -1, 604, 604, 604, 604, 604, + 604, -1, 604, 604, 604, 604, 604, 604, + 604, 604, 604, -1, 604, 604, 604, 604, + -1, -1, -1, -1, -1, -1, -1, 604, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 604, 604, 604, + 604, -1, -1, 602, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 602, 602, 602, + 602, 602, -1, 602, 602, 602, -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, 602, 602, 602, 602, + 602, 604, 604, 604, 604, -1, -1, 604, + 604, 604, 604, 604, 604, -1, -1, -1, + 604, 604, 604, 604, 604, -1, -1, -1, + -1, 604, 604, -1, -1, 604, 604, 604, + -1, 604, 604, -1, -1, 604, -1, -1, + -1, -1, -1, -1, 591, -1, 604, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 604, 604, 604, 604, 604, 604, 604, + 604, -1, 604, 604, 604, -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, 604, 604, 604, 604, 604, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 604, -1, 604, 604, -1, + -1, -1, 606, 606, 606, 606, 606, 606, + 606, 606, 606, 606, 606, 606, 606, 606, + -1, 606, 606, 606, 606, 606, 606, -1, + -1, -1, 606, 606, 606, 606, 606, 606, + -1, 606, 606, 606, 606, -1, 606, 606, + 606, 606, 606, -1, 606, 606, 606, 606, + 606, 606, -1, 606, 606, 606, 606, 606, + 606, 606, 606, 606, -1, 606, 606, 606, + 606, -1, 606, -1, -1, -1, -1, -1, + 606, -1, 606, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 606, 606, + 606, 606, -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, 606, 606, 606, 606, -1, 604, + 606, 606, 606, 606, 606, 606, -1, -1, + -1, 606, 606, 606, 606, 606, -1, -1, + -1, -1, 606, 606, -1, -1, 606, 606, + 606, -1, 606, 606, -1, -1, 606, -1, + -1, -1, 606, -1, -1, 606, -1, 606, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 606, 606, 606, 606, 606, 606, + 606, 606, -1, 606, 606, 606, -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, 606, 606, 606, 606, + 606, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 606, -1, 606, 606, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 607, 607, 607, 607, 607, + 607, 607, 607, 607, 607, 607, 607, 607, + 607, -1, 607, 607, 607, 607, 607, 607, + -1, -1, -1, 607, 607, 607, 607, 607, + 607, -1, 607, 607, 607, 607, -1, 607, + -1, 607, 607, 607, -1, 607, 607, 607, + 607, 607, 607, -1, 607, 607, 607, 607, + 607, 607, 607, 607, 607, -1, 607, 607, + 607, 607, -1, 607, -1, -1, -1, -1, + -1, 607, -1, 607, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 607, + 607, 607, 607, -1, -1, 602, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 602, + 602, 602, 602, 602, -1, 602, 602, 602, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 606, -1, -1, -1, -1, -1, 602, 602, + 602, 602, 602, 607, 607, 607, 607, -1, + -1, 607, 607, 607, 607, 607, 607, -1, + -1, -1, 607, 607, 607, 607, 607, -1, + -1, -1, -1, 607, 607, -1, -1, 607, + 607, 607, -1, 607, 607, -1, -1, 607, + -1, -1, -1, -1, -1, -1, 607, -1, + 607, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 607, 607, 607, 607, 607, + 607, 607, 607, -1, 607, 607, 607, -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, 607, 607, 607, + 607, 607, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 607, -1, 607, + 607, -1, -1, -1, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, -1, 608, 608, 608, 608, 608, + 608, -1, -1, -1, 608, 608, 608, 608, + 608, 608, -1, 608, 608, 608, 608, -1, + 608, -1, 608, 608, 608, -1, 608, 608, + 608, 608, 608, 608, -1, 608, 608, 608, + 608, 608, 608, 608, 608, 608, -1, 608, + 608, 608, 608, -1, 608, -1, -1, -1, + -1, -1, 608, -1, 608, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 608, 608, 608, 608, -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, 608, 608, 608, 608, + -1, 607, 608, 608, 608, 608, 608, 608, + -1, -1, -1, 608, 608, 608, 608, 608, + -1, -1, -1, -1, 608, 608, -1, -1, + 608, 608, 608, -1, 608, 608, -1, -1, + 608, -1, -1, -1, -1, -1, -1, 608, + -1, 608, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 608, 608, 608, 608, + 608, 608, 608, 608, -1, 608, 608, 608, + -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, 608, 608, + 608, 608, 608, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 608, -1, + 608, 608, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, + 611, -1, 611, 611, 611, 611, 611, 611, + -1, -1, -1, 611, 611, 611, 611, 611, + 611, -1, 611, 611, 611, 611, -1, 611, + -1, 611, 611, 611, -1, 611, 611, 611, + 611, 611, 611, -1, 611, 611, 611, 611, + 611, 611, 611, 611, 611, -1, 611, 611, + 611, 611, -1, -1, -1, -1, -1, -1, + -1, 611, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 611, + 611, 611, 611, -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, 608, 611, 611, 611, 611, -1, + -1, 611, 611, 611, 611, 611, 611, -1, + -1, -1, 611, 611, 611, 611, 611, -1, + -1, -1, -1, 611, 611, -1, -1, 611, + 611, 611, -1, 611, 611, -1, -1, 611, + -1, -1, -1, -1, -1, -1, -1, -1, + 611, -1, -1, -1, -1, -1, -1, -1, + 607, -1, -1, 611, 611, 611, 611, 611, + 611, 611, 611, -1, 611, 611, 611, -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, 611, 611, 611, + 611, 611, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 611, -1, 611, + 611, 612, 612, 612, 612, 612, 612, 612, + 612, 612, 612, -1, 612, 612, 612, 612, + -1, -1, -1, 612, 612, 612, 612, 612, + -1, -1, -1, 612, 612, 612, -1, -1, + -1, 612, -1, -1, -1, 612, 612, 612, + 612, -1, -1, -1, 612, 612, 612, -1, + -1, -1, -1, 612, 612, -1, 612, 612, + 612, 612, -1, -1, -1, -1, -1, -1, + -1, 612, -1, -1, 612, 614, 614, 614, + 614, -1, 614, -1, -1, -1, -1, 612, + 612, 612, 612, 614, 614, 614, 614, 614, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 614, -1, -1, -1, 614, 614, 614, + 614, -1, -1, -1, 614, 614, 614, -1, + -1, -1, -1, 614, 614, 614, 614, 614, + 614, 614, 614, -1, -1, -1, -1, -1, + -1, 614, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 614, + 614, 614, 614, -1, -1, -1, -1, -1, + -1, 611, -1, -1, 614, -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, + 612, -1, -1, -1, -1, -1, -1, 612, + 612, 612, -1, 612, 612, 612, 612, 612, + 612, 612, 612, -1, 612, 612, 612, -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, 612, 612, 612, + 612, 612, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 612, -1, -1, -1, 614, 614, + 614, 614, 614, -1, 614, 614, 614, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 614, 614, -1, + -1, 614, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 614, 614, 614, + 614, 614, 615, 615, 615, 615, -1, 615, + -1, -1, -1, -1, -1, -1, -1, -1, + 615, 615, 615, 615, 615, -1, -1, 614, + -1, -1, -1, -1, -1, -1, 615, -1, + -1, -1, 615, 615, 615, 615, -1, -1, + -1, 615, 615, 615, -1, -1, -1, -1, + 615, 615, 615, 615, 615, 615, 615, 615, + -1, -1, -1, -1, -1, -1, 615, -1, + -1, -1, -1, -1, 616, 616, 616, 616, + -1, 616, -1, -1, 615, 615, 615, 615, + -1, -1, 616, 616, 616, 616, 616, -1, + -1, 615, -1, -1, -1, -1, -1, -1, + 616, -1, -1, -1, 616, 616, 616, 616, + -1, -1, -1, 616, 616, 616, -1, -1, + -1, -1, 616, 616, 616, 616, 616, 616, + 616, 616, -1, -1, -1, -1, -1, -1, + 616, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 616, 616, + 616, 616, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 616, -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, 615, 615, 615, 615, 615, + -1, 615, 615, 615, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 615, 615, -1, -1, 615, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 615, 615, 615, 615, 615, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 615, 616, 616, 616, + 616, 616, -1, 616, 616, 616, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 616, 616, -1, -1, + 616, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 616, 616, 616, 616, + 616, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 616, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 619, + 619, 619, 619, 619, 619, 619, 619, 619, + 619, 619, 619, 619, 619, -1, 619, 619, + 619, 619, 619, 619, -1, -1, -1, 619, + 619, 619, 619, 619, 619, -1, 619, 619, + 619, 619, -1, 619, -1, 619, 619, 619, + -1, 619, 619, 619, 619, 619, 619, -1, + 619, 619, 619, 619, 619, 619, 619, 619, + 619, -1, 619, 619, 619, 619, -1, -1, + -1, -1, -1, -1, -1, 619, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 612, 619, 619, 619, 619, -1, + -1, -1, -1, 612, -1, 612, 612, 612, + 612, 612, 612, 612, 612, -1, 612, 612, + 612, -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, 612, + 612, 612, 612, 612, -1, -1, -1, 619, + 619, 619, 619, -1, -1, 619, 619, 619, + 619, 619, 619, -1, 612, -1, 619, 619, + 619, 619, 619, -1, -1, -1, -1, 619, + 619, -1, -1, 619, 619, 619, -1, 619, + 619, -1, -1, 619, -1, -1, -1, -1, + -1, -1, -1, -1, 619, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 619, + 619, 619, 619, 619, 619, 619, 619, -1, + 619, 619, 619, -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, 619, 619, 619, 619, 619, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 619, -1, 619, 619, -1, -1, -1, + 620, 620, 620, 620, 620, 620, 620, 620, + 620, 620, 620, 620, 620, 620, -1, 620, + 620, 620, 620, 620, 620, -1, -1, -1, + 620, 620, 620, 620, 620, 620, -1, 620, + 620, 620, 620, -1, 620, -1, 620, 620, + 620, -1, 620, 620, 620, 620, 620, 620, + -1, 620, 620, 620, 620, 620, 620, 620, + 620, 620, -1, 620, 620, 620, 620, -1, + 620, -1, -1, -1, -1, -1, 620, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 620, 620, 620, 620, + -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, + 620, 620, 620, 620, -1, 619, 620, 620, + 620, 620, 620, 620, -1, -1, -1, 620, + 620, 620, 620, 620, -1, -1, -1, -1, + 620, 620, -1, -1, 620, 620, 620, -1, + 620, 620, -1, -1, 620, -1, -1, -1, + -1, -1, -1, -1, -1, 620, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 620, 620, 620, 620, 620, 620, 620, 620, + -1, 620, 620, 620, -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, 620, 620, 620, 620, 620, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 620, -1, 620, 620, 621, 621, + 621, 621, 621, 621, 621, 621, 621, 621, + -1, 621, 621, 621, 621, -1, -1, -1, + 621, 621, 621, 621, 621, -1, -1, -1, + 621, 621, 621, -1, -1, -1, 621, -1, + -1, -1, 621, 621, 621, 621, -1, -1, + -1, 621, 621, 621, -1, -1, -1, -1, + 621, 621, -1, 621, 621, 621, 621, -1, + -1, -1, -1, -1, -1, -1, 621, -1, + -1, 621, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 621, 621, 621, 621, + 625, 625, 625, 625, 625, 625, 625, 625, + -1, 625, -1, 625, 625, 625, 625, -1, + -1, -1, 625, 625, 625, 625, 625, -1, + -1, -1, 625, 625, 625, -1, -1, -1, + 625, -1, -1, -1, 625, 625, 625, 625, + -1, -1, -1, 625, 625, 625, -1, -1, + -1, -1, 625, 625, -1, 625, 625, 625, + 625, -1, -1, -1, -1, -1, -1, -1, + 625, -1, 625, -1, -1, -1, 620, -1, + -1, -1, -1, -1, -1, -1, 625, 625, + 625, 625, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 621, -1, -1, + -1, -1, -1, -1, 621, 621, 621, -1, + 621, 621, 621, 621, 621, 621, 621, 621, + -1, 621, 621, 621, -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, 621, 621, 621, 621, 621, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 621, + -1, -1, -1, -1, -1, -1, -1, 625, + -1, -1, -1, -1, -1, 625, -1, -1, + -1, -1, 625, 625, 625, 625, 625, 625, + 625, 625, -1, 625, 625, 625, -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, 625, 625, 625, 625, + 625, 627, 627, 627, 627, 627, 627, 627, + 627, 627, 627, 627, 627, 627, 627, -1, + 627, 627, 627, 627, 627, 627, -1, -1, + -1, 627, 627, 627, 627, 627, 627, -1, + 627, 627, 627, 627, -1, 627, -1, 627, + 627, 627, -1, 627, 627, 627, 627, 627, + 627, -1, 627, 627, 627, 627, 627, 627, + 627, 627, 627, -1, 627, 627, 627, 627, + -1, -1, -1, -1, -1, -1, -1, 627, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 627, 627, 627, + 627, -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, 627, 627, 627, 627, -1, -1, 627, + 627, 627, 627, 627, 627, -1, -1, -1, + 627, 627, 627, 627, 627, -1, -1, -1, + -1, 627, 627, -1, -1, 627, 627, 627, + -1, 627, 627, -1, -1, 627, -1, -1, + -1, -1, -1, -1, -1, -1, 627, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 627, 627, 627, 627, 627, 627, 627, + 627, -1, 627, 627, 627, -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, 627, 627, 627, 627, 627, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 627, -1, 627, 627, -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, 628, 628, 628, 628, + 628, 628, 628, 628, 628, 628, 628, 628, + 628, 628, -1, 628, 628, 628, 628, 628, + 628, -1, -1, -1, 628, 628, 628, 628, + 628, 628, -1, 628, 628, 628, 628, -1, + 628, -1, 628, 628, 628, -1, 628, 628, + 628, 628, 628, 628, -1, 628, 628, 628, + 628, 628, 628, 628, 628, 628, -1, 628, + 628, 628, 628, -1, 628, -1, -1, -1, + -1, -1, 628, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 621, + 628, 628, 628, 628, -1, -1, -1, 627, + 621, -1, 621, 621, 621, 621, 621, 621, + 621, 621, -1, 621, 621, 621, -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, 621, 621, 621, 621, + 621, -1, -1, -1, 628, 628, 628, 628, + -1, -1, 628, 628, 628, 628, 628, 628, + -1, 621, -1, 628, 628, 628, 628, 628, + -1, -1, -1, -1, 628, 628, -1, -1, + 628, 628, 628, -1, 628, 628, -1, -1, + 628, -1, -1, -1, -1, -1, -1, -1, + -1, 628, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 628, 628, 628, 628, + 628, 628, 628, 628, -1, 628, 628, 628, + -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, 628, 628, + 628, 628, 628, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 628, -1, + 628, 628, -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, -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, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 628 +}; + +static int pid_0_parser_keys[] = { + 8, 812, 265, 811, 422, 422, 422, 422, + 8, 812, 8, 422, 8, 422, 8, 422, + 8, 422, 8, 422, 8, 422, 8, 422, + 8, 422, 8, 422, 8, 422, 8, 422, + 8, 422, 8, 422, 8, 422, 8, 422, + 8, 422, 8, 422, 8, 422, 64, 64, + 56, 720, 64, 64, 64, 733, 64, 64, + 8, 812, 64, 64, 64, 64, 32, 765, + 64, 64, 8, 422, 8, 422, 8, 753, + 64, 64, 18, 800, 18, 800, 8, 422, + 64, 800, 18, 800, 8, 422, 8, 422, + 64, 754, 32, 754, 80, 80, 64, 765, + 64, 64, 68, 68, 78, 78, 78, 78, + 78, 78, 78, 78, 8, 422, 74, 74, + 64, 64, 64, 219, 64, 219, 64, 219, + 8, 422, 8, 422, 8, 422, 8, 422, + 18, 800, 18, 800, 18, 800, 18, 800, + 8, 422, 8, 422, 8, 422, 8, 422, + 8, 422, 18, 800, 64, 800, 32, 767, + 32, 767, 32, 767, 64, 800, 8, 422, + 31, 31, 78, 78, 78, 78, 88, 88, + 18, 800, 88, 88, 8, 422, 64, 64, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 8, 797, 102, 825, 107, 813, + 110, 773, 18, 826, 546, 546, 43, 816, + 10, 10, 56, 816, 130, 130, 130, 130, + 130, 130, 18, 800, 18, 800, 18, 800, + 18, 800, 32, 765, 74, 74, 32, 765, + 32, 765, 67, 779, 67, 793, 8, 815, + 74, 74, 14, 800, 8, 422, 8, 422, + 14, 800, 32, 765, 32, 765, 32, 765, + 32, 765, 64, 765, 78, 78, 8, 753, + 8, 422, 32, 765, 8, 422, 14, 817, + 8, 753, 32, 765, 18, 800, 18, 800, + 32, 765, 8, 720, 8, 422, 66, 66, + 97, 97, 8, 814, 107, 813, 32, 765, + 102, 771, 102, 825, 102, 279, 18, 826, + 107, 772, 107, 813, 110, 110, 110, 110, + 71, 71, 18, 826, 67, 69, 18, 800, + 79, 99, 8, 422, 8, 422, 8, 422, + 8, 422, 10, 422, 8, 422, 8, 422, + 64, 66, 64, 64, 8, 422, 18, 800, + 18, 800, 18, 800, 18, 800, 18, 800, + 18, 800, 18, 800, 18, 800, 18, 800, + 18, 800, 18, 800, 18, 800, 18, 800, + 64, 800, 8, 766, 8, 422, 18, 800, + 18, 800, 8, 422, 43, 725, 43, 816, + 8, 422, 56, 720, 8, 422, 112, 808, + 112, 808, 79, 79, 18, 800, 79, 79, + 79, 79, 79, 79, 32, 219, 67, 768, + 67, 768, 67, 768, 8, 422, 8, 777, + 8, 422, 102, 819, 107, 813, 110, 773, + 64, 820, 8, 762, 8, 422, 8, 792, + 102, 823, 107, 813, 110, 773, 18, 824, + 10, 10, 8, 815, 8, 269, 8, 269, + 8, 269, 8, 269, 8, 269, 8, 269, + 8, 269, 8, 269, 8, 269, 8, 269, + 8, 269, 8, 269, 8, 269, 8, 269, + 8, 269, 32, 219, 32, 765, 8, 746, + 14, 817, 8, 422, 8, 422, 89, 89, + 89, 89, 89, 89, 32, 765, 64, 64, + 64, 712, 8, 422, 8, 422, 81, 81, + 22, 751, 14, 817, 8, 422, 89, 89, + 79, 79, 79, 79, 89, 89, 66, 130, + 8, 422, 8, 721, 10, 10, 8, 814, + 8, 268, 8, 268, 8, 268, 8, 268, + 8, 268, 8, 268, 8, 268, 8, 268, + 8, 268, 8, 268, 8, 268, 8, 268, + 8, 268, 8, 268, 8, 268, 107, 772, + 8, 422, 105, 105, 102, 225, 8, 422, + 8, 422, 8, 422, 107, 226, 8, 422, + 8, 422, 8, 422, 8, 422, 102, 825, + 107, 813, 110, 773, 18, 280, 71, 105, + 8, 422, 8, 422, 64, 765, 8, 422, + 8, 422, 78, 78, 8, 422, 8, 422, + 8, 422, 8, 422, 8, 422, 8, 422, + 8, 422, 8, 422, 8, 422, 8, 422, + 8, 422, 8, 422, 8, 422, 8, 422, + 8, 422, 64, 66, 8, 422, 8, 422, + 8, 422, 79, 79, 8, 422, 64, 64, + 64, 64, 43, 196, 70, 742, 70, 196, + 130, 130, 117, 131, 112, 802, 80, 262, + 80, 262, 112, 808, 80, 262, 80, 262, + 80, 262, 80, 262, 80, 262, 127, 127, + 138, 809, 138, 809, 112, 808, 80, 262, + 130, 130, 117, 131, 8, 422, 79, 79, + 8, 422, 8, 422, 8, 422, 67, 793, + 18, 818, 67, 793, 67, 788, 102, 771, + 102, 819, 102, 273, 64, 820, 107, 772, + 110, 110, 71, 71, 64, 820, 64, 774, + 102, 819, 107, 813, 110, 773, 74, 74, + 8, 422, 102, 771, 102, 823, 102, 277, + 18, 824, 107, 772, 110, 110, 71, 71, + 18, 824, 67, 69, 18, 800, 8, 422, + 8, 422, 8, 422, 8, 422, 10, 10, + 8, 422, 31, 31, 81, 81, 8, 422, + 8, 746, 8, 422, 18, 800, 14, 800, + 8, 422, 8, 422, 8, 422, 89, 89, + 75, 766, 79, 79, 64, 712, 74, 74, + 22, 205, 8, 422, 81, 81, 14, 817, + 64, 800, 18, 800, 8, 422, 8, 422, + 8, 422, 8, 422, 56, 56, 10, 10, + 8, 422, 8, 422, 102, 279, 102, 771, + 107, 772, 110, 110, 8, 422, 64, 712, + 8, 422, 8, 422, 8, 422, 64, 737, + 112, 808, 117, 131, 80, 262, 138, 810, + 138, 810, 8, 422, 112, 808, 112, 808, + 112, 808, 112, 808, 112, 808, 112, 808, + 112, 808, 112, 808, 112, 262, 80, 262, + 80, 262, 80, 262, 80, 262, 87, 113, + 113, 807, 8, 422, 79, 79, 18, 818, + 18, 272, 8, 422, 8, 422, 8, 422, + 8, 422, 8, 787, 102, 821, 107, 813, + 110, 773, 18, 822, 105, 105, 102, 225, + 8, 422, 8, 422, 8, 422, 64, 228, + 102, 771, 107, 772, 110, 110, 64, 274, + 64, 66, 71, 105, 8, 422, 105, 105, + 102, 225, 8, 422, 8, 422, 8, 422, + 102, 823, 107, 813, 110, 773, 18, 278, + 71, 105, 8, 422, 18, 782, 8, 422, + 14, 800, 8, 422, 8, 422, 8, 422, + 89, 89, 32, 765, 80, 80, 79, 79, + 67, 779, 81, 81, 8, 422, 8, 422, + 18, 280, 18, 280, 18, 280, 79, 79, + 64, 736, 70, 740, 130, 130, 80, 262, + 80, 262, 138, 264, 137, 264, 80, 262, + 112, 802, 112, 802, 112, 802, 112, 802, + 80, 262, 80, 262, 80, 262, 80, 262, + 81, 87, 113, 113, 80, 262, 80, 262, + 80, 262, 80, 262, 79, 79, 67, 247, + 102, 771, 102, 821, 102, 275, 18, 822, + 107, 772, 110, 110, 71, 71, 18, 822, + 64, 765, 18, 800, 8, 422, 102, 273, + 64, 274, 64, 274, 64, 274, 64, 766, + 64, 766, 102, 277, 102, 771, 107, 772, + 110, 110, 14, 800, 64, 800, 64, 64, + 18, 800, 8, 422, 8, 422, 64, 166, + 64, 166, 88, 88, 14, 817, 14, 271, + 80, 80, 64, 219, 8, 739, 64, 765, + 74, 74, 8, 422, 8, 721, 138, 138, + 81, 81, 80, 262, 81, 113, 105, 105, + 102, 225, 8, 422, 8, 422, 8, 422, + 64, 66, 102, 821, 107, 813, 110, 773, + 18, 276, 71, 105, 8, 422, 64, 274, + 64, 274, 18, 278, 18, 278, 18, 278, + 8, 422, 78, 78, 14, 254, 14, 254, + 32, 765, 81, 81, 14, 817, 64, 219, + 8, 738, 64, 64, 64, 66, 8, 732, + 138, 264, 80, 262, 80, 262, 81, 81, + 102, 275, 102, 771, 107, 772, 110, 110, + 75, 75, 18, 276, 18, 800, 89, 89, + 8, 422, 81, 81, 8, 422, 8, 741, + 8, 422, 64, 766, 64, 766, 8, 422, + 14, 817, 80, 262, 18, 276, 18, 276, + 18, 276, 79, 79, 64, 166, 8, 422, + 8, 422, 14, 817, 64, 219, 64, 219, + 81, 81, 14, 254, 81, 81, 8, 422, + 8, 422, 0, 0 +}; + +static unsigned int pid_0_parser_offsets[] = { + 0, 2, 14, 21, 262, 1067, 1329, 1591, + 1853, 2115, 2377, 2639, 2901, 3163, 3425, 3687, + 3949, 4211, 4473, 4735, 4997, 5259, 5521, 22, + 48, 23, 35, 30, 5783, 37, 41, 63, + 68, 6042, 6588, 6853, 69, 6326, 7112, 7349, + 71, 7628, 7895, 8268, 72, 181, 73, 77, + 74, 75, 76, 78, 80, 81, 8533, 82, + 83, 98, 102, 129, 8798, 9071, 9344, 9617, + 537, 800, 7242, 8145, 9890, 10163, 10436, 10709, + 10982, 11255, 136, 327, 373, 443, 148, 11348, + 88, 89, 90, 91, 11621, 92, 11714, 93, + 94, 96, 97, 99, 103, 12049, 233, 132, + 111, 12330, 105, 199, 106, 448, 107, 108, + 109, 12408, 12617, 12671, 12841, 477, 110, 483, + 491, 238, 339, 6267, 113, 12920, 13707, 13980, + 14228, 499, 590, 671, 727, 121, 114, 14328, + 14590, 779, 15025, 15298, 15398, 989, 15620, 15674, + 1248, 15944, 16457, 115, 116, 16168, 137, 1257, + 124, 457, 387, 13292, 214, 496, 117, 118, + 119, 16705, 126, 16769, 122, 17006, 17552, 17825, + 18098, 120, 18371, 18636, 186, 123, 18898, 19131, + 19184, 19269, 17296, 19354, 19407, 19492, 19577, 19630, + 19747, 20028, 20166, 20251, 171, 20553, 21034, 21307, + 21361, 21598, 581, 6003, 22144, 225, 22409, 1023, + 5890, 130, 21898, 135, 140, 149, 623, 764, + 865, 1130, 22681, 22954, 23227, 1297, 527, 217, + 1808, 23500, 23773, 24055, 740, 819, 254, 13011, + 152, 24304, 24361, 24550, 24607, 24796, 25034, 25091, + 25280, 25337, 25526, 25583, 25772, 25829, 26018, 26075, + 26264, 650, 1519, 26477, 26725, 26825, 27090, 156, + 157, 161, 1553, 167, 511, 27371, 27633, 175, + 453, 27895, 28138, 178, 179, 187, 192, 320, + 28409, 28684, 193, 28759, 14665, 28947, 29009, 29087, + 29149, 29227, 29367, 29445, 29507, 29585, 29647, 29725, + 29787, 29865, 29927, 524, 30146, 196, 230, 30411, + 30684, 30957, 369, 31230, 31503, 31776, 32049, 1002, + 1028, 418, 32322, 310, 32415, 32688, 761, 32961, + 33226, 197, 33491, 33756, 34029, 34302, 34575, 34848, + 35121, 35394, 35667, 35940, 36213, 36486, 36759, 37032, + 37305, 227, 37570, 37841, 38112, 198, 38383, 208, + 212, 530, 259, 303, 219, 605, 1680, 2034, + 2186, 1656, 2435, 2697, 2959, 3221, 3483, 223, + 786, 798, 3637, 3758, 224, 873, 38648, 236, + 38913, 39178, 39443, 1058, 39676, 1772, 1785, 610, + 1821, 823, 3342, 641, 248, 252, 3866, 1138, + 1920, 1046, 637, 285, 39931, 855, 3646, 1446, + 40208, 694, 336, 345, 40286, 392, 40523, 40616, + 41162, 41435, 41708, 351, 41981, 354, 355, 42243, + 42508, 42773, 43006, 43084, 43325, 43871, 44136, 358, + 1183, 362, 546, 363, 859, 44401, 365, 44663, + 450, 39531, 44921, 45467, 45740, 46013, 366, 372, + 46278, 46540, 1286, 893, 877, 378, 46805, 1392, + 47070, 47343, 47608, 1840, 7177, 397, 4130, 432, + 869, 47873, 3909, 4433, 4553, 4706, 4277, 4801, + 5063, 5217, 2181, 5592, 6646, 7698, 8076, 423, + 1294, 48138, 379, 48372, 40900, 48627, 49173, 49446, + 49719, 49992, 3902, 1430, 921, 48904, 381, 440, + 50265, 50538, 50811, 933, 899, 1055, 382, 2556, + 452, 386, 51084, 390, 544, 51357, 51630, 51903, + 4687, 1930, 1253, 43576, 533, 52176, 52449, 52542, + 52790, 52890, 53214, 53587, 395, 5973, 396, 400, + 1394, 428, 53852, 54125, 54359, 54423, 54647, 431, + 2443, 474, 437, 8181, 8449, 595, 657, 8604, + 5333, 8750, 9174, 9447, 9692, 9965, 10238, 10511, + 470, 455, 10784, 11057, 11650, 11971, 460, 2279, + 1198, 5596, 2591, 54711, 1291, 482, 490, 54778, + 1814, 54988, 55081, 2332, 2818, 3080, 3877, 5855, + 7296, 2629, 1264, 1326, 521, 55354, 702, 536, + 55411, 55652, 56194, 743, 1351, 541, 55923, 56492, + 547, 2449, 56735, 1406, 549, 57000, 57271, 550, + 556, 12124, 582, 568, 601, 57536, 57809, 58082, + 573, 5741, 2599, 1307, 58355, 599, 58448, 4953, + 5449, 58721, 58789, 59026, 59119, 574, 59367, 59450, + 2305, 579, 59691, 902, 59791, 585, 829, 60056, + 861, 13387, 13497, 603, 2852, 1654, 1513, 609, + 616, 60290, 60500, 620, 60593, 621, 60858, 61139, + 61404, 6387, 4282, 61675, 61937, 14038, 62005, 62242, + 62308, 628, 1875, 62583, 62848, 63110, 2705, 2708, + 631, 63192, 644, 63433, 63756, 0 +}; + +static unsigned int pid_0_parser_targs[] = { + 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, 55, 55, + 55, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 80, 81, 82, 83, 84, + 85, 86, 87, 87, 88, 88, 89, 89, + 90, 90, 91, 91, 92, 92, 93, 93, + 94, 94, 95, 95, 96, 96, 97, 97, + 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 205, 206, 206, + 207, 207, 208, 208, 209, 210, 211, 212, + 212, 213, 213, 214, 214, 215, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 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, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, 357, 358, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, + 377, 378, 379, 380, 381, 382, 383, 383, + 384, 384, 385, 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, 395, 396, 397, + 398, 399, 400, 401, 402, 403, 404, 405, + 406, 407, 408, 409, 410, 411, 412, 413, + 414, 415, 416, 417, 418, 419, 420, 421, + 422, 423, 424, 425, 426, 427, 428, 429, + 430, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 450, 451, 451, + 452, 452, 453, 453, 454, 455, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 465, + 466, 467, 468, 469, 470, 471, 472, 473, + 474, 475, 476, 477, 478, 479, 480, 481, + 482, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, + 497, 498, 499, 500, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, + 521, 522, 523, 524, 525, 526, 527, 528, + 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, + 545, 546, 547, 548, 549, 550, 551, 552, + 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, + 569, 570, 571, 572, 573, 574, 575, 576, + 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, + 593, 594, 595, 596, 597, 598, 599, 600, + 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, + 617, 618, 619, 620, 621, 622, 623, 624, + 625, 626, 627, 628, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 629, 629, 629, + 629, 629 +}; + +static unsigned int pid_0_parser_actInds[] = { + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 48, 50, 52, 54, 56, 58, 60, 62, + 64, 66, 68, 70, 72, 74, 76, 78, + 80, 82, 84, 86, 88, 90, 92, 94, + 96, 98, 100, 102, 104, 106, 108, 111, + 114, 118, 123, 125, 127, 129, 131, 133, + 135, 137, 139, 141, 143, 145, 147, 149, + 151, 153, 155, 157, 159, 161, 163, 165, + 167, 169, 171, 173, 176, 178, 180, 182, + 184, 186, 188, 190, 193, 195, 198, 200, + 203, 205, 208, 210, 213, 215, 218, 220, + 223, 225, 228, 230, 233, 235, 238, 240, + 243, 245, 247, 249, 251, 253, 255, 257, + 259, 261, 263, 265, 267, 270, 272, 274, + 276, 278, 280, 282, 284, 286, 288, 290, + 292, 294, 296, 298, 300, 302, 304, 306, + 308, 310, 312, 314, 316, 318, 320, 322, + 324, 326, 328, 330, 332, 334, 336, 338, + 340, 342, 344, 346, 348, 350, 352, 354, + 356, 358, 360, 362, 364, 366, 368, 370, + 372, 374, 376, 378, 380, 382, 384, 386, + 388, 390, 392, 394, 396, 398, 400, 402, + 404, 406, 408, 410, 412, 414, 417, 419, + 422, 424, 426, 428, 430, 432, 434, 436, + 438, 440, 442, 444, 446, 448, 450, 452, + 454, 456, 458, 460, 462, 464, 467, 469, + 472, 474, 477, 479, 482, 484, 486, 488, + 490, 493, 495, 498, 500, 503, 505, 508, + 510, 512, 514, 516, 518, 520, 522, 524, + 526, 528, 530, 532, 534, 536, 538, 540, + 542, 544, 546, 548, 550, 552, 554, 556, + 558, 560, 562, 564, 566, 568, 570, 572, + 574, 576, 578, 580, 582, 584, 586, 588, + 590, 592, 594, 596, 598, 600, 602, 604, + 606, 608, 610, 612, 614, 616, 618, 620, + 622, 624, 626, 628, 630, 632, 634, 636, + 638, 640, 642, 644, 646, 648, 650, 652, + 654, 656, 658, 660, 662, 664, 666, 668, + 670, 672, 674, 676, 678, 680, 682, 684, + 686, 688, 690, 692, 694, 696, 698, 700, + 702, 704, 706, 708, 710, 712, 714, 716, + 718, 720, 722, 724, 726, 728, 730, 732, + 734, 736, 738, 740, 742, 744, 746, 748, + 750, 752, 754, 756, 758, 760, 762, 764, + 766, 768, 770, 772, 774, 776, 778, 780, + 782, 784, 786, 788, 790, 792, 794, 796, + 798, 800, 802, 805, 807, 809, 811, 813, + 815, 817, 819, 821, 823, 825, 827, 829, + 831, 833, 835, 837, 839, 841, 843, 845, + 848, 850, 853, 855, 858, 861, 864, 866, + 868, 870, 872, 874, 876, 878, 880, 882, + 884, 886, 888, 890, 892, 894, 896, 898, + 900, 902, 904, 906, 908, 910, 912, 914, + 916, 918, 920, 922, 924, 926, 928, 930, + 932, 934, 936, 938, 940, 942, 944, 946, + 948, 950, 952, 954, 956, 958, 960, 962, + 964, 966, 968, 970, 972, 974, 976, 978, + 980, 982, 984, 986, 988, 990, 993, 995, + 998, 1000, 1003, 1005, 1008, 1010, 1012, 1014, + 1016, 1018, 1020, 1022, 1024, 1026, 1028, 1030, + 1032, 1034, 1036, 1038, 1040, 1042, 1044, 1046, + 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, + 1064, 1066, 1069, 1071, 1073, 1075, 1077, 1079, + 1081, 1083, 1085, 1087, 1089, 1091, 1093, 1095, + 1097, 1099, 1101, 1103, 1105, 1107, 1109, 1111, + 1113, 1115, 1117, 1119, 1121, 1123, 1125, 1127, + 1129, 1131, 1133, 1135, 1137, 1139, 1141, 1143, + 1145, 1147, 1149, 1151, 1153, 1155, 1157, 1159, + 1161, 1163, 1165, 1167, 1169, 1171, 1173, 1175, + 1177, 1179, 1181, 1183, 1185, 1187, 1189, 1191, + 1193, 1195, 1197, 1199, 1201, 1203, 1205, 1207, + 1209, 1211, 1213, 1215, 1218, 1220, 1222, 1224, + 1226, 1228, 1230, 1232, 1234, 1236, 1238, 1240, + 1242, 1244, 1246, 1248, 1250, 1252, 1254, 1256, + 1258, 1260, 1262, 1264, 1266, 1268, 1270, 1272, + 1274, 1276, 1278, 1280, 1282, 1284, 1286, 1288, + 1290, 1292, 1294, 1296, 1298, 1300, 1302, 1304, + 1306, 1308, 1310, 1312, 1314, 1316, 1318, 1320, + 1322, 1324, 1326, 1328, 1330, 1332, 1334, 1336, + 1338, 1340, 1342, 1344, 1346, 1348, 1350, 1352, + 1354, 1356, 1358, 1360, 1362, 1364, 1366, 1368, + 1370, 1372, 1374, 1376, 1378, 1380, 1382, 1384, + 1386, 1388, 1390, 1392, 1394, 1396, 1398, 1400, + 1402, 1404, 1406, 1408, 1410, 1412, 1414, 1416, + 1418, 1420, 1422, 1424, 1426, 1428, 1430, 1432, + 1434, 1436, 1438, 1440, 1442, 1444, 1446, 1448, + 1450, 1452, 1454, 1456, 1458, 1460, 1462, 1464, + 1466, 1468, 1470, 1472, 1474, 1476, 1478, 1480, + 1482, 1484, 1486, 1488, 1490, 1492, 1494, 1496, + 1498, 1500, 1502, 1504, 1506, 1508, 1510, 1512, + 1514, 1516, 1518, 1520, 1522, 1524, 1526, 1528, + 1530, 1532, 1534, 1536, 1538, 1540, 1542, 1544, + 1546, 1548, 1550, 1552, 1554, 1556, 1558, 1560, + 1562, 1564, 1566, 1568, 1570, 1572, 1574, 1576, + 1578, 1580, 1582, 1584, 1586, 1588, 1590, 1592, + 1594, 1596, 1598, 1600, 1602, 1604, 1606, 1608, + 1610, 1612, 1614, 1616, 1618, 1620, 1622, 1624, + 1626, 1628, 1630, 1632, 1634, 1636, 1638, 1640, + 1642, 1644, 1646, 1648, 1650, 1652, 1654, 1656, + 1658, 1660, 1662, 1664, 1666, 1668, 1670, 1672, + 1674, 1676, 1678, 1680, 1682, 1684, 1686, 1688, + 1690, 1692, 1694, 1696, 1698, 1700, 1702, 1704, + 1706, 1708, 1710, 1712, 1714, 1716, 1718, 1720, + 1722, 1724, 1726, 1728, 1730, 1732, 1734, 1736, + 1738, 1740, 1742, 1744, 1746, 1748, 1750, 1752, + 1754, 1756, 1758, 1760, 1762, 1764, 1766, 1768, + 1770, 1772, 1774, 1776, 1778, 1780, 1782, 1784, + 1786, 1788, 1790, 1792, 1794, 1796, 1798, 1800, + 1802, 1804, 1806, 1808, 1810, 1812, 1814, 1816, + 1818, 1820, 1822, 1824, 1826, 1828, 1830, 1832, + 1834, 1836, 1838, 1840, 1842, 1844, 1846, 1848, + 1850, 1852, 1854, 1856, 1858, 1860, 1862, 1864, + 1866, 1868, 1870, 1872, 1874, 1876, 1878, 1880, + 1882, 1884, 1886, 1888, 1890, 1892, 1894, 1896, + 1898, 1900, 1902, 1904, 1906, 1908, 1910, 1912, + 1914, 1916, 1918, 1920, 1922, 1924, 1926, 1928, + 1930, 1932, 1934, 1936, 1938, 1940, 1942, 1944, + 1946, 1948, 1950, 1952, 1954, 1956, 1958, 1960, + 1962, 1964, 1966, 1968, 1970, 1972, 1974, 1976, + 1978, 1980, 1982, 1984, 1986, 1988, 1990, 1992, + 1994, 1996, 1998, 2000, 2002, 2004, 2006, 2008, + 2010, 2012, 2014, 2016, 2018, 2020, 2022, 2024, + 2026, 2028, 2030, 2032, 2034, 2036, 2038, 2040, + 2042, 2044, 2046, 2048, 2050, 2053, 2056, 2059, + 2062, 2065 +}; + +static unsigned int pid_0_parser_actions[] = { + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 214, 0, 210, + 1, 0, 1106, 786, 1, 0, 214, 1106, + 786, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 214, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 214, 1, + 0, 1, 0, 214, 1, 0, 1, 0, + 214, 1, 0, 1, 0, 214, 1, 0, + 1, 0, 214, 1, 0, 1, 0, 214, + 1, 0, 1, 0, 1, 1086, 0, 1, + 0, 1, 1086, 0, 1, 0, 1, 1086, + 0, 1, 0, 1, 1086, 0, 1, 0, + 1, 1086, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 810, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1086, 1, + 0, 1, 0, 1, 690, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 914, 0, 1, 0, 1, 914, 0, + 1, 0, 1, 914, 0, 1, 0, 1, + 914, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 1034, 0, 1, 0, 1, + 1034, 0, 1, 0, 1, 1034, 0, 1, + 0, 1, 1034, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 830, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 506, 1, 0, + 1, 0, 1, 506, 0, 1, 0, 506, + 1, 0, 1, 506, 0, 1, 506, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 982, + 0, 1, 0, 1, 982, 0, 1, 0, + 1, 982, 0, 1, 0, 1, 982, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 506, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 398, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 6, 0, 10, 0, 14, 0, + 18, 0, 22, 0, 26, 0, 30, 0, + 34, 0, 38, 0, 42, 0, 46, 0, + 50, 0, 54, 0, 58, 0, 62, 0, + 66, 0, 70, 0, 74, 0, 122, 0, + 126, 0, 130, 0, 134, 0, 138, 0, + 142, 0, 146, 0, 150, 0, 154, 0, + 158, 0, 162, 0, 166, 0, 170, 0, + 174, 0, 266, 0, 270, 0, 274, 0, + 278, 0, 282, 0, 286, 0, 290, 0, + 294, 0, 298, 0, 302, 0, 306, 0, + 310, 0, 314, 0, 318, 0, 322, 0, + 1, 0, 2, 0, 78, 0, 82, 0, + 86, 0, 90, 0, 94, 0, 98, 0, + 102, 0, 106, 0, 110, 0, 114, 0, + 118, 0, 178, 0, 182, 0, 186, 0, + 190, 0, 194, 0, 198, 0, 202, 0, + 206, 0, 210, 0, 214, 0, 218, 0, + 222, 0, 226, 0, 230, 0, 234, 0, + 238, 0, 242, 0, 246, 0, 250, 0, + 254, 0, 258, 0, 262, 0, 330, 0, + 334, 0, 338, 0, 342, 0, 346, 0, + 350, 0, 354, 0, 358, 0, 362, 0, + 366, 0, 370, 0, 374, 0, 378, 0, + 382, 0, 386, 0, 390, 0, 394, 0, + 398, 0, 402, 0, 406, 0, 410, 0, + 414, 0, 418, 0, 422, 0, 426, 0, + 430, 0, 434, 0, 438, 0, 442, 0, + 446, 0, 450, 0, 454, 0, 458, 0, + 462, 0, 466, 0, 470, 0, 474, 0, + 478, 0, 482, 0, 486, 0, 490, 0, + 494, 0, 498, 0, 502, 0, 506, 0, + 510, 0, 514, 0, 518, 0, 522, 0, + 526, 0, 530, 0, 534, 0, 538, 0, + 542, 0, 546, 0, 550, 0, 554, 0, + 558, 0, 562, 0, 566, 0, 570, 0, + 574, 0, 578, 0, 582, 0, 586, 0, + 590, 0, 594, 0, 598, 0, 602, 0, + 606, 0, 610, 0, 614, 0, 618, 0, + 622, 0, 626, 0, 630, 0, 634, 0, + 638, 0, 642, 0, 646, 0, 650, 0, + 654, 0, 658, 0, 662, 0, 666, 0, + 670, 0, 674, 0, 678, 0, 682, 0, + 686, 0, 690, 0, 694, 0, 698, 0, + 702, 0, 706, 0, 710, 0, 714, 0, + 718, 0, 722, 0, 726, 0, 730, 0, + 734, 0, 738, 0, 742, 0, 746, 0, + 750, 0, 754, 0, 758, 0, 762, 0, + 766, 0, 770, 0, 774, 0, 778, 0, + 782, 0, 786, 0, 790, 0, 794, 0, + 798, 0, 802, 0, 806, 0, 810, 0, + 814, 0, 818, 0, 822, 0, 826, 0, + 830, 0, 834, 0, 838, 0, 842, 0, + 846, 0, 850, 0, 854, 0, 858, 0, + 862, 0, 866, 0, 870, 0, 874, 0, + 878, 0, 882, 0, 886, 0, 890, 0, + 894, 0, 898, 0, 902, 0, 906, 0, + 910, 0, 914, 0, 918, 0, 922, 0, + 926, 0, 934, 0, 938, 0, 942, 0, + 946, 0, 950, 0, 954, 0, 958, 0, + 962, 0, 966, 0, 970, 0, 974, 0, + 978, 0, 982, 0, 986, 0, 990, 0, + 994, 0, 998, 0, 1002, 0, 1006, 0, + 1010, 0, 1014, 0, 1018, 0, 1022, 0, + 1026, 0, 1030, 0, 1034, 0, 1038, 0, + 1042, 0, 1046, 0, 1050, 0, 1054, 0, + 1058, 0, 1062, 0, 1066, 0, 1070, 0, + 1074, 0, 1078, 0, 1082, 0, 1086, 0, + 1090, 0, 1094, 0, 1098, 0, 1102, 0, + 1106, 0, 1110, 0, 1114, 0, 1118, 0, + 1122, 0, 1126, 0, 1130, 0, 1134, 0, + 1138, 0, 1142, 0, 1146, 0, 1150, 0, + 1154, 0, 1158, 0, 1162, 0, 1166, 0, + 1170, 0, 1174, 0, 1178, 0, 1182, 0, + 1186, 0, 1190, 0, 1194, 0, 1198, 0, + 1202, 0, 1206, 0, 1210, 0, 1214, 0, + 1218, 0, 1222, 0, 1234, 0, 1238, 0, + 1242, 0, 1246, 0, 1250, 0, 1254, 0, + 1258, 0, 1262, 0, 1266, 0, 1270, 0, + 1274, 0, 1278, 0, 1282, 0, 1286, 0, + 1290, 0, 1294, 0, 1298, 0, 1302, 0, + 1306, 0, 1310, 0, 1314, 0, 1318, 0, + 1322, 0, 1326, 0, 1330, 0, 1334, 0, + 1338, 0, 1342, 0, 1346, 0, 1350, 0, + 1354, 0, 1358, 0, 1362, 0, 1366, 0, + 1370, 0, 1374, 0, 1378, 0, 1382, 0, + 1386, 0, 918, 922, 0, 918, 926, 0, + 1106, 786, 0, 1226, 1210, 0, 1230, 1214, + 0, 918, 922, 926, 0 +}; + +static int pid_0_parser_commitLen[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 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, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 +}; + +static int pid_0_parser_tokenRegionInds[] = { + 1, 3, 5, 7, 9, 11, 13, 15, + 17, 19, 21, 23, 25, 27, 29, 31, + 33, 35, 37, 39, 41, 43, 45, 47, + 49, 51, 53, 56, 58, 60, 62, 64, + 66, 68, 70, 72, 74, 76, 78, 80, + 83, 85, 87, 89, 91, 93, 95, 97, + 99, 101, 103, 105, 107, 109, 111, 113, + 115, 117, 119, 121, 123, 126, 129, 132, + 135, 137, 139, 141, 143, 146, 149, 152, + 155, 158, 160, 162, 164, 166, 168, 170, + 173, 175, 177, 179, 181, 183, 185, 188, + 190, 192, 194, 196, 198, 200, 203, 205, + 207, 209, 211, 213, 215, 217, 220, 222, + 224, 226, 228, 230, 232, 234, 236, 238, + 240, 242, 244, 246, 248, 250, 252, 255, + 257, 259, 261, 263, 265, 267, 269, 271, + 273, 275, 277, 280, 282, 284, 286, 288, + 290, 292, 294, 296, 298, 300, 302, 304, + 306, 308, 310, 312, 315, 317, 319, 321, + 323, 325, 328, 330, 332, 334, 337, 340, + 343, 346, 348, 350, 352, 354, 356, 358, + 360, 362, 364, 366, 368, 370, 372, 374, + 376, 378, 380, 382, 384, 386, 389, 392, + 394, 396, 399, 401, 404, 406, 409, 411, + 413, 415, 417, 419, 421, 423, 425, 427, + 429, 431, 433, 436, 439, 442, 444, 446, + 448, 450, 453, 456, 459, 461, 463, 465, + 467, 469, 471, 473, 475, 477, 479, 481, + 483, 485, 487, 489, 491, 493, 495, 497, + 499, 501, 503, 505, 507, 509, 511, 513, + 515, 517, 519, 521, 523, 525, 527, 529, + 531, 533, 535, 537, 539, 541, 543, 545, + 548, 550, 552, 554, 556, 558, 560, 562, + 564, 566, 568, 570, 572, 574, 576, 578, + 580, 582, 584, 586, 588, 591, 593, 595, + 598, 601, 604, 606, 609, 612, 615, 618, + 620, 622, 624, 627, 630, 633, 636, 638, + 640, 642, 644, 646, 649, 652, 655, 658, + 661, 664, 667, 670, 673, 676, 679, 682, + 685, 688, 690, 694, 698, 702, 704, 706, + 708, 710, 713, 715, 717, 719, 721, 723, + 726, 729, 731, 734, 737, 740, 743, 746, + 748, 750, 752, 754, 757, 759, 761, 763, + 765, 767, 769, 771, 773, 775, 777, 779, + 781, 783, 785, 788, 790, 792, 794, 797, + 799, 801, 803, 805, 807, 810, 812, 814, + 816, 819, 821, 823, 825, 828, 830, 832, + 835, 838, 841, 844, 846, 848, 850, 852, + 854, 856, 858, 860, 862, 865, 868, 871, + 873, 875, 877, 879, 881, 883, 885, 887, + 889, 891, 893, 896, 899, 902, 904, 906, + 908, 910, 912, 914, 916, 918, 920, 922, + 924, 927, 929, 931, 933, 935, 937, 940, + 942, 944, 946, 948, 950, 952, 954, 956, + 958, 960, 962, 964, 967, 970, 973, 976, + 979, 981, 983, 985, 987, 989, 992, 995, + 998, 1001, 1004, 1006, 1008, 1010, 1012, 1014, + 1016, 1019, 1022, 1025, 1027, 1029, 1031, 1033, + 1036, 1038, 1041, 1044, 1046, 1048, 1051, 1054, + 1057, 1059, 1061, 1063, 1066, 1069, 1072, 1074, + 1076, 1078, 1080, 1082, 1085, 1087, 1089, 1091, + 1093, 1095, 1097, 1100, 1102, 1105, 1108, 1111, + 1113, 1115, 1117, 1119, 1122, 1125, 1127, 1129, + 1132, 1134, 1136, 1138, 1140, 1143, 1146, 1149, + 1152, 1154, 1156, 1159, 1162, 1165, 1168, 1170, + 1172, 1174, 1176, 1178, 1181, 1183, 1185, 1187, + 1190, 1192, 1194, 1197, 1199, 1202, 1205, 1208, + 1211, 1214, 1216, 1218, 1220, 1222, 1224, 1226, + 1228, 1230, 1232, 1235, 1237, 1239, 1241, 1243, + 1245, 1247, 1249, 1251, 1253, 1255, 1257, 1259, + 1261, 1263, 1266, 1269, 1271, 1273, 1276, 1279, + 1282, 1284, 1286, 1288, 1290, 1293, 1296, 1299, + 1302, 1305, 1308, 1311, 1314, 1316, 1318, 1320, + 1322, 1324, 1326, 1328, 1330, 1332, 1334, 1336, + 1338, 1340, 1343, 1346, 1348, 1350, 1352, 1354, + 1356, 1358, 1361, 1363, 1365, 1367, 1369, 1371, + 1373, 1375, 1377, 1379, 1381, 1383, 1386, 1389, + 1392, 1395, 1397, 1399, 1401, 1403, 1405, 1407, + 1409, 1411, 1413, 1415, 1417, 1419 +}; + +static int pid_0_parser_tokenRegions[] = { + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 17, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 5, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 5, 0, 1, 5, + 0, 1, 5, 0, 1, 5, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 5, 0, 1, 5, 0, 1, 5, 0, + 1, 5, 0, 1, 5, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 5, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 5, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 5, 0, 5, 0, 9, 0, 13, + 0, 1, 0, 0, 0, 1, 0, 1, + 0, 1, 17, 0, 17, 0, 17, 0, + 17, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 5, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 5, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 9, 0, + 1, 0, 5, 0, 5, 0, 5, 0, + 1, 5, 0, 9, 0, 9, 0, 13, + 0, 13, 0, 1, 0, 1, 5, 0, + 1, 0, 1, 0, 1, 0, 1, 5, + 0, 1, 5, 0, 1, 5, 0, 1, + 5, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 17, 0, 1, 5, 0, + 1, 0, 1, 0, 1, 5, 0, 1, + 0, 1, 17, 0, 1, 0, 1, 17, + 0, 1, 0, 17, 0, 17, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 5, 0, 1, 5, 0, 1, + 5, 0, 5, 0, 9, 0, 13, 0, + 1, 0, 1, 5, 0, 1, 5, 0, + 1, 5, 0, 5, 0, 9, 0, 13, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 17, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 9, 0, 1, 17, 0, 5, + 0, 5, 0, 1, 5, 0, 1, 5, + 0, 1, 5, 0, 9, 0, 1, 5, + 0, 1, 5, 0, 1, 5, 0, 1, + 5, 0, 5, 0, 9, 0, 13, 0, + 1, 5, 0, 1, 5, 0, 1, 5, + 0, 1, 5, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 5, + 0, 1, 5, 0, 1, 5, 0, 1, + 5, 0, 1, 5, 0, 1, 5, 0, + 1, 5, 0, 1, 5, 0, 1, 5, + 0, 1, 5, 0, 1, 5, 0, 1, + 5, 0, 1, 5, 0, 1, 17, 0, + 1, 0, 1, 17, 5, 0, 1, 17, + 5, 0, 1, 17, 5, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 17, + 0, 1, 0, 1, 0, 17, 0, 17, + 0, 17, 0, 1, 17, 0, 1, 17, + 0, 17, 0, 1, 17, 0, 1, 17, + 0, 1, 17, 0, 1, 17, 0, 1, + 17, 0, 17, 0, 21, 0, 21, 0, + 17, 0, 17, 1, 0, 17, 0, 17, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 5, 0, 5, 0, 5, + 0, 1, 5, 0, 9, 0, 13, 0, + 1, 0, 1, 5, 0, 1, 0, 5, + 0, 9, 0, 13, 0, 1, 0, 1, + 5, 0, 5, 0, 5, 0, 5, 0, + 1, 5, 0, 9, 0, 13, 0, 1, + 0, 1, 5, 0, 1, 0, 1, 0, + 1, 5, 0, 1, 5, 0, 1, 5, + 0, 1, 5, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 17, + 0, 1, 17, 0, 1, 17, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 5, 0, + 1, 5, 0, 1, 5, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 5, 0, 5, 0, 9, 0, 13, 0, + 1, 0, 1, 0, 1, 5, 0, 1, + 0, 1, 0, 1, 0, 17, 0, 17, + 0, 1, 17, 0, 21, 0, 21, 0, + 1, 0, 17, 0, 17, 0, 17, 0, + 17, 0, 17, 0, 17, 0, 17, 0, + 17, 0, 17, 0, 17, 1, 0, 17, + 1, 0, 17, 1, 0, 17, 1, 0, + 17, 1, 0, 17, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 5, 0, + 1, 5, 0, 1, 5, 0, 1, 5, + 0, 1, 5, 0, 5, 0, 9, 0, + 13, 0, 1, 0, 5, 0, 5, 0, + 1, 5, 0, 1, 5, 0, 1, 5, + 0, 1, 0, 5, 0, 9, 0, 13, + 0, 1, 5, 0, 1, 0, 1, 5, + 0, 1, 5, 0, 5, 0, 5, 0, + 1, 5, 0, 1, 5, 0, 1, 5, + 0, 5, 0, 9, 0, 13, 0, 1, + 5, 0, 1, 5, 0, 1, 5, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 17, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 5, 0, 1, 0, 1, 5, + 0, 1, 5, 0, 1, 5, 0, 1, + 0, 1, 0, 1, 0, 17, 0, 1, + 17, 0, 1, 17, 0, 21, 0, 21, + 0, 1, 17, 0, 17, 0, 17, 0, + 17, 0, 17, 0, 17, 1, 0, 17, + 1, 0, 17, 1, 0, 17, 1, 0, + 1, 0, 17, 0, 1, 17, 0, 1, + 17, 0, 1, 17, 0, 1, 17, 0, + 1, 0, 1, 0, 5, 0, 5, 0, + 5, 0, 1, 5, 0, 9, 0, 13, + 0, 1, 0, 1, 5, 0, 1, 0, + 1, 0, 1, 5, 0, 5, 0, 1, + 5, 0, 1, 5, 0, 1, 5, 0, + 1, 5, 0, 1, 5, 0, 5, 0, + 5, 0, 9, 0, 13, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 17, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 21, 0, 1, 0, 1, + 17, 0, 17, 1, 0, 5, 0, 5, + 0, 1, 5, 0, 1, 5, 0, 1, + 5, 0, 1, 0, 5, 0, 9, 0, + 13, 0, 1, 5, 0, 1, 5, 0, + 1, 5, 0, 1, 5, 0, 1, 5, + 0, 1, 5, 0, 1, 5, 0, 1, + 5, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 21, 0, 1, 17, 0, 1, + 17, 0, 1, 0, 5, 0, 5, 0, + 9, 0, 13, 0, 1, 0, 1, 5, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 17, 0, 1, 5, 0, 1, 5, 0, + 1, 5, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 0 +}; + +static int pid_0_parser_tokenPreRegions[] = { + 0, -1, 0, -1, 0, -1, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + 0, -1, 0, -1, 0, -1, 0, 3, + 0, 3, 0, 3, 0, 3, 3, 0, + 3, 0, 3, 0, 3, 0, 3, 0, + -1, 0, 3, 0, -1, 0, -1, 0, + -1, 0, 3, 0, 3, 0, 3, 0, + -1, -1, 0, 3, 0, 3, 0, 3, + 0, 3, 0, 3, 0, 3, 0, 3, + 0, -1, 0, 3, 0, 3, 0, 3, + 0, 3, 0, 3, 0, 3, 0, -1, + 0, 3, 0, -1, 0, 3, 0, 3, + 0, 3, 0, -1, -1, 0, -1, -1, + 0, -1, -1, 0, -1, -1, 0, 3, + 0, 3, 0, 3, 0, 3, 0, -1, + -1, 0, 3, 3, 0, 3, 3, 0, + 3, 3, 0, 3, 3, 0, 3, 0, + 3, 0, 3, 0, 3, 0, 3, 0, + 3, 0, -1, -1, 0, -1, 0, 3, + 0, 3, 0, 3, 0, 3, 0, 3, + 0, -1, -1, 0, -1, 0, 3, 0, + 3, 0, 3, 0, 3, 0, 3, 0, + -1, -1, 0, -1, 0, -1, 0, -1, + 0, 3, 0, -1, 0, 3, 0, -1, + 0, 3, 3, 0, 3, 0, -1, 0, + 3, 0, 3, 0, 3, 0, 3, 0, + 3, 0, -1, 0, 3, 0, -1, 0, + -1, 0, -1, 0, -1, 0, 3, 0, + 3, 0, -1, 0, -1, -1, 0, -1, + 0, -1, 0, 3, 0, 3, 0, 3, + 0, 3, 0, 3, 0, 3, 0, -1, + 0, -1, 0, 3, 0, -1, -1, 0, + 3, 0, -1, 0, 3, 0, 3, 0, + 3, 0, 3, 0, -1, 0, -1, 0, + -1, 0, 3, 0, 3, 0, -1, 0, + 3, 0, -1, 0, -1, 0, -1, 0, + -1, -1, 0, -1, 0, -1, 0, -1, + 0, -1, 0, -1, 0, -1, -1, 0, + -1, 0, -1, 0, -1, 0, -1, -1, + 0, -1, -1, 0, -1, -1, 0, -1, + -1, 0, -1, 0, -1, 0, -1, 0, + -1, 0, -1, 0, -1, 0, 3, 0, + 3, 0, 3, 0, 3, 0, 3, 0, + 3, 0, 3, 0, 3, 0, 3, 0, + 3, 0, 3, 0, 3, 0, 3, 0, + 3, 0, 3, 3, 0, -1, -1, 0, + 3, 0, 3, 0, 3, 3, 0, -1, + 0, -1, -1, 0, 3, 0, -1, -1, + 0, 3, 0, 19, 0, 19, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + 0, 3, 0, -1, 0, -1, 0, -1, + 0, -1, -1, 0, -1, -1, 0, -1, + -1, 0, -1, 0, -1, 0, -1, 0, + 3, 0, -1, -1, 0, -1, -1, 0, + -1, -1, 0, -1, 0, -1, 0, -1, + 0, 3, 0, -1, 0, -1, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + 0, -1, 0, -1, 0, 3, 0, 3, + 0, -1, 0, 3, 0, -1, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + 0, -1, 0, 3, 0, -1, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + 0, 3, 3, 0, -1, 0, 3, 0, + -1, 0, -1, 0, -1, 0, -1, 0, + -1, 0, -1, 0, -1, 0, -1, 0, + -1, 0, -1, 0, -1, 0, -1, 0, + -1, 0, -1, 0, -1, 0, -1, 0, + -1, 0, -1, 0, -1, -1, 0, -1, + 0, -1, 0, -1, -1, 0, -1, -1, + 0, -1, -1, 0, -1, 0, -1, -1, + 0, -1, -1, 0, -1, -1, 0, -1, + -1, 0, -1, 0, -1, 0, -1, 0, + -1, -1, 0, -1, -1, 0, 3, 3, + 0, 3, 3, 0, 3, 0, 3, 0, + 3, 0, 3, 0, -1, 0, -1, -1, + 0, -1, -1, 0, -1, -1, 0, -1, + -1, 0, -1, -1, 0, -1, -1, 0, + -1, -1, 0, -1, -1, 0, -1, -1, + 0, -1, -1, 0, -1, -1, 0, -1, + -1, 0, -1, -1, 0, -1, -1, 0, + 3, 0, 3, 3, 3, 0, 3, 3, + 3, 0, 3, 3, 3, 0, -1, 0, + -1, 0, 3, 0, 3, 0, -1, -1, + 0, -1, 0, 3, 0, -1, 0, -1, + 0, -1, 0, -1, -1, 0, -1, -1, + 0, 19, 0, -1, -1, 0, 19, 19, + 0, 19, 19, 0, 19, 19, 0, 19, + 19, 0, -1, 0, -1, 0, -1, 0, + 19, 0, -1, -1, 0, -1, 0, -1, + 0, 3, 0, -1, 0, 3, 0, 3, + 0, 3, 0, -1, 0, 3, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + 0, -1, -1, 0, -1, 0, -1, 0, + -1, 0, -1, -1, 0, -1, 0, -1, + 0, -1, 0, -1, 0, 3, 0, -1, + -1, 0, -1, 0, -1, 0, -1, 0, + -1, -1, 0, -1, 0, -1, 0, -1, + 0, -1, -1, 0, -1, 0, -1, 0, + -1, -1, 0, -1, -1, 0, 3, 3, + 0, 3, 3, 0, -1, 0, 3, 0, + -1, 0, -1, 0, -1, 0, -1, 0, + -1, 0, 3, 0, 3, 0, 3, 3, + 0, 3, 3, 0, 3, 3, 0, -1, + 0, 3, 0, -1, 0, -1, 0, 3, + 0, -1, 0, 3, 0, -1, 0, -1, + 0, 3, 0, 3, 0, 3, 3, 0, + 3, 3, 0, 3, 3, 0, -1, 0, + 3, 0, -1, 0, 3, 0, -1, 0, + -1, 0, -1, 0, -1, 0, -1, 0, + -1, 0, 3, 0, 3, 3, 0, -1, + 0, -1, 0, 3, 0, 19, 0, -1, + 0, -1, -1, 0, -1, 0, -1, 0, + 19, 0, 19, 0, 19, 0, 19, 0, + 19, 0, -1, 0, 19, 0, 19, 0, + 19, 0, 19, 0, 19, 19, 0, 19, + 19, 0, 19, 19, 0, 19, 19, 0, + 3, 3, 0, 19, 0, 19, 0, -1, + 0, -1, 0, -1, 0, -1, -1, 0, + -1, -1, 0, -1, -1, 0, -1, -1, + 0, -1, -1, 0, -1, 0, -1, 0, + -1, 0, 3, 0, -1, 0, -1, 0, + -1, -1, 0, -1, -1, 0, -1, -1, + 0, 3, 0, -1, 0, -1, 0, -1, + 0, -1, -1, 0, -1, 0, -1, -1, + 0, 3, 3, 0, -1, 0, -1, 0, + -1, -1, 0, -1, -1, 0, -1, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + -1, 0, -1, -1, 0, 3, 3, 0, + 3, 0, 3, 0, -1, 0, -1, 0, + -1, 0, 3, 3, 0, -1, 0, 3, + 0, 3, 0, -1, 0, -1, 0, -1, + 0, -1, -1, 0, 3, 0, -1, -1, + 0, -1, -1, 0, -1, -1, 0, -1, + 0, -1, 0, 3, 0, -1, 0, 19, + 19, 0, -1, -1, 0, -1, 0, -1, + 0, -1, -1, 0, -1, 0, -1, 0, + -1, 0, -1, 0, -1, -1, 0, -1, + -1, 0, -1, -1, 0, -1, -1, 0, + 19, 0, 3, 0, -1, -1, 0, 19, + 19, 0, 19, 19, 0, 19, 19, 0, + -1, 0, 3, 0, -1, 0, -1, 0, + -1, 0, -1, -1, 0, -1, 0, -1, + 0, -1, 0, -1, -1, 0, -1, 0, + -1, 0, -1, -1, 0, -1, 0, -1, + -1, 0, -1, -1, 0, -1, -1, 0, + 3, 3, 0, 3, 3, 0, -1, 0, + -1, 0, -1, 0, -1, 0, -1, 0, + -1, 0, -1, 0, -1, 0, -1, 0, + 3, 3, 0, -1, 0, -1, 0, 3, + 0, 3, 0, -1, 0, 3, 0, -1, + 0, 3, 0, -1, 0, 3, 0, -1, + 0, 19, 0, -1, 0, 19, 0, 3, + 3, 0, 3, 3, 0, -1, 0, -1, + 0, -1, -1, 0, -1, -1, 0, -1, + -1, 0, -1, 0, -1, 0, -1, 0, + -1, 0, -1, -1, 0, -1, -1, 0, + 3, 3, 0, -1, -1, 0, -1, -1, + 0, -1, -1, 0, -1, -1, 0, -1, + -1, 0, -1, 0, -1, 0, 3, 0, + -1, 0, 3, 0, -1, 0, 3, 0, + 3, 0, -1, 0, 3, 0, -1, 0, + -1, 0, -1, 0, 3, 3, 0, 3, + 3, 0, 19, 0, -1, 0, -1, 0, + -1, 0, -1, 0, 3, 0, 3, 3, + 0, 3, 0, -1, 0, 3, 0, -1, + 0, 3, 0, -1, 0, 3, 0, 3, + 0, 3, 0, -1, 0, 3, 0, 3, + 3, 0, -1, -1, 0, -1, -1, 0, + -1, -1, 0, -1, 0, 3, 0, 3, + 0, -1, 0, 3, 0, -1, 0, -1, + 0, -1, 0, 3, 0, -1, 0, 3, + 0, 3, 0, 0 +}; + +static PdaTables pid_0_pdaTables = +{ + pid_0_parser_indicies, + pid_0_parser_owners, + pid_0_parser_keys, + pid_0_parser_offsets, + pid_0_parser_targs, + pid_0_parser_actInds, + pid_0_parser_actions, + pid_0_parser_commitLen, + pid_0_parser_tokenRegionInds, + pid_0_parser_tokenRegions, + pid_0_parser_tokenPreRegions, + + 64171, + 1260, + 630, + 1010, + 1010, + 2069, + 1010, + 1420, + 1420 +}; + +static LocalInfo locals_0[] = { + { 1, -1 } +}; + +static unsigned char copy_0[] = { + 0, 0 +}; + +static unsigned char copy_1[] = { + 0, 0 +}; + +static unsigned char copy_2[] = { + 0, 0 +}; + +static unsigned char copy_3[] = { + 0, 0 +}; + +static unsigned char copy_4[] = { + 0, 0 +}; + +static unsigned char copy_5[] = { + 0, 0 +}; + +static unsigned char copy_6[] = { + 0, 0 +}; + +static unsigned char copy_7[] = { + 0, 0 +}; + +static unsigned char copy_8[] = { + 0, 0 +}; + +static unsigned char copy_9[] = { + 0, 0 +}; + +static unsigned char copy_10[] = { + 0, 0 +}; + +static unsigned char copy_11[] = { + 0, 0 +}; + +static unsigned char copy_12[] = { + 0, 0 +}; + +static unsigned char copy_13[] = { + 0, 0 +}; + +static unsigned char copy_14[] = { + 0, 0 +}; + +static unsigned char copy_15[] = { + 0, 0 +}; + +static unsigned char copy_16[] = { + 0, 0 +}; + +static unsigned char copy_17[] = { + 0, 0 +}; + +static unsigned char copy_18[] = { + 0, 0 +}; + +static unsigned char copy_19[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_20[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_21[] = { + 0, 0 +}; + +static unsigned char copy_22[] = { + 0, 0 +}; + +static unsigned char copy_23[] = { + 0, 0 +}; + +static unsigned char copy_24[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_25[] = { + 0, 0 +}; + +static unsigned char copy_26[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_27[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_28[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_29[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_30[] = { + 0, 0 +}; + +static unsigned char copy_31[] = { + 0, 0 +}; + +static unsigned char copy_32[] = { + 0, 0 +}; + +static unsigned char copy_33[] = { + 0, 0 +}; + +static unsigned char copy_34[] = { + 0, 0 +}; + +static unsigned char copy_35[] = { + 0, 0 +}; + +static unsigned char copy_36[] = { + 0, 0 +}; + +static unsigned char copy_37[] = { + 0, 0 +}; + +static unsigned char copy_38[] = { + 0, 0 +}; + +static unsigned char copy_39[] = { + 0, 0 +}; + +static unsigned char copy_40[] = { + 0, 0 +}; + +static unsigned char copy_41[] = { + 0, 0 +}; + +static unsigned char copy_42[] = { + 0, 0 +}; + +static unsigned char copy_43[] = { + 0, 0 +}; + +static unsigned char copy_44[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_45[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_46[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7 +}; + +static unsigned char copy_47[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_48[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_50[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_51[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_52[] = { + 0, 0 +}; + +static unsigned char copy_54[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, + 0, 8 +}; + +static unsigned char copy_55[] = { + 0, 0 +}; + +static unsigned char copy_56[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_57[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_58[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_59[] = { + 0, 0 +}; + +static unsigned char copy_60[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_61[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_63[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_65[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_66[] = { + 0, 0 +}; + +static unsigned char copy_67[] = { + 0, 0 +}; + +static unsigned char copy_68[] = { + 0, 0 +}; + +static unsigned char copy_69[] = { + 0, 0 +}; + +static unsigned char copy_70[] = { + 0, 0 +}; + +static unsigned char copy_71[] = { + 0, 0 +}; + +static unsigned char copy_72[] = { + 0, 0 +}; + +static unsigned char copy_73[] = { + 0, 0 +}; + +static unsigned char copy_74[] = { + 0, 0 +}; + +static unsigned char copy_75[] = { + 0, 0 +}; + +static unsigned char copy_76[] = { + 0, 0 +}; + +static unsigned char copy_77[] = { + 0, 0 +}; + +static unsigned char copy_78[] = { + 0, 0 +}; + +static unsigned char copy_79[] = { + 0, 0 +}; + +static unsigned char copy_80[] = { + 0, 0 +}; + +static unsigned char copy_82[] = { + 0, 0 +}; + +static unsigned char copy_84[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4 +}; + +static unsigned char copy_85[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_86[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4 +}; + +static unsigned char copy_87[] = { + 0, 0 +}; + +static unsigned char copy_89[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, + 0, 8 +}; + +static unsigned char copy_90[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_91[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_93[] = { + 0, 0 +}; + +static unsigned char copy_95[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4 +}; + +static unsigned char copy_96[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_97[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_98[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_100[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_102[] = { + 0, 0 +}; + +static unsigned char copy_104[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_106[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5 +}; + +static unsigned char copy_107[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_109[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_110[] = { + 0, 0 +}; + +static unsigned char copy_111[] = { + 0, 0 +}; + +static unsigned char copy_112[] = { + 0, 0 +}; + +static unsigned char copy_113[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_114[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6 +}; + +static unsigned char copy_115[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_116[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_117[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_118[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_119[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_120[] = { + 0, 0 +}; + +static unsigned char copy_121[] = { + 0, 0 +}; + +static unsigned char copy_122[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_123[] = { + 0, 0 +}; + +static unsigned char copy_124[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_125[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_127[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_129[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4 +}; + +static unsigned char copy_130[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_131[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_132[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_133[] = { + 0, 0 +}; + +static unsigned char copy_134[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_135[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_137[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_138[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_140[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_141[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_142[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_143[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_144[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_145[] = { + 0, 0 +}; + +static unsigned char copy_146[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_147[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_148[] = { + 0, 0 +}; + +static unsigned char copy_149[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_150[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_151[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_152[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_153[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_154[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_155[] = { + 0, 0 +}; + +static unsigned char copy_156[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_157[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_158[] = { + 0, 0 +}; + +static unsigned char copy_159[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_160[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_161[] = { + 0, 0 +}; + +static unsigned char copy_162[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_163[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_164[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_165[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_166[] = { + 0, 0 +}; + +static unsigned char copy_167[] = { + 0, 0 +}; + +static unsigned char copy_168[] = { + 0, 0 +}; + +static unsigned char copy_170[] = { + 0, 0 +}; + +static unsigned char copy_171[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_172[] = { + 0, 0 +}; + +static unsigned char copy_173[] = { + 0, 0 +}; + +static unsigned char copy_174[] = { + 0, 0 +}; + +static unsigned char copy_175[] = { + 0, 0 +}; + +static unsigned char copy_176[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_177[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_178[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4 +}; + +static unsigned char copy_179[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4 +}; + +static unsigned char copy_180[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4 +}; + +static unsigned char copy_181[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_182[] = { + 0, 0 +}; + +static unsigned char copy_183[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_184[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_185[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_186[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_187[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_188[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4 +}; + +static unsigned char copy_189[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_190[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5 +}; + +static unsigned char copy_191[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4 +}; + +static unsigned char copy_192[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_193[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_194[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_195[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_197[] = { + 0, 0 +}; + +static unsigned char copy_198[] = { + 0, 0 +}; + +static unsigned char copy_199[] = { + 0, 0 +}; + +static unsigned char copy_201[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_203[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_205[] = { + 0, 0 +}; + +static unsigned char copy_206[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_208[] = { + 0, 0 +}; + +static unsigned char copy_209[] = { + 0, 0 +}; + +static unsigned char copy_210[] = { + 0, 0 +}; + +static unsigned char copy_211[] = { + 0, 0 +}; + +static unsigned char copy_212[] = { + 0, 0 +}; + +static unsigned char copy_214[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_215[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_216[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_217[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_218[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_219[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_220[] = { + 0, 0 +}; + +static unsigned char copy_221[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_222[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_223[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_224[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_225[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_226[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_227[] = { + 0, 0 +}; + +static unsigned char copy_228[] = { + 0, 0 +}; + +static unsigned char copy_233[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_234[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_235[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_236[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_237[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_238[] = { + 0, 0 +}; + +static unsigned char copy_239[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_240[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_241[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_242[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_243[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_244[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_245[] = { + 0, 0 +}; + +static unsigned char copy_246[] = { + 0, 0 +}; + +static unsigned char copy_247[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_248[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_249[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_250[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_251[] = { + 0, 0 +}; + +static unsigned char copy_252[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_253[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_254[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_255[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_256[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_257[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_258[] = { + 0, 0 +}; + +static unsigned char copy_259[] = { + 0, 0 +}; + +static unsigned char copy_260[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_261[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_262[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_263[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_264[] = { + 0, 0 +}; + +static unsigned char copy_265[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_266[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_267[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_268[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_269[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_270[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_271[] = { + 0, 0 +}; + +static unsigned char copy_272[] = { + 0, 0 +}; + +static unsigned char copy_273[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_274[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_275[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_277[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_278[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_279[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_280[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_281[] = { + 0, 0 +}; + +static unsigned char copy_282[] = { + 0, 0 +}; + +static unsigned char copy_284[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_285[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_286[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_287[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_288[] = { + 0, 0 +}; + +static unsigned char copy_289[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_290[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_291[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_292[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_293[] = { + 0, 0, 0, 1, 0, 2, 0, 3 +}; + +static unsigned char copy_294[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4 +}; + +static unsigned char copy_295[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4 +}; + +static unsigned char copy_296[] = { + 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5 +}; + +static unsigned char copy_297[] = { + 0, 0 +}; + +static unsigned char copy_298[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_299[] = { + 0, 0 +}; + +static unsigned char copy_300[] = { + 0, 0 +}; + +static unsigned char copy_301[] = { + 0, 0 +}; + +static unsigned char copy_302[] = { + 0, 0 +}; + +static unsigned char copy_303[] = { + 0, 0 +}; + +static unsigned char copy_304[] = { + 0, 0 +}; + +static unsigned char copy_305[] = { + 0, 0 +}; + +static unsigned char copy_306[] = { + 0, 0 +}; + +static unsigned char copy_307[] = { + 0, 0 +}; + +static unsigned char copy_308[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_309[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_310[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_311[] = { + 0, 0, 0, 1, 0, 2 +}; + +static unsigned char copy_312[] = { + 0, 0, 0, 1 +}; + +static unsigned char copy_314[] = { + 0, 0 +}; + +static unsigned char copy_315[] = { + 0, 0, 0, 1, 0, 2 +}; + +static Code parser_rootCode[] = { + 28, 1, 0, 184, 2, 0, 35, 0, + 0, 31, 31, 222, 32, 223, 31, 87, + 45, 2, 0, 119, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 180, 32, 224, + 168, 29, 31, 160, 162, 0, 0, 177, + 163, 160, 171, 0, 0, 177, 172, 29, + 31, 91, 1, 0, 226, 91, 0, 0, + 31, 39, 255, 255, 29, 37, 255, 255, + 87, 49, 0, 0, 85, 204, 87, 49, + 1, 0, 144 +}; + +static LangElInfo parser_lelInfo[] = { + { "__UNUSED", "__UNUSED", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0 }, + { "ptr", "ptr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_void", "void", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_bool", "bool", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_int", "int", 0, 0, 0, 0, -1, 249, 0, 0, 0, 0, -1, 0, 0 }, + { "str", "str", 0, 0, 0, 0, -1, 250, 0, 0, 0, 0, -1, 0, 0 }, + { "stream", "stream", 0, 0, 0, 0, -1, 251, 0, 0, 0, 0, -1, 0, 0 }, + { "il", "il", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "DEF", "DEF", 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX", "LEX", 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, -1, 0, 0 }, + { "END", "END", 0, 0, 0, 0, -1, 5, 0, 0, 0, 0, -1, 0, 0 }, + { "TOKEN", "TOKEN", 0, 0, 0, 0, -1, 6, 0, 0, 0, 0, -1, 0, 0 }, + { "RL", "RL", 0, 0, 0, 0, -1, 7, 0, 0, 0, 0, -1, 0, 0 }, + { "IGNORE", "IGNORE", 0, 0, 0, 0, -1, 8, 0, 0, 0, 0, -1, 0, 0 }, + { "PRINT", "PRINT", 0, 0, 0, 0, -1, 9, 0, 0, 0, 0, -1, 0, 0 }, + { "PRINTS", "PRINTS", 0, 0, 0, 0, -1, 10, 0, 0, 0, 0, -1, 0, 0 }, + { "PRINT_XML", "PRINT_XML", 0, 0, 0, 0, -1, 11, 0, 0, 0, 0, -1, 0, 0 }, + { "PRINT_XML_AC", "PRINT_XML_AC", 0, 0, 0, 0, -1, 12, 0, 0, 0, 0, -1, 0, 0 }, + { "PARSE", "PARSE", 0, 0, 0, 0, -1, 13, 0, 0, 0, 0, -1, 0, 0 }, + { "PARSE_STOP", "PARSE_STOP", 0, 0, 0, 0, -1, 14, 0, 0, 0, 0, -1, 0, 0 }, + { "CONS", "CONS", 0, 0, 0, 0, -1, 15, 0, 0, 0, 0, -1, 0, 0 }, + { "MATCH", "MATCH", 0, 0, 0, 0, -1, 16, 0, 0, 0, 0, -1, 0, 0 }, + { "REQUIRE", "REQUIRE", 0, 0, 0, 0, -1, 17, 0, 0, 0, 0, -1, 0, 0 }, + { "SEND", "SEND", 0, 0, 0, 0, -1, 18, 0, 0, 0, 0, -1, 0, 0 }, + { "NAMESPACE", "NAMESPACE", 0, 0, 0, 0, -1, 19, 0, 0, 0, 0, -1, 0, 0 }, + { "FOR", "FOR", 0, 0, 0, 0, -1, 20, 0, 0, 0, 0, -1, 0, 0 }, + { "IF", "IF", 0, 0, 0, 0, -1, 21, 0, 0, 0, 0, -1, 0, 0 }, + { "YIELD", "YIELD", 0, 0, 0, 0, -1, 22, 0, 0, 0, 0, -1, 0, 0 }, + { "WHILE", "WHILE", 0, 0, 0, 0, -1, 23, 0, 0, 0, 0, -1, 0, 0 }, + { "ELSIF", "ELSIF", 0, 0, 0, 0, -1, 24, 0, 0, 0, 0, -1, 0, 0 }, + { "ELSE", "ELSE", 0, 0, 0, 0, -1, 25, 0, 0, 0, 0, -1, 0, 0 }, + { "IN", "IN", 0, 0, 0, 0, -1, 26, 0, 0, 0, 0, -1, 0, 0 }, + { "PARSER", "PARSER", 0, 0, 0, 0, -1, 27, 0, 0, 0, 0, -1, 0, 0 }, + { "LIST", "LIST", 0, 0, 0, 0, -1, 28, 0, 0, 0, 0, -1, 0, 0 }, + { "VECTOR", "VECTOR", 0, 0, 0, 0, -1, 29, 0, 0, 0, 0, -1, 0, 0 }, + { "MAP", "MAP", 0, 0, 0, 0, -1, 30, 0, 0, 0, 0, -1, 0, 0 }, + { "PTR", "PTR", 0, 0, 0, 0, -1, 31, 0, 0, 0, 0, -1, 0, 0 }, + { "ITER", "ITER", 0, 0, 0, 0, -1, 32, 0, 0, 0, 0, -1, 0, 0 }, + { "REF", "REF", 0, 0, 0, 0, -1, 33, 0, 0, 0, 0, -1, 0, 0 }, + { "EXPORT", "EXPORT", 0, 0, 0, 0, -1, 34, 0, 0, 0, 0, -1, 0, 0 }, + { "RETURN", "RETURN", 0, 0, 0, 0, -1, 35, 0, 0, 0, 0, -1, 0, 0 }, + { "BREAK", "BREAK", 0, 0, 0, 0, -1, 36, 0, 0, 0, 0, -1, 0, 0 }, + { "REJECT", "REJECT", 0, 0, 0, 0, -1, 37, 0, 0, 0, 0, -1, 0, 0 }, + { "REDUCEFIRST", "REDUCEFIRST", 0, 0, 0, 0, -1, 38, 0, 0, 0, 0, -1, 0, 0 }, + { "ALIAS", "ALIAS", 0, 0, 0, 0, -1, 39, 0, 0, 0, 0, -1, 0, 0 }, + { "COMMIT", "COMMIT", 0, 0, 0, 0, -1, 40, 0, 0, 0, 0, -1, 0, 0 }, + { "NEW", "NEW", 0, 0, 0, 0, -1, 41, 0, 0, 0, 0, -1, 0, 0 }, + { "PREEOF", "PREEOF", 0, 0, 0, 0, -1, 42, 0, 0, 0, 0, -1, 0, 0 }, + { "GLOBAL", "GLOBAL", 0, 0, 0, 0, -1, 43, 0, 0, 0, 0, -1, 0, 0 }, + { "EOS", "EOS", 0, 0, 0, 0, -1, 44, 0, 0, 0, 0, -1, 0, 0 }, + { "CAST", "CAST", 0, 0, 0, 0, -1, 45, 0, 0, 0, 0, -1, 0, 0 }, + { "MAKE_TOKEN", "MAKE_TOKEN", 0, 0, 0, 0, -1, 46, 0, 0, 0, 0, -1, 0, 0 }, + { "MAKE_TREE", "MAKE_TREE", 0, 0, 0, 0, -1, 47, 0, 0, 0, 0, -1, 0, 0 }, + { "TYPEID", "TYPEID", 0, 0, 0, 0, -1, 48, 0, 0, 0, 0, -1, 0, 0 }, + { "LITERAL", "LITERAL", 0, 0, 0, 0, -1, 49, 0, 0, 0, 0, -1, 0, 0 }, + { "CONTEXT", "CONTEXT", 0, 0, 0, 0, -1, 50, 0, 0, 0, 0, -1, 0, 0 }, + { "NI", "NI", 0, 0, 0, 0, -1, 51, 0, 0, 0, 0, -1, 0, 0 }, + { "NIL", "NIL", 0, 0, 0, 0, -1, 52, 0, 0, 0, 0, -1, 0, 0 }, + { "TRUE", "TRUE", 0, 0, 0, 0, -1, 53, 0, 0, 0, 0, -1, 0, 0 }, + { "FALSE", "FALSE", 0, 0, 0, 0, -1, 54, 0, 0, 0, 0, -1, 0, 0 }, + { "LEFT", "LEFT", 0, 0, 0, 0, -1, 55, 0, 0, 0, 0, -1, 0, 0 }, + { "RIGHT", "RIGHT", 0, 0, 0, 0, -1, 56, 0, 0, 0, 0, -1, 0, 0 }, + { "NONASSOC", "NONASSOC", 0, 0, 0, 0, -1, 57, 0, 0, 0, 0, -1, 0, 0 }, + { "INCLUDE", "INCLUDE", 0, 0, 0, 0, -1, 58, 0, 0, 0, 0, -1, 0, 0 }, + { "id", "id", 0, 0, 0, 0, -1, 59, 0, 0, 0, 0, -1, 0, 0 }, + { "number", "number", 0, 0, 0, 0, -1, 60, 0, 0, 0, 0, -1, 0, 0 }, + { "backtick_lit", "backtick_lit", 0, 0, 0, 0, -1, 61, 0, 0, 0, 0, -1, 0, 0 }, + { "DQ", "DQ", 0, 0, 0, 0, -1, 62, 0, 0, 0, 0, -1, 0, 0 }, + { "SQ", "SQ", 0, 0, 0, 0, -1, 63, 0, 0, 0, 0, -1, 0, 0 }, + { "TILDE", "TILDE", 0, 0, 0, 0, -1, 64, 0, 0, 0, 0, -1, 0, 0 }, + { "SQOPEN", "SQOPEN", 0, 0, 0, 0, -1, 65, 0, 0, 0, 0, -1, 0, 0 }, + { "SQCLOSE", "SQCLOSE", 0, 0, 0, 0, -1, 66, 0, 0, 0, 0, -1, 0, 0 }, + { "BAR", "BAR", 0, 0, 0, 0, -1, 67, 0, 0, 0, 0, -1, 0, 0 }, + { "FSLASH", "FSLASH", 0, 0, 0, 0, -1, 68, 0, 0, 0, 0, -1, 0, 0 }, + { "COLON", "COLON", 0, 0, 0, 0, -1, 69, 0, 0, 0, 0, -1, 0, 0 }, + { "DOUBLE_COLON", "DOUBLE_COLON", 0, 0, 0, 0, -1, 70, 0, 0, 0, 0, -1, 0, 0 }, + { "DOT", "DOT", 0, 0, 0, 0, -1, 71, 0, 0, 0, 0, -1, 0, 0 }, + { "ARROW", "ARROW", 0, 0, 0, 0, -1, 72, 0, 0, 0, 0, -1, 0, 0 }, + { "POPEN", "POPEN", 0, 0, 0, 0, -1, 73, 0, 0, 0, 0, -1, 0, 0 }, + { "PCLOSE", "PCLOSE", 0, 0, 0, 0, -1, 74, 0, 0, 0, 0, -1, 0, 0 }, + { "COPEN", "COPEN", 0, 0, 0, 0, -1, 75, 0, 0, 0, 0, -1, 0, 0 }, + { "CCLOSE", "CCLOSE", 0, 0, 0, 0, -1, 76, 0, 0, 0, 0, -1, 0, 0 }, + { "STAR", "STAR", 0, 0, 0, 0, -1, 77, 0, 0, 0, 0, -1, 0, 0 }, + { "QUESTION", "QUESTION", 0, 0, 0, 0, -1, 78, 0, 0, 0, 0, -1, 0, 0 }, + { "EQUALS", "EQUALS", 0, 0, 0, 0, -1, 79, 0, 0, 0, 0, -1, 0, 0 }, + { "EQEQ", "EQEQ", 0, 0, 0, 0, -1, 80, 0, 0, 0, 0, -1, 0, 0 }, + { "NEQ", "NEQ", 0, 0, 0, 0, -1, 81, 0, 0, 0, 0, -1, 0, 0 }, + { "COMMA", "COMMA", 0, 0, 0, 0, -1, 82, 0, 0, 0, 0, -1, 0, 0 }, + { "LT", "LT", 0, 0, 0, 0, -1, 83, 0, 0, 0, 0, -1, 0, 0 }, + { "GT", "GT", 0, 0, 0, 0, -1, 84, 0, 0, 0, 0, -1, 0, 0 }, + { "LTEQ", "LTEQ", 0, 0, 0, 0, -1, 85, 0, 0, 0, 0, -1, 0, 0 }, + { "GTEQ", "GTEQ", 0, 0, 0, 0, -1, 86, 0, 0, 0, 0, -1, 0, 0 }, + { "BANG", "BANG", 0, 0, 0, 0, -1, 87, 0, 0, 0, 0, -1, 0, 0 }, + { "DOLLAR", "DOLLAR", 0, 0, 0, 0, -1, 88, 0, 0, 0, 0, -1, 0, 0 }, + { "CARET", "CARET", 0, 0, 0, 0, -1, 89, 0, 0, 0, 0, -1, 0, 0 }, + { "PERCENT", "PERCENT", 0, 0, 0, 0, -1, 90, 0, 0, 0, 0, -1, 0, 0 }, + { "PLUS", "PLUS", 0, 0, 0, 0, -1, 91, 0, 0, 0, 0, -1, 0, 0 }, + { "MINUS", "MINUS", 0, 0, 0, 0, -1, 92, 0, 0, 0, 0, -1, 0, 0 }, + { "AMPAMP", "AMPAMP", 0, 0, 0, 0, -1, 93, 0, 0, 0, 0, -1, 0, 0 }, + { "BARBAR", "BARBAR", 0, 0, 0, 0, -1, 94, 0, 0, 0, 0, -1, 0, 0 }, + { "_ignore_00b9", "_ignore_00b9", 0, 0, 0, 1, -1, 95, 0, 0, 0, 0, -1, 0, 0 }, + { "_ignore_00bb", "_ignore_00bb", 0, 0, 0, 1, -1, 96, 0, 0, 0, 0, -1, 0, 0 }, + { "CONS_DQ", "CONS_DQ", 0, 0, 0, 0, -1, 97, 0, 0, 0, 0, -1, 0, 0 }, + { "CONS_DQ_NL", "CONS_DQ_NL", 0, 0, 0, 0, -1, 98, 0, 0, 0, 0, -1, 0, 0 }, + { "CONS_SQOPEN", "CONS_SQOPEN", 0, 0, 0, 0, -1, 99, 0, 0, 0, 0, -1, 0, 0 }, + { "CONS_SQCLOSE", "CONS_SQCLOSE", 0, 0, 0, 0, -1, 100, 0, 0, 0, 0, -1, 0, 0 }, + { "dq_cons_data", "dq_cons_data", 0, 0, 0, 0, -1, 101, 0, 0, 0, 0, -1, 0, 0 }, + { "CONS_SQ", "CONS_SQ", 0, 0, 0, 0, -1, 102, 0, 0, 0, 0, -1, 0, 0 }, + { "CONS_SQ_NL", "CONS_SQ_NL", 0, 0, 0, 0, -1, 103, 0, 0, 0, 0, -1, 0, 0 }, + { "sq_cons_data", "sq_cons_data", 0, 0, 0, 0, -1, 104, 0, 0, 0, 0, -1, 0, 0 }, + { "TILDE_NL", "TILDE_NL", 0, 0, 0, 0, -1, 105, 0, 0, 0, 0, -1, 0, 0 }, + { "tilde_data", "tilde_data", 0, 0, 0, 0, -1, 106, 0, 0, 0, 0, -1, 0, 0 }, + { "lex_id", "lex_id", 0, 0, 0, 0, -1, 107, 0, 0, 0, 0, -1, 0, 0 }, + { "lex_uint", "lex_uint", 0, 0, 0, 0, -1, 108, 0, 0, 0, 0, -1, 0, 0 }, + { "lex_hex", "lex_hex", 0, 0, 0, 0, -1, 109, 0, 0, 0, 0, -1, 0, 0 }, + { "lex_lit", "lex_lit", 0, 0, 0, 0, -1, 110, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_DOT", "LEX_DOT", 0, 0, 0, 0, -1, 111, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_BAR", "LEX_BAR", 0, 0, 0, 0, -1, 112, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_AMP", "LEX_AMP", 0, 0, 0, 0, -1, 113, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_DASH", "LEX_DASH", 0, 0, 0, 0, -1, 114, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_POPEN", "LEX_POPEN", 0, 0, 0, 0, -1, 115, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_PCLOSE", "LEX_PCLOSE", 0, 0, 0, 0, -1, 116, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_STAR", "LEX_STAR", 0, 0, 0, 0, -1, 117, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_STARSTAR", "LEX_STARSTAR", 0, 0, 0, 0, -1, 118, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_QUESTION", "LEX_QUESTION", 0, 0, 0, 0, -1, 119, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_PLUS", "LEX_PLUS", 0, 0, 0, 0, -1, 120, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_CARET", "LEX_CARET", 0, 0, 0, 0, -1, 121, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_DOTDOT", "LEX_DOTDOT", 0, 0, 0, 0, -1, 122, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_SQOPEN_POS", "LEX_SQOPEN_POS", 0, 0, 0, 0, -1, 123, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_SQOPEN_NEG", "LEX_SQOPEN_NEG", 0, 0, 0, 0, -1, 124, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_FSLASH", "LEX_FSLASH", 0, 0, 0, 0, -1, 125, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_DASHDASH", "LEX_DASHDASH", 0, 0, 0, 0, -1, 126, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_COLON_GT", "LEX_COLON_GT", 0, 0, 0, 0, -1, 127, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_COLON_GTGT", "LEX_COLON_GTGT", 0, 0, 0, 0, -1, 128, 0, 0, 0, 0, -1, 0, 0 }, + { "LEX_LT_COLON", "LEX_LT_COLON", 0, 0, 0, 0, -1, 129, 0, 0, 0, 0, -1, 0, 0 }, + { "_ignore_00ff", "_ignore_00ff", 0, 0, 0, 1, -1, 130, 0, 0, 0, 0, -1, 0, 0 }, + { "_ignore_0101", "_ignore_0101", 0, 0, 0, 1, -1, 131, 0, 0, 0, 0, -1, 0, 0 }, + { "RE_DASH", "RE_DASH", 0, 0, 0, 0, -1, 132, 0, 0, 0, 0, -1, 0, 0 }, + { "RE_CHAR", "RE_CHAR", 0, 0, 0, 0, -1, 133, 0, 0, 0, 0, -1, 0, 0 }, + { "RE_SQCLOSE", "RE_SQCLOSE", 0, 0, 0, 0, -1, 134, 0, 0, 0, 0, -1, 0, 0 }, + { "_ign_0xdbb3a0", "_ign_0xdbb3a0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_ign_0xde4b20", "_ign_0xde4b20", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_ign_0xde7770", "_ign_0xde7770", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_ign_0xde9520", "_ign_0xde9520", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_ign_0xdea540", "_ign_0xdea540", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_ign_0xdf7df0", "_ign_0xdf7df0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "__0xde4bc0_DEF_PAT_1", "__0xde4bc0_DEF_PAT_1", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "__0xde7810_DEF_PAT_2", "__0xde7810_DEF_PAT_2", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "__0xde95c0_DEF_PAT_3", "__0xde95c0_DEF_PAT_3", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "__0xdf7e90_DEF_PAT_4", "__0xdf7e90_DEF_PAT_4", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_T_any", "_T_any", 0, 0, 0, 0, -1, 0, 0, 0, 696, 0, -1, 0, 0 }, + { "_T_start", "_T_start", 0, 0, 0, 0, -1, 135, 0, 0, 697, 0, -1, 0, 0 }, + { "_T_root_item", "_T_root_item", 0, 0, 0, 0, -1, 136, 0, 0, 698, 0, -1, 0, 0 }, + { "_T_include", "_T_include", 0, 0, 0, 0, -1, 137, 0, 0, 699, 0, -1, 0, 0 }, + { "_T_precedence_def", "_T_precedence_def", 0, 0, 0, 0, -1, 138, 0, 0, 700, 0, -1, 0, 0 }, + { "_T_pred_type", "_T_pred_type", 0, 0, 0, 0, -1, 139, 0, 0, 701, 0, -1, 0, 0 }, + { "_T_pred_token_list", "_T_pred_token_list", 0, 0, 0, 0, -1, 140, 0, 0, 702, 0, -1, 0, 0 }, + { "_T_pred_token", "_T_pred_token", 0, 0, 0, 0, -1, 141, 0, 0, 703, 0, -1, 0, 0 }, + { "_T_pre_eof_def", "_T_pre_eof_def", 0, 0, 0, 0, -1, 142, 0, 0, 704, 0, -1, 0, 0 }, + { "_T_alias_def", "_T_alias_def", 0, 0, 0, 0, -1, 143, 0, 0, 705, 0, -1, 0, 0 }, + { "_T_context_item", "_T_context_item", 0, 0, 0, 0, -1, 144, 0, 0, 706, 0, -1, 0, 0 }, + { "_T_export_def", "_T_export_def", 0, 0, 0, 0, -1, 145, 0, 0, 707, 0, -1, 0, 0 }, + { "_T_global_def", "_T_global_def", 0, 0, 0, 0, -1, 146, 0, 0, 708, 0, -1, 0, 0 }, + { "_T_iter_def", "_T_iter_def", 0, 0, 0, 0, -1, 147, 0, 0, 709, 0, -1, 0, 0 }, + { "_T_reference_type_ref", "_T_reference_type_ref", 0, 0, 0, 0, -1, 148, 0, 0, 710, 0, -1, 0, 0 }, + { "_T_param_var_def_list", "_T_param_var_def_list", 0, 0, 0, 0, -1, 149, 0, 0, 711, 0, -1, 0, 0 }, + { "_T_param_var_def", "_T_param_var_def", 0, 0, 0, 0, -1, 150, 0, 0, 712, 0, -1, 0, 0 }, + { "_T_opt_export", "_T_opt_export", 0, 0, 0, 0, -1, 151, 0, 0, 713, 0, -1, 0, 0 }, + { "_T_function_def", "_T_function_def", 0, 0, 0, 0, -1, 152, 0, 0, 714, 0, -1, 0, 0 }, + { "_T_context_var_def", "_T_context_var_def", 0, 0, 0, 0, -1, 153, 0, 0, 715, 0, -1, 0, 0 }, + { "_T_context_def", "_T_context_def", 0, 0, 0, 0, -1, 154, 0, 0, 716, 0, -1, 0, 0 }, + { "_T_literal_def", "_T_literal_def", 0, 0, 0, 0, -1, 155, 0, 0, 717, 0, -1, 0, 0 }, + { "_T_literal_list", "_T_literal_list", 0, 0, 0, 0, -1, 156, 0, 0, 718, 0, -1, 0, 0 }, + { "_T_literal_item", "_T_literal_item", 0, 0, 0, 0, -1, 157, 0, 0, 719, 0, -1, 0, 0 }, + { "_T_no_ignore_left", "_T_no_ignore_left", 0, 0, 0, 0, -1, 158, 0, 0, 720, 0, -1, 0, 0 }, + { "_T_no_ignore_right", "_T_no_ignore_right", 0, 0, 0, 0, -1, 159, 0, 0, 721, 0, -1, 0, 0 }, + { "_T_namespace_def", "_T_namespace_def", 0, 0, 0, 0, -1, 160, 0, 0, 722, 0, -1, 0, 0 }, + { "_T_namespace_item", "_T_namespace_item", 0, 0, 0, 0, -1, 161, 0, 0, 723, 0, -1, 0, 0 }, + { "_T_obj_var_list", "_T_obj_var_list", 0, 0, 0, 0, -1, 162, 0, 0, 724, 0, -1, 0, 0 }, + { "_T_opt_reduce_first", "_T_opt_reduce_first", 0, 0, 0, 0, -1, 163, 0, 0, 725, 0, -1, 0, 0 }, + { "_T_cfl_def", "_T_cfl_def", 0, 0, 0, 0, -1, 164, 0, 0, 726, 0, -1, 0, 0 }, + { "_T_region_def", "_T_region_def", 0, 0, 0, 0, -1, 165, 0, 0, 727, 0, -1, 0, 0 }, + { "_T_rl_def", "_T_rl_def", 0, 0, 0, 0, -1, 166, 0, 0, 728, 0, -1, 0, 0 }, + { "_T_opt_lex_expr", "_T_opt_lex_expr", 0, 0, 0, 0, -1, 167, 0, 0, 729, 0, -1, 0, 0 }, + { "_T_token_def", "_T_token_def", 0, 0, 0, 0, -1, 168, 0, 0, 730, 0, -1, 0, 0 }, + { "_T_ic_def", "_T_ic_def", 0, 0, 0, 0, -1, 169, 0, 0, 731, 0, -1, 0, 0 }, + { "_T_opt_translate", "_T_opt_translate", 0, 0, 0, 0, -1, 170, 0, 0, 732, 0, -1, 0, 0 }, + { "_T_opt_id", "_T_opt_id", 0, 0, 0, 0, -1, 171, 0, 0, 733, 0, -1, 0, 0 }, + { "_T_ignore_def", "_T_ignore_def", 0, 0, 0, 0, -1, 172, 0, 0, 734, 0, -1, 0, 0 }, + { "_T_prod_el", "_T_prod_el", 0, 0, 0, 0, -1, 173, 0, 0, 735, 0, -1, 0, 0 }, + { "_T_opt_prod_el_name", "_T_opt_prod_el_name", 0, 0, 0, 0, -1, 174, 0, 0, 736, 0, -1, 0, 0 }, + { "_T_prod_el_list", "_T_prod_el_list", 0, 0, 0, 0, -1, 175, 0, 0, 737, 0, -1, 0, 0 }, + { "_T_opt_commit", "_T_opt_commit", 0, 0, 0, 0, -1, 176, 0, 0, 738, 0, -1, 0, 0 }, + { "_T_opt_prod_name", "_T_opt_prod_name", 0, 0, 0, 0, -1, 177, 0, 0, 739, 0, -1, 0, 0 }, + { "_T_prod", "_T_prod", 0, 0, 0, 0, -1, 178, 0, 0, 740, 0, -1, 0, 0 }, + { "_T_opt_reduce", "_T_opt_reduce", 0, 0, 0, 0, -1, 179, 0, 0, 741, 0, -1, 0, 0 }, + { "_T_prod_list", "_T_prod_list", 0, 0, 0, 0, -1, 180, 0, 0, 742, 0, -1, 0, 0 }, + { "_T_statement", "_T_statement", 0, 0, 0, 0, -1, 181, 0, 0, 743, 0, -1, 0, 0 }, + { "_T_elsif_list", "_T_elsif_list", 0, 0, 0, 0, -1, 182, 0, 0, 744, 0, -1, 0, 0 }, + { "_T_elsif_clause", "_T_elsif_clause", 0, 0, 0, 0, -1, 183, 0, 0, 745, 0, -1, 0, 0 }, + { "_T_optional_else", "_T_optional_else", 0, 0, 0, 0, -1, 184, 0, 0, 746, 0, -1, 0, 0 }, + { "_T_call_arg_list", "_T_call_arg_list", 0, 0, 0, 0, -1, 185, 0, 0, 747, 0, -1, 0, 0 }, + { "_T_iter_call", "_T_iter_call", 0, 0, 0, 0, -1, 186, 0, 0, 748, 0, -1, 0, 0 }, + { "_T_block_or_single", "_T_block_or_single", 0, 0, 0, 0, -1, 187, 0, 0, 749, 0, -1, 0, 0 }, + { "_T_require_pattern", "_T_require_pattern", 0, 0, 0, 0, -1, 188, 0, 0, 750, 0, -1, 0, 0 }, + { "_T_opt_require_stmt", "_T_opt_require_stmt", 0, 0, 0, 0, -1, 189, 0, 0, 751, 0, -1, 0, 0 }, + { "_T_lang_stmt_list", "_T_lang_stmt_list", 0, 0, 0, 0, -1, 190, 0, 0, 752, 0, -1, 0, 0 }, + { "_T_opt_def_init", "_T_opt_def_init", 0, 0, 0, 0, -1, 191, 0, 0, 753, 0, -1, 0, 0 }, + { "_T_var_def", "_T_var_def", 0, 0, 0, 0, -1, 192, 0, 0, 754, 0, -1, 0, 0 }, + { "_T_print_stmt", "_T_print_stmt", 0, 0, 0, 0, -1, 193, 0, 0, 755, 0, -1, 0, 0 }, + { "_T_expr_stmt", "_T_expr_stmt", 0, 0, 0, 0, -1, 194, 0, 0, 756, 0, -1, 0, 0 }, + { "_T_code_expr", "_T_code_expr", 0, 0, 0, 0, -1, 195, 0, 0, 757, 0, -1, 0, 0 }, + { "_T_code_relational", "_T_code_relational", 0, 0, 0, 0, -1, 196, 0, 0, 758, 0, -1, 0, 0 }, + { "_T_code_additive", "_T_code_additive", 0, 0, 0, 0, -1, 197, 0, 0, 759, 0, -1, 0, 0 }, + { "_T_code_multiplicitive", "_T_code_multiplicitive", 0, 0, 0, 0, -1, 198, 0, 0, 760, 0, -1, 0, 0 }, + { "_T_code_unary", "_T_code_unary", 0, 0, 0, 0, -1, 199, 0, 0, 761, 0, -1, 0, 0 }, + { "_T_opt_eos", "_T_opt_eos", 0, 0, 0, 0, -1, 200, 0, 0, 762, 0, -1, 0, 0 }, + { "_T_code_factor", "_T_code_factor", 0, 0, 0, 0, -1, 201, 0, 0, 763, 0, -1, 0, 0 }, + { "_T_type_ref", "_T_type_ref", 0, 0, 0, 0, -1, 202, 0, 0, 764, 0, -1, 0, 0 }, + { "_T_region_qual", "_T_region_qual", 0, 0, 0, 0, -1, 203, 0, 0, 765, 0, -1, 0, 0 }, + { "_T_opt_repeat", "_T_opt_repeat", 0, 0, 0, 0, -1, 204, 0, 0, 766, 0, -1, 0, 0 }, + { "_T_opt_capture", "_T_opt_capture", 0, 0, 0, 0, -1, 205, 0, 0, 767, 0, -1, 0, 0 }, + { "_T_opt_field_init", "_T_opt_field_init", 0, 0, 0, 0, -1, 206, 0, 0, 768, 0, -1, 0, 0 }, + { "_T_field_init", "_T_field_init", 0, 0, 0, 0, -1, 207, 0, 0, 769, 0, -1, 0, 0 }, + { "_T_opt_label", "_T_opt_label", 0, 0, 0, 0, -1, 208, 0, 0, 770, 0, -1, 0, 0 }, + { "_T_dq_lit_term", "_T_dq_lit_term", 0, 0, 0, 0, -1, 209, 0, 0, 771, 0, -1, 0, 0 }, + { "_T_sq_lit_term", "_T_sq_lit_term", 0, 0, 0, 0, -1, 210, 0, 0, 772, 0, -1, 0, 0 }, + { "_T_opt_tilde_data", "_T_opt_tilde_data", 0, 0, 0, 0, -1, 211, 0, 0, 773, 0, -1, 0, 0 }, + { "_T_pattern_el_lel", "_T_pattern_el_lel", 0, 0, 0, 0, -1, 212, 0, 0, 774, 0, -1, 0, 0 }, + { "_T_pattern_el", "_T_pattern_el", 0, 0, 0, 0, -1, 213, 0, 0, 775, 0, -1, 0, 0 }, + { "_T_litpat_el", "_T_litpat_el", 0, 0, 0, 0, -1, 214, 0, 0, 776, 0, -1, 0, 0 }, + { "_T_pattern_top_el", "_T_pattern_top_el", 0, 0, 0, 0, -1, 215, 0, 0, 777, 0, -1, 0, 0 }, + { "_T_pattern_list", "_T_pattern_list", 0, 0, 0, 0, -1, 216, 0, 0, 778, 0, -1, 0, 0 }, + { "_T_pattern", "_T_pattern", 0, 0, 0, 0, -1, 217, 0, 0, 779, 0, -1, 0, 0 }, + { "_T_E1", "_T_E1", 0, 0, 0, 0, -1, 218, 0, 0, 780, 0, -1, 0, 0 }, + { "_T_E2", "_T_E2", 0, 0, 0, 0, -1, 219, 0, 0, 781, 0, -1, 0, 0 }, + { "_T_E3", "_T_E3", 0, 0, 0, 0, -1, 220, 0, 0, 782, 0, -1, 0, 0 }, + { "_T_E4", "_T_E4", 0, 0, 0, 0, -1, 221, 0, 0, 783, 0, -1, 0, 0 }, + { "_T_cons_el", "_T_cons_el", 0, 0, 0, 0, -1, 222, 0, 0, 784, 0, -1, 0, 0 }, + { "_T_lit_cons_el", "_T_lit_cons_el", 0, 0, 0, 0, -1, 223, 0, 0, 785, 0, -1, 0, 0 }, + { "_T_cons_top_el", "_T_cons_top_el", 0, 0, 0, 0, -1, 224, 0, 0, 786, 0, -1, 0, 0 }, + { "_T_cons_list", "_T_cons_list", 0, 0, 0, 0, -1, 225, 0, 0, 787, 0, -1, 0, 0 }, + { "_T_constructor", "_T_constructor", 0, 0, 0, 0, -1, 226, 0, 0, 788, 0, -1, 0, 0 }, + { "_T_accum_el", "_T_accum_el", 0, 0, 0, 0, -1, 227, 0, 0, 789, 0, -1, 0, 0 }, + { "_T_lit_accum_el", "_T_lit_accum_el", 0, 0, 0, 0, -1, 228, 0, 0, 790, 0, -1, 0, 0 }, + { "_T_accum_top_el", "_T_accum_top_el", 0, 0, 0, 0, -1, 229, 0, 0, 791, 0, -1, 0, 0 }, + { "_T_accum_list", "_T_accum_list", 0, 0, 0, 0, -1, 230, 0, 0, 792, 0, -1, 0, 0 }, + { "_T_accumulate", "_T_accumulate", 0, 0, 0, 0, -1, 231, 0, 0, 793, 0, -1, 0, 0 }, + { "_T_string_el", "_T_string_el", 0, 0, 0, 0, -1, 232, 0, 0, 794, 0, -1, 0, 0 }, + { "_T_lit_string_el", "_T_lit_string_el", 0, 0, 0, 0, -1, 233, 0, 0, 795, 0, -1, 0, 0 }, + { "_T_string_top_el", "_T_string_top_el", 0, 0, 0, 0, -1, 234, 0, 0, 796, 0, -1, 0, 0 }, + { "_T_string_list", "_T_string_list", 0, 0, 0, 0, -1, 235, 0, 0, 797, 0, -1, 0, 0 }, + { "_T_string", "_T_string", 0, 0, 0, 0, -1, 236, 0, 0, 798, 0, -1, 0, 0 }, + { "_T_var_ref", "_T_var_ref", 0, 0, 0, 0, -1, 237, 0, 0, 799, 0, -1, 0, 0 }, + { "_T_qual", "_T_qual", 0, 0, 0, 0, -1, 238, 0, 0, 800, 0, -1, 0, 0 }, + { "_T_lex_expr", "_T_lex_expr", 0, 0, 0, 0, -1, 239, 0, 0, 801, 0, -1, 0, 0 }, + { "_T_opt_lex_dot", "_T_opt_lex_dot", 0, 0, 0, 0, -1, 240, 0, 0, 802, 0, -1, 0, 0 }, + { "_T_lex_term", "_T_lex_term", 0, 0, 0, 0, -1, 241, 0, 0, 803, 0, -1, 0, 0 }, + { "_T_lex_factor_rep", "_T_lex_factor_rep", 0, 0, 0, 0, -1, 242, 0, 0, 804, 0, -1, 0, 0 }, + { "_T_lex_factor_neg", "_T_lex_factor_neg", 0, 0, 0, 0, -1, 243, 0, 0, 805, 0, -1, 0, 0 }, + { "_T_lex_range_lit", "_T_lex_range_lit", 0, 0, 0, 0, -1, 244, 0, 0, 806, 0, -1, 0, 0 }, + { "_T_lex_num", "_T_lex_num", 0, 0, 0, 0, -1, 245, 0, 0, 807, 0, -1, 0, 0 }, + { "_T_lex_factor", "_T_lex_factor", 0, 0, 0, 0, -1, 246, 0, 0, 808, 0, -1, 0, 0 }, + { "_T_reg_or_data", "_T_reg_or_data", 0, 0, 0, 0, -1, 247, 0, 0, 809, 0, -1, 0, 0 }, + { "_T_reg_or_char", "_T_reg_or_char", 0, 0, 0, 0, -1, 248, 0, 0, 810, 0, -1, 0, 0 }, + { "_T___accum0", "_T___accum0", 0, 0, 0, 0, -1, 252, 0, 0, 811, 0, -1, 0, 0 }, + { "_T__repeat_root_item", "_T__repeat_root_item", 0, 0, 0, 0, -1, 0, 0, 0, 812, 0, -1, 0, 0 }, + { "_T__repeat_sq_cons_data", "_T__repeat_sq_cons_data", 0, 0, 0, 0, -1, 0, 0, 0, 813, 0, -1, 0, 0 }, + { "_T__repeat_context_item", "_T__repeat_context_item", 0, 0, 0, 0, -1, 0, 0, 0, 814, 0, -1, 0, 0 }, + { "_T__repeat_namespace_item", "_T__repeat_namespace_item", 0, 0, 0, 0, -1, 0, 0, 0, 815, 0, -1, 0, 0 }, + { "_T__repeat_var_def", "_T__repeat_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 816, 0, -1, 0, 0 }, + { "_T__repeat_statement", "_T__repeat_statement", 0, 0, 0, 0, -1, 0, 0, 0, 817, 0, -1, 0, 0 }, + { "_T__repeat_field_init", "_T__repeat_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 818, 0, -1, 0, 0 }, + { "_T__repeat_litpat_el", "_T__repeat_litpat_el", 0, 0, 0, 0, -1, 0, 0, 0, 819, 0, -1, 0, 0 }, + { "_T__repeat_pattern_el", "_T__repeat_pattern_el", 0, 0, 0, 0, -1, 0, 0, 0, 820, 0, -1, 0, 0 }, + { "_T__repeat_lit_cons_el", "_T__repeat_lit_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 821, 0, -1, 0, 0 }, + { "_T__repeat_cons_el", "_T__repeat_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 822, 0, -1, 0, 0 }, + { "_T__repeat_lit_accum_el", "_T__repeat_lit_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 823, 0, -1, 0, 0 }, + { "_T__repeat_accum_el", "_T__repeat_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 824, 0, -1, 0, 0 }, + { "_T__repeat_lit_string_el", "_T__repeat_lit_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 825, 0, -1, 0, 0 }, + { "_T__repeat_string_el", "_T__repeat_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 826, 0, -1, 0, 0 }, + { "_T___list0", "_T___list0", 0, 0, 0, 0, -1, 253, 0, 0, 827, 0, -1, 0, 0 }, + { "_eof_ptr", "_eof_ptr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_void", "_eof_void", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_bool", "_eof_bool", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_int", "_eof_int", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_str", "_eof_str", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_stream", "_eof_stream", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_il", "_eof_il", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_any", "_eof_any", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_DEF", "_eof_DEF", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX", "_eof_LEX", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_END", "_eof_END", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_TOKEN", "_eof_TOKEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_RL", "_eof_RL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_IGNORE", "_eof_IGNORE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_PRINT", "_eof_PRINT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_PRINTS", "_eof_PRINTS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_PRINT_XML", "_eof_PRINT_XML", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_PRINT_XML_AC", "_eof_PRINT_XML_AC", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_PARSE", "_eof_PARSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_PARSE_STOP", "_eof_PARSE_STOP", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_CONS", "_eof_CONS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_MATCH", "_eof_MATCH", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_REQUIRE", "_eof_REQUIRE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_SEND", "_eof_SEND", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_NAMESPACE", "_eof_NAMESPACE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_FOR", "_eof_FOR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_IF", "_eof_IF", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_YIELD", "_eof_YIELD", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_WHILE", "_eof_WHILE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_ELSIF", "_eof_ELSIF", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_ELSE", "_eof_ELSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_IN", "_eof_IN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_PARSER", "_eof_PARSER", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LIST", "_eof_LIST", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_VECTOR", "_eof_VECTOR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_MAP", "_eof_MAP", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_PTR", "_eof_PTR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_ITER", "_eof_ITER", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_REF", "_eof_REF", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_EXPORT", "_eof_EXPORT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_RETURN", "_eof_RETURN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_BREAK", "_eof_BREAK", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_REJECT", "_eof_REJECT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_REDUCEFIRST", "_eof_REDUCEFIRST", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_ALIAS", "_eof_ALIAS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_COMMIT", "_eof_COMMIT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_NEW", "_eof_NEW", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_PREEOF", "_eof_PREEOF", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_GLOBAL", "_eof_GLOBAL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_EOS", "_eof_EOS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_CAST", "_eof_CAST", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_MAKE_TOKEN", "_eof_MAKE_TOKEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_MAKE_TREE", "_eof_MAKE_TREE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_TYPEID", "_eof_TYPEID", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LITERAL", "_eof_LITERAL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_CONTEXT", "_eof_CONTEXT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_NI", "_eof_NI", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_NIL", "_eof_NIL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_TRUE", "_eof_TRUE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_FALSE", "_eof_FALSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEFT", "_eof_LEFT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_RIGHT", "_eof_RIGHT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_NONASSOC", "_eof_NONASSOC", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_INCLUDE", "_eof_INCLUDE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_id", "_eof_id", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_number", "_eof_number", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_backtick_lit", "_eof_backtick_lit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_DQ", "_eof_DQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_SQ", "_eof_SQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_TILDE", "_eof_TILDE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_SQOPEN", "_eof_SQOPEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_SQCLOSE", "_eof_SQCLOSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_BAR", "_eof_BAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_FSLASH", "_eof_FSLASH", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_COLON", "_eof_COLON", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_DOUBLE_COLON", "_eof_DOUBLE_COLON", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_DOT", "_eof_DOT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_ARROW", "_eof_ARROW", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_POPEN", "_eof_POPEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_PCLOSE", "_eof_PCLOSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_COPEN", "_eof_COPEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_CCLOSE", "_eof_CCLOSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_STAR", "_eof_STAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_QUESTION", "_eof_QUESTION", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_EQUALS", "_eof_EQUALS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_EQEQ", "_eof_EQEQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_NEQ", "_eof_NEQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_COMMA", "_eof_COMMA", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LT", "_eof_LT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_GT", "_eof_GT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LTEQ", "_eof_LTEQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_GTEQ", "_eof_GTEQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_BANG", "_eof_BANG", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_DOLLAR", "_eof_DOLLAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_CARET", "_eof_CARET", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_PERCENT", "_eof_PERCENT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_PLUS", "_eof_PLUS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_MINUS", "_eof_MINUS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_AMPAMP", "_eof_AMPAMP", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_BARBAR", "_eof_BARBAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__ignore_00b9", "_eof__ignore_00b9", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__ignore_00bb", "_eof__ignore_00bb", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_CONS_DQ", "_eof_CONS_DQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_CONS_DQ_NL", "_eof_CONS_DQ_NL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_CONS_SQOPEN", "_eof_CONS_SQOPEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_CONS_SQCLOSE", "_eof_CONS_SQCLOSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_dq_cons_data", "_eof_dq_cons_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_CONS_SQ", "_eof_CONS_SQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_CONS_SQ_NL", "_eof_CONS_SQ_NL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_sq_cons_data", "_eof_sq_cons_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_TILDE_NL", "_eof_TILDE_NL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_tilde_data", "_eof_tilde_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_id", "_eof_lex_id", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_uint", "_eof_lex_uint", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_hex", "_eof_lex_hex", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_lit", "_eof_lex_lit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_DOT", "_eof_LEX_DOT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_BAR", "_eof_LEX_BAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_AMP", "_eof_LEX_AMP", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_DASH", "_eof_LEX_DASH", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_POPEN", "_eof_LEX_POPEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_PCLOSE", "_eof_LEX_PCLOSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_STAR", "_eof_LEX_STAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_STARSTAR", "_eof_LEX_STARSTAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_QUESTION", "_eof_LEX_QUESTION", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_PLUS", "_eof_LEX_PLUS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_CARET", "_eof_LEX_CARET", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_DOTDOT", "_eof_LEX_DOTDOT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_SQOPEN_POS", "_eof_LEX_SQOPEN_POS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_SQOPEN_NEG", "_eof_LEX_SQOPEN_NEG", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_FSLASH", "_eof_LEX_FSLASH", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_DASHDASH", "_eof_LEX_DASHDASH", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_COLON_GT", "_eof_LEX_COLON_GT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_COLON_GTGT", "_eof_LEX_COLON_GTGT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_LEX_LT_COLON", "_eof_LEX_LT_COLON", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__ignore_00ff", "_eof__ignore_00ff", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__ignore_0101", "_eof__ignore_0101", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_RE_DASH", "_eof_RE_DASH", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_RE_CHAR", "_eof_RE_CHAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_RE_SQCLOSE", "_eof_RE_SQCLOSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_start", "_eof_start", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_root_item", "_eof_root_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_include", "_eof_include", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_precedence_def", "_eof_precedence_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_pred_type", "_eof_pred_type", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_pred_token_list", "_eof_pred_token_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_pred_token", "_eof_pred_token", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_pre_eof_def", "_eof_pre_eof_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_alias_def", "_eof_alias_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_context_item", "_eof_context_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_export_def", "_eof_export_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_global_def", "_eof_global_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_iter_def", "_eof_iter_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_reference_type_ref", "_eof_reference_type_ref", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_param_var_def_list", "_eof_param_var_def_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_param_var_def", "_eof_param_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_export", "_eof_opt_export", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_function_def", "_eof_function_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_context_var_def", "_eof_context_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_context_def", "_eof_context_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_literal_def", "_eof_literal_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_literal_list", "_eof_literal_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_literal_item", "_eof_literal_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_no_ignore_left", "_eof_no_ignore_left", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_no_ignore_right", "_eof_no_ignore_right", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_namespace_def", "_eof_namespace_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_namespace_item", "_eof_namespace_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_obj_var_list", "_eof_obj_var_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_reduce_first", "_eof_opt_reduce_first", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_cfl_def", "_eof_cfl_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_region_def", "_eof_region_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_rl_def", "_eof_rl_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_lex_expr", "_eof_opt_lex_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_token_def", "_eof_token_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_ic_def", "_eof_ic_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_translate", "_eof_opt_translate", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_id", "_eof_opt_id", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_ignore_def", "_eof_ignore_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_prod_el", "_eof_prod_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_prod_el_name", "_eof_opt_prod_el_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_prod_el_list", "_eof_prod_el_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_commit", "_eof_opt_commit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_prod_name", "_eof_opt_prod_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_prod", "_eof_prod", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_reduce", "_eof_opt_reduce", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_prod_list", "_eof_prod_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_statement", "_eof_statement", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_elsif_list", "_eof_elsif_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_elsif_clause", "_eof_elsif_clause", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_optional_else", "_eof_optional_else", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_call_arg_list", "_eof_call_arg_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_iter_call", "_eof_iter_call", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_block_or_single", "_eof_block_or_single", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_require_pattern", "_eof_require_pattern", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_require_stmt", "_eof_opt_require_stmt", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lang_stmt_list", "_eof_lang_stmt_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_def_init", "_eof_opt_def_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_var_def", "_eof_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_print_stmt", "_eof_print_stmt", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_expr_stmt", "_eof_expr_stmt", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_code_expr", "_eof_code_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_code_relational", "_eof_code_relational", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_code_additive", "_eof_code_additive", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_code_multiplicitive", "_eof_code_multiplicitive", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_code_unary", "_eof_code_unary", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_eos", "_eof_opt_eos", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_code_factor", "_eof_code_factor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_type_ref", "_eof_type_ref", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_region_qual", "_eof_region_qual", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_repeat", "_eof_opt_repeat", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_capture", "_eof_opt_capture", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_field_init", "_eof_opt_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_field_init", "_eof_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_label", "_eof_opt_label", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_dq_lit_term", "_eof_dq_lit_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_sq_lit_term", "_eof_sq_lit_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_tilde_data", "_eof_opt_tilde_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_pattern_el_lel", "_eof_pattern_el_lel", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_pattern_el", "_eof_pattern_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_litpat_el", "_eof_litpat_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_pattern_top_el", "_eof_pattern_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_pattern_list", "_eof_pattern_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_pattern", "_eof_pattern", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_E1", "_eof_E1", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_E2", "_eof_E2", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_E3", "_eof_E3", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_E4", "_eof_E4", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_cons_el", "_eof_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lit_cons_el", "_eof_lit_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_cons_top_el", "_eof_cons_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_cons_list", "_eof_cons_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_constructor", "_eof_constructor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_accum_el", "_eof_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lit_accum_el", "_eof_lit_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_accum_top_el", "_eof_accum_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_accum_list", "_eof_accum_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_accumulate", "_eof_accumulate", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_string_el", "_eof_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lit_string_el", "_eof_lit_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_string_top_el", "_eof_string_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_string_list", "_eof_string_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_string", "_eof_string", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_var_ref", "_eof_var_ref", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_qual", "_eof_qual", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_expr", "_eof_lex_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_opt_lex_dot", "_eof_opt_lex_dot", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_term", "_eof_lex_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_factor_rep", "_eof_lex_factor_rep", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_factor_neg", "_eof_lex_factor_neg", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_range_lit", "_eof_lex_range_lit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_num", "_eof_lex_num", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_lex_factor", "_eof_lex_factor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_reg_or_data", "_eof_reg_or_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof_reg_or_char", "_eof_reg_or_char", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__ign_0xdbb3a0", "_eof__ign_0xdbb3a0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__ign_0xde4b20", "_eof__ign_0xde4b20", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__ign_0xde7770", "_eof__ign_0xde7770", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__ign_0xde9520", "_eof__ign_0xde9520", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__ign_0xdea540", "_eof__ign_0xdea540", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__ign_0xdf7df0", "_eof__ign_0xdf7df0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof___0xde4bc0_DEF_PAT_1", "_eof___0xde4bc0_DEF_PAT_1", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof___0xde7810_DEF_PAT_2", "_eof___0xde7810_DEF_PAT_2", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof___0xde95c0_DEF_PAT_3", "_eof___0xde95c0_DEF_PAT_3", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof___0xdf7e90_DEF_PAT_4", "_eof___0xdf7e90_DEF_PAT_4", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof___accum0", "_eof___accum0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_root_item", "_eof__repeat_root_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_sq_cons_data", "_eof__repeat_sq_cons_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_context_item", "_eof__repeat_context_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_namespace_item", "_eof__repeat_namespace_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_var_def", "_eof__repeat_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_statement", "_eof__repeat_statement", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_field_init", "_eof__repeat_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_litpat_el", "_eof__repeat_litpat_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_pattern_el", "_eof__repeat_pattern_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_lit_cons_el", "_eof__repeat_lit_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_cons_el", "_eof__repeat_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_lit_accum_el", "_eof__repeat_lit_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_accum_el", "_eof__repeat_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_lit_string_el", "_eof__repeat_lit_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__repeat_string_el", "_eof__repeat_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof___list0", "_eof___list0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_any", "_eof__T_any", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_start", "_eof__T_start", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_root_item", "_eof__T_root_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_include", "_eof__T_include", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_precedence_def", "_eof__T_precedence_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_pred_type", "_eof__T_pred_type", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_pred_token_list", "_eof__T_pred_token_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_pred_token", "_eof__T_pred_token", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_pre_eof_def", "_eof__T_pre_eof_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_alias_def", "_eof__T_alias_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_context_item", "_eof__T_context_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_export_def", "_eof__T_export_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_global_def", "_eof__T_global_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_iter_def", "_eof__T_iter_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_reference_type_ref", "_eof__T_reference_type_ref", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_param_var_def_list", "_eof__T_param_var_def_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_param_var_def", "_eof__T_param_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_export", "_eof__T_opt_export", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_function_def", "_eof__T_function_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_context_var_def", "_eof__T_context_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_context_def", "_eof__T_context_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_literal_def", "_eof__T_literal_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_literal_list", "_eof__T_literal_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_literal_item", "_eof__T_literal_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_no_ignore_left", "_eof__T_no_ignore_left", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_no_ignore_right", "_eof__T_no_ignore_right", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_namespace_def", "_eof__T_namespace_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_namespace_item", "_eof__T_namespace_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_obj_var_list", "_eof__T_obj_var_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_reduce_first", "_eof__T_opt_reduce_first", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_cfl_def", "_eof__T_cfl_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_region_def", "_eof__T_region_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_rl_def", "_eof__T_rl_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_lex_expr", "_eof__T_opt_lex_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_token_def", "_eof__T_token_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_ic_def", "_eof__T_ic_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_translate", "_eof__T_opt_translate", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_id", "_eof__T_opt_id", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_ignore_def", "_eof__T_ignore_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_prod_el", "_eof__T_prod_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_prod_el_name", "_eof__T_opt_prod_el_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_prod_el_list", "_eof__T_prod_el_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_commit", "_eof__T_opt_commit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_prod_name", "_eof__T_opt_prod_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_prod", "_eof__T_prod", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_reduce", "_eof__T_opt_reduce", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_prod_list", "_eof__T_prod_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_statement", "_eof__T_statement", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_elsif_list", "_eof__T_elsif_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_elsif_clause", "_eof__T_elsif_clause", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_optional_else", "_eof__T_optional_else", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_call_arg_list", "_eof__T_call_arg_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_iter_call", "_eof__T_iter_call", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_block_or_single", "_eof__T_block_or_single", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_require_pattern", "_eof__T_require_pattern", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_require_stmt", "_eof__T_opt_require_stmt", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lang_stmt_list", "_eof__T_lang_stmt_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_def_init", "_eof__T_opt_def_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_var_def", "_eof__T_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_print_stmt", "_eof__T_print_stmt", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_expr_stmt", "_eof__T_expr_stmt", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_code_expr", "_eof__T_code_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_code_relational", "_eof__T_code_relational", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_code_additive", "_eof__T_code_additive", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_code_multiplicitive", "_eof__T_code_multiplicitive", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_code_unary", "_eof__T_code_unary", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_eos", "_eof__T_opt_eos", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_code_factor", "_eof__T_code_factor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_type_ref", "_eof__T_type_ref", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_region_qual", "_eof__T_region_qual", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_repeat", "_eof__T_opt_repeat", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_capture", "_eof__T_opt_capture", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_field_init", "_eof__T_opt_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_field_init", "_eof__T_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_label", "_eof__T_opt_label", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_dq_lit_term", "_eof__T_dq_lit_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_sq_lit_term", "_eof__T_sq_lit_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_tilde_data", "_eof__T_opt_tilde_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_pattern_el_lel", "_eof__T_pattern_el_lel", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_pattern_el", "_eof__T_pattern_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_litpat_el", "_eof__T_litpat_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_pattern_top_el", "_eof__T_pattern_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_pattern_list", "_eof__T_pattern_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_pattern", "_eof__T_pattern", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_E1", "_eof__T_E1", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_E2", "_eof__T_E2", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_E3", "_eof__T_E3", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_E4", "_eof__T_E4", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_cons_el", "_eof__T_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lit_cons_el", "_eof__T_lit_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_cons_top_el", "_eof__T_cons_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_cons_list", "_eof__T_cons_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_constructor", "_eof__T_constructor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_accum_el", "_eof__T_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lit_accum_el", "_eof__T_lit_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_accum_top_el", "_eof__T_accum_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_accum_list", "_eof__T_accum_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_accumulate", "_eof__T_accumulate", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_string_el", "_eof__T_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lit_string_el", "_eof__T_lit_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_string_top_el", "_eof__T_string_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_string_list", "_eof__T_string_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_string", "_eof__T_string", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_var_ref", "_eof__T_var_ref", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_qual", "_eof__T_qual", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lex_expr", "_eof__T_lex_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_opt_lex_dot", "_eof__T_opt_lex_dot", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lex_term", "_eof__T_lex_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lex_factor_rep", "_eof__T_lex_factor_rep", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lex_factor_neg", "_eof__T_lex_factor_neg", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lex_range_lit", "_eof__T_lex_range_lit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lex_num", "_eof__T_lex_num", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_lex_factor", "_eof__T_lex_factor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_reg_or_data", "_eof__T_reg_or_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T_reg_or_char", "_eof__T_reg_or_char", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T___accum0", "_eof__T___accum0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_root_item", "_eof__T__repeat_root_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_sq_cons_data", "_eof__T__repeat_sq_cons_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_context_item", "_eof__T__repeat_context_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_namespace_item", "_eof__T__repeat_namespace_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_var_def", "_eof__T__repeat_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_statement", "_eof__T__repeat_statement", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_field_init", "_eof__T__repeat_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_litpat_el", "_eof__T__repeat_litpat_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_pattern_el", "_eof__T__repeat_pattern_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_lit_cons_el", "_eof__T__repeat_lit_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_cons_el", "_eof__T__repeat_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_lit_accum_el", "_eof__T__repeat_lit_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_accum_el", "_eof__T__repeat_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_lit_string_el", "_eof__T__repeat_lit_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T__repeat_string_el", "_eof__T__repeat_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_eof__T___list0", "_eof__T___list0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "_notoken", "_notoken", 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -1, 0, 0 }, + { "any", "any", 0, 0, 0, 0, -1, 0, 0, 0, 150, 0, -1, 0, 0 }, + { "start", "start", 0, 0, 0, 0, -1, 135, 0, 0, 151, 0, -1, 0, 0 }, + { "root_item", "root_item", 0, 0, 0, 0, -1, 136, 0, 0, 152, 0, -1, 0, 0 }, + { "include", "include", 0, 0, 0, 0, -1, 137, 0, 0, 153, 0, -1, 0, 0 }, + { "precedence_def", "precedence_def", 0, 0, 0, 0, -1, 138, 0, 0, 154, 0, -1, 0, 0 }, + { "pred_type", "pred_type", 0, 0, 0, 0, -1, 139, 0, 0, 155, 0, -1, 0, 0 }, + { "pred_token_list", "pred_token_list", 0, 0, 0, 0, -1, 140, 0, 0, 156, 0, -1, 0, 0 }, + { "pred_token", "pred_token", 0, 0, 0, 0, -1, 141, 0, 0, 157, 0, -1, 0, 0 }, + { "pre_eof_def", "pre_eof_def", 0, 0, 0, 0, -1, 142, 0, 0, 158, 0, -1, 0, 0 }, + { "alias_def", "alias_def", 0, 0, 0, 0, -1, 143, 0, 0, 159, 0, -1, 0, 0 }, + { "context_item", "context_item", 0, 0, 0, 0, -1, 144, 0, 0, 160, 0, -1, 0, 0 }, + { "export_def", "export_def", 0, 0, 0, 0, -1, 145, 0, 0, 161, 0, -1, 0, 0 }, + { "global_def", "global_def", 0, 0, 0, 0, -1, 146, 0, 0, 162, 0, -1, 0, 0 }, + { "iter_def", "iter_def", 0, 0, 0, 0, -1, 147, 0, 0, 163, 0, -1, 0, 0 }, + { "reference_type_ref", "reference_type_ref", 0, 0, 0, 0, -1, 148, 0, 0, 164, 0, -1, 0, 0 }, + { "param_var_def_list", "param_var_def_list", 0, 0, 0, 0, -1, 149, 0, 0, 165, 0, -1, 0, 0 }, + { "param_var_def", "param_var_def", 0, 0, 0, 0, -1, 150, 0, 0, 166, 0, -1, 0, 0 }, + { "opt_export", "opt_export", 0, 0, 0, 0, -1, 151, 0, 0, 167, 0, -1, 0, 0 }, + { "function_def", "function_def", 0, 0, 0, 0, -1, 152, 0, 0, 168, 0, -1, 0, 0 }, + { "context_var_def", "context_var_def", 0, 0, 0, 0, -1, 153, 0, 0, 169, 0, -1, 0, 0 }, + { "context_def", "context_def", 0, 0, 0, 0, -1, 154, 0, 0, 170, 0, -1, 0, 0 }, + { "literal_def", "literal_def", 0, 0, 0, 0, -1, 155, 0, 0, 171, 0, -1, 0, 0 }, + { "literal_list", "literal_list", 0, 0, 0, 0, -1, 156, 0, 0, 172, 0, -1, 0, 0 }, + { "literal_item", "literal_item", 0, 0, 0, 0, -1, 157, 0, 0, 173, 0, -1, 0, 0 }, + { "no_ignore_left", "no_ignore_left", 0, 0, 0, 0, -1, 158, 0, 0, 174, 0, -1, 0, 0 }, + { "no_ignore_right", "no_ignore_right", 0, 0, 0, 0, -1, 159, 0, 0, 175, 0, -1, 0, 0 }, + { "namespace_def", "namespace_def", 0, 0, 0, 0, -1, 160, 0, 0, 176, 0, -1, 0, 0 }, + { "namespace_item", "namespace_item", 0, 0, 0, 0, -1, 161, 0, 0, 177, 0, -1, 0, 0 }, + { "obj_var_list", "obj_var_list", 0, 0, 0, 0, -1, 162, 0, 0, 178, 0, -1, 0, 0 }, + { "opt_reduce_first", "opt_reduce_first", 0, 0, 0, 0, -1, 163, 0, 0, 179, 0, -1, 0, 0 }, + { "cfl_def", "cfl_def", 0, 0, 0, 0, -1, 164, 0, 0, 180, 0, -1, 0, 0 }, + { "region_def", "region_def", 0, 0, 0, 0, -1, 165, 0, 0, 181, 0, -1, 0, 0 }, + { "rl_def", "rl_def", 0, 0, 0, 0, -1, 166, 0, 0, 182, 0, -1, 0, 0 }, + { "opt_lex_expr", "opt_lex_expr", 0, 0, 0, 0, -1, 167, 0, 0, 183, 0, -1, 0, 0 }, + { "token_def", "token_def", 0, 0, 0, 0, -1, 168, 0, 0, 184, 0, -1, 0, 0 }, + { "ic_def", "ic_def", 0, 0, 0, 0, -1, 169, 0, 0, 185, 0, -1, 0, 0 }, + { "opt_translate", "opt_translate", 0, 0, 0, 0, -1, 170, 0, 0, 186, 0, -1, 0, 0 }, + { "opt_id", "opt_id", 0, 0, 0, 0, -1, 171, 0, 0, 187, 0, -1, 0, 0 }, + { "ignore_def", "ignore_def", 0, 0, 0, 0, -1, 172, 0, 0, 188, 0, -1, 0, 0 }, + { "prod_el", "prod_el", 0, 0, 0, 0, -1, 173, 0, 0, 189, 0, -1, 0, 0 }, + { "opt_prod_el_name", "opt_prod_el_name", 0, 0, 0, 0, -1, 174, 0, 0, 190, 0, -1, 0, 0 }, + { "prod_el_list", "prod_el_list", 0, 0, 0, 0, -1, 175, 0, 0, 191, 0, -1, 0, 0 }, + { "opt_commit", "opt_commit", 0, 0, 0, 0, -1, 176, 0, 0, 192, 0, -1, 0, 0 }, + { "opt_prod_name", "opt_prod_name", 0, 0, 0, 0, -1, 177, 0, 0, 193, 0, -1, 0, 0 }, + { "prod", "prod", 0, 0, 0, 0, -1, 178, 0, 0, 194, 0, -1, 0, 0 }, + { "opt_reduce", "opt_reduce", 0, 0, 0, 0, -1, 179, 0, 0, 195, 0, -1, 0, 0 }, + { "prod_list", "prod_list", 0, 0, 0, 0, -1, 180, 0, 0, 196, 0, -1, 0, 0 }, + { "statement", "statement", 0, 0, 0, 0, -1, 181, 0, 0, 197, 0, -1, 0, 0 }, + { "elsif_list", "elsif_list", 0, 0, 0, 0, -1, 182, 0, 0, 198, 0, -1, 0, 0 }, + { "elsif_clause", "elsif_clause", 0, 0, 0, 0, -1, 183, 0, 0, 199, 0, -1, 0, 0 }, + { "optional_else", "optional_else", 0, 0, 0, 0, -1, 184, 0, 0, 200, 0, -1, 0, 0 }, + { "call_arg_list", "call_arg_list", 0, 0, 0, 0, -1, 185, 0, 0, 201, 0, -1, 0, 0 }, + { "iter_call", "iter_call", 0, 0, 0, 0, -1, 186, 0, 0, 202, 0, -1, 0, 0 }, + { "block_or_single", "block_or_single", 0, 0, 0, 0, -1, 187, 0, 0, 203, 0, -1, 0, 0 }, + { "require_pattern", "require_pattern", 0, 0, 0, 0, -1, 188, 0, 0, 204, 0, -1, 0, 0 }, + { "opt_require_stmt", "opt_require_stmt", 0, 0, 0, 0, -1, 189, 0, 0, 205, 0, -1, 0, 0 }, + { "lang_stmt_list", "lang_stmt_list", 0, 0, 0, 0, -1, 190, 0, 0, 206, 0, -1, 0, 0 }, + { "opt_def_init", "opt_def_init", 0, 0, 0, 0, -1, 191, 0, 0, 207, 0, -1, 0, 0 }, + { "var_def", "var_def", 0, 0, 0, 0, -1, 192, 0, 0, 208, 0, -1, 0, 0 }, + { "print_stmt", "print_stmt", 0, 0, 0, 0, -1, 193, 0, 0, 209, 0, -1, 0, 0 }, + { "expr_stmt", "expr_stmt", 0, 0, 0, 0, -1, 194, 0, 0, 210, 0, -1, 0, 0 }, + { "code_expr", "code_expr", 0, 0, 0, 0, -1, 195, 0, 0, 211, 0, -1, 0, 0 }, + { "code_relational", "code_relational", 0, 0, 0, 0, -1, 196, 0, 0, 212, 0, -1, 0, 0 }, + { "code_additive", "code_additive", 0, 0, 0, 0, -1, 197, 0, 0, 213, 0, -1, 0, 0 }, + { "code_multiplicitive", "code_multiplicitive", 0, 0, 0, 0, -1, 198, 0, 0, 214, 0, -1, 0, 0 }, + { "code_unary", "code_unary", 0, 0, 0, 0, -1, 199, 0, 0, 215, 0, -1, 0, 0 }, + { "opt_eos", "opt_eos", 0, 0, 0, 0, -1, 200, 0, 0, 216, 0, -1, 0, 0 }, + { "code_factor", "code_factor", 0, 0, 0, 0, -1, 201, 0, 0, 217, 0, -1, 0, 0 }, + { "type_ref", "type_ref", 0, 0, 0, 0, -1, 202, 0, 0, 218, 0, -1, 0, 0 }, + { "region_qual", "region_qual", 0, 0, 0, 0, -1, 203, 0, 0, 219, 0, -1, 0, 0 }, + { "opt_repeat", "opt_repeat", 0, 0, 0, 0, -1, 204, 0, 0, 220, 0, -1, 0, 0 }, + { "opt_capture", "opt_capture", 0, 0, 0, 0, -1, 205, 0, 0, 221, 0, -1, 0, 0 }, + { "opt_field_init", "opt_field_init", 0, 0, 0, 0, -1, 206, 0, 0, 222, 0, -1, 0, 0 }, + { "field_init", "field_init", 0, 0, 0, 0, -1, 207, 0, 0, 223, 0, -1, 0, 0 }, + { "opt_label", "opt_label", 0, 0, 0, 0, -1, 208, 0, 0, 224, 0, -1, 0, 0 }, + { "dq_lit_term", "dq_lit_term", 0, 0, 0, 0, -1, 209, 0, 0, 225, 0, -1, 0, 0 }, + { "sq_lit_term", "sq_lit_term", 0, 0, 0, 0, -1, 210, 0, 0, 226, 0, -1, 0, 0 }, + { "opt_tilde_data", "opt_tilde_data", 0, 0, 0, 0, -1, 211, 0, 0, 227, 0, -1, 0, 0 }, + { "pattern_el_lel", "pattern_el_lel", 0, 0, 0, 0, -1, 212, 0, 0, 228, 0, -1, 0, 0 }, + { "pattern_el", "pattern_el", 0, 0, 0, 0, -1, 213, 0, 0, 229, 0, -1, 0, 0 }, + { "litpat_el", "litpat_el", 0, 0, 0, 0, -1, 214, 0, 0, 230, 0, -1, 0, 0 }, + { "pattern_top_el", "pattern_top_el", 0, 0, 0, 0, -1, 215, 0, 0, 231, 0, -1, 0, 0 }, + { "pattern_list", "pattern_list", 0, 0, 0, 0, -1, 216, 0, 0, 232, 0, -1, 0, 0 }, + { "pattern", "pattern", 0, 0, 0, 0, -1, 217, 0, 0, 233, 0, -1, 0, 0 }, + { "E1", "E1", 0, 0, 0, 0, -1, 218, 0, 0, 234, 0, -1, 0, 0 }, + { "E2", "E2", 0, 0, 0, 0, -1, 219, 0, 0, 235, 0, -1, 0, 0 }, + { "E3", "E3", 0, 0, 0, 0, -1, 220, 0, 0, 236, 0, -1, 0, 0 }, + { "E4", "E4", 0, 0, 0, 0, -1, 221, 0, 0, 237, 0, -1, 0, 0 }, + { "cons_el", "cons_el", 0, 0, 0, 0, -1, 222, 0, 0, 238, 0, -1, 0, 0 }, + { "lit_cons_el", "lit_cons_el", 0, 0, 0, 0, -1, 223, 0, 0, 239, 0, -1, 0, 0 }, + { "cons_top_el", "cons_top_el", 0, 0, 0, 0, -1, 224, 0, 0, 240, 0, -1, 0, 0 }, + { "cons_list", "cons_list", 0, 0, 0, 0, -1, 225, 0, 0, 241, 0, -1, 0, 0 }, + { "constructor", "constructor", 0, 0, 0, 0, -1, 226, 0, 0, 242, 0, -1, 0, 0 }, + { "accum_el", "accum_el", 0, 0, 0, 0, -1, 227, 0, 0, 243, 0, -1, 0, 0 }, + { "lit_accum_el", "lit_accum_el", 0, 0, 0, 0, -1, 228, 0, 0, 244, 0, -1, 0, 0 }, + { "accum_top_el", "accum_top_el", 0, 0, 0, 0, -1, 229, 0, 0, 245, 0, -1, 0, 0 }, + { "accum_list", "accum_list", 0, 0, 0, 0, -1, 230, 0, 0, 246, 0, -1, 0, 0 }, + { "accumulate", "accumulate", 0, 0, 0, 0, -1, 231, 0, 0, 247, 0, -1, 0, 0 }, + { "string_el", "string_el", 0, 0, 0, 0, -1, 232, 0, 0, 248, 0, -1, 0, 0 }, + { "lit_string_el", "lit_string_el", 0, 0, 0, 0, -1, 233, 0, 0, 249, 0, -1, 0, 0 }, + { "string_top_el", "string_top_el", 0, 0, 0, 0, -1, 234, 0, 0, 250, 0, -1, 0, 0 }, + { "string_list", "string_list", 0, 0, 0, 0, -1, 235, 0, 0, 251, 0, -1, 0, 0 }, + { "string", "string", 0, 0, 0, 0, -1, 236, 0, 0, 252, 0, -1, 0, 0 }, + { "var_ref", "var_ref", 0, 0, 0, 0, -1, 237, 0, 0, 253, 0, -1, 0, 0 }, + { "qual", "qual", 0, 0, 0, 0, -1, 238, 0, 0, 254, 0, -1, 0, 0 }, + { "lex_expr", "lex_expr", 0, 0, 0, 0, -1, 239, 0, 0, 255, 0, -1, 0, 0 }, + { "opt_lex_dot", "opt_lex_dot", 0, 0, 0, 0, -1, 240, 0, 0, 256, 0, -1, 0, 0 }, + { "lex_term", "lex_term", 0, 0, 0, 0, -1, 241, 0, 0, 257, 0, -1, 0, 0 }, + { "lex_factor_rep", "lex_factor_rep", 0, 0, 0, 0, -1, 242, 0, 0, 258, 0, -1, 0, 0 }, + { "lex_factor_neg", "lex_factor_neg", 0, 0, 0, 0, -1, 243, 0, 0, 259, 0, -1, 0, 0 }, + { "lex_range_lit", "lex_range_lit", 0, 0, 0, 0, -1, 244, 0, 0, 260, 0, -1, 0, 0 }, + { "lex_num", "lex_num", 0, 0, 0, 0, -1, 245, 0, 0, 261, 0, -1, 0, 0 }, + { "lex_factor", "lex_factor", 0, 0, 0, 0, -1, 246, 0, 0, 262, 0, -1, 0, 0 }, + { "reg_or_data", "reg_or_data", 0, 0, 0, 0, -1, 247, 0, 0, 263, 0, -1, 0, 0 }, + { "reg_or_char", "reg_or_char", 0, 0, 0, 0, -1, 248, 0, 0, 264, 0, -1, 0, 0 }, + { "__accum0", "__accum0", 0, 0, 0, 0, -1, 252, 0, 0, 265, 1, -1, 0, 0 }, + { "_repeat_root_item", "_repeat_root_item", 1, 0, 0, 0, -1, 0, 0, 0, 266, 0, -1, 0, 0 }, + { "_repeat_sq_cons_data", "_repeat_sq_cons_data", 1, 0, 0, 0, -1, 0, 0, 0, 267, 0, -1, 0, 0 }, + { "_repeat_context_item", "_repeat_context_item", 1, 0, 0, 0, -1, 0, 0, 0, 268, 0, -1, 0, 0 }, + { "_repeat_namespace_item", "_repeat_namespace_item", 1, 0, 0, 0, -1, 0, 0, 0, 269, 0, -1, 0, 0 }, + { "_repeat_var_def", "_repeat_var_def", 1, 0, 0, 0, -1, 0, 0, 0, 270, 0, -1, 0, 0 }, + { "_repeat_statement", "_repeat_statement", 1, 0, 0, 0, -1, 0, 0, 0, 271, 0, -1, 0, 0 }, + { "_repeat_field_init", "_repeat_field_init", 1, 0, 0, 0, -1, 0, 0, 0, 272, 0, -1, 0, 0 }, + { "_repeat_litpat_el", "_repeat_litpat_el", 1, 0, 0, 0, -1, 0, 0, 0, 273, 0, -1, 0, 0 }, + { "_repeat_pattern_el", "_repeat_pattern_el", 1, 0, 0, 0, -1, 0, 0, 0, 274, 0, -1, 0, 0 }, + { "_repeat_lit_cons_el", "_repeat_lit_cons_el", 1, 0, 0, 0, -1, 0, 0, 0, 275, 0, -1, 0, 0 }, + { "_repeat_cons_el", "_repeat_cons_el", 1, 0, 0, 0, -1, 0, 0, 0, 276, 0, -1, 0, 0 }, + { "_repeat_lit_accum_el", "_repeat_lit_accum_el", 1, 0, 0, 0, -1, 0, 0, 0, 277, 0, -1, 0, 0 }, + { "_repeat_accum_el", "_repeat_accum_el", 1, 0, 0, 0, -1, 0, 0, 0, 278, 0, -1, 0, 0 }, + { "_repeat_lit_string_el", "_repeat_lit_string_el", 1, 0, 0, 0, -1, 0, 0, 0, 279, 0, -1, 0, 0 }, + { "_repeat_string_el", "_repeat_string_el", 1, 0, 0, 0, -1, 0, 0, 0, 280, 0, -1, 0, 0 }, + { "__list0", "__list0", 0, 0, 0, 0, -1, 253, 0, 0, 281, 2, -1, 0, 0 }, + { "_root", "_root", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 } +}; + +static FrameInfo parser_frameInfo[] = { + { 0, 0, 0, 0, locals_0, 1, 0, 1 } +}; + +static ProdInfo parser_prodInfo[] = { + { 697, 0, 1, "start-1", -1, 1, copy_0, 1, }, + { 698, 0, 1, "root_item-1", -1, 1, copy_1, 1, }, + { 698, 1, 1, "root_item-2", -1, 1, copy_2, 1, }, + { 698, 2, 1, "root_item-3", -1, 1, copy_3, 1, }, + { 698, 3, 1, "root_item-4", -1, 1, copy_4, 1, }, + { 698, 4, 1, "root_item-5", -1, 1, copy_5, 1, }, + { 698, 5, 1, "root_item-6", -1, 1, copy_6, 1, }, + { 698, 6, 1, "root_item-7", -1, 1, copy_7, 1, }, + { 698, 7, 1, "root_item-8", -1, 1, copy_8, 1, }, + { 698, 8, 1, "root_item-9", -1, 1, copy_9, 1, }, + { 698, 9, 1, "root_item-10", -1, 1, copy_10, 1, }, + { 698, 10, 1, "root_item-11", -1, 1, copy_11, 1, }, + { 698, 11, 1, "root_item-12", -1, 1, copy_12, 1, }, + { 698, 12, 1, "root_item-13", -1, 1, copy_13, 1, }, + { 698, 13, 1, "root_item-14", -1, 1, copy_14, 1, }, + { 698, 14, 1, "root_item-15", -1, 1, copy_15, 1, }, + { 698, 15, 1, "root_item-16", -1, 1, copy_16, 1, }, + { 698, 16, 1, "root_item-17", -1, 1, copy_17, 1, }, + { 698, 17, 1, "root_item-18", -1, 1, copy_18, 1, }, + { 699, 0, 4, "include-1", -1, 1, copy_19, 4, }, + { 700, 0, 2, "precedence_def-1", -1, 1, copy_20, 2, }, + { 701, 0, 1, "pred_type-1", -1, 1, copy_21, 1, }, + { 701, 1, 1, "pred_type-2", -1, 1, copy_22, 1, }, + { 701, 2, 1, "pred_type-3", -1, 1, copy_23, 1, }, + { 702, 0, 3, "pred_token_list-1", -1, 1, copy_24, 3, }, + { 702, 1, 1, "pred_token_list-2", -1, 1, copy_25, 1, }, + { 703, 0, 2, "pred_token-1", -1, 1, copy_26, 2, }, + { 703, 1, 2, "pred_token-2", -1, 1, copy_27, 2, }, + { 704, 0, 4, "pre_eof_def-1", -1, 1, copy_28, 4, }, + { 705, 0, 3, "alias_def-1", -1, 1, copy_29, 3, }, + { 706, 0, 1, "context_item-1", -1, 1, copy_30, 1, }, + { 706, 1, 1, "context_item-2", -1, 1, copy_31, 1, }, + { 706, 2, 1, "context_item-3", -1, 1, copy_32, 1, }, + { 706, 3, 1, "context_item-4", -1, 1, copy_33, 1, }, + { 706, 4, 1, "context_item-5", -1, 1, copy_34, 1, }, + { 706, 5, 1, "context_item-6", -1, 1, copy_35, 1, }, + { 706, 6, 1, "context_item-7", -1, 1, copy_36, 1, }, + { 706, 7, 1, "context_item-8", -1, 1, copy_37, 1, }, + { 706, 8, 1, "context_item-9", -1, 1, copy_38, 1, }, + { 706, 9, 1, "context_item-10", -1, 1, copy_39, 1, }, + { 706, 10, 1, "context_item-11", -1, 1, copy_40, 1, }, + { 706, 11, 1, "context_item-12", -1, 1, copy_41, 1, }, + { 706, 12, 1, "context_item-13", -1, 1, copy_42, 1, }, + { 706, 13, 1, "context_item-14", -1, 1, copy_43, 1, }, + { 707, 0, 3, "export_def-1", -1, 1, copy_44, 3, }, + { 708, 0, 3, "global_def-1", -1, 1, copy_45, 3, }, + { 709, 0, 8, "iter_def-1", -1, 1, copy_46, 8, }, + { 710, 0, 4, "reference_type_ref-1", -1, 1, copy_47, 4, }, + { 711, 0, 2, "param_var_def_list-1", -1, 1, copy_48, 2, }, + { 711, 1, 0, "param_var_def_list-2", -1, 1, 0, 0, }, + { 712, 0, 3, "param_var_def-1", -1, 1, copy_50, 3, }, + { 712, 1, 3, "param_var_def-2", -1, 1, copy_51, 3, }, + { 713, 0, 1, "opt_export-1", -1, 1, copy_52, 1, }, + { 713, 1, 0, "opt_export-2", -1, 1, 0, 0, }, + { 714, 0, 9, "function_def-1", -1, 1, copy_54, 9, }, + { 715, 0, 1, "context_var_def-1", -1, 1, copy_55, 1, }, + { 716, 0, 4, "context_def-1", -1, 1, copy_56, 4, }, + { 717, 0, 2, "literal_def-1", -1, 1, copy_57, 2, }, + { 718, 0, 2, "literal_list-1", -1, 1, copy_58, 2, }, + { 718, 1, 1, "literal_list-2", -1, 1, copy_59, 1, }, + { 719, 0, 3, "literal_item-1", -1, 1, copy_60, 3, }, + { 720, 0, 2, "no_ignore_left-1", -1, 1, copy_61, 2, }, + { 720, 1, 0, "no_ignore_left-2", -1, 1, 0, 0, }, + { 721, 0, 2, "no_ignore_right-1", -1, 1, copy_63, 2, }, + { 721, 1, 0, "no_ignore_right-2", -1, 1, 0, 0, }, + { 722, 0, 4, "namespace_def-1", -1, 1, copy_65, 4, }, + { 723, 0, 1, "namespace_item-1", -1, 1, copy_66, 1, }, + { 723, 1, 1, "namespace_item-2", -1, 1, copy_67, 1, }, + { 723, 2, 1, "namespace_item-3", -1, 1, copy_68, 1, }, + { 723, 3, 1, "namespace_item-4", -1, 1, copy_69, 1, }, + { 723, 4, 1, "namespace_item-5", -1, 1, copy_70, 1, }, + { 723, 5, 1, "namespace_item-6", -1, 1, copy_71, 1, }, + { 723, 6, 1, "namespace_item-7", -1, 1, copy_72, 1, }, + { 723, 7, 1, "namespace_item-8", -1, 1, copy_73, 1, }, + { 723, 8, 1, "namespace_item-9", -1, 1, copy_74, 1, }, + { 723, 9, 1, "namespace_item-10", -1, 1, copy_75, 1, }, + { 723, 10, 1, "namespace_item-11", -1, 1, copy_76, 1, }, + { 723, 11, 1, "namespace_item-12", -1, 1, copy_77, 1, }, + { 723, 12, 1, "namespace_item-13", -1, 1, copy_78, 1, }, + { 723, 13, 1, "namespace_item-14", -1, 1, copy_79, 1, }, + { 723, 14, 1, "namespace_item-15", -1, 1, copy_80, 1, }, + { 724, 0, 0, "obj_var_list-1", -1, 1, 0, 0, }, + { 725, 0, 1, "opt_reduce_first-1", -1, 1, copy_82, 1, }, + { 725, 1, 0, "opt_reduce_first-2", -1, 1, 0, 0, }, + { 726, 0, 5, "cfl_def-1", -1, 1, copy_84, 5, }, + { 727, 0, 3, "region_def-1", -1, 1, copy_85, 3, }, + { 728, 0, 5, "rl_def-1", -1, 1, copy_86, 5, }, + { 729, 0, 1, "opt_lex_expr-1", -1, 1, copy_87, 1, }, + { 729, 1, 0, "opt_lex_expr-2", -1, 1, 0, 0, }, + { 730, 0, 9, "token_def-1", -1, 1, copy_89, 9, }, + { 731, 0, 3, "ic_def-1", -1, 1, copy_90, 3, }, + { 732, 0, 3, "opt_translate-1", -1, 1, copy_91, 3, }, + { 732, 1, 0, "opt_translate-2", -1, 1, 0, 0, }, + { 733, 0, 1, "opt_id-1", -1, 1, copy_93, 1, }, + { 733, 1, 0, "opt_id-2", -1, 1, 0, 0, }, + { 734, 0, 5, "ignore_def-1", -1, 1, copy_95, 5, }, + { 735, 0, 4, "prod_el-1", -1, 1, copy_96, 4, }, + { 735, 1, 4, "prod_el-2", -1, 1, copy_97, 4, }, + { 736, 0, 2, "opt_prod_el_name-1", -1, 1, copy_98, 2, }, + { 736, 1, 0, "opt_prod_el_name-2", -1, 1, 0, 0, }, + { 737, 0, 2, "prod_el_list-1", -1, 1, copy_100, 2, }, + { 737, 1, 0, "prod_el_list-2", -1, 1, 0, 0, }, + { 738, 0, 1, "opt_commit-1", -1, 1, copy_102, 1, }, + { 738, 1, 0, "opt_commit-2", -1, 1, 0, 0, }, + { 739, 0, 2, "opt_prod_name-1", -1, 1, copy_104, 2, }, + { 739, 1, 0, "opt_prod_name-2", -1, 1, 0, 0, }, + { 740, 0, 6, "prod-1", -1, 1, copy_106, 6, }, + { 741, 0, 3, "opt_reduce-1", -1, 1, copy_107, 3, }, + { 741, 1, 0, "opt_reduce-2", -1, 1, 0, 0, }, + { 742, 0, 3, "prod_list-1", -1, 1, copy_109, 3, }, + { 742, 1, 1, "prod_list-2", -1, 1, copy_110, 1, }, + { 743, 0, 1, "statement-1", -1, 1, copy_111, 1, }, + { 743, 1, 1, "statement-2", -1, 1, copy_112, 1, }, + { 743, 2, 2, "statement-3", -1, 1, copy_113, 2, }, + { 743, 3, 7, "statement-4", -1, 1, copy_114, 7, }, + { 743, 4, 4, "statement-5", -1, 1, copy_115, 4, }, + { 743, 5, 3, "statement-6", -1, 1, copy_116, 3, }, + { 743, 6, 3, "statement-7", -1, 1, copy_117, 3, }, + { 743, 7, 2, "statement-8", -1, 1, copy_118, 2, }, + { 743, 8, 2, "statement-9", -1, 1, copy_119, 2, }, + { 743, 9, 1, "statement-10", -1, 1, copy_120, 1, }, + { 743, 10, 1, "statement-11", -1, 1, copy_121, 1, }, + { 744, 0, 2, "elsif_list-1", -1, 1, copy_122, 2, }, + { 744, 1, 1, "elsif_list-2", -1, 1, copy_123, 1, }, + { 745, 0, 3, "elsif_clause-1", -1, 1, copy_124, 3, }, + { 746, 0, 2, "optional_else-1", -1, 1, copy_125, 2, }, + { 746, 1, 0, "optional_else-2", -1, 1, 0, 0, }, + { 747, 0, 2, "call_arg_list-1", -1, 1, copy_127, 2, }, + { 747, 1, 0, "call_arg_list-2", -1, 1, 0, 0, }, + { 748, 0, 5, "iter_call-1", -1, 1, copy_129, 5, }, + { 748, 1, 2, "iter_call-2", -1, 1, copy_130, 2, }, + { 748, 2, 2, "iter_call-3", -1, 1, copy_131, 2, }, + { 749, 0, 3, "block_or_single-1", -1, 1, copy_132, 3, }, + { 749, 1, 1, "block_or_single-2", -1, 1, copy_133, 1, }, + { 750, 0, 3, "require_pattern-1", -1, 1, copy_134, 3, }, + { 751, 0, 2, "opt_require_stmt-1", -1, 1, copy_135, 2, }, + { 751, 1, 0, "opt_require_stmt-2", -1, 1, 0, 0, }, + { 752, 0, 2, "lang_stmt_list-1", -1, 1, copy_137, 2, }, + { 753, 0, 2, "opt_def_init-1", -1, 1, copy_138, 2, }, + { 753, 1, 0, "opt_def_init-2", -1, 1, 0, 0, }, + { 754, 0, 3, "var_def-1", -1, 1, copy_140, 3, }, + { 755, 0, 4, "print_stmt-1", -1, 1, copy_141, 4, }, + { 755, 1, 4, "print_stmt-2", -1, 1, copy_142, 4, }, + { 755, 2, 4, "print_stmt-3", -1, 1, copy_143, 4, }, + { 755, 3, 4, "print_stmt-4", -1, 1, copy_144, 4, }, + { 756, 0, 1, "expr_stmt-1", -1, 1, copy_145, 1, }, + { 757, 0, 3, "code_expr-1", -1, 1, copy_146, 3, }, + { 757, 1, 3, "code_expr-2", -1, 1, copy_147, 3, }, + { 757, 2, 1, "code_expr-3", -1, 1, copy_148, 1, }, + { 758, 0, 3, "code_relational-1", -1, 1, copy_149, 3, }, + { 758, 1, 3, "code_relational-2", -1, 1, copy_150, 3, }, + { 758, 2, 3, "code_relational-3", -1, 1, copy_151, 3, }, + { 758, 3, 3, "code_relational-4", -1, 1, copy_152, 3, }, + { 758, 4, 3, "code_relational-5", -1, 1, copy_153, 3, }, + { 758, 5, 3, "code_relational-6", -1, 1, copy_154, 3, }, + { 758, 6, 1, "code_relational-7", -1, 1, copy_155, 1, }, + { 759, 0, 3, "code_additive-1", -1, 1, copy_156, 3, }, + { 759, 1, 3, "code_additive-2", -1, 1, copy_157, 3, }, + { 759, 2, 1, "code_additive-3", -1, 1, copy_158, 1, }, + { 760, 0, 3, "code_multiplicitive-1", -1, 1, copy_159, 3, }, + { 760, 1, 3, "code_multiplicitive-2", -1, 1, copy_160, 3, }, + { 760, 2, 1, "code_multiplicitive-3", -1, 1, copy_161, 1, }, + { 761, 0, 2, "code_unary-1", -1, 1, copy_162, 2, }, + { 761, 1, 2, "code_unary-2", -1, 1, copy_163, 2, }, + { 761, 2, 2, "code_unary-3", -1, 1, copy_164, 2, }, + { 761, 3, 2, "code_unary-4", -1, 1, copy_165, 2, }, + { 761, 4, 1, "code_unary-5", -1, 1, copy_166, 1, }, + { 762, 0, 1, "opt_eos-1", -1, 1, copy_167, 1, }, + { 762, 1, 1, "opt_eos-2", -1, 1, copy_168, 1, }, + { 762, 2, 0, "opt_eos-3", -1, 1, 0, 0, }, + { 763, 0, 1, "code_factor-1", -1, 1, copy_170, 1, }, + { 763, 1, 4, "code_factor-2", -1, 1, copy_171, 4, }, + { 763, 2, 1, "code_factor-3", -1, 1, copy_172, 1, }, + { 763, 3, 1, "code_factor-4", -1, 1, copy_173, 1, }, + { 763, 4, 1, "code_factor-5", -1, 1, copy_174, 1, }, + { 763, 5, 1, "code_factor-6", -1, 1, copy_175, 1, }, + { 763, 6, 3, "code_factor-7", -1, 1, copy_176, 3, }, + { 763, 7, 4, "code_factor-8", -1, 1, copy_177, 4, }, + { 763, 8, 5, "code_factor-9", -1, 1, copy_178, 5, }, + { 763, 9, 5, "code_factor-10", -1, 1, copy_179, 5, }, + { 763, 10, 5, "code_factor-11", -1, 1, copy_180, 5, }, + { 763, 11, 3, "code_factor-12", -1, 1, copy_181, 3, }, + { 763, 12, 1, "code_factor-13", -1, 1, copy_182, 1, }, + { 763, 13, 3, "code_factor-14", -1, 1, copy_183, 3, }, + { 763, 14, 4, "code_factor-15", -1, 1, copy_184, 4, }, + { 763, 15, 4, "code_factor-16", -1, 1, copy_185, 4, }, + { 763, 16, 4, "code_factor-17", -1, 1, copy_186, 4, }, + { 763, 17, 2, "code_factor-18", -1, 1, copy_187, 2, }, + { 763, 18, 5, "code_factor-19", -1, 1, copy_188, 5, }, + { 764, 0, 3, "type_ref-1", -1, 1, copy_189, 3, }, + { 764, 1, 6, "type_ref-2", -1, 1, copy_190, 6, }, + { 764, 2, 5, "type_ref-3", -1, 1, copy_191, 5, }, + { 764, 3, 4, "type_ref-4", -1, 1, copy_192, 4, }, + { 764, 4, 4, "type_ref-5", -1, 1, copy_193, 4, }, + { 764, 5, 4, "type_ref-6", -1, 1, copy_194, 4, }, + { 765, 0, 3, "region_qual-1", -1, 1, copy_195, 3, }, + { 765, 1, 0, "region_qual-2", -1, 1, 0, 0, }, + { 766, 0, 1, "opt_repeat-1", -1, 1, copy_197, 1, }, + { 766, 1, 1, "opt_repeat-2", -1, 1, copy_198, 1, }, + { 766, 2, 1, "opt_repeat-3", -1, 1, copy_199, 1, }, + { 766, 3, 0, "opt_repeat-4", -1, 1, 0, 0, }, + { 767, 0, 2, "opt_capture-1", -1, 1, copy_201, 2, }, + { 767, 1, 0, "opt_capture-2", -1, 1, 0, 0, }, + { 768, 0, 3, "opt_field_init-1", -1, 1, copy_203, 3, }, + { 768, 1, 0, "opt_field_init-2", -1, 1, 0, 0, }, + { 769, 0, 1, "field_init-1", -1, 1, copy_205, 1, }, + { 770, 0, 2, "opt_label-1", -1, 1, copy_206, 2, }, + { 770, 1, 0, "opt_label-2", -1, 1, 0, 0, }, + { 771, 0, 1, "dq_lit_term-1", -1, 1, copy_208, 1, }, + { 771, 1, 1, "dq_lit_term-2", -1, 1, copy_209, 1, }, + { 772, 0, 1, "sq_lit_term-1", -1, 1, copy_210, 1, }, + { 772, 1, 1, "sq_lit_term-2", -1, 1, copy_211, 1, }, + { 773, 0, 1, "opt_tilde_data-1", -1, 1, copy_212, 1, }, + { 773, 1, 0, "opt_tilde_data-2", -1, 1, 0, 0, }, + { 774, 0, 3, "pattern_el_lel-1", -1, 1, copy_214, 3, }, + { 774, 1, 3, "pattern_el_lel-2", -1, 1, copy_215, 3, }, + { 775, 0, 2, "pattern_el-1", -1, 1, copy_216, 2, }, + { 775, 1, 3, "pattern_el-2", -1, 1, copy_217, 3, }, + { 775, 2, 3, "pattern_el-3", -1, 1, copy_218, 3, }, + { 775, 3, 3, "pattern_el-4", -1, 1, copy_219, 3, }, + { 776, 0, 1, "litpat_el-1", -1, 1, copy_220, 1, }, + { 776, 1, 3, "litpat_el-2", -1, 1, copy_221, 3, }, + { 777, 0, 3, "pattern_top_el-1", -1, 1, copy_222, 3, }, + { 777, 1, 3, "pattern_top_el-2", -1, 1, copy_223, 3, }, + { 777, 2, 3, "pattern_top_el-3", -1, 1, copy_224, 3, }, + { 777, 3, 3, "pattern_top_el-4", -1, 1, copy_225, 3, }, + { 778, 0, 2, "pattern_list-1", -1, 1, copy_226, 2, }, + { 778, 1, 1, "pattern_list-2", -1, 1, copy_227, 1, }, + { 779, 0, 1, "pattern-1", -1, 1, copy_228, 1, }, + { 780, 0, 0, "E1-1", -1, 1, 0, 0, }, + { 781, 0, 0, "E2-1", -1, 1, 0, 0, }, + { 782, 0, 0, "E3-1", -1, 1, 0, 0, }, + { 783, 0, 0, "E4-1", -1, 1, 0, 0, }, + { 784, 0, 3, "cons_el-1", -1, 1, copy_233, 3, }, + { 784, 1, 4, "cons_el-2", -1, 1, copy_234, 4, }, + { 784, 2, 4, "cons_el-3", -1, 1, copy_235, 4, }, + { 784, 3, 4, "cons_el-4", -1, 1, copy_236, 4, }, + { 784, 4, 2, "cons_el-5", -1, 1, copy_237, 2, }, + { 785, 0, 1, "lit_cons_el-1", -1, 1, copy_238, 1, }, + { 785, 1, 3, "lit_cons_el-2", -1, 1, copy_239, 3, }, + { 786, 0, 3, "cons_top_el-1", -1, 1, copy_240, 3, }, + { 786, 1, 3, "cons_top_el-2", -1, 1, copy_241, 3, }, + { 786, 2, 3, "cons_top_el-3", -1, 1, copy_242, 3, }, + { 786, 3, 3, "cons_top_el-4", -1, 1, copy_243, 3, }, + { 787, 0, 2, "cons_list-1", -1, 1, copy_244, 2, }, + { 787, 1, 1, "cons_list-2", -1, 1, copy_245, 1, }, + { 788, 0, 1, "constructor-1", -1, 1, copy_246, 1, }, + { 789, 0, 4, "accum_el-1", -1, 1, copy_247, 4, }, + { 789, 1, 4, "accum_el-2", -1, 1, copy_248, 4, }, + { 789, 2, 4, "accum_el-3", -1, 1, copy_249, 4, }, + { 789, 3, 2, "accum_el-4", -1, 1, copy_250, 2, }, + { 790, 0, 1, "lit_accum_el-1", -1, 1, copy_251, 1, }, + { 790, 1, 3, "lit_accum_el-2", -1, 1, copy_252, 3, }, + { 791, 0, 3, "accum_top_el-1", -1, 1, copy_253, 3, }, + { 791, 1, 3, "accum_top_el-2", -1, 1, copy_254, 3, }, + { 791, 2, 3, "accum_top_el-3", -1, 1, copy_255, 3, }, + { 791, 3, 3, "accum_top_el-4", -1, 1, copy_256, 3, }, + { 792, 0, 2, "accum_list-1", -1, 1, copy_257, 2, }, + { 792, 1, 1, "accum_list-2", -1, 1, copy_258, 1, }, + { 793, 0, 1, "accumulate-1", -1, 1, copy_259, 1, }, + { 794, 0, 4, "string_el-1", -1, 1, copy_260, 4, }, + { 794, 1, 4, "string_el-2", -1, 1, copy_261, 4, }, + { 794, 2, 4, "string_el-3", -1, 1, copy_262, 4, }, + { 794, 3, 2, "string_el-4", -1, 1, copy_263, 2, }, + { 795, 0, 1, "lit_string_el-1", -1, 1, copy_264, 1, }, + { 795, 1, 3, "lit_string_el-2", -1, 1, copy_265, 3, }, + { 796, 0, 3, "string_top_el-1", -1, 1, copy_266, 3, }, + { 796, 1, 3, "string_top_el-2", -1, 1, copy_267, 3, }, + { 796, 2, 3, "string_top_el-3", -1, 1, copy_268, 3, }, + { 796, 3, 3, "string_top_el-4", -1, 1, copy_269, 3, }, + { 797, 0, 2, "string_list-1", -1, 1, copy_270, 2, }, + { 797, 1, 1, "string_list-2", -1, 1, copy_271, 1, }, + { 798, 0, 1, "string-1", -1, 1, copy_272, 1, }, + { 799, 0, 2, "var_ref-1", -1, 1, copy_273, 2, }, + { 800, 0, 3, "qual-1", -1, 1, copy_274, 3, }, + { 800, 1, 3, "qual-2", -1, 1, copy_275, 3, }, + { 800, 2, 0, "qual-3", -1, 1, 0, 0, }, + { 801, 0, 3, "lex_expr-1", -1, 1, copy_277, 3, }, + { 801, 1, 3, "lex_expr-2", -1, 1, copy_278, 3, }, + { 801, 2, 3, "lex_expr-3", -1, 1, copy_279, 3, }, + { 801, 3, 3, "lex_expr-4", -1, 1, copy_280, 3, }, + { 801, 4, 1, "lex_expr-5", -1, 1, copy_281, 1, }, + { 802, 0, 1, "opt_lex_dot-1", -1, 1, copy_282, 1, }, + { 802, 1, 0, "opt_lex_dot-2", -1, 1, 0, 0, }, + { 803, 0, 3, "lex_term-1", -1, 1, copy_284, 3, }, + { 803, 1, 3, "lex_term-2", -1, 1, copy_285, 3, }, + { 803, 2, 3, "lex_term-3", -1, 1, copy_286, 3, }, + { 803, 3, 3, "lex_term-4", -1, 1, copy_287, 3, }, + { 803, 4, 1, "lex_term-5", -1, 1, copy_288, 1, }, + { 804, 0, 2, "lex_factor_rep-1", -1, 1, copy_289, 2, }, + { 804, 1, 2, "lex_factor_rep-2", -1, 1, copy_290, 2, }, + { 804, 2, 2, "lex_factor_rep-3", -1, 1, copy_291, 2, }, + { 804, 3, 2, "lex_factor_rep-4", -1, 1, copy_292, 2, }, + { 804, 4, 4, "lex_factor_rep-5", -1, 1, copy_293, 4, }, + { 804, 5, 5, "lex_factor_rep-6", -1, 1, copy_294, 5, }, + { 804, 6, 5, "lex_factor_rep-7", -1, 1, copy_295, 5, }, + { 804, 7, 6, "lex_factor_rep-8", -1, 1, copy_296, 6, }, + { 804, 8, 1, "lex_factor_rep-9", -1, 1, copy_297, 1, }, + { 805, 0, 2, "lex_factor_neg-1", -1, 1, copy_298, 2, }, + { 805, 1, 1, "lex_factor_neg-2", -1, 1, copy_299, 1, }, + { 806, 0, 1, "lex_range_lit-1", -1, 1, copy_300, 1, }, + { 806, 1, 1, "lex_range_lit-2", -1, 1, copy_301, 1, }, + { 807, 0, 1, "lex_num-1", -1, 1, copy_302, 1, }, + { 807, 1, 1, "lex_num-2", -1, 1, copy_303, 1, }, + { 808, 0, 1, "lex_factor-1", -1, 1, copy_304, 1, }, + { 808, 1, 1, "lex_factor-2", -1, 1, copy_305, 1, }, + { 808, 2, 1, "lex_factor-3", -1, 1, copy_306, 1, }, + { 808, 3, 1, "lex_factor-4", -1, 1, copy_307, 1, }, + { 808, 4, 3, "lex_factor-5", -1, 1, copy_308, 3, }, + { 808, 5, 3, "lex_factor-6", -1, 1, copy_309, 3, }, + { 808, 6, 3, "lex_factor-7", -1, 1, copy_310, 3, }, + { 808, 7, 3, "lex_factor-8", -1, 1, copy_311, 3, }, + { 809, 0, 2, "reg_or_data-1", -1, 1, copy_312, 2, }, + { 809, 1, 0, "reg_or_data-2", -1, 1, 0, 0, }, + { 810, 0, 1, "reg_or_char-1", -1, 1, copy_314, 1, }, + { 810, 1, 3, "reg_or_char-2", -1, 1, copy_315, 3, }, + { 811, 0, 0, "__accum0-1", -1, 1, 0, 0, }, + { 812, 0, 2, "_repeat_root_item-1", -1, 1, 0, 0, }, + { 812, 1, 0, "_repeat_root_item-2", -1, 1, 0, 0, }, + { 813, 0, 2, "_repeat_sq_cons_data-1", -1, 1, 0, 0, }, + { 813, 1, 0, "_repeat_sq_cons_data-2", -1, 1, 0, 0, }, + { 814, 0, 2, "_repeat_context_item-1", -1, 1, 0, 0, }, + { 814, 1, 0, "_repeat_context_item-2", -1, 1, 0, 0, }, + { 815, 0, 2, "_repeat_namespace_item-1", -1, 1, 0, 0, }, + { 815, 1, 0, "_repeat_namespace_item-2", -1, 1, 0, 0, }, + { 816, 0, 2, "_repeat_var_def-1", -1, 1, 0, 0, }, + { 816, 1, 0, "_repeat_var_def-2", -1, 1, 0, 0, }, + { 817, 0, 2, "_repeat_statement-1", -1, 1, 0, 0, }, + { 817, 1, 0, "_repeat_statement-2", -1, 1, 0, 0, }, + { 818, 0, 2, "_repeat_field_init-1", -1, 1, 0, 0, }, + { 818, 1, 0, "_repeat_field_init-2", -1, 1, 0, 0, }, + { 819, 0, 2, "_repeat_litpat_el-1", -1, 1, 0, 0, }, + { 819, 1, 0, "_repeat_litpat_el-2", -1, 1, 0, 0, }, + { 820, 0, 2, "_repeat_pattern_el-1", -1, 1, 0, 0, }, + { 820, 1, 0, "_repeat_pattern_el-2", -1, 1, 0, 0, }, + { 821, 0, 2, "_repeat_lit_cons_el-1", -1, 1, 0, 0, }, + { 821, 1, 0, "_repeat_lit_cons_el-2", -1, 1, 0, 0, }, + { 822, 0, 2, "_repeat_cons_el-1", -1, 1, 0, 0, }, + { 822, 1, 0, "_repeat_cons_el-2", -1, 1, 0, 0, }, + { 823, 0, 2, "_repeat_lit_accum_el-1", -1, 1, 0, 0, }, + { 823, 1, 0, "_repeat_lit_accum_el-2", -1, 1, 0, 0, }, + { 824, 0, 2, "_repeat_accum_el-1", -1, 1, 0, 0, }, + { 824, 1, 0, "_repeat_accum_el-2", -1, 1, 0, 0, }, + { 825, 0, 2, "_repeat_lit_string_el-1", -1, 1, 0, 0, }, + { 825, 1, 0, "_repeat_lit_string_el-2", -1, 1, 0, 0, }, + { 826, 0, 2, "_repeat_string_el-1", -1, 1, 0, 0, }, + { 826, 1, 0, "_repeat_string_el-2", -1, 1, 0, 0, }, + { 827, 0, 0, "__list0-1", -1, 1, 0, 0, }, + { 828, 0, 1, "_root-1", -1, 1, 0, 0, }, + { 828, 1, 1, "_root-2", -1, 1, 0, 0, }, + { 828, 2, 1, "_root-3", -1, 1, 0, 0, }, + { 828, 3, 1, "_root-4", -1, 1, 0, 0, }, + { 828, 4, 1, "_root-5", -1, 1, 0, 0, }, + { 828, 5, 1, "_root-6", -1, 1, 0, 0, }, + { 828, 6, 1, "_root-7", -1, 1, 0, 0, }, + { 828, 7, 1, "_root-8", -1, 1, 0, 0, }, + { 828, 8, 1, "_root-9", -1, 1, 0, 0, }, + { 828, 9, 1, "_root-10", -1, 1, 0, 0, }, + { 828, 10, 1, "_root-11", -1, 1, 0, 0, }, + { 828, 11, 1, "_root-12", -1, 1, 0, 0, }, + { 828, 12, 1, "_root-13", -1, 1, 0, 0, }, + { 828, 13, 1, "_root-14", -1, 1, 0, 0, }, + { 828, 14, 1, "_root-15", -1, 1, 0, 0, }, + { 828, 15, 1, "_root-16", -1, 1, 0, 0, }, + { 828, 16, 1, "_root-17", -1, 1, 0, 0, }, + { 828, 17, 1, "_root-18", -1, 1, 0, 0, }, + { 828, 18, 1, "_root-19", -1, 1, 0, 0, }, + { 828, 19, 1, "_root-20", -1, 1, 0, 0, }, + { 828, 20, 1, "_root-21", -1, 1, 0, 0, }, + { 828, 21, 1, "_root-22", -1, 1, 0, 0, }, + { 828, 22, 1, "_root-23", -1, 1, 0, 0, }, + { 828, 23, 1, "_root-24", -1, 1, 0, 0, }, + { 828, 24, 1, "_root-25", -1, 1, 0, 0, }, + { 828, 25, 1, "_root-26", -1, 1, 0, 0, }, + { 828, 26, 1, "_root-27", -1, 1, 0, 0, }, + { 828, 27, 1, "_root-28", -1, 1, 0, 0, }, + { 828, 28, 1, "_root-29", -1, 1, 0, 0, }, + { 828, 29, 1, "_root-30", -1, 1, 0, 0, }, + { 828, 30, 1, "_root-31", -1, 1, 0, 0, }, + { 828, 31, 1, "_root-32", -1, 1, 0, 0, }, + { 828, 32, 1, "_root-33", -1, 1, 0, 0, }, + { 828, 33, 1, "_root-34", -1, 1, 0, 0, }, + { 828, 34, 1, "_root-35", -1, 1, 0, 0, }, + { 828, 35, 1, "_root-36", -1, 1, 0, 0, }, + { 828, 36, 1, "_root-37", -1, 1, 0, 0, }, + { 828, 37, 1, "_root-38", -1, 1, 0, 0, }, + { 828, 38, 1, "_root-39", -1, 1, 0, 0, }, + { 828, 39, 1, "_root-40", -1, 1, 0, 0, }, + { 828, 40, 1, "_root-41", -1, 1, 0, 0, }, + { 828, 41, 1, "_root-42", -1, 1, 0, 0, }, + { 828, 42, 1, "_root-43", -1, 1, 0, 0, }, + { 828, 43, 1, "_root-44", -1, 1, 0, 0, }, + { 828, 44, 1, "_root-45", -1, 1, 0, 0, }, + { 828, 45, 1, "_root-46", -1, 1, 0, 0, }, + { 828, 46, 1, "_root-47", -1, 1, 0, 0, }, + { 828, 47, 1, "_root-48", -1, 1, 0, 0, }, + { 828, 48, 1, "_root-49", -1, 1, 0, 0, }, + { 828, 49, 1, "_root-50", -1, 1, 0, 0, }, + { 828, 50, 1, "_root-51", -1, 1, 0, 0, }, + { 828, 51, 1, "_root-52", -1, 1, 0, 0, }, + { 828, 52, 1, "_root-53", -1, 1, 0, 0, }, + { 828, 53, 1, "_root-54", -1, 1, 0, 0, }, + { 828, 54, 1, "_root-55", -1, 1, 0, 0, }, + { 828, 55, 1, "_root-56", -1, 1, 0, 0, }, + { 828, 56, 1, "_root-57", -1, 1, 0, 0, }, + { 828, 57, 1, "_root-58", -1, 1, 0, 0, }, + { 828, 58, 1, "_root-59", -1, 1, 0, 0, }, + { 828, 59, 1, "_root-60", -1, 1, 0, 0, }, + { 828, 60, 1, "_root-61", -1, 1, 0, 0, }, + { 828, 61, 1, "_root-62", -1, 1, 0, 0, }, + { 828, 62, 1, "_root-63", -1, 1, 0, 0, }, + { 828, 63, 1, "_root-64", -1, 1, 0, 0, }, + { 828, 64, 1, "_root-65", -1, 1, 0, 0, }, + { 828, 65, 1, "_root-66", -1, 1, 0, 0, }, + { 828, 66, 1, "_root-67", -1, 1, 0, 0, }, + { 828, 67, 1, "_root-68", -1, 1, 0, 0, }, + { 828, 68, 1, "_root-69", -1, 1, 0, 0, }, + { 828, 69, 1, "_root-70", -1, 1, 0, 0, }, + { 828, 70, 1, "_root-71", -1, 1, 0, 0, }, + { 828, 71, 1, "_root-72", -1, 1, 0, 0, }, + { 828, 72, 1, "_root-73", -1, 1, 0, 0, }, + { 828, 73, 1, "_root-74", -1, 1, 0, 0, }, + { 828, 74, 1, "_root-75", -1, 1, 0, 0, }, + { 828, 75, 1, "_root-76", -1, 1, 0, 0, }, + { 828, 76, 1, "_root-77", -1, 1, 0, 0, }, + { 828, 77, 1, "_root-78", -1, 1, 0, 0, }, + { 828, 78, 1, "_root-79", -1, 1, 0, 0, }, + { 828, 79, 1, "_root-80", -1, 1, 0, 0, }, + { 828, 80, 1, "_root-81", -1, 1, 0, 0, }, + { 828, 81, 1, "_root-82", -1, 1, 0, 0, }, + { 828, 82, 1, "_root-83", -1, 1, 0, 0, }, + { 828, 83, 1, "_root-84", -1, 1, 0, 0, }, + { 828, 84, 1, "_root-85", -1, 1, 0, 0, }, + { 828, 85, 1, "_root-86", -1, 1, 0, 0, }, + { 828, 86, 1, "_root-87", -1, 1, 0, 0, }, + { 828, 87, 1, "_root-88", -1, 1, 0, 0, }, + { 828, 88, 1, "_root-89", -1, 1, 0, 0, }, + { 828, 89, 1, "_root-90", -1, 1, 0, 0, }, + { 828, 90, 1, "_root-91", -1, 1, 0, 0, }, + { 828, 91, 1, "_root-92", -1, 1, 0, 0, }, + { 828, 92, 1, "_root-93", -1, 1, 0, 0, }, + { 828, 93, 1, "_root-94", -1, 1, 0, 0, }, + { 828, 94, 1, "_root-95", -1, 1, 0, 0, }, + { 828, 95, 1, "_root-96", -1, 1, 0, 0, }, + { 828, 96, 1, "_root-97", -1, 1, 0, 0, }, + { 828, 97, 1, "_root-98", -1, 1, 0, 0, }, + { 828, 98, 1, "_root-99", -1, 1, 0, 0, }, + { 828, 99, 1, "_root-100", -1, 1, 0, 0, }, + { 828, 100, 1, "_root-101", -1, 1, 0, 0, }, + { 828, 101, 1, "_root-102", -1, 1, 0, 0, }, + { 828, 102, 1, "_root-103", -1, 1, 0, 0, }, + { 828, 103, 1, "_root-104", -1, 1, 0, 0, }, + { 828, 104, 1, "_root-105", -1, 1, 0, 0, }, + { 828, 105, 1, "_root-106", -1, 1, 0, 0, }, + { 828, 106, 1, "_root-107", -1, 1, 0, 0, }, + { 828, 107, 1, "_root-108", -1, 1, 0, 0, }, + { 828, 108, 1, "_root-109", -1, 1, 0, 0, }, + { 828, 109, 1, "_root-110", -1, 1, 0, 0, }, + { 828, 110, 1, "_root-111", -1, 1, 0, 0, }, + { 828, 111, 1, "_root-112", -1, 1, 0, 0, }, + { 828, 112, 1, "_root-113", -1, 1, 0, 0, }, + { 828, 113, 1, "_root-114", -1, 1, 0, 0, }, + { 828, 114, 1, "_root-115", -1, 1, 0, 0, }, + { 828, 115, 1, "_root-116", -1, 1, 0, 0, }, + { 828, 116, 1, "_root-117", -1, 1, 0, 0, }, + { 828, 117, 1, "_root-118", -1, 1, 0, 0, }, + { 828, 118, 1, "_root-119", -1, 1, 0, 0, }, + { 828, 119, 1, "_root-120", -1, 1, 0, 0, }, + { 828, 120, 1, "_root-121", -1, 1, 0, 0, }, + { 828, 121, 1, "_root-122", -1, 1, 0, 0, }, + { 828, 122, 1, "_root-123", -1, 1, 0, 0, }, + { 828, 123, 1, "_root-124", -1, 1, 0, 0, }, + { 828, 124, 1, "_root-125", -1, 1, 0, 0, }, + { 828, 125, 1, "_root-126", -1, 1, 0, 0, }, + { 828, 126, 1, "_root-127", -1, 1, 0, 0, }, + { 828, 127, 1, "_root-128", -1, 1, 0, 0, }, + { 828, 128, 1, "_root-129", -1, 1, 0, 0, }, + { 828, 129, 1, "_root-130", -1, 1, 0, 0, }, + { 828, 130, 1, "_root-131", -1, 1, 0, 0, }, + { 828, 131, 1, "_root-132", -1, 1, 0, 0, }, + { 828, 132, 1, "_root-133", -1, 1, 0, 0, }, + { 828, 133, 1, "_root-134", -1, 1, 0, 0, }, + { 828, 134, 1, "_root-135", -1, 1, 0, 0, }, + { 828, 135, 1, "_root-136", -1, 1, 0, 0, }, + { 828, 136, 1, "_root-137", -1, 1, 0, 0, }, + { 828, 137, 1, "_root-138", -1, 1, 0, 0, }, + { 828, 138, 1, "_root-139", -1, 1, 0, 0, }, + { 828, 139, 1, "_root-140", -1, 1, 0, 0, }, + { 828, 140, 1, "_root-141", -1, 1, 0, 0, }, + { 828, 141, 1, "_root-142", -1, 1, 0, 0, }, + { 828, 142, 1, "_root-143", -1, 1, 0, 0, }, + { 828, 143, 1, "_root-144", -1, 1, 0, 0, }, + { 828, 144, 1, "_root-145", -1, 1, 0, 0, }, + { 828, 145, 1, "_root-146", -1, 1, 0, 0, }, + { 828, 146, 1, "_root-147", -1, 1, 0, 0, }, + { 828, 147, 1, "_root-148", -1, 1, 0, 0, }, + { 828, 148, 1, "_root-149", -1, 1, 0, 0, }, + { 828, 149, 1, "_root-150", -1, 1, 0, 0, }, + { 828, 150, 1, "_root-151", -1, 1, 0, 0, }, + { 828, 151, 1, "_root-152", -1, 1, 0, 0, }, + { 828, 152, 1, "_root-153", -1, 1, 0, 0, }, + { 828, 153, 1, "_root-154", -1, 1, 0, 0, }, + { 828, 154, 1, "_root-155", -1, 1, 0, 0, }, + { 828, 155, 1, "_root-156", -1, 1, 0, 0, }, + { 828, 156, 1, "_root-157", -1, 1, 0, 0, }, + { 828, 157, 1, "_root-158", -1, 1, 0, 0, }, + { 828, 158, 1, "_root-159", -1, 1, 0, 0, }, + { 828, 159, 1, "_root-160", -1, 1, 0, 0, }, + { 828, 160, 1, "_root-161", -1, 1, 0, 0, }, + { 828, 161, 1, "_root-162", -1, 1, 0, 0, }, + { 828, 162, 1, "_root-163", -1, 1, 0, 0, }, + { 828, 163, 1, "_root-164", -1, 1, 0, 0, }, + { 828, 164, 1, "_root-165", -1, 1, 0, 0, }, + { 828, 165, 1, "_root-166", -1, 1, 0, 0, }, + { 828, 166, 1, "_root-167", -1, 1, 0, 0, }, + { 828, 167, 1, "_root-168", -1, 1, 0, 0, }, + { 828, 168, 1, "_root-169", -1, 1, 0, 0, }, + { 828, 169, 1, "_root-170", -1, 1, 0, 0, }, + { 828, 170, 1, "_root-171", -1, 1, 0, 0, }, + { 828, 171, 1, "_root-172", -1, 1, 0, 0, }, + { 828, 172, 1, "_root-173", -1, 1, 0, 0, }, + { 828, 173, 1, "_root-174", -1, 1, 0, 0, }, + { 828, 174, 1, "_root-175", -1, 1, 0, 0, }, + { 828, 175, 1, "_root-176", -1, 1, 0, 0, }, + { 828, 176, 1, "_root-177", -1, 1, 0, 0, }, + { 828, 177, 1, "_root-178", -1, 1, 0, 0, }, + { 828, 178, 1, "_root-179", -1, 1, 0, 0, }, + { 828, 179, 1, "_root-180", -1, 1, 0, 0, }, + { 828, 180, 1, "_root-181", -1, 1, 0, 0, }, + { 828, 181, 1, "_root-182", -1, 1, 0, 0, }, + { 828, 182, 1, "_root-183", -1, 1, 0, 0, }, + { 828, 183, 1, "_root-184", -1, 1, 0, 0, }, + { 828, 184, 1, "_root-185", -1, 1, 0, 0, }, + { 828, 185, 1, "_root-186", -1, 1, 0, 0, }, + { 828, 186, 1, "_root-187", -1, 1, 0, 0, }, + { 828, 187, 1, "_root-188", -1, 1, 0, 0, }, + { 828, 188, 1, "_root-189", -1, 1, 0, 0, }, + { 828, 189, 1, "_root-190", -1, 1, 0, 0, }, + { 828, 190, 1, "_root-191", -1, 1, 0, 0, }, + { 828, 191, 1, "_root-192", -1, 1, 0, 0, }, + { 828, 192, 1, "_root-193", -1, 1, 0, 0, }, + { 828, 193, 1, "_root-194", -1, 1, 0, 0, }, + { 828, 194, 1, "_root-195", -1, 1, 0, 0, }, + { 828, 195, 1, "_root-196", -1, 1, 0, 0, }, + { 828, 196, 1, "_root-197", -1, 1, 0, 0, }, + { 828, 197, 1, "_root-198", -1, 1, 0, 0, }, + { 828, 198, 1, "_root-199", -1, 1, 0, 0, }, + { 828, 199, 1, "_root-200", -1, 1, 0, 0, }, + { 828, 200, 1, "_root-201", -1, 1, 0, 0, }, + { 828, 201, 1, "_root-202", -1, 1, 0, 0, }, + { 828, 202, 1, "_root-203", -1, 1, 0, 0, }, + { 828, 203, 1, "_root-204", -1, 1, 0, 0, }, + { 828, 204, 1, "_root-205", -1, 1, 0, 0, }, + { 828, 205, 1, "_root-206", -1, 1, 0, 0, }, + { 828, 206, 1, "_root-207", -1, 1, 0, 0, }, + { 828, 207, 1, "_root-208", -1, 1, 0, 0, }, + { 828, 208, 1, "_root-209", -1, 1, 0, 0, }, + { 828, 209, 1, "_root-210", -1, 1, 0, 0, }, + { 828, 210, 1, "_root-211", -1, 1, 0, 0, }, + { 828, 211, 1, "_root-212", -1, 1, 0, 0, }, + { 828, 212, 1, "_root-213", -1, 1, 0, 0, }, + { 828, 213, 1, "_root-214", -1, 1, 0, 0, }, + { 828, 214, 1, "_root-215", -1, 1, 0, 0, }, + { 828, 215, 1, "_root-216", -1, 1, 0, 0, }, + { 828, 216, 1, "_root-217", -1, 1, 0, 0, }, + { 828, 217, 1, "_root-218", -1, 1, 0, 0, }, + { 828, 218, 1, "_root-219", -1, 1, 0, 0, }, + { 828, 219, 1, "_root-220", -1, 1, 0, 0, }, + { 828, 220, 1, "_root-221", -1, 1, 0, 0, }, + { 828, 221, 1, "_root-222", -1, 1, 0, 0, }, + { 828, 222, 1, "_root-223", -1, 1, 0, 0, }, + { 828, 223, 1, "_root-224", -1, 1, 0, 0, }, + { 828, 224, 1, "_root-225", -1, 1, 0, 0, }, + { 828, 225, 1, "_root-226", -1, 1, 0, 0, }, + { 828, 226, 1, "_root-227", -1, 1, 0, 0, }, + { 828, 227, 1, "_root-228", -1, 1, 0, 0, }, + { 828, 228, 1, "_root-229", -1, 1, 0, 0, }, + { 828, 229, 1, "_root-230", -1, 1, 0, 0, }, + { 828, 230, 1, "_root-231", -1, 1, 0, 0, }, + { 828, 231, 1, "_root-232", -1, 1, 0, 0, }, + { 828, 232, 1, "_root-233", -1, 1, 0, 0, }, + { 828, 233, 1, "_root-234", -1, 1, 0, 0, }, + { 828, 234, 1, "_root-235", -1, 1, 0, 0, }, + { 828, 235, 1, "_root-236", -1, 1, 0, 0, }, + { 828, 236, 1, "_root-237", -1, 1, 0, 0, }, + { 828, 237, 1, "_root-238", -1, 1, 0, 0, }, + { 828, 238, 1, "_root-239", -1, 1, 0, 0, }, + { 828, 239, 1, "_root-240", -1, 1, 0, 0, }, + { 828, 240, 1, "_root-241", -1, 1, 0, 0, }, + { 828, 241, 1, "_root-242", -1, 1, 0, 0, }, + { 828, 242, 1, "_root-243", -1, 1, 0, 0, }, + { 828, 243, 1, "_root-244", -1, 1, 0, 0, }, + { 828, 244, 1, "_root-245", -1, 1, 0, 0, }, + { 828, 245, 1, "_root-246", -1, 1, 0, 0, }, + { 828, 246, 1, "_root-247", -1, 1, 0, 0, }, + { 828, 247, 1, "_root-248", -1, 1, 0, 0, }, + { 828, 248, 1, "_root-249", -1, 1, 0, 0, }, + { 828, 249, 1, "_root-250", -1, 1, 0, 0, }, + { 828, 250, 1, "_root-251", -1, 1, 0, 0, }, + { 828, 251, 1, "_root-252", -1, 1, 0, 0, }, + { 828, 252, 1, "_root-253", -1, 1, 0, 0, }, + { 828, 253, 1, "_root-254", -1, 1, 0, 0, }, + { 828, 254, 1, "_root-255", -1, 1, 0, 0, }, + { 828, 255, 1, "_root-256", -1, 1, 0, 0, }, + { 828, 256, 1, "_root-257", -1, 1, 0, 0, }, + { 828, 257, 1, "_root-258", -1, 1, 0, 0, }, + { 828, 258, 1, "_root-259", -1, 1, 0, 0, }, + { 828, 259, 1, "_root-260", -1, 1, 0, 0, }, + { 828, 260, 1, "_root-261", -1, 1, 0, 0, }, + { 828, 261, 1, "_root-262", -1, 1, 0, 0, }, + { 828, 262, 1, "_root-263", -1, 1, 0, 0, }, + { 828, 263, 1, "_root-264", -1, 1, 0, 0, }, + { 828, 264, 1, "_root-265", -1, 1, 0, 0, }, + { 828, 265, 1, "_root-266", -1, 1, 0, 0, }, + { 828, 266, 1, "_root-267", -1, 1, 0, 0, }, + { 828, 267, 1, "_root-268", -1, 1, 0, 0, }, + { 828, 268, 1, "_root-269", -1, 1, 0, 0, }, + { 828, 269, 1, "_root-270", -1, 1, 0, 0, }, + { 828, 270, 1, "_root-271", -1, 1, 0, 0, }, + { 828, 271, 1, "_root-272", -1, 1, 0, 0, }, + { 828, 272, 1, "_root-273", -1, 1, 0, 0, }, + { 828, 273, 1, "_root-274", -1, 1, 0, 0, }, + { 828, 274, 1, "_root-275", -1, 1, 0, 0, }, + { 828, 275, 1, "_root-276", -1, 1, 0, 0, }, + { 828, 276, 1, "_root-277", -1, 1, 0, 0, }, + { 828, 277, 1, "_root-278", -1, 1, 0, 0, }, + { 828, 278, 1, "_root-279", -1, 1, 0, 0, }, + { 828, 279, 1, "_root-280", -1, 1, 0, 0, }, + { 828, 280, 1, "_root-281", -1, 1, 0, 0, }, + { 828, 281, 1, "_root-282", -1, 1, 0, 0, }, + { 828, 282, 1, "_root-283", -1, 1, 0, 0, }, + { 828, 283, 1, "_root-284", -1, 1, 0, 0, }, + { 828, 284, 1, "_root-285", -1, 1, 0, 0, }, + { 828, 285, 1, "_root-286", -1, 1, 0, 0, }, + { 828, 286, 1, "_root-287", -1, 1, 0, 0, }, + { 828, 287, 1, "_root-288", -1, 1, 0, 0, }, + { 828, 288, 1, "_root-289", -1, 1, 0, 0, }, + { 828, 289, 1, "_root-290", -1, 1, 0, 0, }, + { 828, 290, 1, "_root-291", -1, 1, 0, 0, }, + { 828, 291, 1, "_root-292", -1, 1, 0, 0, }, + { 828, 292, 1, "_root-293", -1, 1, 0, 0, }, + { 828, 293, 1, "_root-294", -1, 1, 0, 0, }, + { 828, 294, 1, "_root-295", -1, 1, 0, 0, }, + { 828, 295, 1, "_root-296", -1, 1, 0, 0, }, + { 828, 296, 1, "_root-297", -1, 1, 0, 0, }, + { 828, 297, 1, "_root-298", -1, 1, 0, 0, }, + { 828, 298, 1, "_root-299", -1, 1, 0, 0, }, + { 828, 299, 1, "_root-300", -1, 1, 0, 0, }, + { 828, 300, 1, "_root-301", -1, 1, 0, 0, }, + { 828, 301, 1, "_root-302", -1, 1, 0, 0, }, + { 828, 302, 1, "_root-303", -1, 1, 0, 0, }, + { 828, 303, 1, "_root-304", -1, 1, 0, 0, }, + { 828, 304, 1, "_root-305", -1, 1, 0, 0, }, + { 828, 305, 1, "_root-306", -1, 1, 0, 0, }, + { 828, 306, 1, "_root-307", -1, 1, 0, 0, }, + { 828, 307, 1, "_root-308", -1, 1, 0, 0, }, + { 828, 308, 1, "_root-309", -1, 1, 0, 0, }, + { 828, 309, 1, "_root-310", -1, 1, 0, 0, }, + { 828, 310, 1, "_root-311", -1, 1, 0, 0, }, + { 828, 311, 1, "_root-312", -1, 1, 0, 0, }, + { 828, 312, 1, "_root-313", -1, 1, 0, 0, }, + { 828, 313, 1, "_root-314", -1, 1, 0, 0, }, + { 828, 314, 1, "_root-315", -1, 1, 0, 0, }, + { 828, 315, 1, "_root-316", -1, 1, 0, 0, }, + { 828, 316, 1, "_root-317", -1, 1, 0, 0, }, + { 828, 317, 1, "_root-318", -1, 1, 0, 0, }, + { 828, 318, 1, "_root-319", -1, 1, 0, 0, }, + { 828, 319, 1, "_root-320", -1, 1, 0, 0, }, + { 828, 320, 1, "_root-321", -1, 1, 0, 0, }, + { 828, 321, 1, "_root-322", -1, 1, 0, 0, }, + { 828, 322, 1, "_root-323", -1, 1, 0, 0, }, + { 828, 323, 1, "_root-324", -1, 1, 0, 0, }, + { 828, 324, 1, "_root-325", -1, 1, 0, 0, }, + { 828, 325, 1, "_root-326", -1, 1, 0, 0, }, + { 828, 326, 1, "_root-327", -1, 1, 0, 0, }, + { 828, 327, 1, "_root-328", -1, 1, 0, 0, }, + { 828, 328, 1, "_root-329", -1, 1, 0, 0, }, + { 828, 329, 1, "_root-330", -1, 1, 0, 0, }, + { 828, 330, 1, "_root-331", -1, 1, 0, 0, }, + { 828, 331, 1, "_root-332", -1, 1, 0, 0, }, + { 828, 332, 1, "_root-333", -1, 1, 0, 0, }, + { 828, 333, 1, "_root-334", -1, 1, 0, 0, }, + { 828, 334, 1, "_root-335", -1, 1, 0, 0, }, + { 828, 335, 1, "_root-336", -1, 1, 0, 0, }, + { 828, 336, 1, "_root-337", -1, 1, 0, 0, }, + { 828, 337, 1, "_root-338", -1, 1, 0, 0, }, + { 828, 338, 1, "_root-339", -1, 1, 0, 0, }, + { 828, 339, 1, "_root-340", -1, 1, 0, 0, }, + { 828, 340, 1, "_root-341", -1, 1, 0, 0, }, + { 828, 341, 1, "_root-342", -1, 1, 0, 0, }, + { 828, 342, 1, "_root-343", -1, 1, 0, 0, }, + { 828, 343, 1, "_root-344", -1, 1, 0, 0, }, + { 828, 344, 1, "_root-345", -1, 1, 0, 0, }, + { 828, 345, 1, "_root-346", -1, 1, 0, 0, }, + { 828, 346, 1, "_root-347", -1, 1, 0, 0, }, + { 828, 347, 1, "_root-348", -1, 1, 0, 0, }, + { 828, 348, 1, "_root-349", -1, 1, 0, 0, }, + { 828, 349, 1, "_root-350", -1, 1, 0, 0, }, + { 828, 350, 1, "_root-351", -1, 1, 0, 0, }, + { 828, 351, 1, "_root-352", -1, 1, 0, 0, }, + { 828, 352, 1, "_root-353", -1, 1, 0, 0, }, + { 828, 353, 1, "_root-354", -1, 1, 0, 0, }, + { 828, 354, 1, "_root-355", -1, 1, 0, 0, }, + { 828, 355, 1, "_root-356", -1, 1, 0, 0, }, + { 828, 356, 1, "_root-357", -1, 1, 0, 0, }, + { 828, 357, 1, "_root-358", -1, 1, 0, 0, }, + { 828, 358, 1, "_root-359", -1, 1, 0, 0, }, + { 828, 359, 1, "_root-360", -1, 1, 0, 0, }, + { 828, 360, 1, "_root-361", -1, 1, 0, 0, }, + { 828, 361, 1, "_root-362", -1, 1, 0, 0, }, + { 828, 362, 1, "_root-363", -1, 1, 0, 0, }, + { 828, 363, 1, "_root-364", -1, 1, 0, 0, }, + { 828, 364, 1, "_root-365", -1, 1, 0, 0, }, + { 828, 365, 1, "_root-366", -1, 1, 0, 0, }, + { 828, 366, 1, "_root-367", -1, 1, 0, 0, }, + { 828, 367, 1, "_root-368", -1, 1, 0, 0, }, + { 828, 368, 1, "_root-369", -1, 1, 0, 0, }, + { 828, 369, 1, "_root-370", -1, 1, 0, 0, }, + { 828, 370, 1, "_root-371", -1, 1, 0, 0, }, + { 828, 371, 1, "_root-372", -1, 1, 0, 0, }, + { 828, 372, 1, "_root-373", -1, 1, 0, 0, }, + { 828, 373, 1, "_root-374", -1, 1, 0, 0, }, + { 828, 374, 1, "_root-375", -1, 1, 0, 0, }, + { 828, 375, 1, "_root-376", -1, 1, 0, 0, }, + { 828, 376, 1, "_root-377", -1, 1, 0, 0, }, + { 828, 377, 1, "_root-378", -1, 1, 0, 0, }, + { 828, 378, 1, "_root-379", -1, 1, 0, 0, }, + { 828, 379, 1, "_root-380", -1, 1, 0, 0, }, + { 828, 380, 1, "_root-381", -1, 1, 0, 0, }, + { 828, 381, 1, "_root-382", -1, 1, 0, 0, }, + { 828, 382, 1, "_root-383", -1, 1, 0, 0, }, + { 828, 383, 1, "_root-384", -1, 1, 0, 0, }, + { 828, 384, 1, "_root-385", -1, 1, 0, 0, }, + { 828, 385, 1, "_root-386", -1, 1, 0, 0, }, + { 828, 386, 1, "_root-387", -1, 1, 0, 0, }, + { 828, 387, 1, "_root-388", -1, 1, 0, 0, }, + { 828, 388, 1, "_root-389", -1, 1, 0, 0, }, + { 828, 389, 1, "_root-390", -1, 1, 0, 0, }, + { 828, 390, 1, "_root-391", -1, 1, 0, 0, }, + { 828, 391, 1, "_root-392", -1, 1, 0, 0, }, + { 828, 392, 1, "_root-393", -1, 1, 0, 0, }, + { 828, 393, 1, "_root-394", -1, 1, 0, 0, }, + { 828, 394, 1, "_root-395", -1, 1, 0, 0, }, + { 828, 395, 1, "_root-396", -1, 1, 0, 0, }, + { 828, 396, 1, "_root-397", -1, 1, 0, 0, }, + { 828, 397, 1, "_root-398", -1, 1, 0, 0, }, + { 828, 398, 1, "_root-399", -1, 1, 0, 0, }, + { 828, 399, 1, "_root-400", -1, 1, 0, 0, }, + { 828, 400, 1, "_root-401", -1, 1, 0, 0, }, + { 828, 401, 1, "_root-402", -1, 1, 0, 0, }, + { 828, 402, 1, "_root-403", -1, 1, 0, 0, }, + { 828, 403, 1, "_root-404", -1, 1, 0, 0, }, + { 828, 404, 1, "_root-405", -1, 1, 0, 0, }, + { 828, 405, 1, "_root-406", -1, 1, 0, 0, }, + { 828, 406, 1, "_root-407", -1, 1, 0, 0, }, + { 828, 407, 1, "_root-408", -1, 1, 0, 0, }, + { 828, 408, 1, "_root-409", -1, 1, 0, 0, }, + { 828, 409, 1, "_root-410", -1, 1, 0, 0, }, + { 828, 410, 1, "_root-411", -1, 1, 0, 0, }, + { 828, 411, 1, "_root-412", -1, 1, 0, 0, }, + { 828, 412, 1, "_root-413", -1, 1, 0, 0, }, + { 828, 413, 1, "_root-414", -1, 1, 0, 0, }, + { 828, 414, 1, "_root-415", -1, 1, 0, 0, }, + { 828, 415, 1, "_root-416", -1, 1, 0, 0, }, + { 828, 416, 1, "_root-417", -1, 1, 0, 0, }, + { 828, 417, 1, "_root-418", -1, 1, 0, 0, }, + { 828, 418, 1, "_root-419", -1, 1, 0, 0, }, + { 828, 419, 1, "_root-420", -1, 1, 0, 0, }, + { 828, 420, 1, "_root-421", -1, 1, 0, 0, }, + { 828, 421, 1, "_root-422", -1, 1, 0, 0, }, + { 828, 422, 1, "_root-423", -1, 1, 0, 0, }, + { 828, 423, 1, "_root-424", -1, 1, 0, 0, }, + { 828, 424, 1, "_root-425", -1, 1, 0, 0, }, + { 828, 425, 1, "_root-426", -1, 1, 0, 0, }, + { 828, 426, 1, "_root-427", -1, 1, 0, 0, }, + { 828, 427, 1, "_root-428", -1, 1, 0, 0, }, + { 828, 428, 1, "_root-429", -1, 1, 0, 0, }, + { 828, 429, 1, "_root-430", -1, 1, 0, 0, }, + { 828, 430, 1, "_root-431", -1, 1, 0, 0, }, + { 828, 431, 1, "_root-432", -1, 1, 0, 0, }, + { 828, 432, 1, "_root-433", -1, 1, 0, 0, }, + { 828, 433, 1, "_root-434", -1, 1, 0, 0, }, + { 828, 434, 1, "_root-435", -1, 1, 0, 0, }, + { 828, 435, 1, "_root-436", -1, 1, 0, 0, }, + { 828, 436, 1, "_root-437", -1, 1, 0, 0, }, + { 828, 437, 1, "_root-438", -1, 1, 0, 0, }, + { 828, 438, 1, "_root-439", -1, 1, 0, 0, }, + { 828, 439, 1, "_root-440", -1, 1, 0, 0, }, + { 828, 440, 1, "_root-441", -1, 1, 0, 0, }, + { 828, 441, 1, "_root-442", -1, 1, 0, 0, }, + { 828, 442, 1, "_root-443", -1, 1, 0, 0, }, + { 828, 443, 1, "_root-444", -1, 1, 0, 0, }, + { 828, 444, 1, "_root-445", -1, 1, 0, 0, }, + { 828, 445, 1, "_root-446", -1, 1, 0, 0, }, + { 828, 446, 1, "_root-447", -1, 1, 0, 0, }, + { 828, 447, 1, "_root-448", -1, 1, 0, 0, }, + { 828, 448, 1, "_root-449", -1, 1, 0, 0, }, + { 828, 449, 1, "_root-450", -1, 1, 0, 0, }, + { 828, 450, 1, "_root-451", -1, 1, 0, 0, }, + { 828, 451, 1, "_root-452", -1, 1, 0, 0, }, + { 828, 452, 1, "_root-453", -1, 1, 0, 0, }, + { 828, 453, 1, "_root-454", -1, 1, 0, 0, }, + { 828, 454, 1, "_root-455", -1, 1, 0, 0, }, + { 828, 455, 1, "_root-456", -1, 1, 0, 0, }, + { 828, 456, 1, "_root-457", -1, 1, 0, 0, }, + { 828, 457, 1, "_root-458", -1, 1, 0, 0, }, + { 828, 458, 1, "_root-459", -1, 1, 0, 0, }, + { 828, 459, 1, "_root-460", -1, 1, 0, 0, }, + { 828, 460, 1, "_root-461", -1, 1, 0, 0, }, + { 828, 461, 1, "_root-462", -1, 1, 0, 0, }, + { 828, 462, 1, "_root-463", -1, 1, 0, 0, }, + { 828, 463, 1, "_root-464", -1, 1, 0, 0, }, + { 828, 464, 1, "_root-465", -1, 1, 0, 0, }, + { 828, 465, 1, "_root-466", -1, 1, 0, 0, }, + { 828, 466, 1, "_root-467", -1, 1, 0, 0, }, + { 828, 467, 1, "_root-468", -1, 1, 0, 0, }, + { 828, 468, 1, "_root-469", -1, 1, 0, 0, }, + { 828, 469, 1, "_root-470", -1, 1, 0, 0, }, + { 828, 470, 1, "_root-471", -1, 1, 0, 0, }, + { 828, 471, 1, "_root-472", -1, 1, 0, 0, }, + { 828, 472, 1, "_root-473", -1, 1, 0, 0, }, + { 828, 473, 1, "_root-474", -1, 1, 0, 0, }, + { 828, 474, 1, "_root-475", -1, 1, 0, 0, }, + { 828, 475, 1, "_root-476", -1, 1, 0, 0, }, + { 828, 476, 1, "_root-477", -1, 1, 0, 0, }, + { 828, 477, 1, "_root-478", -1, 1, 0, 0, }, + { 828, 478, 1, "_root-479", -1, 1, 0, 0, }, + { 828, 479, 1, "_root-480", -1, 1, 0, 0, }, + { 828, 480, 1, "_root-481", -1, 1, 0, 0, }, + { 828, 481, 1, "_root-482", -1, 1, 0, 0, }, + { 828, 482, 1, "_root-483", -1, 1, 0, 0, }, + { 828, 483, 1, "_root-484", -1, 1, 0, 0, }, + { 828, 484, 1, "_root-485", -1, 1, 0, 0, }, + { 828, 485, 1, "_root-486", -1, 1, 0, 0, }, + { 828, 486, 1, "_root-487", -1, 1, 0, 0, }, + { 828, 487, 1, "_root-488", -1, 1, 0, 0, }, + { 828, 488, 1, "_root-489", -1, 1, 0, 0, }, + { 828, 489, 1, "_root-490", -1, 1, 0, 0, }, + { 828, 490, 1, "_root-491", -1, 1, 0, 0, }, + { 828, 491, 1, "_root-492", -1, 1, 0, 0, }, + { 828, 492, 1, "_root-493", -1, 1, 0, 0, }, + { 828, 493, 1, "_root-494", -1, 1, 0, 0, }, + { 828, 494, 1, "_root-495", -1, 1, 0, 0, }, + { 828, 495, 1, "_root-496", -1, 1, 0, 0, }, + { 828, 496, 1, "_root-497", -1, 1, 0, 0, }, + { 828, 497, 1, "_root-498", -1, 1, 0, 0, }, + { 828, 498, 1, "_root-499", -1, 1, 0, 0, }, + { 828, 499, 1, "_root-500", -1, 1, 0, 0, }, + { 828, 500, 1, "_root-501", -1, 1, 0, 0, }, + { 828, 501, 1, "_root-502", -1, 1, 0, 0, }, + { 828, 502, 1, "_root-503", -1, 1, 0, 0, }, + { 828, 503, 1, "_root-504", -1, 1, 0, 0, }, + { 828, 504, 1, "_root-505", -1, 1, 0, 0, }, + { 828, 505, 1, "_root-506", -1, 1, 0, 0, }, + { 828, 506, 1, "_root-507", -1, 1, 0, 0, }, + { 828, 507, 1, "_root-508", -1, 1, 0, 0, }, + { 828, 508, 1, "_root-509", -1, 1, 0, 0, }, + { 828, 509, 1, "_root-510", -1, 1, 0, 0, }, + { 828, 510, 1, "_root-511", -1, 1, 0, 0, }, + { 828, 511, 1, "_root-512", -1, 1, 0, 0, }, + { 828, 512, 1, "_root-513", -1, 1, 0, 0, }, + { 828, 513, 1, "_root-514", -1, 1, 0, 0, }, + { 828, 514, 1, "_root-515", -1, 1, 0, 0, }, + { 828, 515, 1, "_root-516", -1, 1, 0, 0, }, + { 828, 516, 1, "_root-517", -1, 1, 0, 0, }, + { 828, 517, 1, "_root-518", -1, 1, 0, 0, }, + { 828, 518, 1, "_root-519", -1, 1, 0, 0, }, + { 828, 519, 1, "_root-520", -1, 1, 0, 0, }, + { 828, 520, 1, "_root-521", -1, 1, 0, 0, }, + { 828, 521, 1, "_root-522", -1, 1, 0, 0, }, + { 828, 522, 1, "_root-523", -1, 1, 0, 0, }, + { 828, 523, 1, "_root-524", -1, 1, 0, 0, }, + { 828, 524, 1, "_root-525", -1, 1, 0, 0, }, + { 828, 525, 1, "_root-526", -1, 1, 0, 0, }, + { 828, 526, 1, "_root-527", -1, 1, 0, 0, }, + { 828, 527, 1, "_root-528", -1, 1, 0, 0, }, + { 828, 528, 1, "_root-529", -1, 1, 0, 0, }, + { 828, 529, 1, "_root-530", -1, 1, 0, 0, }, + { 828, 530, 1, "_root-531", -1, 1, 0, 0, }, + { 828, 531, 1, "_root-532", -1, 1, 0, 0, }, + { 828, 532, 1, "_root-533", -1, 1, 0, 0, }, + { 828, 533, 1, "_root-534", -1, 1, 0, 0, }, + { 828, 534, 1, "_root-535", -1, 1, 0, 0, }, + { 828, 535, 1, "_root-536", -1, 1, 0, 0, }, + { 828, 536, 1, "_root-537", -1, 1, 0, 0, }, + { 828, 537, 1, "_root-538", -1, 1, 0, 0, }, + { 828, 538, 1, "_root-539", -1, 1, 0, 0, }, + { 828, 539, 1, "_root-540", -1, 1, 0, 0, }, + { 828, 540, 1, "_root-541", -1, 1, 0, 0, }, + { 828, 541, 1, "_root-542", -1, 1, 0, 0, }, + { 828, 542, 1, "_root-543", -1, 1, 0, 0, }, + { 828, 543, 1, "_root-544", -1, 1, 0, 0, }, + { 828, 544, 1, "_root-545", -1, 1, 0, 0, }, + { 828, 545, 1, "_root-546", -1, 1, 0, 0, }, + { 828, 546, 1, "_root-547", -1, 1, 0, 0, }, + { 828, 547, 1, "_root-548", -1, 1, 0, 0, }, + { 828, 548, 1, "_root-549", -1, 1, 0, 0, }, + { 828, 549, 1, "_root-550", -1, 1, 0, 0, }, + { 828, 550, 1, "_root-551", -1, 1, 0, 0, }, + { 828, 551, 1, "_root-552", -1, 1, 0, 0, }, + { 828, 552, 1, "_root-553", -1, 1, 0, 0, }, + { 828, 553, 1, "_root-554", -1, 1, 0, 0, }, + { 828, 554, 1, "_root-555", -1, 1, 0, 0, }, + { 828, 555, 1, "_root-556", -1, 1, 0, 0, }, + { 828, 556, 1, "_root-557", -1, 1, 0, 0, }, + { 828, 557, 1, "_root-558", -1, 1, 0, 0, }, + { 828, 558, 1, "_root-559", -1, 1, 0, 0, }, + { 828, 559, 1, "_root-560", -1, 1, 0, 0, }, + { 828, 560, 1, "_root-561", -1, 1, 0, 0, }, + { 828, 561, 1, "_root-562", -1, 1, 0, 0, }, + { 828, 562, 1, "_root-563", -1, 1, 0, 0, }, + { 828, 563, 1, "_root-564", -1, 1, 0, 0, }, + { 828, 564, 1, "_root-565", -1, 1, 0, 0, }, + { 828, 565, 1, "_root-566", -1, 1, 0, 0, }, + { 828, 566, 1, "_root-567", -1, 1, 0, 0, }, + { 828, 567, 1, "_root-568", -1, 1, 0, 0, }, + { 828, 568, 1, "_root-569", -1, 1, 0, 0, }, + { 828, 569, 1, "_root-570", -1, 1, 0, 0, }, + { 828, 570, 1, "_root-571", -1, 1, 0, 0, }, + { 828, 571, 1, "_root-572", -1, 1, 0, 0, }, + { 828, 572, 1, "_root-573", -1, 1, 0, 0, }, + { 828, 573, 1, "_root-574", -1, 1, 0, 0, }, + { 828, 574, 1, "_root-575", -1, 1, 0, 0, }, + { 828, 575, 1, "_root-576", -1, 1, 0, 0, }, + { 828, 576, 1, "_root-577", -1, 1, 0, 0, }, + { 828, 577, 1, "_root-578", -1, 1, 0, 0, }, + { 828, 578, 1, "_root-579", -1, 1, 0, 0, }, + { 828, 579, 1, "_root-580", -1, 1, 0, 0, }, + { 828, 580, 1, "_root-581", -1, 1, 0, 0, }, + { 828, 581, 1, "_root-582", -1, 1, 0, 0, }, + { 828, 582, 1, "_root-583", -1, 1, 0, 0, }, + { 828, 583, 1, "_root-584", -1, 1, 0, 0, }, + { 828, 584, 1, "_root-585", -1, 1, 0, 0, }, + { 828, 585, 1, "_root-586", -1, 1, 0, 0, }, + { 828, 586, 1, "_root-587", -1, 1, 0, 0, }, + { 828, 587, 1, "_root-588", -1, 1, 0, 0, }, + { 828, 588, 1, "_root-589", -1, 1, 0, 0, }, + { 828, 589, 1, "_root-590", -1, 1, 0, 0, }, + { 828, 590, 1, "_root-591", -1, 1, 0, 0, }, + { 828, 591, 1, "_root-592", -1, 1, 0, 0, }, + { 828, 592, 1, "_root-593", -1, 1, 0, 0, }, + { 828, 593, 1, "_root-594", -1, 1, 0, 0, }, + { 828, 594, 1, "_root-595", -1, 1, 0, 0, }, + { 828, 595, 1, "_root-596", -1, 1, 0, 0, }, + { 828, 596, 1, "_root-597", -1, 1, 0, 0, }, + { 828, 597, 1, "_root-598", -1, 1, 0, 0, }, + { 828, 598, 1, "_root-599", -1, 1, 0, 0, }, + { 828, 599, 1, "_root-600", -1, 1, 0, 0, }, + { 828, 600, 1, "_root-601", -1, 1, 0, 0, }, + { 828, 601, 1, "_root-602", -1, 1, 0, 0, }, + { 828, 602, 1, "_root-603", -1, 1, 0, 0, }, + { 828, 603, 1, "_root-604", -1, 1, 0, 0, }, + { 828, 604, 1, "_root-605", -1, 1, 0, 0, }, + { 828, 605, 1, "_root-606", -1, 1, 0, 0, }, + { 828, 606, 1, "_root-607", -1, 1, 0, 0, }, + { 828, 607, 1, "_root-608", -1, 1, 0, 0, }, + { 828, 608, 1, "_root-609", -1, 1, 0, 0, }, + { 828, 609, 1, "_root-610", -1, 1, 0, 0, }, + { 828, 610, 1, "_root-611", -1, 1, 0, 0, }, + { 828, 611, 1, "_root-612", -1, 1, 0, 0, }, + { 828, 612, 1, "_root-613", -1, 1, 0, 0, }, + { 828, 613, 1, "_root-614", -1, 1, 0, 0, }, + { 828, 614, 1, "_root-615", -1, 1, 0, 0, }, + { 828, 615, 1, "_root-616", -1, 1, 0, 0, }, + { 828, 616, 1, "_root-617", -1, 1, 0, 0, }, + { 828, 617, 1, "_root-618", -1, 1, 0, 0, }, + { 828, 618, 1, "_root-619", -1, 1, 0, 0, }, + { 828, 619, 1, "_root-620", -1, 1, 0, 0, }, + { 828, 620, 1, "_root-621", -1, 1, 0, 0, }, + { 828, 621, 1, "_root-622", -1, 1, 0, 0, }, + { 828, 622, 1, "_root-623", -1, 1, 0, 0, }, + { 828, 623, 1, "_root-624", -1, 1, 0, 0, }, + { 828, 624, 1, "_root-625", -1, 1, 0, 0, }, + { 828, 625, 1, "_root-626", -1, 1, 0, 0, }, + { 828, 626, 1, "_root-627", -1, 1, 0, 0, }, + { 828, 627, 1, "_root-628", -1, 1, 0, 0, }, + { 828, 628, 1, "_root-629", -1, 1, 0, 0, }, + { 828, 629, 1, "_root-630", -1, 1, 0, 0, }, + { 828, 630, 1, "_root-631", -1, 1, 0, 0, }, + { 828, 631, 1, "_root-632", -1, 1, 0, 0, }, + { 828, 632, 1, "_root-633", -1, 1, 0, 0, }, + { 828, 633, 1, "_root-634", -1, 1, 0, 0, }, + { 828, 634, 1, "_root-635", -1, 1, 0, 0, }, + { 828, 635, 1, "_root-636", -1, 1, 0, 0, }, + { 828, 636, 1, "_root-637", -1, 1, 0, 0, }, + { 828, 637, 1, "_root-638", -1, 1, 0, 0, }, + { 828, 638, 1, "_root-639", -1, 1, 0, 0, }, + { 828, 639, 1, "_root-640", -1, 1, 0, 0, }, + { 828, 640, 1, "_root-641", -1, 1, 0, 0, }, + { 828, 641, 1, "_root-642", -1, 1, 0, 0, }, + { 828, 642, 1, "_root-643", -1, 1, 0, 0, }, + { 828, 643, 1, "_root-644", -1, 1, 0, 0, }, + { 828, 644, 1, "_root-645", -1, 1, 0, 0, }, + { 828, 645, 1, "_root-646", -1, 1, 0, 0, }, + { 828, 646, 1, "_root-647", -1, 1, 0, 0, }, + { 828, 647, 1, "_root-648", -1, 1, 0, 0, }, + { 828, 648, 1, "_root-649", -1, 1, 0, 0, }, + { 828, 649, 1, "_root-650", -1, 1, 0, 0, }, + { 828, 650, 1, "_root-651", -1, 1, 0, 0, }, + { 828, 651, 1, "_root-652", -1, 1, 0, 0, }, + { 828, 652, 1, "_root-653", -1, 1, 0, 0, }, + { 828, 653, 1, "_root-654", -1, 1, 0, 0, }, + { 828, 654, 1, "_root-655", -1, 1, 0, 0, }, + { 828, 655, 1, "_root-656", -1, 1, 0, 0, }, + { 828, 656, 1, "_root-657", -1, 1, 0, 0, }, + { 828, 657, 1, "_root-658", -1, 1, 0, 0, }, + { 828, 658, 1, "_root-659", -1, 1, 0, 0, }, + { 828, 659, 1, "_root-660", -1, 1, 0, 0, }, + { 828, 660, 1, "_root-661", -1, 1, 0, 0, }, + { 828, 661, 1, "_root-662", -1, 1, 0, 0, }, + { 828, 662, 1, "_root-663", -1, 1, 0, 0, }, + { 828, 663, 1, "_root-664", -1, 1, 0, 0, }, + { 828, 664, 1, "_root-665", -1, 1, 0, 0, }, + { 828, 665, 1, "_root-666", -1, 1, 0, 0, }, + { 828, 666, 1, "_root-667", -1, 1, 0, 0, }, + { 828, 667, 1, "_root-668", -1, 1, 0, 0, }, + { 828, 668, 1, "_root-669", -1, 1, 0, 0, }, + { 828, 669, 1, "_root-670", -1, 1, 0, 0, }, + { 828, 670, 1, "_root-671", -1, 1, 0, 0, }, + { 828, 671, 1, "_root-672", -1, 1, 0, 0, }, + { 828, 672, 1, "_root-673", -1, 1, 0, 0, }, + { 828, 673, 1, "_root-674", -1, 1, 0, 0, }, + { 828, 674, 1, "_root-675", -1, 1, 0, 0, }, + { 828, 675, 1, "_root-676", -1, 1, 0, 0, }, + { 828, 676, 1, "_root-677", -1, 1, 0, 0, }, + { 828, 677, 1, "_root-678", -1, 1, 0, 0, }, + { 828, 678, 1, "_root-679", -1, 1, 0, 0, }, + { 828, 679, 1, "_root-680", -1, 1, 0, 0, }, + { 828, 680, 1, "_root-681", -1, 1, 0, 0, }, + { 828, 681, 1, "_root-682", -1, 1, 0, 0, }, + { 828, 682, 1, "_root-683", -1, 1, 0, 0, }, + { 828, 683, 1, "_root-684", -1, 1, 0, 0, }, + { 828, 684, 1, "_root-685", -1, 1, 0, 0, }, + { 828, 685, 1, "_root-686", -1, 1, 0, 0, }, + { 828, 686, 1, "_root-687", -1, 1, 0, 0, }, + { 828, 687, 1, "_root-688", -1, 1, 0, 0, }, + { 828, 688, 1, "_root-689", -1, 1, 0, 0, }, + { 828, 689, 1, "_root-690", -1, 1, 0, 0, }, + { 828, 690, 1, "_root-691", -1, 1, 0, 0, }, + { 828, 691, 1, "_root-692", -1, 1, 0, 0, }, + { 828, 692, 1, "_root-693", -1, 1, 0, 0, }, + { 828, 693, 1, "_root-694", -1, 1, 0, 0, }, + { 828, 694, 1, "_root-695", -1, 1, 0, 0, }, + { 828, 695, 1, "_root-696", -1, 1, 0, 0, }, + { 828, 696, 1, "_root-697", -1, 1, 0, 0, }, + { 828, 697, 1, "_root-698", -1, 1, 0, 0, }, + { 828, 698, 1, "_root-699", -1, 1, 0, 0, }, + { 828, 699, 1, "_root-700", -1, 1, 0, 0, }, + { 828, 700, 1, "_root-701", -1, 1, 0, 0, }, + { 828, 701, 1, "_root-702", -1, 1, 0, 0, }, + { 828, 702, 1, "_root-703", -1, 1, 0, 0, }, + { 828, 703, 1, "_root-704", -1, 1, 0, 0, }, + { 828, 704, 1, "_root-705", -1, 1, 0, 0, }, + { 828, 705, 1, "_root-706", -1, 1, 0, 0, }, + { 828, 706, 1, "_root-707", -1, 1, 0, 0, }, + { 828, 707, 1, "_root-708", -1, 1, 0, 0, }, + { 828, 708, 1, "_root-709", -1, 1, 0, 0, }, + { 828, 709, 1, "_root-710", -1, 1, 0, 0, }, + { 828, 710, 1, "_root-711", -1, 1, 0, 0, }, + { 828, 711, 1, "_root-712", -1, 1, 0, 0, }, + { 828, 712, 1, "_root-713", -1, 1, 0, 0, }, + { 828, 713, 1, "_root-714", -1, 1, 0, 0, }, + { 828, 714, 1, "_root-715", -1, 1, 0, 0, }, + { 828, 715, 1, "_root-716", -1, 1, 0, 0, }, + { 828, 716, 1, "_root-717", -1, 1, 0, 0, }, + { 828, 717, 1, "_root-718", -1, 1, 0, 0, }, + { 828, 718, 1, "_root-719", -1, 1, 0, 0, }, + { 828, 719, 1, "_root-720", -1, 1, 0, 0, }, + { 828, 720, 1, "_root-721", -1, 1, 0, 0, }, + { 828, 721, 1, "_root-722", -1, 1, 0, 0, }, + { 828, 722, 1, "_root-723", -1, 1, 0, 0, }, + { 828, 723, 1, "_root-724", -1, 1, 0, 0, }, + { 828, 724, 1, "_root-725", -1, 1, 0, 0, }, + { 828, 725, 1, "_root-726", -1, 1, 0, 0, }, + { 828, 726, 1, "_root-727", -1, 1, 0, 0, }, + { 828, 727, 1, "_root-728", -1, 1, 0, 0, }, + { 828, 728, 1, "_root-729", -1, 1, 0, 0, }, + { 828, 729, 1, "_root-730", -1, 1, 0, 0, }, + { 828, 730, 1, "_root-731", -1, 1, 0, 0, }, + { 828, 731, 1, "_root-732", -1, 1, 0, 0, }, + { 828, 732, 1, "_root-733", -1, 1, 0, 0, }, + { 828, 733, 1, "_root-734", -1, 1, 0, 0, }, + { 828, 734, 1, "_root-735", -1, 1, 0, 0, }, + { 828, 735, 1, "_root-736", -1, 1, 0, 0, }, + { 828, 736, 1, "_root-737", -1, 1, 0, 0, }, + { 828, 737, 1, "_root-738", -1, 1, 0, 0, }, + { 828, 738, 1, "_root-739", -1, 1, 0, 0, }, + { 828, 739, 1, "_root-740", -1, 1, 0, 0, }, + { 828, 740, 1, "_root-741", -1, 1, 0, 0, }, + { 828, 741, 1, "_root-742", -1, 1, 0, 0, }, + { 828, 742, 1, "_root-743", -1, 1, 0, 0, }, + { 828, 743, 1, "_root-744", -1, 1, 0, 0, }, + { 828, 744, 1, "_root-745", -1, 1, 0, 0, }, + { 828, 745, 1, "_root-746", -1, 1, 0, 0, }, + { 828, 746, 1, "_root-747", -1, 1, 0, 0, }, + { 828, 747, 1, "_root-748", -1, 1, 0, 0, }, + { 828, 748, 1, "_root-749", -1, 1, 0, 0, }, + { 828, 749, 1, "_root-750", -1, 1, 0, 0, }, + { 828, 750, 1, "_root-751", -1, 1, 0, 0, }, + { 828, 751, 1, "_root-752", -1, 1, 0, 0, }, + { 828, 752, 1, "_root-753", -1, 1, 0, 0, }, + { 828, 753, 1, "_root-754", -1, 1, 0, 0, }, + { 828, 754, 1, "_root-755", -1, 1, 0, 0, }, + { 828, 755, 1, "_root-756", -1, 1, 0, 0, }, + { 828, 756, 1, "_root-757", -1, 1, 0, 0, }, + { 828, 757, 1, "_root-758", -1, 1, 0, 0, }, + { 828, 758, 1, "_root-759", -1, 1, 0, 0, }, + { 828, 759, 1, "_root-760", -1, 1, 0, 0, }, + { 828, 760, 1, "_root-761", -1, 1, 0, 0, }, + { 828, 761, 1, "_root-762", -1, 1, 0, 0, }, + { 828, 762, 1, "_root-763", -1, 1, 0, 0, }, + { 828, 763, 1, "_root-764", -1, 1, 0, 0, }, + { 828, 764, 1, "_root-765", -1, 1, 0, 0, }, + { 828, 765, 1, "_root-766", -1, 1, 0, 0, }, + { 828, 766, 1, "_root-767", -1, 1, 0, 0, }, + { 828, 767, 1, "_root-768", -1, 1, 0, 0, }, + { 828, 768, 1, "_root-769", -1, 1, 0, 0, }, + { 828, 769, 1, "_root-770", -1, 1, 0, 0, }, + { 828, 770, 1, "_root-771", -1, 1, 0, 0, }, + { 828, 771, 1, "_root-772", -1, 1, 0, 0, }, + { 828, 772, 1, "_root-773", -1, 1, 0, 0, }, + { 828, 773, 1, "_root-774", -1, 1, 0, 0, }, + { 828, 774, 1, "_root-775", -1, 1, 0, 0, }, + { 828, 775, 1, "_root-776", -1, 1, 0, 0, }, + { 828, 776, 1, "_root-777", -1, 1, 0, 0, }, + { 828, 777, 1, "_root-778", -1, 1, 0, 0, }, + { 828, 778, 1, "_root-779", -1, 1, 0, 0, }, + { 828, 779, 1, "_root-780", -1, 1, 0, 0, }, + { 828, 780, 1, "_root-781", -1, 1, 0, 0, }, + { 828, 781, 1, "_root-782", -1, 1, 0, 0, }, + { 828, 782, 1, "_root-783", -1, 1, 0, 0, }, + { 828, 783, 1, "_root-784", -1, 1, 0, 0, }, + { 828, 784, 1, "_root-785", -1, 1, 0, 0, }, + { 828, 785, 1, "_root-786", -1, 1, 0, 0, }, + { 828, 786, 1, "_root-787", -1, 1, 0, 0, }, + { 828, 787, 1, "_root-788", -1, 1, 0, 0, }, + { 828, 788, 1, "_root-789", -1, 1, 0, 0, }, + { 828, 789, 1, "_root-790", -1, 1, 0, 0, }, + { 828, 790, 1, "_root-791", -1, 1, 0, 0, }, + { 828, 791, 1, "_root-792", -1, 1, 0, 0, }, + { 828, 792, 1, "_root-793", -1, 1, 0, 0, }, + { 828, 793, 1, "_root-794", -1, 1, 0, 0, }, + { 828, 794, 1, "_root-795", -1, 1, 0, 0, }, + { 828, 795, 1, "_root-796", -1, 1, 0, 0, }, + { 828, 796, 1, "_root-797", -1, 1, 0, 0, }, + { 828, 797, 1, "_root-798", -1, 1, 0, 0, }, + { 828, 798, 1, "_root-799", -1, 1, 0, 0, }, + { 828, 799, 1, "_root-800", -1, 1, 0, 0, }, + { 828, 800, 1, "_root-801", -1, 1, 0, 0, }, + { 828, 801, 1, "_root-802", -1, 1, 0, 0, }, + { 828, 802, 1, "_root-803", -1, 1, 0, 0, }, + { 828, 803, 1, "_root-804", -1, 1, 0, 0, }, + { 828, 804, 1, "_root-805", -1, 1, 0, 0, }, + { 828, 805, 1, "_root-806", -1, 1, 0, 0, }, + { 828, 806, 1, "_root-807", -1, 1, 0, 0, }, + { 828, 807, 1, "_root-808", -1, 1, 0, 0, }, + { 828, 808, 1, "_root-809", -1, 1, 0, 0, }, + { 828, 809, 1, "_root-810", -1, 1, 0, 0, }, + { 828, 810, 1, "_root-811", -1, 1, 0, 0, }, + { 828, 811, 1, "_root-812", -1, 1, 0, 0, }, + { 828, 812, 1, "_root-813", -1, 1, 0, 0, }, + { 828, 813, 1, "_root-814", -1, 1, 0, 0, }, + { 828, 814, 1, "_root-815", -1, 1, 0, 0, }, + { 828, 815, 1, "_root-816", -1, 1, 0, 0, }, + { 828, 816, 1, "_root-817", -1, 1, 0, 0, }, + { 828, 817, 1, "_root-818", -1, 1, 0, 0, }, + { 828, 818, 1, "_root-819", -1, 1, 0, 0, }, + { 828, 819, 1, "_root-820", -1, 1, 0, 0, }, + { 828, 820, 1, "_root-821", -1, 1, 0, 0, }, + { 828, 821, 1, "_root-822", -1, 1, 0, 0, }, + { 828, 822, 1, "_root-823", -1, 1, 0, 0, }, + { 828, 823, 1, "_root-824", -1, 1, 0, 0, }, + { 828, 824, 1, "_root-825", -1, 1, 0, 0, }, + { 828, 825, 1, "_root-826", -1, 1, 0, 0, }, + { 828, 826, 1, "_root-827", -1, 1, 0, 0, }, + { 828, 827, 1, "_root-828", -1, 1, 0, 0, } +}; + +static PatConsInfo parser_patReplInfo[] = { + { 0, 0 }, +}; + +static PatConsNode parser_patReplNodes[] = { + { 811, 0, -1, -1, 0, 0, 0, -1, -1, 0 }, +}; + +static FunctionInfo parser_functionInfo[] = { + +}; + +static RegionInfo parser_regionInfo[] = { + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 140 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 141 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 142 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 143 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 144 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 0 }, + { -1, -1, 145 } +}; + +static GenericInfo parser_genericInfo[] = { + { 0, 0, 0, 0, 0, 0 }, + { 19, 2, 0, 0, 811, 0 }, + { 16, 2, 0, 0, 827, -1 }, +}; + +static const char *parser_litdata[] = { + "r", +}; + +static long parser_litlen[] = { + 1, }; + +static Head *parser_literals[] = { + 0, }; + +static int startStates[] = { + 0, 1, }; + +static int eofLelIds[] = { + 422, 546, }; + +static int parserLelIds[] = { + 697, 811, }; + +static CaptureAttr captureAttr[] = { +}; + +RuntimeData colm_object = +{ + parser_lelInfo, + 829, + + parser_prodInfo, + 1176, + + parser_regionInfo, + 25, + + parser_rootCode, + 75, + 0, + + parser_frameInfo, + 1, + + parser_functionInfo, + 0, + + parser_patReplInfo, + 1, + + parser_patReplNodes, + 1, + + parser_genericInfo, + 3, + 2, + + parser_litdata, + parser_litlen, + parser_literals, + 1, + + captureAttr, + 0, + + &fsmTables_start, + &pid_0_pdaTables, + startStates, eofLelIds, parserLelIds, 2, + + 3, + + 696, + 4, + 5, + 696, + 0, + 695, + &fsmExecute, + &sendNamedLangEl, + &initBindings, + &popBinding, +}; + diff --git a/src/parsedata.h b/src/parsedata.h new file mode 100644 index 0000000..cbbe5b9 --- /dev/null +++ b/src/parsedata.h @@ -0,0 +1,1022 @@ +/* + * Copyright 2001-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _PARSEDATA_H +#define _PARSEDATA_H + +#include <iostream> +#include <limits.h> +#include "bstset.h" +#include "global.h" +#include "avlmap.h" +#include "avlset.h" +#include "bstmap.h" +#include "vector.h" +#include "dlist.h" +#include "dlistmel.h" +#include "fsmgraph.h" +#include "compare.h" +#include "vector.h" +#include "keyops.h" +#include "parsetree.h" +#include "cstring.h" +#include "pdagraph.h" +#include "compare.h" +#include "pdarun.h" +#include "bytecode.h" +#include "program.h" + +using std::ostream; + +struct exit_object { }; +extern exit_object endp; +void operator<<( std::ostream &out, exit_object & ); + +/* Forwards. */ +struct RedFsm; +struct LangEl; +struct Compiler; +struct PdaCodeGen; +struct FsmCodeGen; + +#define SHIFT_CODE 0x1 +#define REDUCE_CODE 0x2 +#define SHIFT_REDUCE_CODE 0x3 + +/* This is used for tracking the current stack of include file/machine pairs. It is + * is used to detect and recursive include structure. */ +struct IncludeStackItem +{ + IncludeStackItem( const char *fileName ) + : fileName(fileName) {} + + const char *fileName; +}; + +typedef Vector<IncludeStackItem> IncludeStack; +typedef Vector<const char *> ArgsVector; + +extern ArgsVector includePaths; + +inline long makeReduceCode( long reduction, bool isShiftReduce ) +{ + return ( isShiftReduce ? SHIFT_REDUCE_CODE : REDUCE_CODE ) | + ( reduction << 2 ); +} + +struct ProdEl; +struct ProdElList; +struct PdaLiteral; +struct Production; + +/* A pointer to this is in PdaRun, but it's specification is not known by the + * runtime code. The runtime functions that access it are defined in + * ctinput.cpp and stubbed in fsmcodegen.cpp */ +struct Bindings + : public Vector<ParseTree*> +{}; + +struct DefListEl { Production *prev, *next; }; +struct LelDefListEl { Production *prev, *next; }; +typedef Vector< LangEl* > LangElVect; +typedef Vector< ProdEl* > FactorVect; + +typedef AvlMap<String, long, CmpStr> StringMap; +typedef AvlMapEl<String, long> StringMapEl; + +enum PredType { + PredLeft, + PredRight, + PredNonassoc, + PredNone +}; + +struct PredDecl +{ + PredDecl( TypeRef *typeRef, long predValue ) + : typeRef(typeRef), predValue(predValue) + {} + + TypeRef *typeRef; + PredType predType; + long predValue; + + PredDecl *prev, *next; +}; + +typedef DList<PredDecl> PredDeclList; + +/* Graph dictionary. */ +struct Production +: + public DefListEl, public LelDefListEl +{ + Production() + : + loc(loc), prodName(0), prodElList(0), prodCommit(false), redBlock(0), + prodId(0), prodNum(0), fsm(0), fsmLength(0), uniqueEmptyLeader(0), + isLeftRec(false), localFrame(0), lhsField(0), predOf(0) {} + + static Production* cons( const InputLoc &loc, LangEl *prodName, ProdElList *prodElList, + String name, bool prodCommit, CodeBlock *redBlock, int prodId, int prodNum ) + { + Production *p = new Production; + p->loc = loc; + p->prodName = prodName; + p->name = name; + p->prodElList = prodElList; + p->prodCommit = prodCommit; + p->redBlock = redBlock; + p->prodId = prodId; + p->prodNum = prodNum; + return p; + } + + InputLoc loc; + LangEl *prodName; + ProdElList *prodElList; + String name; + bool prodCommit; + + CodeBlock *redBlock; + + int prodId; + int prodNum; + + PdaGraph *fsm; + int fsmLength; + String data; + LongSet reducesTo; + + LangEl *uniqueEmptyLeader; + + ProdIdSet nonTermFirstSet; + AlphSet firstSet; + bool isLeftRec; + + ObjectDef *localFrame; + ObjectField *lhsField; + + LangEl *predOf; + + UnsignedCharVect copy; +}; + +struct CmpDefById +{ + static int compare( Production *d1, Production *d2 ) + { + if ( d1->prodId < d2->prodId ) + return -1; + else if ( d1->prodId > d2->prodId ) + return 1; + else + return 0; + } +}; + + +/* Map dotItems to productions. */ +typedef BstMap< int, Production*, CmpOrd<int> > DotItemIndex; +typedef BstMapEl< int, Production*> DotItemIndexEl; + +struct DefList +: + public DListMel<Production, DefListEl> +{}; + +/* A vector of production vectors. Each non terminal can have many productions. */ +struct LelDefList +: + public DListMel<Production, LelDefListEl> +{}; + +/* A set of machines made during a closure round. */ +typedef Vector< PdaGraph* > Machines; + +/* List of language elements. */ +typedef DList<LangEl> LelList; + +typedef Vector< TokenInstance* > TokenInstanceVect; + +struct UniqueType; + +typedef Vector<LangEl*> LangElVect; +typedef BstSet<LangEl*> LangElSet; + +/* A language element class. Can be a nonTerm or a term. */ +struct LangEl : public DListEl<LangEl> +{ + enum Type { Unknown, Term, NonTerm }; + + LangEl( Namespace *nspace, const String &name, Type type ); + ~LangEl(); + + /* The region the language element was defined in. */ + Namespace *nspace; + + String name; + String lit; + + String fullName; + String fullLit; + + /* For referencing the type. */ + String refName; + + /* For declaring things inside the type. */ + String declName; + + String xmlTag; + + Type type; + long id; + bool isContext; + String displayString; + long numAppearances; + bool commit; + bool isIgnore; + bool reduceFirst; + bool isLiteral; + bool isRepeat; + bool isList; + bool isOpt; + bool parseStop; + bool isEOF; + + LangEl *repeatOf; + + /* Productions from the language element if it is a non-terminal. */ + LelDefList defList; + + TokenDef *tokenDef; + Production *rootDef; + LangEl *termDup; + LangEl *eofLel; + + PdaGraph *pdaGraph; + PdaTables *pdaTables; + + PdaState *startState; + + CodeBlock *transBlock; + + ObjectDef *objectDef; + + long thisSize; + long ofiOffset; + + GenericType *generic; + + long parserId; + + PredType predType; + long predValue; + + Context *contextDef; + Context *contextIn; + bool noPreIgnore; + bool noPostIgnore; + bool isZero; + RegionSet *regionSet; +}; + +struct ProdEl +{ + /* Language elements a factor node can be. */ + enum Type { + LiteralType, + ReferenceType + }; + + /* Construct with a reference to a var def. */ + ProdEl( Type type, const InputLoc &loc, ObjectField *captureField, + bool commit, TypeRef *typeRef, int priorVal ) + : + type(type), + production(0), + captureField(captureField), + rhsElField(0), + commit(commit), + typeRef(typeRef), + langEl(0), + priorVal(priorVal) + {} + + ProdEl( const InputLoc &loc, TypeRef *typeRef ) + : + type(ReferenceType), + production(0), + captureField(0), + rhsElField(0), + commit(false), + typeRef(typeRef), + langEl(0), + priorVal(0) + {} + + Type type; + Production *production; + int pos; + ObjectField *captureField; + ObjectField *rhsElField; + bool commit; + TypeRef *typeRef; + LangEl *langEl; + int priorVal; + + ProdEl *prev, *next; +}; + +struct ProdElList : public DList<ProdEl> +{ + PdaGraph *walk( Compiler *pd, Production *prod ); +}; + +/* This should be renamed. It is a literal string in a type reference. */ +struct PdaLiteral +{ + PdaLiteral( const InputLoc &loc, const String &data ) + : loc(loc), data(data), value(0) { } + + InputLoc loc; + String data; + long value; +}; + +/* Nodes in the tree that use this action. */ +typedef Vector<NameInst*> ActionRefs; + +/* Element in list of actions. Contains the string for the code to exectute. */ +struct Action +: + public DListEl<Action>, + public AvlTreeEl<Action> +{ +public: + + static Action *cons( const InputLoc &loc, const String &name, InlineList *inlineList ) + { + Action *a = new Action; + a->loc = (loc); + a->name = (name); + a->markType = (MarkNone); + a->objField = (0); + a->markId = (-1); + a->inlineList = (inlineList); + a->actionId = (-1); + a->numTransRefs = (0); + a->numToStateRefs = (0); + a->numFromStateRefs = (0); + a->numEofRefs = (0); + a->numCondRefs = (0); + a->anyCall = (false); + a->isLmAction = (false); + return a; + } + + static Action *cons( MarkType markType, long markId ) + { + Action *a = new Action; + a->name = ("mark"); + a->markType = (markType); + a->objField = (0); + a->markId = (markId); + a->inlineList = (InlineList::cons()); + a->actionId = (-1); + a->numTransRefs = (0); + a->numToStateRefs = (0); + a->numFromStateRefs = (0); + a->numEofRefs = (0); + a->numCondRefs = (0); + a->anyCall = (false); + a->isLmAction = (false); + return a; + } + + /* Key for action dictionary. */ + const String &getKey() const { return name; } + + /* Data collected during parse. */ + InputLoc loc; + String name; + + MarkType markType; + ObjectField *objField; + long markId; + + InlineList *inlineList; + int actionId; + + void actionName( ostream &out ) + { + if ( name != 0 ) + out << name; + else + out << loc.line << ":" << loc.col; + } + + /* Places in the input text that reference the action. */ + ActionRefs actionRefs; + + /* Number of references in the final machine. */ + bool numRefs() + { return numTransRefs + numToStateRefs + numFromStateRefs + numEofRefs; } + int numTransRefs; + int numToStateRefs; + int numFromStateRefs; + int numEofRefs; + int numCondRefs; + bool anyCall; + + bool isLmAction; +}; + +/* A list of actions. */ +typedef DList<Action> ActionList; + +struct VarDef; +struct LexJoin; +struct LexTerm; +struct FactorAug; +struct FactorLabel; +struct FactorRep; +struct FactorNeg; +struct Factor; +struct Literal; +struct Range; +struct RegExpr; +struct ReItem; +struct ReOrBlock; +struct ReOrItem; +struct TokenRegion; + +/* Tree of instantiated names. */ +typedef BstMapEl<String, NameInst*> NameMapEl; +typedef BstMap<String, NameInst*, CmpStr> NameMap; +typedef Vector<NameInst*> NameVect; +typedef BstSet<NameInst*> NameSet; + +/* Node in the tree of instantiated names. */ +struct NameInst +{ + NameInst( int id ) + : id(id) {} + + int id; + + /* Pointers for the name search queue. */ + NameInst *prev, *next; +}; + +typedef DList<NameInst> NameInstList; + +/* Stack frame used in walking the name tree. */ +struct NameFrame +{ + NameInst *prevNameInst; + int prevNameChild; + NameInst *prevLocalScope; +}; + +/* Class to collect information about the machine during the + * parse of input. */ +struct Compiler +{ + /* Create a new parse data object. This is done at the beginning of every + * fsm specification. */ + Compiler(); + ~Compiler(); + + /* + * Setting up the graph dict. + */ + + void compileLiteralTokens(); + void initEmptyScanners(); + void initEmptyScanner( RegionSet *regionSet, TokenRegion *reg ); + void initUniqueTypes(); + + /* Initialize a graph dict with the basic fsms. */ + void initGraphDict(); + void createBuiltin( const char *name, BuiltinMachine builtin ); + + /* Make a name id in the current name instantiation scope if it is not + * already there. */ + NameInst *makeJoinNameTree( LexJoin *join ); + NameInst *makeNameTree(); + NameInst **makeNameIndex(); + + void printNameTree( NameInst *rootName ); + void printNameIndex( NameInst **nameIndex ); + + /* Resove name references in action code and epsilon transitions. */ + NameSet resolvePart( NameInst *refFrom, const char *data, bool recLabelsOnly ); + void resolveFrom( NameSet &result, NameInst *refFrom, + const NameRef &nameRef, int namePos ); + + /* Set the alphabet type. If type types are not valid returns false. */ + bool setAlphType( char *s1, char *s2 ); + bool setAlphType( char *s1 ); + + /* Unique actions. */ + void removeDups( ActionTable &actionTable ); + void removeActionDups( FsmGraph *graph ); + + /* Dumping the name instantiation tree. */ + void printNameInst( NameInst *nameInst, int level ); + + /* Make the graph from a graph dict node. Does minimization. */ + void finishGraphBuild( FsmGraph *graph ); + FsmGraph *makeAllRegions(); + FsmGraph *makeScanner(); + + void analyzeAction( Action *action, InlineList *inlineList ); + void analyzeGraph( FsmGraph *graph ); + void resolvePrecedence( PdaGraph *pdaGraph ); + LangEl *predOf( PdaTrans *trans, long action ); + bool precedenceSwap( long action1, long action2, LangEl *l1, LangEl *l2 ); + bool precedenceRemoveBoth( LangEl *l1, LangEl *l2 ); + + void initLocalFrame( ObjectDef *localFrame ); + void initAllFrameObjects(); + + void initKeyOps(); + + /* + * Data collected during the parse. + */ + + /* List of actions. Will be pasted into a switch statement. */ + ActionList actionList; + + /* The id of the next priority name and label. */ + int nextPriorKey, nextNameId; + + /* Alphabet type. */ + HostType *userAlphType; + bool alphTypeSet; + + /* Element type and get key expression. */ + InlineList *getKeyExpr; + InlineList *accessExpr; + InlineList *curStateExpr; + + /* The alphabet range. */ + char *lowerNum, *upperNum; + Key lowKey, highKey; + InputLoc rangeLowLoc, rangeHighLoc; + + /* Number of errors encountered parsing the fsm spec. */ + int errorCount; + + /* Counting the action and priority ordering. */ + int curActionOrd; + int curPriorOrd; + + /* Root of the name tree. */ + NameInst *curNameInst; + int curNameChild; + NameInstList nameInstList; + + /* The place where resolved epsilon transitions go. These cannot go into + * the parse tree because a single epsilon op can resolve more than once + * to different nameInsts if the machine it's in is used more than once. */ + NameVect epsilonResolvedLinks; + int nextEpsilonResolvedLink; + + /* Root of the name tree used for doing local name searches. */ + NameInst *localNameScope; + + void setLmInRetLoc( InlineList *inlineList ); + void initLongestMatchData(); + + /* Counter for assigning ids to longest match items. */ + int nextTokenId; + + RegionImplList regionImplList; + RegionList regionList; + RegionSetList regionSetList; + + NamespaceList namespaceList; + + Action *newAction( const String &name, InlineList *inlineList ); + + Action *setTokStart; + int setTokStartOrd; + + Action *initActId; + int initActIdOrd; + + Action *setTokEnd; + int setTokEndOrd; + + CodeBlock *rootCodeBlock; + + void beginProcessing() + { + ::keyOps = &thisKeyOps; + } + + KeyOps thisKeyOps; + + UniqueType *mainReturnUT; + + /* CONTEXT FREE */ + ProdElList *makeProdElList( LangEl *langEl ); + void wrapNonTerminals(); + void makeDefinitionNames(); + void noUndefindLangEls(); + void declareBaseLangEls(); + void makeLangElIds(); + void makeLangElNames(); + void makeTerminalWrappers(); + void makeEofElements(); + void makeIgnoreCollectors(); + void resolvePrecedence(); + + void declarePass(); + void resolvePass(); + + /* Parser generation. */ + void advanceReductions( PdaGraph *pdaGraph ); + void sortActions( PdaGraph *pdaGraph ); + void addDupTerms( PdaGraph *pdaGraph ); + void linkExpansions( PdaGraph *pdaGraph ); + void lalr1FollowEpsilonOp( PdaGraph *pdaGraph ); + + void transferCommits( PdaGraph *pdaGraph, PdaTrans *trans, PdaState *state, long prodId ); + + void lalr1AddFollow2( PdaGraph *pdaGraph, PdaTrans *trans, FollowToAdd &followKeys ); + void lalr1AddFollow1( PdaGraph *pdaGraph, PdaState *state ); + + void lalr1AddFollow2( PdaGraph *pdaGraph, PdaTrans *trans, long followKey, long prior ); + void lalr1AddFollow1( PdaGraph *pdaGraph, PdaTrans *trans ); + + void lalr1AddFollowSets( PdaGraph *pdaGraph, LangElSet &parserEls ); + + void lr0BringInItem( PdaGraph *pdaGraph, PdaState *dest, PdaState *prodState, + PdaTrans *expandFrom, Production *prod ); + void lr0InvokeClosure( PdaGraph *pdaGraph, PdaState *state ); + void lr0CloseAllStates( PdaGraph *pdaGraph ); + + void lalr1GenerateParser( PdaGraph *pdaGraph, LangElSet &parserEls ); + + void reduceActions( PdaGraph *pdaGraph ); + + bool makeNonTermFirstSetProd( Production *prod, PdaState *state ); + void makeNonTermFirstSets(); + + bool makeFirstSetProd( Production *prod, PdaState *state ); + void makeFirstSets(); + + int findIndexOff( PdaTables *pdaTables, PdaGraph *pdaGraph, PdaState *state, int &currLen ); + void trySetTime( PdaTrans *trans, long code, long &time ); + void addRegion( PdaState *tabState, PdaTrans *pdaTrans, long pdaKey, + bool noPreIgnore, bool noPostIgnore ); + PdaState *followProd( PdaState *tabState, PdaState *prodState ); + void findFollow( AlphSet &result, PdaState *overTab, + PdaState *overSrc, Production *parentDef ); + void pdaActionOrder( PdaGraph *pdaGraph, LangElSet &parserEls ); + void pdaOrderFollow( LangEl *rootEl, PdaState *tabState, + PdaTrans *tabTrans, PdaTrans *srcTrans, + Production *parentDef, Production *definition, long &time ); + void pdaOrderProd( LangEl *rootEl, PdaState *tabState, + PdaState *srcState, Production *parentDef, long &time ); + void analyzeMachine( PdaGraph *pdaGraph, LangElSet &parserEls ); + + void makeProdFsms(); + void insertUniqueEmptyProductions(); + void printNonTermFirstSets(); + void printFirstSets(); + + LangEl *makeRepeatProd( const InputLoc &loc, Namespace *nspace, + const String &repeatName, UniqueType *ut ); + LangEl *makeListProd( const InputLoc &loc, Namespace *nspace, + const String &listName, UniqueType *ut ); + LangEl *makeOptProd( const InputLoc &loc, Namespace *nspace, + const String &optName, UniqueType *ut ); + void resolveProdEl( ProdEl *prodEl ); + void resolveProductionEls(); + + void addMatchText( ObjectDef *frame, LangEl *lel ); + void addMatchLength( ObjectDef *frame, LangEl *lel ); + void addInput( ObjectDef *frame ); + void addCtx( ObjectDef *frame ); + void addTransTokVar( ObjectDef *frame, LangEl *lel ); + void addProdRHSVars( ObjectDef *localFrame, ProdElList *prodElList ); + void addProdRedObjectVar( ObjectDef *localFrame, LangEl *langEl ); + void addProdObjects(); + + void addProdRHSLoads( Production *prod, CodeVect &code, long &insertPos ); + void addProdLHSLoad( Production *prod, CodeVect &code, long &insertPos ); + void addPushBackLHS( Production *prod, CodeVect &code, long &insertPos ); + + void prepGrammar(); + PdaRun *parsePattern( Program *prg, Tree **sp, const InputLoc &loc, + int parserId, StreamImpl *sourceStream ); + void parsePatterns(); + + void collectParserEls( LangElSet &parserEls ); + void makeParser( LangElSet &parserEls ); + PdaGraph *makePdaGraph( BstSet<LangEl*> &parserEls ); + PdaTables *makePdaTables( PdaGraph *pdaGraph ); + + void fillInPatterns( Program *prg ); + void makeRuntimeData(); + + /* Generate and write out the fsm. */ + void generateGraphviz(); + + void verifyParseStopGrammar( LangEl *langEl, PdaGraph *pdaGraph ); + void computeAdvanceReductions( LangEl *langEl, PdaGraph *pdaGraph ); + + void initFieldInstructions( ObjectField *el ); + void initLocalInstructions( ObjectField *el ); + void initLocalRefInstructions( ObjectField *el ); + + void initMapFunctions( GenericType *gen ); + void initListField( GenericType *gen, const char *name, int offset ); + void initListFields( GenericType *gen ); + void initListFunctions( GenericType *gen ); + void initVectorFunctions( GenericType *gen ); + void initParserField( GenericType *gen, const char *name, int offset, TypeRef *typeRef ); + void initParserFunctions( GenericType *gen ); + void initParserFields( GenericType *gen ); + void initCtxField( GenericType *gen ); + + void addStdin(); + void addStdout(); + void addStderr(); + void addArgv(); + void addError(); + int argvOffset(); + void initGlobalFunctions(); + void makeDefaultIterators(); + void addLengthField( ObjectDef *objDef, Code getLength ); + ObjectDef *findObject( const String &name ); + void initAllLanguageObjects(); + void resolveListElementOf( ObjectDef *container, ObjectDef *obj, ElementOf *elof ); + void resolveMapElementOf( ObjectDef *container, ObjectDef *obj, ElementOf *elof ); + void resolveElementOf( ObjectDef *obj ); + void makeFuncVisible( Function *func, bool isUserIter ); + void initUserFunctions( Function *func, bool isUserIter ); + + void declareFunction( Function *func ); + void declareReductionCode( Production *prod ); + void declareTranslateBlock( LangEl *langEl ); + void declarePreEof( TokenRegion *region ); + void declareRootBlock(); + void declareByteCode(); + + void resolveFunction( Function *func ); + void resolvePreEof( TokenRegion *region ); + void resolveRootBlock(); + void resolveTranslateBlock( LangEl *langEl ); + void resolveReductionCode( Production *prod ); + void resolveParseTree(); + void resolveGenericTypes(); + + void compileFunction( Function *func, CodeVect &code ); + void compileFunction( Function *func ); + void compileUserIter( Function *func, CodeVect &code ); + void compileUserIter( Function *func ); + void compilePreEof( TokenRegion *region ); + void compileRootBlock(); + void compileTranslateBlock( LangEl *langEl ); + void findLocals( ObjectDef *localFrame, CodeBlock *block ); + void makeProdCopies( Production *prod ); + void compileReductionCode( Production *prod ); + void removeNonUnparsableRepls(); + void compileByteCode(); + + void resolveUses(); + void generateOutput( long activeRealm ); + void compile(); + + void openNameSpace( ostream &out, Namespace *nspace ); + void closeNameSpace( ostream &out, Namespace *nspace ); + void refNameSpace( LangEl *lel, Namespace *nspace ); + void generateExports(); + void generateExportsImpl(); + + LocalInfo *makeLocalInfo( Locals &locals ); + + /* + * Graphviz Generation + */ + void writeTransList( PdaState *state ); + void writeDotFile( PdaGraph *graph ); + void writeDotFile( ); + + + /* + * Data collected during the parse. + */ + + LelList langEls; + DefList prodList; + + /* Dumping. */ + DotItemIndex dotItemIndex; + + PredDeclList predDeclList; + + /* The name of the file the fsm is from, and the spec name. */ + // EXISTS IN RL: char *fileName; + String parserName; + // EXISTS IN RL: InputLoc sectionLoc; + + /* How to access the instance data. */ + String access; + + /* The name of the token structure. */ + String tokenStruct; + + GenericType *anyList; + GenericType *anyMap; + GenericType *anyVector; + + LangEl *ptrLangEl; + LangEl *voidLangEl; + LangEl *boolLangEl; + LangEl *intLangEl; + LangEl *strLangEl; + LangEl *streamLangEl; + LangEl *anyLangEl; + LangEl *rootLangEl; + LangEl *noTokenLangEl; + LangEl *eofLangEl; + LangEl *errorLangEl; + LangEl *ignoreLangEl; + + Namespace *rootNamespace; + + int nextSymbolId; + int firstNonTermId; + + LangEl **langElIndex; + PdaState *actionDestState; + DefSetSet prodSetSet; + + Production **prodIdIndex; + AlphSet literalSet; + + PatList patternList; + ConsList replList; + ParserTextList parserTextList; + + ObjectDef *globalObjectDef; + + VectorTypeIdMap vectorTypeIdMap; + + UniqueType *findUniqueType( int typeId ); + UniqueType *findUniqueType( int typeId, LangEl *langEl ); + UniqueType *findUniqueType( int typeId, IterDef *iterDef ); + + UniqueType *uniqueTypeNil; + UniqueType *uniqueTypeVoid; + UniqueType *uniqueTypePtr; + UniqueType *uniqueTypeBool; + UniqueType *uniqueTypeInt; + UniqueType *uniqueTypeStr; + UniqueType *uniqueTypeStream; + UniqueType *uniqueTypeIgnore; + UniqueType *uniqueTypeAny; + + UniqueTypeMap uniqeTypeMap; + UniqueRepeatMap uniqeRepeatMap; + UniqueMapMap uniqueMapMap; + UniqueListMap uniqueListMap; + UniqueVectorMap uniqueVectorMap; + UniqueParserMap uniqueParserMap; + + void initStrObject(); + void initStreamObject(); + void initIntObject(); + void initTokenObjects(); + + ObjectDef *intObj; + ObjectDef *strObj; + ObjectDef *streamObj; + + FsmTables *fsmTables; + RuntimeData *runtimeData; + + int nextPatConsId; + int nextGenericId; + + FunctionList functionList; + int nextFuncId; + + enum CompileContext { + CompileTranslation, + CompileReduction, + CompileFunction, + CompileRoot + }; + + CompileContext compileContext; + LongVect returnJumps; + LongVect breakJumps; + Function *curFunction; + + /* Loops fill this in for return statements to use. */ + CodeVect *loopCleanup; + + ObjectField *makeDataEl(); + ObjectField *makePosEl(); + ObjectField *makeLineEl(); + + IterDef *findIterDef( IterDef::Type type, GenericType *generic ); + IterDef *findIterDef( IterDef::Type type, Function *func ); + IterDef *findIterDef( IterDef::Type type ); + IterDefSet iterDefSet; + + enum GeneratesType { GenToken, GenIgnore, GenCfl }; + + int nextObjectId; + GeneratesType generatesType; + bool generatesIgnore; + + StringMap literalStrings; + + long nextFrameId; + long nextParserId; + + ObjectDef *rootLocalFrame; + + bool revertOn; + + RedFsm *redFsm; + + PdaGraph *pdaGraph; + PdaTables *pdaTables; + + long predValue; + long nextMatchEndNum; + + TypeRef *argvTypeRef; + + bool inContiguous; + int contiguousOffset; + int contiguousStretch; + + bool beginContiguous( CodeVect &code, int stretch ); + void endContiguous( CodeVect &code, bool resetContiguous ); + void clearContiguous( CodeVect &code, bool resetContiguous ); + + void declareReVars(); +}; + +void afterOpMinimize( FsmGraph *fsm, bool lastInSeq = true ); +Key makeFsmKeyHex( char *str, const InputLoc &loc, Compiler *pd ); +Key makeFsmKeyDec( char *str, const InputLoc &loc, Compiler *pd ); +Key makeFsmKeyNum( char *str, const InputLoc &loc, Compiler *pd ); +Key makeFsmKeyChar( char c, Compiler *pd ); +void makeFsmKeyArray( Key *result, char *data, int len, Compiler *pd ); +void makeFsmUniqueKeyArray( KeySet &result, char *data, int len, + bool caseInsensitive, Compiler *pd ); +FsmGraph *makeBuiltin( BuiltinMachine builtin, Compiler *pd ); +FsmGraph *dotFsm( Compiler *pd ); +FsmGraph *dotStarFsm( Compiler *pd ); + +void errorStateLabels( const NameSet &locations ); + +struct ColmParser; + +typedef AvlMap<String, ColmParser *, CmpStr> ParserDict; +typedef AvlMapEl<String, ColmParser *> ParserDictEl; + +LangEl *declareLangEl( Compiler *pd, Namespace *nspace, const String &data, LangEl::Type type ); +LangEl *addLangEl( Compiler *pd, Namespace *nspace, const String &data, LangEl::Type type ); +void declareTypeAlias( Compiler *pd, Namespace *nspace, const String &data, TypeRef *typeRef ); +LangEl *findType( Compiler *pd, Namespace *nspace, const String &data ); + +ObjMethod *initFunction( UniqueType *retType, ObjectDef *obj, + const String &name, int methIdWV, int methIdWC, bool isConst ); +ObjMethod *initFunction( UniqueType *retType, ObjectDef *obj, + const String &name, int methIdWV, int methIdWC, UniqueType *arg1, bool isConst ); +ObjMethod *initFunction( UniqueType *retType, ObjectDef *obj, + const String &name, int methIdWV, int methIdWC, + UniqueType *arg1, UniqueType *arg2, bool isConst ); + +#endif /* _PARSEDATA_H */ diff --git a/src/parser.cc b/src/parser.cc new file mode 100644 index 0000000..f1a0dfc --- /dev/null +++ b/src/parser.cc @@ -0,0 +1,947 @@ +/* + * Copyright 2006-2014 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <iostream> +#include <errno.h> + +#include "parser.h" +#include "config.h" +#include "avltree.h" +#include "parsedata.h" +#include "parser.h" +#include "global.h" +#include "input.h" + +using std::endl; + +void BaseParser::init() +{ + /* Set up the root namespace. */ + Namespace *rootNamespace = createRootNamespace(); + pd->rootNamespace = rootNamespace; + + /* Set up the global object. */ + String global = "global"; + pd->globalObjectDef = ObjectDef::cons( ObjectDef::UserType, + global, pd->nextObjectId++ ); + + /* Initialize the dictionary of graphs. This is our symbol table. The + * initialization needs to be done on construction which happens at the + * beginning of a machine spec so any assignment operators can reference + * the builtins. */ + pd->initGraphDict(); + + pd->rootLocalFrame = ObjectDef::cons( ObjectDef::FrameType, + "local", pd->nextObjectId++ ); + curLocalFrame = pd->rootLocalFrame; + curScope = pd->rootLocalFrame->rootScope; + + /* Declarations of internal types. They must be declared now because we use + * them directly, rather than via type lookup. */ + pd->declareBaseLangEls(); + pd->initUniqueTypes(); + + /* Internal variables. */ + addArgvList(); +} + +void BaseParser::addRegularDef( const InputLoc &loc, Namespace *nspace, + const String &name, LexJoin *join ) +{ + GraphDictEl *newEl = nspace->rlMap.insert( name ); + if ( newEl != 0 ) { + /* New element in the dict, all good. */ + newEl->value = new LexDefinition( name, join ); + newEl->isInstance = false; + newEl->loc = loc; + } + else { + // Recover by ignoring the duplicate. + error(loc) << "regular definition \"" << name << "\" already exists" << endl; + } +} + +TokenRegion *BaseParser::createRegion( const InputLoc &loc, RegionImpl *impl ) +{ + TokenRegion *tokenRegion = new TokenRegion( loc, + pd->regionList.length(), impl ); + + pd->regionList.append( tokenRegion ); + + return tokenRegion; +} + +void BaseParser::pushRegionSet( const InputLoc &loc ) +{ + RegionImpl *implTokenIgnore = new RegionImpl; + RegionImpl *implTokenOnly = new RegionImpl; + RegionImpl *implIgnoreOnly = new RegionImpl; + + pd->regionImplList.append( implTokenIgnore ); + pd->regionImplList.append( implTokenOnly ); + pd->regionImplList.append( implIgnoreOnly ); + + TokenRegion *tokenIgnore = createRegion( loc, implTokenIgnore ); + TokenRegion *tokenOnly = createRegion( loc, implTokenOnly ); + TokenRegion *ignoreOnly = createRegion( loc, implIgnoreOnly ); + TokenRegion *collectIgnore = createRegion( loc, implIgnoreOnly ); + + RegionSet *regionSet = new RegionSet( + implTokenIgnore, implTokenIgnore, implIgnoreOnly, + tokenIgnore, tokenOnly, ignoreOnly, collectIgnore ); + + collectIgnore->ignoreOnly = ignoreOnly; + + pd->regionSetList.append( regionSet ); + regionStack.push( regionSet ); +} + +void BaseParser::popRegionSet() +{ + regionStack.pop(); +} + +Namespace *BaseParser::createRootNamespace() +{ + /* Gets id of zero and default name. No parent. */ + Namespace *nspace = new Namespace( internal, + String("___ROOT_NAMESPACE"), 0, 0 ); + + pd->namespaceList.append( nspace ); + namespaceStack.push( nspace ); + + return nspace; +} + +Namespace *BaseParser::createNamespace( const InputLoc &loc, const String &name ) +{ + Namespace *parent = namespaceStack.top(); + + /* Make the new namespace. */ + Namespace *nspace = parent->findNamespace( name ); + + if ( nspace == 0 ) { + nspace = new Namespace( loc, name, + pd->namespaceList.length(), parent ); + + parent->childNamespaces.append( nspace ); + pd->namespaceList.append( nspace ); + } + + namespaceStack.push( nspace ); + + return nspace; +} + +LexJoin *BaseParser::literalJoin( const InputLoc &loc, const String &data ) +{ + Literal *literal = Literal::cons( loc, data, Literal::LitString ); + LexFactor *factor = LexFactor::cons( literal ); + LexFactorNeg *factorNeg = LexFactorNeg::cons( factor ); + LexFactorRep *factorRep = LexFactorRep::cons( factorNeg ); + LexFactorAug *factorAug = LexFactorAug::cons( factorRep ); + LexTerm *term = LexTerm::cons( factorAug ); + LexExpression *expr = LexExpression::cons( term ); + LexJoin *join = LexJoin::cons( expr ); + return join; +} + +void BaseParser::defineToken( const InputLoc &loc, String name, LexJoin *join, ObjectDef *objectDef, + CodeBlock *transBlock, bool ignore, bool noPreIgnore, bool noPostIgnore ) +{ + bool pushedRegion = false; + if ( !insideRegion() ) { + if ( ignore ) + error(loc) << "ignore tokens can only appear inside scanners" << endp; + + pushedRegion = true; + pushRegionSet( internal ); + } + + /* Check the name if this is a token. */ + if ( !ignore && name == 0 ) + error(loc) << "tokens must have a name" << endp; + + /* Give a default name to ignores. */ + if ( name == 0 ) + name.setAs( 32, "_ignore_%.4x", pd->nextTokenId ); + + Namespace *nspace = curNspace(); + RegionSet *regionSet = regionStack.top(); + + TokenDef *tokenDef = TokenDef::cons( name, String(), false, ignore, join, + transBlock, loc, 0, nspace, regionSet, objectDef, curContext() ); + + regionSet->tokenDefList.append( tokenDef ); + nspace->tokenDefList.append( tokenDef ); + + tokenDef->noPreIgnore = noPreIgnore; + tokenDef->noPostIgnore = noPostIgnore; + + TokenInstance *tokenInstance = TokenInstance::cons( tokenDef, + join, loc, pd->nextTokenId++, nspace, + regionSet->tokenIgnore ); + + regionSet->tokenIgnore->impl->tokenInstanceList.append( tokenInstance ); + + tokenDef->noPreIgnore = noPreIgnore; + tokenDef->noPostIgnore = noPostIgnore; + + if ( ignore ) { + /* The instance for the ignore-only. */ + TokenInstance *tokenInstanceIgn = TokenInstance::cons( tokenDef, + join, loc, pd->nextTokenId++, nspace, regionSet->ignoreOnly ); + + tokenInstanceIgn->dupOf = tokenInstance; + + regionSet->ignoreOnly->impl->tokenInstanceList.append( tokenInstanceIgn ); + } + else { + /* The instance for the token-only. */ + TokenInstance *tokenInstanceTok = TokenInstance::cons( tokenDef, + join, loc, pd->nextTokenId++, nspace, regionSet->tokenOnly ); + + tokenInstanceTok->dupOf = tokenInstance; + + regionSet->tokenOnly->impl->tokenInstanceList.append( tokenInstanceTok ); + } + + /* This is created and pushed in the name. */ + if ( pushedRegion ) + popRegionSet(); + + if ( join != 0 ) { + /* Create a regular language definition so the token can be used to + * make other tokens */ + addRegularDef( loc, curNspace(), name, join ); + } +} + +void BaseParser::zeroDef( const InputLoc &loc, const String &name ) +{ + if ( !insideRegion() ) + error(loc) << "zero token should be inside token" << endp; + + RegionSet *regionSet = regionStack.top(); + Namespace *nspace = curNspace(); + + LexJoin *join = literalJoin( loc, String("`") ); + + TokenDef *tokenDef = TokenDef::cons( name, String(), false, false, join, + 0, loc, 0, nspace, regionSet, 0, curContext() ); + + tokenDef->isZero = true; + + regionSet->tokenDefList.append( tokenDef ); + nspace->tokenDefList.append( tokenDef ); + + /* No token instance created. */ +} + +void BaseParser::literalDef( const InputLoc &loc, const String &data, + bool noPreIgnore, bool noPostIgnore ) +{ + /* Create a name for the literal. */ + String name( 32, "_literal_%.4x", pd->nextTokenId ); + + bool pushedRegion = false; + if ( !insideRegion() ) { + pushRegionSet( loc ); + pushedRegion = true; + } + + bool unusedCI; + String interp; + prepareLitString( interp, unusedCI, data, loc ); + + /* Look for the production's associated region. */ + Namespace *nspace = curNspace(); + RegionSet *regionSet = regionStack.top(); + + LiteralDictEl *ldel = nspace->literalDict.find( interp ); + if ( ldel != 0 ) + error( loc ) << "literal already defined in this namespace" << endp; + + LexJoin *join = literalJoin( loc, data ); + + ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, + name, pd->nextObjectId++ ); + + /* The token definition. */ + TokenDef *tokenDef = TokenDef::cons( name, data, true, false, join, + 0, loc, 0, nspace, regionSet, objectDef, 0 ); + + regionSet->tokenDefList.append( tokenDef ); + nspace->tokenDefList.append( tokenDef ); + + /* The instance for the token/ignore region. */ + TokenInstance *tokenInstance = TokenInstance::cons( tokenDef, join, + loc, pd->nextTokenId++, nspace, regionSet->tokenIgnore ); + + regionSet->tokenIgnore->impl->tokenInstanceList.append( tokenInstance ); + + ldel = nspace->literalDict.insert( interp, tokenInstance ); + + /* Make the duplicate for the token-only region. */ + tokenDef->noPreIgnore = noPreIgnore; + tokenDef->noPostIgnore = noPostIgnore; + + /* The instance for the token-only region. */ + TokenInstance *tokenInstanceTok = TokenInstance::cons( tokenDef, + join, loc, pd->nextTokenId++, nspace, + regionSet->tokenOnly ); + + tokenInstanceTok->dupOf = tokenInstance; + + regionSet->tokenOnly->impl->tokenInstanceList.append( tokenInstanceTok ); + + if ( pushedRegion ) + popRegionSet(); +} + +void BaseParser::addArgvList() +{ + TypeRef *typeRef = TypeRef::cons( internal, pd->uniqueTypeStr ); + pd->argvTypeRef = TypeRef::cons( internal, TypeRef::List, 0, typeRef, 0 ); +} + +ObjectDef *BaseParser::blockOpen() +{ + /* Init the object representing the local frame. */ + ObjectDef *frame = ObjectDef::cons( ObjectDef::FrameType, + "local", pd->nextObjectId++ ); + + curLocalFrame = frame; + curScope = frame->rootScope; + return frame; +} + +void BaseParser::blockClose() +{ + curLocalFrame = pd->rootLocalFrame; + curScope = pd->rootLocalFrame->rootScope; +} + +void BaseParser::functionDef( StmtList *stmtList, ObjectDef *localFrame, + ParameterList *paramList, TypeRef *typeRef, const String &name, bool exprt ) +{ + CodeBlock *codeBlock = CodeBlock::cons( stmtList, localFrame ); + Function *newFunction = Function::cons( typeRef, name, + paramList, codeBlock, pd->nextFuncId++, false, exprt ); + pd->functionList.append( newFunction ); + newFunction->inContext = curContext(); +} + +void BaseParser::iterDef( StmtList *stmtList, ObjectDef *localFrame, + ParameterList *paramList, const String &name ) +{ + CodeBlock *codeBlock = CodeBlock::cons( stmtList, localFrame ); + Function *newFunction = Function::cons( 0, name, + paramList, codeBlock, pd->nextFuncId++, true, false ); + pd->functionList.append( newFunction ); +} + +LangStmt *BaseParser::globalDef( ObjectField *objField, LangExpr *expr, + LangStmt::Type assignType ) +{ + LangStmt *stmt = 0; + + Context *context = 0; + ObjectDef *object = 0; + if ( curContext() == 0 ) + object = pd->globalObjectDef; + else { + context = curContext(); + objField->context = context; + object = context->contextObjDef; + } + + if ( object->rootScope->checkRedecl( objField->name ) != 0 ) + error(objField->loc) << "object field renamed" << endp; + + object->rootScope->insertField( objField->name, objField ); + + if ( expr != 0 ) { + LangVarRef *varRef = LangVarRef::cons( objField->loc, + context, curScope, objField->name ); + + stmt = LangStmt::cons( objField->loc, + assignType, varRef, expr ); + } + + return stmt; +} + +void BaseParser::cflDef( NtDef *ntDef, ObjectDef *objectDef, LelDefList *defList ) +{ + Namespace *nspace = curNspace(); + + ntDef->objectDef = objectDef; + ntDef->defList = defList; + + nspace->ntDefList.append( ntDef ); + + /* Declare the captures in the object. */ + for ( LelDefList::Iter prod = *defList; prod.lte(); prod++ ) { + for ( ProdElList::Iter pel = *prod->prodElList; pel.lte(); pel++ ) { + /* If there is a capture, create the field. */ + if ( pel->captureField != 0 ) { + /* Might already exist. */ + ObjectField *newOf = objectDef->rootScope->checkRedecl( pel->captureField->name ); + if ( newOf != 0 ) { + /* FIXME: check the types are the same. */ + } + else { + newOf = pel->captureField; + newOf->typeRef = pel->typeRef; + objectDef->rootScope->insertField( newOf->name, newOf ); + } + + newOf->isRhsGet = true; + newOf->rhsVal.append( RhsVal( pel ) ); + } + } + } +} + +ReOrBlock *BaseParser::lexRegularExprData( ReOrBlock *reOrBlock, ReOrItem *reOrItem ) +{ + ReOrBlock *ret; + + /* An optimization to lessen the tree size. If an or char is directly under + * the left side on the right and the right side is another or char then + * paste them together and return the left side. Otherwise just put the two + * under a new or data node. */ + if ( reOrItem->type == ReOrItem::Data && + reOrBlock->type == ReOrBlock::RecurseItem && + reOrBlock->item->type == ReOrItem::Data ) + { + /* Append the right side to right side of the left and toss the + * right side. */ + reOrBlock->item->data += reOrItem->data; + delete reOrItem; + ret = reOrBlock; + } + else { + /* Can't optimize, put the left and right under a new node. */ + ret = ReOrBlock::cons( reOrBlock, reOrItem ); + } + return ret; +} + +LexFactor *BaseParser::lexRlFactorName( const String &data, const InputLoc &loc ) +{ + LexFactor *factor = 0; + /* Find the named graph. */ + Namespace *nspace = curNspace(); + + while ( nspace != 0 ) { + GraphDictEl *gdNode = nspace->rlMap.find( data ); + if ( gdNode != 0 ) { + if ( gdNode->isInstance ) { + /* Recover by retuning null as the factor node. */ + error(loc) << "references to graph instantiations not allowed " + "in expressions" << endl; + factor = 0; + } + else { + /* Create a factor node that is a lookup of an expression. */ + factor = LexFactor::cons( loc, gdNode->value ); + } + break; + } + + nspace = nspace->parentNamespace; + } + + if ( nspace == 0 ) { + /* Recover by returning null as the factor node. */ + error(loc) << "graph lookup of \"" << data << "\" failed" << endl; + factor = 0; + } + + return factor; +} + +int BaseParser::lexFactorRepNum( const InputLoc &loc, const String &data ) +{ + /* Convert the priority number to a long. Check for overflow. */ + errno = 0; + int rep = strtol( data, 0, 10 ); + if ( errno == ERANGE && rep == LONG_MAX ) { + /* Repetition too large. Recover by returing repetition 1. */ + error(loc) << "repetition number " << data << " overflows" << endl; + rep = 1; + } + return rep; +} + +LexFactorAug *BaseParser::lexFactorLabel( const InputLoc &loc, const String &data, LexFactorAug *factorAug ) +{ + /* Create the object field. */ + TypeRef *typeRef = TypeRef::cons( loc, pd->uniqueTypeStr ); + ObjectField *objField = ObjectField::cons( loc, typeRef, data ); + + /* Create the enter and leaving actions that will mark the substring. */ + Action *enter = Action::cons( MarkMark, pd->nextMatchEndNum++ ); + Action *leave = Action::cons( MarkMark, pd->nextMatchEndNum++ ); + pd->actionList.append( enter ); + pd->actionList.append( leave ); + + /* Add entering and leaving actions. */ + factorAug->actions.append( ParserAction( loc, at_start, 0, enter ) ); + factorAug->actions.append( ParserAction( loc, at_leave, 0, leave ) ); + + factorAug->reCaptureVect.append( ReCapture( enter, leave, objField ) ); + + return factorAug; +} + +LexJoin *BaseParser::lexOptJoin( LexJoin *join, LexJoin *context ) +{ + if ( context != 0 ) { + /* Create the enter and leaving actions that will mark the substring. */ + Action *mark = Action::cons( MarkMark, pd->nextMatchEndNum++ ); + pd->actionList.append( mark ); + + join->context = context; + join->mark = mark; + } + + return join; +} + +LangExpr *BaseParser::send( const InputLoc &loc, LangVarRef *varRef, ConsItemList *list, bool eof ) +{ + ParserText *parserText = ParserText::cons( loc, curNspace(), list ); + pd->parserTextList.append( parserText ); + + return LangExpr::cons( LangTerm::consSend( loc, varRef, + parserText, eof ) ); +} + +LangExpr *BaseParser::parseCmd( const InputLoc &loc, bool stop, ObjectField *objField, + TypeRef *typeRef, FieldInitVect *fieldInitVect, ConsItemList *list ) +{ + LangExpr *expr = 0; + + /* We are constructing a parser, sending it items, then returning it. + * Thisis the constructor for the parser. */ + ConsItemList *emptyConsItemList = new ConsItemList; + + Constructor *constructor = Constructor::cons( loc, curNspace(), + emptyConsItemList, pd->nextPatConsId++ ); + pd->replList.append( constructor ); + + /* The parser may be referenced. */ + LangVarRef *varRef = 0; + if ( objField != 0 ) { + varRef = LangVarRef::cons( objField->loc, + curContext(), curScope, objField->name ); + } + + /* The typeref for the parser. */ + TypeRef *parserTypeRef = TypeRef::cons( loc, + TypeRef::Parser, 0, typeRef, 0 ); + + ParserText *parserText = ParserText::cons( loc, curNspace(), list ); + pd->parserTextList.append( parserText ); + + expr = LangExpr::cons( LangTerm::cons( loc, + stop ? LangTerm::ParseStopType : LangTerm::ParseType, + varRef, objField, parserTypeRef, fieldInitVect, constructor, parserText ) ); + + /* Check for redeclaration. */ + if ( objField != 0 ) { + if ( curScope->checkRedecl( objField->name ) != 0 ) { + error( objField->loc ) << "variable " << objField->name << + " redeclared" << endp; + } + + /* Insert it into the field map. */ + objField->typeRef = typeRef; + curScope->insertField( objField->name, objField ); + } + + return expr; +} + +PatternItemList *BaseParser::consPatternEl( LangVarRef *varRef, PatternItemList *list ) +{ + /* Store the variable reference in the pattern itemm. */ + list->head->varRef = varRef; + + if ( varRef != 0 ) { + if ( curScope->checkRedecl( varRef->name ) != 0 ) { + error( varRef->loc ) << "variable " << varRef->name << + " redeclared" << endp; + } + + TypeRef *typeRef = list->head->prodEl->typeRef; + ObjectField *objField = ObjectField::cons( InputLoc(), typeRef, varRef->name ); + + /* Insert it into the field map. */ + curScope->insertField( varRef->name, objField ); + } + + return list; +} + +PatternItemList *BaseParser::patternElNamed( const InputLoc &loc, + LangVarRef *parsedVarRef, NamespaceQual *nspaceQual, const String &data, + RepeatType repeatType ) +{ + TypeRef *typeRef = TypeRef::cons( loc, parsedVarRef, nspaceQual, data, repeatType ); + ProdEl *prodEl = new ProdEl( ProdEl::ReferenceType, loc, 0, false, typeRef, 0 ); + PatternItem *patternItem = PatternItem::cons( PatternItem::TypeRefForm, loc, prodEl ); + return PatternItemList::cons( patternItem ); +} + +PatternItemList *BaseParser::patternElType( const InputLoc &loc, + LangVarRef *parsedVarRef, NamespaceQual *nspaceQual, const String &data, + RepeatType repeatType ) +{ + PdaLiteral *literal = new PdaLiteral( loc, data ); + TypeRef *typeRef = TypeRef::cons( loc, parsedVarRef, nspaceQual, literal, repeatType ); + + ProdEl *prodEl = new ProdEl( ProdEl::ReferenceType, loc, 0, false, typeRef, 0 ); + PatternItem *patternItem = PatternItem::cons( PatternItem::TypeRefForm, loc, prodEl ); + return PatternItemList::cons( patternItem ); +} + +ProdElList *BaseParser::appendProdEl( ProdElList *prodElList, ProdEl *prodEl ) +{ + prodEl->pos = prodElList->length(); + prodElList->append( prodEl ); + return prodElList; +} + +PatternItemList *BaseParser::patListConcat( PatternItemList *list1, + PatternItemList *list2 ) +{ + list1->append( *list2 ); + delete list2; + return list1; +} + +ConsItemList *BaseParser::consListConcat( ConsItemList *list1, + ConsItemList *list2 ) +{ + list1->append( *list2 ); + delete list2; + return list1; +} + +LangStmt *BaseParser::forScope( const InputLoc &loc, const String &data, + ObjNameScope *scope, TypeRef *typeRef, IterCall *iterCall, StmtList *stmtList ) +{ + /* Check for redeclaration. */ + if ( curScope->checkRedecl( data ) != 0 ) + error( loc ) << "variable " << data << " redeclared" << endp; + + /* Note that we pass in a null type reference. This type is dependent on + * the result of the iter_call lookup since it must contain a reference to + * the iterator that is called. This lookup is done at compile time. */ + ObjectField *iterField = ObjectField::cons( loc, (TypeRef*)0, data ); + curScope->insertField( data, iterField ); + + LangStmt *stmt = LangStmt::cons( loc, LangStmt::ForIterType, + iterField, typeRef, iterCall, stmtList, curContext(), scope ); + + return stmt; +} + +void BaseParser::preEof( const InputLoc &loc, StmtList *stmtList, ObjectDef *localFrame ) +{ + if ( !insideRegion() ) + error(loc) << "preeof must be used inside an existing region" << endl; + + CodeBlock *codeBlock = CodeBlock::cons( stmtList, localFrame ); + codeBlock->context = curContext(); + + RegionSet *regionSet = regionStack.top(); + regionSet->tokenIgnore->preEofBlock = codeBlock; +} + +ProdEl *BaseParser::prodElName( const InputLoc &loc, const String &data, + NamespaceQual *nspaceQual, ObjectField *objField, + RepeatType repeatType, bool commit ) +{ + TypeRef *typeRef = TypeRef::cons( loc, nspaceQual, data, repeatType ); + ProdEl *prodEl = new ProdEl( ProdEl::ReferenceType, loc, objField, commit, typeRef, 0 ); + return prodEl; +} + +ProdEl *BaseParser::prodElLiteral( const InputLoc &loc, const String &data, + NamespaceQual *nspaceQual, ObjectField *objField, RepeatType repeatType, + bool commit ) +{ + /* Create a new prodEl node going to a concat literal. */ + PdaLiteral *literal = new PdaLiteral( loc, data ); + TypeRef *typeRef = TypeRef::cons( loc, nspaceQual, literal, repeatType ); + ProdEl *prodEl = new ProdEl( ProdEl::LiteralType, loc, objField, commit, typeRef, 0 ); + return prodEl; +} + +ConsItemList *BaseParser::consElLiteral( const InputLoc &loc, + TypeRef *consTypeRef, const String &data, NamespaceQual *nspaceQual ) +{ + PdaLiteral *literal = new PdaLiteral( loc, data ); + TypeRef *typeRef = TypeRef::cons( loc, consTypeRef, nspaceQual, literal ); + ProdEl *prodEl = new ProdEl( ProdEl::LiteralType, loc, 0, false, typeRef, 0 ); + ConsItem *consItem = ConsItem::cons( loc, ConsItem::LiteralType, prodEl ); + ConsItemList *list = ConsItemList::cons( consItem ); + return list; +} + +Production *BaseParser::production( const InputLoc &loc, ProdElList *prodElList, + String name, bool commit, CodeBlock *codeBlock, LangEl *predOf ) +{ + Production *prod = Production::cons( loc, 0, prodElList, + name, commit, codeBlock, pd->prodList.length(), 0 ); + prod->predOf = predOf; + + /* Link the production elements back to the production. */ + for ( ProdEl *prodEl = prodElList->head; prodEl != 0; prodEl = prodEl->next ) + prodEl->production = prod; + + pd->prodList.append( prod ); + + return prod; +} + +void BaseParser::objVarDef( ObjectDef *objectDef, ObjectField *objField ) +{ + if ( objectDef->rootScope->checkRedecl( objField->name ) != 0 ) + error() << "object field renamed" << endp; + + objectDef->rootScope->insertField( objField->name, objField ); +} + +LelDefList *BaseParser::prodAppend( LelDefList *defList, Production *definition ) +{ + definition->prodNum = defList->length(); + defList->append( definition ); + return defList; +} + +LangExpr *BaseParser::construct( const InputLoc &loc, ObjectField *objField, + ConsItemList *list, TypeRef *typeRef, FieldInitVect *fieldInitVect ) +{ + Constructor *constructor = Constructor::cons( loc, curNspace(), + list, pd->nextPatConsId++ ); + pd->replList.append( constructor ); + + LangVarRef *varRef = 0; + if ( objField != 0 ) { + varRef = LangVarRef::cons( objField->loc, + curContext(), curScope, objField->name ); + } + + LangExpr *expr = LangExpr::cons( LangTerm::cons( loc, LangTerm::ConstructType, + varRef, objField, typeRef, fieldInitVect, constructor ) ); + + /* Check for redeclaration. */ + if ( objField != 0 ) { + if ( curScope->checkRedecl( objField->name ) != 0 ) { + error( objField->loc ) << "variable " << objField->name << + " redeclared" << endp; + } + + /* Insert it into the field map. */ + objField->typeRef = typeRef; + curScope->insertField( objField->name, objField ); + } + + return expr; +} + +LangExpr *BaseParser::match( const InputLoc &loc, LangVarRef *varRef, + PatternItemList *list ) +{ + Pattern *pattern = Pattern::cons( loc, curNspace(), + list, pd->nextPatConsId++ ); + pd->patternList.append( pattern ); + + LangExpr *expr = LangExpr::cons( LangTerm::cons( + InputLoc(), LangTerm::MatchType, varRef, pattern ) ); + + return expr; +} + +LangStmt *BaseParser::varDef( ObjectField *objField, + LangExpr *expr, LangStmt::Type assignType ) +{ + LangStmt *stmt = 0; + + /* Check for redeclaration. */ + if ( curScope->checkRedecl( objField->name ) != 0 ) { + error( objField->loc ) << "variable " << objField->name << + " redeclared" << endp; + } + + /* Insert it into the field map. */ + curScope->insertField( objField->name, objField ); + + //cout << "var def " << $1->objField->name << endl; + + if ( expr != 0 ) { + LangVarRef *varRef = LangVarRef::cons( objField->loc, + curContext(), curScope, objField->name ); + + stmt = LangStmt::cons( objField->loc, assignType, varRef, expr ); + } + + return stmt; +} + +LangStmt *BaseParser::exportStmt( ObjectField *objField, LangStmt::Type assignType, LangExpr *expr ) +{ + LangStmt *stmt = 0; + + if ( curContext() != 0 ) + error(objField->loc) << "cannot export parser context variables" << endp; + + ObjectDef *object = pd->globalObjectDef; + + if ( object->rootScope->checkRedecl( objField->name ) != 0 ) + error(objField->loc) << "object field renamed" << endp; + + object->rootScope->insertField( objField->name, objField ); + objField->isExport = true; + + if ( expr != 0 ) { + LangVarRef *varRef = LangVarRef::cons( objField->loc, + 0, curScope, objField->name ); + + stmt = LangStmt::cons( objField->loc, assignType, varRef, expr ); + } + + return stmt; +} + +LangExpr *BaseParser::require( const InputLoc &loc, + LangVarRef *varRef, PatternItemList *list ) +{ + Pattern *pattern = Pattern::cons( loc, curNspace(), + list, pd->nextPatConsId++ ); + pd->patternList.append( pattern ); + + LangExpr *expr = LangExpr::cons( LangTerm::cons( + InputLoc(), LangTerm::MatchType, varRef, pattern ) ); + return expr; +} + +void BaseParser::contextVarDef( const InputLoc &loc, ObjectField *objField ) +{ + ObjectDef *object; + if ( curContext() == 0 ) + error(loc) << "internal error: no context stack items found" << endp; + + Context *context = curContext(); + objField->context = context; + object = context->contextObjDef; + + if ( object->rootScope->checkRedecl( objField->name ) != 0 ) + error(objField->loc) << "object field renamed" << endp; + + object->rootScope->insertField( objField->name, objField ); +} + +void BaseParser::contextHead( const InputLoc &loc, const String &data ) +{ + /* Make the new namespace. */ + Namespace *nspace = createNamespace( loc, data ); + + Context *context = new Context( loc, 0 ); + contextStack.push( context ); + + ContextDef *contextDef = new ContextDef( data, context, nspace ); + nspace->contextDefList.append( contextDef ); + + context->contextObjDef = ObjectDef::cons( ObjectDef::UserType, + data, pd->nextObjectId++ ); +} + +StmtList *BaseParser::appendStatement( StmtList *stmtList, LangStmt *stmt ) +{ + if ( stmt != 0 ) + stmtList->append( stmt ); + return stmtList; +} + +ParameterList *BaseParser::appendParam( ParameterList *paramList, ObjectField *objField ) +{ + paramList->append( objField ); + return paramList; +} + +ObjectField *BaseParser::addParam( const InputLoc &loc, TypeRef *typeRef, + const String &name ) +{ + ObjectField *objField = ObjectField::cons( loc, typeRef, name ); + objField->isParam = true; + return objField; +} + +PredDecl *BaseParser::predTokenName( const InputLoc &loc, NamespaceQual *qual, + const String &data ) +{ + TypeRef *typeRef = TypeRef::cons( loc, qual, data ); + PredDecl *predDecl = new PredDecl( typeRef, pd->predValue ); + return predDecl; +} + +PredDecl *BaseParser::predTokenLit( const InputLoc &loc, const String &data, + NamespaceQual *nspaceQual ) +{ + PdaLiteral *literal = new PdaLiteral( loc, data ); + TypeRef *typeRef = TypeRef::cons( loc, nspaceQual, literal ); + PredDecl *predDecl = new PredDecl( typeRef, pd->predValue ); + return predDecl; +} + +void BaseParser::alias( const InputLoc &loc, const String &data, TypeRef *typeRef ) +{ + Namespace *nspace = curNspace(); + TypeAlias *typeAlias = new TypeAlias( loc, nspace, data, typeRef ); + nspace->typeAliasList.append( typeAlias ); +} + +void BaseParser::precedenceStmt( PredType predType, PredDeclList *predDeclList ) +{ + while ( predDeclList->length() > 0 ) { + PredDecl *predDecl = predDeclList->detachFirst(); + predDecl->predType = predType; + pd->predDeclList.append( predDecl ); + } + pd->predValue++; +} + +void BaseParser::pushScope() +{ + curScope = curLocalFrame->pushScope( curScope ); +} + +void BaseParser::popScope() +{ + curScope = curScope->parentScope; +} diff --git a/src/parser.h b/src/parser.h new file mode 100644 index 0000000..c4d02fe --- /dev/null +++ b/src/parser.h @@ -0,0 +1,150 @@ +/* + * Copyright 2013 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef PARSER_H +#define PARSER_H + +#include <iostream> +#include "avltree.h" +#include "parsedata.h" +#include "parser.h" + +#define PROPERTY_REDUCE_FIRST 0x1 + +struct BaseParser +{ + BaseParser( Compiler *pd ) + : pd(pd), enterRl(false) + {} + + virtual ~BaseParser() {} + + Compiler *pd; + + RegionSetVect regionStack; + NamespaceVect namespaceStack; + ContextStack contextStack; + ObjectDef *curLocalFrame; + ObjNameScope *curScope; + + bool enterRl; + + bool insideRegion() + { return regionStack.length() > 0; } + + Context *curContext() + { return contextStack.length() == 0 ? 0 : contextStack.top(); } + + Namespace *curNspace() + { return namespaceStack.top(); } + + /* Lexical feedback. */ + + void init(); + void addRegularDef( const InputLoc &loc, Namespace *nspace, + const String &name, LexJoin *join ); + TokenRegion *createRegion( const InputLoc &loc, RegionImpl *impl ); + Namespace *createRootNamespace(); + Namespace *createNamespace( const InputLoc &loc, const String &name ); + void pushRegionSet( const InputLoc &loc ); + void popRegionSet(); + void addProduction( const InputLoc &loc, const String &name, + ProdElList *prodElList, bool commit, CodeBlock *redBlock, LangEl *predOf ); + void addArgvList(); + LexJoin *literalJoin( const InputLoc &loc, const String &data ); + + void defineToken( const InputLoc &loc, String name, LexJoin *join, ObjectDef *objectDef, + CodeBlock *transBlock, bool ignore, bool noPreIgnore, bool noPostIgnore ); + + void zeroDef( const InputLoc &loc, const String &name ); + void literalDef( const InputLoc &loc, const String &data, + bool noPreIgnore, bool noPostIgnore ); + + ObjectDef *blockOpen(); + void blockClose(); + void functionDef( StmtList *stmtList, ObjectDef *localFrame, + ParameterList *paramList, TypeRef *typeRef, const String &name, bool exprt ); + void iterDef( StmtList *stmtList, ObjectDef *localFrame, + ParameterList *paramList, const String &name ); + LangStmt *globalDef( ObjectField *objField, LangExpr *expr, LangStmt::Type assignType ); + void cflDef( NtDef *ntDef, ObjectDef *objectDef, LelDefList *defList ); + ReOrBlock *lexRegularExprData( ReOrBlock *reOrBlock, ReOrItem *reOrItem ); + + int lexFactorRepNum( const InputLoc &loc, const String &data ); + LexFactor *lexRlFactorName( const String &data, const InputLoc &loc ); + LexFactorAug *lexFactorLabel( const InputLoc &loc, const String &data, + LexFactorAug *factorAug ); + LexJoin *lexOptJoin( LexJoin *join, LexJoin *context ); + LangExpr *send( const InputLoc &loc, LangVarRef *varRef, ConsItemList *list, bool eof ); + LangExpr *parseCmd( const InputLoc &loc, bool stop, ObjectField *objField, + TypeRef *typeRef, FieldInitVect *fieldInitVect, ConsItemList *list ); + PatternItemList *consPatternEl( LangVarRef *varRef, PatternItemList *list ); + PatternItemList *patternElNamed( const InputLoc &loc, LangVarRef *varRef, + NamespaceQual *nspaceQual, const String &data, RepeatType repeatType ); + PatternItemList *patternElType( const InputLoc &loc, LangVarRef *varRef, + NamespaceQual *nspaceQual, const String &data, RepeatType repeatType ); + PatternItemList *patListConcat( PatternItemList *list1, PatternItemList *list2 ); + ConsItemList *consListConcat( ConsItemList *list1, ConsItemList *list2 ); + LangStmt *forScope( const InputLoc &loc, const String &data, + ObjNameScope *scope, TypeRef *typeRef, IterCall *iterCall, StmtList *stmtList ); + void preEof( const InputLoc &loc, StmtList *stmtList, ObjectDef *localFrame ); + + ProdEl *prodElName( const InputLoc &loc, const String &data, + NamespaceQual *nspaceQual, ObjectField *objField, RepeatType repeatType, + bool commit ); + ProdEl *prodElLiteral( const InputLoc &loc, const String &data, + NamespaceQual *nspaceQual, ObjectField *objField, RepeatType repeatType, + bool commit ); + ConsItemList *consElLiteral( const InputLoc &loc, TypeRef *consTypeRef, + const String &data, NamespaceQual *nspaceQual ); + Production *production( const InputLoc &loc, ProdElList *prodElList, + String name, bool commit, CodeBlock *codeBlock, LangEl *predOf ); + void objVarDef( ObjectDef *objectDef, ObjectField *objField ); + LelDefList *prodAppend( LelDefList *defList, Production *definition ); + + LangExpr *construct( const InputLoc &loc, ObjectField *objField, + ConsItemList *list, TypeRef *typeRef, FieldInitVect *fieldInitVect ); + LangExpr *match( const InputLoc &loc, LangVarRef *varRef, + PatternItemList *list ); + LangStmt *varDef( ObjectField *objField, + LangExpr *expr, LangStmt::Type assignType ); + LangStmt *exportStmt( ObjectField *objField, LangStmt::Type assignType, LangExpr *expr ); + + LangExpr *require( const InputLoc &loc, LangVarRef *varRef, PatternItemList *list ); + void contextVarDef( const InputLoc &loc, ObjectField *objField ); + void contextHead( const InputLoc &loc, const String &data ); + StmtList *appendStatement( StmtList *stmtList, LangStmt *stmt ); + ParameterList *appendParam( ParameterList *paramList, ObjectField *objField ); + ObjectField *addParam( const InputLoc &loc, TypeRef *typeRef, const String &name ); + PredDecl *predTokenName( const InputLoc &loc, NamespaceQual *qual, const String &data ); + PredDecl *predTokenLit( const InputLoc &loc, const String &data, + NamespaceQual *nspaceQual ); + void alias( const InputLoc &loc, const String &data, TypeRef *typeRef ); + void precedenceStmt( PredType predType, PredDeclList *predDeclList ); + ProdElList *appendProdEl( ProdElList *prodElList, ProdEl *prodEl ); + + void pushScope(); + void popScope(); + + virtual void go( long activeRealm ) = 0; +}; + +#endif diff --git a/src/parsetree.cc b/src/parsetree.cc new file mode 100644 index 0000000..cfc0b52 --- /dev/null +++ b/src/parsetree.cc @@ -0,0 +1,1491 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "avltree.h" +#include "parsedata.h" +#include "parser.h" +#include "parsetree.h" +#include "input.h" + +#include <iostream> +#include <iomanip> +#include <errno.h> +#include <limits.h> +#include <stdlib.h> + + +using namespace std; +ostream &operator<<( ostream &out, const NameRef &nameRef ); +ostream &operator<<( ostream &out, const NameInst &nameInst ); +ostream &operator<<( ostream &out, const Token &token ); + +/* Convert the literal string which comes in from the scanner into an array of + * characters with escapes and options interpreted. Also null terminates the + * string. Though this null termination should not be relied on for + * interpreting literals in the parser because the string may contain a + * literal string with \0 */ +void prepareLitString( String &result, bool &caseInsensitive, + const String &srcString, const InputLoc &loc ) +{ + result.setAs( String::Fresh(), srcString.length() ); + caseInsensitive = false; + + char *src = srcString.data + 1; + char *end = 0; + bool backtick = srcString[0] == '`'; + + if ( !backtick ) { + end = srcString.data + srcString.length() - 1; + + while ( *end != '\'' && *end != '\"' && *end != '\n' ) { + if ( *end == 'i' ) + caseInsensitive = true; + else { + error( loc ) << "literal string '" << *end << + "' option not supported" << endl; + } + end -= 1; + } + + if ( *end == '\n' ) + end++; + } + else { + end = srcString.data + srcString.length(); + } + + char *dest = result.data; + int len = 0; + while ( src != end ) { + if ( !backtick && *src == '\\' ) { + switch ( src[1] ) { + case '0': dest[len++] = '\0'; break; + case 'a': dest[len++] = '\a'; break; + case 'b': dest[len++] = '\b'; break; + case 't': dest[len++] = '\t'; break; + case 'n': dest[len++] = '\n'; break; + case 'v': dest[len++] = '\v'; break; + case 'f': dest[len++] = '\f'; break; + case 'r': dest[len++] = '\r'; break; + case '\n': break; + default: dest[len++] = src[1]; break; + } + src += 2; + } + else { + dest[len++] = *src++; + } + } + + result.chop( len ); +} + +int CmpUniqueType::compare( const UniqueType &ut1, const UniqueType &ut2 ) +{ + if ( ut1.typeId < ut2.typeId ) + return -1; + else if ( ut1.typeId > ut2.typeId ) + return 1; + else if ( ut1.typeId == TYPE_TREE || + ut1.typeId == TYPE_PTR || + ut1.typeId == TYPE_REF ) + { + if ( ut1.langEl < ut2.langEl ) + return -1; + else if ( ut1.langEl > ut2.langEl ) + return 1; + } + else if ( ut1.typeId == TYPE_ITER ) { + if ( ut1.iterDef < ut2.iterDef ) + return -1; + else if ( ut1.iterDef > ut2.iterDef ) + return 1; + } + else { + /* Fail on anything unimplemented. */ + assert( false ); + } + + return 0; +} + +int CmpUniqueRepeat::compare( const UniqueRepeat &ut1, const UniqueRepeat &ut2 ) +{ + if ( ut1.repeatType < ut2.repeatType ) + return -1; + else if ( ut1.repeatType > ut2.repeatType ) + return 1; + else { + if ( ut1.langEl < ut2.langEl ) + return -1; + else if ( ut1.langEl > ut2.langEl ) + return 1; + } + + return 0; +} + +int CmpUniqueMap::compare( const UniqueMap &ut1, const UniqueMap &ut2 ) +{ + if ( ut1.key < ut2.key ) + return -1; + else if ( ut1.key > ut2.key ) + return 1; + else { + if ( ut1.value < ut2.value ) + return -1; + else if ( ut1.value > ut2.value ) + return 1; + } + + return 0; +} + +int CmpUniqueList::compare( const UniqueList &ut1, const UniqueList &ut2 ) +{ + if ( ut1.value < ut2.value ) + return -1; + else if ( ut1.value > ut2.value ) + return 1; + + return 0; +} + +int CmpUniqueVector::compare( const UniqueVector &ut1, const UniqueVector &ut2 ) +{ + if ( ut1.value < ut2.value ) + return -1; + else if ( ut1.value > ut2.value ) + return 1; + + return 0; +} + +int CmpUniqueParser::compare( const UniqueParser &ut1, const UniqueParser &ut2 ) +{ + if ( ut1.parseType < ut2.parseType ) + return -1; + else if ( ut1.parseType > ut2.parseType ) + return 1; + + return 0; +} + +FsmGraph *LexDefinition::walk( Compiler *pd ) +{ + /* Recurse on the expression. */ + FsmGraph *rtnVal = join->walk( pd ); + + /* If the expression below is a join operation with multiple expressions + * then it just had epsilon transisions resolved. If it is a join + * with only a single expression then run the epsilon op now. */ + if ( join->expr != 0 ) + rtnVal->epsilonOp(); + + return rtnVal; +} + +void RegionImpl::makeNameTree( const InputLoc &loc, Compiler *pd ) +{ + NameInst *nameInst = new NameInst( pd->nextNameId++ ); + pd->nameInstList.append( nameInst ); + + /* Guess we do this now. */ + makeActions( pd ); + + /* Save off the name inst into the token region. This is only legal for + * token regions because they are only ever referenced once (near the root + * of the name tree). They cannot have more than one corresponding name + * inst. */ + assert( regionNameInst == 0 ); + regionNameInst = nameInst; +} + +InputLoc TokenInstance::getLoc() +{ + return action != 0 ? action->loc : semiLoc; +} + +/* + * If there are any LMs then all of the following entry points must reset + * tokstart: + * + * 1. fentry(StateRef) + * 2. ftoto(StateRef), fcall(StateRef), fnext(StateRef) + * 3. targt of any transition that has an fcall (the return loc). + * 4. start state of all longest match routines. + */ + +Action *RegionImpl::newAction( Compiler *pd, const InputLoc &loc, + const String &name, InlineList *inlineList ) +{ + Action *action = Action::cons( loc, name, inlineList ); + pd->actionList.append( action ); + action->isLmAction = true; + return action; +} + +void RegionImpl::makeActions( Compiler *pd ) +{ + /* Make actions that set the action id. */ + for ( TokenInstanceListReg::Iter lmi = tokenInstanceList; lmi.lte(); lmi++ ) { + /* For each part create actions for setting the match type. We need + * to do this so that the actions will go into the actionIndex. */ + InlineList *inlineList = InlineList::cons(); + inlineList->append( InlineItem::cons( lmi->getLoc(), this, lmi, + InlineItem::LmSetActId ) ); + char *actName = new char[50]; + sprintf( actName, "store%i", lmi->longestMatchId ); + lmi->setActId = newAction( pd, lmi->getLoc(), actName, inlineList ); + } + + /* Make actions that execute the user action and restart on the last character. */ + for ( TokenInstanceListReg::Iter lmi = tokenInstanceList; lmi.lte(); lmi++ ) { + /* For each part create actions for setting the match type. We need + * to do this so that the actions will go into the actionIndex. */ + InlineList *inlineList = InlineList::cons(); + inlineList->append( InlineItem::cons( lmi->getLoc(), this, lmi, + InlineItem::LmOnLast ) ); + char *actName = new char[50]; + sprintf( actName, "imm%i", lmi->longestMatchId ); + lmi->actOnLast = newAction( pd, lmi->getLoc(), actName, inlineList ); + } + + /* Make actions that execute the user action and restart on the next + * character. These actions will set tokend themselves (it is the current + * char). */ + for ( TokenInstanceListReg::Iter lmi = tokenInstanceList; lmi.lte(); lmi++ ) { + /* For each part create actions for setting the match type. We need + * to do this so that the actions will go into the actionIndex. */ + InlineList *inlineList = InlineList::cons(); + inlineList->append( InlineItem::cons( lmi->getLoc(), this, lmi, + InlineItem::LmOnNext ) ); + char *actName = new char[50]; + sprintf( actName, "lagh%i", lmi->longestMatchId ); + lmi->actOnNext = newAction( pd, lmi->getLoc(), actName, inlineList ); + } + + /* Make actions that execute the user action and restart at tokend. These + * actions execute some time after matching the last char. */ + for ( TokenInstanceListReg::Iter lmi = tokenInstanceList; lmi.lte(); lmi++ ) { + /* For each part create actions for setting the match type. We need + * to do this so that the actions will go into the actionIndex. */ + InlineList *inlineList = InlineList::cons(); + inlineList->append( InlineItem::cons( lmi->getLoc(), this, lmi, + InlineItem::LmOnLagBehind ) ); + char *actName = new char[50]; + sprintf( actName, "lag%i", lmi->longestMatchId ); + lmi->actLagBehind = newAction( pd, lmi->getLoc(), actName, inlineList ); + } + + InputLoc loc; + loc.line = 1; + loc.col = 1; + + /* Create the error action. */ + InlineList *il6 = InlineList::cons(); + il6->append( InlineItem::cons( loc, this, 0, InlineItem::LmSwitch ) ); + lmActSelect = newAction( pd, loc, "lagsel", il6 ); +} + +void RegionImpl::restart( FsmGraph *graph, FsmTrans *trans ) +{ + FsmState *fromState = trans->fromState; + graph->detachTrans( fromState, trans->toState, trans ); + graph->attachTrans( fromState, graph->startState, trans ); +} + +void RegionImpl::runLongestMatch( Compiler *pd, FsmGraph *graph ) +{ + graph->markReachableFromHereStopFinal( graph->startState ); + for ( StateList::Iter ms = graph->stateList; ms.lte(); ms++ ) { + if ( ms->stateBits & SB_ISMARKED ) { + ms->lmItemSet.insert( 0 ); + ms->stateBits &= ~ SB_ISMARKED; + } + } + + /* Transfer the first item of non-empty lmAction tables to the item sets + * of the states that follow. Exclude states that have no transitions out. + * This must happen on a separate pass so that on each iteration of the + * next pass we have the item set entries from all lmAction tables. */ + for ( StateList::Iter st = graph->stateList; st.lte(); st++ ) { + for ( TransList::Iter trans = st->outList; trans.lte(); trans++ ) { + if ( trans->lmActionTable.length() > 0 ) { + LmActionTableEl *lmAct = trans->lmActionTable.data; + FsmState *toState = trans->toState; + assert( toState ); + + /* Check if there are transitions out, this may be a very + * close approximation? Out transitions going nowhere? + * FIXME: Check. */ + if ( toState->outList.length() > 0 ) { + /* Fill the item sets. */ + graph->markReachableFromHereStopFinal( toState ); + for ( StateList::Iter ms = graph->stateList; ms.lte(); ms++ ) { + if ( ms->stateBits & SB_ISMARKED ) { + ms->lmItemSet.insert( lmAct->value ); + ms->stateBits &= ~ SB_ISMARKED; + } + } + } + } + } + } + + /* The lmItem sets are now filled, telling us which longest match rules + * can succeed in which states. First determine if we need to make sure + * act is defaulted to zero. */ + int maxItemSetLength = 0; + graph->markReachableFromHereStopFinal( graph->startState ); + for ( StateList::Iter ms = graph->stateList; ms.lte(); ms++ ) { + if ( ms->stateBits & SB_ISMARKED ) { + if ( ms->lmItemSet.length() > maxItemSetLength ) + maxItemSetLength = ms->lmItemSet.length(); + ms->stateBits &= ~ SB_ISMARKED; + } + } + + /* The actions executed on starting to match a token. */ + graph->isolateStartState(); + graph->startState->fromStateActionTable.setAction( pd->setTokStartOrd, pd->setTokStart ); + if ( maxItemSetLength > 1 ) { + /* The longest match action switch may be called when tokens are + * matched, in which case act must be initialized, there must be a + * case to handle the error, and the generated machine will require an + * error state. */ + lmSwitchHandlesError = true; + graph->startState->toStateActionTable.setAction( pd->initActIdOrd, pd->initActId ); + } + + /* The place to store transitions to restart. It maybe possible for the + * restarting to affect the searching through the graph that follows. For + * now take the safe route and save the list of transitions to restart + * until after all searching is done. */ + Vector<FsmTrans*> restartTrans; + + /* Set actions that do immediate token recognition, set the longest match part + * id and set the token ending. */ + for ( StateList::Iter st = graph->stateList; st.lte(); st++ ) { + for ( TransList::Iter trans = st->outList; trans.lte(); trans++ ) { + if ( trans->lmActionTable.length() > 0 ) { + LmActionTableEl *lmAct = trans->lmActionTable.data; + FsmState *toState = trans->toState; + assert( toState ); + + /* Check if there are transitions out, this may be a very + * close approximation? Out transitions going nowhere? + * FIXME: Check. */ + if ( toState->outList.length() == 0 ) { + /* Can execute the immediate action for the longest match + * part. Redirect the action to the start state. */ + trans->actionTable.setAction( lmAct->key, + lmAct->value->actOnLast ); + restartTrans.append( trans ); + } + else { + /* Look for non final states that have a non-empty item + * set. If these are present then we need to record the + * end of the token. Also Find the highest item set + * length reachable from here (excluding at transtions to + * final states). */ + bool nonFinalNonEmptyItemSet = false; + maxItemSetLength = 0; + graph->markReachableFromHereStopFinal( toState ); + for ( StateList::Iter ms = graph->stateList; ms.lte(); ms++ ) { + if ( ms->stateBits & SB_ISMARKED ) { + if ( ms->lmItemSet.length() > 0 && !ms->isFinState() ) + nonFinalNonEmptyItemSet = true; + if ( ms->lmItemSet.length() > maxItemSetLength ) + maxItemSetLength = ms->lmItemSet.length(); + ms->stateBits &= ~ SB_ISMARKED; + } + } + + /* If there are reachable states that are not final and + * have non empty item sets or that have an item set + * length greater than one then we need to set tokend + * because the error action that matches the token will + * require it. */ + if ( nonFinalNonEmptyItemSet || maxItemSetLength > 1 ) + trans->actionTable.setAction( pd->setTokEndOrd, pd->setTokEnd ); + + /* Some states may not know which longest match item to + * execute, must set it. */ + if ( maxItemSetLength > 1 ) { + /* There are transitions out, another match may come. */ + trans->actionTable.setAction( lmAct->key, + lmAct->value->setActId ); + } + } + } + } + } + + /* Now that all graph searching is done it certainly safe set the + * restarting. It may be safe above, however this must be verified. */ + for ( Vector<FsmTrans*>::Iter rs = restartTrans; rs.lte(); rs++ ) + restart( graph, *rs ); + + int lmErrActionOrd = pd->curActionOrd++; + + /* Embed the error for recognizing a char. */ + for ( StateList::Iter st = graph->stateList; st.lte(); st++ ) { + if ( st->lmItemSet.length() == 1 && st->lmItemSet[0] != 0 ) { + if ( st->isFinState() ) { + /* On error execute the onActNext action, which knows that + * the last character of the token was one back and restart. */ + graph->setErrorTarget( st, graph->startState, &lmErrActionOrd, + &st->lmItemSet[0]->actOnNext, 1 ); + st->eofActionTable.setAction( lmErrActionOrd, + st->lmItemSet[0]->actOnNext ); + st->eofTarget = graph->startState; + } + else { + graph->setErrorTarget( st, graph->startState, &lmErrActionOrd, + &st->lmItemSet[0]->actLagBehind, 1 ); + st->eofActionTable.setAction( lmErrActionOrd, + st->lmItemSet[0]->actLagBehind ); + st->eofTarget = graph->startState; + } + } + else if ( st->lmItemSet.length() > 1 ) { + /* Need to use the select. Take note of the which items the select + * is needed for so only the necessary actions are included. */ + for ( LmItemSet::Iter plmi = st->lmItemSet; plmi.lte(); plmi++ ) { + if ( *plmi != 0 ) + (*plmi)->inLmSelect = true; + } + /* On error, execute the action select and go to the start state. */ + graph->setErrorTarget( st, graph->startState, &lmErrActionOrd, + &lmActSelect, 1 ); + st->eofActionTable.setAction( lmErrActionOrd, lmActSelect ); + st->eofTarget = graph->startState; + } + } + + /* Finally, the start state should be made final. */ + graph->setFinState( graph->startState ); +} + +void RegionImpl::transferScannerLeavingActions( FsmGraph *graph ) +{ + for ( StateList::Iter st = graph->stateList; st.lte(); st++ ) { + if ( st->outActionTable.length() > 0 ) + graph->setErrorActions( st, st->outActionTable ); + } +} + +FsmGraph *RegionImpl::walk( Compiler *pd ) +{ + /* Make each part of the longest match. */ + int numParts = 0; + FsmGraph **parts = new FsmGraph*[tokenInstanceList.length()]; + for ( TokenInstanceListReg::Iter lmi = tokenInstanceList; lmi.lte(); lmi++ ) { + /* Watch out for patternless tokens. */ + if ( lmi->join != 0 ) { + /* Create the machine and embed the setting of the longest match id. */ + parts[numParts] = lmi->join->walk( pd ); + parts[numParts]->longMatchAction( pd->curActionOrd++, lmi ); + + /* Look for tokens that accept the zero length-word. The first one found + * will be used as the default token. */ + if ( defaultTokenInstance == 0 && parts[numParts]->startState->isFinState() ) + defaultTokenInstance = lmi; + + numParts += 1; + } + } + FsmGraph *retFsm = parts[0]; + + if ( defaultTokenInstance != 0 && defaultTokenInstance->tokenDef->tdLangEl->isIgnore ) + error() << "ignore token cannot be a scanner's zero-length token" << endp; + + /* The region is empty. Return the empty set. */ + if ( numParts == 0 ) { + retFsm = new FsmGraph(); + retFsm->lambdaFsm(); + } + else { + /* Before we union the patterns we need to deal with leaving actions. They + * are transfered to error transitions out of the final states (like local + * error actions) and to eof actions. In the scanner we need to forbid + * on_last for any final state that has an leaving action. */ + for ( int i = 0; i < numParts; i++ ) + transferScannerLeavingActions( parts[i] ); + + /* Union machines one and up with machine zero. */ + FsmGraph *retFsm = parts[0]; + for ( int i = 1; i < numParts; i++ ) { + retFsm->unionOp( parts[i] ); + afterOpMinimize( retFsm ); + } + + runLongestMatch( pd, retFsm ); + delete[] parts; + } + + /* Need the entry point for the region. */ + retFsm->setEntry( regionNameInst->id, retFsm->startState ); + + return retFsm; +} + +/* Walk an expression node. */ +FsmGraph *LexJoin::walk( Compiler *pd ) +{ + FsmGraph *retFsm = expr->walk( pd ); + + /* Maybe the the context. */ + if ( context != 0 ) { + retFsm->leaveFsmAction( pd->curActionOrd++, mark ); + FsmGraph *contextGraph = context->walk( pd ); + retFsm->concatOp( contextGraph ); + } + + return retFsm; +} + +/* Clean up after an expression node. */ +LexExpression::~LexExpression() +{ + switch ( type ) { + case OrType: case IntersectType: case SubtractType: + case StrongSubtractType: + delete expression; + delete term; + break; + case TermType: + delete term; + break; + case BuiltinType: + break; + } +} + +/* Evaluate a single expression node. */ +FsmGraph *LexExpression::walk( Compiler *pd, bool lastInSeq ) +{ + FsmGraph *rtnVal = 0; + switch ( type ) { + case OrType: { + /* Evaluate the expression. */ + rtnVal = expression->walk( pd, false ); + /* Evaluate the term. */ + FsmGraph *rhs = term->walk( pd ); + /* Perform union. */ + rtnVal->unionOp( rhs ); + afterOpMinimize( rtnVal, lastInSeq ); + break; + } + case IntersectType: { + /* Evaluate the expression. */ + rtnVal = expression->walk( pd ); + /* Evaluate the term. */ + FsmGraph *rhs = term->walk( pd ); + /* Perform intersection. */ + rtnVal->intersectOp( rhs ); + afterOpMinimize( rtnVal, lastInSeq ); + break; + } + case SubtractType: { + /* Evaluate the expression. */ + rtnVal = expression->walk( pd ); + /* Evaluate the term. */ + FsmGraph *rhs = term->walk( pd ); + /* Perform subtraction. */ + rtnVal->subtractOp( rhs ); + afterOpMinimize( rtnVal, lastInSeq ); + break; + } + case StrongSubtractType: { + /* Evaluate the expression. */ + rtnVal = expression->walk( pd ); + + /* Evaluate the term and pad it with any* machines. */ + FsmGraph *rhs = dotStarFsm( pd ); + FsmGraph *termFsm = term->walk( pd ); + FsmGraph *trailAnyStar = dotStarFsm( pd ); + rhs->concatOp( termFsm ); + rhs->concatOp( trailAnyStar ); + + /* Perform subtraction. */ + rtnVal->subtractOp( rhs ); + afterOpMinimize( rtnVal, lastInSeq ); + break; + } + case TermType: { + /* Return result of the term. */ + rtnVal = term->walk( pd ); + break; + } + case BuiltinType: { + /* Duplicate the builtin. */ + rtnVal = makeBuiltin( builtin, pd ); + break; + } + } + + return rtnVal; +} + +/* Clean up after a term node. */ +LexTerm::~LexTerm() +{ + switch ( type ) { + case ConcatType: + case RightStartType: + case RightFinishType: + case LeftType: + delete term; + delete factorAug; + break; + case FactorAugType: + delete factorAug; + break; + } +} + +/* Evaluate a term node. */ +FsmGraph *LexTerm::walk( Compiler *pd, bool lastInSeq ) +{ + FsmGraph *rtnVal = 0; + switch ( type ) { + case ConcatType: { + /* Evaluate the Term. */ + rtnVal = term->walk( pd, false ); + /* Evaluate the LexFactorRep. */ + FsmGraph *rhs = factorAug->walk( pd ); + /* Perform concatenation. */ + rtnVal->concatOp( rhs ); + afterOpMinimize( rtnVal, lastInSeq ); + break; + } + case RightStartType: { + /* Evaluate the Term. */ + rtnVal = term->walk( pd ); + + /* Evaluate the LexFactorRep. */ + FsmGraph *rhs = factorAug->walk( pd ); + + /* Set up the priority descriptors. The left machine gets the + * lower priority where as the right get the higher start priority. */ + priorDescs[0].key = pd->nextPriorKey++; + priorDescs[0].priority = 0; + rtnVal->allTransPrior( pd->curPriorOrd++, &priorDescs[0] ); + + /* The start transitions right machine get the higher priority. + * Use the same unique key. */ + priorDescs[1].key = priorDescs[0].key; + priorDescs[1].priority = 1; + rhs->startFsmPrior( pd->curPriorOrd++, &priorDescs[1] ); + + /* Perform concatenation. */ + rtnVal->concatOp( rhs ); + afterOpMinimize( rtnVal, lastInSeq ); + break; + } + case RightFinishType: { + /* Evaluate the Term. */ + rtnVal = term->walk( pd ); + + /* Evaluate the LexFactorRep. */ + FsmGraph *rhs = factorAug->walk( pd ); + + /* Set up the priority descriptors. The left machine gets the + * lower priority where as the finishing transitions to the right + * get the higher priority. */ + priorDescs[0].key = pd->nextPriorKey++; + priorDescs[0].priority = 0; + rtnVal->allTransPrior( pd->curPriorOrd++, &priorDescs[0] ); + + /* The finishing transitions of the right machine get the higher + * priority. Use the same unique key. */ + priorDescs[1].key = priorDescs[0].key; + priorDescs[1].priority = 1; + rhs->finishFsmPrior( pd->curPriorOrd++, &priorDescs[1] ); + + /* Perform concatenation. */ + rtnVal->concatOp( rhs ); + afterOpMinimize( rtnVal, lastInSeq ); + break; + } + case LeftType: { + /* Evaluate the Term. */ + rtnVal = term->walk( pd ); + + /* Evaluate the LexFactorRep. */ + FsmGraph *rhs = factorAug->walk( pd ); + + /* Set up the priority descriptors. The left machine gets the + * higher priority. */ + priorDescs[0].key = pd->nextPriorKey++; + priorDescs[0].priority = 1; + rtnVal->allTransPrior( pd->curPriorOrd++, &priorDescs[0] ); + + /* The right machine gets the lower priority. Since + * startTransPrior might unnecessarily increase the number of + * states during the state machine construction process (due to + * isolation), we use allTransPrior instead, which has the same + * effect. */ + priorDescs[1].key = priorDescs[0].key; + priorDescs[1].priority = 0; + rhs->allTransPrior( pd->curPriorOrd++, &priorDescs[1] ); + + /* Perform concatenation. */ + rtnVal->concatOp( rhs ); + afterOpMinimize( rtnVal, lastInSeq ); + break; + } + case FactorAugType: { + rtnVal = factorAug->walk( pd ); + break; + } + } + return rtnVal; +} + +LexFactorAug::~LexFactorAug() +{ + delete factorRep; +} + +void LexFactorAug::assignActions( Compiler *pd, FsmGraph *graph, int *actionOrd ) +{ + /* Assign actions. */ + for ( int i = 0; i < actions.length(); i++ ) { + switch ( actions[i].type ) { + case at_start: + graph->startFsmAction( actionOrd[i], actions[i].action ); + afterOpMinimize( graph ); + break; + case at_leave: + graph->leaveFsmAction( actionOrd[i], actions[i].action ); + break; + } + } +} + +/* Evaluate a factor with augmentation node. */ +FsmGraph *LexFactorAug::walk( Compiler *pd ) +{ + /* Make the array of function orderings. */ + int *actionOrd = 0; + if ( actions.length() > 0 ) + actionOrd = new int[actions.length()]; + + /* First walk the list of actions, assigning order to all starting + * actions. */ + for ( int i = 0; i < actions.length(); i++ ) { + if ( actions[i].type == at_start ) + actionOrd[i] = pd->curActionOrd++; + } + + /* Evaluate the factor with repetition. */ + FsmGraph *rtnVal = factorRep->walk( pd ); + + /* Compute the remaining action orderings. */ + for ( int i = 0; i < actions.length(); i++ ) { + if ( actions[i].type != at_start ) + actionOrd[i] = pd->curActionOrd++; + } + + assignActions( pd, rtnVal , actionOrd ); + + if ( actionOrd != 0 ) + delete[] actionOrd; + return rtnVal; +} + + +/* Clean up after a factor with repetition node. */ +LexFactorRep::~LexFactorRep() +{ + switch ( type ) { + case StarType: case StarStarType: case OptionalType: case PlusType: + case ExactType: case MaxType: case MinType: case RangeType: + delete factorRep; + break; + case FactorNegType: + delete factorNeg; + break; + } +} + +/* Evaluate a factor with repetition node. */ +FsmGraph *LexFactorRep::walk( Compiler *pd ) +{ + FsmGraph *retFsm = 0; + + switch ( type ) { + case StarType: { + /* Evaluate the LexFactorRep. */ + retFsm = factorRep->walk( pd ); + if ( retFsm->startState->isFinState() ) { + warning(loc) << "applying kleene star to a machine that " + "accepts zero length word" << endl; + } + + /* Shift over the start action orders then do the kleene star. */ + pd->curActionOrd += retFsm->shiftStartActionOrder( pd->curActionOrd ); + retFsm->starOp( ); + afterOpMinimize( retFsm ); + break; + } + case StarStarType: { + /* Evaluate the LexFactorRep. */ + retFsm = factorRep->walk( pd ); + if ( retFsm->startState->isFinState() ) { + warning(loc) << "applying kleene star to a machine that " + "accepts zero length word" << endl; + } + + /* Set up the prior descs. All gets priority one, whereas leaving gets + * priority zero. Make a unique key so that these priorities don't + * interfere with any priorities set by the user. */ + priorDescs[0].key = pd->nextPriorKey++; + priorDescs[0].priority = 1; + retFsm->allTransPrior( pd->curPriorOrd++, &priorDescs[0] ); + + /* Leaveing gets priority 0. Use same unique key. */ + priorDescs[1].key = priorDescs[0].key; + priorDescs[1].priority = 0; + retFsm->leaveFsmPrior( pd->curPriorOrd++, &priorDescs[1] ); + + /* Shift over the start action orders then do the kleene star. */ + pd->curActionOrd += retFsm->shiftStartActionOrder( pd->curActionOrd ); + retFsm->starOp( ); + afterOpMinimize( retFsm ); + break; + } + case OptionalType: { + /* Make the null fsm. */ + FsmGraph *nu = new FsmGraph(); + nu->lambdaFsm( ); + + /* Evaluate the LexFactorRep. */ + retFsm = factorRep->walk( pd ); + + /* Perform the question operator. */ + retFsm->unionOp( nu ); + afterOpMinimize( retFsm ); + break; + } + case PlusType: { + /* Evaluate the LexFactorRep. */ + retFsm = factorRep->walk( pd ); + if ( retFsm->startState->isFinState() ) { + warning(loc) << "applying plus operator to a machine that " + "accpets zero length word" << endl; + } + + /* Need a duplicated for the star end. */ + FsmGraph *dup = new FsmGraph( *retFsm ); + + /* The start func orders need to be shifted before doing the star. */ + pd->curActionOrd += dup->shiftStartActionOrder( pd->curActionOrd ); + + /* Star the duplicate. */ + dup->starOp( ); + afterOpMinimize( dup ); + + retFsm->concatOp( dup ); + afterOpMinimize( retFsm ); + break; + } + case ExactType: { + /* Get an int from the repetition amount. */ + if ( lowerRep == 0 ) { + /* No copies. Don't need to evaluate the factorRep. + * This Defeats the purpose so give a warning. */ + warning(loc) << "exactly zero repetitions results " + "in the null machine" << endl; + + retFsm = new FsmGraph(); + retFsm->lambdaFsm(); + } + else { + /* Evaluate the first LexFactorRep. */ + retFsm = factorRep->walk( pd ); + if ( retFsm->startState->isFinState() ) { + warning(loc) << "applying repetition to a machine that " + "accepts zero length word" << endl; + } + + /* The start func orders need to be shifted before doing the + * repetition. */ + pd->curActionOrd += retFsm->shiftStartActionOrder( pd->curActionOrd ); + + /* Do the repetition on the machine. Already guarded against n == 0 */ + retFsm->repeatOp( lowerRep ); + afterOpMinimize( retFsm ); + } + break; + } + case MaxType: { + /* Get an int from the repetition amount. */ + if ( upperRep == 0 ) { + /* No copies. Don't need to evaluate the factorRep. + * This Defeats the purpose so give a warning. */ + warning(loc) << "max zero repetitions results " + "in the null machine" << endl; + + retFsm = new FsmGraph(); + retFsm->lambdaFsm(); + } + else { + /* Evaluate the first LexFactorRep. */ + retFsm = factorRep->walk( pd ); + if ( retFsm->startState->isFinState() ) { + warning(loc) << "applying max repetition to a machine that " + "accepts zero length word" << endl; + } + + /* The start func orders need to be shifted before doing the + * repetition. */ + pd->curActionOrd += retFsm->shiftStartActionOrder( pd->curActionOrd ); + + /* Do the repetition on the machine. Already guarded against n == 0 */ + retFsm->optionalRepeatOp( upperRep ); + afterOpMinimize( retFsm ); + } + break; + } + case MinType: { + /* Evaluate the repeated machine. */ + retFsm = factorRep->walk( pd ); + if ( retFsm->startState->isFinState() ) { + warning(loc) << "applying min repetition to a machine that " + "accepts zero length word" << endl; + } + + /* The start func orders need to be shifted before doing the repetition + * and the kleene star. */ + pd->curActionOrd += retFsm->shiftStartActionOrder( pd->curActionOrd ); + + if ( lowerRep == 0 ) { + /* Acts just like a star op on the machine to return. */ + retFsm->starOp( ); + afterOpMinimize( retFsm ); + } + else { + /* Take a duplicate for the plus. */ + FsmGraph *dup = new FsmGraph( *retFsm ); + + /* Do repetition on the first half. */ + retFsm->repeatOp( lowerRep ); + afterOpMinimize( retFsm ); + + /* Star the duplicate. */ + dup->starOp( ); + afterOpMinimize( dup ); + + /* Tak on the kleene star. */ + retFsm->concatOp( dup ); + afterOpMinimize( retFsm ); + } + break; + } + case RangeType: { + /* Check for bogus range. */ + if ( upperRep - lowerRep < 0 ) { + error(loc) << "invalid range repetition" << endl; + + /* Return null machine as recovery. */ + retFsm = new FsmGraph(); + retFsm->lambdaFsm(); + } + else if ( lowerRep == 0 && upperRep == 0 ) { + /* No copies. Don't need to evaluate the factorRep. This + * defeats the purpose so give a warning. */ + warning(loc) << "zero to zero repetitions results " + "in the null machine" << endl; + + retFsm = new FsmGraph(); + retFsm->lambdaFsm(); + } + else { + /* Now need to evaluate the repeated machine. */ + retFsm = factorRep->walk( pd ); + if ( retFsm->startState->isFinState() ) { + warning(loc) << "applying range repetition to a machine that " + "accepts zero length word" << endl; + } + + /* The start func orders need to be shifted before doing both kinds + * of repetition. */ + pd->curActionOrd += retFsm->shiftStartActionOrder( pd->curActionOrd ); + + if ( lowerRep == 0 ) { + /* Just doing max repetition. Already guarded against n == 0. */ + retFsm->optionalRepeatOp( upperRep ); + afterOpMinimize( retFsm ); + } + else if ( lowerRep == upperRep ) { + /* Just doing exact repetition. Already guarded against n == 0. */ + retFsm->repeatOp( lowerRep ); + afterOpMinimize( retFsm ); + } + else { + /* This is the case that 0 < lowerRep < upperRep. Take a + * duplicate for the optional repeat. */ + FsmGraph *dup = new FsmGraph( *retFsm ); + + /* Do repetition on the first half. */ + retFsm->repeatOp( lowerRep ); + afterOpMinimize( retFsm ); + + /* Do optional repetition on the second half. */ + dup->optionalRepeatOp( upperRep - lowerRep ); + afterOpMinimize( dup ); + + /* Tak on the duplicate machine. */ + retFsm->concatOp( dup ); + afterOpMinimize( retFsm ); + } + } + break; + } + case FactorNegType: { + /* Evaluate the Factor. Pass it up. */ + retFsm = factorNeg->walk( pd ); + break; + }} + return retFsm; +} + + +/* Clean up after a factor with negation node. */ +LexFactorNeg::~LexFactorNeg() +{ + switch ( type ) { + case NegateType: + case CharNegateType: + delete factorNeg; + break; + case FactorType: + delete factor; + break; + } +} + +/* Evaluate a factor with negation node. */ +FsmGraph *LexFactorNeg::walk( Compiler *pd ) +{ + FsmGraph *retFsm = 0; + + switch ( type ) { + case NegateType: { + /* Evaluate the factorNeg. */ + FsmGraph *toNegate = factorNeg->walk( pd ); + + /* Negation is subtract from dot-star. */ + retFsm = dotStarFsm( pd ); + retFsm->subtractOp( toNegate ); + afterOpMinimize( retFsm ); + break; + } + case CharNegateType: { + /* Evaluate the factorNeg. */ + FsmGraph *toNegate = factorNeg->walk( pd ); + + /* CharNegation is subtract from dot. */ + retFsm = dotFsm( pd ); + retFsm->subtractOp( toNegate ); + afterOpMinimize( retFsm ); + break; + } + case FactorType: { + /* Evaluate the Factor. Pass it up. */ + retFsm = factor->walk( pd ); + break; + }} + return retFsm; +} + +/* Clean up after a factor node. */ +LexFactor::~LexFactor() +{ + switch ( type ) { + case LiteralType: + delete literal; + break; + case RangeType: + delete range; + break; + case OrExprType: + delete reItem; + break; + case RegExprType: + delete regExp; + break; + case ReferenceType: + break; + case ParenType: + delete join; + break; + } +} + +/* Evaluate a factor node. */ +FsmGraph *LexFactor::walk( Compiler *pd ) +{ + FsmGraph *rtnVal = 0; + switch ( type ) { + case LiteralType: + rtnVal = literal->walk( pd ); + break; + case RangeType: + rtnVal = range->walk( pd ); + break; + case OrExprType: + rtnVal = reItem->walk( pd, 0 ); + break; + case RegExprType: + rtnVal = regExp->walk( pd, 0 ); + break; + case ReferenceType: + rtnVal = varDef->walk( pd ); + break; + case ParenType: + rtnVal = join->walk( pd ); + break; + } + + return rtnVal; +} + + +/* Clean up a range object. Must delete the two literals. */ +Range::~Range() +{ + delete lowerLit; + delete upperLit; +} + +bool Range::verifyRangeFsm( FsmGraph *rangeEnd ) +{ + /* Must have two states. */ + if ( rangeEnd->stateList.length() != 2 ) + return false; + /* The start state cannot be final. */ + if ( rangeEnd->startState->isFinState() ) + return false; + /* There should be only one final state. */ + if ( rangeEnd->finStateSet.length() != 1 ) + return false; + /* The final state cannot have any transitions out. */ + if ( rangeEnd->finStateSet[0]->outList.length() != 0 ) + return false; + /* The start state should have only one transition out. */ + if ( rangeEnd->startState->outList.length() != 1 ) + return false; + /* The singe transition out of the start state should not be a range. */ + FsmTrans *startTrans = rangeEnd->startState->outList.head; + if ( startTrans->lowKey != startTrans->highKey ) + return false; + return true; +} + +/* Evaluate a range. Gets the lower an upper key and makes an fsm range. */ +FsmGraph *Range::walk( Compiler *pd ) +{ + /* Construct and verify the suitability of the lower end of the range. */ + FsmGraph *lowerFsm = lowerLit->walk( pd ); + if ( !verifyRangeFsm( lowerFsm ) ) { + error(lowerLit->loc) << + "bad range lower end, must be a single character" << endl; + } + + /* Construct and verify the upper end. */ + FsmGraph *upperFsm = upperLit->walk( pd ); + if ( !verifyRangeFsm( upperFsm ) ) { + error(upperLit->loc) << + "bad range upper end, must be a single character" << endl; + } + + /* Grab the keys from the machines, then delete them. */ + Key lowKey = lowerFsm->startState->outList.head->lowKey; + Key highKey = upperFsm->startState->outList.head->lowKey; + delete lowerFsm; + delete upperFsm; + + /* Validate the range. */ + if ( lowKey > highKey ) { + /* Recover by setting upper to lower; */ + error(lowerLit->loc) << "lower end of range is greater then upper end" << endl; + highKey = lowKey; + } + + /* Return the range now that it is validated. */ + FsmGraph *retFsm = new FsmGraph(); + retFsm->rangeFsm( lowKey, highKey ); + return retFsm; +} + +/* Evaluate a literal object. */ +FsmGraph *Literal::walk( Compiler *pd ) +{ + /* FsmGraph to return, is the alphabet signed. */ + FsmGraph *rtnVal = 0; + + switch ( type ) { + case Number: { + /* Make the fsm key in int format. */ + Key fsmKey = makeFsmKeyNum( literal.data, loc, pd ); + /* Make the new machine. */ + rtnVal = new FsmGraph(); + rtnVal->concatFsm( fsmKey ); + break; + } + case LitString: { + /* Make the array of keys in int format. */ + String interp; + bool caseInsensitive; + prepareLitString( interp, caseInsensitive, literal, loc ); + Key *arr = new Key[interp.length()]; + makeFsmKeyArray( arr, interp.data, interp.length(), pd ); + + /* Make the new machine. */ + rtnVal = new FsmGraph(); + if ( caseInsensitive ) + rtnVal->concatFsmCI( arr, interp.length() ); + else + rtnVal->concatFsm( arr, interp.length() ); + delete[] arr; + break; + }} + return rtnVal; +} + +/* Clean up after a regular expression object. */ +RegExpr::~RegExpr() +{ + switch ( type ) { + case RecurseItem: + delete regExp; + delete item; + break; + case Empty: + break; + } +} + +/* Evaluate a regular expression object. */ +FsmGraph *RegExpr::walk( Compiler *pd, RegExpr *rootRegex ) +{ + /* This is the root regex, pass down a pointer to this. */ + if ( rootRegex == 0 ) + rootRegex = this; + + FsmGraph *rtnVal = 0; + switch ( type ) { + case RecurseItem: { + /* Walk both items. */ + FsmGraph *fsm1 = regExp->walk( pd, rootRegex ); + FsmGraph *fsm2 = item->walk( pd, rootRegex ); + if ( fsm1 == 0 ) + rtnVal = fsm2; + else { + fsm1->concatOp( fsm2 ); + rtnVal = fsm1; + } + break; + } + case Empty: { + /* FIXME: Return something here. */ + rtnVal = 0; + break; + } + } + return rtnVal; +} + +/* Clean up after an item in a regular expression. */ +ReItem::~ReItem() +{ + switch ( type ) { + case Data: + case Dot: + break; + case OrBlock: + case NegOrBlock: + delete orBlock; + break; + } +} + +/* Evaluate a regular expression object. */ +FsmGraph *ReItem::walk( Compiler *pd, RegExpr *rootRegex ) +{ + /* The fsm to return, is the alphabet signed? */ + FsmGraph *rtnVal = 0; + + switch ( type ) { + case Data: { + /* Move the data into an integer array and make a concat fsm. */ + Key *arr = new Key[data.length()]; + makeFsmKeyArray( arr, data.data, data.length(), pd ); + + /* Make the concat fsm. */ + rtnVal = new FsmGraph(); + if ( rootRegex != 0 && rootRegex->caseInsensitive ) + rtnVal->concatFsmCI( arr, data.length() ); + else + rtnVal->concatFsm( arr, data.length() ); + delete[] arr; + break; + } + case Dot: { + /* Make the dot fsm. */ + rtnVal = dotFsm( pd ); + break; + } + case OrBlock: { + /* Get the or block and minmize it. */ + rtnVal = orBlock->walk( pd, rootRegex ); + rtnVal->minimizePartition2(); + break; + } + case NegOrBlock: { + /* Get the or block and minimize it. */ + FsmGraph *fsm = orBlock->walk( pd, rootRegex ); + fsm->minimizePartition2(); + + /* Make a dot fsm and subtract from it. */ + rtnVal = dotFsm( pd ); + rtnVal->subtractOp( fsm ); + rtnVal->minimizePartition2(); + break; + } + } + + return rtnVal; +} + +/* Clean up after an or block of a regular expression. */ +ReOrBlock::~ReOrBlock() +{ + switch ( type ) { + case RecurseItem: + delete orBlock; + delete item; + break; + case Empty: + break; + } +} + + +/* Evaluate an or block of a regular expression. */ +FsmGraph *ReOrBlock::walk( Compiler *pd, RegExpr *rootRegex ) +{ + FsmGraph *rtnVal = 0; + switch ( type ) { + case RecurseItem: { + /* Evaluate the two fsm. */ + FsmGraph *fsm1 = orBlock->walk( pd, rootRegex ); + FsmGraph *fsm2 = item->walk( pd, rootRegex ); + if ( fsm1 == 0 ) + rtnVal = fsm2; + else { + fsm1->unionOp( fsm2 ); + rtnVal = fsm1; + } + break; + } + case Empty: { + rtnVal = 0; + break; + } + } + return rtnVal;; +} + +/* Evaluate an or block item of a regular expression. */ +FsmGraph *ReOrItem::walk( Compiler *pd, RegExpr *rootRegex ) +{ + /* The return value, is the alphabet signed? */ + FsmGraph *rtnVal = 0; + switch ( type ) { + case Data: { + /* Make the or machine. */ + rtnVal = new FsmGraph(); + + /* Put the or data into an array of ints. Note that we find unique + * keys. Duplicates are silently ignored. The alternative would be to + * issue warning or an error but since we can't with [a0-9a] or 'a' | + * 'a' don't bother here. */ + KeySet keySet; + makeFsmUniqueKeyArray( keySet, data.data, data.length(), + rootRegex != 0 ? rootRegex->caseInsensitive : false, pd ); + + /* Run the or operator. */ + rtnVal->orFsm( keySet.data, keySet.length() ); + break; + } + case Range: { + /* Make the upper and lower keys. */ + Key lowKey = makeFsmKeyChar( lower, pd ); + Key highKey = makeFsmKeyChar( upper, pd ); + + /* Validate the range. */ + if ( lowKey > highKey ) { + /* Recover by setting upper to lower; */ + error(loc) << "lower end of range is greater then upper end" << endl; + highKey = lowKey; + } + + /* Make the range machine. */ + rtnVal = new FsmGraph(); + rtnVal->rangeFsm( lowKey, highKey ); + + if ( rootRegex != 0 && rootRegex->caseInsensitive ) { + if ( lowKey <= 'Z' && 'A' <= highKey ) { + Key otherLow = lowKey < 'A' ? Key('A') : lowKey; + Key otherHigh = 'Z' < highKey ? Key('Z') : highKey; + + otherLow = 'a' + ( otherLow - 'A' ); + otherHigh = 'a' + ( otherHigh - 'A' ); + + FsmGraph *otherRange = new FsmGraph(); + otherRange->rangeFsm( otherLow, otherHigh ); + rtnVal->unionOp( otherRange ); + rtnVal->minimizePartition2(); + } + else if ( lowKey <= 'z' && 'a' <= highKey ) { + Key otherLow = lowKey < 'a' ? Key('a') : lowKey; + Key otherHigh = 'z' < highKey ? Key('z') : highKey; + + otherLow = 'A' + ( otherLow - 'a' ); + otherHigh = 'A' + ( otherHigh - 'a' ); + + FsmGraph *otherRange = new FsmGraph(); + otherRange->rangeFsm( otherLow, otherHigh ); + rtnVal->unionOp( otherRange ); + rtnVal->minimizePartition2(); + } + } + + break; + }} + return rtnVal; +} diff --git a/src/parsetree.h b/src/parsetree.h new file mode 100644 index 0000000..f03ab3f --- /dev/null +++ b/src/parsetree.h @@ -0,0 +1,3191 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _PARSETREE_H +#define _PARSETREE_H + +#include <iostream> +#include <string.h> + +#include "global.h" +#include "avlmap.h" +#include "bstmap.h" +#include "bstset.h" +#include "vector.h" +#include "dlist.h" +#include "dlistval.h" +#include "dlistmel.h" +#include "cstring.h" +#include "bytecode.h" +#include "avlbasic.h" + +/* Operators that are represented with single symbol characters. */ +#define OP_DoubleEql 'e' +#define OP_NotEql 'q' +#define OP_LessEql 'l' +#define OP_GrtrEql 'g' +#define OP_LogicalAnd 'a' +#define OP_LogicalOr 'o' +#define OP_Deref 'd' + +#if SIZEOF_LONG != 4 && SIZEOF_LONG != 8 + #error "SIZEOF_LONG contained an unexpected value" +#endif + +struct NameInst; +struct FsmGraph; +struct RedFsm; +struct _FsmRun; +struct ObjectDef; +struct ElementOf; +struct UniqueType; +struct ObjectField; +struct TransBlock; +struct CodeBlock; +struct PdaLiteral; +struct TypeAlias; +struct RegionSet; +struct ObjNameScope; +struct IterCall; +typedef struct _PdaRun PdaRun; + +/* + * Code Vector + */ +struct CodeVect : public Vector<Code> +{ + void appendHalf( Half half ) + { + /* not optimal. */ + append( half & 0xff ); + append( (half>>8) & 0xff ); + } + + void appendWord( Word word ) + { + /* not optimal. */ + append( word & 0xff ); + append( (word>>8) & 0xff ); + append( (word>>16) & 0xff ); + append( (word>>24) & 0xff ); + #if SIZEOF_LONG == 8 + append( (word>>32) & 0xff ); + append( (word>>40) & 0xff ); + append( (word>>48) & 0xff ); + append( (word>>56) & 0xff ); + #endif + } + + void setHalf( long pos, Half half ) + { + /* not optimal. */ + data[pos] = half & 0xff; + data[pos+1] = (half>>8) & 0xff; + } + + void insertHalf( long pos, Half half ) + { + /* not optimal. */ + insert( pos, half & 0xff ); + insert( pos+1, (half>>8) & 0xff ); + } + + void insertWord( long pos, Word word ) + { + /* not at all optimal. */ + insert( pos, word & 0xff ); + insert( pos+1, (word>>8) & 0xff ); + insert( pos+2, (word>>16) & 0xff ); + insert( pos+3, (word>>24) & 0xff ); + #if SIZEOF_LONG == 8 + insert( pos+4, (word>>32) & 0xff ); + insert( pos+5, (word>>40) & 0xff ); + insert( pos+6, (word>>48) & 0xff ); + insert( pos+7, (word>>56) & 0xff ); + #endif + } + + void insertTree( long pos, Tree *tree ) + { insertWord( pos, (Word) tree ); } +}; + + + +/* Types of builtin machines. */ +enum BuiltinMachine +{ + BT_Any, + BT_Ascii, + BT_Extend, + BT_Alpha, + BT_Digit, + BT_Alnum, + BT_Lower, + BT_Upper, + BT_Cntrl, + BT_Graph, + BT_Print, + BT_Punct, + BT_Space, + BT_Xdigit, + BT_Lambda, + BT_Empty +}; + +/* Must match the LI defines in pdarun.h. */ +enum LocalType +{ + LT_Tree = 1, + LT_Iter, + LT_RevIter, + LT_UserIter +}; + +struct LocalLoc +{ + LocalLoc( LocalType type, int scope, int offset ) + : scope(scope), type(type), offset(offset) {} + + int scope; + LocalType type; + int offset; +}; + +struct Locals +{ + Vector<LocalLoc> locals; + + void append( const LocalLoc &ll ) + { + int pos = 0; + while ( pos < locals.length() && ll.scope >= locals[pos].scope ) + pos += 1; + locals.insert( pos, ll ); + } +}; + +typedef BstSet<char> CharSet; +typedef Vector<unsigned char> UnsignedCharVect; + + +struct Compiler; +struct TypeRef; + +/* Leaf type. */ +struct Literal; + +/* Tree nodes. */ + +struct LexTerm; +struct LexFactorAug; +struct LexFactorRep; +struct LexFactorNeg; +struct LexFactor; +struct LexExpression; +struct LexJoin; +struct JoinOrLm; +struct RegionJoinOrLm; +struct TokenRegion; +struct Namespace; +struct Context; +struct TokenDef; +struct TokenDefListReg; +struct TokenDefListNs; +struct TokenInstance; +struct TokenInstanceListReg; +struct Range; +struct LangEl; + +enum AugType +{ + at_start, + at_leave, +}; + +struct Action; +struct PriorDesc; +struct RegExpr; +struct ReItem; +struct ReOrBlock; +struct ReOrItem; +struct ExplicitMachine; +struct InlineItem; +struct InlineList; + +/* Reference to a named state. */ +typedef Vector<String> NameRef; +typedef Vector<NameRef*> NameRefList; +typedef Vector<NameInst*> NameTargList; + +/* Structure for storing location of epsilon transitons. */ +struct EpsilonLink +{ + EpsilonLink( const InputLoc &loc, NameRef &target ) + : loc(loc), target(target) { } + + InputLoc loc; + NameRef target; +}; + +struct Label +{ + Label( const InputLoc &loc, const String &data, ObjectField *objField ) + : loc(loc), data(data), objField(objField) { } + + InputLoc loc; + String data; + ObjectField *objField; +}; + +/* Structure represents an action assigned to some LexFactorAug node. The + * factor with aug will keep an array of these. */ +struct ParserAction +{ + ParserAction( const InputLoc &loc, AugType type, int localErrKey, Action *action ) + : loc(loc), type(type), localErrKey(localErrKey), action(action) { } + + InputLoc loc; + AugType type; + int localErrKey; + Action *action; +}; + +struct Token +{ + String data; + InputLoc loc; +}; + +void prepareLitString( String &result, bool &caseInsensitive, + const String &srcString, const InputLoc &loc ); + +std::ostream &operator<<(std::ostream &out, const Token &token ); + +typedef AvlMap< String, TokenInstance*, CmpStr > LiteralDict; +typedef AvlMapEl< String, TokenInstance* > LiteralDictEl; + +/* Store the value and type of a priority augmentation. */ +struct PriorityAug +{ + PriorityAug( AugType type, int priorKey, int priorValue ) : + type(type), priorKey(priorKey), priorValue(priorValue) { } + + AugType type; + int priorKey; + int priorValue; +}; + +/* + * A Variable Definition + */ +struct LexDefinition +{ + LexDefinition( const String &name, LexJoin *join ) + : name(name), join(join) { } + + /* Parse tree traversal. */ + FsmGraph *walk( Compiler *pd ); + void makeNameTree( const InputLoc &loc, Compiler *pd ); + + String name; + LexJoin *join; +}; + +typedef Vector<String> StringVect; +typedef CmpTable<String, CmpStr> CmpStrVect; + +struct NamespaceQual +{ + NamespaceQual() + : + cachedNspaceQual(0), + declInNspace(0) + {} + + static NamespaceQual *cons( Namespace *declInNspace ) + { + NamespaceQual *nsq = new NamespaceQual; + nsq->declInNspace = declInNspace; + return nsq; + } + + Namespace *cachedNspaceQual; + Namespace *declInNspace; + + StringVect qualNames; + + Namespace *searchFrom( Namespace *from, StringVect::Iter &qualPart ); + Namespace *getQual( Compiler *pd ); + bool thisOnly() + { return qualNames.length() != 0; } +}; + +struct ReCapture +{ + ReCapture( Action *markEnter, Action *markLeave, ObjectField *objField ) + : markEnter(markEnter), markLeave(markLeave), objField(objField) {} + + Action *markEnter; + Action *markLeave; + ObjectField *objField; +}; + +struct ContextStack + : public Vector<Context*> +{ + Context *top() + { return length() > 0 ? Vector<Context*>::top() : 0; } +}; + + +struct Context +{ + Context( const InputLoc &loc, LangEl *lel ) + : + loc(loc), + lel(lel) + {} + + InputLoc loc; + LangEl *lel; + + ObjectDef *contextObjDef; +}; + +typedef Vector<ReCapture> ReCaptureVect; + +struct TokenDefPtr1 +{ + TokenDef *prev, *next; +}; + +struct TokenDefPtr2 +{ + TokenDef *prev, *next; +}; + +struct TokenDef +: + public TokenDefPtr1, + public TokenDefPtr2 +{ + TokenDef() + : + action(0), tdLangEl(0), inLmSelect(false), dupOf(0), + noPostIgnore(false), noPreIgnore(false), isZero(false) + {} + + static TokenDef *cons( const String &name, const String &literal, bool isLiteral, bool isIgnore, + LexJoin *join, CodeBlock *codeBlock, const InputLoc &semiLoc, + int longestMatchId, Namespace *nspace, RegionSet *regionSet, + ObjectDef *objectDef, Context *contextIn ) + { + TokenDef *t = new TokenDef; + + t->name = name; + t->literal = literal; + t->isLiteral = isLiteral; + t->isIgnore = isIgnore; + t->join = join; + t->action = 0; + t->codeBlock = codeBlock; + t->tdLangEl = 0; + t->semiLoc = semiLoc; + t->longestMatchId = longestMatchId; + t->inLmSelect = false; + t->nspace = nspace; + t->regionSet = regionSet; + t->objectDef = objectDef; + t->contextIn = contextIn; + t->dupOf = 0; + t->noPostIgnore = false; + t->noPreIgnore = false; + t->isZero = false; + + return t; + } + + InputLoc getLoc(); + + String name; + String literal; + bool isLiteral; + bool isIgnore; + LexJoin *join; + Action *action; + CodeBlock *codeBlock; + LangEl *tdLangEl; + InputLoc semiLoc; + + Action *setActId; + Action *actOnLast; + Action *actOnNext; + Action *actLagBehind; + int longestMatchId; + bool inLmSelect; + Namespace *nspace; + RegionSet *regionSet; + ReCaptureVect reCaptureVect; + ObjectDef *objectDef; + Context *contextIn; + + TokenDef *dupOf; + bool noPostIgnore; + bool noPreIgnore; + bool isZero; +}; + +struct TokenInstancePtr +{ + TokenInstance *prev, *next; +}; + +struct TokenInstance +: + public TokenInstancePtr +{ + TokenInstance() + : + action(0), + inLmSelect(false), + dupOf(0) + {} + + static TokenInstance *cons( TokenDef *tokenDef, + LexJoin *join, const InputLoc &semiLoc, + int longestMatchId, Namespace *nspace, TokenRegion *tokenRegion ) + { + TokenInstance *t = new TokenInstance; + + t->tokenDef = tokenDef; + t->join = join; + t->action = 0; + t->semiLoc = semiLoc; + t->longestMatchId = longestMatchId; + t->inLmSelect = false; + t->nspace = nspace; + t->tokenRegion = tokenRegion; + t->dupOf = 0; + + return t; + } + + InputLoc getLoc(); + + TokenDef *tokenDef; + LexJoin *join; + Action *action; + InputLoc semiLoc; + + Action *setActId; + Action *actOnLast; + Action *actOnNext; + Action *actLagBehind; + int longestMatchId; + bool inLmSelect; + Namespace *nspace; + TokenRegion *tokenRegion; + + TokenInstance *dupOf; +}; + +struct LelDefList; + +struct NtDef +{ + static NtDef *cons( const String &name, Namespace *nspace, + LelDefList *defList, ObjectDef *objectDef, + Context *contextIn, bool reduceFirst ) + { + NtDef *nt = new NtDef; + + nt->name = name; + nt->nspace = nspace; + nt->defList = defList; + nt->objectDef = objectDef; + nt->contextIn = contextIn; + nt->reduceFirst = reduceFirst; + + return nt; + } + + static NtDef *cons( const String &name, Namespace *nspace, + Context *contextIn, bool reduceFirst ) + { + NtDef *nt = new NtDef; + + nt->name = name; + nt->nspace = nspace; + nt->defList = 0; + nt->objectDef = 0; + nt->contextIn = contextIn; + nt->reduceFirst = reduceFirst; + + return nt; + } + + String name; + Namespace *nspace; + LelDefList *defList; + ObjectDef *objectDef; + Context *contextIn; + bool reduceFirst; + + NtDef *prev, *next; +}; + +struct NtDefList : DList<NtDef> {}; + +/* Declare a new type so that ptreetypes.h need not include dlist.h. */ +struct TokenInstanceListReg : DListMel<TokenInstance, TokenInstancePtr> {}; + +/* Declare a new type so that ptreetypes.h need not include dlist.h. */ +struct TokenDefListReg : DListMel<TokenDef, TokenDefPtr1> {}; +struct TokenDefListNs : DListMel<TokenDef, TokenDefPtr2> {}; + +struct ContextDef +{ + ContextDef( const String &name, Context *context, Namespace *nspace ) + : name(name), context(context), nspace(nspace) {} + + String name; + Context *context; + Namespace *nspace; + + ContextDef *prev, *next; +}; + +struct ContextDefList : DList<ContextDef> {}; + +struct TypeMapEl + : public AvlTreeEl<TypeMapEl> +{ + enum Type + { + TypeAliasType = 1, + LangElType + }; + + const String &getKey() { return key; } + + TypeMapEl( const String &key, TypeRef *typeRef ) + : type(TypeAliasType), key(key), value(0), typeRef(typeRef) {} + + TypeMapEl( const String &key, LangEl *value ) + : type(LangElType), key(key), value(value), typeRef(0) {} + + Type type; + String key; + LangEl *value; + TypeRef *typeRef; + + TypeMapEl *prev, *next; +}; + +/* Symbol Map. */ +typedef AvlTree< TypeMapEl, String, CmpStr > TypeMap; + +typedef Vector<TokenRegion*> RegionVect; + +struct RegionImpl +{ + RegionImpl() + : + regionNameInst(0), + lmActSelect(0), + lmSwitchHandlesError(false), + defaultTokenInstance(0), + wasEmpty(false) + {} + + InputLoc loc; + + /* This gets saved off during the name walk. Can save it off because token + * regions are referenced once only. */ + NameInst *regionNameInst; + + TokenInstanceListReg tokenInstanceList; + Action *lmActSelect; + bool lmSwitchHandlesError; + TokenInstance *defaultTokenInstance; + + /* We alway init empty scanners with a single token. If we had to do this + * then wasEmpty is true. */ + bool wasEmpty; + + RegionImpl *prev, *next; + + void runLongestMatch( Compiler *pd, FsmGraph *graph ); + void transferScannerLeavingActions( FsmGraph *graph ); + FsmGraph *walk( Compiler *pd ); + + void restart( FsmGraph *graph, FsmTrans *trans ); + void makeNameTree( const InputLoc &loc, Compiler *pd ); + void makeActions( Compiler *pd ); + Action *newAction( Compiler *pd, const InputLoc &loc, + const String &name, InlineList *inlineList ); +}; + +struct TokenRegion +{ + /* Construct with a list of joins */ + TokenRegion( const InputLoc &loc, int id, RegionImpl *impl ) + : + loc(loc), + id(id), + preEofBlock(0), + zeroLel(0), + ignoreOnly(0), + impl(impl) + { } + + InputLoc loc; + int id; + + CodeBlock *preEofBlock; + + LangEl *zeroLel; + TokenRegion *ignoreOnly; + + RegionImpl *impl; + + TokenRegion *next, *prev; + + /* Tree traversal. */ + void findName( Compiler *pd ); +}; + +struct RegionSet +{ + RegionSet( RegionImpl *implTokenIgnore, RegionImpl *implTokenOnly, + RegionImpl *implIgnoreOnly, TokenRegion *tokenIgnore, + TokenRegion *tokenOnly, TokenRegion *ignoreOnly, + TokenRegion *collectIgnore ) + : + implTokenIgnore(implTokenIgnore), + implTokenOnly(implTokenOnly), + implIgnoreOnly(implIgnoreOnly), + + tokenIgnore(tokenIgnore), + tokenOnly(tokenOnly), + ignoreOnly(ignoreOnly), + collectIgnore(collectIgnore) + {} + + /* Provides the scanner state machines. We reuse ignore-only. */ + RegionImpl *implTokenIgnore; + RegionImpl *implTokenOnly; + RegionImpl *implIgnoreOnly; + + TokenRegion *tokenIgnore; + TokenRegion *tokenOnly; + TokenRegion *ignoreOnly; + TokenRegion *collectIgnore; + + + TokenDefListReg tokenDefList; + + RegionSet *next, *prev; +}; + +typedef Vector<RegionSet*> RegionSetVect; + +typedef DList<RegionSet> RegionSetList; +typedef DList<TokenRegion> RegionList; +typedef DList<RegionImpl> RegionImplList; + +typedef Vector<Namespace*> NamespaceVect; + +struct GenericType + : public DListEl<GenericType> +{ + GenericType( const String &name, long typeId, long id, + LangEl *langEl, TypeRef *typeArg ) + : + name(name), typeId(typeId), id(id), langEl(langEl), + typeArg(typeArg), keyTypeArg(0), + utArg(0), keyUT(0), + objDef(0) + {} + + const String &getKey() const + { return name; }; + + void declare( Compiler *pd, Namespace *nspace ); + + String name; + long typeId; + long id; + LangEl *langEl; + TypeRef *typeArg; + TypeRef *keyTypeArg; + UniqueType *utArg; + UniqueType *keyUT; + + ObjectDef *objDef; +}; + +typedef DList<GenericType> GenericList; + +typedef struct _UserIter UserIter; +typedef AvlMap<String, UserIter*, CmpStr> UserIterMap; +typedef AvlMapEl<String, UserIter*> UserIterMapEl; + +/* Graph dictionary. */ +struct GraphDictEl +: + public AvlTreeEl<GraphDictEl>, + public DListEl<GraphDictEl> +{ + GraphDictEl( const String &key ) + : key(key), value(0), isInstance(false) { } + + GraphDictEl( const String &key, LexDefinition *value ) + : key(key), value(value), isInstance(false) { } + + const String &getKey() { return key; } + + String key; + LexDefinition *value; + bool isInstance; + + /* Location info of graph definition. Points to variable name of assignment. */ + InputLoc loc; +}; + +typedef AvlTree<GraphDictEl, String, CmpStr> GraphDict; +typedef DList<GraphDictEl> GraphList; + +struct TypeAlias +{ + TypeAlias( const InputLoc &loc, Namespace *nspace, + const String &name, TypeRef *typeRef ) + : + loc(loc), + nspace(nspace), + name(name), + typeRef(typeRef) + {} + + InputLoc loc; + Namespace *nspace; + String name; + TypeRef *typeRef; + + TypeAlias *prev, *next; +}; + +typedef DList<TypeAlias> TypeAliasList; + +struct Namespace +{ + /* Construct with a list of joins */ + Namespace( const InputLoc &loc, const String &name, int id, + Namespace *parentNamespace ) : + loc(loc), name(name), id(id), + parentNamespace(parentNamespace) { } + + /* Tree traversal. */ + Namespace *findNamespace( const String &name ); + + InputLoc loc; + String name; + int id; + + /* Literal patterns and the dictionary mapping literals to the underlying + * tokens. */ + LiteralDict literalDict; + + /* List of tokens defs in the namespace. */ + TokenDefListNs tokenDefList; + + /* List of nonterminal defs in the namespace. */ + NtDefList ntDefList; + + /* List of context definitions for encapsulating the data of a parser. */ + ContextDefList contextDefList; + + /* Dictionary of symbols within the region. */ + TypeMap typeMap; + GenericList genericList; + + /* regular language definitions. */ + GraphDict rlMap; + + TypeAliasList typeAliasList; + + Namespace *parentNamespace; + NamespaceVect childNamespaces; + + Namespace *next, *prev; + + void declare( Compiler *pd ); +}; + +typedef DList<Namespace> NamespaceList; +typedef BstSet< Namespace*, CmpOrd<Namespace*> > NamespaceSet; + +/* + * LexJoin + */ +struct LexJoin +{ + LexJoin() + : + expr(0), + context(0), + mark(0) + {} + + static LexJoin *cons( LexExpression *expr ) + { + LexJoin *j = new LexJoin; + j->expr = expr; + return j; + } + + /* Tree traversal. */ + FsmGraph *walk( Compiler *pd ); + void makeNameTree( Compiler *pd ); + void varDecl( Compiler *pd, TokenDef *tokenDef ); + + /* Data. */ + LexExpression *expr; + LexJoin *context; + Action *mark; +}; + +/* + * LexExpression + */ +struct LexExpression +{ + enum Type { + OrType, + IntersectType, + SubtractType, + StrongSubtractType, + TermType, + BuiltinType + }; + + LexExpression( ) : + expression(0), term(0), builtin((BuiltinMachine)-1), + type((Type)-1), prev(this), next(this) { } + + /* Construct with an expression on the left and a term on the right. */ + static LexExpression *cons( LexExpression *expression, LexTerm *term, Type type ) + { + LexExpression *ret = new LexExpression; + ret->type = type; + ret->expression = expression; + ret->term = term; + return ret; + } + + /* Construct with only a term. */ + static LexExpression *cons( LexTerm *term ) + { + LexExpression *ret = new LexExpression; + ret->type = TermType; + ret->term = term; + return ret; + } + + /* Construct with a builtin type. */ + static LexExpression *cons( BuiltinMachine builtin ) + { + LexExpression *ret = new LexExpression; + ret->type = BuiltinType; + ret->builtin = builtin; + return ret; + } + + ~LexExpression(); + + /* Tree traversal. */ + FsmGraph *walk( Compiler *pd, bool lastInSeq = true ); + void makeNameTree( Compiler *pd ); + void varDecl( Compiler *pd, TokenDef *tokenDef ); + + /* Node data. */ + LexExpression *expression; + LexTerm *term; + BuiltinMachine builtin; + Type type; + + LexExpression *prev, *next; +}; + +/* + * LexTerm + */ +struct LexTerm +{ + enum Type { + ConcatType, + RightStartType, + RightFinishType, + LeftType, + FactorAugType + }; + + LexTerm() : + term(0), factorAug(0), type((Type)-1) { } + + static LexTerm *cons( LexTerm *term, LexFactorAug *factorAug ) + { + LexTerm *ret = new LexTerm; + ret->type = ConcatType; + ret->term = term; + ret->factorAug = factorAug; + return ret; + } + + static LexTerm *cons( LexTerm *term, LexFactorAug *factorAug, Type type ) + { + LexTerm *ret = new LexTerm; + ret->type = type; + ret->term = term; + ret->factorAug = factorAug; + return ret; + } + + static LexTerm *cons( LexFactorAug *factorAug ) + { + LexTerm *ret = new LexTerm; + ret->type = FactorAugType; + ret->factorAug = factorAug; + return ret; + } + + ~LexTerm(); + + FsmGraph *walk( Compiler *pd, bool lastInSeq = true ); + void makeNameTree( Compiler *pd ); + void varDecl( Compiler *pd, TokenDef *tokenDef ); + + LexTerm *term; + LexFactorAug *factorAug; + Type type; + + /* Priority descriptor for RightFinish type. */ + PriorDesc priorDescs[2]; +}; + + +/* Third level of precedence. Augmenting nodes with actions and priorities. */ +struct LexFactorAug +{ + LexFactorAug() : + factorRep(0) { } + + static LexFactorAug *cons( LexFactorRep *factorRep ) + { + LexFactorAug *f = new LexFactorAug; + f->factorRep = factorRep; + return f; + } + + ~LexFactorAug(); + + /* Tree traversal. */ + FsmGraph *walk( Compiler *pd ); + void makeNameTree( Compiler *pd ); + void varDecl( Compiler *pd, TokenDef *tokenDef ); + + void assignActions( Compiler *pd, FsmGraph *graph, int *actionOrd ); + + /* Actions and priorities assigned to the factor node. */ + Vector<ParserAction> actions; + ReCaptureVect reCaptureVect; + + LexFactorRep *factorRep; +}; + +/* Fourth level of precedence. Trailing unary operators. Provide kleen star, + * optional and plus. */ +struct LexFactorRep +{ + enum Type { + StarType, + StarStarType, + OptionalType, + PlusType, + ExactType, + MaxType, + MinType, + RangeType, + FactorNegType + }; + + LexFactorRep() + : + factorRep(0), + factorNeg(0), + lowerRep(0), + upperRep(upperRep), + type((Type)-1) + { } + + static LexFactorRep *cons( const InputLoc &loc, LexFactorRep *factorRep, + int lowerRep, int upperRep, Type type ) + { + LexFactorRep *f = new LexFactorRep; + f->type = type; + f->loc = loc; + f->factorRep = factorRep; + f->factorNeg = 0; + f->lowerRep = lowerRep; + f->upperRep = upperRep; + return f; + } + + static LexFactorRep *cons( LexFactorNeg *factorNeg ) + { + LexFactorRep *f = new LexFactorRep; + f->type = FactorNegType; + f->factorNeg = factorNeg; + return f; + } + + ~LexFactorRep(); + + /* Tree traversal. */ + FsmGraph *walk( Compiler *pd ); + void makeNameTree( Compiler *pd ); + + InputLoc loc; + LexFactorRep *factorRep; + LexFactorNeg *factorNeg; + int lowerRep, upperRep; + Type type; + + /* Priority descriptor for StarStar type. */ + PriorDesc priorDescs[2]; +}; + +/* Fifth level of precedence. Provides Negation. */ +struct LexFactorNeg +{ + enum Type { + NegateType, + CharNegateType, + FactorType + }; + + LexFactorNeg() + : + factorNeg(0), + factor(0), + type((Type)-1) + {} + + static LexFactorNeg *cons( LexFactorNeg *factorNeg, Type type ) + { + LexFactorNeg *f = new LexFactorNeg; + f->type = type; + f->factorNeg = factorNeg; + f->factor = 0; + return f; + } + + static LexFactorNeg *cons( LexFactor *factor ) + { + LexFactorNeg *f = new LexFactorNeg; + f->type = FactorType; + f->factorNeg = 0; + f->factor = factor; + return f; + } + + ~LexFactorNeg(); + + /* Tree traversal. */ + FsmGraph *walk( Compiler *pd ); + void makeNameTree( Compiler *pd ); + + LexFactorNeg *factorNeg; + LexFactor *factor; + Type type; +}; + +/* + * LexFactor + */ +struct LexFactor +{ + /* Language elements a factor node can be. */ + enum Type { + LiteralType, + RangeType, + OrExprType, + RegExprType, + ReferenceType, + ParenType, + }; + + LexFactor() + : + literal(0), + range(0), + reItem(0), + regExp(0), + varDef(0), + join(0), + lower(0), + upper(0), + type((Type)-1) + {} + + /* Construct with a literal fsm. */ + static LexFactor *cons( Literal *literal ) + { + LexFactor *f = new LexFactor; + f->type = LiteralType; + f->literal = literal; + return f; + } + + /* Construct with a range. */ + static LexFactor *cons( Range *range ) + { + LexFactor *f = new LexFactor; + f->type = RangeType; + f->range = range; + return f; + } + + /* Construct with the or part of a regular expression. */ + static LexFactor *cons( ReItem *reItem ) + { + LexFactor *f = new LexFactor; + f->type = OrExprType; + f->reItem = reItem; + return f; + } + + /* Construct with a regular expression. */ + static LexFactor *cons( RegExpr *regExp ) + { + LexFactor *f = new LexFactor; + f->type = RegExprType; + f->regExp = regExp; + return f; + } + + /* Construct with a reference to a var def. */ + static LexFactor *cons( const InputLoc &loc, LexDefinition *varDef ) + { + LexFactor *f = new LexFactor; + f->type = ReferenceType; + f->loc = loc; + f->varDef = varDef; + return f; + } + + /* Construct with a parenthesized join. */ + static LexFactor *cons( LexJoin *join ) + { + LexFactor *f = new LexFactor; + f->type = ParenType; + f->join = join; + return f; + } + + /* Cleanup. */ + ~LexFactor(); + + /* Tree traversal. */ + FsmGraph *walk( Compiler *pd ); + void makeNameTree( Compiler *pd ); + + InputLoc loc; + Literal *literal; + Range *range; + ReItem *reItem; + RegExpr *regExp; + LexDefinition *varDef; + LexJoin *join; + int lower, upper; + Type type; +}; + +/* A range machine. Only ever composed of two literals. */ +struct Range +{ + static Range *cons( Literal *lowerLit, Literal *upperLit ) + { + Range *r = new Range; + r->lowerLit = lowerLit; + r->upperLit = upperLit; + return r; + } + + ~Range(); + FsmGraph *walk( Compiler *pd ); + bool verifyRangeFsm( FsmGraph *rangeEnd ); + + Literal *lowerLit; + Literal *upperLit; +}; + +/* Some literal machine. Can be a number or literal string. */ +struct Literal +{ + enum LiteralType { Number, LitString }; + + static Literal *cons( const InputLoc &loc, const String &literal, LiteralType type ) + { + Literal *l = new Literal; + l->loc = loc; + l->literal = literal; + l->type = type; + return l; + } + + FsmGraph *walk( Compiler *pd ); + + InputLoc loc; + String literal; + LiteralType type; +}; + +/* Regular expression. */ +struct RegExpr +{ + enum RegExpType { RecurseItem, Empty }; + + /* Constructors. */ + static RegExpr *cons() + { + RegExpr *r = new RegExpr; + r->type = Empty; + r->caseInsensitive = false; + return r; + } + + static RegExpr *cons( RegExpr *regExp, ReItem *item ) + { + RegExpr *r = new RegExpr; + r->regExp = regExp; + r->item = item; + r->type = RecurseItem; + r->caseInsensitive = false; + return r; + } + + ~RegExpr(); + FsmGraph *walk( Compiler *pd, RegExpr *rootRegex ); + + RegExpr *regExp; + ReItem *item; + RegExpType type; + bool caseInsensitive; +}; + +/* An item in a regular expression. */ +struct ReItem +{ + enum ReItemType { Data, Dot, OrBlock, NegOrBlock }; + + static ReItem *cons( const String &data ) + { + ReItem *r = new ReItem; + r->data = data; + r->type = Data; + return r; + } + + static ReItem *cons( ReItemType type ) + { + ReItem *r = new ReItem; + r->type = type; + return r; + } + + static ReItem *cons( ReOrBlock *orBlock, ReItemType type ) + { + ReItem *r = new ReItem; + r->orBlock = orBlock; + r->type = type; + return r; + } + + ~ReItem(); + FsmGraph *walk( Compiler *pd, RegExpr *rootRegex ); + + String data; + ReOrBlock *orBlock; + ReItemType type; +}; + +/* An or block item. */ +struct ReOrBlock +{ + enum ReOrBlockType { RecurseItem, Empty }; + + /* Constructors. */ + static ReOrBlock *cons() + { + ReOrBlock *r = new ReOrBlock; + r->type = Empty; + return r; + } + + static ReOrBlock *cons( ReOrBlock *orBlock, ReOrItem *item ) + { + ReOrBlock *r = new ReOrBlock; + r->orBlock = orBlock; + r->item = item; + r->type = RecurseItem; + return r; + } + + ~ReOrBlock(); + FsmGraph *walk( Compiler *pd, RegExpr *rootRegex ); + + ReOrBlock *orBlock; + ReOrItem *item; + ReOrBlockType type; +}; + +/* An item in an or block. */ +struct ReOrItem +{ + enum ReOrItemType { Data, Range }; + + static ReOrItem *cons( const InputLoc &loc, const String &data ) + { + ReOrItem *r = new ReOrItem; + r->loc = loc; + r->data = data; + r->type = Data; + return r; + } + + static ReOrItem *cons( const InputLoc &loc, char lower, char upper ) + { + ReOrItem *r = new ReOrItem; + r->loc = loc; + r->lower = lower; + r->upper = upper; + r->type = Range; + return r; + } + + FsmGraph *walk( Compiler *pd, RegExpr *rootRegex ); + + InputLoc loc; + String data; + char lower; + char upper; + ReOrItemType type; +}; + + +/* + * Inline code tree + */ +struct InlineList; +struct InlineItem +{ + enum Type + { + Text, + LmSwitch, + LmSetActId, + LmSetTokEnd, + LmOnLast, + LmOnNext, + LmOnLagBehind, + LmInitAct, + LmInitTokStart, + LmSetTokStart + }; + + static InlineItem *cons( const InputLoc &loc, const String &data, Type type ) + { + InlineItem *i = new InlineItem; + i->loc = loc; + i->data = data; + i->nameRef = 0; + i->children = 0; + i->type = type; + return i; + } + + static InlineItem *cons( const InputLoc &loc, NameRef *nameRef, Type type ) + { + InlineItem *i = new InlineItem; + i->loc = loc; + i->nameRef = nameRef; + i->children = 0; + i->type = type; + return i; + } + + static InlineItem *cons( const InputLoc &loc, RegionImpl *tokenRegion, + TokenInstance *longestMatchPart, Type type ) + { + InlineItem *i = new InlineItem; + i->loc = loc; + i->nameRef = 0; + i->children = 0; + i->tokenRegion = tokenRegion; + i->longestMatchPart = longestMatchPart; + i->type = type; + return i; + } + + static InlineItem *cons( const InputLoc &loc, NameInst *nameTarg, Type type ) + { + InlineItem *i = new InlineItem; + i->loc = loc; + i->nameRef = 0; + i->nameTarg = nameTarg; + i->children = 0; + i->type = type; + return i; + } + + static InlineItem *cons( const InputLoc &loc, Type type ) + { + InlineItem *i = new InlineItem; + i->loc = loc; + i->nameRef = 0; + i->children = 0; + i->type = type; + return i; + } + + InputLoc loc; + String data; + NameRef *nameRef; + NameInst *nameTarg; + InlineList *children; + RegionImpl *tokenRegion; + TokenInstance *longestMatchPart; + Type type; + + InlineItem *prev, *next; +}; + +struct InlineList +: + public DList<InlineItem> +{ + InlineList( int i ) {} + + static InlineList *cons() + { + return new InlineList( 0 ); + } +}; + + +struct ProdEl; +struct LangVarRef; +struct ObjectField; + +struct PatternItem +{ + enum Form { + TypeRefForm, + InputTextForm + }; + + static PatternItem *cons( Form form, const InputLoc &loc, const String &data ) + { + PatternItem *p = new PatternItem; + p->form = form; + p->loc = loc; + p->prodEl = 0; + p->data = data; + p->region = 0; + p->varRef = 0; + p->bindId = 0; + return p; + } + + static PatternItem *cons( Form form, const InputLoc &loc, ProdEl *prodEl ) + { + PatternItem *p = new PatternItem; + p->form = form; + p->loc = loc; + p->prodEl = prodEl; + p->region = 0; + p->varRef = 0; + p->bindId = 0; + return p; + } + + Form form; + InputLoc loc; + ProdEl *prodEl; + String data; + TokenRegion *region; + LangVarRef *varRef; + long bindId; + PatternItem *prev, *next; +}; + +struct LangExpr; + +struct PatternItemList + : public DList<PatternItem> +{ + static PatternItemList *cons( PatternItem *patternItem ) + { + PatternItemList *list = new PatternItemList; + list->append( patternItem ); + return list; + } +}; + +struct ConsItem +{ + enum Type { + InputText, + ExprType, + LiteralType + }; + + ConsItem() + : + type((Type)-1), + expr(0), + langEl(0), + prodEl(0), + bindId(-1) + { + } + + static ConsItem *cons( const InputLoc &loc, Type type, const String &data ) + { + ConsItem *r = new ConsItem; + r->loc = loc; + r->type = type; + r->data = data; + return r; + } + + static ConsItem *cons( const InputLoc &loc, Type type, LangExpr *expr ) + { + ConsItem *r = new ConsItem; + r->loc = loc; + r->type = type; + r->expr = expr; + return r; + } + + static ConsItem *cons( const InputLoc &loc, Type type, ProdEl *prodEl ) + { + ConsItem *r = new ConsItem; + r->loc = loc; + r->type = type; + r->expr = 0; + r->prodEl = prodEl; + return r; + } + + InputLoc loc; + Type type; + String data; + LangExpr *expr; + LangEl *langEl; + ProdEl *prodEl; + long bindId; + ConsItem *prev, *next; +}; + +struct ConsItemList +: + public DList<ConsItem> +{ + static ConsItemList *cons( ConsItem *ci ) + { + ConsItemList *cil = new ConsItemList; + cil->append( ci ); + return cil; + } +}; + +struct Pattern +{ + static Pattern *cons( const InputLoc &loc, Namespace *nspace, + PatternItemList *list, int patRepId ) + { + Pattern *p = new Pattern; + p->loc = loc; + p->nspace = nspace; + p->list = list; + p->patRepId = patRepId; + p->langEl = 0; + p->pdaRun = 0; + p->nextBindId = 1; + return p; + } + + InputLoc loc; + Namespace *nspace; + PatternItemList *list; + long patRepId; + LangEl *langEl; + PdaRun *pdaRun; + long nextBindId; + Pattern *prev, *next; +}; + +typedef DList<Pattern> PatList; + +struct Constructor +{ + static Constructor *cons( const InputLoc &loc, Namespace *nspace, + ConsItemList *list, int patRepId ) + { + Constructor *r = new Constructor; + r->loc = loc; + r->nspace = nspace; + r->list = list; + r->patRepId = patRepId; + r->langEl = 0; + r->pdaRun = 0; + r->nextBindId = 1; + r->parse = true; + return r; + } + + InputLoc loc; + Namespace *nspace; + ConsItemList *list; + int patRepId; + LangEl *langEl; + PdaRun *pdaRun; + long nextBindId; + bool parse; + + Constructor *prev, *next; +}; + +typedef DList<Constructor> ConsList; + +struct ParserText +{ + static ParserText *cons( const InputLoc &loc, + Namespace *nspace, ConsItemList *list ) + { + ParserText *p = new ParserText; + p->loc = loc; + p->nspace = nspace; + p->list = list; + p->langEl = 0; + p->pdaRun = 0; + p->nextBindId = 1; + p->parse = true; + return p; + } + + InputLoc loc; + Namespace *nspace; + ConsItemList *list; + LangEl *langEl; + PdaRun *pdaRun; + long nextBindId; + bool parse; + ParserText *prev, *next; +}; + +typedef DList<ParserText> ParserTextList; + +struct Function; + +struct IterDef +{ + enum Type { Tree, Child, RevChild, Repeat, RevRepeat, User }; + + IterDef( Type type, Function *func ); + IterDef( Type type ); + + Type type; + + Function *func; + bool useFuncId; + bool useSearchUT; + + Code inCreateWV; + Code inCreateWC; + Code inDestroy; + Code inAdvance; + + Code inGetCurR; + Code inGetCurWC; + Code inSetCurWC; + + Code inRefFromCur; +}; + +struct CmpIterDef +{ + static int compare( const IterDef &id1, const IterDef &id2 ) + { + if ( id1.type < id2.type ) + return -1; + else if ( id1.type > id2.type ) + return 1; + else if ( id1.type == IterDef::User ) { + if ( id1.func < id2.func ) + return -1; + else if ( id1.func > id2.func ) + return 1; + } + + return 0; + } +}; + +typedef AvlSet<IterDef, CmpIterDef> IterDefSet; +typedef AvlSetEl<IterDef> IterDefSetEl; + + +/* + * Unique Types. + */ + +/* + * type_ref -> qualified_name + * type_ref -> '*' type_ref + * type_ref -> '&' type_ref + * type_ref -> list type_ref type_ref + * type_ref -> map type_ref type_ref + * type_ref -> vector type_ref + * type_ref -> parser type_ref + * type_ref -> iter_tree type_ref + * type_ref -> iter_child type_ref + * type_ref -> iter_revchild type_ref + * type_ref -> iter_repeat type_ref + * type_ref -> iter_revrepeat type_ref + * type_ref -> iter_user type_ref + * + * type -> nil + * type -> def term + * type -> def nonterm + * type -> '*' type + * type -> '&' type + * type -> list type + * type -> map type type + * type -> vector type + * type -> parser type + * type -> iter_tree type + * type -> iter_child type + * type -> iter_revchild type + * type -> iter_repeat type + * type -> iter_revrepeat type + * type -> iter_user type + */ + +struct UniqueType : public AvlTreeEl<UniqueType> +{ + UniqueType( int typeId ) : + typeId(typeId), + langEl(0), + iterDef(0) {} + + UniqueType( int typeId, LangEl *langEl ) : + typeId(typeId), + langEl(langEl), + iterDef(0) {} + + UniqueType( int typeId, IterDef *iterDef ) : + typeId(typeId), + langEl(langEl), + iterDef(iterDef) {} + + int typeId; + LangEl *langEl; + IterDef *iterDef; + + ObjectDef *objectDef(); +}; + + +struct CmpUniqueType +{ + static int compare( const UniqueType &ut1, const UniqueType &ut2 ); +}; + +typedef AvlBasic< UniqueType, CmpUniqueType > UniqueTypeMap; + +enum RepeatType { + RepeatNone = 1, + RepeatRepeat, + RepeatList, + RepeatOpt, +}; + +/* + * Repeat types. + */ + +struct UniqueRepeat + : public AvlTreeEl<UniqueRepeat> +{ + UniqueRepeat( RepeatType repeatType, LangEl *langEl ) : + repeatType(repeatType), + langEl(langEl), declLangEl(0) {} + + RepeatType repeatType; + LangEl *langEl; + LangEl *declLangEl; +}; + +struct CmpUniqueRepeat +{ + static int compare( const UniqueRepeat &ut1, const UniqueRepeat &ut2 ); +}; + +typedef AvlBasic< UniqueRepeat, CmpUniqueRepeat > UniqueRepeatMap; + +/* + * Unique Map Types + */ + +struct UniqueMap + : public AvlTreeEl<UniqueMap> +{ + UniqueMap( UniqueType *key, UniqueType *value ) : + key(key), value(value), generic(0) {} + + UniqueType *key; + UniqueType *value; + + GenericType *generic; +}; + +struct CmpUniqueMap +{ + static int compare( const UniqueMap &ut1, const UniqueMap &ut2 ); +}; + +typedef AvlBasic< UniqueMap, CmpUniqueMap > UniqueMapMap; + +/* + * Unique List Types + */ + +struct UniqueList + : public AvlTreeEl<UniqueList> +{ + UniqueList( UniqueType *value ) : + value(value), generic(0) {} + + UniqueType *value; + GenericType *generic; +}; + +struct CmpUniqueList +{ + static int compare( const UniqueList &ut1, const UniqueList &ut2 ); +}; + +typedef AvlBasic< UniqueList, CmpUniqueList > UniqueListMap; + +/* + * Unique Vector Types + */ + +struct UniqueVector + : public AvlTreeEl<UniqueVector> +{ + UniqueVector( UniqueType *value ) : + value(value), generic(0) {} + + UniqueType *value; + GenericType *generic; +}; + +struct CmpUniqueVector +{ + static int compare( const UniqueVector &ut1, const UniqueVector &ut2 ); +}; + +typedef AvlBasic< UniqueVector, CmpUniqueVector > UniqueVectorMap; + +/* + * Unique Parser Types + */ + +struct UniqueParser + : public AvlTreeEl<UniqueParser> +{ + UniqueParser( UniqueType *parseType ) : + parseType(parseType), generic(0) {} + + UniqueType *parseType; + GenericType *generic; +}; + +struct CmpUniqueParser +{ + static int compare( const UniqueParser &ut1, const UniqueParser &ut2 ); +}; + +typedef AvlBasic< UniqueParser, CmpUniqueParser > UniqueParserMap; + +/* + * + */ + +typedef AvlMap< StringVect, int, CmpStrVect > VectorTypeIdMap; +typedef AvlMapEl< StringVect, int > VectorTypeIdMapEl; + +typedef Vector<TypeRef*> TypeRefVect; + +struct TypeRef +{ + enum Type + { + Unspecified, + Name, + Literal, + Iterator, + Map, + List, + Vector, + Parser, + Ref, + Ptr, + }; + + TypeRef() + : + type((Type)-1), + nspaceQual(0), + pdaLiteral(0), + iterDef(0), + typeRef1(0), + typeRef2(0), + repeatType(RepeatNone), + parsedVarRef(0), + parsedTypeRef(0), + nspace(0), + uniqueType(0), + searchUniqueType(0), + generic(0), + searchTypeRef(0) + {} + + /* Qualification and a type name. These require lookup. */ + static TypeRef *cons( const InputLoc &loc, NamespaceQual *nspaceQual, + const String &typeName ) + { + TypeRef *t = new TypeRef; + t->type = Name; + t->loc = loc; + t->nspaceQual = nspaceQual; + t->typeName = typeName; + t->repeatType = RepeatNone; + return t; + } + + /* Qualification and a type name. These require lookup. */ + static TypeRef *cons( const InputLoc &loc, NamespaceQual *nspaceQual, + String typeName, RepeatType repeatType ) + { + TypeRef *t = cons( loc, nspaceQual, typeName ); + t->repeatType = repeatType; + return t; + } + + static TypeRef *cons( const InputLoc &loc, LangVarRef *parsedVarRef, + NamespaceQual *nspaceQual, String typeName, RepeatType repeatType ) + { + TypeRef *t = cons( loc, nspaceQual, typeName ); + t->parsedVarRef = parsedVarRef; + t->repeatType = repeatType; + return t; + } + + static TypeRef *cons( const InputLoc &loc, TypeRef *parsedTypeRef, + NamespaceQual *nspaceQual, String typeName, RepeatType repeatType ) + { + TypeRef *t = cons( loc, nspaceQual, typeName ); + t->parsedTypeRef = parsedTypeRef; + t->repeatType = repeatType; + return t; + } + + /* Qualification and a type name. These require lookup. */ + static TypeRef *cons( const InputLoc &loc, NamespaceQual *nspaceQual, + PdaLiteral *pdaLiteral ) + { + TypeRef *t = new TypeRef; + t->type = Literal; + t->loc = loc; + t->nspaceQual = nspaceQual; + t->pdaLiteral = pdaLiteral; + t->repeatType = RepeatNone; + return t; + } + + static TypeRef *cons( const InputLoc &loc, TypeRef *parsedTypeRef, + NamespaceQual *nspaceQual, PdaLiteral *pdaLiteral ) + { + TypeRef *t = cons( loc, nspaceQual, pdaLiteral ); + t->parsedTypeRef = parsedTypeRef; + return t; + } + + /* Qualification and a type name. These require lookup. */ + static TypeRef *cons( const InputLoc &loc, NamespaceQual *nspaceQual, + PdaLiteral *pdaLiteral, RepeatType repeatType ) + { + TypeRef *t = cons( loc, nspaceQual, pdaLiteral ); + t->repeatType = repeatType; + return t; + } + + static TypeRef *cons( const InputLoc &loc, LangVarRef *parsedVarRef, + NamespaceQual *nspaceQual, PdaLiteral *pdaLiteral, RepeatType repeatType ) + { + TypeRef *t = cons( loc, nspaceQual, pdaLiteral ); + t->parsedVarRef = parsedVarRef; + t->repeatType = repeatType; + return t; + } + + static TypeRef *cons( const InputLoc &loc, TypeRef *parsedTypeRef, + NamespaceQual *nspaceQual, PdaLiteral *pdaLiteral, RepeatType repeatType ) + { + TypeRef *t = cons( loc, nspaceQual, pdaLiteral ); + t->parsedTypeRef = parsedTypeRef; + t->repeatType = repeatType; + return t; + } + + /* Generics. */ + static TypeRef *cons( const InputLoc &loc, Type type, + NamespaceQual *nspaceQual, TypeRef *typeRef1, TypeRef *typeRef2 ) + { + TypeRef *t = new TypeRef; + t->type = type; + t->loc = loc; + t->nspaceQual = nspaceQual; + t->typeRef1 = typeRef1; + t->typeRef2 = typeRef2; + t->repeatType = RepeatNone; + return t; + } + + /* Pointers and Refs. */ + static TypeRef *cons( const InputLoc &loc, Type type, TypeRef *typeRef1 ) + { + TypeRef *t = new TypeRef; + t->type = type; + t->loc = loc; + t->typeRef1 = typeRef1; + t->repeatType = RepeatNone; + return t; + } + + /* Resolution not needed. */ + + /* Iterator definition. */ + static TypeRef *cons( const InputLoc &loc, TypeRef *typeRef, IterCall *iterCall ) + { + TypeRef *t = new TypeRef; + t->type = Iterator; + t->loc = loc; + t->repeatType = RepeatNone; + t->iterCall = iterCall; + t->searchTypeRef = typeRef; + return t; + } + + /* Unique type is given directly. */ + static TypeRef *cons( const InputLoc &loc, UniqueType *uniqueType ) + { + TypeRef *t = new TypeRef; + t->type = Unspecified; + t->loc = loc; + t->repeatType = RepeatNone; + t->uniqueType = uniqueType; + return t; + } + + void resolveRepeat( Compiler *pd ); + + Namespace *resolveNspace( Compiler *pd ); + UniqueType *resolveIterator( Compiler *pd ); + UniqueType *resolveTypeName( Compiler *pd ); + UniqueType *resolveTypeLiteral( Compiler *pd ); + UniqueType *resolveTypeMap( Compiler *pd ); + UniqueType *resolveTypeList( Compiler *pd ); + UniqueType *resolveTypeVector( Compiler *pd ); + UniqueType *resolveTypeParser( Compiler *pd ); + UniqueType *resolveType( Compiler *pd ); + UniqueType *resolveTypePtr( Compiler *pd ); + UniqueType *resolveTypeRef( Compiler *pd ); + + Type type; + InputLoc loc; + NamespaceQual *nspaceQual; + String typeName; + PdaLiteral *pdaLiteral; + IterCall *iterCall; + IterDef *iterDef; + TypeRef *typeRef1; + TypeRef *typeRef2; + RepeatType repeatType; + + /* For pattern and constructor context. */ + LangVarRef *parsedVarRef; + TypeRef *parsedTypeRef; + + /* Resolved. */ + Namespace *nspace; + UniqueType *uniqueType; + UniqueType *searchUniqueType; + GenericType *generic; + TypeRef *searchTypeRef; +}; + +typedef DList<ObjectField> ParameterList; + +struct ObjMethod +{ + ObjMethod( TypeRef *returnTypeRef, String name, + int opcodeWV, int opcodeWC, int numParams, + UniqueType **types, ParameterList *paramList, bool isConst ) + : + returnUT(0), + returnTypeRef(returnTypeRef), + returnTypeId(0), + name(name), + opcodeWV(opcodeWV), + opcodeWC(opcodeWC), + numParams(numParams), + paramList(paramList), + isConst(isConst), + funcId(0), + useFuncId(false), + useCallObj(true), + isCustom(false), + func(0), + iterDef(0) + { + } + + ObjMethod( UniqueType *returnUT, String name, + int opcodeWV, int opcodeWC, int numParams, + UniqueType **types, ParameterList *paramList, bool isConst ) + : + returnUT(returnUT), + returnTypeRef(0), + returnTypeId(0), + name(name), + opcodeWV(opcodeWV), + opcodeWC(opcodeWC), + numParams(numParams), + paramList(paramList), + isConst(isConst), + funcId(0), + useFuncId(false), + useCallObj(true), + isCustom(false), + func(0), + iterDef(0) + { + this->paramUTs = new UniqueType*[numParams]; + memcpy( this->paramUTs, types, sizeof(UniqueType*)*numParams ); + } + + UniqueType *returnUT; + TypeRef *returnTypeRef; + long returnTypeId; + String name; + long opcodeWV; + long opcodeWC; + long numParams; + UniqueType **paramUTs; + ParameterList *paramList; + bool isConst; + long funcId; + bool useFuncId; + bool useCallObj; + bool isCustom; + Function *func; + IterDef *iterDef; +}; + +typedef AvlMap<String, ObjMethod*, CmpStr> ObjMethodMap; +typedef AvlMapEl<String, ObjMethod*> ObjMethodMapEl; + +struct RhsVal +{ + RhsVal( ProdEl *prodEl ) + : + prodEl(prodEl) + {} + + ProdEl *prodEl; +}; + +struct ObjectField +{ + ObjectField() + : + typeRef(0), + context(0), + scope(0), + pos(0), + offset(0), + beenReferenced(false), + beenInitialized(false), + useOffset(true), + isConst(false), + isLhsEl(false), isRhsEl(false), + refActive(false), + isArgv(false), + isCustom(false), + isParam(false), + isRhsGet(false), + isExport(false), + dirtyTree(false), + inGetR( IN_HALT ), + inGetWC( IN_HALT ), + inGetWV( IN_HALT ), + inSetWC( IN_HALT ), + inSetWV( IN_HALT ) + {} + + static ObjectField *cons( const InputLoc &loc, TypeRef *typeRef, const String &name ) + { + ObjectField *c = new ObjectField; + c->loc = loc; + c->typeRef = typeRef; + c->name = name; + return c; + } + + InputLoc loc; + TypeRef *typeRef; + String name; + Context *context; + ObjNameScope *scope; + long pos; + long offset; + bool beenReferenced; + bool beenInitialized; + bool useOffset; + bool isConst; + bool isLhsEl; + bool isRhsEl; + bool refActive; + bool isArgv; + bool isCustom; + bool isParam; + bool isRhsGet; + bool isExport; + + /* True if some aspect of the tree has possibly been written to. This does + * not include attributes. This is here so we can optimize the storage of + * old lhs vars. If only a lhs attribute changes we don't need to preserve + * the original for backtracking. */ + bool dirtyTree; + + Vector<RhsVal> rhsVal; + + Code inGetR; + Code inGetWC; + Code inGetWV; + Code inSetWC; + Code inSetWV; + + ObjectField *prev, *next; +}; + +typedef AvlMap<String, ObjectField*, CmpStr> ObjFieldMap; +typedef AvlMapEl<String, ObjectField*> ObjFieldMapEl; + +typedef DListVal<ObjectField*> ObjFieldList; + +typedef DList<ObjectField> ParameterList; + +struct TemplateType; + +/* Tree of name scopes for an object def. All of the object fields inside this + * tree live in one object def. This is used for scoping names in functions. */ +struct ObjNameScope +{ + ObjNameScope() + : + owner(0), + parentScope(0), + childIter(0) + {} + + ObjectDef *owner; + ObjFieldMap *objFieldMap; + + ObjNameScope *parentScope; + DList<ObjNameScope> children; + + /* For iteration after declaration. */ + ObjNameScope *childIter; + + ObjNameScope *prev, *next; + + int depth() + { + int depth = 0; + ObjNameScope *scope = this; + while ( scope != 0 ) { + depth += 1; + scope = scope->parentScope; + } + return depth; + } + + ObjectField *findField( const String &name ) const; + + ObjectField *checkRedecl( const String &name ); + void insertField( const String &name, ObjectField *value ); +}; + +struct ObjectDef +{ + enum Type { + UserType, + FrameType, + IterType, + BuiltinType + }; + + ObjectDef() + : + nextOffset(0), + firstNonTree(0) + {} + + static ObjectDef *cons( Type type, String name, int id ) + { + ObjectDef *o = new ObjectDef; + + o->type = type; + o->name = name; + o->id = id; + + o->rootScope = new ObjNameScope; + o->rootScope->owner = o; + o->rootScope->objFieldMap = new ObjFieldMap; + + o->objFieldList = new ObjFieldList; + o->objMethodMap = new ObjMethodMap; + + return o; + } + + Type type; + String name; + ObjFieldList *objFieldList; + ObjMethodMap *objMethodMap; + + ObjNameScope *rootScope; + + ObjNameScope *pushScope( ObjNameScope *curScope ); + + long id; + long nextOffset; + long firstNonTree; + + + void referenceField( Compiler *pd, ObjectField *field ); + void initField( Compiler *pd, ObjectField *field ); + void createCode( Compiler *pd, CodeVect &code ); + ObjMethod *findMethod( const String &name ) const; + ObjectField *findFieldInScope( const ObjNameScope *scope, const String &name ) const; + ObjectField *checkRedecl( ObjNameScope *inScope, const String &name ); + void insertField( ObjNameScope *inScope, const String &name, ObjectField *value ); + void resolve( Compiler *pd ); + ObjectField *findFieldNum( long offset ); + + long size() { return nextOffset; } + long sizeTrees() { return firstNonTree; } +}; + +struct CallArg +{ + CallArg( LangExpr *expr ) + : expr(expr), exprUT(0), offTmp(-1), offQualRef(-1) {} + + LangExpr *expr; + UniqueType *exprUT; + int offTmp; + int offQualRef; +}; + +typedef Vector<LangExpr*> ExprVect; +typedef Vector<CallArg*> CallArgVect; +typedef Vector<String> StringVect; + +struct FieldInit +{ + static FieldInit *cons( const InputLoc &loc, String name, LangExpr *expr ) + { + FieldInit *fi = new FieldInit; + fi->loc = loc; + fi->name = name; + fi->expr = expr; + return fi; + } + + InputLoc loc; + String name; + LangExpr *expr; + + UniqueType *exprUT; +}; + +typedef Vector<FieldInit*> FieldInitVect; + +struct VarRefLookup +{ + VarRefLookup( int lastPtrInQual, int firstConstPart, ObjectDef *inObject, ObjNameScope *inScope ) : + lastPtrInQual(lastPtrInQual), + firstConstPart(firstConstPart), + inObject(inObject), + inScope(inScope), + objField(0), + objMethod(0), + uniqueType(0), + iterSearchUT(0) + {} + + int lastPtrInQual; + int firstConstPart; + ObjectDef *inObject; + ObjNameScope *inScope; + ObjectField *objField; + ObjMethod *objMethod; + UniqueType *uniqueType; + UniqueType *iterSearchUT; +}; + +struct QualItem +{ + enum Form { Dot, Arrow }; + + QualItem( Form form, const InputLoc &loc, const String &data ) + : form(form), loc(loc), data(data) {} + + Form form; + InputLoc loc; + String data; +}; + +typedef Vector<QualItem> QualItemVect; + +struct LangVarRef +{ + static LangVarRef *cons( const InputLoc &loc, Context *context, ObjNameScope *scope, QualItemVect *qual, const String &name ) + { + LangVarRef *l = new LangVarRef; + l->loc = loc; + l->context = context; + l->scope = scope; + l->qual = qual; + l->name = name; + return l; + } + + static LangVarRef *cons( const InputLoc &loc, Context *context, ObjNameScope *scope, const String &name ) + { + return cons( loc, context, scope, new QualItemVect, name ); + } + + void resolve( Compiler *pd ) const; + UniqueType *lookup( Compiler *pd ) const; + + UniqueType *loadField( Compiler *pd, CodeVect &code, ObjectDef *inObject, + ObjectField *el, bool forWriting, bool revert ) const; + + VarRefLookup lookupMethod( Compiler *pd ) const; + VarRefLookup lookupField( Compiler *pd ) const; + + VarRefLookup lookupQualification( Compiler *pd, ObjNameScope *rootScope ) const; + VarRefLookup lookupObj( Compiler *pd ) const; + + bool isCustom() const; + bool isLocalRef() const; + bool isContextRef() const; + void loadQualification( Compiler *pd, CodeVect &code, ObjNameScope *rootScope, + int lastPtrInQual, bool forWriting, bool revert ) const; + void loadCustom( Compiler *pd, CodeVect &code, + int lastPtrInQual, bool forWriting ) const; + void loadLocalObj( Compiler *pd, CodeVect &code, + int lastPtrInQual, bool forWriting ) const; + void loadContextObj( Compiler *pd, CodeVect &code, int lastPtrInQual, bool forWriting ) const; + void loadGlobalObj( Compiler *pd, CodeVect &code, + int lastPtrInQual, bool forWriting ) const; + void loadObj( Compiler *pd, CodeVect &code, int lastPtrInQual, bool forWriting ) const; + void canTakeRef( Compiler *pd, VarRefLookup &lookup ) const; + bool canTakeRefTest( Compiler *pd, VarRefLookup &lookup ) const; + + void setFieldIter( Compiler *pd, CodeVect &code, ObjectDef *inObject, + ObjectField *objField, UniqueType *objUT, UniqueType *exprType, + bool revert ) const; + void setFieldSearch( Compiler *pd, CodeVect &code, + ObjectDef *inObject, UniqueType *exprType ) const; + void setField( Compiler *pd, CodeVect &code, ObjectDef *inObject, + ObjectField *el, UniqueType *exprUT, bool revert ) const; + + void assignValue( Compiler *pd, CodeVect &code, UniqueType *exprUT ) const; + ObjectField **evaluateArgs( Compiler *pd, CodeVect &code, + VarRefLookup &lookup, CallArgVect *args ) const; + void callOperation( Compiler *pd, CodeVect &code, VarRefLookup &lookup ) const; + UniqueType *evaluateCall( Compiler *pd, CodeVect &code, CallArgVect *args ); + UniqueType *evaluate( Compiler *pd, CodeVect &code, bool forWriting = false ) const; + ObjectField *evaluateRef( Compiler *pd, CodeVect &code, long pushCount ) const; + ObjectField *preEvaluateRef( Compiler *pd, CodeVect &code ) const; + void resetActiveRefs( Compiler *pd, VarRefLookup &lookup, ObjectField **paramRefs ) const; + long loadQualificationRefs( Compiler *pd, CodeVect &code, ObjNameScope *rootScope ) const; + void popRefQuals( Compiler *pd, CodeVect &code, + VarRefLookup &lookup, CallArgVect *args ) const; + + InputLoc loc; + Context *context; + ObjNameScope *scope; + QualItemVect *qual; + String name; +}; + +struct LangTerm +{ + enum Type { + VarRefType, + MethodCallType, + NumberType, + StringType, + MatchType, + NewType, + ConstructType, + TypeIdType, + SearchType, + NilType, + TrueType, + FalseType, + ParseType, + ParseStopType, + SendType, + MakeTreeType, + MakeTokenType, + EmbedStringType, + CastType, + }; + + LangTerm() + : + generic(0), + parserText(0) + {} + + static LangTerm *cons( const InputLoc &loc, Type type, LangVarRef *varRef ) + { + LangTerm *t = new LangTerm; + t->loc = loc; + t->type = type; + t->varRef = varRef; + return t; + } + + static LangTerm *cons( const InputLoc &loc, LangVarRef *varRef, CallArgVect *args ) + { + LangTerm *t = new LangTerm; + t->loc = loc; + t->type = MethodCallType; + t->varRef = varRef; + t->args = args; + return t; + } + + static LangTerm *cons( const InputLoc &loc, Type type, CallArgVect *args ) + { + LangTerm *t = new LangTerm; + t->loc = loc; + t->type = type; + t->args = args; + return t; + } + + static LangTerm *cons( const InputLoc &loc, Type type, String data ) + { + LangTerm *t = new LangTerm; + t->loc = loc; + t->type = type; + t->varRef = 0; + t->data = data; + return t; + } + + static LangTerm *cons( const InputLoc &loc, Type type ) + { + LangTerm *t = new LangTerm; + t->loc = loc; + t->type = type; + t->varRef = 0; + t->typeRef = 0; + return t; + } + + static LangTerm *cons( const InputLoc &loc, Type type, TypeRef *typeRef ) + { + LangTerm *t = new LangTerm; + t->loc = loc; + t->type = type; + t->varRef = 0; + t->typeRef = typeRef; + return t; + } + + static LangTerm *cons( const InputLoc &loc, Type type, TypeRef *typeRef, LangExpr *langExpr ) + { + LangTerm *t = new LangTerm; + t->loc = loc; + t->type = type; + t->varRef = 0; + t->typeRef = typeRef; + t->expr = langExpr; + return t; + } + + static LangTerm *cons( const InputLoc &loc, Type type, LangVarRef *varRef, Pattern *pattern ) + { + LangTerm *t = new LangTerm; + t->loc = loc; + t->type = type; + t->varRef = varRef; + t->pattern = pattern; + return t; + } + + static LangTerm *cons( const InputLoc &loc, Type type, TypeRef *typeRef, LangVarRef *varRef ) + { + LangTerm *t = new LangTerm; + t->loc = loc; + t->type = type; + t->varRef = varRef; + t->typeRef = typeRef; + return t; + } + + static LangTerm *cons( const InputLoc &loc, Type type, LangVarRef *varRef, ObjectField *objField, + TypeRef *typeRef, FieldInitVect *fieldInitArgs, Constructor *constructor ) + { + LangTerm *t = new LangTerm; + t->loc = loc; + t->type = type; + t->varRef = varRef; + t->objField = objField; + t->typeRef = typeRef; + t->fieldInitArgs = fieldInitArgs; + t->constructor = constructor; + return t; + } + + static LangTerm *cons( const InputLoc &loc, Type type, LangVarRef *varRef, ObjectField *objField, + TypeRef *typeRef, FieldInitVect *fieldInitArgs, Constructor *constructor, + ParserText *parserText ) + { + LangTerm *t = new LangTerm; + t->loc = loc; + t->type = type; + t->varRef = varRef; + t->objField = objField; + t->typeRef = typeRef; + t->fieldInitArgs = fieldInitArgs; + t->constructor = constructor; + t->parserText = parserText; + return t; + } + + static LangTerm *cons( const InputLoc &loc, Type type, LangExpr *expr ) + { + LangTerm *t = new LangTerm; + t->loc = loc; + t->type = type; + t->expr = expr; + return t; + } + + static LangTerm *cons( const InputLoc &loc, ConsItemList *consItemList ) + { + LangTerm *t = new LangTerm; + t->loc = loc; + t->type = EmbedStringType; + t->consItemList = consItemList; + return t; + } + + static LangTerm *cons( const InputLoc &loc, Type type, LangVarRef *varRef, ParserText *parserText ) + { + LangTerm *s = new LangTerm; + s->loc = loc; + s->type = type; + s->varRef = varRef; + s->parserText = parserText; + return s; + } + + static LangTerm *consSend( const InputLoc &loc, LangVarRef *varRef, ParserText *parserText, bool eof ) + { + LangTerm *s = new LangTerm; + s->loc = loc; + s->type = SendType; + s->varRef = varRef; + s->parserText = parserText; + s->eof = eof; + return s; + } + + void resolve( Compiler *pd ); + + UniqueType *evaluateNew( Compiler *pd, CodeVect &code ) const; + UniqueType *evaluateConstruct( Compiler *pd, CodeVect &code ) const; + void parseFrag( Compiler *pd, CodeVect &code, int stopId ) const; + UniqueType *evaluateParse( Compiler *pd, CodeVect &code, bool stop ) const; + void evaluateSendStream( Compiler *pd, CodeVect &code ) const; + void evaluateSendParser( Compiler *pd, CodeVect &code ) const; + UniqueType *evaluateSend( Compiler *pd, CodeVect &code ) const; + UniqueType *evaluateMatch( Compiler *pd, CodeVect &code ) const; + UniqueType *evaluate( Compiler *pd, CodeVect &code ) const; + void assignFieldArgs( Compiler *pd, CodeVect &code, UniqueType *replUT ) const; + UniqueType *evaluateMakeToken( Compiler *pd, CodeVect &code ) const; + UniqueType *evaluateMakeTree( Compiler *pd, CodeVect &code ) const; + UniqueType *evaluateEmbedString( Compiler *pd, CodeVect &code ) const; + UniqueType *evaluateSearch( Compiler *pd, CodeVect &code ) const; + UniqueType *evaluateCast( Compiler *pd, CodeVect &code ) const; + + InputLoc loc; + Type type; + LangVarRef *varRef; + CallArgVect *args; + NamespaceQual *nspaceQual; + String data; + ObjectField *objField; + TypeRef *typeRef; + Pattern *pattern; + FieldInitVect *fieldInitArgs; + GenericType *generic; + Constructor *constructor; + ParserText *parserText; + LangExpr *expr; + ConsItemList *consItemList; + bool eof; +}; + +struct LangExpr +{ + enum Type { + BinaryType, + UnaryType, + TermType + }; + + static LangExpr *cons( const InputLoc &loc, LangExpr *left, char op, LangExpr *right ) + { + LangExpr *e = new LangExpr; + e->loc = loc; + e->type = BinaryType; + e->left = left; + e->op = op; + e->right = right; + return e; + } + + static LangExpr *cons( const InputLoc &loc, char op, LangExpr *right ) + { + LangExpr *e = new LangExpr; + e->loc = loc; + e->type = UnaryType; + e->left = 0; + e->op = op; + e->right =right; + return e; + } + + static LangExpr *cons( LangTerm *term ) + { + LangExpr *e = new LangExpr; + e->type = TermType; + e->term = term; + return e; + } + + void resolve( Compiler *pd ) const; + + UniqueType *evaluate( Compiler *pd, CodeVect &code ) const; + bool canTakeRefTest( Compiler *pd ) const; + + InputLoc loc; + Type type; + LangExpr *left; + char op; + LangExpr *right; + LangTerm *term; +}; + +struct LangStmt; +typedef DList<LangStmt> StmtList; + +struct IterCall +{ + enum Form { + VarRefForm, + IterCallForm, + ExprForm + }; + + IterCall() + : + langTerm(0), + langExpr(0) + {} + + static IterCall *cons( Form form, LangTerm *langTerm ) + { + IterCall *iterCall = new IterCall; + iterCall->form = form; + iterCall->langTerm = langTerm; + return iterCall; + } + + static IterCall *cons( Form form, LangExpr *langExpr ) + { + IterCall *iterCall = new IterCall; + iterCall->form = form; + iterCall->langExpr = langExpr; + return iterCall; + } + + void resolve( Compiler *pd ) const; + + Form form; + LangTerm *langTerm; + LangExpr *langExpr; +}; + +struct LangStmt +{ + enum Type { + AssignType, + PrintType, + PrintXMLACType, + PrintXMLType, + PrintStreamType, + ExprType, + IfType, + ElseType, + RejectType, + WhileType, + ReturnType, + YieldType, + ForIterType, + BreakType + }; + + LangStmt() + : + type((Type)-1), + varRef(0), + langTerm(0), + objField(0), + typeRef(0), + expr(0), + constructor(0), + parserText(0), + exprPtrVect(0), + fieldInitVect(0), + stmtList(0), + elsePart(0), + iterCall(0), + context(0), + scope(0), + + /* Normally you don't need to initialize double list pointers, however, + * we make use of the next pointer for returning a pair of statements + * using one pointer to a LangStmt, so we need to initialize it above. */ + prev(0), + next(0) + {} + + static LangStmt *cons( const InputLoc &loc, Type type, FieldInitVect *fieldInitVect ) + { + LangStmt *s = new LangStmt; + s->loc = loc; + s->type = type; + s->fieldInitVect = fieldInitVect; + return s; + } + + static LangStmt *cons( const InputLoc &loc, Type type, CallArgVect *exprPtrVect ) + { + LangStmt *s = new LangStmt; + s->loc = loc; + s->type = type; + s->exprPtrVect = exprPtrVect; + return s; + } + + static LangStmt *cons( const InputLoc &loc, Type type, LangExpr *expr ) + { + LangStmt *s = new LangStmt; + s->loc = loc; + s->type = type; + s->expr = expr; + return s; + } + + static LangStmt *cons( Type type, LangVarRef *varRef ) + { + LangStmt *s = new LangStmt; + s->type = type; + s->varRef = varRef; + return s; + } + + static LangStmt *cons( const InputLoc &loc, Type type, ObjectField *objField ) + { + LangStmt *s = new LangStmt; + s->loc = loc; + s->type = type; + s->objField = objField; + return s; + } + + static LangStmt *cons( const InputLoc &loc, Type type, LangVarRef *varRef, LangExpr *expr ) + { + LangStmt *s = new LangStmt; + s->loc = loc; + s->type = type; + s->varRef = varRef; + s->expr = expr; + return s; + } + + static LangStmt *cons( Type type, LangExpr *expr, StmtList *stmtList ) + { + LangStmt *s = new LangStmt; + s->type = type; + s->expr = expr; + s->stmtList = stmtList; + return s; + } + + static LangStmt *cons( Type type, StmtList *stmtList ) + { + LangStmt *s = new LangStmt; + s->type = type; + s->stmtList = stmtList; + return s; + } + + static LangStmt *cons( Type type, LangExpr *expr, StmtList *stmtList, LangStmt *elsePart ) + { + LangStmt *s = new LangStmt; + s->type = type; + s->expr = expr; + s->stmtList = stmtList; + s->elsePart = elsePart; + return s; + } + + static LangStmt *cons( const InputLoc &loc, Type type ) + { + LangStmt *s = new LangStmt; + s->loc = loc; + s->type = type; + return s; + } + + static LangStmt *cons( Type type, LangVarRef *varRef, Constructor *constructor ) + { + LangStmt *s = new LangStmt; + s->type = type; + s->varRef = varRef; + s->constructor = constructor; + return s; + } + + static LangStmt *cons( const InputLoc &loc, Type type, ObjectField *objField, + TypeRef *typeRef, LangTerm *langTerm, StmtList *stmtList ) + { + LangStmt *s = new LangStmt; + s->loc = loc; + s->type = type; + s->langTerm = langTerm; + s->objField = objField; + s->typeRef = typeRef; + s->stmtList = stmtList; + return s; + } + + static LangStmt *cons( const InputLoc &loc, Type type, ObjectField *objField, + TypeRef *typeRef, IterCall *iterCall, StmtList *stmtList, + Context *context, ObjNameScope *scope ) + { + LangStmt *s = new LangStmt; + s->loc = loc; + s->type = type; + s->objField = objField; + s->typeRef = typeRef; + s->iterCall = iterCall; + s->stmtList = stmtList; + s->context = context; + s->scope = scope; + return s; + } + + + static LangStmt *cons( Type type ) + { + LangStmt *s = new LangStmt; + s->type = type; + return s; + } + + void declareForIter( Compiler *pd ) const; + + void declare( Compiler *pd ) const; + + void resolveForIter( Compiler *pd ) const; + void resolve( Compiler *pd ) const; + void resolveParserItems( Compiler *pd ) const; + + void chooseDefaultIter( Compiler *pd, IterCall *iterCall ) const; + void compileWhile( Compiler *pd, CodeVect &code ) const; + void compileForIterBody( Compiler *pd, CodeVect &code, UniqueType *iterUT ) const; + void compileForIter( Compiler *pd, CodeVect &code ) const; + void compile( Compiler *pd, CodeVect &code ) const; + + InputLoc loc; + Type type; + LangVarRef *varRef; + LangTerm *langTerm; + ObjectField *objField; + TypeRef *typeRef; + LangExpr *expr; + Constructor *constructor; + ParserText *parserText; + CallArgVect *exprPtrVect; + FieldInitVect *fieldInitVect; + StmtList *stmtList; + /* Either another if, or an else. */ + LangStmt *elsePart; + String name; + IterCall *iterCall; + Context *context; + ObjNameScope *scope; + + /* Normally you don't need to initialize double list pointers, however, we + * make use of the next pointer for returning a pair of statements using + * one pointer to a LangStmt, so we need to initialize it above. */ + LangStmt *prev, *next; +}; + +struct CodeBlock +{ + CodeBlock() + : + frameId(-1), + context(0) + {} + + static CodeBlock *cons( StmtList *stmtList, ObjectDef *localFrame ) + { + CodeBlock *c = new CodeBlock; + c->stmtList = stmtList; + c->localFrame = localFrame; + return c; + } + + void declare( Compiler *pd ) const; + void resolve( Compiler *pd ) const; + void compile( Compiler *pd, CodeVect &code ) const; + + long frameId; + StmtList *stmtList; + ObjectDef *localFrame; + Locals locals; + Context *context; + + /* Each frame has two versions of + * the code: revert and commit. */ + CodeVect codeWV, codeWC; +}; + +struct Function +{ + Function() + : + paramListSize(0), + paramUTs(0), + inContext(0), + objMethod(0) + {} + + static Function *cons( TypeRef *typeRef, const String &name, + ParameterList *paramList, CodeBlock *codeBlock, + int funcId, bool isUserIter, bool exprt ) + { + Function *f = new Function; + + f->typeRef = typeRef; + f->name = name; + f->paramList = paramList; + f->codeBlock = codeBlock; + f->funcId = funcId; + f->isUserIter = isUserIter; + f->exprt = exprt; + + return f; + } + + TransBlock *transBlock; + TypeRef *typeRef; + String name; + ParameterList *paramList; + CodeBlock *codeBlock; + ObjectDef *localFrame; + long funcId; + bool isUserIter; + long paramListSize; + UniqueType **paramUTs; + Context *inContext; + bool exprt; + ObjMethod *objMethod; + + Function *prev, *next; +}; + +typedef DList<Function> FunctionList; + +#endif /* _PARSETREE_H */ diff --git a/src/pcheck.cc b/src/pcheck.cc new file mode 100644 index 0000000..d5401f7 --- /dev/null +++ b/src/pcheck.cc @@ -0,0 +1,154 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "pcheck.h" +#include <assert.h> + +/* Construct a new parameter checker with for paramSpec. */ +ParamCheck::ParamCheck( const char *paramSpec, int argc, const char **argv ) +: + state(noparam), + argOffset(0), + curArg(0), + iCurArg(1), + paramSpec(paramSpec), + argc(argc), + argv(argv) +{ +} + +/* Check a single option. Returns the index of the next parameter. Sets p to + * the arg character if valid, 0 otherwise. Sets parg to the parameter arg if + * there is one, NULL otherwise. */ +bool ParamCheck::check() +{ + bool requiresParam; + + if ( iCurArg >= argc ) { /* Off the end of the arg list. */ + state = noparam; + return false; + } + + if ( argOffset != 0 && *argOffset == 0 ) { + /* We are at the end of an arg string. */ + iCurArg += 1; + if ( iCurArg >= argc ) { + state = noparam; + return false; + } + argOffset = 0; + } + + if ( argOffset == 0 ) { + /* Set the current arg. */ + curArg = argv[iCurArg]; + + /* We are at the beginning of an arg string. */ + if ( argv[iCurArg] == 0 || /* Argv[iCurArg] is null. */ + argv[iCurArg][0] != '-' || /* Not a param. */ + argv[iCurArg][1] == 0 ) { /* Only a dash. */ + parameter = 0; + parameterArg = 0; + + iCurArg += 1; + state = noparam; + return true; + } + argOffset = argv[iCurArg] + 1; + } + + /* Get the arg char. */ + char argChar = *argOffset; + + /* Loop over all the parms and look for a match. */ + const char *pSpec = paramSpec; + while ( *pSpec != 0 ) { + char pSpecChar = *pSpec; + + /* If there is a ':' following the char then + * it requires a parm. If a parm is required + * then move ahead two in the parmspec. Otherwise + * move ahead one in the parm spec. */ + if ( pSpec[1] == ':' ) { + requiresParam = true; + pSpec += 2; + } + else { + requiresParam = false; + pSpec += 1; + } + + /* Do we have a match. */ + if ( argChar == pSpecChar ) { + if ( requiresParam ) { + if ( argOffset[1] == 0 ) { + /* The param must follow. */ + if ( iCurArg + 1 == argc ) { + /* We are the last arg so there + * cannot be a parameter to it. */ + parameter = argChar; + parameterArg = 0; + iCurArg += 1; + argOffset = 0; + state = invalid; + return true; + } + else { + /* the parameter to the arg is the next arg. */ + parameter = pSpecChar; + parameterArg = argv[iCurArg + 1]; + iCurArg += 2; + argOffset = 0; + state = match; + return true; + } + } + else { + /* The param for the arg is built in. */ + parameter = pSpecChar; + parameterArg = argOffset + 1; + iCurArg += 1; + argOffset = 0; + state = match; + return true; + } + } + else { + /* Good, we matched the parm and no + * arg is required. */ + parameter = pSpecChar; + parameterArg = 0; + argOffset += 1; + state = match; + return true; + } + } + } + + /* We did not find a match. Bad Argument. */ + parameter = argChar; + parameterArg = 0; + argOffset += 1; + state = invalid; + return true; +} + + diff --git a/src/pcheck.h b/src/pcheck.h new file mode 100644 index 0000000..5be6042 --- /dev/null +++ b/src/pcheck.h @@ -0,0 +1,48 @@ +/* + * Copyright 2001, 2002 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _PCHECK_H +#define _PCHECK_H + +class ParamCheck +{ +public: + ParamCheck( const char *paramSpec, int argc, const char **argv ); + + bool check(); + + const char *parameterArg; /* The argument to the parameter. */ + char parameter; /* The parameter matched. */ + enum { match, invalid, noparam } state; + + const char *argOffset; /* If we are reading params inside an + * arg this points to the offset. */ + + const char *curArg; /* Pointer to the current arg. */ + int iCurArg; /* Index to the current arg. */ + +private: + const char *paramSpec; /* Parameter spec supplied by the coder. */ + int argc; /* Arguement data from the command line. */ + const char **argv; +}; + +#endif /* _PCHECK_H */ diff --git a/src/pdabuild.cc b/src/pdabuild.cc new file mode 100644 index 0000000..7978edf --- /dev/null +++ b/src/pdabuild.cc @@ -0,0 +1,2099 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#define EOF_REGION 0 + +#include <iostream> +#include <iomanip> +#include <errno.h> +#include <stdlib.h> + +/* Parsing. */ +#include "global.h" +#include "parsedata.h" +#include "pdacodegen.h" +#include "pdarun.h" +#include "redfsm.h" +#include "fsmcodegen.h" +#include "redbuild.h" + +/* Dumping the fsm. */ +#include "mergesort.h" + +using std::endl; +using std::cerr; +using std::cout; + +char startDefName[] = "start"; + +/* Count the transitions in the fsm by walking the state list. */ +int countTransitions( PdaGraph *fsm ) +{ + int numTrans = 0; + PdaState *state = fsm->stateList.head; + while ( state != 0 ) { + numTrans += state->transMap.length(); + state = state->next; + } + return numTrans; +} + +LangEl::LangEl( Namespace *nspace, const String &name, Type type ) +: + nspace(nspace), + name(name), + lit(name), + type(type), + id(-1), + isContext(false), + //displayString(0), + numAppearances(0), + commit(false), + isIgnore(false), + reduceFirst(false), + isLiteral(false), + isRepeat(false), + isList(false), + isOpt(false), + parseStop(false), + isEOF(false), + repeatOf(0), + tokenDef(0), + rootDef(0), + termDup(0), + eofLel(0), + pdaGraph(0), + pdaTables(0), + transBlock(0), + objectDef(0), + thisSize(0), + ofiOffset(0), + generic(0), + parserId(-1), + predType(PredNone), + predValue(0), + contextDef(0), + contextIn(0), + noPreIgnore(false), + noPostIgnore(false), + isZero(false) +{ +} + +PdaGraph *ProdElList::walk( Compiler *pd, Production *prod ) +{ + PdaGraph *prodFsm = new PdaGraph(); + PdaState *last = prodFsm->addState(); + prodFsm->setStartState( last ); + + int prodLength = 0; + for ( Iter prodEl = first(); prodEl.lte(); prodEl++, prodLength++ ) { + //PdaGraph *itemFsm = prodEl->walk( pd ); + long value = prodEl->langEl->id; + + PdaState *newState = prodFsm->addState(); + PdaTrans *newTrans = prodFsm->appendNewTrans( last, newState, value, value ); + + newTrans->isShift = true; + newTrans->shiftPrior = prodEl->priorVal; + //cerr << "PRIOR VAL: " << newTrans->shiftPrior << endl; + + if ( prodEl->commit ) { + //cout << "COMMIT: inserting commit of length: " << pd->prodLength << endl; + /* Insert the commit into transitions out of last */ + for ( TransMap::Iter trans = last->transMap; trans.lte(); trans++ ) + trans->value->commits.insert( prodLength ); + } + + last = newState; + } + + /* Make the last state the final state. */ + prodFsm->setFinState( last ); + return prodFsm; +} + + +ProdElList *Compiler::makeProdElList( LangEl *langEl ) +{ + ProdElList *prodElList = new ProdElList(); + UniqueType *uniqueType = findUniqueType( TYPE_TREE, langEl ); + TypeRef *typeRef = TypeRef::cons( internal, uniqueType ); + prodElList->append( new ProdEl( internal, typeRef ) ); + prodElList->tail->langEl = langEl; + return prodElList; +} + +void Compiler::makeDefinitionNames() +{ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + int prodNum = 1; + for ( LelDefList::Iter def = lel->defList; def.lte(); def++ ) { + def->data.setAs( lel->name.length() + 32, "%s-%i", + lel->name.data, prodNum++ ); + } + } +} + +/* Make sure there there are no language elements whose type is unkonwn. This + * can happen when an id is used on the rhs of a definition but is not defined + * as anything. */ +void Compiler::noUndefindLangEls() +{ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->type == LangEl::Unknown ) + error() << "'" << lel->name << "' was not defined as anything" << endp; + } +} + +void Compiler::makeLangElIds() +{ + /* The first id 0 is reserved for the stack sentinal. A negative id means + * error to the parsing function, inducing backtracking. */ + nextSymbolId = 1; + + /* First pass assigns to the user terminals. */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + /* Must be a term, and not any of the special reserved terminals. + * Remember if the non terminal is a user non terminal. */ + if ( lel->type == LangEl::Term && + !lel->isEOF && + lel != errorLangEl && + lel != noTokenLangEl ) + { + lel->id = nextSymbolId++; + } + } + + //eofLangEl->id = nextSymbolId++; + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + /* Must be a term, and not any of the special reserved terminals. + * Remember if the non terminal is a user non terminal. */ + if ( lel->isEOF ) + lel->id = nextSymbolId++; + } + + /* Next assign to the eof notoken, which we always create. */ + noTokenLangEl->id = nextSymbolId++; + + /* Possibly assign to the error language element. */ + if ( errorLangEl != 0 ) + errorLangEl->id = nextSymbolId++; + + /* Save this for the code generation. */ + firstNonTermId = nextSymbolId; + + /* A third and final pass assigns to everything else. */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + /* Anything else not yet assigned gets assigned now. */ + if ( lel->id < 0 ) + lel->id = nextSymbolId++; + } + + assert( ptrLangEl->id == LEL_ID_PTR ); + assert( boolLangEl->id == LEL_ID_BOOL ); + assert( intLangEl->id == LEL_ID_INT ); + assert( strLangEl->id == LEL_ID_STR ); + assert( streamLangEl->id == LEL_ID_STREAM ); + assert( ignoreLangEl->id == LEL_ID_IGNORE ); +} + +void Compiler::refNameSpace( LangEl *lel, Namespace *nspace ) +{ + if ( nspace == rootNamespace ) { + lel->refName = "::" + lel->refName; + return; + } + + lel->refName = nspace->name + "::" + lel->refName; + lel->declName = nspace->name + "::" + lel->declName; + lel->xmlTag = nspace->name + "::" + lel->xmlTag; + refNameSpace( lel, nspace->parentNamespace ); +} + +void Compiler::makeLangElNames() +{ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->id == LEL_ID_VOID ) { + lel->fullName = "_void"; + lel->fullLit = "_void"; + lel->refName = "_void"; + lel->declName = "_void"; + lel->xmlTag = "void"; + + } + else if ( lel->id == LEL_ID_INT ) { + lel->fullName = "_int"; + lel->fullLit = "_int"; + lel->refName = "_int"; + lel->declName = "_int"; + lel->xmlTag = "int"; + } + else if ( lel->id == LEL_ID_BOOL ) { + lel->fullName = "_bool"; + lel->fullLit = "_bool"; + lel->refName = "_bool"; + lel->declName = "_bool"; + lel->xmlTag = "bool"; + } + else { + lel->fullName = lel->name; + lel->fullLit = lel->lit; + lel->refName = lel->lit; + lel->declName = lel->lit; + lel->xmlTag = lel->name; + } + + /* If there is also a namespace next to the type, we add a prefix to + * the type. It's not convenient to name C++ classes the same as a + * namespace in the same scope. We don't want to restrict colm, so we + * add a workaround for the least-common case. The type gets t_ prefix. + * */ + Namespace *nspace = lel->nspace->findNamespace( lel->name ); + if ( nspace != 0 ) { + lel->refName = "t_" + lel->refName; + lel->fullName = "t_" + lel->fullName; + lel->declName = "t_" + lel->declName; + lel->xmlTag = "t_" + lel->xmlTag; + } + + refNameSpace( lel, lel->nspace ); + } +} + +/* Set up dot sets, shift info, and prod sets. */ +void Compiler::makeProdFsms() +{ + /* There are two items in the index for each production (high and low). */ + int indexLen = prodList.length() * 2; + dotItemIndex.setAsNew( indexLen ); + int dsiLow = 0, indexPos = 0; + + /* Build FSMs for all production language elements. */ + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) + prod->fsm = prod->prodElList->walk( this, prod ); + + makeNonTermFirstSets(); + makeFirstSets(); + + /* Build FSMs for all production language elements. */ + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + if ( addUniqueEmptyProductions ) { + /* This must be re-implemented. */ + assert( false ); + //if ( !prod->isLeftRec && prod->uniqueEmptyLeader != 0 ) { + // PdaGraph *emptyLeader = prod->uniqueEmptyLeader->walk( this ); + // emptyLeader->concatOp( prod->fsm ); + // prod->fsm = emptyLeader; + //} + } + + /* Compute the machine's length. */ + prod->fsmLength = prod->fsm->fsmLength( ); + + /* Productions have a unique production id for each final state. + * This lets us use a production length specific to each final state. + * Start states are always isolated therefore if the start state is + * final then reductions from it will always have a fixed production + * length. This is a simple method for determining the length + * of zero-length derivations when reducing. */ + + /* Number of dot items needed for the production is elements + 1 + * because the dot can be before the first and after the last element. */ + int numForProd = prod->fsm->stateList.length() + 1; + + /* Set up the low and high values in the index for this production. */ + dotItemIndex.data[indexPos].key = dsiLow; + dotItemIndex.data[indexPos].value = prod; + dotItemIndex.data[indexPos+1].key = dsiLow + numForProd - 1; + dotItemIndex.data[indexPos+1].value = prod; + + int dsi = dsiLow; + for ( PdaStateList::Iter state = prod->fsm->stateList; state.lte(); state++, dsi++ ) { + /* All transitions are shifts. */ + for ( TransMap::Iter out = state->transMap; out.lte(); out++ ) + assert( out->value->isShift ); + + state->dotSet.insert( dsi ); + } + + /* Move over the production. */ + dsiLow += numForProd; + indexPos += 2; + + if ( prod->prodCommit ) { + for ( PdaStateSet::Iter fin = prod->fsm->finStateSet; fin.lte(); fin++ ) { + int length = prod->fsmLength; + //cerr << "PENDING COMMIT IN FINAL STATE of " << prod->prodId << + // " with len: " << length << endl; + (*fin)->pendingCommits.insert( ProdIdPair( prod->prodId, length ) ); + } + } + } + + /* Make the final state specific prod id to prod id mapping. */ + prodIdIndex = new Production*[prodList.length()]; + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) + prodIdIndex[prod->prodId] = prod; +} + +/* Want the first set of over src. If the first set contains epsilon, go over + * it and over tab. If overSrc is the end of the production, find the follow + * from the table, taking only the characters on which the parent is reduced. + * */ +void Compiler::findFollow( AlphSet &result, PdaState *overTab, + PdaState *overSrc, Production *parentDef ) +{ + if ( overSrc->isFinState() ) { + assert( overSrc->transMap.length() == 0 ); + + /* At the end of the production. Turn to the table. */ + long redCode = makeReduceCode( parentDef->prodId, false ); + for ( TransMap::Iter tabTrans = overTab->transMap; tabTrans.lte(); tabTrans++ ) { + for ( ActDataList::Iter adl = tabTrans->value->actions; adl.lte(); adl++ ) { + if ( *adl == redCode ) + result.insert( tabTrans->key ); + } + } + } + else { + /* Get the first set of the item. If the first set contains epsilon + * then move over overSrc and overTab and recurse. */ + assert( overSrc->transMap.length() == 1 ); + TransMap::Iter pastTrans = overSrc->transMap; + + LangEl *langEl = langElIndex[pastTrans->key]; + if ( langEl != 0 && langEl->type == LangEl::NonTerm ) { + bool hasEpsilon = false; + for ( LelDefList::Iter def = langEl->defList; def.lte(); def++ ) { + result.insert( def->firstSet ); + + if ( def->firstSet.find( -1 ) ) + hasEpsilon = true; + } + + /* Find the equivalent state in the parser. */ + if ( hasEpsilon ) { + PdaTrans *tabTrans = overTab->findTrans( pastTrans->key ); + findFollow( result, tabTrans->toState, + pastTrans->value->toState, parentDef ); + } + + /* Now possibly the dup. */ + if ( langEl->termDup != 0 ) + result.insert( langEl->termDup->id ); + } + else { + result.insert( pastTrans->key ); + } + } +} + +PdaState *Compiler::followProd( PdaState *tabState, PdaState *prodState ) +{ + while ( prodState->transMap.length() == 1 ) { + TransMap::Iter prodTrans = prodState->transMap; + PdaTrans *tabTrans = tabState->findTrans( prodTrans->key ); + prodState = prodTrans->value->toState; + tabState = tabTrans->toState; + } + return tabState; +} + +void Compiler::trySetTime( PdaTrans *trans, long code, long &time ) +{ + /* Find the item. */ + for ( ActDataList::Iter adl = trans->actions; adl.lte(); adl++ ) { + if ( *adl == code ) { + /* If the time of the shift is not already set, set it. */ + if ( trans->actOrds[adl.pos()] == 0 ) { + //cerr << "setting time: state = " << tabState->stateNum + // << ", trans = " << tabTrans->lowKey + // << ", time = " << time << endl; + trans->actOrds[adl.pos()] = time++; + } + break; + } + } +} + +/* Go down a defintiion and then handle the follow actions. */ +void Compiler::pdaOrderFollow( LangEl *rootEl, PdaState *tabState, + PdaTrans *tabTrans, PdaTrans *srcTrans, Production *parentDef, + Production *definition, long &time ) +{ + /* We need the follow from tabState/srcState over the defintion we are + * currently processing. */ + PdaState *overTab = tabTrans->toState; + PdaState *overSrc = srcTrans->toState; + + AlphSet alphSet; + if ( parentDef == rootEl->rootDef ) + alphSet.insert( rootEl->eofLel->id ); + else + findFollow( alphSet, overTab, overSrc, parentDef ); + + /* Now follow the production to find out where it expands to. */ + PdaState *expandToState = followProd( tabState, definition->fsm->startState ); + + /* Find the reduce item. */ + long redCode = makeReduceCode( definition->prodId, false ); + + for ( TransMap::Iter tt = expandToState->transMap; tt.lte(); tt++ ) { + if ( alphSet.find( tt->key ) ) { + trySetTime( tt->value, redCode, time ); + + /* If the items token region is not recorded in the state, do it now. */ + addRegion( expandToState, tt->value, tt->key, + tt->value->noPreIgnore, tt->value->noPostIgnore ); + } + } +} + +bool regionVectHas( RegionVect ®Vect, TokenRegion *region ) +{ + for ( RegionVect::Iter trvi = regVect; trvi.lte(); trvi++ ) { + if ( *trvi == region ) + return true; + } + return false; +} + +void Compiler::addRegion( PdaState *tabState, PdaTrans *tabTrans, + long pdaKey, bool noPreIgnore, bool noPostIgnore ) +{ + LangEl *langEl = langElIndex[pdaKey]; + if ( langEl != 0 && langEl->type == LangEl::Term ) { + TokenRegion *region = 0; + RegionSet *regionSet = 0; + + /* If it is not the eof, then use the region associated + * with the token definition. */ + if ( langEl->isZero ) { + region = langEl->tokenDef->regionSet->collectIgnore; + regionSet = langEl->tokenDef->regionSet; + } + else if ( !langEl->isEOF && langEl->tokenDef != 0 ) { + region = langEl->tokenDef->regionSet->tokenIgnore; + regionSet = langEl->tokenDef->regionSet; + } + + if ( region != 0 ) { + /* region. */ + TokenRegion *scanRegion = region; + + if ( langEl->noPreIgnore ) + scanRegion = regionSet->tokenOnly; + + if ( !regionVectHas( tabState->regions, scanRegion ) ) + tabState->regions.append( scanRegion ); + + /* Pre-region of to state */ + PdaState *toState = tabTrans->toState; + if ( !langEl->noPostIgnore && + regionSet->ignoreOnly != 0 && + !regionVectHas( toState->preRegions, regionSet->ignoreOnly ) ) + { + toState->preRegions.append( regionSet->ignoreOnly ); + } + } + } +} + +#if 0 + orderState( tabState, prodState, time ): + if not tabState.dotSet.find( prodState.dotID ) + tabState.dotSet.insert( prodState.dotID ) + tabTrans = tabState.findMatchingTransition( prodState.getTransition() ) + + if tabTrans is NonTerminal: + for production in tabTrans.nonTerm.prodList: + orderState( tabState, production.startState, time ) + + for all expandToState in tabTrans.expandToStates: + for all followTrans in expandToState.transList + reduceAction = findAction( production.reduction ) + if reduceAction.time is unset: + reduceAction.time = time++ + end + end + end + end + end + + shiftAction = tabTrans.findAction( shift ) + if shiftAction.time is unset: + shiftAction.time = time++ + end + + orderState( tabTrans.toState, prodTrans.toState, time ) + end + end + + orderState( parseTable.startState, startProduction.startState, 1 ) +#endif + +void Compiler::pdaOrderProd( LangEl *rootEl, PdaState *tabState, + PdaState *srcState, Production *parentDef, long &time ) +{ + assert( srcState->dotSet.length() == 1 ); + if ( tabState->dotSet2.find( srcState->dotSet[0] ) ) + return; + tabState->dotSet2.insert( srcState->dotSet[0] ); + + assert( srcState->transMap.length() == 0 || srcState->transMap.length() == 1 ); + + if ( srcState->transMap.length() == 1 ) { + TransMap::Iter srcTrans = srcState->transMap; + + /* Find the equivalent state in the parser. */ + PdaTrans *tabTrans = tabState->findTrans( srcTrans->key ); + + /* Recurse into the transition if it is a non-terminal. */ + LangEl *langEl = langElIndex[srcTrans->key]; + if ( langEl != 0 ) { + if ( langEl->reduceFirst ) { + /* Use a shortest match ordering for the contents of this + * nonterminal. Does follows for all productions first, then + * goes down the productions. */ + for ( LelDefList::Iter expDef = langEl->defList; expDef.lte(); expDef++ ) { + pdaOrderFollow( rootEl, tabState, tabTrans, srcTrans->value, + parentDef, expDef, time ); + } + for ( LelDefList::Iter expDef = langEl->defList; expDef.lte(); expDef++ ) + pdaOrderProd( rootEl, tabState, expDef->fsm->startState, expDef, time ); + + } + else { + /* The default action ordering. For each prod, goes down the + * prod then sets the follow before going to the next prod. */ + for ( LelDefList::Iter expDef = langEl->defList; expDef.lte(); expDef++ ) { + pdaOrderProd( rootEl, tabState, expDef->fsm->startState, expDef, time ); + + pdaOrderFollow( rootEl, tabState, tabTrans, srcTrans->value, + parentDef, expDef, time ); + } + } + } + + trySetTime( tabTrans, SHIFT_CODE, time ); + + /* Now possibly for the dup. */ + if ( langEl != 0 && langEl->termDup != 0 ) { + PdaTrans *dupTrans = tabState->findTrans( langEl->termDup->id ); + trySetTime( dupTrans, SHIFT_CODE, time ); + } + + /* If the items token region is not recorded in the state, do it now. */ + addRegion( tabState, tabTrans, srcTrans->key, + srcTrans->value->noPreIgnore, srcTrans->value->noPostIgnore ); + + /* Go over one in the production. */ + pdaOrderProd( rootEl, tabTrans->toState, + srcTrans->value->toState, parentDef, time ); + } +} + +void Compiler::pdaActionOrder( PdaGraph *pdaGraph, LangElSet &parserEls ) +{ + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + assert( (state->stateBits & SB_ISMARKED) == 0 ); + + /* Traverse the src state's transitions. */ + long last = 0; + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + if ( ! trans.first() ) + assert( last < trans->key ); + last = trans->key; + } + } + + /* Compute the action orderings, record the max value. */ + long time = 1; + for ( LangElSet::Iter pe = parserEls; pe.lte(); pe++ ) { + PdaState *startState = (*pe)->rootDef->fsm->startState; + pdaOrderProd( *pe, (*pe)->startState, startState, (*pe)->rootDef, time ); + + /* Walk over the start lang el and set the time for shift of + * the eof action that completes the parse. */ + PdaTrans *overStart = (*pe)->startState->findTrans( (*pe)->id ); + PdaTrans *eofTrans = overStart->toState->findTrans( (*pe)->eofLel->id ); + eofTrans->actOrds[0] = time++; + } + + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + if ( state->regions.length() == 0 ) { + for ( TransMap::Iter tel = state->transMap; tel.lte(); tel++ ) { + /* There are no regions and EOF leaves the state. Add the eof + * token region. */ + PdaTrans *trans = tel->value; + LangEl *lel = langElIndex[trans->lowKey]; + if ( lel != 0 && lel->isEOF ) + state->regions.append( EOF_REGION ); + } + } + } + + ///* Warn about states with empty token region lists. */ + //for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + // if ( state->regions.length() == 0 ) { + // warning() << "state has an empty token region, state: " << + // state->stateNum << endl; + // } + //} + + /* Some actions may not have an ordering. I believe these to be actions + * that result in a parse error and they arise because the state tables + * are LALR(1) but the action ordering is LR(1). LALR(1) causes some + * reductions that lead nowhere. */ + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + assert( CmpDotSet::compare( state->dotSet, state->dotSet2 ) == 0 ); + for ( TransMap::Iter tel = state->transMap; tel.lte(); tel++ ) { + PdaTrans *trans = tel->value; + /* Check every action has an ordering. */ + for ( ActDataList::Iter adl = trans->actOrds; adl.lte(); adl++ ) { + if ( *adl == 0 ) + *adl = time++; + } + } + } +} + +void Compiler::advanceReductions( PdaGraph *pdaGraph ) +{ + /* Loop all states. */ + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + if ( !state->advanceReductions ) + continue; + + bool outHasShift = false; + ReductionMap outReds; + LongSet outCommits; + for ( TransMap::Iter out = state->transMap; out.lte(); out++ ) { + /* Get the transition from the trans el. */ + if ( out->value->isShift ) + outHasShift = true; + outReds.insert( out->value->reductions ); + outCommits.insert( out->value->commits ); + } + + bool inHasShift = false; + ReductionMap inReds; + for ( PdaTransInList::Iter in = state->inRange; in.lte(); in++ ) { + /* Get the transition from the trans el. */ + if ( in->isShift ) + inHasShift = true; + inReds.insert( in->reductions ); + } + + if ( !outHasShift && outReds.length() == 1 && + inHasShift && inReds.length() == 0 ) + { + //cerr << "moving reduction to shift" << endl; + + /* Move the reduction to all in transitions. */ + for ( PdaTransInList::Iter in = state->inRange; in.lte(); in++ ) { + assert( in->actions.length() == 1 ); + assert( in->actions[0] == SHIFT_CODE ); + in->actions[0] = makeReduceCode( outReds[0].key, true ); + in->afterShiftCommits.insert( outCommits ); + } + + /* + * Remove all transitions out of the state. + */ + + /* Detach out range transitions. */ + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + pdaGraph->detachTrans( state, trans->value->toState, trans->value ); + delete trans->value; + } + state->transMap.empty(); + + /* Redirect all the in transitions to the actionDestState. */ + pdaGraph->inTransMove( actionDestState, state ); + } + } + + pdaGraph->removeUnreachableStates(); +} + +void Compiler::sortActions( PdaGraph *pdaGraph ) +{ + /* Sort the actions. */ + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + assert( CmpDotSet::compare( state->dotSet, state->dotSet2 ) == 0 ); + for ( TransMap::Iter tel = state->transMap; tel.lte(); tel++ ) { + PdaTrans *trans = tel->value; + + /* Sort by the action ords. */ + ActDataList actions( trans->actions ); + ActDataList actOrds( trans->actOrds ); + ActDataList actPriors( trans->actPriors ); + trans->actions.empty(); + trans->actOrds.empty(); + trans->actPriors.empty(); + while ( actOrds.length() > 0 ) { + int min = 0; + for ( int i = 1; i < actOrds.length(); i++ ) { + if ( actPriors[i] > actPriors[min] || + (actPriors[i] == actPriors[min] && + actOrds[i] < actOrds[min] ) ) + { + min = i; + } + } + trans->actions.append( actions[min] ); + trans->actOrds.append( actOrds[min] ); + trans->actPriors.append( actPriors[min] ); + actions.remove(min); + actOrds.remove(min); + actPriors.remove(min); + } + + if ( branchPointInfo && trans->actions.length() > 1 ) { + cerr << "info: branch point" + << " state: " << state->stateNum + << " trans: "; + LangEl *lel = langElIndex[trans->lowKey]; + if ( lel == 0 ) + cerr << (char)trans->lowKey << endl; + else + cerr << lel->lit << endl; + + for ( ActDataList::Iter act = trans->actions; act.lte(); act++ ) { + switch ( *act & 0x3 ) { + case 1: + cerr << " shift" << endl; + break; + case 2: + cerr << " reduce " << + prodIdIndex[(*act >> 2)]->data << endl; + break; + case 3: + cerr << " shift-reduce" << endl; + break; + } + } + } + + /* Verify that shifts of nonterminals don't have any branch + * points or commits. */ + if ( trans->lowKey >= firstNonTermId ) { + if ( trans->actions.length() != 1 || + (trans->actions[0] & 0x3) != 1 ) + { + error() << "TRANS ON NONTERMINAL is something " + "other than a shift" << endl; + } + if ( trans->commits.length() > 0 ) + error() << "TRANS ON NONTERMINAL has a commit" << endl; + } + + /* TODO: Shift-reduces are optimizations. Verify that + * shift-reduces exist only if they don't entail a conflict. */ + } + } +} + +void Compiler::reduceActions( PdaGraph *pdaGraph ) +{ + /* Reduce the actions. */ + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + for ( TransMap::Iter tel = state->transMap; tel.lte(); tel++ ) { + PdaTrans *trans = tel->value; + PdaActionSetEl *inSet; + + int commitLen = trans->commits.length() > 0 ? + trans->commits[trans->commits.length()-1] : 0; + + if ( trans->afterShiftCommits.length() > 0 ) { + int afterShiftCommit = trans->afterShiftCommits[ + trans->afterShiftCommits.length()-1]; + + if ( commitLen > 0 && commitLen+1 > afterShiftCommit ) + commitLen = ( commitLen + 1 ); + else + commitLen = afterShiftCommit; + } + else { + commitLen = commitLen * -1; + } + + //if ( commitLen != 0 ) { + // cerr << "FINAL ACTION COMMIT LEN: " << commitLen << endl; + //} + + pdaGraph->actionSet.insert( ActionData( trans->toState->stateNum, + trans->actions, commitLen ), &inSet ); + trans->actionSetEl = inSet; + } + } +} + +void Compiler::computeAdvanceReductions( LangEl *langEl, PdaGraph *pdaGraph ) +{ + /* Get the entry into the graph and traverse over the root. The resulting + * state can have eof, nothing else can. */ + PdaState *overStart = pdaGraph->followFsm( + langEl->startState, + langEl->rootDef->fsm ); + + /* The graph must reduce to root all on it's own. It cannot depend on + * require EOF. */ + for ( PdaStateList::Iter st = pdaGraph->stateList; st.lte(); st++ ) { + if ( st == overStart ) + continue; + + for ( TransMap::Iter tr = st->transMap; tr.lte(); tr++ ) { + if ( tr->value->lowKey == langEl->eofLel->id ) + st->advanceReductions = true; + } + } +} + +void Compiler::verifyParseStopGrammar( LangEl *langEl, PdaGraph *pdaGraph ) +{ + /* Get the entry into the graph and traverse over the root. The resulting + * state can have eof, nothing else can. */ + PdaState *overStart = pdaGraph->followFsm( + langEl->startState, + langEl->rootDef->fsm ); + + /* The graph must reduce to root all on it's own. It cannot depend on + * require EOF. */ + for ( PdaStateList::Iter st = pdaGraph->stateList; st.lte(); st++ ) { + if ( st == overStart ) + continue; + + for ( TransMap::Iter tr = st->transMap; tr.lte(); tr++ ) { + if ( tr->value->lowKey == langEl->eofLel->id ) { + /* This needs a better error message. Appears to be voodoo. */ + error() << "grammar is not usable with parse_stop" << endp; + } + } + } +} + +LangEl *Compiler::predOf( PdaTrans *trans, long action ) +{ + LangEl *lel; + if ( action == SHIFT_CODE ) + lel = langElIndex[trans->lowKey]; + else + lel = prodIdIndex[action >> 2]->predOf; + return lel; +} + + +bool Compiler::precedenceSwap( long action1, long action2, LangEl *l1, LangEl *l2 ) +{ + bool swap = false; + if ( l2->predValue > l1->predValue ) + swap = true; + else if ( l1->predValue == l2->predValue ) { + if ( l1->predType == PredLeft && action1 == SHIFT_CODE ) + swap = true; + else if ( l1->predType == PredRight && action2 == SHIFT_CODE ) + swap = true; + } + return swap; +} + +bool Compiler::precedenceRemoveBoth( LangEl *l1, LangEl *l2 ) +{ + if ( l1->predValue == l2->predValue && l1->predType == PredNonassoc ) + return true; + return false; +} + +void Compiler::resolvePrecedence( PdaGraph *pdaGraph ) +{ + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + assert( CmpDotSet::compare( state->dotSet, state->dotSet2 ) == 0 ); + + for ( long t = 0; t < state->transMap.length(); /* increment at end */ ) { + PdaTrans *trans = state->transMap[t].value; + +again: + /* Find action with precedence. */ + for ( int i = 0; i < trans->actions.length(); i++ ) { + LangEl *li = predOf( trans, trans->actions[i] ); + + if ( li != 0 && li->predType != PredNone ) { + /* Find another action with precedence. */ + for ( int j = i+1; j < trans->actions.length(); j++ ) { + LangEl *lj = predOf( trans, trans->actions[j] ); + + if ( lj != 0 && lj->predType != PredNone ) { + /* Conflict to check. */ + bool swap = precedenceSwap( trans->actions[i], + trans->actions[j], li, lj ); + + if ( swap ) { + long t = trans->actions[i]; + trans->actions[i] = trans->actions[j]; + trans->actions[j] = t; + } + + trans->actions.remove( j ); + if ( precedenceRemoveBoth( li, lj ) ) + trans->actions.remove( i ); + + goto again; + } + } + } + } + + /* If there are still actions then move to the next one. If not, + * (due to nonassoc) then remove the transition. */ + if ( trans->actions.length() > 0 ) + t += 1; + else + state->transMap.vremove( t ); + } + } +} + +void Compiler::analyzeMachine( PdaGraph *pdaGraph, LangElSet &parserEls ) +{ + pdaGraph->maxState = pdaGraph->stateList.length() - 1; + pdaGraph->maxLelId = nextSymbolId - 1; + pdaGraph->maxOffset = pdaGraph->stateList.length() * pdaGraph->maxLelId; + + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + if ( trans->value->isShift ) { + trans->value->actions.append( SHIFT_CODE ); + trans->value->actPriors.append( trans->value->shiftPrior ); + } + for ( ReductionMap::Iter red = trans->value->reductions; red.lte(); red++ ) { + trans->value->actions.append( makeReduceCode( red->key, false ) ); + trans->value->actPriors.append( red->value ); + } + trans->value->actOrds.appendDup( 0, trans->value->actions.length() ); + } + } + + pdaActionOrder( pdaGraph, parserEls ); + sortActions( pdaGraph ); + resolvePrecedence( pdaGraph ); + + /* Verify that any type we parse_stop can actually be parsed that way. */ + for ( LangElSet::Iter pe = parserEls; pe.lte(); pe++ ) { + LangEl *lel = *pe; + if ( lel->parseStop ) + computeAdvanceReductions(lel , pdaGraph); + } + + advanceReductions( pdaGraph ); + pdaGraph->setStateNumbers(); + reduceActions( pdaGraph ); + + /* Set the action ids. */ + int actionSetId = 0; + for ( PdaActionSet::Iter asi = pdaGraph->actionSet; asi.lte(); asi++ ) + asi->key.id = actionSetId++; + + /* Get the max index. */ + pdaGraph->maxIndex = actionSetId - 1; + + /* Compute the max prod length. */ + pdaGraph->maxProdLen = 0; + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + if ( (unsigned)prod->fsmLength > pdaGraph->maxProdLen ) + pdaGraph->maxProdLen = prod->fsmLength; + } + + /* Asserts that any transition with a nonterminal has a single action + * which is either a shift or a shift-reduce. */ + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + LangEl *langEl = langElIndex[trans->value->lowKey]; + if ( langEl != 0 && langEl->type == LangEl::NonTerm ) { + assert( trans->value->actions.length() == 1 ); + assert( trans->value->actions[0] == SHIFT_CODE || + (trans->value->actions[0] & 0x3) == SHIFT_REDUCE_CODE ); + } + } + } + + /* Assert that shift reduces always appear on their own. */ + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + for ( ActDataList::Iter act = trans->value->actions; act.lte(); act++ ) { + if ( (*act & 0x3) == SHIFT_REDUCE_CODE ) + assert( trans->value->actions.length() == 1 ); + } + } + } + + /* Verify that any type we parse_stop can actually be parsed that way. */ + for ( LangElSet::Iter pe = parserEls; pe.lte(); pe++ ) { + LangEl *lel = *pe; + if ( lel->parseStop ) + verifyParseStopGrammar(lel , pdaGraph); + } +} + +void Compiler::wrapNonTerminals() +{ + /* Make a language element that will be used to make the root productions. + * These are used for making parsers rooted at any production (including + * the start symbol). */ + rootLangEl = declareLangEl( this, rootNamespace, "_root", LangEl::NonTerm ); + + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + /* Make a single production used when the lel is a root. */ + ProdElList *prodElList = makeProdElList( lel ); + lel->rootDef = Production::cons( InputLoc(), rootLangEl, + prodElList, String(), false, 0, + prodList.length(), rootLangEl->defList.length() ); + prodList.append( lel->rootDef ); + rootLangEl->defList.append( lel->rootDef ); + + /* First resolve. */ + for ( ProdElList::Iter prodEl = *prodElList; prodEl.lte(); prodEl++ ) + resolveProdEl( prodEl ); + } +} + +bool Compiler::makeNonTermFirstSetProd( Production *prod, PdaState *state ) +{ + bool modified = false; + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + if ( trans->key >= firstNonTermId ) { + long *inserted = prod->nonTermFirstSet.insert( trans->key ); + if ( inserted != 0 ) + modified = true; + + bool hasEpsilon = false; + LangEl *lel = langElIndex[trans->key]; + for ( LelDefList::Iter ldef = lel->defList; ldef.lte(); ldef++ ) { + for ( ProdIdSet::Iter pid = ldef->nonTermFirstSet; + pid.lte(); pid++ ) + { + if ( *pid == -1 ) + hasEpsilon = true; + else { + long *inserted = prod->nonTermFirstSet.insert( *pid ); + if ( inserted != 0 ) + modified = true; + } + } + } + + if ( hasEpsilon ) { + if ( trans->value->toState->isFinState() ) { + long *inserted = prod->nonTermFirstSet.insert( -1 ); + if ( inserted != 0 ) + modified = true; + } + + bool lmod = makeNonTermFirstSetProd( prod, trans->value->toState ); + if ( lmod ) + modified = true; + } + } + } + return modified; +} + + +void Compiler::makeNonTermFirstSets() +{ + bool modified = true; + while ( modified ) { + modified = false; + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + if ( prod->fsm->startState->isFinState() ) { + long *inserted = prod->nonTermFirstSet.insert( -1 ); + if ( inserted != 0 ) + modified = true; + } + + bool lmod = makeNonTermFirstSetProd( prod, prod->fsm->startState ); + if ( lmod ) + modified = true; + } + } + + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + if ( prod->nonTermFirstSet.find( prod->prodName->id ) ) + prod->isLeftRec = true; + } +} + +void Compiler::printNonTermFirstSets() +{ + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + cerr << prod->data << ": "; + for ( ProdIdSet::Iter pid = prod->nonTermFirstSet; pid.lte(); pid++ ) + { + if ( *pid < 0 ) + cerr << " <EPSILON>"; + else { + LangEl *lel = langElIndex[*pid]; + cerr << " " << lel->name; + } + } + cerr << endl; + + if ( prod->isLeftRec ) + cerr << "PROD IS LEFT REC: " << prod->data << endl; + } +} + +bool Compiler::makeFirstSetProd( Production *prod, PdaState *state ) +{ + bool modified = false; + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + if ( trans->key < firstNonTermId ) { + long *inserted = prod->firstSet.insert( trans->key ); + if ( inserted != 0 ) + modified = true; + } + else { + long *inserted = prod->firstSet.insert( trans->key ); + if ( inserted != 0 ) + modified = true; + + LangEl *klangEl = langElIndex[trans->key]; + if ( klangEl != 0 && klangEl->termDup != 0 ) { + long *inserted2 = prod->firstSet.insert( klangEl->termDup->id ); + if ( inserted2 != 0 ) + modified = true; + } + + bool hasEpsilon = false; + LangEl *lel = langElIndex[trans->key]; + for ( LelDefList::Iter ldef = lel->defList; ldef.lte(); ldef++ ) { + for ( ProdIdSet::Iter pid = ldef->firstSet; + pid.lte(); pid++ ) + { + if ( *pid == -1 ) + hasEpsilon = true; + else { + long *inserted = prod->firstSet.insert( *pid ); + if ( inserted != 0 ) + modified = true; + } + } + } + + if ( hasEpsilon ) { + if ( trans->value->toState->isFinState() ) { + long *inserted = prod->firstSet.insert( -1 ); + if ( inserted != 0 ) + modified = true; + } + + bool lmod = makeFirstSetProd( prod, trans->value->toState ); + if ( lmod ) + modified = true; + } + } + } + return modified; +} + + +void Compiler::makeFirstSets() +{ + bool modified = true; + while ( modified ) { + modified = false; + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + if ( prod->fsm->startState->isFinState() ) { + long *inserted = prod->firstSet.insert( -1 ); + if ( inserted != 0 ) + modified = true; + } + + bool lmod = makeFirstSetProd( prod, prod->fsm->startState ); + if ( lmod ) + modified = true; + } + } +} + +void Compiler::printFirstSets() +{ + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + cerr << prod->data << ": "; + for ( ProdIdSet::Iter pid = prod->firstSet; pid.lte(); pid++ ) + { + if ( *pid < 0 ) + cerr << " <EPSILON>"; + else { + LangEl *lel = langElIndex[*pid]; + if ( lel != 0 ) + cerr << endl << " " << lel->name; + else + cerr << endl << " " << *pid; + } + } + cerr << endl; + } +} + +void Compiler::insertUniqueEmptyProductions() +{ + int limit = prodList.length(); + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + if ( prod->prodId == limit ) + break; + + /* Get a language element. */ + char name[20]; + sprintf(name, "U%li", prodList.length()); + LangEl *prodName = addLangEl( this, rootNamespace, name, LangEl::NonTerm ); + Production *newDef = Production::cons( InputLoc(), prodName, + 0, String(), false, 0, prodList.length(), prodName->defList.length() ); + prodName->defList.append( newDef ); + prodList.append( newDef ); + + prod->uniqueEmptyLeader = prodName; + } +} + +LocalInfo *Compiler::makeLocalInfo( Locals &locals ) +{ + LocalInfo *localInfo = new LocalInfo[locals.locals.length()]; + memset( localInfo, 0, sizeof(LocalInfo) * locals.locals.length() ); + + for ( Vector<LocalLoc>::Iter l = locals.locals; l.lte(); l++ ) { + localInfo[l.pos()].type = (int) l->type; + localInfo[l.pos()].offset = l->offset; + } + return localInfo; +} + +void Compiler::makeRuntimeData() +{ + long count = 0; + + /* + * ProdLengths + * ProdLhsIs + * ProdNames + * ProdCodeBlocks + * ProdCodeBlockLens + */ + + runtimeData->frameInfo = new FrameInfo[nextFrameId]; + runtimeData->numFrames = nextFrameId; + memset( runtimeData->frameInfo, 0, sizeof(FrameInfo) * nextFrameId ); + + /* + * Init code block. + */ + if ( rootCodeBlock == 0 ) { + runtimeData->rootCode = 0; + runtimeData->rootCodeLen = 0; + runtimeData->rootFrameId = 0; + } + else { + runtimeData->rootCode = rootCodeBlock->codeWC.data; + runtimeData->rootCodeLen = rootCodeBlock->codeWC.length(); + runtimeData->rootFrameId = rootCodeBlock->frameId; + } + + runtimeData->frameInfo[rootCodeBlock->frameId].codeWV = 0; + runtimeData->frameInfo[rootCodeBlock->frameId].codeLenWV = 0; + + runtimeData->frameInfo[rootCodeBlock->frameId].locals = makeLocalInfo( rootCodeBlock->locals ); + runtimeData->frameInfo[rootCodeBlock->frameId].localsLen = rootCodeBlock->locals.locals.length(); + + runtimeData->frameInfo[rootCodeBlock->frameId].frameSize = rootLocalFrame->size(); + runtimeData->frameInfo[rootCodeBlock->frameId].argSize = 0; + + /* + * prodInfo + */ + count = prodList.length(); + runtimeData->prodInfo = new ProdInfo[count]; + runtimeData->numProds = count; + + count = 0; + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + runtimeData->prodInfo[count].lhsId = prod->prodName->id; + runtimeData->prodInfo[count].prodNum = prod->prodNum; + runtimeData->prodInfo[count].length = prod->fsmLength; + runtimeData->prodInfo[count].name = prod->data; + runtimeData->prodInfo[count].frameId = -1; + + CodeBlock *block = prod->redBlock; + if ( block != 0 ) { + runtimeData->prodInfo[count].frameId = block->frameId; + runtimeData->frameInfo[block->frameId].codeWV = block->codeWV.data; + runtimeData->frameInfo[block->frameId].codeLenWV = block->codeWV.length(); + + runtimeData->frameInfo[block->frameId].locals = makeLocalInfo( block->locals ); + runtimeData->frameInfo[block->frameId].localsLen = block->locals.locals.length(); + + runtimeData->frameInfo[block->frameId].frameSize = block->localFrame->size(); + runtimeData->frameInfo[block->frameId].argSize = 0; + } + + runtimeData->prodInfo[count].lhsUpref = true; + runtimeData->prodInfo[count].copy = prod->copy.data; + runtimeData->prodInfo[count].copyLen = prod->copy.length() / 2; + count += 1; + } + + /* + * regionInfo + */ + runtimeData->numRegions = regionList.length()+1; + runtimeData->regionInfo = new RegionInfo[runtimeData->numRegions]; + memset( runtimeData->regionInfo, 0, sizeof(RegionInfo) * runtimeData->numRegions ); + + runtimeData->regionInfo[0].defaultToken = -1; + runtimeData->regionInfo[0].eofFrameId = -1; + runtimeData->regionInfo[0].ciLelId = 0; + + for ( RegionList::Iter reg = regionList; reg.lte(); reg++ ) { + long regId = reg->id+1; + runtimeData->regionInfo[regId].defaultToken = + reg->impl->defaultTokenInstance == 0 ? + -1 : + reg->impl->defaultTokenInstance->tokenDef->tdLangEl->id; + runtimeData->regionInfo[regId].eofFrameId = -1; + runtimeData->regionInfo[regId].ciLelId = reg->zeroLel != 0 ? reg->zeroLel->id : 0; + + CodeBlock *block = reg->preEofBlock; + if ( block != 0 ) { + runtimeData->regionInfo[regId].eofFrameId = block->frameId; + runtimeData->frameInfo[block->frameId].codeWV = block->codeWV.data; + runtimeData->frameInfo[block->frameId].codeLenWV = block->codeWV.length(); + + runtimeData->frameInfo[block->frameId].locals = makeLocalInfo( block->locals ); + runtimeData->frameInfo[block->frameId].localsLen = block->locals.locals.length(); + + runtimeData->frameInfo[block->frameId].frameSize = block->localFrame->size(); + runtimeData->frameInfo[block->frameId].argSize = 0; + } + } + + /* + * lelInfo + */ + + count = nextSymbolId; + runtimeData->lelInfo = new LangElInfo[count]; + runtimeData->numLangEls = count; + memset( runtimeData->lelInfo, 0, sizeof(LangElInfo)*count ); + + for ( int i = 0; i < nextSymbolId; i++ ) { + LangEl *lel = langElIndex[i]; + if ( lel != 0 ) { + runtimeData->lelInfo[i].name = lel->fullLit; + runtimeData->lelInfo[i].xmlTag = lel->xmlTag; + runtimeData->lelInfo[i].repeat = lel->isRepeat; + runtimeData->lelInfo[i].list = lel->isList; + runtimeData->lelInfo[i].literal = lel->isLiteral; + runtimeData->lelInfo[i].ignore = lel->isIgnore; + runtimeData->lelInfo[i].frameId = -1; + + CodeBlock *block = lel->transBlock; + if ( block != 0 ) { + runtimeData->lelInfo[i].frameId = block->frameId; + runtimeData->frameInfo[block->frameId].codeWV = block->codeWV.data; + runtimeData->frameInfo[block->frameId].codeLenWV = block->codeWV.length(); + + runtimeData->frameInfo[block->frameId].locals = makeLocalInfo( block->locals ); + runtimeData->frameInfo[block->frameId].localsLen = block->locals.locals.length(); + + runtimeData->frameInfo[block->frameId].frameSize = block->localFrame->size(); + runtimeData->frameInfo[block->frameId].argSize = 0; + } + + runtimeData->lelInfo[i].objectTypeId = + lel->objectDef == 0 ? 0 : lel->objectDef->id; + runtimeData->lelInfo[i].ofiOffset = lel->ofiOffset; + runtimeData->lelInfo[i].objectLength = + lel->objectDef != 0 ? lel->objectDef->size() : 0; + +// runtimeData->lelInfo[i].contextTypeId = 0; +// lel->context == 0 ? 0 : lel->context->contextObjDef->id; +// runtimeData->lelInfo[i].contextLength = 0; //lel->context == 0 ? 0 : +// lel->context->contextObjDef->size(); +// if ( lel->context != 0 ) { +// cout << "type: " << runtimeData->lelInfo[i].contextTypeId << " length: " << +// runtimeData->lelInfo[i].contextLength << endl; +// } + + runtimeData->lelInfo[i].termDupId = lel->termDup == 0 ? 0 : lel->termDup->id; + runtimeData->lelInfo[i].genericId = lel->generic == 0 ? 0 : lel->generic->id; + + if ( lel->tokenDef != 0 && lel->tokenDef->join != 0 && + lel->tokenDef->join->context != 0 ) + runtimeData->lelInfo[i].markId = lel->tokenDef->join->mark->markId; + else + runtimeData->lelInfo[i].markId = -1; + + runtimeData->lelInfo[i].numCaptureAttr = 0; + } + else { + memset(&runtimeData->lelInfo[i], 0, sizeof(LangElInfo) ); + runtimeData->lelInfo[i].name = "__UNUSED"; + runtimeData->lelInfo[i].xmlTag = "__UNUSED"; + runtimeData->lelInfo[i].frameId = -1; + } + } + + /* + * FunctionInfo + */ + count = functionList.length(); + + runtimeData->functionInfo = new FunctionInfo[count]; + runtimeData->numFunctions = count; + memset( runtimeData->functionInfo, 0, sizeof(FunctionInfo)*count ); + for ( FunctionList::Iter func = functionList; func.lte(); func++ ) { + runtimeData->functionInfo[func->funcId].name = func->name; + runtimeData->functionInfo[func->funcId].frameId = -1; + + CodeBlock *block = func->codeBlock; + if ( block != 0 ) { + runtimeData->functionInfo[func->funcId].frameId = block->frameId; + + runtimeData->frameInfo[block->frameId].codeWV = block->codeWV.data; + runtimeData->frameInfo[block->frameId].codeLenWV = block->codeWV.length(); + + runtimeData->frameInfo[block->frameId].codeWC = block->codeWC.data; + runtimeData->frameInfo[block->frameId].codeLenWC = block->codeWC.length(); + + runtimeData->frameInfo[block->frameId].locals = makeLocalInfo( block->locals ); + runtimeData->frameInfo[block->frameId].localsLen = block->locals.locals.length(); + + runtimeData->frameInfo[block->frameId].frameSize = func->localFrame->size(); + runtimeData->frameInfo[block->frameId].argSize = func->paramListSize; + } + + runtimeData->functionInfo[func->funcId].frameSize = func->localFrame->size(); + runtimeData->functionInfo[func->funcId].argSize = func->paramListSize; + } + + /* + * PatConsInfo + */ + + /* Filled in later after patterns are parsed. */ + runtimeData->patReplInfo = new PatConsInfo[nextPatConsId]; + memset( runtimeData->patReplInfo, 0, sizeof(PatConsInfo) * nextPatConsId ); + runtimeData->numPatterns = nextPatConsId; + runtimeData->patReplNodes = 0; + runtimeData->numPatternNodes = 0; + + + /* + * GenericInfo + */ + count = 1; + for ( NamespaceList::Iter nspace = namespaceList; nspace.lte(); nspace++ ) + count += nspace->genericList.length(); + assert( count == nextGenericId ); + + runtimeData->genericInfo = new GenericInfo[count]; + runtimeData->numGenerics = count; + memset( &runtimeData->genericInfo[0], 0, sizeof(GenericInfo) ); + for ( NamespaceList::Iter nspace = namespaceList; nspace.lte(); nspace++ ) { + for ( GenericList::Iter gen = nspace->genericList; gen.lte(); gen++ ) { + runtimeData->genericInfo[gen->id].type = gen->typeId; + runtimeData->genericInfo[gen->id].typeArg = gen->utArg->typeId; + runtimeData->genericInfo[gen->id].keyType = gen->keyUT != 0 ? + gen->keyUT->typeId : 0; + runtimeData->genericInfo[gen->id].keyOffset = 0; + runtimeData->genericInfo[gen->id].langElId = gen->langEl->id; + runtimeData->genericInfo[gen->id].parserId = gen->utArg->langEl->parserId; + } + } + + runtimeData->argvGenericId = argvTypeRef->generic->id; + + /* + * Literals + */ + runtimeData->numLiterals = literalStrings.length(); + runtimeData->litdata = new const char *[literalStrings.length()]; + runtimeData->litlen = new long [literalStrings.length()]; + runtimeData->literals = 0; + for ( StringMap::Iter el = literalStrings; el.lte(); el++ ) { + /* Data. */ + char *data = new char[el->key.length()+1]; + memcpy( data, el->key.data, el->key.length() ); + data[el->key.length()] = 0; + runtimeData->litdata[el->value] = data; + + /* Length. */ + runtimeData->litlen[el->value] = el->key.length(); + } + + /* Captured attributes. Loop over tokens and count first. */ + long numCapturedAttr = 0; +// for ( RegionList::Iter reg = regionList; reg.lte(); reg++ ) { +// for ( TokenInstanceListReg::Iter td = reg->tokenInstanceList; td.lte(); td++ ) +// numCapturedAttr += td->reCaptureVect.length(); +// } + runtimeData->captureAttr = new CaptureAttr[numCapturedAttr]; + runtimeData->numCapturedAttr = numCapturedAttr; + memset( runtimeData->captureAttr, 0, sizeof( CaptureAttr ) * numCapturedAttr ); + + count = 0; +// for ( RegionList::Iter reg = regionList; reg.lte(); reg++ ) { +// for ( TokenInstanceListReg::Iter td = reg->tokenInstanceList; td.lte(); td++ ) { +// runtimeData->lelInfo[td->token->id].captureAttr = count; +// runtimeData->lelInfo[td->token->id].numCaptureAttr = td->reCaptureVect.length(); +// for ( ReCaptureVect::Iter c = td->reCaptureVect; c.lte(); c++ ) { +// runtimeData->captureAttr[count].mark_enter = c->markEnter->markId; +// runtimeData->captureAttr[count].mark_leave = c->markLeave->markId; +// runtimeData->captureAttr[count].offset = c->objField->offset; +// +// count += 1; +// } +// } +// } + + runtimeData->fsmTables = fsmTables; + runtimeData->pdaTables = pdaTables; + + /* FIXME: need a parser descriptor. */ + runtimeData->startStates = new int[nextParserId]; + runtimeData->eofLelIds = new int[nextParserId]; + runtimeData->parserLelIds = new int[nextParserId]; + runtimeData->numParsers = nextParserId; + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->parserId >= 0 ) { + runtimeData->startStates[lel->parserId] = lel->startState->stateNum; + runtimeData->eofLelIds[lel->parserId] = lel->eofLel->id; + runtimeData->parserLelIds[lel->parserId] = lel->id; + } + } + + runtimeData->globalSize = globalObjectDef->size(); + + /* + * firstNonTermId + */ + runtimeData->firstNonTermId = firstNonTermId; + + /* Special trees. */ + runtimeData->integerId = intLangEl->id; + runtimeData->stringId = strLangEl->id; + runtimeData->anyId = anyLangEl->id; + runtimeData->eofId = 0; //eofLangEl->id; + runtimeData->noTokenId = noTokenLangEl->id; + + runtimeData->fsmExecute = &internalFsmExecute; + runtimeData->sendNamedLangEl = &internalSendNamedLangEl; + runtimeData->initBindings = &internalInitBindings; + runtimeData->popBinding = &internalPopBinding; +} + +/* Borrow alg->state for mapsTo. */ +void countNodes( Program *prg, int &count, ParseTree *parseTree, Kid *kid ) +{ + if ( kid != 0 ) { + count += 1; + + /* Should't have to recurse here. */ + Tree *ignoreList = treeLeftIgnore( prg, kid->tree ); + if ( ignoreList != 0 ) { + Kid *ignore = ignoreList->child; + while ( ignore != 0 ) { + count += 1; + ignore = ignore->next; + } + } + + ignoreList = treeRightIgnore( prg, kid->tree ); + if ( ignoreList != 0 ) { + Kid *ignore = ignoreList->child; + while ( ignore != 0 ) { + count += 1; + ignore = ignore->next; + } + } + + //count += prg->rtd->lelInfo[kid->tree->id].numCaptureAttr; + + if ( !( parseTree->flags & PF_NAMED ) && + !( parseTree->flags & PF_ARTIFICIAL ) && + treeChild( prg, kid->tree ) != 0 ) + { + countNodes( prg, count, parseTree->child, treeChild( prg, kid->tree ) ); + } + countNodes( prg, count, parseTree->next, kid->next ); + } +} + +void fillNodes( Program *prg, int &nextAvail, Bindings *bindings, long &bindId, + PatConsNode *nodes, ParseTree *parseTree, Kid *kid, int ind ) +{ + if ( kid != 0 ) { + PatConsNode &node = nodes[ind]; + + Kid *child = + !( parseTree->flags & PF_NAMED ) && + !( parseTree->flags & PF_ARTIFICIAL ) && + treeChild( prg, kid->tree ) != 0 + ? + treeChild( prg, kid->tree ) : 0; + + ParseTree *ptChild = + !( parseTree->flags & PF_NAMED ) && + !( parseTree->flags & PF_ARTIFICIAL ) && + treeChild( prg, kid->tree ) != 0 + ? + parseTree->child : 0; + + /* Set up the fields. */ + node.id = kid->tree->id; + node.prodNum = kid->tree->prodNum; + node.length = stringLength( kid->tree->tokdata ); + node.data = stringData( kid->tree->tokdata ); + + /* Ignore items. */ + Tree *ignoreList = treeLeftIgnore( prg, kid->tree ); + Kid *ignore = ignoreList == 0 ? 0 : ignoreList->child; + node.leftIgnore = ignore == 0 ? -1 : nextAvail; + + while ( ignore != 0 ) { + PatConsNode &node = nodes[nextAvail++]; + + memset( &node, 0, sizeof(PatConsNode) ); + node.id = ignore->tree->id; + node.prodNum = ignore->tree->prodNum; + node.next = ignore->next == 0 ? -1 : nextAvail; + + node.length = stringLength( ignore->tree->tokdata ); + node.data = stringData( ignore->tree->tokdata ); + + ignore = ignore->next; + } + + /* Ignore items. */ + ignoreList = treeRightIgnore( prg, kid->tree ); + ignore = ignoreList == 0 ? 0 : ignoreList->child; + node.rightIgnore = ignore == 0 ? -1 : nextAvail; + + while ( ignore != 0 ) { + PatConsNode &node = nodes[nextAvail++]; + + memset( &node, 0, sizeof(PatConsNode) ); + node.id = ignore->tree->id; + node.prodNum = ignore->tree->prodNum; + node.next = ignore->next == 0 ? -1 : nextAvail; + + node.length = stringLength( ignore->tree->tokdata ); + node.data = stringData( ignore->tree->tokdata ); + + ignore = ignore->next; + } + + ///* The captured attributes. */ + //for ( int i = 0; i < prg->rtd->lelInfo[kid->tree->id].numCaptureAttr; i++ ) { + // CaptureAttr *cap = prg->rtd->captureAttr + + // prg->rtd->lelInfo[kid->tree->id].captureAttr + i; + // + // Tree *attr = colm_get_attr( kid->tree, cap->offset ); + // + // PatConsNode &node = nodes[nextAvail++]; + // memset( &node, 0, sizeof(PatConsNode) ); + // + // node.id = attr->id; + // node.prodNum = attr->prodNum; + // node.length = stringLength( attr->tokdata ); + // node.data = stringData( attr->tokdata ); + //} + + node.stop = parseTree->flags & PF_TERM_DUP; + + node.child = child == 0 ? -1 : nextAvail++; + + /* Recurse. */ + fillNodes( prg, nextAvail, bindings, bindId, nodes, ptChild, child, node.child ); + + /* Since the parser is bottom up the bindings are in a bottom up + * traversal order. Check after recursing. */ + node.bindId = 0; + if ( bindId < bindings->length() && bindings->data[bindId] == parseTree ) { + /* Remember that binding ids are indexed from one. */ + node.bindId = bindId++; + + //cout << "binding match in " << __PRETTY_FUNCTION__ << endl; + //cout << "bindId: " << node.bindId << endl; + } + + node.next = kid->next == 0 ? -1 : nextAvail++; + + /* Move to the next child. */ + fillNodes( prg, nextAvail, bindings, bindId, nodes, parseTree->next, kid->next, node.next ); + } +} + +void Compiler::fillInPatterns( Program *prg ) +{ + /* + * patReplNodes + */ + + /* Count is referenced and computed by mapNode. */ + int count = 0; + for ( PatList::Iter pat = patternList; pat.lte(); pat++ ) { + countNodes( prg, count, + pat->pdaRun->stackTop->next, + pat->pdaRun->stackTop->next->shadow ); + } + + for ( ConsList::Iter repl = replList; repl.lte(); repl++ ) { + countNodes( prg, count, + repl->pdaRun->stackTop->next, + repl->pdaRun->stackTop->next->shadow ); + } + + runtimeData->patReplNodes = new PatConsNode[count]; + runtimeData->numPatternNodes = count; + + int nextAvail = 0; + + for ( PatList::Iter pat = patternList; pat.lte(); pat++ ) { + int ind = nextAvail++; + runtimeData->patReplInfo[pat->patRepId].offset = ind; + + /* BindIds are indexed base one. */ + runtimeData->patReplInfo[pat->patRepId].numBindings = + pat->pdaRun->bindings->length() - 1; + + /* Init the bind */ + long bindId = 1; + fillNodes( prg, nextAvail, pat->pdaRun->bindings, bindId, + runtimeData->patReplNodes, + pat->pdaRun->stackTop->next, + pat->pdaRun->stackTop->next->shadow, + ind ); + } + + for ( ConsList::Iter repl = replList; repl.lte(); repl++ ) { + int ind = nextAvail++; + runtimeData->patReplInfo[repl->patRepId].offset = ind; + + /* BindIds are indexed base one. */ + runtimeData->patReplInfo[repl->patRepId].numBindings = + repl->pdaRun->bindings->length() - 1; + + long bindId = 1; + fillNodes( prg, nextAvail, repl->pdaRun->bindings, bindId, + runtimeData->patReplNodes, + repl->pdaRun->stackTop->next, + repl->pdaRun->stackTop->next->shadow, + ind ); + } + + assert( nextAvail == count ); +} + + +int Compiler::findIndexOff( PdaTables *pdaTables, PdaGraph *pdaGraph, PdaState *state, int &curLen ) +{ + for ( int start = 0; start < curLen; ) { + int offset = start; + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + if ( pdaTables->owners[offset] != -1 ) + goto next_start; + + offset++; + if ( ! trans.last() ) { + TransMap::Iter next = trans.next(); + offset += next->key - trans->key - 1; + } + } + + /* Got though the whole list without a conflict. */ + return start; + +next_start: + start++; + } + + return curLen; +} + +struct CmpSpan +{ + static int compare( PdaState *state1, PdaState *state2 ) + { + int dist1 = 0, dist2 = 0; + + if ( state1->transMap.length() > 0 ) { + TransMap::Iter first1 = state1->transMap.first(); + TransMap::Iter last1 = state1->transMap.last(); + dist1 = last1->key - first1->key; + } + + if ( state2->transMap.length() > 0 ) { + TransMap::Iter first2 = state2->transMap.first(); + TransMap::Iter last2 = state2->transMap.last(); + dist2 = last2->key - first2->key; + } + + if ( dist1 < dist2 ) + return 1; + else if ( dist2 < dist1 ) + return -1; + return 0; + } +}; + +PdaGraph *Compiler::makePdaGraph( LangElSet &parserEls ) +{ + //for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) + // cerr << prod->prodId << " " << prod->data << endl; + + PdaGraph *pdaGraph = new PdaGraph(); + lalr1GenerateParser( pdaGraph, parserEls ); + pdaGraph->setStateNumbers(); + analyzeMachine( pdaGraph, parserEls ); + + //cerr << "NUMBER OF STATES: " << pdaGraph->stateList.length() << endl; + + return pdaGraph; +} + +PdaTables *Compiler::makePdaTables( PdaGraph *pdaGraph ) +{ + int count, pos; + PdaTables *pdaTables = new PdaTables; + + /* + * Counting max indices. + */ + count = 0; + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + count++; + if ( ! trans.last() ) { + TransMap::Iter next = trans.next(); + count += next->key - trans->key - 1; + } + } + } + + + /* Allocate indicies and owners. */ + pdaTables->numIndicies = count; + pdaTables->indicies = new int[count]; + pdaTables->owners = new int[count]; + for ( long i = 0; i < count; i++ ) { + pdaTables->indicies[i] = -1; + pdaTables->owners[i] = -1; + } + + /* Allocate offsets. */ + int numStates = pdaGraph->stateList.length(); + pdaTables->offsets = new unsigned int[numStates]; + pdaTables->numStates = numStates; + + /* Place transitions into indicies/owners */ + PdaState **states = new PdaState*[numStates]; + long ds = 0; + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) + states[ds++] = state; + + /* Sorting baseded on span length. Gives an improvement, but incures a + * cost. Off for now. */ + //MergeSort< PdaState*, CmpSpan > mergeSort; + //mergeSort.sort( states, numStates ); + + int indLen = 0; + for ( int s = 0; s < numStates; s++ ) { + PdaState *state = states[s]; + + int indOff = findIndexOff( pdaTables, pdaGraph, state, indLen ); + pdaTables->offsets[state->stateNum] = indOff; + + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + pdaTables->indicies[indOff] = trans->value->actionSetEl->key.id; + pdaTables->owners[indOff] = state->stateNum; + indOff++; + + if ( ! trans.last() ) { + TransMap::Iter next = trans.next(); + indOff += next->key - trans->key - 1; + } + } + + if ( indOff > indLen ) + indLen = indOff; + } + + /* We allocated the max, but cmpression gives us less. */ + pdaTables->numIndicies = indLen; + delete[] states; + + + /* + * Keys + */ + count = pdaGraph->stateList.length() * 2;; + pdaTables->keys = new int[count]; + pdaTables->numKeys = count; + + count = 0; + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + if ( state->transMap.length() == 0 ) { + pdaTables->keys[count+0] = 0; + pdaTables->keys[count+1] = 0; + } + else { + TransMap::Iter first = state->transMap.first(); + TransMap::Iter last = state->transMap.last(); + pdaTables->keys[count+0] = first->key; + pdaTables->keys[count+1] = last->key; + } + count += 2; + } + + /* + * Targs + */ + count = pdaGraph->actionSet.length(); + pdaTables->targs = new unsigned int[count]; + pdaTables->numTargs = count; + + count = 0; + for ( PdaActionSet::Iter asi = pdaGraph->actionSet; asi.lte(); asi++ ) + pdaTables->targs[count++] = asi->key.targ; + + /* + * ActInds + */ + count = pdaGraph->actionSet.length(); + pdaTables->actInds = new unsigned int[count]; + pdaTables->numActInds = count; + + count = pos = 0; + for ( PdaActionSet::Iter asi = pdaGraph->actionSet; asi.lte(); asi++ ) { + pdaTables->actInds[count++] = pos; + pos += asi->key.actions.length() + 1; + } + + /* + * Actions + */ + count = 0; + for ( PdaActionSet::Iter asi = pdaGraph->actionSet; asi.lte(); asi++ ) + count += asi->key.actions.length() + 1; + + pdaTables->actions = new unsigned int[count]; + pdaTables->numActions = count; + + count = 0; + for ( PdaActionSet::Iter asi = pdaGraph->actionSet; asi.lte(); asi++ ) { + for ( ActDataList::Iter ali = asi->key.actions; ali.lte(); ali++ ) + pdaTables->actions[count++] = *ali; + + pdaTables->actions[count++] = 0; + } + + /* + * CommitLen + */ + count = pdaGraph->actionSet.length(); + pdaTables->commitLen = new int[count]; + pdaTables->numCommitLen = count; + + count = 0; + for ( PdaActionSet::Iter asi = pdaGraph->actionSet; asi.lte(); asi++ ) + pdaTables->commitLen[count++] = asi->key.commitLen; + + /* + * tokenRegionInds. Start at one so region index 0 is null (unset). + */ + count = 0; + pos = 1; + pdaTables->tokenRegionInds = new int[pdaTables->numStates]; + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + pdaTables->tokenRegionInds[count++] = pos; + pos += state->regions.length() + 1; + } + + + /* + * tokenRegions. Build in a null at the beginning. + */ + + count = 1; + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) + count += state->regions.length() + 1; + + pdaTables->numRegionItems = count; + pdaTables->tokenRegions = new int[pdaTables->numRegionItems]; + + count = 0; + pdaTables->tokenRegions[count++] = 0; + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + for ( RegionVect::Iter reg = state->regions; reg.lte(); reg++ ) { + int id = ( *reg == EOF_REGION ) ? 0 : (*reg)->id + 1; + pdaTables->tokenRegions[count++] = id; + } + + pdaTables->tokenRegions[count++] = 0; + } + + /* + * tokenPreRegions. Build in a null at the beginning. + */ + + count = 1; + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) + count += state->regions.length() + 1; + + pdaTables->numPreRegionItems = count; + pdaTables->tokenPreRegions = new int[pdaTables->numPreRegionItems]; + + count = 0; + pdaTables->tokenPreRegions[count++] = 0; + for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) { + for ( RegionVect::Iter reg = state->regions; reg.lte(); reg++ ) { + assert( state->preRegions.length() <= 1 ); + if ( state->preRegions.length() == 0 || state->preRegions[0]->impl->wasEmpty ) + pdaTables->tokenPreRegions[count++] = -1; + else + pdaTables->tokenPreRegions[count++] = state->preRegions[0]->id + 1; + } + + pdaTables->tokenPreRegions[count++] = 0; + } + + + return pdaTables; +} + +void Compiler::makeParser( LangElSet &parserEls ) +{ + pdaGraph = makePdaGraph( parserEls ); + pdaTables = makePdaTables( pdaGraph ); +} + diff --git a/src/pdacodegen.cc b/src/pdacodegen.cc new file mode 100644 index 0000000..904cd42 --- /dev/null +++ b/src/pdacodegen.cc @@ -0,0 +1,642 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <iostream> +#include <stdlib.h> +#include <ctype.h> +#include <limits.h> +#include "global.h" +#include "parsedata.h" +#include "avlmap.h" +#include "avlbasic.h" +#include "avlset.h" +#include "mergesort.h" +#include "pdacodegen.h" + +using std::cerr; +using std::endl; + +#define FRESH_BLOCK 8128 +#define act_sb "0x1" +#define act_rb "0x2" +#define lower "0x0000ffff" +#define upper "0xffff0000" + +void escapeLiteralString( std::ostream &out, const char *path, int length ) +{ + for ( const char *pc = path, *end = path+length; pc != end; pc++ ) { + switch ( *pc ) { + case '\\': out << "\\\\"; break; + case '"': out << "\\\""; break; + case '\a': out << "\\a"; break; + case '\b': out << "\\b"; break; + case '\t': out << "\\t"; break; + case '\n': out << "\\n"; break; + case '\v': out << "\\v"; break; + case '\f': out << "\\f"; break; + case '\r': out << "\\r"; break; + default: out << *pc; break; + } + } +} + +void escapeLiteralString( std::ostream &out, const char *path ) +{ + escapeLiteralString( out, path, strlen(path) ); +} + +void PdaCodeGen::defineRuntime() +{ + out << + "extern RuntimeData colm_program_text;\n" + "\n"; +} + +void PdaCodeGen::writeRuntimeData( RuntimeData *runtimeData, PdaTables *pdaTables ) +{ + /* + * Blocks of code in frames. + */ + for ( int i = 0; i < runtimeData->numFrames; i++ ) { + /* FIXME: horrible code cloning going on here. */ + if ( runtimeData->frameInfo[i].codeLenWV > 0 ) { + out << "static Code code_" << i << "_wv[] = {\n\t"; + + Code *block = runtimeData->frameInfo[i].codeWV; + for ( int j = 0; j < runtimeData->frameInfo[i].codeLenWV; j++ ) { + out << (unsigned long) block[j]; + + if ( j < runtimeData->frameInfo[i].codeLenWV-1 ) { + out << ", "; + if ( (j+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + } + + if ( runtimeData->frameInfo[i].codeLenWC > 0 ) { + out << "static Code code_" << i << "_wc[] = {\n\t"; + + Code *block = runtimeData->frameInfo[i].codeWC; + for ( int j = 0; j < runtimeData->frameInfo[i].codeLenWC; j++ ) { + out << (unsigned long) block[j]; + + if ( j < runtimeData->frameInfo[i].codeLenWC-1 ) { + out << ", "; + if ( (j+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + } + + if ( runtimeData->frameInfo[i].localsLen > 0 ) { + out << "static LocalInfo locals_" << i << "[] = {\n\t"; + + LocalInfo *li = runtimeData->frameInfo[i].locals; + for ( int j = 0; j < runtimeData->frameInfo[i].localsLen; j++ ) { + out << "{ " << (int)li[j].type << ", " << li[j].offset << " }"; + + if ( j < runtimeData->frameInfo[i].localsLen-1 ) { + out << ", "; + if ( (j+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + } + } + + /* + * Blocks in production info. + */ + for ( int i = 0; i < runtimeData->numProds; i++ ) { + if ( runtimeData->prodInfo[i].copyLen > 0 ) { + out << "static unsigned char copy_" << i << "[] = {\n\t"; + + unsigned char *block = runtimeData->prodInfo[i].copy; + for ( int j = 0; j < runtimeData->prodInfo[i].copyLen; j++ ) { + out << (long) block[j*2] << ", " << (long) block[j*2+1]; + + if ( j < runtimeData->prodInfo[i].copyLen-1 ) { + out << ", "; + if ( (j+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + } + } + + /* + * Init code. + */ + out << "static Code " << rootCode() << "[] = {\n\t"; + Code *block = runtimeData->rootCode ; + for ( int j = 0; j < runtimeData->rootCodeLen; j++ ) { + out << (unsigned int) block[j]; + + if ( j < runtimeData->rootCodeLen-1 ) { + out << ", "; + if ( (j+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + + /* + * lelInfo + */ + out << "static LangElInfo " << lelInfo() << "[] = {\n"; + for ( int i = 0; i < runtimeData->numLangEls; i++ ) { + out << "\t{"; + + /* Name. */ + out << " \""; + escapeLiteralString( out, runtimeData->lelInfo[i].name ); + out << "\", "; + + /* Name. */ + out << " \""; + escapeLiteralString( out, runtimeData->lelInfo[i].xmlTag ); + out << "\", "; + + /* Repeat, literal, ignore flags. */ + out << (int)runtimeData->lelInfo[i].repeat << ", " << + (int)runtimeData->lelInfo[i].list << ", " << + (int)runtimeData->lelInfo[i].literal << ", " << + (int)runtimeData->lelInfo[i].ignore << ", "; + + out << runtimeData->lelInfo[i].frameId << ", "; + + out << runtimeData->lelInfo[i].objectTypeId << ", "; + + out << runtimeData->lelInfo[i].ofiOffset << ", "; + + out << runtimeData->lelInfo[i].objectLength << ", "; + +// out << runtimeData->lelInfo[i].contextTypeId << ", "; +// out << runtimeData->lelInfo[i].contextLength << ", "; + + out << runtimeData->lelInfo[i].termDupId << ", "; + + out << runtimeData->lelInfo[i].genericId << ", "; + + out << runtimeData->lelInfo[i].markId << ", "; + + out << runtimeData->lelInfo[i].captureAttr << ", "; + + out << runtimeData->lelInfo[i].numCaptureAttr; + + out << " }"; + + if ( i < runtimeData->numLangEls-1 ) + out << ",\n"; + } + out << "\n};\n\n"; + + /* + * frameInfo + */ + out << "static FrameInfo " << frameInfo() << "[] = {\n"; + for ( int i = 0; i < runtimeData->numFrames; i++ ) { + out << "\t{ "; + + if ( runtimeData->frameInfo[i].codeLenWV > 0 ) + out << "code_" << i << "_wv, "; + else + out << "0, "; + out << runtimeData->frameInfo[i].codeLenWV << ", "; + + if ( runtimeData->frameInfo[i].codeLenWC > 0 ) + out << "code_" << i << "_wc, "; + else + out << "0, "; + out << runtimeData->frameInfo[i].codeLenWC << ", "; + + /* locals. */ + if ( runtimeData->frameInfo[i].localsLen > 0 ) + out << "locals_" << i << ", "; + else + out << "0, "; + + out << runtimeData->frameInfo[i].localsLen << ", "; + + out << + runtimeData->frameInfo[i].argSize << ", " << + runtimeData->frameInfo[i].frameSize; + + out << " }"; + + if ( i < runtimeData->numFrames-1 ) + out << ",\n"; + } + out << "\n};\n\n"; + + + /* + * prodInfo + */ + out << "static ProdInfo " << prodInfo() << "[] = {\n"; + for ( int i = 0; i < runtimeData->numProds; i++ ) { + out << "\t{ "; + + out << runtimeData->prodInfo[i].lhsId << ", "; + out << runtimeData->prodInfo[i].prodNum << ", "; + out << runtimeData->prodInfo[i].length << ", "; + + out << + '"' << runtimeData->prodInfo[i].name << "\", " << + runtimeData->prodInfo[i].frameId << ", " << + (int)runtimeData->prodInfo[i].lhsUpref << ", "; + + if ( runtimeData->prodInfo[i].copyLen > 0 ) + out << "copy_" << i << ", "; + else + out << "0, "; + + out << runtimeData->prodInfo[i].copyLen << ", "; + + + out << " }"; + + if ( i < runtimeData->numProds-1 ) + out << ",\n"; + } + out << "\n};\n\n"; + + /* + * patReplInfo + */ + out << "static PatConsInfo " << patReplInfo() << "[] = {\n"; + for ( int i = 0; i < runtimeData->numPatterns; i++ ) { + out << " { " << runtimeData->patReplInfo[i].offset << ", " << + runtimeData->patReplInfo[i].numBindings << " },\n"; + } + out << "};\n\n"; + + /* + * patReplNodes + */ + out << "static PatConsNode " << patReplNodes() << "[] = {\n"; + for ( int i = 0; i < runtimeData->numPatternNodes; i++ ) { + PatConsNode &node = runtimeData->patReplNodes[i]; + out << " { " << node.id << ", " << + node.prodNum << ", " << node.next << ", " << + node.child << ", " << node.bindId << ", "; + if ( node.data == 0 ) + out << "0"; + else { + out << '\"'; + escapeLiteralString( out, node.data, node.length ); + out << '\"'; + } + out << ", " << node.length << ", "; + + out << node.leftIgnore << ", "; + out << node.rightIgnore << ", "; + + out << (int)node.stop << " },\n"; + } + out << "};\n\n"; + + /* + * functionInfo + */ + out << "static FunctionInfo " << functionInfo() << "[] = {\n"; + for ( int i = 0; i < runtimeData->numFunctions; i++ ) { + out << "\t{ " << + "\"" << runtimeData->functionInfo[i].name << "\", " << + runtimeData->functionInfo[i].frameId << ", " << + runtimeData->functionInfo[i].argSize << ", " << + runtimeData->functionInfo[i].frameSize; + out << " }"; + + if ( i < runtimeData->numFunctions-1 ) + out << ",\n"; + } + out << "\n};\n\n"; + + /* + * regionInfo + */ + out << "static RegionInfo " << regionInfo() << "[] = {\n"; + for ( int i = 0; i < runtimeData->numRegions; i++ ) { + out << "\t{ " << runtimeData->regionInfo[i].defaultToken << + ", " << runtimeData->regionInfo[i].eofFrameId << + ", " << runtimeData->regionInfo[i].ciLelId << + " }"; + + if ( i < runtimeData->numRegions-1 ) + out << ",\n"; + } + out << "\n};\n\n"; + + /* + * genericInfo + */ + out << "static GenericInfo " << genericInfo() << "[] = {\n"; + for ( int i = 0; i < runtimeData->numGenerics; i++ ) { + out << "\t{ " << + runtimeData->genericInfo[i].type << ", " << + runtimeData->genericInfo[i].typeArg << ", " << + runtimeData->genericInfo[i].keyOffset << ", " << + runtimeData->genericInfo[i].keyType << ", " << + runtimeData->genericInfo[i].langElId << ", " << + runtimeData->genericInfo[i].parserId << " },\n"; + } + out << "};\n\n"; + + /* + * literals + */ + out << "static const char *" << litdata() << "[] = {\n"; + for ( int i = 0; i < runtimeData->numLiterals; i++ ) { + out << "\t\""; + escapeLiteralString( out, runtimeData->litdata[i] ); + out << "\",\n"; + } + out << "};\n\n"; + + out << "static long " << litlen() << "[] = {\n\t"; + for ( int i = 0; i < runtimeData->numLiterals; i++ ) + out << runtimeData->litlen[i] << ", "; + out << "};\n\n"; + + out << "static Head *" << literals() << "[] = {\n\t"; + for ( int i = 0; i < runtimeData->numLiterals; i++ ) + out << "0, "; + out << "};\n\n"; + + out << "static int startStates[] = {\n\t"; + for ( long i = 0; i < runtimeData->numParsers; i++ ) { + out << runtimeData->startStates[i] << ", "; + } + out << "};\n\n"; + + out << "static int eofLelIds[] = {\n\t"; + for ( long i = 0; i < runtimeData->numParsers; i++ ) { + out << runtimeData->eofLelIds[i] << ", "; + } + out << "};\n\n"; + + out << "static int parserLelIds[] = {\n\t"; + for ( long i = 0; i < runtimeData->numParsers; i++ ) { + out << runtimeData->parserLelIds[i] << ", "; + } + out << "};\n\n"; + + out << "static CaptureAttr captureAttr[] = {\n"; + for ( long i = 0; i < runtimeData->numCapturedAttr; i++ ) { + out << "\t{ " << + runtimeData->captureAttr[i].mark_enter << ", " << + runtimeData->captureAttr[i].mark_leave << ", " << + runtimeData->captureAttr[i].offset << " },\n"; + } + + out << "};\n\n"; + + out << + "RuntimeData colm_object = \n" + "{\n" + " " << lelInfo() << ",\n" + " " << runtimeData->numLangEls << ",\n" + "\n" + " " << prodInfo() << ",\n" + " " << runtimeData->numProds << ",\n" + "\n" + " " << regionInfo() << ",\n" + " " << runtimeData->numRegions << ",\n" + "\n" + " " << rootCode() << ",\n" + " " << runtimeData->rootCodeLen << ",\n" + " " << runtimeData->rootFrameId << ",\n" + "\n" + " " << frameInfo() << ",\n" + " " << runtimeData->numFrames << ",\n" + "\n" + " " << functionInfo() << ",\n" + " " << runtimeData->numFunctions << ",\n" + "\n" + " " << patReplInfo() << ",\n" + " " << runtimeData->numPatterns << ",\n" + "\n" + " " << patReplNodes() << ",\n" + " " << runtimeData->numPatternNodes << ",\n" + "\n" + " " << genericInfo() << ",\n" + " " << runtimeData->numGenerics << ",\n" + " " << runtimeData->argvGenericId << ",\n" + "\n" + " " << litdata() << ",\n" + " " << litlen() << ",\n" + " " << literals() << ",\n" + " " << runtimeData->numLiterals << ",\n" + "\n" + " captureAttr,\n" + " " << runtimeData->numCapturedAttr << ",\n" + "\n" + " &fsmTables_start,\n" + " &pid_0_pdaTables,\n" + " startStates, eofLelIds, parserLelIds, " << runtimeData->numParsers << ",\n" + "\n" + " " << runtimeData->globalSize << ",\n" + "\n" + " " << runtimeData->firstNonTermId << ",\n" + " " << runtimeData->integerId << ",\n" + " " << runtimeData->stringId << ",\n" + " " << runtimeData->anyId << ",\n" + " " << runtimeData->eofId << ",\n" + " " << runtimeData->noTokenId << ",\n" + " &fsmExecute,\n" + " &sendNamedLangEl,\n" + " &initBindings,\n" + " &popBinding,\n" + "};\n" + "\n"; +} + +void PdaCodeGen::writeParserData( long id, PdaTables *tables ) +{ + String prefix = "pid_" + String(0, "%ld", id) + "_"; + + out << "static int " << prefix << indicies() << "[] = {\n\t"; + for ( int i = 0; i < tables->numIndicies; i++ ) { + out << tables->indicies[i]; + + if ( i < tables->numIndicies-1 ) { + out << ", "; + if ( (i+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + + out << "static int " << prefix << owners() << "[] = {\n\t"; + for ( int i = 0; i < tables->numIndicies; i++ ) { + out << tables->owners[i]; + + if ( i < tables->numIndicies-1 ) { + out << ", "; + if ( (i+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + + out << "static int " << prefix << keys() << "[] = {\n\t"; + for ( int i = 0; i < tables->numKeys; i++ ) { + out << tables->keys[i]; + + if ( i < tables->numKeys-1 ) { + out << ", "; + if ( (i+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + + out << "static unsigned int " << prefix << offsets() << "[] = {\n\t"; + for ( int i = 0; i < tables->numStates; i++ ) { + out << tables->offsets[i]; + + if ( i < tables->numStates-1 ) { + out << ", "; + if ( (i+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + + out << "static unsigned int " << prefix << targs() << "[] = {\n\t"; + for ( int i = 0; i < tables->numTargs; i++ ) { + out << tables->targs[i]; + + if ( i < tables->numTargs-1 ) { + out << ", "; + if ( (i+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + + out << "static unsigned int " << prefix << actInds() << "[] = {\n\t"; + for ( int i = 0; i < tables->numActInds; i++ ) { + out << tables->actInds[i]; + + if ( i < tables->numActInds-1 ) { + out << ", "; + if ( (i+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + + out << "static unsigned int " << prefix << actions() << "[] = {\n\t"; + for ( int i = 0; i < tables->numActions; i++ ) { + out << tables->actions[i]; + + if ( i < tables->numActions-1 ) { + out << ", "; + if ( (i+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + + out << "static int " << prefix << commitLen() << "[] = {\n\t"; + for ( int i = 0; i < tables->numCommitLen; i++ ) { + out << tables->commitLen[i]; + + if ( i < tables->numCommitLen-1 ) { + out << ", "; + if ( (i+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + + out << "static int " << prefix << tokenRegionInds() << "[] = {\n\t"; + for ( int i = 0; i < tables->numStates; i++ ) { + out << tables->tokenRegionInds[i]; + + if ( i < tables->numStates-1 ) { + out << ", "; + if ( (i+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + + out << "static int " << prefix << tokenRegions() << "[] = {\n\t"; + for ( int i = 0; i < tables->numRegionItems; i++ ) { + out << tables->tokenRegions[i]; + + if ( i < tables->numRegionItems-1 ) { + out << ", "; + if ( (i+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + + out << "static int " << prefix << tokenPreRegions() << "[] = {\n\t"; + for ( int i = 0; i < tables->numPreRegionItems; i++ ) { + out << tables->tokenPreRegions[i]; + + if ( i < tables->numPreRegionItems-1 ) { + out << ", "; + if ( (i+1) % 8 == 0 ) + out << "\n\t"; + } + } + out << "\n};\n\n"; + + out << + "static PdaTables " << prefix << "pdaTables =\n" + "{\n" + " " << prefix << indicies() << ",\n" + " " << prefix << owners() << ",\n" + " " << prefix << keys() << ",\n" + " " << prefix << offsets() << ",\n" + " " << prefix << targs() << ",\n" + " " << prefix << actInds() << ",\n" + " " << prefix << actions() << ",\n" + " " << prefix << commitLen() << ",\n" + + " " << prefix << tokenRegionInds() << ",\n" + " " << prefix << tokenRegions() << ",\n" + " " << prefix << tokenPreRegions() << ",\n" + "\n" + " " << tables->numIndicies << ",\n" + " " << tables->numKeys << ",\n" + " " << tables->numStates << ",\n" + " " << tables->numTargs << ",\n" + " " << tables->numActInds << ",\n" + " " << tables->numActions << ",\n" + " " << tables->numCommitLen << ",\n" + " " << tables->numRegionItems << ",\n" + " " << tables->numPreRegionItems << "\n" + "};\n" + "\n"; +} + diff --git a/src/pdacodegen.h b/src/pdacodegen.h new file mode 100644 index 0000000..7a9e4f9 --- /dev/null +++ b/src/pdacodegen.h @@ -0,0 +1,105 @@ +/* + * Copyright 2007-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#ifndef _PDACODEGEN_H +#define _PDACODEGEN_H + +struct Compiler; + +struct PdaCodeGen +{ + PdaCodeGen( ostream &out ) + : + out(out) + {} + + /* + * Code Generation. + */ + void startCodeGen(); + void endCodeGen( int endLine ); + + void writeReference( Production *prod, char *data ); + void writeUndoReference( Production *prod, char *data ); + void writeFinalReference( Production *prod, char *data ); + void writeFirstLocate( Production *prod ); + void writeRhsLocate( Production *prod ); + + void defineRuntime(); + void writeRuntimeData( RuntimeData *runtimeData, PdaTables *pdaTables ); + void writeParserData( long id, PdaTables *tables ); + + String PARSER() { return "parser_"; } + + String startState() { return PARSER() + "startState"; } + String indicies() { return PARSER() + "indicies"; } + String owners() { return PARSER() + "owners"; } + String keys() { return PARSER() + "keys"; } + String offsets() { return PARSER() + "offsets"; } + String targs() { return PARSER() + "targs"; } + String actInds() { return PARSER() + "actInds"; } + String actions() { return PARSER() + "actions"; } + String commitLen() { return PARSER() + "commitLen"; } + String fssProdIdIndex() { return PARSER() + "fssProdIdIndex"; } + String prodLengths() { return PARSER() + "prodLengths"; } + String prodLhsIds() { return PARSER() + "prodLhsIds"; } + String prodNames() { return PARSER() + "prodNames"; } + String lelInfo() { return PARSER() + "lelInfo"; } + String prodInfo() { return PARSER() + "prodInfo"; } + String tokenRegionInds() { return PARSER() + "tokenRegionInds"; } + String tokenRegions() { return PARSER() + "tokenRegions"; } + String tokenPreRegions() { return PARSER() + "tokenPreRegions"; } + String prodCodeBlocks() { return PARSER() + "prodCodeBlocks"; } + String prodCodeBlockLens() { return PARSER() + "prodCodeBlockLens"; } + String rootCode() { return PARSER() + "rootCode"; } + String frameInfo() { return PARSER() + "frameInfo"; } + String functionInfo() { return PARSER() + "functionInfo"; } + String objFieldInfo() { return PARSER() + "objFieldInfo"; } + String patReplInfo() { return PARSER() + "patReplInfo"; } + String patReplNodes() { return PARSER() + "patReplNodes"; } + String regionInfo() { return PARSER() + "regionInfo"; } + String genericInfo() { return PARSER() + "genericInfo"; } + String litdata() { return PARSER() + "litdata"; } + String litlen() { return PARSER() + "litlen"; } + String literals() { return PARSER() + "literals"; } + String fsmTables() { return PARSER() + "fsmTables"; } + + /* + * Graphviz Generation + */ + void writeTransList( PdaState *state ); + void writeDotFile( PdaGraph *graph ); + void writeDotFile( ); + + ostream &out; +}; + +extern "C" +{ + void internalFsmExecute( FsmRun *fsmRun, StreamImpl *inputStream ); + void internalSendNamedLangEl( Program *prg, Tree **sp, PdaRun *pdaRun, + FsmRun *fsmRun, StreamImpl *is ); + void internalInitBindings( PdaRun *pdaRun ); + void internalPopBinding( PdaRun *pdaRun, ParseTree *parseTree ); +} + +#endif diff --git a/src/pdagraph.cc b/src/pdagraph.cc new file mode 100644 index 0000000..8f17b7a --- /dev/null +++ b/src/pdagraph.cc @@ -0,0 +1,533 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <string.h> +#include <iostream> +#include <string.h> +#include <assert.h> +#include "global.h" +#include "pdagraph.h" +#include "mergesort.h" + +using std::cerr; +using std::endl; + +/* Create a new fsm state. State has not out transitions or in transitions, not + * out out transition data and not number. */ +PdaState::PdaState() +: + /* No in transitions. */ + inRange(), + + /* No entry points, or epsilon trans. */ + pendingCommits(), + + stateSet(0), + + /* Only used during merging. Normally null. */ + stateDictEl(0), + + /* No state identification bits. */ + stateBits(0), + + onClosureQueue(false), + inClosedMap(false), + followMarked(false), + + advanceReductions(false) +{ +} + +/* Copy everything except the action transitions. That is left up to the + * PdaGraph copy constructor. */ +PdaState::PdaState(const PdaState &other) +: + inRange(), + + /* Duplicate the entry id set, epsilon transitions and context sets. These + * are sets of integers and as such need no fixing. */ + pendingCommits(other.pendingCommits), + + stateSet(0), + + /* This is only used during merging. Normally null. */ + stateDictEl(0), + + /* Fsm state data. */ + stateBits(other.stateBits), + + dotSet(other.dotSet), + onClosureQueue(false), + inClosedMap(false), + followMarked(false), + + transMap() +{ + /* Duplicate all the transitions. */ + for ( TransMap::Iter trans = other.transMap; trans.lte(); trans++ ) { + /* Dupicate and store the orginal target in the transition. This will + * be corrected once all the states have been created. */ + PdaTrans *newTrans = new PdaTrans(*trans->value); + newTrans->toState = trans->value->toState; + transMap.append( TransMapEl( newTrans->lowKey, newTrans ) ); + } +} + +/* If there is a state dict element, then delete it. Everything else is left + * up to the FsmGraph destructor. */ +PdaState::~PdaState() +{ + if ( stateDictEl != 0 ) + delete stateDictEl; +} + +/* Graph constructor. */ +PdaGraph::PdaGraph() +: + /* No start state. */ + startState(0) +{ +} + +/* Copy all graph data including transitions. */ +PdaGraph::PdaGraph( const PdaGraph &graph ) +: + /* Lists start empty. Will be filled by copy. */ + stateList(), + misfitList(), + + /* Copy in the entry points, + * pointers will be resolved later. */ + startState(graph.startState), + + /* Will be filled by copy. */ + finStateSet() +{ + /* Create the states and record their map in the original state. */ + PdaStateList::Iter origState = graph.stateList; + for ( ; origState.lte(); origState++ ) { + /* Make the new state. */ + PdaState *newState = new PdaState( *origState ); + + /* Add the state to the list. */ + stateList.append( newState ); + + /* Set the mapsTo item of the old state. */ + origState->stateMap = newState; + } + + /* Derefernce all the state maps. */ + for ( PdaStateList::Iter state = stateList; state.lte(); state++ ) { + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + /* The points to the original in the src machine. The taget's duplicate + * is in the statemap. */ + PdaState *toState = trans->value->toState != 0 ? + trans->value->toState->stateMap : 0; + + /* Attach The transition to the duplicate. */ + trans->value->toState = 0; + attachTrans( state, toState, trans->value ); + } + } + + /* Fix the start state pointer and the new start state's count of in + * transiions. */ + startState = startState->stateMap; + + /* Build the final state set. */ + PdaStateSet::Iter st = graph.finStateSet; + for ( ; st.lte(); st++ ) + finStateSet.insert((*st)->stateMap); +} + +/* Deletes all transition data then deletes each state. */ +PdaGraph::~PdaGraph() +{ + /* Delete all the transitions. */ + PdaStateList::Iter state = stateList; + for ( ; state.lte(); state++ ) { + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) + delete trans->value; + } + + /* Delete all the states. */ + stateList.empty(); +} + +/* Set a state final. The state has its isFinState set to true and the state + * is added to the finStateSet. */ +void PdaGraph::setFinState( PdaState *state ) +{ + /* Is it already a fin state. */ + if ( state->stateBits & SB_ISFINAL ) + return; + + state->stateBits |= SB_ISFINAL; + finStateSet.insert( state ); +} + +void PdaGraph::unsetAllFinStates( ) +{ + for ( PdaStateSet::Iter st = finStateSet; st.lte(); st++ ) { + PdaState *state = *st; + state->stateBits &= ~ SB_ISFINAL; + } + finStateSet.empty(); +} + +/* Set and unset a state as the start state. */ +void PdaGraph::setStartState( PdaState *state ) +{ + /* Sould change from unset to set. */ + assert( startState == 0 ); + startState = state; +} + +/* Mark all states reachable from state. Traverses transitions forward. Used + * for removing states that have no path into them. */ +void PdaGraph::markReachableFromHere( PdaState *state ) +{ + /* Base case: return; */ + if ( state->stateBits & SB_ISMARKED ) + return; + + /* Set this state as processed. We are going to visit all states that this + * state has a transition to. */ + state->stateBits |= SB_ISMARKED; + + /* Recurse on all out transitions. */ + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + if ( trans->value->toState != 0 ) + markReachableFromHere( trans->value->toState ); + } +} + +void PdaGraph::setStateNumbers() +{ + int curNum = 0; + PdaStateList::Iter state = stateList; + for ( ; state.lte(); state++ ) + state->stateNum = curNum++; +} + +/* Insert a transition into an inlist. The head must be supplied. */ +void PdaGraph::attachToInList( PdaState *from, PdaState *to, + PdaTrans *&head, PdaTrans *trans ) +{ + trans->ilnext = head; + trans->ilprev = 0; + + /* If in trans list is not empty, set the head->prev to trans. */ + if ( head != 0 ) + head->ilprev = trans; + + /* Now insert ourselves at the front of the list. */ + head = trans; +}; + +/* Detach a transition from an inlist. The head of the inlist must be supplied. */ +void PdaGraph::detachFromInList( PdaState *from, PdaState *to, + PdaTrans *&head, PdaTrans *trans ) +{ + /* Detach in the inTransList. */ + if ( trans->ilprev == 0 ) + head = trans->ilnext; + else + trans->ilprev->ilnext = trans->ilnext; + + if ( trans->ilnext != 0 ) + trans->ilnext->ilprev = trans->ilprev; +} + +/* Attach states on the default transition, range list or on out/in list key. + * Type of attaching and is controlled by keyType. First makes a new + * transition. If there is already a transition out from fromState on the + * default, then will assertion fail. */ +PdaTrans *PdaGraph::appendNewTrans( PdaState *from, PdaState *to, long lowKey, long ) +{ + /* Make the new transition. */ + PdaTrans *retVal = new PdaTrans(); + + /* The transition is now attached. Remember the parties involved. */ + retVal->fromState = from; + retVal->toState = to; + + /* Make the entry in the out list for the transitions. */ + from->transMap.append( TransMapEl( lowKey, retVal ) ); + + /* Set the the keys of the new trans. */ + retVal->lowKey = lowKey; + + /* Attach using inRange as the head pointer. */ + attachToInList( from, to, to->inRange.head, retVal ); + + return retVal; +} + +PdaTrans *PdaGraph::insertNewTrans( PdaState *from, PdaState *to, long lowKey, long ) +{ + /* Make the new transition. */ + PdaTrans *retVal = new PdaTrans(); + + /* The transition is now attached. Remember the parties involved. */ + retVal->fromState = from; + retVal->toState = to; + + /* Make the entry in the out list for the transitions. */ + from->transMap.insert( lowKey, retVal ); + + /* Set the the keys of the new trans. */ + retVal->lowKey = lowKey; + + /* Attach using inRange as the head pointer. */ + attachToInList( from, to, to->inRange.head, retVal ); + + return retVal; +} + +/* Attach for range lists or for the default transition. Type of attaching is + * controlled by the keyType parameter. This attach should be used when a + * transition already is allocated and must be attached to a target state. + * Does not handle adding the transition into the out list. */ +void PdaGraph::attachTrans( PdaState *from, PdaState *to, PdaTrans *trans ) +{ + assert( trans->fromState == 0 && trans->toState == 0 ); + trans->fromState = from; + trans->toState = to; + + /* Attach using the inRange pointer as the head pointer. */ + attachToInList( from, to, to->inRange.head, trans ); +} + +/* Detach for out/in lists or for default transition. The type of detaching is + * controlled by the keyType parameter. */ +void PdaGraph::detachTrans( PdaState *from, PdaState *to, PdaTrans *trans ) +{ + assert( trans->fromState == from && trans->toState == to ); + trans->fromState = 0; + trans->toState = 0; + + /* Detach using to's inRange pointer as the head. */ + detachFromInList( from, to, to->inRange.head, trans ); +} + + +/* Detach a state from the graph. Detaches and deletes transitions in and out + * of the state. Empties inList and outList. Removes the state from the final + * state set. A detached state becomes useless and should be deleted. */ +void PdaGraph::detachState( PdaState *state ) +{ + /* Detach the in transitions from the inRange list of transitions. */ + while ( state->inRange.head != 0 ) { + /* Get pointers to the trans and the state. */ + PdaTrans *trans = state->inRange.head; + PdaState *fromState = trans->fromState; + + /* Detach the transitions from the source state. */ + detachTrans( fromState, state, trans ); + + /* Ok to delete the transition. */ + fromState->transMap.remove( trans->lowKey ); + delete trans; + } + + /* Detach out range transitions. */ + for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) { + detachTrans( state, trans->value->toState, trans->value ); + delete trans->value; + } + + /* Delete all of the out range pointers. */ + state->transMap.empty(); + + /* Unset final stateness before detaching from graph. */ + if ( state->stateBits & SB_ISFINAL ) + finStateSet.remove( state ); +} + +/* Move all the transitions that go into src so that they go into dest. */ +void PdaGraph::inTransMove( PdaState *dest, PdaState *src ) +{ + /* Do not try to move in trans to and from the same state. */ + assert( dest != src ); + + /* If src is the start state, dest becomes the start state. */ + assert( src != startState ); + + /* Move the transitions in inRange. */ + while ( src->inRange.head != 0 ) { + /* Get trans and from state. */ + PdaTrans *trans = src->inRange.head; + PdaState *fromState = trans->fromState; + + /* Detach from src, reattach to dest. */ + detachTrans( fromState, src, trans ); + attachTrans( fromState, dest, trans ); + } +} + +void PdaGraph::addInReduction( PdaTrans *dest, long prodId, long prior ) +{ + /* Look for the reduction. If not there insert it, otherwise take + * the max of the priorities. */ + ReductionMapEl *redMapEl = dest->reductions.find( prodId ); + if ( redMapEl == 0 ) + dest->reductions.insert( prodId, prior ); + else if ( prior > redMapEl->value ) + redMapEl->value = prior; +} + +/* Callback invoked when another trans (or possibly this) is added into this + * transition during the merging process. Draw in any properties of srcTrans + * into this transition. AddInTrans is called when a new transitions is made + * that will be a duplicate of another transition or a combination of several + * other transitions. AddInTrans will be called for each transition that the + * new transition is to represent. */ +void PdaGraph::addInTrans( PdaTrans *destTrans, PdaTrans *srcTrans ) +{ + /* Protect against adding in from ourselves. */ + if ( srcTrans != destTrans ) { + + /* Add in the shift priority. */ + if ( destTrans->isShift && srcTrans->isShift ) { + /* Both shifts are set. We want the max of the two. */ + if ( srcTrans->shiftPrior > destTrans->shiftPrior ) + destTrans->shiftPrior = srcTrans->shiftPrior; + } + else if ( srcTrans->isShift ) { + /* Just the source is set, copy the source prior over. */ + destTrans->shiftPrior = srcTrans->shiftPrior; + } + + /* If either is a shift, dest is a shift. */ + destTrans->isShift = destTrans->isShift || srcTrans->isShift; + + /* Add in the reductions. */ + for ( ReductionMap::Iter red = srcTrans->reductions; red.lte(); red++ ) + addInReduction( destTrans, red->key, red->value ); + + /* Add in the commit points. */ + destTrans->commits.insert( srcTrans->commits ); + + if ( srcTrans->toState->advanceReductions ) + destTrans->toState->advanceReductions = true; + + if ( srcTrans->noPreIgnore ) + destTrans->noPreIgnore = true; + if ( srcTrans->noPostIgnore ) + destTrans->noPostIgnore = true; + } +} + +/* NO LONGER USED. */ +void PdaGraph::addInState( PdaState *destState, PdaState *srcState ) +{ + /* Draw in any properties of srcState into destState. */ + if ( srcState != destState ) { + /* Get the epsilons, context, out priorities. */ + destState->pendingCommits.insert( srcState->pendingCommits ); + if ( srcState->pendingCommits.length() > 0 ) + cerr << "THERE ARE PENDING COMMITS DRAWN IN" << endl; + + /* Parser generation data. */ + destState->dotSet.insert( srcState->dotSet ); + + if ( srcState->onClosureQueue && !destState->onClosureQueue ) { + stateClosureQueue.append( destState ); + destState->onClosureQueue = true; + } + } +} + +/* Make a new state. The new state will be put on the graph's + * list of state. The new state can be created final or non final. */ +PdaState *PdaGraph::addState() +{ + /* Make the new state to return. */ + PdaState *state = new PdaState(); + + /* Create the new state. */ + stateList.append( state ); + + return state; +} + + +/* Follow from to the final state of srcFsm. */ +PdaState *PdaGraph::followFsm( PdaState *from, PdaGraph *srcFsm ) +{ + PdaState *followSrc = srcFsm->startState; + + while ( ! followSrc->isFinState() ) { + assert( followSrc->transMap.length() == 1 ); + PdaTrans *followTrans = followSrc->transMap[0].value; + + PdaTrans *inTrans = from->findTrans( followTrans->lowKey ); + assert( inTrans != 0 ); + + from = inTrans->toState; + followSrc = followTrans->toState; + } + + return from; +} + +int PdaGraph::fsmLength( ) +{ + int length = 0; + PdaState *state = startState; + while ( ! state->isFinState() ) { + length += 1; + state = state->transMap[0].value->toState; + } + return length; +} + +/* Remove states that have no path to them from the start state. Recursively + * traverses the graph marking states that have paths into them. Then removes + * all states that did not get marked. */ +void PdaGraph::removeUnreachableStates() +{ + /* Mark all the states that can be reached + * through the existing set of entry points. */ + if ( startState != 0 ) + markReachableFromHere( startState ); + + for ( PdaStateSet::Iter si = entryStateSet; si.lte(); si++ ) + markReachableFromHere( *si ); + + /* Delete all states that are not marked + * and unmark the ones that are marked. */ + PdaState *state = stateList.head; + while ( state ) { + PdaState *next = state->next; + + if ( state->stateBits & SB_ISMARKED ) + state->stateBits &= ~ SB_ISMARKED; + else { + detachState( state ); + stateList.detach( state ); + delete state; + } + + state = next; + } +} diff --git a/src/pdagraph.h b/src/pdagraph.h new file mode 100644 index 0000000..af6eb3d --- /dev/null +++ b/src/pdagraph.h @@ -0,0 +1,515 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _PDAGRAPH_H +#define _PDAGRAPH_H + +#include <assert.h> +#include "vector.h" +#include "bstset.h" +#include "compare.h" +#include "avltree.h" +#include "dlist.h" +#include "bstmap.h" +#include "sbstmap.h" +#include "sbstset.h" +#include "sbsttable.h" +#include "avlset.h" +#include "dlistmel.h" +#include "avltree.h" + +/* Flags for states. */ +#define SB_ISFINAL 0x04 +#define SB_ISMARKED 0x08 +#define SB_ISSTART 0x10 + +/* Flags for transitions. */ +#define TB_ISMARKED 0x01 + +struct PdaTrans; +struct PdaState; +struct PdaGraph; +struct TokenInstance; +struct Production; +struct LangEl; +struct TokenRegion; + +typedef Vector<TokenRegion*> RegionVect; + +typedef Vector<long> ActDataList; + +struct ActionData +{ + ActionData( int targ, ActDataList &actions, int commitLen ) + : targ(targ), commitLen(commitLen), id(0), actions(actions) { } + + int targ; + int commitLen; + int id; + + ActDataList actions; +}; + + +struct CmpActionData +{ + static int compare( const ActionData &ap1, const ActionData &ap2 ) + { + if ( ap1.targ < ap2.targ ) + return -1; + else if ( ap1.targ > ap2.targ ) + return 1; + else if ( ap1.commitLen < ap2.commitLen ) + return -1; + else if ( ap1.commitLen > ap2.commitLen ) + return 1; + else if ( ap1.id < ap2.id ) + return -1; + else if ( ap1.id > ap2.id ) + return 1; + + return CmpTable< long, CmpOrd<long> >:: + compare( ap1.actions, ap2.actions ); + } +}; + +typedef AvlSet<ActionData, CmpActionData> PdaActionSet; +typedef AvlSetEl<ActionData> PdaActionSetEl; + +/* List pointers for the closure queue. Goes into state. */ +struct ClosureQueueListEl { PdaState *prev, *next; }; + +/* Queue of states, transitions to be closed. */ +typedef DListMel< PdaState, ClosureQueueListEl > StateClosureQueue; +typedef DList<PdaTrans> TransClosureQueue; + +typedef BstSet< Production*, CmpOrd<Production*> > DefSet; +typedef CmpTable< Production*, CmpOrd<Production*> > CmpDefSet; +typedef BstSet< DefSet, CmpDefSet > DefSetSet; + +typedef Vector< Production* > DefVect; +typedef BstSet< long, CmpOrd<long> > AlphSet; + +struct ExpandToEl +{ + ExpandToEl( PdaState *state, int prodId ) + : state(state), prodId(prodId) { } + + PdaState *state; + int prodId; +}; + +struct CmpExpandToEl +{ + static inline int compare( const ExpandToEl &etel1, const ExpandToEl &etel2 ) + { + if ( etel1.state < etel2.state ) + return -1; + else if ( etel1.state > etel2.state ) + return 1; + else if ( etel1.prodId < etel2.prodId ) + return -1; + else if ( etel1.prodId > etel2.prodId ) + return 1; + else + return 0; + } +}; + +typedef BstSet<ExpandToEl, CmpExpandToEl> ExpandToSet; +typedef BstSet< int, CmpOrd<int> > IntSet; +typedef CmpTable< int, CmpOrd<int> > CmpIntSet; + +typedef BstSet< long, CmpOrd<long> > LongSet; +typedef CmpTable< long, CmpOrd<long> > CmpLongSet; + +typedef BstMap< long, long, CmpOrd<long> > LongMap; +typedef BstMapEl< long, long > LongMapEl; + +typedef LongSet ProdIdSet; +typedef CmpLongSet CmpProdIdSet; + +/* Set of states, list of states. */ +typedef BstSet<PdaState*> PdaStateSet; +typedef Vector<PdaState*> StateVect; +typedef DList<PdaState> PdaStateList; + +typedef LongMap FollowToAdd; +typedef LongMap ReductionMap; +typedef LongMapEl ReductionMapEl; + +struct ProdIdPair +{ + ProdIdPair( int onReduce, int length ) + : onReduce(onReduce), length(length) {} + + int onReduce; + int length; +}; + +struct CmpProdIdPair +{ + static inline int compare( const ProdIdPair &pair1, const ProdIdPair &pair2 ) + { + if ( pair1.onReduce < pair2.onReduce ) + return -1; + else if ( pair1.onReduce > pair2.onReduce ) + return 1; + else if ( pair1.length < pair2.length ) + return -1; + else if ( pair1.length > pair2.length ) + return 1; + else + return 0; + } +}; + +typedef BstSet< ProdIdPair, CmpProdIdPair > ProdIdPairSet; + +/* Transition class that implements actions and priorities. */ +struct PdaTrans +{ + PdaTrans() : + fromState(0), + toState(0), + isShift(false), + isShiftReduce(false), + shiftPrior(0), + noPreIgnore(false), + noPostIgnore(false) + { } + + PdaTrans( const PdaTrans &other ) : + lowKey(other.lowKey), + fromState(0), toState(0), + isShift(other.isShift), + isShiftReduce(other.isShiftReduce), + shiftPrior(other.shiftPrior), + reductions(other.reductions), + commits(other.commits), + noPreIgnore(false), + noPostIgnore(false) + { } + + long lowKey; + PdaState *fromState; + PdaState *toState; + + /* Pointers for outlist. */ + PdaTrans *prev, *next; + + /* Pointers for in-list. */ + PdaTrans *ilprev, *ilnext; + + long maxPrior(); + + /* Parse Table construction data. */ + bool isShift, isShiftReduce; + int shiftPrior; + ReductionMap reductions; + ActDataList actions; + ActDataList actOrds; + ActDataList actPriors; + + ExpandToSet expandTo; + + PdaActionSetEl *actionSetEl; + + LongSet commits; + LongSet afterShiftCommits; + + bool noPreIgnore; + bool noPostIgnore; +}; + +/* In transition list. Like DList except only has head pointers, which is all + * that is required. Insertion and deletion is handled by the graph. This + * class provides the iterator of a single list. */ +struct PdaTransInList +{ + PdaTransInList() : head(0) { } + + PdaTrans *head; + + struct Iter + { + /* Default construct. */ + Iter() : ptr(0) { } + + /* Construct, assign from a list. */ + Iter( const PdaTransInList &il ) : ptr(il.head) { } + Iter &operator=( const PdaTransInList &dl ) { ptr = dl.head; return *this; } + + /* At the end */ + bool lte() const { return ptr != 0; } + bool end() const { return ptr == 0; } + + /* At the first, last element. */ + bool first() const { return ptr && ptr->ilprev == 0; } + bool last() const { return ptr && ptr->ilnext == 0; } + + /* Cast, dereference, arrow ops. */ + operator PdaTrans*() const { return ptr; } + PdaTrans &operator *() const { return *ptr; } + PdaTrans *operator->() const { return ptr; } + + /* Increment, decrement. */ + inline void operator++(int) { ptr = ptr->ilnext; } + inline void operator--(int) { ptr = ptr->ilprev; } + + /* The iterator is simply a pointer. */ + PdaTrans *ptr; + }; +}; + +typedef DList<PdaTrans> PdaTransList; + +/* A element in a state dict. */ +struct PdaStateDictEl +: + public AvlTreeEl<PdaStateDictEl> +{ + PdaStateDictEl(const PdaStateSet &stateSet) + : stateSet(stateSet) { } + + const PdaStateSet &getKey() { return stateSet; } + PdaStateSet stateSet; + PdaState *targState; +}; + +/* Dictionary mapping a set of states to a target state. */ +typedef AvlTree< PdaStateDictEl, PdaStateSet, CmpTable<PdaState*> > PdaStateDict; + +/* What items does a particular state encompass. */ +typedef BstSet< long, CmpOrd<long> > DotSet; +typedef CmpTable< long, CmpOrd<long> > CmpDotSet; + +/* Map of dot sets to states. */ +typedef AvlTree< PdaState, DotSet, CmpDotSet > DotSetMap; +typedef PdaState DotSetMapEl; + +typedef BstMap< long, PdaTrans* > TransMap; +typedef BstMapEl< long, PdaTrans* > TransMapEl; + +/* State class that implements actions and priorities. */ +struct PdaState +: + public ClosureQueueListEl, + public AvlTreeEl< PdaState > +{ + PdaState(); + PdaState(const PdaState &other); + ~PdaState(); + + /* Is the state final? */ + bool isFinState() { return stateBits & SB_ISFINAL; } + + PdaTrans *findTrans( long key ) + { + TransMapEl *transMapEl = transMap.find( key ); + if ( transMapEl == 0 ) + return 0; + return transMapEl->value; + } + + /* In transition list. */ + PdaTransInList inRange; + + ProdIdPairSet pendingCommits; + + /* When duplicating the fsm we need to map each + * state to the new state representing it. */ + PdaState *stateMap; + + /* When merging states (state machine operations) this next pointer is + * used for the list of states that need to be filled in. */ + PdaState *alg_next; + + PdaStateSet *stateSet; + + /* Identification for printing and stable minimization. */ + int stateNum; + + /* A pointer to a dict element that contains the set of states this state + * represents. This cannot go into alg, because alg.next is used during + * the merging process. */ + PdaStateDictEl *stateDictEl; + + /* Bits controlling the behaviour of the state during collapsing to dfa. */ + int stateBits; + + /* State list elements. */ + PdaState *next, *prev; + + /* For dotset map. */ + DotSet &getKey() { return dotSet; } + + /* Closure management. */ + DotSet dotSet; + DotSet dotSet2; + bool onClosureQueue; + bool inClosedMap; + bool followMarked; + bool onStateList; + + TransMap transMap; + + RegionVect regions; + RegionVect preRegions; + + bool advanceReductions; +}; + +/* Compare lists of epsilon transitions. Entries are name ids of targets. */ +typedef CmpTable< int, CmpOrd<int> > CmpEpsilonTrans; + +/* Compare sets of context values. */ +typedef CmpTable< int, CmpOrd<int> > CmpContextSets; + +/* Graph class that implements actions and priorities. */ +struct PdaGraph +{ + /* Constructors/Destructors. */ + PdaGraph(); + PdaGraph( const PdaGraph &graph ); + ~PdaGraph(); + + /* The list of states. */ + PdaStateList stateList; + PdaStateList misfitList; + + /* The start state. */ + PdaState *startState; + PdaStateSet entryStateSet; + + /* The set of final states. */ + PdaStateSet finStateSet; + + /* Closure queues and maps. */ + DotSetMap closedMap; + StateClosureQueue stateClosureQueue; + StateClosureQueue stateClosedList; + + TransClosureQueue transClosureQueue; + PdaState *stateClosureHead; + + LangEl **langElIndex; + + void setStartState( PdaState *state ); + void unsetStartState( ); + + /* + * Basic attaching and detaching. + */ + + /* Common to attaching/detaching list and default. */ + void attachToInList( PdaState *from, PdaState *to, PdaTrans *&head, PdaTrans *trans ); + void detachFromInList( PdaState *from, PdaState *to, PdaTrans *&head, PdaTrans *trans ); + + /* Attach with a new transition. */ + PdaTrans *appendNewTrans( PdaState *from, PdaState *to, long onChar1, long ); + PdaTrans *insertNewTrans( PdaState *from, PdaState *to, long lowKey, long ); + + /* Attach with an existing transition that already in an out list. */ + void attachTrans( PdaState *from, PdaState *to, PdaTrans *trans ); + + /* Detach a transition from a target state. */ + void detachTrans( PdaState *from, PdaState *to, PdaTrans *trans ); + + /* Detach a state from the graph. */ + void detachState( PdaState *state ); + + /* + * Callbacks. + */ + + /* Add in the properties of srcTrans into this. */ + void addInReduction( PdaTrans *dest, long prodId, long prior ); + void addInTrans( PdaTrans *destTrans, PdaTrans *srcTrans ); + void addInState( PdaState *destState, PdaState *srcState ); + + /* + * Allocation. + */ + + /* New up a state and add it to the graph. */ + PdaState *addState(); + + /* + * Fsm operators. + */ + + /* Follow to the fin state of src fsm. */ + PdaState *followFsm( PdaState *from, PdaGraph *srcFsm ); + + /* + * Final states + */ + + /* Set and Unset a state as final. */ + void setFinState( PdaState *state ); + void unsetFinState( PdaState *state ); + void unsetAllFinStates( ); + + /* Set State numbers starting at 0. */ + void setStateNumbers(); + + /* + * Path pruning + */ + + /* Mark all states reachable from state. */ + void markReachableFromHere( PdaState *state ); + + /* Removes states that cannot be reached by any path in the fsm and are + * thus wasted silicon. */ + void removeUnreachableStates(); + + /* Remove error actions from states on which the error transition will + * never be taken. */ + bool outListCovers( PdaState *state ); + + /* Remove states that are on the misfit list. */ + void removeMisfits(); + + + /* + * Other + */ + + /* Move the in trans into src into dest. */ + void inTransMove(PdaState *dest, PdaState *src); + + int fsmLength( ); + + /* Collected machine information. */ + unsigned long long maxState; + unsigned long long maxAction; + unsigned long long maxLelId; + unsigned long long maxOffset; + unsigned long long maxIndex; + unsigned long long maxProdLen; + + PdaActionSet actionSet; +}; + + +#endif /* _FSMGRAPH_H */ diff --git a/src/pdarun.c b/src/pdarun.c new file mode 100644 index 0000000..5b85f5e --- /dev/null +++ b/src/pdarun.c @@ -0,0 +1,2201 @@ +/* + * Copyright 2007-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "debug.h" +#include "pdarun.h" +#include "bytecode.h" +#include "tree.h" +#include "pool.h" + +#include <errno.h> +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <assert.h> + +#define true 1 +#define false 0 + +#define act_sb 0x1 +#define act_rb 0x2 + +#define read_word_p( i, p ) do { \ + i = ((Word) p[0]); \ + i |= ((Word) p[1]) << 8; \ + i |= ((Word) p[2]) << 16; \ + i |= ((Word) p[3]) << 24; \ +} while(0) + +#define read_tree_p( i, p ) do { \ + Word w; \ + w = ((Word) p[0]); \ + w |= ((Word) p[1]) << 8; \ + w |= ((Word) p[2]) << 16; \ + w |= ((Word) p[3]) << 24; \ + i = (Tree*)w; \ +} while(0) + +static void initFsmRun( Program *prg, FsmRun *fsmRun ) +{ + fsmRun->tables = prg->rtd->fsmTables; + + fsmRun->consumeBuf = 0; + + fsmRun->p = fsmRun->pe = 0; + fsmRun->toklen = 0; + fsmRun->eof = 0; + + fsmRun->preRegion = -1; +} + +void clearFsmRun( Program *prg, FsmRun *fsmRun ) +{ + if ( fsmRun->consumeBuf != 0 ) { + /* Transfer the run buf list to the program */ + RunBuf *head = fsmRun->consumeBuf; + RunBuf *tail = head; + while ( tail->next != 0 ) + tail = tail->next; + + tail->next = prg->allocRunBuf; + prg->allocRunBuf = head; + } +} + +void incrementSteps( PdaRun *pdaRun ) +{ + pdaRun->steps += 1; + //debug( prg, REALM_PARSE, "steps up to %ld\n", pdaRun->steps ); +} + +void decrementSteps( PdaRun *pdaRun ) +{ + pdaRun->steps -= 1; + //debug( prg, REALM_PARSE, "steps down to %ld\n", pdaRun->steps ); +} + +Head *streamPull( Program *prg, PdaRun *pdaRun, StreamImpl *is, long length ) +{ + if ( pdaRun != 0 ) { + FsmRun *fsmRun = pdaRun->fsmRun; + RunBuf *runBuf = fsmRun->consumeBuf; + if ( length > ( FSM_BUFSIZE - runBuf->length ) ) { + runBuf = newRunBuf(); + runBuf->next = fsmRun->consumeBuf; + fsmRun->consumeBuf = runBuf; + } + + char *dest = runBuf->data + runBuf->length; + + is->funcs->getData( is, dest, length ); + Location *loc = locationAllocate( prg ); + is->funcs->consumeData( is, length, loc ); + + runBuf->length += length; + + fsmRun->p = fsmRun->pe = 0; + fsmRun->toklen = 0; + + Head *tokdata = stringAllocPointer( prg, dest, length ); + tokdata->location = loc; + + return tokdata; + } + else { + Head *head = initStrSpace( length ); + char *dest = (char*)head->data; + + is->funcs->getData( is, dest, length ); + Location *loc = locationAllocate( prg ); + is->funcs->consumeData( is, length, loc ); + head->location = loc; + + return head; + } +} + +void undoStreamPull( StreamImpl *is, const char *data, long length ) +{ + //debug( REALM_PARSE, "undoing stream pull\n" ); + + is->funcs->prependData( is, data, length ); +} + +void streamPushText( StreamImpl *is, const char *data, long length ) +{ + is->funcs->prependData( is, data, length ); +} + +void streamPushTree( StreamImpl *is, Tree *tree, int ignore ) +{ + is->funcs->prependTree( is, tree, ignore ); +} + +void streamPushStream( StreamImpl *is, Tree *tree ) +{ + is->funcs->prependStream( is, tree ); +} + +void undoStreamPush( Program *prg, Tree **sp, StreamImpl *is, long length ) +{ + if ( length < 0 ) { + Tree *tree = is->funcs->undoPrependTree( is ); + treeDownref( prg, sp, tree ); + } + else { + is->funcs->undoPrependData( is, length ); + } +} + +void undoStreamAppend( Program *prg, Tree **sp, StreamImpl *is, Tree *input, long length ) +{ + if ( input->id == LEL_ID_STR ) + is->funcs->undoAppendData( is, length ); + else if ( input->id == LEL_ID_STREAM ) + is->funcs->undoAppendStream( is ); + else { + Tree *tree = is->funcs->undoAppendTree( is ); + treeDownref( prg, sp, tree ); + } +} + +/* Should only be sending back whole tokens/ignores, therefore the send back + * should never cross a buffer boundary. Either we slide back data, or we move to + * a previous buffer and slide back data. */ +static void sendBackText( FsmRun *fsmRun, StreamImpl *is, const char *data, long length ) +{ + //debug( REALM_PARSE, "push back of %ld characters\n", length ); + + if ( length == 0 ) + return; + + //debug( REALM_PARSE, "sending back text: %.*s\n", + // (int)length, data ); + + is->funcs->undoConsumeData( is, data, length ); +} + +void sendBackTree( StreamImpl *is, Tree *tree ) +{ + is->funcs->undoConsumeTree( is, tree, false ); +} + +/* + * Stops on: + * PcrRevIgnore + */ +static void sendBackIgnore( Program *prg, Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, + StreamImpl *is, ParseTree *parseTree ) +{ + #ifdef DEBUG + LangElInfo *lelInfo = prg->rtd->lelInfo; + debug( prg, REALM_PARSE, "sending back: %s%s\n", + lelInfo[parseTree->shadow->tree->id].name, + parseTree->flags & PF_ARTIFICIAL ? " (artificial)" : "" ); + #endif + + Head *head = parseTree->shadow->tree->tokdata; + int artificial = parseTree->flags & PF_ARTIFICIAL; + + if ( head != 0 && !artificial ) + sendBackText( fsmRun, is, stringData( head ), head->length ); + + decrementSteps( pdaRun ); + + /* Check for reverse code. */ + if ( parseTree->flags & PF_HAS_RCODE ) { + pdaRun->onDeck = true; + parseTree->flags &= ~PF_HAS_RCODE; + } + + if ( pdaRun->steps == pdaRun->targetSteps ) { + debug( prg, REALM_PARSE, "trigger parse stop, steps = target = %d\n", pdaRun->targetSteps ); + pdaRun->stop = true; + } +} + +void resetToken( PdaRun *pdaRun ) +{ + FsmRun *fsmRun = pdaRun->fsmRun; + + /* If there is a token started, but never finished for a lack of data, we + * must first backup over it. */ + if ( fsmRun->tokstart != 0 ) { + fsmRun->p = fsmRun->pe = 0; + fsmRun->toklen = 0; + fsmRun->eof = 0; + } +} + +/* Stops on: + * PcrRevToken + */ + +static void sendBack( Program *prg, Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, + StreamImpl *is, ParseTree *parseTree ) +{ + debug( prg, REALM_PARSE, "sending back: %s\n", prg->rtd->lelInfo[parseTree->id].name ); + + if ( parseTree->flags & PF_NAMED ) { + /* Send the named lang el back first, then send back any leading + * whitespace. */ + is->funcs->undoConsumeLangEl( is ); + } + + decrementSteps( pdaRun ); + + /* Artifical were not parsed, instead sent in as items. */ + if ( parseTree->flags & PF_ARTIFICIAL ) { + /* Check for reverse code. */ + if ( parseTree->flags & PF_HAS_RCODE ) { + debug( prg, REALM_PARSE, "tree has rcode, setting on deck\n" ); + pdaRun->onDeck = true; + parseTree->flags &= ~PF_HAS_RCODE; + } + + treeUpref( parseTree->shadow->tree ); + + sendBackTree( is, parseTree->shadow->tree ); + } + else { + /* Check for reverse code. */ + if ( parseTree->flags & PF_HAS_RCODE ) { + debug( prg, REALM_PARSE, "tree has rcode, setting on deck\n" ); + pdaRun->onDeck = true; + parseTree->flags &= ~PF_HAS_RCODE; + } + + /* Push back the token data. */ + sendBackText( fsmRun, is, stringData( parseTree->shadow->tree->tokdata ), + stringLength( parseTree->shadow->tree->tokdata ) ); + + /* If eof was just sent back remember that it needs to be sent again. */ + if ( parseTree->id == prg->rtd->eofLelIds[pdaRun->parserId] ) + is->eofSent = false; + + /* If the item is bound then store remove it from the bindings array. */ + prg->rtd->popBinding( pdaRun, parseTree ); + } + + if ( pdaRun->steps == pdaRun->targetSteps ) { + debug( prg, REALM_PARSE, "trigger parse stop, steps = target = %d\n", pdaRun->targetSteps ); + pdaRun->stop = true; + } + + /* Downref the tree that was sent back and free the kid. */ + treeDownref( prg, sp, parseTree->shadow->tree ); + kidFree( prg, parseTree->shadow ); + parseTreeFree( prg, parseTree ); +} + +void setRegion( PdaRun *pdaRun, int emptyIgnore, ParseTree *tree ) +{ + if ( emptyIgnore ) { + /* Recording the next region. */ + tree->region = pdaRun->nextRegionInd; + if ( pdaRun->tables->tokenRegions[tree->region+1] != 0 ) + pdaRun->numRetry += 1; + } +} + +void ignoreTree( Program *prg, FsmRun *fsmRun, PdaRun *pdaRun, Tree *tree ) +{ + int emptyIgnore = pdaRun->accumIgnore == 0; + + incrementSteps( pdaRun ); + + ParseTree *parseTree = parseTreeAllocate( prg ); + parseTree->shadow = kidAllocate( prg ); + parseTree->shadow->tree = tree; + + parseTree->next = pdaRun->accumIgnore; + pdaRun->accumIgnore = parseTree; + + transferReverseCode( pdaRun, parseTree ); + + if ( fsmRun->preRegion >= 0 ) + parseTree->flags |= PF_RIGHT_IGNORE; + + setRegion( pdaRun, emptyIgnore, pdaRun->accumIgnore ); +} + +void ignoreTree2( Program *prg, PdaRun *pdaRun, Tree *tree ) +{ + int emptyIgnore = pdaRun->accumIgnore == 0; + + incrementSteps( pdaRun ); + + ParseTree *parseTree = parseTreeAllocate( prg ); + parseTree->flags |= PF_ARTIFICIAL; + parseTree->shadow = kidAllocate( prg ); + parseTree->shadow->tree = tree; + + parseTree->next = pdaRun->accumIgnore; + pdaRun->accumIgnore = parseTree; + + transferReverseCode( pdaRun, parseTree ); + + setRegion( pdaRun, emptyIgnore, pdaRun->accumIgnore ); +} + +Kid *makeTokenWithData( Program *prg, PdaRun *pdaRun, FsmRun *fsmRun, + StreamImpl *is, int id, Head *tokdata ) +{ + /* Make the token object. */ + long objectLength = prg->rtd->lelInfo[id].objectLength; + Kid *attrs = allocAttrs( prg, objectLength ); + + Kid *input = 0; + input = kidAllocate( prg ); + input->tree = treeAllocate( prg ); + + debug( prg, REALM_PARSE, "made token %p\n", input->tree ); + + input->tree->refs = 1; + input->tree->id = id; + input->tree->tokdata = tokdata; + + /* No children and ignores get added later. */ + input->tree->child = attrs; + + LangElInfo *lelInfo = prg->rtd->lelInfo; + if ( lelInfo[id].numCaptureAttr > 0 ) { + int i; + for ( i = 0; i < lelInfo[id].numCaptureAttr; i++ ) { + CaptureAttr *ca = &prg->rtd->captureAttr[lelInfo[id].captureAttr + i]; + Head *data = stringAllocFull( prg, + fsmRun->mark[ca->mark_enter], fsmRun->mark[ca->mark_leave] + - fsmRun->mark[ca->mark_enter] ); + Tree *string = constructString( prg, data ); + treeUpref( string ); + setAttr( input->tree, ca->offset, string ); + } + } + + return input; +} + +void clearIgnoreList( Program *prg, Tree **sp, Kid *kid ) +{ + while ( kid != 0 ) { + Kid *next = kid->next; + treeDownref( prg, sp, kid->tree ); + kidFree( prg, kid ); + kid = next; + } +} + +static void reportParseError( Program *prg, Tree **sp, PdaRun *pdaRun ) +{ + Kid *kid = pdaRun->btPoint; + Head *deepest = 0; + while ( kid != 0 ) { + Head *head = kid->tree->tokdata; + if ( head != 0 && head->location != 0 ) { + if ( deepest == 0 || head->location->byte > deepest->location->byte ) + deepest = head; + } + kid = kid->next; + } + + Head *errorHead = 0; + + /* If there are no error points on record assume the error occurred at the + * beginning of the stream. */ + if ( deepest == 0 ) { + errorHead = stringAllocFull( prg, "<input>:1:1: parse error", 32 ); + errorHead->location = locationAllocate( prg ); + errorHead->location->line = 1; + errorHead->location->column = 1; + } + else { + debug( prg, REALM_PARSE, "deepest location byte: %d\n", deepest->location->byte ); + + const char *name = deepest->location->name; + long line = deepest->location->line; + long i, column = deepest->location->column; + long byte = deepest->location->byte; + + for ( i = 0; i < deepest->length; i++ ) { + if ( deepest->data[i] != '\n' ) + column += 1; + else { + line += 1; + column = 1; + } + byte += 1; + } + + if ( name == 0 ) + name = "<input>"; + char *formatted = malloc( strlen( name ) + 128 ); + sprintf( formatted, "%s:%ld:%ld: parse error", name, line, column ); + errorHead = stringAllocFull( prg, formatted, strlen(formatted) ); + free( formatted ); + + errorHead->location = locationAllocate( prg ); + + errorHead->location->name = deepest->location->name; + errorHead->location->line = line; + errorHead->location->column = column; + errorHead->location->byte = byte; + } + + Tree *tree = constructString( prg, errorHead ); + treeDownref( prg, sp, pdaRun->parseErrorText ); + pdaRun->parseErrorText = tree; + treeUpref( pdaRun->parseErrorText ); +} + +static void attachRightIgnore( Program *prg, Tree **sp, PdaRun *pdaRun, ParseTree *parseTree ) +{ + if ( pdaRun->accumIgnore == 0 ) + return; + + if ( pdaRun->stackTop->id > 0 && pdaRun->stackTop->id < prg->rtd->firstNonTermId ) { + /* OK, do it */ + debug( prg, REALM_PARSE, "attaching right ignore\n" ); + + /* Reset. */ + assert( ! ( parseTree->flags & PF_RIGHT_IL_ATTACHED ) ); + + ParseTree *accum = pdaRun->accumIgnore; + + ParseTree *stopAt = 0, *use = accum; + while ( use != 0 ) { + if ( ! (use->flags & PF_RIGHT_IGNORE) ) + stopAt = use; + use = use->next; + } + + if ( stopAt != 0 ) { + /* Stop at was set. Make it the last item in the igore list. Take + * the rest. */ + accum = stopAt->next; + stopAt->next = 0; + } + else { + /* Stop at was never set. All right ignore. Use it all. */ + pdaRun->accumIgnore = 0; + } + + /* The data list needs to be extracted and reversed. The parse tree list + * can remain in stack order. */ + ParseTree *child = accum, *last = 0; + Kid *dataChild = 0, *dataLast = 0; + + while ( child ) { + dataChild = child->shadow; + ParseTree *next = child->next; + + /* Reverse the lists. */ + dataChild->next = dataLast; + child->next = last; + + /* Detach the parse tree from the data tree. */ + child->shadow = 0; + + /* Keep the last for reversal. */ + dataLast = dataChild; + last = child; + + child = next; + } + + /* Last is now the first. */ + parseTree->rightIgnore = last; + + if ( dataChild != 0 ) { + debug( prg, REALM_PARSE, "attaching ignore right\n" ); + + Kid *ignoreKid = dataLast; + + /* Copy the ignore list first if we need to attach it as a right + * ignore. */ + Tree *rightIgnore = 0; + + rightIgnore = treeAllocate( prg ); + rightIgnore->id = LEL_ID_IGNORE; + rightIgnore->child = ignoreKid; + + Tree *pushTo = parseTree->shadow->tree; + + pushTo = pushRightIgnore( prg, pushTo, rightIgnore ); + + parseTree->shadow->tree = pushTo; + + parseTree->flags |= PF_RIGHT_IL_ATTACHED; + } + } +} + +static void attachLeftIgnore( Program *prg, Tree **sp, PdaRun *pdaRun, ParseTree *parseTree ) +{ + /* Reset. */ + assert( ! ( parseTree->flags & PF_LEFT_IL_ATTACHED ) ); + + ParseTree *accum = pdaRun->accumIgnore; + pdaRun->accumIgnore = 0; + + /* The data list needs to be extracted and reversed. The parse tree list + * can remain in stack order. */ + ParseTree *child = accum, *last = 0; + Kid *dataChild = 0, *dataLast = 0; + + while ( child ) { + dataChild = child->shadow; + ParseTree *next = child->next; + + /* Reverse the lists. */ + dataChild->next = dataLast; + child->next = last; + + /* Detach the parse tree from the data tree. */ + child->shadow = 0; + + /* Keep the last for reversal. */ + dataLast = dataChild; + last = child; + + child = next; + } + + /* Last is now the first. */ + parseTree->leftIgnore = last; + + if ( dataChild != 0 ) { + debug( prg, REALM_PARSE, "attaching left ignore\n" ); + + Kid *ignoreKid = dataChild; + + /* Make the ignore list for the left-ignore. */ + Tree *leftIgnore = treeAllocate( prg ); + leftIgnore->id = LEL_ID_IGNORE; + leftIgnore->child = ignoreKid; + + Tree *pushTo = parseTree->shadow->tree; + + pushTo = pushLeftIgnore( prg, pushTo, leftIgnore ); + + parseTree->shadow->tree = pushTo; + + parseTree->flags |= PF_LEFT_IL_ATTACHED; + } +} + +/* Not currently used. Need to revive this. WARNING: untested changes here */ +static void detachRightIgnore( Program *prg, Tree **sp, PdaRun *pdaRun, ParseTree *parseTree ) +{ + /* Right ignore are immediately discarded since they are copies of + * left-ignores. */ + Tree *rightIgnore = 0; + if ( parseTree->flags & PF_RIGHT_IL_ATTACHED ) { + Tree *popFrom = parseTree->shadow->tree; + + popFrom = popRightIgnore( prg, sp, popFrom, &rightIgnore ); + + parseTree->shadow->tree = popFrom; + + parseTree->flags &= ~PF_RIGHT_IL_ATTACHED; + } + + if ( parseTree->rightIgnore != 0 ) { + assert( rightIgnore != 0 ); + + /* Transfer the trees to accumIgnore. */ + ParseTree *ignore = parseTree->rightIgnore; + parseTree->rightIgnore = 0; + + Kid *dataIgnore = rightIgnore->child; + rightIgnore->child = 0; + + ParseTree *last = 0; + Kid *dataLast = 0; + while ( ignore != 0 ) { + ParseTree *next = ignore->next; + Kid *dataNext = dataIgnore->next; + + /* Put the data trees underneath the parse trees. */ + ignore->shadow = dataIgnore; + + /* Reverse. */ + ignore->next = last; + dataIgnore->next = dataLast; + + /* Keep last for reversal. */ + last = ignore; + dataLast = dataIgnore; + + ignore = next; + dataIgnore = dataNext; + } + + pdaRun->accumIgnore = last; + + treeDownref( prg, sp, rightIgnore ); + } +} + +static void detachLeftIgnore( Program *prg, Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, ParseTree *parseTree ) +{ + /* Detach left. */ + Tree *leftIgnore = 0; + if ( parseTree->flags & PF_LEFT_IL_ATTACHED ) { + Tree *popFrom = parseTree->shadow->tree; + + popFrom = popLeftIgnore( prg, sp, popFrom, &leftIgnore ); + + parseTree->shadow->tree = popFrom; + + parseTree->flags &= ~PF_LEFT_IL_ATTACHED; + } + + if ( parseTree->leftIgnore != 0 ) { + assert( leftIgnore != 0 ); + + /* Transfer the trees to accumIgnore. */ + ParseTree *ignore = parseTree->leftIgnore; + parseTree->leftIgnore = 0; + + Kid *dataIgnore = leftIgnore->child; + leftIgnore->child = 0; + + ParseTree *last = 0; + Kid *dataLast = 0; + while ( ignore != 0 ) { + ParseTree *next = ignore->next; + Kid *dataNext = dataIgnore->next; + + /* Put the data trees underneath the parse trees. */ + ignore->shadow = dataIgnore; + + /* Reverse. */ + ignore->next = last; + dataIgnore->next = dataLast; + + /* Keep last for reversal. */ + last = ignore; + dataLast = dataIgnore; + + ignore = next; + dataIgnore = dataNext; + } + + pdaRun->accumIgnore = last; + } + + treeDownref( prg, sp, leftIgnore ); +} + +void handleError( Program *prg, Tree **sp, PdaRun *pdaRun ) +{ + /* Check the result. */ + if ( pdaRun->parseError ) { + /* Error occured in the top-level parser. */ + reportParseError( prg, sp, pdaRun ); + } + else { + if ( isParserStopFinished( pdaRun ) ) { + debug( prg, REALM_PARSE, "stopping the parse\n" ); + pdaRun->stopParsing = true; + } + } +} + +static Head *extractMatch( Program *prg, FsmRun *fsmRun, StreamImpl *is ) +{ + long length = fsmRun->toklen; + + //debug( prg, REALM_PARSE, "extracting token of length: %ld\n", length ); + + RunBuf *runBuf = fsmRun->consumeBuf; + if ( runBuf == 0 || length > ( FSM_BUFSIZE - runBuf->length ) ) { + runBuf = newRunBuf(); + runBuf->next = fsmRun->consumeBuf; + fsmRun->consumeBuf = runBuf; + } + + char *dest = runBuf->data + runBuf->length; + + is->funcs->getData( is, dest, length ); + Location *location = locationAllocate( prg ); + is->funcs->consumeData( is, length, location ); + + runBuf->length += length; + + fsmRun->p = fsmRun->pe = 0; + fsmRun->toklen = 0; + fsmRun->tokstart = 0; + + Head *head = stringAllocPointer( prg, dest, length ); + + head->location = location; + + debug( prg, REALM_PARSE, "location byte: %d\n", is->byte ); + + return head; +} + +static Head *peekMatch( Program *prg, FsmRun *fsmRun, StreamImpl *is ) +{ + long length = fsmRun->toklen; + + RunBuf *runBuf = fsmRun->consumeBuf; + if ( runBuf == 0 || length > ( FSM_BUFSIZE - runBuf->length ) ) { + runBuf = newRunBuf(); + runBuf->next = fsmRun->consumeBuf; + fsmRun->consumeBuf = runBuf; + } + + char *dest = runBuf->data + runBuf->length; + + is->funcs->getData( is, dest, length ); + + fsmRun->p = fsmRun->pe = 0; + fsmRun->toklen = 0; + + Head *head = stringAllocPointer( prg, dest, length ); + + head->location = locationAllocate( prg ); + head->location->line = is->line; + head->location->column = is->column; + head->location->byte = is->byte; + + debug( prg, REALM_PARSE, "location byte: %d\n", is->byte ); + + return head; +} + + +static void sendIgnore( Program *prg, Tree **sp, StreamImpl *is, FsmRun *fsmRun, PdaRun *pdaRun, long id ) +{ + debug( prg, REALM_PARSE, "ignoring: %s\n", prg->rtd->lelInfo[id].name ); + + /* Make the ignore string. */ + Head *ignoreStr = extractMatch( prg, fsmRun, is ); + + debug( prg, REALM_PARSE, "ignoring: %.*s\n", ignoreStr->length, ignoreStr->data ); + + Tree *tree = treeAllocate( prg ); + tree->refs = 1; + tree->id = id; + tree->tokdata = ignoreStr; + + /* Send it to the pdaRun. */ + ignoreTree( prg, fsmRun, pdaRun, tree ); +} + + +static void sendToken( Program *prg, Tree **sp, StreamImpl *is, FsmRun *fsmRun, PdaRun *pdaRun, long id ) +{ + int emptyIgnore = pdaRun->accumIgnore == 0; + + /* Make the token data. */ + Head *tokdata = extractMatch( prg, fsmRun, is ); + + debug( prg, REALM_PARSE, "token: %s text: %.*s\n", + prg->rtd->lelInfo[id].name, + stringLength(tokdata), stringData(tokdata) ); + + Kid *input = makeTokenWithData( prg, pdaRun, fsmRun, is, id, tokdata ); + + incrementSteps( pdaRun ); + + ParseTree *parseTree = parseTreeAllocate( prg ); + parseTree->id = input->tree->id; + parseTree->shadow = input; + + pdaRun->parseInput = parseTree; + + /* Store any alternate scanning region. */ + if ( input != 0 && pdaRun->cs >= 0 ) + setRegion( pdaRun, emptyIgnore, parseTree ); +} + +static void sendTree( Program *prg, Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *is ) +{ + Kid *input = kidAllocate( prg ); + input->tree = is->funcs->consumeTree( is ); + + incrementSteps( pdaRun ); + + ParseTree *parseTree = parseTreeAllocate( prg ); + parseTree->id = input->tree->id; + parseTree->flags |= PF_ARTIFICIAL; + parseTree->shadow = input; + + pdaRun->parseInput = parseTree; +} + +static void sendIgnoreTree( Program *prg, Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *is ) +{ + Tree *tree = is->funcs->consumeTree( is ); + ignoreTree2( prg, pdaRun, tree ); +} + +static void sendCi( Program *prg, Tree **sp, StreamImpl *is, FsmRun *fsmRun, PdaRun *pdaRun, int id ) +{ + debug( prg, REALM_PARSE, "token: CI\n" ); + + int emptyIgnore = pdaRun->accumIgnore == 0; + + /* Make the token data. */ + Head *tokdata = headAllocate( prg ); + tokdata->location = locationAllocate( prg ); + tokdata->location->line = is->line; + tokdata->location->column = is->column; + tokdata->location->byte = is->byte; + + debug( prg, REALM_PARSE, "token: %s text: %.*s\n", + prg->rtd->lelInfo[id].name, + stringLength(tokdata), stringData(tokdata) ); + + Kid *input = makeTokenWithData( prg, pdaRun, fsmRun, is, id, tokdata ); + + incrementSteps( pdaRun ); + + ParseTree *parseTree = parseTreeAllocate( prg ); + parseTree->id = input->tree->id; + parseTree->shadow = input; + + pdaRun->parseInput = parseTree; + + /* Store any alternate scanning region. */ + if ( input != 0 && pdaRun->cs >= 0 ) + setRegion( pdaRun, emptyIgnore, parseTree ); +} + + +static void sendEof( Program *prg, Tree **sp, StreamImpl *is, FsmRun *fsmRun, PdaRun *pdaRun ) +{ + debug( prg, REALM_PARSE, "token: _EOF\n" ); + + incrementSteps( pdaRun ); + + Head *head = headAllocate( prg ); + head->location = locationAllocate( prg ); + head->location->line = is->line; + head->location->column = is->column; + head->location->byte = is->byte; + + Kid *input = kidAllocate( prg ); + input->tree = treeAllocate( prg ); + + input->tree->refs = 1; + input->tree->id = prg->rtd->eofLelIds[pdaRun->parserId]; + input->tree->tokdata = head; + + /* Set the state using the state of the parser. */ + fsmRun->region = pdaRunGetNextRegion( pdaRun, 0 ); + fsmRun->preRegion = pdaRunGetNextPreRegion( pdaRun ); + fsmRun->cs = fsmRun->tables->entryByRegion[fsmRun->region]; + + ParseTree *parseTree = parseTreeAllocate( prg ); + parseTree->id = input->tree->id; + parseTree->shadow = input; + + pdaRun->parseInput = parseTree; +} + +static void newToken( Program *prg, PdaRun *pdaRun, FsmRun *fsmRun ) +{ + fsmRun->p = fsmRun->pe = 0; + fsmRun->toklen = 0; + fsmRun->eof = 0; + + /* Init the scanner vars. */ + fsmRun->act = 0; + fsmRun->tokstart = 0; + fsmRun->tokend = 0; + fsmRun->matchedToken = 0; + + /* Set the state using the state of the parser. */ + fsmRun->region = pdaRunGetNextRegion( pdaRun, 0 ); + fsmRun->preRegion = pdaRunGetNextPreRegion( pdaRun ); + if ( fsmRun->preRegion > 0 ) { + fsmRun->cs = fsmRun->tables->entryByRegion[fsmRun->preRegion]; + fsmRun->ncs = fsmRun->tables->entryByRegion[fsmRun->region]; + } + else { + fsmRun->cs = fsmRun->tables->entryByRegion[fsmRun->region]; + } + + + /* Clear the mark array. */ + memset( fsmRun->mark, 0, sizeof(fsmRun->mark) ); +} + +static void pushBtPoint( Program *prg, PdaRun *pdaRun ) +{ + Tree *tree = 0; + if ( pdaRun->accumIgnore != 0 ) + tree = pdaRun->accumIgnore->shadow->tree; + else if ( pdaRun->tokenList != 0 ) + tree = pdaRun->tokenList->kid->tree; + + if ( tree != 0 ) { + debug( prg, REALM_PARSE, "pushing bt point with location byte %d\n", + ( tree != 0 && tree->tokdata != 0 && tree->tokdata->location != 0 ) ? + tree->tokdata->location->byte : 0 ); + + Kid *kid = kidAllocate( prg ); + kid->tree = tree; + treeUpref( tree ); + kid->next = pdaRun->btPoint; + pdaRun->btPoint = kid; + } +} + + +#define SCAN_UNDO -7 +#define SCAN_IGNORE -6 +#define SCAN_TREE -5 +#define SCAN_TRY_AGAIN_LATER -4 +#define SCAN_ERROR -3 +#define SCAN_LANG_EL -2 +#define SCAN_EOF -1 + +long scanToken( Program *prg, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *is ) +{ + if ( pdaRun->triggerUndo ) + return SCAN_UNDO; + + while ( true ) { + char *pd = 0; + int len = 0; + int type = is->funcs->getParseBlock( is, fsmRun->toklen, &pd, &len ); + + switch ( type ) { + case INPUT_DATA: + fsmRun->p = pd; + fsmRun->pe = pd + len; + break; + + case INPUT_EOS: + fsmRun->p = fsmRun->pe = 0; + if ( fsmRun->tokstart != 0 ) + fsmRun->eof = 1; + debug( prg, REALM_SCAN, "EOS *******************\n" ); + break; + + case INPUT_EOF: + fsmRun->p = fsmRun->pe = 0; + if ( fsmRun->tokstart != 0 ) + fsmRun->eof = 1; + else + return SCAN_EOF; + break; + + case INPUT_EOD: + fsmRun->p = fsmRun->pe = 0; + return SCAN_TRY_AGAIN_LATER; + + case INPUT_LANG_EL: + if ( fsmRun->tokstart != 0 ) + fsmRun->eof = 1; + else + return SCAN_LANG_EL; + break; + + case INPUT_TREE: + if ( fsmRun->tokstart != 0 ) + fsmRun->eof = 1; + else + return SCAN_TREE; + break; + case INPUT_IGNORE: + if ( fsmRun->tokstart != 0 ) + fsmRun->eof = 1; + else + return SCAN_IGNORE; + break; + } + + prg->rtd->fsmExecute( fsmRun, is ); + + /* First check if scanning stopped because we have a token. */ + if ( fsmRun->matchedToken > 0 ) { + /* If the token has a marker indicating the end (due to trailing + * context) then adjust data now. */ + LangElInfo *lelInfo = prg->rtd->lelInfo; + if ( lelInfo[fsmRun->matchedToken].markId >= 0 ) + fsmRun->p = fsmRun->mark[lelInfo[fsmRun->matchedToken].markId]; + + return fsmRun->matchedToken; + } + + /* Check for error. */ + if ( fsmRun->cs == fsmRun->tables->errorState ) { + /* If a token was started, but not finished (tokstart != 0) then + * restore data to the beginning of that token. */ + if ( fsmRun->tokstart != 0 ) + fsmRun->p = fsmRun->tokstart; + + /* Check for a default token in the region. If one is there + * then send it and continue with the processing loop. */ + if ( prg->rtd->regionInfo[fsmRun->region].defaultToken >= 0 ) { + fsmRun->toklen = 0; + return prg->rtd->regionInfo[fsmRun->region].defaultToken; + } + + return SCAN_ERROR; + } + + /* Got here because the state machine didn't match a token or encounter + * an error. Must be because we got to the end of the buffer data. */ + assert( fsmRun->p == fsmRun->pe ); + } + + /* Should not be reached. */ + return SCAN_ERROR; +} + +/* + * Stops on: + * PcrPreEof + * PcrGeneration + * PcrReduction + * PcrRevReduction + * PcrRevIgnore + * PcrRevToken + */ + +long parseLoop( Program *prg, Tree **sp, PdaRun *pdaRun, + StreamImpl *is, long entry ) +{ + FsmRun *fsmRun = pdaRun->fsmRun; + LangElInfo *lelInfo = prg->rtd->lelInfo; + +switch ( entry ) { +case PcrStart: + + pdaRun->stop = false; + + while ( true ) { + debug( prg, REALM_PARSE, "parse loop start %d:%d\n", is->line, is->column ); + + /* Pull the current scanner from the parser. This can change during + * parsing due to inputStream pushes, usually for the purpose of includes. + * */ + pdaRun->tokenId = scanToken( prg, pdaRun, fsmRun, is ); + + if ( pdaRun->tokenId == SCAN_ERROR ) { + if ( fsmRun->preRegion >= 0 ) { + fsmRun->preRegion = -1; + fsmRun->cs = fsmRun->ncs; + continue; + } + } + + if ( pdaRun->tokenId == SCAN_ERROR && + ( prg->rtd->regionInfo[fsmRun->region].ciLelId > 0 ) ) + { + debug( prg, REALM_PARSE, "sending a collect ignore\n" ); + sendCi( prg, sp, is, fsmRun, pdaRun, prg->rtd->regionInfo[fsmRun->region].ciLelId ); + goto yes; + } + + if ( pdaRun->tokenId == SCAN_TRY_AGAIN_LATER ) { + debug( prg, REALM_PARSE, "scanner says try again later\n" ); + break; + } + + assert( pdaRun->parseInput == 0 ); + pdaRun->parseInput = 0; + + /* Check for EOF. */ + if ( pdaRun->tokenId == SCAN_EOF ) { + is->eofSent = true; + sendEof( prg, sp, is, fsmRun, pdaRun ); + + pdaRun->frameId = prg->rtd->regionInfo[fsmRun->region].eofFrameId; + + if ( prg->ctxDepParsing && pdaRun->frameId >= 0 ) { + debug( prg, REALM_PARSE, "HAVE PRE_EOF BLOCK\n" ); + + pdaRun->fi = &prg->rtd->frameInfo[pdaRun->frameId]; + pdaRun->code = pdaRun->fi->codeWV; + +return PcrPreEof; +case PcrPreEof: + makeReverseCode( pdaRun ); + } + } + else if ( pdaRun->tokenId == SCAN_UNDO ) { + /* Fall through with parseInput = 0. FIXME: Do we need to send back ignore? */ + debug( prg, REALM_PARSE, "invoking undo from the scanner\n" ); + } + else if ( pdaRun->tokenId == SCAN_ERROR ) { + /* Scanner error, maybe retry. */ + if ( pdaRun->accumIgnore == 0 && pdaRunGetNextRegion( pdaRun, 1 ) != 0 ) { + debug( prg, REALM_PARSE, "scanner failed, trying next region\n" ); + + pdaRun->nextRegionInd += 1; + goto skipSend; + } + else if ( pdaRun->numRetry > 0 ) { + debug( prg, REALM_PARSE, "invoking parse error from the scanner\n" ); + + /* Fall through to send null (error). */ + pushBtPoint( prg, pdaRun ); + } + else { + debug( prg, REALM_PARSE, "no alternate scanning regions\n" ); + + /* There are no alternative scanning regions to try, nor are + * there any alternatives stored in the current parse tree. No + * choice but to end the parse. */ + pushBtPoint( prg, pdaRun ); + + reportParseError( prg, sp, pdaRun ); + pdaRun->parseError = 1; + goto skipSend; + } + } + else if ( pdaRun->tokenId == SCAN_LANG_EL ) { + debug( prg, REALM_PARSE, "sending an named lang el\n" ); + + /* A named language element (parsing colm program). */ + prg->rtd->sendNamedLangEl( prg, sp, pdaRun, fsmRun, is ); + } + else if ( pdaRun->tokenId == SCAN_TREE ) { + debug( prg, REALM_PARSE, "sending a tree\n" ); + + /* A tree already built. */ + sendTree( prg, sp, pdaRun, fsmRun, is ); + } + else if ( pdaRun->tokenId == SCAN_IGNORE ) { + debug( prg, REALM_PARSE, "sending an ignore token\n" ); + + /* A tree to ignore. */ + sendIgnoreTree( prg, sp, pdaRun, fsmRun, is ); + goto skipSend; + } + else if ( prg->ctxDepParsing && lelInfo[pdaRun->tokenId].frameId >= 0 ) { + /* Has a generation action. */ + debug( prg, REALM_PARSE, "token gen action: %s\n", + prg->rtd->lelInfo[pdaRun->tokenId].name ); + + /* Make the token data. */ + pdaRun->tokdata = peekMatch( prg, fsmRun, is ); + + /* Note that we don't update the position now. It is done when the token + * data is pulled from the inputStream. */ + + fsmRun->p = fsmRun->pe = 0; + fsmRun->toklen = 0; + fsmRun->eof = 0; + + pdaRun->fi = &prg->rtd->frameInfo[prg->rtd->lelInfo[pdaRun->tokenId].frameId]; + pdaRun->frameId = prg->rtd->lelInfo[pdaRun->tokenId].frameId; + pdaRun->code = pdaRun->fi->codeWV; + +return PcrGeneration; +case PcrGeneration: + + makeReverseCode( pdaRun ); + + /* Finished with the match text. */ + stringFree( prg, pdaRun->tokdata ); + + goto skipSend; + } + else if ( lelInfo[pdaRun->tokenId].ignore ) { + debug( prg, REALM_PARSE, "sending an ignore token: %s\n", + prg->rtd->lelInfo[pdaRun->tokenId].name ); + + /* Is an ignore token. */ + sendIgnore( prg, sp, is, fsmRun, pdaRun, pdaRun->tokenId ); + goto skipSend; + } + else { + debug( prg, REALM_PARSE, "sending an a plain old token: %s\n", + prg->rtd->lelInfo[pdaRun->tokenId].name ); + + /* Is a plain token. */ + sendToken( prg, sp, is, fsmRun, pdaRun, pdaRun->tokenId ); + } +yes: + + if ( pdaRun->parseInput != 0 ) + transferReverseCode( pdaRun, pdaRun->parseInput ); + + if ( pdaRun->parseInput != 0 ) { + /* If it's a nonterminal with a termdup then flip the parse tree to the terminal. */ + if ( pdaRun->parseInput->id >= prg->rtd->firstNonTermId ) { + pdaRun->parseInput->id = prg->rtd->lelInfo[pdaRun->parseInput->id].termDupId; + pdaRun->parseInput->flags |= PF_TERM_DUP; + } + } + + long pcr = parseToken( prg, sp, pdaRun, fsmRun, is, PcrStart ); + + while ( pcr != PcrDone ) { + +return pcr; +case PcrReduction: +case PcrReverse: + + pcr = parseToken( prg, sp, pdaRun, fsmRun, is, entry ); + } + + assert( pcr == PcrDone ); + + handleError( prg, sp, pdaRun ); + +skipSend: + newToken( prg, pdaRun, fsmRun ); + + /* Various stop conditions. This should all be coverned by one test + * eventually. */ + + if ( pdaRun->triggerUndo ) { + debug( prg, REALM_PARSE, "parsing stopped by triggerUndo\n" ); + break; + } + + if ( is->eofSent ) { + debug( prg, REALM_PARSE, "parsing stopped by EOF\n" ); + break; + } + + if ( pdaRun->stopParsing ) { + debug( prg, REALM_PARSE, "scanner has been stopped\n" ); + break; + } + + if ( pdaRun->stop ) { + debug( prg, REALM_PARSE, "parsing has been stopped by consumedCount\n" ); + break; + } + + if ( prg->induceExit ) { + debug( prg, REALM_PARSE, "parsing has been stopped by a call to exit\n" ); + break; + } + + if ( pdaRun->parseError ) { + debug( prg, REALM_PARSE, "parsing stopped by a parse error\n" ); + break; + } + } + +case PcrDone: +break; } + + return PcrDone; +} + +/* Offset can be used to look at the next nextRegionInd. */ +int pdaRunGetNextRegion( PdaRun *pdaRun, int offset ) +{ + return pdaRun->tables->tokenRegions[pdaRun->nextRegionInd+offset]; +} + +int pdaRunGetNextPreRegion( PdaRun *pdaRun ) +{ + return pdaRun->tables->tokenPreRegions[pdaRun->nextRegionInd]; +} + +Tree *getParsedRoot( PdaRun *pdaRun, int stop ) +{ + if ( pdaRun->parseError ) + return 0; + else if ( stop ) { + if ( pdaRun->stackTop->shadow != 0 ) + return pdaRun->stackTop->shadow->tree; + } + else { + if ( pdaRun->stackTop->next->shadow != 0 ) + return pdaRun->stackTop->next->shadow->tree; + } + return 0; +} + +void clearParseTree( Program *prg, Tree **sp, ParseTree *pt ) +{ + Tree **top = vm_ptop(); + + if ( pt == 0 ) + return; + +free_tree: + if ( pt->next != 0 ) { + vm_push( (Tree*)pt->next ); + } + + if ( pt->leftIgnore != 0 ) { + vm_push( (Tree*)pt->leftIgnore ); + } + + if ( pt->child != 0 ) { + vm_push( (Tree*)pt->child ); + } + + if ( pt->rightIgnore != 0 ) { + vm_push( (Tree*)pt->rightIgnore ); + } + + if ( pt->shadow != 0 ) { + treeDownref( prg, sp, pt->shadow->tree ); + kidFree( prg, pt->shadow ); + } + + parseTreeFree( prg, pt ); + + /* Any trees to downref? */ + if ( sp != top ) { + pt = (ParseTree*)vm_pop(); + goto free_tree; + } +} + +void clearPdaRun( Program *prg, Tree **sp, PdaRun *pdaRun ) +{ + clearFsmRun( prg, pdaRun->fsmRun ); + + /* Remaining stack and parse trees underneath. */ + clearParseTree( prg, sp, pdaRun->stackTop ); + pdaRun->stackTop = 0; + + /* Traverse the token list downreffing. */ + Ref *ref = pdaRun->tokenList; + while ( ref != 0 ) { + Ref *next = ref->next; + kidFree( prg, (Kid*)ref ); + ref = next; + } + pdaRun->tokenList = 0; + + /* Traverse the btPoint list downreffing */ + Kid *btp = pdaRun->btPoint; + while ( btp != 0 ) { + Kid *next = btp->next; + treeDownref( prg, sp, btp->tree ); + kidFree( prg, (Kid*)btp ); + btp = next; + } + pdaRun->btPoint = 0; + + /* Clear out any remaining ignores. */ + clearParseTree( prg, sp, pdaRun->accumIgnore ); + pdaRun->accumIgnore = 0; + + if ( pdaRun->context != 0 ) + treeDownref( prg, sp, pdaRun->context ); + + rcodeDownrefAll( prg, sp, &pdaRun->reverseCode ); + rtCodeVectEmpty( &pdaRun->reverseCode ); + rtCodeVectEmpty( &pdaRun->rcodeCollect ); + + treeDownref( prg, sp, pdaRun->parseErrorText ); +} + +int isParserStopFinished( PdaRun *pdaRun ) +{ + int done = + pdaRun->stackTop->next != 0 && + pdaRun->stackTop->next->next == 0 && + pdaRun->stackTop->id == pdaRun->stopTarget; + return done; +} + +void initPdaRun( Program *prg, PdaRun *pdaRun, PdaTables *tables, + int parserId, long stopTarget, int revertOn, Tree *context ) +{ + memset( pdaRun, 0, sizeof(PdaRun) ); + + pdaRun->tables = tables; + pdaRun->parserId = parserId; + pdaRun->stopTarget = stopTarget; + pdaRun->revertOn = revertOn; + pdaRun->targetSteps = -1; + + debug( prg, REALM_PARSE, "initializing PdaRun\n" ); + + /* FIXME: need the right one here. */ + pdaRun->cs = prg->rtd->startStates[pdaRun->parserId]; + + Kid *sentinal = kidAllocate( prg ); + sentinal->tree = treeAllocate( prg ); + sentinal->tree->refs = 1; + + /* Init the element allocation variables. */ + pdaRun->stackTop = parseTreeAllocate( prg ); + pdaRun->stackTop->state = -1; + pdaRun->stackTop->shadow = sentinal; + + pdaRun->numRetry = 0; + pdaRun->nextRegionInd = pdaRun->tables->tokenRegionInds[pdaRun->cs]; + pdaRun->stopParsing = false; + pdaRun->accumIgnore = 0; + pdaRun->btPoint = 0; + pdaRun->checkNext = false; + pdaRun->checkStop = false; + + prg->rtd->initBindings( pdaRun ); + + initRtCodeVect( &pdaRun->reverseCode ); + initRtCodeVect( &pdaRun->rcodeCollect ); + + pdaRun->context = splitTree( prg, context ); + pdaRun->parseError = 0; + pdaRun->parseInput = 0; + pdaRun->triggerUndo = 0; + + pdaRun->tokenId = 0; + + pdaRun->onDeck = false; + pdaRun->parsed = 0; + pdaRun->reject = false; + + pdaRun->rcBlockCount = 0; + + pdaRun->fsmRun = &pdaRun->_fsmRun; + initFsmRun( prg, pdaRun->fsmRun ); + newToken( prg, pdaRun, pdaRun->fsmRun ); +} + +long stackTopTarget( Program *prg, PdaRun *pdaRun ) +{ + long state; + if ( pdaRun->stackTop->state < 0 ) + state = prg->rtd->startStates[pdaRun->parserId]; + else { + state = pdaRun->tables->targs[(int)pdaRun->tables->indicies[pdaRun->tables->offsets[ + pdaRun->stackTop->state] + + (pdaRun->stackTop->id - pdaRun->tables->keys[pdaRun->stackTop->state<<1])]]; + } + return state; +} + +/* + * Local commit: + * -clears reparse flags underneath + * -must be possible to backtrack after + * Global commit (revertOn) + * -clears all reparse flags + * -must be possible to backtrack after + * Global commit (!revertOn) + * -clears all reparse flags + * -clears all 'parsed' reverse code + * -clears all reverse code + * -clears all alg structures + */ + +int beenCommitted( ParseTree *parseTree ) +{ + return parseTree->flags & PF_COMMITTED; +} + +Code *backupOverRcode( Code *rcode ) +{ + Word len; + rcode -= SIZEOF_WORD; + read_word_p( len, rcode ); + rcode -= len; + return rcode; +} + +/* The top level of the stack is linked right-to-left. Trees underneath are + * linked left-to-right. */ +void commitKid( Program *prg, PdaRun *pdaRun, Tree **root, ParseTree *lel, Code **rcode, long *causeReduce ) +{ + ParseTree *tree = 0; + Tree **sp = root; + //Tree *restore = 0; + +head: + /* Commit */ + debug( prg, REALM_PARSE, "commit: visiting %s\n", + prg->rtd->lelInfo[lel->id].name ); + + /* Load up the parsed tree. */ + tree = lel; + + /* Check for reverse code. */ + //restore = 0; + if ( tree->flags & PF_HAS_RCODE ) { + /* If tree caused some reductions, now is not the right time to backup + * over the reverse code. We need to backup over the reductions first. Store + * the count of the reductions and do it when the count drops to zero. */ + if ( tree->causeReduce > 0 ) { + /* The top reduce block does not correspond to this alg. */ + debug( prg, REALM_PARSE, "commit: causeReduce found, delaying backup: %ld\n", + (long)tree->causeReduce ); + *causeReduce = tree->causeReduce; + } + else { + *rcode = backupOverRcode( *rcode ); + + //if ( **rcode == IN_RESTORE_LHS ) { + // debug( prg, REALM_PARSE, "commit: has restore_lhs\n" ); + // read_tree_p( restore, (*rcode+1) ); + //} + } + } + + //FIXME: what was this about? + //if ( restore != 0 ) + // tree = restore; + + /* All the parse algorithm data except for the RCODE flag is in the + * original. That is why we restore first, then we can clear the retry + * values. */ + + /* Check causeReduce, might be time to backup over the reverse code + * belonging to a nonterminal that caused previous reductions. */ + if ( *causeReduce > 0 && + tree->id >= prg->rtd->firstNonTermId && + !(tree->flags & PF_TERM_DUP) ) + { + *causeReduce -= 1; + + if ( *causeReduce == 0 ) { + debug( prg, REALM_PARSE, "commit: causeReduce dropped to zero, backing up over rcode\n" ); + + /* Cause reduce just dropped down to zero. */ + *rcode = backupOverRcode( *rcode ); + } + } + + ///* FIXME: why was this here? + // * Reset retries. */ + //if ( tree->flags & AF_PARSED ) { + // if ( tree->retryLower > 0 ) { + // pdaRun->numRetry -= 1; + // tree->retryLower = 0; + // } + // if ( tree->retryUpper > 0 ) { + // pdaRun->numRetry -= 1; + // tree->retryUpper = 0; + // } + //} + + tree->flags |= PF_COMMITTED; + + /* Do not recures on trees that are terminal dups. */ + if ( !(tree->flags & PF_TERM_DUP) && + !(tree->flags & PF_NAMED) && + !(tree->flags & PF_ARTIFICIAL) && + tree->child != 0 ) + { + vm_push( (Tree*)lel ); + lel = tree->child; + + if ( lel != 0 ) { + while ( lel != 0 ) { + vm_push( (Tree*)lel ); + lel = lel->next; + } + } + } + +backup: + if ( sp != root ) { + ParseTree *next = (ParseTree*)vm_pop(); + if ( next->next == lel ) { + /* Moving backwards. */ + lel = next; + + if ( !beenCommitted( lel ) ) + goto head; + } + else { + /* Moving upwards. */ + lel = next; + } + + goto backup; + } + + pdaRun->numRetry = 0; + assert( sp == root ); +} + +void commitFull( Program *prg, Tree **sp, PdaRun *pdaRun, long causeReduce ) +{ + debug( prg, REALM_PARSE, "running full commit\n" ); + + ParseTree *parseTree = pdaRun->stackTop; + Code *rcode = pdaRun->reverseCode.data + pdaRun->reverseCode.tabLen; + + /* The top level of the stack is linked right to left. This is the + * traversal order we need for committing. */ + while ( parseTree != 0 && !beenCommitted( parseTree ) ) { + commitKid( prg, pdaRun, sp, parseTree, &rcode, &causeReduce ); + parseTree = parseTree->next; + } + + /* We cannot always clear all the rcode here. We may need to backup over + * the parse statement. We depend on the context flag. */ + if ( !pdaRun->revertOn ) + rcodeDownrefAll( prg, sp, &pdaRun->reverseCode ); +} + +/* + * shift: retry goes into lower of shifted node. + * reduce: retry goes into upper of reduced node. + * shift-reduce: cannot be a retry + */ + +/* Stops on: + * PcrReduction + * PcrRevToken + * PcrRevReduction + */ +long parseToken( Program *prg, Tree **sp, PdaRun *pdaRun, + FsmRun *fsmRun, StreamImpl *is, long entry ) +{ + int pos; + unsigned int *action; + int rhsLen; + int owner; + int induceReject; + int indPos; + //LangElInfo *lelInfo = prg->rtd->lelInfo; + +switch ( entry ) { +case PcrStart: + + /* The scanner will send a null token if it can't find a token. */ + if ( pdaRun->parseInput == 0 ) + goto parseError; + + /* This will cause parseInput to be lost. This + * path should be traced. */ + if ( pdaRun->cs < 0 ) + return PcrDone; + + /* Record the state in the parse tree. */ + pdaRun->parseInput->state = pdaRun->cs; + +again: + if ( pdaRun->parseInput == 0 ) + goto _out; + + pdaRun->lel = pdaRun->parseInput; + pdaRun->curState = pdaRun->cs; + + if ( pdaRun->lel->id < pdaRun->tables->keys[pdaRun->curState<<1] || + pdaRun->lel->id > pdaRun->tables->keys[(pdaRun->curState<<1)+1] ) { + debug( prg, REALM_PARSE, "parse error, no transition 1\n" ); + pushBtPoint( prg, pdaRun ); + goto parseError; + } + + indPos = pdaRun->tables->offsets[pdaRun->curState] + + (pdaRun->lel->id - pdaRun->tables->keys[pdaRun->curState<<1]); + + owner = pdaRun->tables->owners[indPos]; + if ( owner != pdaRun->curState ) { + debug( prg, REALM_PARSE, "parse error, no transition 2\n" ); + pushBtPoint( prg, pdaRun ); + goto parseError; + } + + pos = pdaRun->tables->indicies[indPos]; + if ( pos < 0 ) { + debug( prg, REALM_PARSE, "parse error, no transition 3\n" ); + pushBtPoint( prg, pdaRun ); + goto parseError; + } + + /* Checking complete. */ + + induceReject = false; + pdaRun->cs = pdaRun->tables->targs[pos]; + action = pdaRun->tables->actions + pdaRun->tables->actInds[pos]; + if ( pdaRun->lel->retryLower ) + action += pdaRun->lel->retryLower; + + /* + * Shift + */ + + if ( *action & act_sb ) { + debug( prg, REALM_PARSE, "shifted: %s\n", + prg->rtd->lelInfo[pdaRun->lel->id].name ); + /* Consume. */ + pdaRun->parseInput = pdaRun->parseInput->next; + + pdaRun->lel->state = pdaRun->curState; + + /* If its a token then attach ignores and record it in the token list + * of the next ignore attachment to use. */ + if ( pdaRun->lel->id < prg->rtd->firstNonTermId ) { + if ( pdaRun->lel->causeReduce == 0 ) + attachRightIgnore( prg, sp, pdaRun, pdaRun->stackTop ); + } + + pdaRun->lel->next = pdaRun->stackTop; + pdaRun->stackTop = pdaRun->lel; + + /* If its a token then attach ignores and record it in the token list + * of the next ignore attachment to use. */ + if ( pdaRun->lel->id < prg->rtd->firstNonTermId ) { + attachLeftIgnore( prg, sp, pdaRun, pdaRun->lel ); + + Ref *ref = (Ref*)kidAllocate( prg ); + ref->kid = pdaRun->lel->shadow; + //treeUpref( pdaRun->tree ); + ref->next = pdaRun->tokenList; + pdaRun->tokenList = ref; + } + + if ( action[1] == 0 ) + pdaRun->lel->retryLower = 0; + else { + debug( prg, REALM_PARSE, "retry: %p\n", pdaRun->stackTop ); + pdaRun->lel->retryLower += 1; + assert( pdaRun->lel->retryUpper == 0 ); + /* FIXME: Has the retry already been counted? */ + pdaRun->numRetry += 1; + } + } + + /* + * Commit + */ + + if ( pdaRun->tables->commitLen[pos] != 0 ) { + long causeReduce = 0; + if ( pdaRun->parseInput != 0 ) { + if ( pdaRun->parseInput->flags & PF_HAS_RCODE ) + causeReduce = pdaRun->parseInput->causeReduce; + } + commitFull( prg, sp, pdaRun, causeReduce ); + } + + /* + * Reduce + */ + + if ( *action & act_rb ) { + int r, objectLength; + ParseTree *last, *child; + Kid *attrs; + Kid *dataLast, *dataChild; + + /* If there was shift don't attach again. */ + if ( !( *action & act_sb ) && pdaRun->lel->id < prg->rtd->firstNonTermId ) + attachRightIgnore( prg, sp, pdaRun, pdaRun->stackTop ); + + pdaRun->reduction = *action >> 2; + + if ( pdaRun->parseInput != 0 ) + pdaRun->parseInput->causeReduce += 1; + + Kid *value = kidAllocate( prg ); + value->tree = treeAllocate( prg ); + value->tree->refs = 1; + value->tree->id = prg->rtd->prodInfo[pdaRun->reduction].lhsId; + value->tree->prodNum = prg->rtd->prodInfo[pdaRun->reduction].prodNum; + + pdaRun->redLel = parseTreeAllocate( prg ); + pdaRun->redLel->id = prg->rtd->prodInfo[pdaRun->reduction].lhsId; + pdaRun->redLel->next = 0; + pdaRun->redLel->causeReduce = 0; + pdaRun->redLel->retryLower = 0; + pdaRun->redLel->shadow = value; + + /* Transfer. */ + pdaRun->redLel->retryUpper = pdaRun->lel->retryLower; + pdaRun->lel->retryLower = 0; + + /* Allocate the attributes. */ + objectLength = prg->rtd->lelInfo[pdaRun->redLel->id].objectLength; + attrs = allocAttrs( prg, objectLength ); + + /* Build the list of children. We will be giving up a reference when we + * detach parse tree and data tree, but gaining the reference when we + * put the children under the new data tree. No need to alter refcounts + * here. */ + rhsLen = prg->rtd->prodInfo[pdaRun->reduction].length; + child = last = 0; + dataChild = dataLast = 0; + for ( r = 0; r < rhsLen; r++ ) { + + /* The child. */ + child = pdaRun->stackTop; + dataChild = child->shadow; + + /* Pop. */ + pdaRun->stackTop = pdaRun->stackTop->next; + + /* Detach the parse tree from the data. */ + child->shadow = 0; + + /* Reverse list. */ + child->next = last; + dataChild->next = dataLast; + + /* Track last for reversal. */ + last = child; + dataLast = dataChild; + } + + pdaRun->redLel->child = child; + pdaRun->redLel->shadow->tree->child = kidListConcat( attrs, dataChild ); + + debug( prg, REALM_PARSE, "reduced: %s rhsLen %d\n", + prg->rtd->prodInfo[pdaRun->reduction].name, rhsLen ); + if ( action[1] == 0 ) + pdaRun->redLel->retryUpper = 0; + else { + pdaRun->redLel->retryUpper += 1; + assert( pdaRun->lel->retryLower == 0 ); + pdaRun->numRetry += 1; + debug( prg, REALM_PARSE, "retry: %p\n", pdaRun->redLel ); + } + + /* When the production is of zero length we stay in the same state. + * Otherwise we use the state stored in the first child. */ + pdaRun->cs = rhsLen == 0 ? pdaRun->curState : child->state; + + if ( prg->ctxDepParsing && prg->rtd->prodInfo[pdaRun->reduction].frameId >= 0 ) { + /* Frame info for reduction. */ + pdaRun->fi = &prg->rtd->frameInfo[prg->rtd->prodInfo[pdaRun->reduction].frameId]; + pdaRun->frameId = prg->rtd->prodInfo[pdaRun->reduction].frameId; + pdaRun->reject = false; + pdaRun->parsed = 0; + pdaRun->code = pdaRun->fi->codeWV; + +return PcrReduction; +case PcrReduction: + + if ( prg->induceExit ) + goto fail; + + /* If the lhs was stored and it changed then we need to restore the + * original upon backtracking, otherwise downref since we took a + * copy above. */ + if ( pdaRun->parsed != 0 ) { + if ( pdaRun->parsed != pdaRun->redLel->shadow->tree ) { + debug( prg, REALM_PARSE, "lhs tree was modified, adding a restore instruction\n" ); +// +// /* Make it into a parse tree. */ +// Tree *newPt = prepParseTree( prg, sp, pdaRun->redLel->tree ); +// treeDownref( prg, sp, pdaRun->redLel->tree ); +// +// /* Copy it in. */ +// pdaRun->redLel->tree = newPt; +// treeUpref( pdaRun->redLel->tree ); + + /* Add the restore instruct. */ + appendCode( &pdaRun->rcodeCollect, IN_RESTORE_LHS ); + appendWord( &pdaRun->rcodeCollect, (Word)pdaRun->parsed ); + appendCode( &pdaRun->rcodeCollect, SIZEOF_CODE + SIZEOF_WORD ); + } + else { + /* Not changed. Done with parsed. */ + treeDownref( prg, sp, pdaRun->parsed ); + } + pdaRun->parsed = 0; + } + + /* Pull out the reverse code, if any. */ + makeReverseCode( pdaRun ); + transferReverseCode( pdaRun, pdaRun->redLel ); + + /* Perhaps the execution environment is telling us we need to + * reject the reduction. */ + induceReject = pdaRun->reject; + } + + /* If the left hand side was replaced then the only parse algorithm + * data that is contained in it will the PF_HAS_RCODE flag. Everthing + * else will be in the original. This requires that we restore first + * when going backwards and when doing a commit. */ + + if ( induceReject ) { + debug( prg, REALM_PARSE, "error induced during reduction of %s\n", + prg->rtd->lelInfo[pdaRun->redLel->id].name ); + pdaRun->redLel->state = pdaRun->curState; + pdaRun->redLel->next = pdaRun->stackTop; + pdaRun->stackTop = pdaRun->redLel; + /* FIXME: What is the right argument here? */ + pushBtPoint( prg, pdaRun ); + goto parseError; + } + + pdaRun->redLel->next = pdaRun->parseInput; + pdaRun->parseInput = pdaRun->redLel; + } + + goto again; + +parseError: + debug( prg, REALM_PARSE, "hit error, backtracking\n" ); + + if ( pdaRun->numRetry == 0 ) { + debug( prg, REALM_PARSE, "out of retries failing parse\n" ); + goto fail; + } + + while ( 1 ) { + if ( pdaRun->onDeck ) { + debug( prg, REALM_BYTECODE, "dropping out for reverse code call\n" ); + + pdaRun->frameId = -1; + pdaRun->code = popReverseCode( &pdaRun->reverseCode ); + +return PcrReverse; +case PcrReverse: + + decrementSteps( pdaRun ); + } + else if ( pdaRun->checkNext ) { + pdaRun->checkNext = false; + + if ( pdaRun->next > 0 && pdaRun->tables->tokenRegions[pdaRun->next] != 0 ) { + debug( prg, REALM_PARSE, "found a new region\n" ); + pdaRun->numRetry -= 1; + pdaRun->cs = stackTopTarget( prg, pdaRun ); + pdaRun->nextRegionInd = pdaRun->next; + return PcrDone; + } + } + else if ( pdaRun->checkStop ) { + pdaRun->checkStop = false; + + if ( pdaRun->stop ) { + debug( prg, REALM_PARSE, "stopping the backtracking, steps is %d\n", pdaRun->steps ); + + pdaRun->cs = stackTopTarget( prg, pdaRun ); + goto _out; + } + } + else if ( pdaRun->parseInput != 0 ) { + /* Either we are dealing with a terminal that was + * shifted or a nonterminal that was reduced. */ + if ( pdaRun->parseInput->id < prg->rtd->firstNonTermId ) { + assert( pdaRun->parseInput->retryUpper == 0 ); + + if ( pdaRun->parseInput->retryLower != 0 ) { + debug( prg, REALM_PARSE, "found retry targ: %p\n", pdaRun->parseInput ); + + pdaRun->numRetry -= 1; + pdaRun->cs = pdaRun->parseInput->state; + goto again; + } + + if ( pdaRun->parseInput->causeReduce != 0 ) { + pdaRun->undoLel = pdaRun->stackTop; + + /* Check if we've arrived at the stack sentinal. This guard + * is here to allow us to initially set numRetry to one to + * cause the parser to backup all the way to the beginning + * when an error occurs. */ + if ( pdaRun->undoLel->next == 0 ) + break; + + /* Either we are dealing with a terminal that was + * shifted or a nonterminal that was reduced. */ + assert( !(pdaRun->stackTop->id < prg->rtd->firstNonTermId) ); + + debug( prg, REALM_PARSE, "backing up over non-terminal: %s\n", + prg->rtd->lelInfo[pdaRun->stackTop->id].name ); + + /* Pop the item from the stack. */ + pdaRun->stackTop = pdaRun->stackTop->next; + + /* Queue it as next parseInput item. */ + pdaRun->undoLel->next = pdaRun->parseInput; + pdaRun->parseInput = pdaRun->undoLel; + } + else { + long region = pdaRun->parseInput->region; + pdaRun->next = region > 0 ? region + 1 : 0; + pdaRun->checkNext = true; + pdaRun->checkStop = true; + + sendBack( prg, sp, pdaRun, fsmRun, is, pdaRun->parseInput ); + + pdaRun->parseInput = 0; + } + } + else if ( pdaRun->parseInput->flags & PF_HAS_RCODE ) { + debug( prg, REALM_PARSE, "tree has rcode, setting on deck\n" ); + pdaRun->onDeck = true; + pdaRun->parsed = 0; + + /* Only the RCODE flag was in the replaced lhs. All the rest is in + * the the original. We read it after restoring. */ + + pdaRun->parseInput->flags &= ~PF_HAS_RCODE; + } + else { + /* Remove it from the input queue. */ + pdaRun->undoLel = pdaRun->parseInput; + pdaRun->parseInput = pdaRun->parseInput->next; + + /* Extract children from the child list. */ + ParseTree *first = pdaRun->undoLel->child; + pdaRun->undoLel->child = 0; + + /* This will skip the ignores/attributes, etc. */ + Kid *dataFirst = treeExtractChild( prg, pdaRun->undoLel->shadow->tree ); + + /* Walk the child list and and push the items onto the parsing + * stack one at a time. */ + while ( first != 0 ) { + /* Get the next item ahead of time. */ + ParseTree *next = first->next; + Kid *dataNext = dataFirst->next; + + /* Push onto the stack. */ + first->next = pdaRun->stackTop; + pdaRun->stackTop = first; + + /* Reattach the data and the parse tree. */ + first->shadow = dataFirst; + + first = next; + dataFirst = dataNext; + } + + /* If there is an parseInput queued, this is one less reduction it has + * caused. */ + if ( pdaRun->parseInput != 0 ) + pdaRun->parseInput->causeReduce -= 1; + + if ( pdaRun->undoLel->retryUpper != 0 ) { + /* There is always an parseInput item here because reduce + * conflicts only happen on a lookahead character. */ + assert( pdaRun->parseInput != pdaRun->undoLel ); + assert( pdaRun->parseInput != 0 ); + assert( pdaRun->undoLel->retryLower == 0 ); + assert( pdaRun->parseInput->retryUpper == 0 ); + + /* Transfer the retry from undoLel to parseInput. */ + pdaRun->parseInput->retryLower = pdaRun->undoLel->retryUpper; + pdaRun->parseInput->retryUpper = 0; + pdaRun->parseInput->state = stackTopTarget( prg, pdaRun ); + } + + /* Free the reduced item. */ + treeDownref( prg, sp, pdaRun->undoLel->shadow->tree ); + kidFree( prg, pdaRun->undoLel->shadow ); + parseTreeFree( prg, pdaRun->undoLel ); + + /* If the stacktop had right ignore attached, detach now. */ + if ( pdaRun->stackTop->flags & PF_RIGHT_IL_ATTACHED ) + detachRightIgnore( prg, sp, pdaRun, pdaRun->stackTop ); + } + } + else if ( pdaRun->accumIgnore != 0 ) { + debug( prg, REALM_PARSE, "have accumulated ignore to undo\n" ); + + /* Send back any accumulated ignore tokens, then trigger error + * in the the parser. */ + ParseTree *ignore = pdaRun->accumIgnore; + pdaRun->accumIgnore = pdaRun->accumIgnore->next; + ignore->next = 0; + + long region = ignore->region; + pdaRun->next = region > 0 ? region + 1 : 0; + pdaRun->checkNext = true; + pdaRun->checkStop = true; + + sendBackIgnore( prg, sp, pdaRun, fsmRun, is, ignore ); + + treeDownref( prg, sp, ignore->shadow->tree ); + kidFree( prg, ignore->shadow ); + parseTreeFree( prg, ignore ); + } + else { + /* Now it is time to undo something. Pick an element from the top of + * the stack. */ + pdaRun->undoLel = pdaRun->stackTop; + + /* Check if we've arrived at the stack sentinal. This guard is + * here to allow us to initially set numRetry to one to cause the + * parser to backup all the way to the beginning when an error + * occurs. */ + if ( pdaRun->undoLel->next == 0 ) + break; + + /* Either we are dealing with a terminal that was + * shifted or a nonterminal that was reduced. */ + if ( pdaRun->stackTop->id < prg->rtd->firstNonTermId ) { + debug( prg, REALM_PARSE, "backing up over effective terminal: %s\n", + prg->rtd->lelInfo[pdaRun->stackTop->id].name ); + + /* Pop the item from the stack. */ + pdaRun->stackTop = pdaRun->stackTop->next; + + /* Queue it as next parseInput item. */ + pdaRun->undoLel->next = pdaRun->parseInput; + pdaRun->parseInput = pdaRun->undoLel; + + /* Pop from the token list. */ + Ref *ref = pdaRun->tokenList; + pdaRun->tokenList = ref->next; + kidFree( prg, (Kid*)ref ); + + assert( pdaRun->accumIgnore == 0 ); + detachLeftIgnore( prg, sp, pdaRun, fsmRun, pdaRun->parseInput ); + } + else { + debug( prg, REALM_PARSE, "backing up over non-terminal: %s\n", + prg->rtd->lelInfo[pdaRun->stackTop->id].name ); + + /* Pop the item from the stack. */ + pdaRun->stackTop = pdaRun->stackTop->next; + + /* Queue it as next parseInput item. */ + pdaRun->undoLel->next = pdaRun->parseInput; + pdaRun->parseInput = pdaRun->undoLel; + } + + /* Undo attach of right ignore. */ + if ( pdaRun->stackTop->flags & PF_RIGHT_IL_ATTACHED ) + detachRightIgnore( prg, sp, pdaRun, pdaRun->stackTop ); + } + } + +fail: + pdaRun->cs = -1; + pdaRun->parseError = 1; + + /* If we failed parsing on tree we must free it. The caller expected us to + * either consume it or send it back to the parseInput. */ + if ( pdaRun->parseInput != 0 ) { + //treeDownref( prg, sp, (Tree*)pdaRun->parseInput->tree ); + //ptKidFree( prg, pdaRun->parseInput ); + pdaRun->parseInput = 0; + } + + /* FIXME: do we still need to fall through here? A fail is permanent now, + * no longer called into again. */ + + return PcrDone; + +_out: + pdaRun->nextRegionInd = pdaRun->tables->tokenRegionInds[pdaRun->cs]; + +case PcrDone: +break; } + + return PcrDone; +} diff --git a/src/pdarun.h b/src/pdarun.h new file mode 100644 index 0000000..5feb683 --- /dev/null +++ b/src/pdarun.h @@ -0,0 +1,467 @@ +/* + * Copyright 2007-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __COLM_PDARUN_H +#define __COLM_PDARUN_H + +#include <colm/input.h> +#include <colm/defs.h> +#include <colm/tree.h> + +#ifdef __cplusplus +extern "C" { +#endif + +struct colm_program; + +#define MARK_SLOTS 32 + +typedef struct _FsmTables +{ + long *actions; + long *keyOffsets; + char *transKeys; + long *singleLengths; + long *rangeLengths; + long *indexOffsets; + long *transTargsWI; + long *transActionsWI; + long *toStateActions; + long *fromStateActions; + long *eofActions; + long *eofTargs; + long *entryByRegion; + + long numStates; + long numActions; + long numTransKeys; + long numSingleLengths; + long numRangeLengths; + long numIndexOffsets; + long numTransTargsWI; + long numTransActionsWI; + long numRegions; + + long startState; + long firstFinal; + long errorState; + + struct GenAction **actionSwitch; + long numActionSwitch; +} FsmTables; + +typedef struct _FsmRun +{ + FsmTables *tables; + + RunBuf *consumeBuf; + + /* FsmRun State. */ + long region, preRegion; + long cs, ncs, act; + char *start; + char *tokstart; + long tokend; + long toklen; + char *p, *pe; + + /* Bits. */ + char eof; + char returnResult; + char skipToklen; + + char *mark[MARK_SLOTS]; + long matchedToken; +} FsmRun; + +void undoStreamPull( StreamImpl *inputStream, const char *data, long length ); + +#if SIZEOF_LONG != 4 && SIZEOF_LONG != 8 + #error "SIZEOF_LONG contained an unexpected value" +#endif + +struct _Execution; + +typedef struct _RtCodeVect +{ + Code *data; + long tabLen; + long allocLen; + + /* FIXME: leak when freed. */ +} RtCodeVect; + +void listAddAfter( List *list, ListEl *prev_el, ListEl *new_el ); +void listAddBefore( List *list, ListEl *next_el, ListEl *new_el ); + +void listPrepend( List *list, ListEl *new_el ); +void listAppend( List *list, ListEl *new_el ); + +ListEl *listDetach( List *list, ListEl *el ); +ListEl *listDetachFirst(List *list ); +ListEl *listDetachLast(List *list ); + +long listLength(List *list); + +typedef struct _FunctionInfo +{ + const char *name; + long frameId; + long argSize; + long frameSize; +} FunctionInfo; + +/* + * Program Data. + */ + +typedef struct _PatConsInfo +{ + long offset; + long numBindings; +} PatConsInfo; + +typedef struct _PatConsNode +{ + long id; + long prodNum; + long next; + long child; + long bindId; + const char *data; + long length; + long leftIgnore; + long rightIgnore; + + /* Just match nonterminal, don't go inside. */ + unsigned char stop; +} PatConsNode; + +/* FIXME: should have a descriptor for object types to give the length. */ + +typedef struct _LangElInfo +{ + const char *name; + const char *xmlTag; + unsigned char repeat; + unsigned char list; + unsigned char literal; + unsigned char ignore; + + long frameId; + + long objectTypeId; + long ofiOffset; + long objectLength; + +// long contextTypeId; +// long contextLength; + + long termDupId; + long genericId; + long markId; + long captureAttr; + long numCaptureAttr; +} LangElInfo; + +typedef struct _ObjFieldInfo +{ + int typeId; +} ObjFieldInfo; + +typedef struct _ProdInfo +{ + unsigned long lhsId; + short prodNum; + long length; + const char *name; + long frameId; + unsigned char lhsUpref; + unsigned char *copy; + long copyLen; +} ProdInfo; + +/* Must match the LocalType enum. */ +#define LI_Tree 1 +#define LI_Iter 2 +#define LI_RevIter 3 +#define LI_UserIter 4 + +typedef struct _LocalInfo +{ + char type; + short offset; +} LocalInfo; + +typedef struct _FrameInfo +{ + Code *codeWV; + long codeLenWV; + Code *codeWC; + long codeLenWC; + LocalInfo *locals; + long localsLen; + long argSize; + long frameSize; +} FrameInfo; + +typedef struct _RegionInfo +{ + long defaultToken; + long eofFrameId; + int ciLelId; +} RegionInfo; + +typedef struct _CaptureAttr +{ + long mark_enter; + long mark_leave; + long offset; +} CaptureAttr; + +typedef struct _PdaTables +{ + /* Parser table data. */ + int *indicies; + int *owners; + int *keys; + unsigned int *offsets; + unsigned int *targs; + unsigned int *actInds; + unsigned int *actions; + int *commitLen; + int *tokenRegionInds; + int *tokenRegions; + int *tokenPreRegions; + + int numIndicies; + int numKeys; + int numStates; + int numTargs; + int numActInds; + int numActions; + int numCommitLen; + int numRegionItems; + int numPreRegionItems; +} PdaTables; + +typedef struct _PoolBlock +{ + void *data; + struct _PoolBlock *next; +} PoolBlock; + +typedef struct _PoolItem +{ + struct _PoolItem *next; +} PoolItem; + +typedef struct _PoolAlloc +{ + PoolBlock *head; + long nextel; + PoolItem *pool; + int sizeofT; +} PoolAlloc; + +typedef struct _PdaRun +{ + int numRetry; + ParseTree *stackTop; + Ref *tokenList; + int cs; + int nextRegionInd; + + PdaTables *tables; + int parserId; + + /* Reused. */ + RtCodeVect rcodeCollect; + RtCodeVect reverseCode; + + int stopParsing; + long stopTarget; + + ParseTree *accumIgnore; + + Kid *btPoint; + + struct Bindings *bindings; + + int revertOn; + + Tree *context; + + int stop; + int parseError; + + long steps; + long targetSteps; + + int onDeck; + + /* + * Data we added when refactoring the parsing engine into a coroutine. + */ + + ParseTree *parseInput; + FrameInfo *fi; + int reduction; + ParseTree *redLel; + int curState; + ParseTree *lel; + int triggerUndo; + + int tokenId; + Head *tokdata; + int frameId; + int next; + ParseTree *undoLel; + + int checkNext; + int checkStop; + + /* The lhs is sometimes saved before reduction actions in case it is + * replaced and we need to restore it on backtracking */ + Tree *parsed; + + int reject; + + /* Instruction pointer to use when we stop parsing and execute code. */ + Code *code; + + int rcBlockCount; + + Tree *parseErrorText; + + FsmRun *fsmRun; + FsmRun _fsmRun; +} PdaRun; + +void initPdaRun( struct colm_program *prg, PdaRun *pdaRun, PdaTables *tables, + int parserId, long stopTarget, int revertOn, Tree *context ); +void clearPdaRun( struct colm_program *prg, struct colm_tree **sp, PdaRun *pdaRun ); +void rtCodeVectReplace( RtCodeVect *vect, long pos, const Code *val, long len ); +void rtCodeVectEmpty( RtCodeVect *vect ); +void rtCodeVectRemove( RtCodeVect *vect, long pos, long len ); + +void initRtCodeVect( RtCodeVect *codeVect ); + +//inline static void remove( RtCodeVect *vect, long pos ); +inline static void appendCode( RtCodeVect *vect, const Code val ); +inline static void appendCode2( RtCodeVect *vect, const Code *val, long len ); +inline static void appendHalf( RtCodeVect *vect, Half half ); +inline static void appendWord( RtCodeVect *vect, Word word ); + +inline static void appendCode2( RtCodeVect *vect, const Code *val, long len ) +{ + rtCodeVectReplace( vect, vect->tabLen, val, len ); +} + +inline static void appendCode( RtCodeVect *vect, const Code val ) +{ + rtCodeVectReplace( vect, vect->tabLen, &val, 1 ); +} + +inline static void appendHalf( RtCodeVect *vect, Half half ) +{ + /* not optimal. */ + appendCode( vect, half & 0xff ); + appendCode( vect, (half>>8) & 0xff ); +} + +inline static void appendWord( RtCodeVect *vect, Word word ) +{ + /* not optimal. */ + appendCode( vect, word & 0xff ); + appendCode( vect, (word>>8) & 0xff ); + appendCode( vect, (word>>16) & 0xff ); + appendCode( vect, (word>>24) & 0xff ); + #if SIZEOF_LONG == 8 + appendCode( vect, (word>>32) & 0xff ); + appendCode( vect, (word>>40) & 0xff ); + appendCode( vect, (word>>48) & 0xff ); + appendCode( vect, (word>>56) & 0xff ); + #endif +} + +void incrementSteps( PdaRun *pdaRun ); +void decrementSteps( PdaRun *pdaRun ); + +int makeReverseCode( PdaRun *pdaRun ); +void transferReverseCode( PdaRun *pdaRun, ParseTree *tree ); + +void clearStreamImpl( struct colm_program *prg, Tree **sp, StreamImpl *inputStream ); +void initSourceStream( StreamImpl *in ); +void clearSourceStream( struct colm_program *prg, Tree **sp, StreamImpl *sourceStream ); + + +void clearContext( PdaRun *pdaRun, Tree **sp ); +Kid *extractIgnore( PdaRun *pdaRun ); +long stackTopTarget( struct colm_program *prg, PdaRun *pdaRun ); +void runCommit( PdaRun *pdaRun ); +int isParserStopFinished( PdaRun *pdaRun ); +void pdaRunMatch( PdaRun *pdaRun, Kid *tree, Kid *pattern ); + +/* Offset can be used to look at the next nextRegionInd. */ +int pdaRunGetNextRegion( PdaRun *pdaRun, int offset ); +int pdaRunGetNextPreRegion( PdaRun *pdaRun ); + +#define PcrStart 1 +#define PcrDone 2 +#define PcrReduction 3 +#define PcrGeneration 4 +#define PcrPreEof 5 +#define PcrReverse 6 + +long parseToken( struct colm_program *prg, Tree **sp, PdaRun *pdaRun, + FsmRun *fsmRun, StreamImpl *inputStream, long entry ); + +long undoParse( Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *inputStream, Tree *tree ); + +Head *streamPull( struct colm_program *prg, PdaRun *pdaRun, StreamImpl *is, long length ); +Head *stringAllocPointer( struct colm_program *prg, const char *data, long length ); + +void streamPushText( StreamImpl *inputStream, const char *data, long length ); +void streamPushTree( StreamImpl *inputStream, Tree *tree, int ignore ); +void streamPushStream( StreamImpl *inputStream, Tree *tree ); +void undoStreamPush( struct colm_program *prg, Tree **sp, StreamImpl *inputStream, long length ); +void undoStreamAppend( struct colm_program *prg, Tree **sp, StreamImpl *inputStream, struct colm_tree *tree, long length ); +Kid *makeTokenWithData( struct colm_program *prg, PdaRun *pdaRun, FsmRun *fsmRun, + StreamImpl *inputStream, int id, Head *tokdata ); + +void pushBinding( PdaRun *pdaRun, ParseTree *parseTree ); + +void executeGenerationAction( struct colm_program *prg, Tree **sp, FsmRun *fsmRun, PdaRun *pdaRun, + StreamImpl *inputStream, int frameId, Code *code, long id, Head *tokdata ); +Kid *extractIgnore( PdaRun *pdaRun ); +void clearIgnoreList( struct colm_program *prg, Tree **sp, Kid *kid ); +long parseLoop( struct colm_program *prg, Tree **sp, PdaRun *pdaRun, + StreamImpl *inputStream, long entry ); +Tree *getParsedRoot( PdaRun *pdaRun, int stop ); + +void resetToken( PdaRun *pdaRun ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/pool.c b/src/pool.c new file mode 100644 index 0000000..93cabd2 --- /dev/null +++ b/src/pool.c @@ -0,0 +1,307 @@ +/* + * Copyright 2010-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <string.h> +#include <stdlib.h> + +#include <colm/pdarun.h> +#include <colm/pool.h> +#include <colm/debug.h> + +void initPoolAlloc( PoolAlloc *poolAlloc, int sizeofT ) +{ + poolAlloc->head = 0; + poolAlloc->nextel = FRESH_BLOCK; + poolAlloc->pool = 0; + poolAlloc->sizeofT = sizeofT; +} + +void *poolAllocAllocate( PoolAlloc *poolAlloc ) +{ + //debug( REALM_POOL, "pool allocation\n" ); + +#ifdef POOL_MALLOC + void *res = malloc( poolAlloc->sizeofT ); + memset( res, 0, poolAlloc->sizeofT ); + return res; +#else + + void *newEl = 0; + if ( poolAlloc->pool == 0 ) { + if ( poolAlloc->nextel == FRESH_BLOCK ) { + PoolBlock *newBlock = (PoolBlock*)malloc( sizeof(PoolBlock) ); + newBlock->data = malloc( poolAlloc->sizeofT * FRESH_BLOCK ); + newBlock->next = poolAlloc->head; + poolAlloc->head = newBlock; + poolAlloc->nextel = 0; + } + + newEl = (char*)poolAlloc->head->data + poolAlloc->sizeofT * poolAlloc->nextel++; + } + else { + newEl = poolAlloc->pool; + poolAlloc->pool = poolAlloc->pool->next; + } + memset( newEl, 0, poolAlloc->sizeofT ); + return newEl; +#endif +} + +void poolAllocFree( PoolAlloc *poolAlloc, void *el ) +{ + #if 0 + /* Some sanity checking. Best not to normally run with this on. */ + char *p = (char*)el + sizeof(PoolItem*); + char *pe = (char*)el + sizeof(T); + for ( ; p < pe; p++ ) + assert( *p != 0xcc ); + memset( el, 0xcc, sizeof(T) ); + #endif + +#ifdef POOL_MALLOC + free( el ); +#else + PoolItem *pi = (PoolItem*) el; + pi->next = poolAlloc->pool; + poolAlloc->pool = pi; +#endif +} + +void poolAllocClear( PoolAlloc *poolAlloc ) +{ + PoolBlock *block = poolAlloc->head; + while ( block != 0 ) { + PoolBlock *next = block->next; + free( block->data ); + free( block ); + block = next; + } + + poolAlloc->head = 0; + poolAlloc->nextel = 0; + poolAlloc->pool = 0; +} + +long poolAllocNumLost( PoolAlloc *poolAlloc ) +{ + /* Count the number of items allocated. */ + long lost = 0; + PoolBlock *block = poolAlloc->head; + if ( block != 0 ) { + lost = poolAlloc->nextel; + block = block->next; + while ( block != 0 ) { + lost += FRESH_BLOCK; + block = block->next; + } + } + + /* Subtract. Items that are on the free list. */ + PoolItem *pi = poolAlloc->pool; + while ( pi != 0 ) { + lost -= 1; + pi = pi->next; + } + + return lost; +} + +/* + * Kid + */ + +Kid *kidAllocate( Program *prg ) +{ + return (Kid*) poolAllocAllocate( &prg->kidPool ); +} + +void kidFree( Program *prg, Kid *el ) +{ + poolAllocFree( &prg->kidPool, el ); +} + +void kidClear( Program *prg ) +{ + poolAllocClear( &prg->kidPool ); +} + +long kidNumLost( Program *prg ) +{ + return poolAllocNumLost( &prg->kidPool ); +} + +/* + * Tree + */ + +Tree *treeAllocate( Program *prg ) +{ + return (Tree*) poolAllocAllocate( &prg->treePool ); +} + +void treeFree( Program *prg, Tree *el ) +{ + poolAllocFree( &prg->treePool, el ); +} + +void treeClear( Program *prg ) +{ + poolAllocClear( &prg->treePool ); +} + +long treeNumLost( Program *prg ) +{ + return poolAllocNumLost( &prg->treePool ); +} + +/* + * ParseTree + */ + +ParseTree *parseTreeAllocate( Program *prg ) +{ + return (ParseTree*) poolAllocAllocate( &prg->parseTreePool ); +} + +void parseTreeFree( Program *prg, ParseTree *el ) +{ + poolAllocFree( &prg->parseTreePool, el ); +} + +void parseTreeClear( Program *prg ) +{ + poolAllocClear( &prg->parseTreePool ); +} + +long parseTreeNumLost( Program *prg ) +{ + return poolAllocNumLost( &prg->parseTreePool ); +} + +/* + * ListEl + */ + +ListEl *listElAllocate( Program *prg ) +{ + return (ListEl*) poolAllocAllocate( &prg->listElPool ); +} + +void listElFree( Program *prg, ListEl *el ) +{ + poolAllocFree( &prg->listElPool, el ); +} + +void listElClear( Program *prg ) +{ + poolAllocClear( &prg->listElPool ); +} + +long listElNumLost( Program *prg ) +{ + return poolAllocNumLost( &prg->listElPool ); +} + +/* + * MapEl + */ + +MapEl *mapElAllocate( Program *prg ) +{ + return (MapEl*) poolAllocAllocate( &prg->mapElPool ); +} + +void mapElFree( Program *prg, MapEl *el ) +{ + poolAllocFree( &prg->mapElPool, el ); +} + +void mapElClear( Program *prg ) +{ + poolAllocClear( &prg->mapElPool ); +} + +long mapElNumLost( Program *prg ) +{ + return poolAllocNumLost( &prg->mapElPool ); +} + +/* + * Head + */ + +Head *headAllocate( Program *prg ) +{ + return (Head*) poolAllocAllocate( &prg->headPool ); +} + +void headFree( Program *prg, Head *el ) +{ + poolAllocFree( &prg->headPool, el ); +} + +void headClear( Program *prg ) +{ + poolAllocClear( &prg->headPool ); +} + +long headNumLost( Program *prg ) +{ + return poolAllocNumLost( &prg->headPool ); +} + +/* + * Location + */ + +Location *locationAllocate( Program *prg ) +{ + return (Location*) poolAllocAllocate( &prg->locationPool ); +} + +void locationFree( Program *prg, Location *el ) +{ + poolAllocFree( &prg->locationPool, el ); +} + +void locationClear( Program *prg ) +{ + poolAllocClear( &prg->locationPool ); +} + +long locationNumLost( Program *prg ) +{ + return poolAllocNumLost( &prg->locationPool ); +} + +/* + * Stream + */ + +Stream *streamAllocate( Program *prg ) +{ + return (Stream*)mapElAllocate( prg ); +} + +void streamFree( Program *prg, Stream *stream ) +{ + mapElFree( prg, (MapEl*)stream ); +} diff --git a/src/pool.h b/src/pool.h new file mode 100644 index 0000000..3a547bb --- /dev/null +++ b/src/pool.h @@ -0,0 +1,83 @@ +/* + * Copyright 2010-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _POOL_H +#define _POOL_H + +/* Allocation, number of items. */ +#define FRESH_BLOCK 8128 + +#include <colm/pdarun.h> +#include <colm/map.h> +#include <colm/tree.h> + +#ifdef __cplusplus +extern "C" { +#endif + +void initPoolAlloc( PoolAlloc *poolAlloc, int sizeofT ); + +Kid *kidAllocate( Program *prg ); +void kidFree( Program *prg, Kid *el ); +void kidClear( Program *prg ); +long kidNumLost( Program *prg ); + +Tree *treeAllocate( Program *prg ); +void treeFree( Program *prg, Tree *el ); +void treeClear( Program *prg ); +long treeNumLost( Program *prg ); + +ParseTree *parseTreeAllocate( Program *prg ); +void parseTreeFree( Program *prg, ParseTree *el ); +void parseTreeClear( Program *prg ); +long parseTreeNumLost( Program *prg ); + +ListEl *listElAllocate( Program *prg ); +void listElFree( Program *prg, ListEl *el ); +void listElClear( Program *prg ); +long listElNumLost( Program *prg ); + +MapEl *mapElAllocate( Program *prg ); +void mapElFree( Program *prg, MapEl *el ); +void mapElClear( Program *prg ); +long mapElNumLost( Program *prg ); + +Head *headAllocate( Program *prg ); +void headFree( Program *prg, Head *el ); +void headClear( Program *prg ); +long headNumLost( Program *prg ); + +Location *locationAllocate( Program *prg ); +void locationFree( Program *prg, Location *el ); +void locationClear( Program *prg ); +long locationNumLost( Program *prg ); + +Stream *streamAllocate( Program *prg ); +void streamFree( Program *prg, Stream *stream ); + +/* Wrong place. */ +TreePair mapRemove( Program *prg, Map *map, Tree *key ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/program.c b/src/program.c new file mode 100644 index 0000000..21f197a --- /dev/null +++ b/src/program.c @@ -0,0 +1,379 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <colm/pdarun.h> +#include <colm/tree.h> +#include <colm/bytecode.h> +#include <colm/pool.h> +#include <colm/debug.h> +#include <colm/config.h> + +#include <alloca.h> +#include <sys/mman.h> +#include <string.h> +#include <assert.h> +#include <stdlib.h> + +#define VM_STACK_SIZE (8192) + +void clearGlobal( Program *prg, Tree **sp ) +{ + /* Downref all the fields in the global object. */ + int g; + for ( g = 0; g < prg->rtd->globalSize; g++ ) { + //assert( colm_get_attr( global, g )->refs == 1 ); + treeDownref( prg, sp, colm_get_attr( prg->global, g ) ); + } + + /* Free the global object. */ + if ( prg->rtd->globalSize > 0 ) + freeAttrs( prg, prg->global->child ); + treeFree( prg, prg->global ); +} + +void allocGlobal( Program *prg ) +{ + /* Alloc the global. */ + Tree *tree = treeAllocate( prg ); + tree->child = allocAttrs( prg, prg->rtd->globalSize ); + tree->refs = 1; + prg->global = tree; +} + +void vm_init( Program *prg ) +{ + StackBlock *b = malloc( sizeof(StackBlock) ); + b->data = malloc( sizeof(Tree*) * VM_STACK_SIZE ); + b->len = VM_STACK_SIZE; + b->offset = 0; + b->next = 0; + + prg->stackBlock = b; + + prg->sb_beg = prg->stackBlock->data; + prg->sb_end = prg->stackBlock->data + prg->stackBlock->len; + + prg->stackRoot = prg->sb_end; +} + +Tree **colm_vm_root( Program *prg ) +{ + return prg->stackRoot; +} + +Tree **vm_bs_add( Program *prg, Tree **sp, int n ) +{ + /* Close off the current block. */ + if ( prg->stackBlock != 0 ) { + prg->stackBlock->offset = sp - prg->stackBlock->data; + prg->sb_total += prg->stackBlock->len - prg->stackBlock->offset; + } + + if ( prg->reserve != 0 && prg->reserve->len >= n) { + StackBlock *b = prg->reserve; + b->next = prg->stackBlock; + b->offset = 0; + + prg->stackBlock = b; + prg->reserve = 0; + } + else { + StackBlock *b = malloc( sizeof(StackBlock) ); + int size = VM_STACK_SIZE; + if ( n > size ) + size = n; + b->next = prg->stackBlock; + b->data = malloc( sizeof(Tree*) * size ); + b->len = size; + b->offset = 0; + + prg->stackBlock = b; + } + + prg->sb_beg = prg->stackBlock->data; + prg->sb_end = prg->stackBlock->data + prg->stackBlock->len; + + return prg->sb_end; +} + +Tree **vm_bs_pop( Program *prg, Tree **sp, int n ) +{ + while ( 1 ) { + Tree **end = prg->stackBlock->data + prg->stackBlock->len; + int remaining = end - sp; + + /* Don't have to free this block. Remaining values to pop leave us + * inside it. */ + if ( n < remaining ) { + sp += n; + return sp; + } + + if ( prg->stackBlock->next == 0 ) { + /* Don't delete the sentinal stack block. Returns the end as in the + * creation of the first stack block. */ + return prg->sb_end; + } + + /* Clear any previous reserve. We are going to save this block as the + * reserve. */ + if ( prg->reserve != 0 ) { + free( prg->reserve->data ); + free( prg->reserve ); + } + + /* Pop the stack block. */ + StackBlock *b = prg->stackBlock; + prg->stackBlock = prg->stackBlock->next; + prg->reserve = b; + + /* Setup the bounds. Note that we restore the full block, which is + * necessary to honour any CONTIGUOUS statements that counted on it + * before a subsequent CONTIGUOUS triggered a new block. */ + prg->sb_beg = prg->stackBlock->data; + prg->sb_end = prg->stackBlock->data + prg->stackBlock->len; + + /* Update the total stack usage. */ + prg->sb_total -= prg->stackBlock->len - prg->stackBlock->offset; + + n -= remaining; + sp = prg->stackBlock->data + prg->stackBlock->offset; + } +} + +void vm_clear( Program *prg ) +{ + while ( prg->stackBlock != 0 ) { + StackBlock *b = prg->stackBlock; + prg->stackBlock = prg->stackBlock->next; + + free( b->data ); + free( b ); + } + + if ( prg->reserve != 0 ) { + free( prg->reserve->data ); + free( prg->reserve ); + } +} + +Tree *colm_return_val( struct colm_program *prg ) +{ + return prg->returnVal; +} + +void colm_set_debug( Program *prg, long activeRealm ) +{ + prg->activeRealm = activeRealm; +} + +Program *colm_new_program( RuntimeData *rtd ) +{ + Program *prg = malloc(sizeof(Program)); + memset( prg, 0, sizeof(Program) ); + + assert( sizeof(Int) <= sizeof(Tree) ); + assert( sizeof(Str) <= sizeof(Tree) ); + assert( sizeof(Pointer) <= sizeof(Tree) ); + assert( sizeof(Map) <= sizeof(MapEl) ); + assert( sizeof(List) <= sizeof(MapEl) ); + assert( sizeof(Stream) <= sizeof(MapEl) ); + assert( sizeof(Parser) <= sizeof(MapEl) ); + + prg->rtd = rtd; + prg->ctxDepParsing = 1; + + initPoolAlloc( &prg->kidPool, sizeof(Kid) ); + initPoolAlloc( &prg->treePool, sizeof(Tree) ); + initPoolAlloc( &prg->parseTreePool, sizeof(ParseTree) ); + initPoolAlloc( &prg->listElPool, sizeof(ListEl) ); + initPoolAlloc( &prg->mapElPool, sizeof(MapEl) ); + initPoolAlloc( &prg->headPool, sizeof(Head) ); + initPoolAlloc( &prg->locationPool, sizeof(Location) ); + + Int *trueInt = (Int*) treeAllocate( prg ); + trueInt->id = LEL_ID_BOOL; + trueInt->refs = 1; + trueInt->value = 1; + + Int *falseInt = (Int*) treeAllocate( prg ); + falseInt->id = LEL_ID_BOOL; + falseInt->refs = 1; + falseInt->value = 0; + + prg->trueVal = (Tree*)trueInt; + prg->falseVal = (Tree*)falseInt; + + /* Allocate the global variable. */ + allocGlobal( prg ); + + /* Allocate the VM stack. */ + vm_init( prg ); + return prg; +} + +void colm_run_program( Program *prg, int argc, const char **argv ) +{ + if ( prg->rtd->rootCodeLen == 0 ) + return; + + /* Make the arguments available to the program. */ + prg->argc = argc; + prg->argv = argv; + + Execution execution; + memset( &execution, 0, sizeof(execution) ); + execution.frameId = prg->rtd->rootFrameId; + + mainExecution( prg, &execution, prg->rtd->rootCode ); + + /* Clear the arg and stack. */ + prg->argc = 0; + prg->argv = 0; +} + +Tree *colm_run_func( struct colm_program *prg, int frameId, const char **params, int paramCount ) +{ + /* Make the arguments available to the program. */ + prg->argc = 0; + prg->argv = 0; + + Execution execution; + memset( &execution, 0, sizeof(execution) ); + + Tree **sp = prg->stackRoot; + + FrameInfo *fi = &prg->rtd->frameInfo[frameId]; + Code *code = fi->codeWC; + long stretch = fi->argSize + 4 + fi->frameSize; + vm_contiguous( stretch ); + + int p; + for ( p = 0; p < paramCount; p++ ) { + if ( params[p] == 0 ) { + vm_push( 0 ); + } + else { + Head *head = stringAllocPointer( prg, params[p], strlen(params[p]) ); + Tree *tree = constructString( prg, head ); + treeUpref( tree ); + vm_push( tree ); + } + } + + /* Set up the stack as if we have called. We allow a return value. */ + vm_push( 0 ); + vm_push( 0 ); + vm_push( 0 ); + vm_push( 0 ); + + execution.framePtr = vm_ptop(); + execution.frameId = frameId; + + /* Execution loop. */ + sp = executeCode( prg, &execution, sp, code ); + + treeDownref( prg, sp, prg->returnVal ); + prg->returnVal = vm_pop(); + + assert( sp == prg->stackRoot ); + + return prg->returnVal; +}; + +int colm_delete_program( Program *prg ) +{ + Tree **sp = prg->stackRoot; + int exitStatus = prg->exitStatus; + + treeDownref( prg, sp, prg->returnVal ); + clearGlobal( prg, sp ); + + /* Clear the heap. */ + Kid *a = prg->heap; + while ( a != 0 ) { + Kid *next = a->next; + treeDownref( prg, sp, a->tree ); + kidFree( prg, a ); + a = next; + } + + treeDownref( prg, sp, prg->trueVal ); + treeDownref( prg, sp, prg->falseVal ); + + treeDownref( prg, sp, (Tree*)prg->stdinVal ); + treeDownref( prg, sp, (Tree*)prg->stdoutVal ); + treeDownref( prg, sp, (Tree*)prg->stderrVal ); + + treeDownref( prg, sp, prg->error ); + +#if DEBUG + long kidLost = kidNumLost( prg ); + long treeLost = treeNumLost( prg ); + long parseTreeLost = parseTreeNumLost( prg ); + long listLost = listElNumLost( prg ); + long mapLost = mapElNumLost( prg ); + long headLost = headNumLost( prg ); + long locationLost = locationNumLost( prg ); + + if ( kidLost ) + message( "warning: lost kids: %ld\n", kidLost ); + + if ( treeLost ) + message( "warning: lost trees: %ld\n", treeLost ); + + if ( parseTreeLost ) + message( "warning: lost parse trees: %ld\n", parseTreeLost ); + + if ( listLost ) + message( "warning: lost listEls: %ld\n", listLost ); + + if ( mapLost ) + message( "warning: lost mapEls: %ld\n", mapLost ); + + if ( headLost ) + message( "warning: lost heads: %ld\n", headLost ); + + if ( locationLost ) + message( "warning: lost locations: %ld\n", locationLost ); +#endif + + kidClear( prg ); + treeClear( prg ); + headClear( prg ); + parseTreeClear( prg ); + listElClear( prg ); + mapElClear( prg ); + locationClear( prg ); + + RunBuf *rb = prg->allocRunBuf; + while ( rb != 0 ) { + RunBuf *next = rb->next; + free( rb ); + rb = next; + } + + vm_clear( prg ); + + free( prg ); + + return exitStatus; +} diff --git a/src/program.h b/src/program.h new file mode 100644 index 0000000..225dc14 --- /dev/null +++ b/src/program.h @@ -0,0 +1,148 @@ +/* + * Copyright 2007-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __COLM_PROGRAM_H +#define __COLM_PROGRAM_H + +#include <colm/pdarun.h> + +typedef struct ColmStackBlock +{ + Tree **data; + int len; + int offset; + struct ColmStackBlock *next; +} StackBlock; + +typedef struct colm_sections +{ + LangElInfo *lelInfo; + long numLangEls; + + ProdInfo *prodInfo; + long numProds; + + RegionInfo *regionInfo; + long numRegions; + + Code *rootCode; + long rootCodeLen; + long rootFrameId; + + FrameInfo *frameInfo; + long numFrames; + + FunctionInfo *functionInfo; + long numFunctions; + + PatConsInfo *patReplInfo; + long numPatterns; + + PatConsNode *patReplNodes; + long numPatternNodes; + + GenericInfo *genericInfo; + long numGenerics; + + long argvGenericId; + + const char **litdata; + long *litlen; + Head **literals; + long numLiterals; + + CaptureAttr *captureAttr; + long numCapturedAttr; + + FsmTables *fsmTables; + PdaTables *pdaTables; + int *startStates; + int *eofLelIds; + int *parserLelIds; + long numParsers; + + long globalSize; + + long firstNonTermId; + + long integerId; + long stringId; + long anyId; + long eofId; + long noTokenId; + + void (*fsmExecute)( struct _FsmRun *fsmRun, struct _StreamImpl *inputStream ); + void (*sendNamedLangEl)( struct colm_program *prg, Tree **tree, struct _PdaRun *pdaRun, + struct _FsmRun *fsmRun, struct _StreamImpl *inputStream ); + void (*initBindings)( struct _PdaRun *pdaRun ); + void (*popBinding)( struct _PdaRun *pdaRun, ParseTree *tree ); + +} RuntimeData; + + +typedef struct colm_program +{ + long activeRealm; + + int argc; + const char **argv; + + unsigned char ctxDepParsing; + RuntimeData *rtd; + Tree *global; + int induceExit; + int exitStatus; + + PoolAlloc kidPool; + PoolAlloc treePool; + PoolAlloc parseTreePool; + PoolAlloc listElPool; + PoolAlloc mapElPool; + PoolAlloc headPool; + PoolAlloc locationPool; + + Tree *trueVal; + Tree *falseVal; + + Kid *heap; + + Stream *stdinVal; + Stream *stdoutVal; + Stream *stderrVal; + + Tree *error; + + RunBuf *allocRunBuf; + + /* Current stack block limits. Changed when crossing block boundaries. */ + Tree **sb_beg; + Tree **sb_end; + long sb_total; + StackBlock *reserve; + + StackBlock *stackBlock; + Tree **stackRoot; + + /* Returned value for main program and any exported functions. */ + Tree *returnVal; +} Program; + +#endif diff --git a/src/redbuild.cc b/src/redbuild.cc new file mode 100644 index 0000000..257bc92 --- /dev/null +++ b/src/redbuild.cc @@ -0,0 +1,559 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include "global.h" +#include "redbuild.h" +#include "fsmgraph.h" +#include "redfsm.h" +#include "fsmcodegen.h" +#include <string.h> + +using namespace std; + +RedFsmBuild::RedFsmBuild( Compiler *pd, FsmGraph *fsm ) +: + pd(pd), + fsm(fsm), + nextActionTableId(0), + startState(-1), + errState(-1) +{ +} + +void RedFsmBuild::initActionList( unsigned long length ) +{ + redFsm->allActions = new GenAction[length]; + memset( redFsm->allActions, 0, sizeof(GenAction) * length ); + for ( unsigned long a = 0; a < length; a++ ) + redFsm->genActionList.append( redFsm->allActions+a ); +} + + +void RedFsmBuild::makeActionList() +{ + /* Determine which actions to write. */ + int nextActionId = 0; + for ( ActionList::Iter act = pd->actionList; act.lte(); act++ ) { + if ( act->numRefs() > 0 || act->numCondRefs > 0 ) + act->actionId = nextActionId++; + } + + initActionList( nextActionId ); + curAction = 0; + + for ( ActionList::Iter act = pd->actionList; act.lte(); act++ ) { + if ( act->actionId >= 0 ) + makeAction( act ); + } +} + +void RedFsmBuild::initActionTableList( unsigned long length ) +{ + redFsm->allActionTables = new RedAction[length]; +} + +void RedFsmBuild::initStateList( unsigned long length ) +{ + redFsm->allStates = new RedState[length]; + for ( unsigned long s = 0; s < length; s++ ) + redFsm->stateList.append( redFsm->allStates+s ); + + /* We get the start state as an offset, set the pointer now. */ + assert( startState >= 0 ); + redFsm->startState = redFsm->allStates + startState; + if ( errState >= 0 ) + redFsm->errState = redFsm->allStates + errState; + for ( EntryIdVect::Iter en = redFsm->entryPointIds; en.lte(); en++ ) + redFsm->entryPoints.insert( redFsm->allStates + *en ); + + /* The nextStateId is no longer used to assign state ids (they come in set + * from the frontend now), however generation code still depends on it. + * Should eventually remove this variable. */ + redFsm->nextStateId = redFsm->stateList.length(); +} + +void RedFsmBuild::addEntryPoint( int entryId, unsigned long entryState ) +{ + redFsm->entryPointIds.append( entryState ); + redFsm->redEntryMap.insert( entryId, entryState ); +} + +void RedFsmBuild::addRegionToEntry( int regionId, int entryId ) +{ + assert( regionId == redFsm->regionToEntry.length() ); + redFsm->regionToEntry.append( entryId ); +} + +void RedFsmBuild::initTransList( int snum, unsigned long length ) +{ + /* Could preallocate the out range to save time growing it. For now do + * nothing. */ +} + +void RedFsmBuild::newTrans( int snum, int tnum, Key lowKey, + Key highKey, long targ, long action ) +{ + /* Get the current state and range. */ + RedState *curState = redFsm->allStates + snum; + RedTransList &destRange = curState->outRange; + + if ( curState == redFsm->errState ) + return; + + /* Make the new transitions. */ + RedState *targState = targ >= 0 ? (redFsm->allStates + targ) : + redFsm->wantComplete ? redFsm->getErrorState() : 0; + RedAction *actionTable = action >= 0 ? (redFsm->allActionTables + action) : 0; + RedTrans *trans = redFsm->allocateTrans( targState, actionTable ); + RedTransEl transEl( lowKey, highKey, trans ); + + if ( redFsm->wantComplete ) { + /* If the machine is to be complete then we need to fill any gaps with + * the error transitions. */ + if ( destRange.length() == 0 ) { + /* Range is currently empty. */ + if ( keyOps->minKey < lowKey ) { + /* The first range doesn't start at the low end. */ + Key fillHighKey = lowKey; + fillHighKey.decrement(); + + /* Create the filler with the state's error transition. */ + RedTransEl newTel( keyOps->minKey, fillHighKey, redFsm->getErrorTrans() ); + destRange.append( newTel ); + } + } + else { + /* The range list is not empty, get the the last range. */ + RedTransEl *last = &destRange[destRange.length()-1]; + Key nextKey = last->highKey; + nextKey.increment(); + if ( nextKey < lowKey ) { + /* There is a gap to fill. Make the high key. */ + Key fillHighKey = lowKey; + fillHighKey.decrement(); + + /* Create the filler with the state's error transtion. */ + RedTransEl newTel( nextKey, fillHighKey, redFsm->getErrorTrans() ); + destRange.append( newTel ); + } + } + } + + /* Filler taken care of. Append the range. */ + destRange.append( RedTransEl( lowKey, highKey, trans ) ); +} + +void RedFsmBuild::finishTransList( int snum ) +{ + /* Get the current state and range. */ + RedState *curState = redFsm->allStates + snum; + RedTransList &destRange = curState->outRange; + + if ( curState == redFsm->errState ) + return; + + /* If building a complete machine we may need filler on the end. */ + if ( redFsm->wantComplete ) { + /* Check if there are any ranges already. */ + if ( destRange.length() == 0 ) { + /* Fill with the whole alphabet. */ + /* Add the range on the lower and upper bound. */ + RedTransEl newTel( keyOps->minKey, keyOps->maxKey, redFsm->getErrorTrans() ); + destRange.append( newTel ); + } + else { + /* Get the last and check for a gap on the end. */ + RedTransEl *last = &destRange[destRange.length()-1]; + if ( last->highKey < keyOps->maxKey ) { + /* Make the high key. */ + Key fillLowKey = last->highKey; + fillLowKey.increment(); + + /* Create the new range with the error trans and append it. */ + RedTransEl newTel( fillLowKey, keyOps->maxKey, redFsm->getErrorTrans() ); + destRange.append( newTel ); + } + } + } +} + +void RedFsmBuild::setId( int snum, int id ) +{ + RedState *curState = redFsm->allStates + snum; + curState->id = id; +} + +void RedFsmBuild::setEofTrans( int snum, int eofTarget, int actId ) +{ + RedState *curState = redFsm->allStates + snum; + RedState *targState = redFsm->allStates + eofTarget; + RedAction *eofAct = redFsm->allActionTables + actId; + curState->eofTrans = redFsm->allocateTrans( targState, eofAct ); +} + +void RedFsmBuild::setFinal( int snum ) +{ + RedState *curState = redFsm->allStates + snum; + curState->isFinal = true; +} + + +void RedFsmBuild::setStateActions( int snum, long toStateAction, + long fromStateAction, long eofAction ) +{ + RedState *curState = redFsm->allStates + snum; + if ( toStateAction >= 0 ) + curState->toStateAction = redFsm->allActionTables + toStateAction; + if ( fromStateAction >= 0 ) + curState->fromStateAction = redFsm->allActionTables + fromStateAction; + if ( eofAction >= 0 ) + curState->eofAction = redFsm->allActionTables + eofAction; +} + +void RedFsmBuild::closeMachine() +{ +} + + +void RedFsmBuild::initStateCondList( int snum, ulong length ) +{ + /* Could preallocate these, as we could with transitions. */ +} + +void RedFsmBuild::setForcedErrorState() +{ + redFsm->forcedErrorState = true; +} + +Key RedFsmBuild::findMaxKey() +{ + Key maxKey = keyOps->maxKey; + for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { + assert( st->outSingle.length() == 0 ); + assert( st->defTrans == 0 ); + + long rangeLen = st->outRange.length(); + if ( rangeLen > 0 ) { + Key highKey = st->outRange[rangeLen-1].highKey; + if ( highKey > maxKey ) + maxKey = highKey; + } + } + return maxKey; +} + + +void RedFsmBuild::makeActionTableList() +{ + /* Must first order the action tables based on their id. */ + int numTables = nextActionTableId; + RedActionTable **tables = new RedActionTable*[numTables]; + for ( ActionTableMap::Iter at = actionTableMap; at.lte(); at++ ) + tables[at->id] = at; + + initActionTableList( numTables ); + curActionTable = 0; + + for ( int t = 0; t < numTables; t++ ) { + long length = tables[t]->key.length(); + + /* Collect the action table. */ + RedAction *redAct = redFsm->allActionTables + curActionTable; + redAct->actListId = curActionTable; + redAct->key.setAsNew( length ); + + int pos = 0; + for ( ActionTable::Iter atel = tables[t]->key; atel.lte(); atel++ ) { + int actionId = atel->value->actionId; + redAct->key[pos].key = 0; + redAct->key[pos].value = redFsm->allActions+actionId; + pos += 1; + } + + /* Insert into the action table map. */ + redFsm->actionMap.insert( redAct ); + + curActionTable += 1; + + } + + delete[] tables; +} + +void RedFsmBuild::reduceActionTables() +{ + /* Reduce the actions tables to a set. */ + for ( StateList::Iter st = fsm->stateList; st.lte(); st++ ) { + RedActionTable *actionTable = 0; + + /* Reduce To State Actions. */ + if ( st->toStateActionTable.length() > 0 ) { + if ( actionTableMap.insert( st->toStateActionTable, &actionTable ) ) + actionTable->id = nextActionTableId++; + } + + /* Reduce From State Actions. */ + if ( st->fromStateActionTable.length() > 0 ) { + if ( actionTableMap.insert( st->fromStateActionTable, &actionTable ) ) + actionTable->id = nextActionTableId++; + } + + /* Reduce EOF actions. */ + if ( st->eofActionTable.length() > 0 ) { + if ( actionTableMap.insert( st->eofActionTable, &actionTable ) ) + actionTable->id = nextActionTableId++; + } + + /* Loop the transitions and reduce their actions. */ + for ( TransList::Iter trans = st->outList; trans.lte(); trans++ ) { + if ( trans->actionTable.length() > 0 ) { + if ( actionTableMap.insert( trans->actionTable, &actionTable ) ) + actionTable->id = nextActionTableId++; + } + } + } +} + +void RedFsmBuild::appendTrans( TransListVect &outList, Key lowKey, + Key highKey, FsmTrans *trans ) +{ + if ( trans->toState != 0 || trans->actionTable.length() > 0 ) + outList.append( TransEl( lowKey, highKey, trans ) ); +} + +void RedFsmBuild::makeTrans( Key lowKey, Key highKey, FsmTrans *trans ) +{ + /* First reduce the action. */ + RedActionTable *actionTable = 0; + if ( trans->actionTable.length() > 0 ) + actionTable = actionTableMap.find( trans->actionTable ); + + long targ = trans->toState == 0 ? -1 : trans->toState->alg.stateNum; + long action = actionTable == 0 ? -1 : actionTable->id; + + newTrans( curState, curTrans++, lowKey, highKey, targ, action ); +} + +void RedFsmBuild::makeTransList( FsmState *state ) +{ + TransListVect outList; + + /* If there is only are no ranges the task is simple. */ + if ( state->outList.length() > 0 ) { + /* Loop each source range. */ + for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) { + /* Reduce the transition. If it reduced to anything then add it. */ + appendTrans( outList, trans->lowKey, trans->highKey, trans ); + } + } + + long length = outList.length(); + initTransList( curState, length ); + curTrans = 0; + + for ( TransListVect::Iter tvi = outList; tvi.lte(); tvi++ ) + makeTrans( tvi->lowKey, tvi->highKey, tvi->value ); + finishTransList( curState ); +} + +void RedFsmBuild::newAction( int anum, char *name, int line, int col, Action *action ) +{ + redFsm->allActions[anum].actionId = anum; + redFsm->allActions[anum].name = name; + redFsm->allActions[anum].loc.line = line; + redFsm->allActions[anum].loc.col = col; + redFsm->allActions[anum].inlineList = action->inlineList; + redFsm->allActions[anum].objField = action->objField; + redFsm->allActions[anum].markType = action->markType; + redFsm->allActions[anum].markId = action->markId + 1; +} + +void RedFsmBuild::makeAction( Action *action ) +{ + int line = action->loc.line; + int col = action->loc.col; + + char *name = 0; + if ( action->name != 0 ) + name = action->name; + + newAction( curAction++, name, line, col, action ); +} + +void xmlEscapeHost( std::ostream &out, char *data, int len ) +{ + char *end = data + len; + while ( data != end ) { + switch ( *data ) { + case '<': out << "<"; break; + case '>': out << ">"; break; + case '&': out << "&"; break; + default: out << *data; break; + } + data += 1; + } +} + +void RedFsmBuild::makeStateActions( FsmState *state ) +{ + RedActionTable *toStateActions = 0; + if ( state->toStateActionTable.length() > 0 ) + toStateActions = actionTableMap.find( state->toStateActionTable ); + + RedActionTable *fromStateActions = 0; + if ( state->fromStateActionTable.length() > 0 ) + fromStateActions = actionTableMap.find( state->fromStateActionTable ); + + RedActionTable *eofActions = 0; + if ( state->eofActionTable.length() > 0 ) + eofActions = actionTableMap.find( state->eofActionTable ); + + if ( toStateActions != 0 || fromStateActions != 0 || eofActions != 0 ) { + long toStateAction = -1; + long fromStateAction = -1; + long eofAction = -1; + + if ( toStateActions != 0 ) + toStateAction = toStateActions->id; + if ( fromStateActions != 0 ) + fromStateAction = fromStateActions->id; + if ( eofActions != 0 ) + eofAction = eofActions->id; + + setStateActions( curState, toStateAction, + fromStateAction, eofAction ); + } +} + +void RedFsmBuild::makeStateList() +{ + /* Write the list of states. */ + long length = fsm->stateList.length(); + initStateList( length ); + curState = 0; + + for ( StateList::Iter st = fsm->stateList; st.lte(); st++ ) { + /* Both or neither should be set. */ + assert( !( (st->eofTarget != 0) xor (st->eofActionTable.length() > 0) ) ); + + makeStateActions( st ); + makeTransList( st ); + + setId( curState, st->alg.stateNum ); + if ( st->isFinState() ) + setFinal( curState ); + + /* If there is an eof target, make an eof transition. */ + if ( st->eofTarget != 0 ) { + /* Find the eof actions. */ + RedActionTable *eofActions = 0; + eofActions = actionTableMap.find( st->eofActionTable ); + setEofTrans( curState, st->eofTarget->alg.stateNum, eofActions->id ); + } + + curState += 1; + } +} + +void RedFsmBuild::makeEntryPoints() +{ + if ( fsm->lmRequiresErrorState ) + setForcedErrorState(); + + for ( EntryMap::Iter en = fsm->entryPoints; en.lte(); en++ ) { + /* Get the name instantiation from nameIndex. */ + FsmState *state = en->value; + long entry = state->alg.stateNum; + addEntryPoint( en->key, entry ); + } + + for ( RegionList::Iter reg = pd->regionList; reg.lte(); reg++ ) { + assert( reg->impl->regionNameInst != 0 ); + + TokenRegion *use = reg; + + if ( use->zeroLel != 0 ) + use = use->ignoreOnly; + + NameInst *regionName = use->impl->regionNameInst; + addRegionToEntry( reg->id, regionName->id ); + } +} + +void RedFsmBuild::makeMachine() +{ + /* Action tables. */ + reduceActionTables(); + + makeActionList(); + makeActionTableList(); + makeConditions(); + + /* Start state. */ + startState = fsm->startState->alg.stateNum; + + /* Error state. */ + if ( fsm->errState != 0 ) + errState = fsm->errState->alg.stateNum; + + makeEntryPoints(); + makeStateList(); +} + +void RedFsmBuild::makeConditions() +{ +} + +RedFsm *RedFsmBuild::reduceMachine() +{ + redFsm = new RedFsm(); + redFsm->wantComplete = true; + + /* Open the definition. */ + makeMachine(); + + /* Do this before distributing transitions out to singles and defaults + * makes life easier. */ + redFsm->maxKey = findMaxKey(); + + redFsm->assignActionLocs(); + + /* Find the first final state (The final state with the lowest id). */ + redFsm->findFirstFinState(); + + /* Choose default transitions and the single transition. */ + redFsm->chooseDefaultSpan(); + + /* Maybe do flat expand, otherwise choose single. */ + redFsm->chooseSingle(); + + /* Set up incoming transitions. */ + redFsm->setInTrans(); + + /* Anlayze Machine will find the final action reference counts, among + * other things. We will use these in reporting the usage + * of fsm directives in action code. */ + redFsm->analyzeMachine(); + + return redFsm; +} + diff --git a/src/redbuild.h b/src/redbuild.h new file mode 100644 index 0000000..eb2ce10 --- /dev/null +++ b/src/redbuild.h @@ -0,0 +1,158 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _FSMREDUCE_H +#define _FSMREDUCE_H + +#include <iostream> +#include "avltree.h" +#include "fsmgraph.h" +#include "parsedata.h" + +/* Forwards. */ +struct FsmTrans; +struct FsmGraph; +struct Compiler; +struct FsmCodeGen; +struct RedFsm; +struct GenCondSpace; +struct Condition; + +struct RedActionTable +: + public AvlTreeEl<RedActionTable> +{ + RedActionTable( const ActionTable &key ) + : + key(key), + id(0) + { } + + const ActionTable &getKey() + { return key; } + + ActionTable key; + int id; +}; + +typedef AvlTree<RedActionTable, ActionTable, CmpActionTable> ActionTableMap; + +struct NextRedTrans +{ + Key lowKey, highKey; + FsmTrans *trans; + FsmTrans *next; + + void load() { + if ( trans != 0 ) { + next = trans->next; + lowKey = trans->lowKey; + highKey = trans->highKey; + } + } + + NextRedTrans( FsmTrans *t ) { + trans = t; + load(); + } + + void increment() { + trans = next; + load(); + } +}; + +class RedFsmBuild +{ +public: + RedFsmBuild( Compiler *pd, FsmGraph *fsm ); + RedFsm *reduceMachine( ); + +private: + void appendTrans( TransListVect &outList, Key lowKey, Key highKey, FsmTrans *trans ); + void makeStateActions( FsmState *state ); + void makeStateList(); + void makeStateConditions( FsmState *state ); + + void initActionList( unsigned long length ); + void newAction( int anum, char *name, int line, int col, Action *action ); + void initActionTableList( unsigned long length ); + void initCondSpaceList( ulong length ); + void condSpaceItem( int cnum, long condActionId ); + void newCondSpace( int cnum, int condSpaceId, Key baseKey ); + void initStateCondList( int snum, ulong length ); + void addStateCond( int snum, Key lowKey, Key highKey, long condNum ); + void initStateList( unsigned long length ); + void addRegionToEntry( int regionId, int entryId ); + void addEntryPoint( int entryId, unsigned long entryState ); + void setId( int snum, int id ); + void initTransList( int snum, unsigned long length ); + void newTrans( int snum, int tnum, Key lowKey, Key highKey, + long targ, long act ); + void finishTransList( int snum ); + void setFinal( int snum ); + void setEofTrans( int snum, int eofTarget, int actId ); + void setStateActions( int snum, long toStateAction, + long fromStateAction, long eofAction ); + void setForcedErrorState(); + void closeMachine(); + Key findMaxKey(); + + void makeEntryPoints(); + void makeGetKeyExpr(); + void makeAccessExpr(); + void makeCurStateExpr(); + void makeConditions(); + void makeInlineList( InlineList *inlineList, InlineItem *context ); + void makeActionList(); + void makeActionTableList(); + void reduceTrans( FsmTrans *trans ); + void reduceActionTables(); + void makeTransList( FsmState *state ); + void makeTrans( Key lowKey, Key highKey, FsmTrans *defTrans ); + void makeAction( Action *action ); + void makeLmSwitch( InlineItem *item ); + void makeMachine(); + void makeActionExec( InlineItem *item ); + void makeActionExecTE( InlineItem *item ); + + Compiler *pd; + FsmGraph *fsm; + ActionTableMap actionTableMap; + int nextActionTableId; + + int startState; + int errState; + +public: + RedFsm *redFsm; + +private: + int curAction; + int curActionTable; + int curTrans; + int curState; + int curCondSpace; + int curStateCond; +}; + + +#endif /* _FSMREDUCE_H */ diff --git a/src/redfsm.cc b/src/redfsm.cc new file mode 100644 index 0000000..5ec075c --- /dev/null +++ b/src/redfsm.cc @@ -0,0 +1,1043 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <iostream> +#include <sstream> +#include "redfsm.h" +#include "avlmap.h" +#include "mergesort.h" +#include "fsmgraph.h" +#include "parsetree.h" + +using std::ostringstream; + +string nameOrLoc( GenAction *genAction ) +{ + if ( genAction->name != 0 ) + return string(genAction->name); + else { + ostringstream ret; + ret << genAction->loc.line << ":" << genAction->loc.col; + return ret.str(); + } +} + +RedFsm::RedFsm() +: + wantComplete(false), + forcedErrorState(false), + nextActionId(0), + nextTransId(0), + errState(0), + errTrans(0), + firstFinState(0), + numFinStates(0), + allActions(0), + allActionTables(0), + allStates(0), + bAnyToStateActions(false), + bAnyFromStateActions(false), + bAnyRegActions(false), + bAnyEofActions(false), + bAnyActionGotos(false), + bAnyActionCalls(false), + bAnyActionRets(false), + bAnyRegActionRets(false), + bAnyRegActionByValControl(false), + bAnyRegNextStmt(false), + bAnyRegCurStateRef(false), + bAnyRegBreak(false), + bAnyLmSwitchError(false), + bAnyConditions(false) +{ +} + +/* Does the machine have any actions. */ +bool RedFsm::anyActions() +{ + return actionMap.length() > 0; +} + +void RedFsm::depthFirstOrdering( RedState *state ) +{ + /* Nothing to do if the state is already on the list. */ + if ( state->onStateList ) + return; + + /* Doing depth first, put state on the list. */ + state->onStateList = true; + stateList.append( state ); + +// /* At this point transitions should only be in ranges. */ +// assert( state->outSingle.length() == 0 ); +// assert( state->defTrans == 0 ); + + /* Recurse on singles. */ + for ( RedTransList::Iter stel = state->outSingle; stel.lte(); stel++ ) { + if ( stel->value->targ != 0 ) + depthFirstOrdering( stel->value->targ ); + } + + /* Recurse on everything ranges. */ + for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ ) { + if ( rtel->value->targ != 0 ) + depthFirstOrdering( rtel->value->targ ); + } + + if ( state->defTrans != 0 && state->defTrans->targ != 0 ) + depthFirstOrdering( state->defTrans->targ ); +} + +/* Ordering states by transition connections. */ +void RedFsm::depthFirstOrdering() +{ + /* Init on state list flags. */ + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) + st->onStateList = false; + + /* Clear out the state list, we will rebuild it. */ + int stateListLen = stateList.length(); + stateList.abandon(); + + /* Add back to the state list from the start state and all other entry + * points. */ + depthFirstOrdering( startState ); + for ( RedStateSet::Iter en = entryPoints; en.lte(); en++ ) + depthFirstOrdering( *en ); + if ( forcedErrorState ) + depthFirstOrdering( errState ); + + /* Make sure we put everything back on. */ + assert( stateListLen == stateList.length() ); +} + +/* Assign state ids by appearance in the state list. */ +void RedFsm::sequentialStateIds() +{ + /* Table based machines depend on the state numbers starting at zero. */ + nextStateId = 0; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) + st->id = nextStateId++; +} + +/* Stable sort the states by final state status. */ +void RedFsm::sortStatesByFinal() +{ + /* Move forward through the list and throw final states onto the end. */ + RedState *state = 0; + RedState *next = stateList.head; + RedState *last = stateList.tail; + while ( state != last ) { + /* Move forward and load up the next. */ + state = next; + next = state->next; + + /* Throw to the end? */ + if ( state->isFinal ) { + stateList.detach( state ); + stateList.append( state ); + } + } +} + +/* Assign state ids by final state state status. */ +void RedFsm::sortStateIdsByFinal() +{ + /* Table based machines depend on this starting at zero. */ + nextStateId = 0; + + /* First pass to assign non final ids. */ + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + if ( ! st->isFinal ) + st->id = nextStateId++; + } + + /* Second pass to assign final ids. */ + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + if ( st->isFinal ) + st->id = nextStateId++; + } +} + +struct CmpStateById +{ + static int compare( RedState *st1, RedState *st2 ) + { + if ( st1->id < st2->id ) + return -1; + else if ( st1->id > st2->id ) + return 1; + else + return 0; + } +}; + +void RedFsm::sortByStateId() +{ + /* Make the array. */ + int pos = 0; + RedState **ptrList = new RedState*[stateList.length()]; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) + ptrList[pos++] = st; + + MergeSort<RedState*, CmpStateById> mergeSort; + mergeSort.sort( ptrList, stateList.length() ); + + stateList.abandon(); + for ( int st = 0; st < pos; st++ ) + stateList.append( ptrList[st] ); + + delete[] ptrList; +} + +/* Find the final state with the lowest id. */ +void RedFsm::findFirstFinState() +{ + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + if ( st->isFinal && (firstFinState == 0 || st->id < firstFinState->id) ) + firstFinState = st; + } +} + +void RedFsm::assignActionLocs() +{ + int nextLocation = 0; + for ( GenActionTableMap::Iter act = actionMap; act.lte(); act++ ) { + /* Store the loc, skip over the array and a null terminator. */ + act->location = nextLocation; + nextLocation += act->key.length() + 1; + } +} + +/* Check if we can extend the current range by displacing any ranges + * ahead to the singles. */ +bool RedFsm::canExtend( const RedTransList &list, int pos ) +{ + /* Get the transition that we want to extend. */ + RedTrans *extendTrans = list[pos].value; + + /* Look ahead in the transition list. */ + for ( int next = pos + 1; next < list.length(); pos++, next++ ) { + /* If they are not continuous then cannot extend. */ + Key nextKey = list[next].lowKey; + nextKey.decrement(); + if ( list[pos].highKey != nextKey ) + break; + + /* Check for the extenstion property. */ + if ( extendTrans == list[next].value ) + return true; + + /* If the span of the next element is more than one, then don't keep + * checking, it won't be moved to single. */ + unsigned long long nextSpan = keyOps->span( list[next].lowKey, list[next].highKey ); + if ( nextSpan > 1 ) + break; + } + return false; +} + +/* Move ranges to the singles list. */ +void RedFsm::moveTransToSingle( RedState *state ) +{ + RedTransList &range = state->outRange; + RedTransList &single = state->outSingle; + for ( int rpos = 0; rpos < range.length(); ) { + /* Check if this is a range we can extend. */ + if ( canExtend( range, rpos ) ) { + /* Transfer singles over. */ + while ( range[rpos].value != range[rpos+1].value ) { + /* Transfer the range to single. */ + single.append( range[rpos+1] ); + range.remove( rpos+1 ); + } + + /* Extend. */ + range[rpos].highKey = range[rpos+1].highKey; + range.remove( rpos+1 ); + } + /* Maybe move it to the singles. */ + else if ( keyOps->span( range[rpos].lowKey, range[rpos].highKey ) == 1 ) { + single.append( range[rpos] ); + range.remove( rpos ); + } + else { + /* Keeping it in the ranges. */ + rpos += 1; + } + } +} + +/* Look through ranges and choose suitable single character transitions. */ +void RedFsm::chooseSingle() +{ + /* Loop the states. */ + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + /* Rewrite the transition list taking out the suitable single + * transtions. */ + moveTransToSingle( st ); + } +} + +void RedFsm::makeFlat() +{ + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + st->condLowKey = 0; + st->condHighKey = 0; + + if ( st->outRange.length() == 0 ) { + st->lowKey = st->highKey = 0; + st->transList = 0; + } + else { + st->lowKey = st->outRange[0].lowKey; + st->highKey = st->outRange[st->outRange.length()-1].highKey; + unsigned long long span = keyOps->span( st->lowKey, st->highKey ); + st->transList = new RedTrans*[ span ]; + memset( st->transList, 0, sizeof(RedTrans*)*span ); + + for ( RedTransList::Iter trans = st->outRange; trans.lte(); trans++ ) { + unsigned long long base, trSpan; + base = keyOps->span( st->lowKey, trans->lowKey )-1; + trSpan = keyOps->span( trans->lowKey, trans->highKey ); + for ( unsigned long long pos = 0; pos < trSpan; pos++ ) + st->transList[base+pos] = trans->value; + } + + /* Fill in the gaps with the default transition. */ + for ( unsigned long long pos = 0; pos < span; pos++ ) { + if ( st->transList[pos] == 0 ) + st->transList[pos] = st->defTrans; + } + } + } +} + + +/* A default transition has been picked, move it from the outRange to the + * default pointer. */ +void RedFsm::moveToDefault( RedTrans *defTrans, RedState *state ) +{ + /* Rewrite the outRange, omitting any ranges that use + * the picked default. */ + RedTransList outRange; + for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ ) { + /* If it does not take the default, copy it over. */ + if ( rtel->value != defTrans ) + outRange.append( *rtel ); + } + + /* Save off the range we just created into the state's range. */ + state->outRange.transfer( outRange ); + + /* Store the default. */ + state->defTrans = defTrans; +} + +bool RedFsm::alphabetCovered( RedTransList &outRange ) +{ + /* Cannot cover without any out ranges. */ + if ( outRange.length() == 0 ) + return false; + + /* If the first range doesn't start at the the lower bound then the + * alphabet is not covered. */ + RedTransList::Iter rtel = outRange; + if ( keyOps->minKey < rtel->lowKey ) + return false; + + /* Check that every range is next to the previous one. */ + rtel.increment(); + for ( ; rtel.lte(); rtel++ ) { + Key highKey = rtel[-1].highKey; + highKey.increment(); + if ( highKey != rtel->lowKey ) + return false; + } + + /* The last must extend to the upper bound. */ + RedTransEl *last = &outRange[outRange.length()-1]; + if ( last->highKey < keyOps->maxKey ) + return false; + + return true; +} + +RedTrans *RedFsm::chooseDefaultSpan( RedState *state ) +{ + /* Make a set of transitions from the outRange. */ + RedTransPtrSet stateTransSet; + for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ ) + stateTransSet.insert( rtel->value ); + + /* For each transition in the find how many alphabet characters the + * transition spans. */ + unsigned long long *span = new unsigned long long[stateTransSet.length()]; + memset( span, 0, sizeof(unsigned long long) * stateTransSet.length() ); + for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ ) { + /* Lookup the transition in the set. */ + RedTrans **inSet = stateTransSet.find( rtel->value ); + int pos = inSet - stateTransSet.data; + span[pos] += keyOps->span( rtel->lowKey, rtel->highKey ); + } + + /* Find the max span, choose it for making the default. */ + RedTrans *maxTrans = 0; + unsigned long long maxSpan = 0; + for ( RedTransPtrSet::Iter rtel = stateTransSet; rtel.lte(); rtel++ ) { + if ( span[rtel.pos()] > maxSpan ) { + maxSpan = span[rtel.pos()]; + maxTrans = *rtel; + } + } + + delete[] span; + return maxTrans; +} + +/* Pick default transitions from ranges for the states. */ +void RedFsm::chooseDefaultSpan() +{ + /* Loop the states. */ + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + /* Only pick a default transition if the alphabet is covered. This + * avoids any transitions in the out range that go to error and avoids + * the need for an ERR state. */ + if ( alphabetCovered( st->outRange ) ) { + /* Pick a default transition by largest span. */ + RedTrans *defTrans = chooseDefaultSpan( st ); + + /* Rewrite the transition list taking out the transition we picked + * as the default and store the default. */ + moveToDefault( defTrans, st ); + } + } +} + +RedTrans *RedFsm::chooseDefaultGoto( RedState *state ) +{ + /* Make a set of transitions from the outRange. */ + RedTransPtrSet stateTransSet; + for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ ) { + if ( rtel->value->targ == state->next ) + return rtel->value; + } + return 0; +} + +void RedFsm::chooseDefaultGoto() +{ + /* Loop the states. */ + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + /* Pick a default transition. */ + RedTrans *defTrans = chooseDefaultGoto( st ); + if ( defTrans == 0 ) + defTrans = chooseDefaultSpan( st ); + + /* Rewrite the transition list taking out the transition we picked + * as the default and store the default. */ + moveToDefault( defTrans, st ); + } +} + +RedTrans *RedFsm::chooseDefaultNumRanges( RedState *state ) +{ + /* Make a set of transitions from the outRange. */ + RedTransPtrSet stateTransSet; + for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ ) + stateTransSet.insert( rtel->value ); + + /* For each transition in the find how many ranges use the transition. */ + int *numRanges = new int[stateTransSet.length()]; + memset( numRanges, 0, sizeof(int) * stateTransSet.length() ); + for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ ) { + /* Lookup the transition in the set. */ + RedTrans **inSet = stateTransSet.find( rtel->value ); + numRanges[inSet - stateTransSet.data] += 1; + } + + /* Find the max number of ranges. */ + RedTrans *maxTrans = 0; + int maxNumRanges = 0; + for ( RedTransPtrSet::Iter rtel = stateTransSet; rtel.lte(); rtel++ ) { + if ( numRanges[rtel.pos()] > maxNumRanges ) { + maxNumRanges = numRanges[rtel.pos()]; + maxTrans = *rtel; + } + } + + delete[] numRanges; + return maxTrans; +} + +void RedFsm::chooseDefaultNumRanges() +{ + /* Loop the states. */ + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + /* Pick a default transition. */ + RedTrans *defTrans = chooseDefaultNumRanges( st ); + + /* Rewrite the transition list taking out the transition we picked + * as the default and store the default. */ + moveToDefault( defTrans, st ); + } +} + +RedTrans *RedFsm::getErrorTrans( ) +{ + /* If the error trans has not been made aready, make it. */ + if ( errTrans == 0 ) { + /* This insert should always succeed since no transition created by + * the user can point to the error state. */ + errTrans = new RedTrans( getErrorState(), 0, nextTransId++ ); + RedTrans *inRes = transSet.insert( errTrans ); + assert( inRes != 0 ); + } + return errTrans; +} + +RedState *RedFsm::getErrorState() +{ + /* Something went wrong. An error state is needed but one was not supplied + * by the frontend. */ + assert( errState != 0 ); + return errState; +} + + +RedTrans *RedFsm::allocateTrans( RedState *targ, RedAction *action ) +{ + /* Create a reduced trans and look for it in the transiton set. */ + RedTrans redTrans( targ, action, 0 ); + RedTrans *inDict = transSet.find( &redTrans ); + if ( inDict == 0 ) { + inDict = new RedTrans( targ, action, nextTransId++ ); + transSet.insert( inDict ); + } + return inDict; +} + +void RedFsm::partitionFsm( int nparts ) +{ + /* At this point the states are ordered by a depth-first traversal. We + * will allocate to partitions based on this ordering. */ + this->nParts = nparts; + int partSize = stateList.length() / nparts; + int remainder = stateList.length() % nparts; + int numInPart = partSize; + int partition = 0; + if ( remainder-- > 0 ) + numInPart += 1; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + st->partition = partition; + + numInPart -= 1; + if ( numInPart == 0 ) { + partition += 1; + numInPart = partSize; + if ( remainder-- > 0 ) + numInPart += 1; + } + } +} + +void RedFsm::setInTrans() +{ + /* First pass counts the number of transitions. */ + for ( RedTransSet::Iter trans = transSet; trans.lte(); trans++ ) + trans->targ->numInTrans += 1; + + /* Pass over states to allocate the needed memory. Reset the counts so we + * can use them as the current size. */ + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + st->inTrans = new RedTrans*[st->numInTrans]; + st->numInTrans = 0; + } + + /* Second pass over transitions copies pointers into the in trans list. */ + for ( RedTransSet::Iter trans = transSet; trans.lte(); trans++ ) + trans->targ->inTrans[trans->targ->numInTrans++] = trans; +} + +void RedFsm::setValueLimits() +{ + maxSingleLen = 0; + maxRangeLen = 0; + maxKeyOffset = 0; + maxIndexOffset = 0; + maxActListId = 0; + maxActionLoc = 0; + maxActArrItem = 0; + maxSpan = 0; + maxCondSpan = 0; + maxFlatIndexOffset = 0; + maxCondOffset = 0; + maxCondLen = 0; + maxCondSpaceId = 0; + maxCondIndexOffset = 0; + + /* In both of these cases the 0 index is reserved for no value, so the max + * is one more than it would be if they started at 0. */ + maxIndex = transSet.length(); + maxCond = 0; + + /* The nextStateId - 1 is the last state id assigned. */ + maxState = nextStateId - 1; + + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + /* Maximum single length. */ + if ( st->outSingle.length() > maxSingleLen ) + maxSingleLen = st->outSingle.length(); + + /* Maximum range length. */ + if ( st->outRange.length() > maxRangeLen ) + maxRangeLen = st->outRange.length(); + + /* The key offset index offset for the state after last is not used, skip it.. */ + if ( ! st.last() ) { + maxKeyOffset += st->outSingle.length() + st->outRange.length()*2; + maxIndexOffset += st->outSingle.length() + st->outRange.length() + 1; + } + + /* Max key span. */ + if ( st->transList != 0 ) { + unsigned long long span = keyOps->span( st->lowKey, st->highKey ); + if ( span > maxSpan ) + maxSpan = span; + } + + /* Max flat index offset. */ + if ( ! st.last() ) { + if ( st->transList != 0 ) + maxFlatIndexOffset += keyOps->span( st->lowKey, st->highKey ); + maxFlatIndexOffset += 1; + } + } + + for ( GenActionTableMap::Iter at = actionMap; at.lte(); at++ ) { + /* Maximum id of action lists. */ + if ( at->actListId+1 > maxActListId ) + maxActListId = at->actListId+1; + + /* Maximum location of items in action array. */ + if ( at->location+1 > maxActionLoc ) + maxActionLoc = at->location+1; + + /* Maximum values going into the action array. */ + if ( at->key.length() > maxActArrItem ) + maxActArrItem = at->key.length(); + for ( GenActionTable::Iter item = at->key; item.lte(); item++ ) { + if ( item->value->actionId > maxActArrItem ) + maxActArrItem = item->value->actionId; + } + } +} + +void RedFsm::findFinalActionRefs() +{ + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + /* Rerence count out of single transitions. */ + for ( RedTransList::Iter rtel = st->outSingle; rtel.lte(); rtel++ ) { + if ( rtel->value->action != 0 ) { + rtel->value->action->numTransRefs += 1; + for ( GenActionTable::Iter item = rtel->value->action->key; item.lte(); item++ ) + item->value->numTransRefs += 1; + } + } + + /* Reference count out of range transitions. */ + for ( RedTransList::Iter rtel = st->outRange; rtel.lte(); rtel++ ) { + if ( rtel->value->action != 0 ) { + rtel->value->action->numTransRefs += 1; + for ( GenActionTable::Iter item = rtel->value->action->key; item.lte(); item++ ) + item->value->numTransRefs += 1; + } + } + + /* Reference count default transition. */ + if ( st->defTrans != 0 && st->defTrans->action != 0 ) { + st->defTrans->action->numTransRefs += 1; + for ( GenActionTable::Iter item = st->defTrans->action->key; item.lte(); item++ ) + item->value->numTransRefs += 1; + } + + /* Reference count to state actions. */ + if ( st->toStateAction != 0 ) { + st->toStateAction->numToStateRefs += 1; + for ( GenActionTable::Iter item = st->toStateAction->key; item.lte(); item++ ) + item->value->numToStateRefs += 1; + } + + /* Reference count from state actions. */ + if ( st->fromStateAction != 0 ) { + st->fromStateAction->numFromStateRefs += 1; + for ( GenActionTable::Iter item = st->fromStateAction->key; item.lte(); item++ ) + item->value->numFromStateRefs += 1; + } + + /* Reference count EOF actions. */ + if ( st->eofAction != 0 ) { + st->eofAction->numEofRefs += 1; + for ( GenActionTable::Iter item = st->eofAction->key; item.lte(); item++ ) + item->value->numEofRefs += 1; + } + } +} + +void RedFsm::analyzeAction( GenAction *act, InlineList *inlineList ) +{ + for ( InlineList::Iter item = *inlineList; item.lte(); item++ ) { + /* Check for various things in regular actions. */ + if ( act->numTransRefs > 0 || act->numToStateRefs > 0 || + act->numFromStateRefs > 0 || act->numEofRefs > 0 ) + { + if ( item->type == InlineItem::LmSwitch && + item->tokenRegion->lmSwitchHandlesError ) + { + bAnyLmSwitchError = true; + } + } + + if ( item->children != 0 ) + analyzeAction( act, item->children ); + } +} + +void RedFsm::analyzeActionList( RedAction *redAct, InlineList *inlineList ) +{ + for ( InlineList::Iter item = *inlineList; item.lte(); item++ ) { + if ( item->children != 0 ) + analyzeActionList( redAct, item->children ); + } +} + +/* Assign ids to referenced actions. */ +void RedFsm::assignActionIds() +{ + int nextActionId = 0; + for ( GenActionList::Iter act = genActionList; act.lte(); act++ ) { + /* Only ever interested in referenced actions. */ + if ( numRefs( act ) > 0 ) + act->actionId = nextActionId++; + } +} + +/* Gather various info on the machine. */ +void RedFsm::analyzeMachine() +{ + /* Find the true count of action references. */ + findFinalActionRefs(); + + /* Check if there are any calls in action code. */ + for ( GenActionList::Iter act = genActionList; act.lte(); act++ ) { + /* Record the occurrence of various kinds of actions. */ + if ( act->numToStateRefs > 0 ) + bAnyToStateActions = true; + if ( act->numFromStateRefs > 0 ) + bAnyFromStateActions = true; + if ( act->numEofRefs > 0 ) + bAnyEofActions = true; + if ( act->numTransRefs > 0 ) + bAnyRegActions = true; + + /* Recurse through the action's parse tree looking for various things. */ + analyzeAction( act, act->inlineList ); + } + + /* Analyze reduced action lists. */ + for ( GenActionTableMap::Iter redAct = actionMap; redAct.lte(); redAct++ ) { + for ( GenActionTable::Iter act = redAct->key; act.lte(); act++ ) + analyzeActionList( redAct, act->value->inlineList ); + } + + /* Find states that have transitions with actions that have next + * statements. */ + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + /* Check any actions out of outSinge. */ + for ( RedTransList::Iter rtel = st->outSingle; rtel.lte(); rtel++ ) { + if ( rtel->value->action != 0 && rtel->value->action->anyCurStateRef() ) + st->bAnyRegCurStateRef = true; + } + + /* Check any actions out of outRange. */ + for ( RedTransList::Iter rtel = st->outRange; rtel.lte(); rtel++ ) { + if ( rtel->value->action != 0 && rtel->value->action->anyCurStateRef() ) + st->bAnyRegCurStateRef = true; + } + + /* Check any action out of default. */ + if ( st->defTrans != 0 && st->defTrans->action != 0 && + st->defTrans->action->anyCurStateRef() ) + st->bAnyRegCurStateRef = true; + } + + /* Assign ids to actions that are referenced. */ + assignActionIds(); + + /* Set the maximums of various values used for deciding types. */ + setValueLimits(); +} + +int transAction( RedTrans *trans ) +{ + int retAct = 0; + if ( trans->action != 0 ) + retAct = trans->action->location+1; + return retAct; +} + +int toStateAction( RedState *state ) +{ + int act = 0; + if ( state->toStateAction != 0 ) + act = state->toStateAction->location+1; + return act; +} + +int fromStateAction( RedState *state ) +{ + int act = 0; + if ( state->fromStateAction != 0 ) + act = state->fromStateAction->location+1; + return act; +} + +int eofAction( RedState *state ) +{ + int act = 0; + if ( state->eofAction != 0 ) + act = state->eofAction->location+1; + return act; +} + + +FsmTables *RedFsm::makeFsmTables() +{ + /* The fsm runtime needs states sorted by id. */ + sortByStateId(); + + int pos, curKeyOffset, curIndOffset; + FsmTables *fsmTables = new FsmTables; + fsmTables->numStates = stateList.length(); + + /* + * actions + */ + + fsmTables->numActions = 1; + for ( GenActionTableMap::Iter act = actionMap; act.lte(); act++ ) + fsmTables->numActions += 1 + act->key.length(); + + pos = 0; + fsmTables->actions = new long[fsmTables->numActions]; + fsmTables->actions[pos++] = 0; + for ( GenActionTableMap::Iter act = actionMap; act.lte(); act++ ) { + fsmTables->actions[pos++] = act->key.length(); + for ( GenActionTable::Iter item = act->key; item.lte(); item++ ) + fsmTables->actions[pos++] = item->value->actionId; + } + + /* + * keyOffset + */ + pos = 0, curKeyOffset = 0; + fsmTables->keyOffsets = new long[fsmTables->numStates]; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + /* Store the current offset. */ + fsmTables->keyOffsets[pos++] = curKeyOffset; + + /* Move the key offset ahead. */ + curKeyOffset += st->outSingle.length() + st->outRange.length()*2; + } + + /* + * transKeys + */ + fsmTables->numTransKeys = 0; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + fsmTables->numTransKeys += st->outSingle.length(); + fsmTables->numTransKeys += 2 * st->outRange.length(); + } + + pos = 0; + fsmTables->transKeys = new char[fsmTables->numTransKeys]; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + for ( RedTransList::Iter stel = st->outSingle; stel.lte(); stel++ ) + fsmTables->transKeys[pos++] = stel->lowKey.getVal(); + for ( RedTransList::Iter rtel = st->outRange; rtel.lte(); rtel++ ) { + fsmTables->transKeys[pos++] = rtel->lowKey.getVal(); + fsmTables->transKeys[pos++] = rtel->highKey.getVal(); + } + } + + /* + * singleLengths + */ + pos = 0; + fsmTables->singleLengths = new long[fsmTables->numStates]; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) + fsmTables->singleLengths[pos++] = st->outSingle.length(); + + /* + * rangeLengths + */ + pos = 0; + fsmTables->rangeLengths = new long[fsmTables->numStates]; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) + fsmTables->rangeLengths[pos++] = st->outRange.length(); + + /* + * indexOffsets + */ + pos = 0, curIndOffset = 0; + fsmTables->indexOffsets = new long[fsmTables->numStates]; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + fsmTables->indexOffsets[pos++] = curIndOffset; + + curIndOffset += st->outSingle.length() + st->outRange.length(); + if ( st->defTrans != 0 ) + curIndOffset += 1; + } + + /* + * transTargsWI + */ + fsmTables->numTransTargsWI = 0; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + fsmTables->numTransTargsWI += st->outSingle.length(); + fsmTables->numTransTargsWI += st->outRange.length(); + if ( st->defTrans != 0 ) + fsmTables->numTransTargsWI += 1; + } + + pos = 0; + fsmTables->transTargsWI = new long[fsmTables->numTransTargsWI]; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + for ( RedTransList::Iter stel = st->outSingle; stel.lte(); stel++ ) + fsmTables->transTargsWI[pos++] = stel->value->targ->id; + + for ( RedTransList::Iter rtel = st->outRange; rtel.lte(); rtel++ ) + fsmTables->transTargsWI[pos++] = rtel->value->targ->id; + + if ( st->defTrans != 0 ) + fsmTables->transTargsWI[pos++] = st->defTrans->targ->id; + } + + /* + * transActionsWI + */ + fsmTables->numTransActionsWI = 0; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + fsmTables->numTransActionsWI += st->outSingle.length(); + fsmTables->numTransActionsWI += st->outRange.length(); + if ( st->defTrans != 0 ) + fsmTables->numTransActionsWI += 1; + } + + pos = 0; + fsmTables->transActionsWI = new long[fsmTables->numTransActionsWI]; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + for ( RedTransList::Iter stel = st->outSingle; stel.lte(); stel++ ) + fsmTables->transActionsWI[pos++] = transAction( stel->value ); + + for ( RedTransList::Iter rtel = st->outRange; rtel.lte(); rtel++ ) + fsmTables->transActionsWI[pos++] = transAction( rtel->value ); + + if ( st->defTrans != 0 ) + fsmTables->transActionsWI[pos++] = transAction( st->defTrans ); + } + + /* + * toStateActions + */ + pos = 0; + fsmTables->toStateActions = new long[fsmTables->numStates]; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) + fsmTables->toStateActions[pos++] = toStateAction( st ); + + /* + * fromStateActions + */ + pos = 0; + fsmTables->fromStateActions = new long[fsmTables->numStates]; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) + fsmTables->fromStateActions[pos++] = fromStateAction( st ); + + /* + * eofActions + */ + pos = 0; + fsmTables->eofActions = new long[fsmTables->numStates]; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) + fsmTables->eofActions[pos++] = eofAction( st ); + + /* + * eofTargs + */ + pos = 0; + fsmTables->eofTargs = new long[fsmTables->numStates]; + for ( RedStateList::Iter st = stateList; st.lte(); st++ ) { + int targ = -1; + if ( st->eofTrans != 0 ) + targ = st->eofTrans->targ->id; + fsmTables->eofTargs[pos++] = targ; + } + + /* Start state. */ + fsmTables->startState = startState->id; + + /* First final state. */ + fsmTables->firstFinal = ( firstFinState != 0 ) ? + firstFinState->id : nextStateId; + + /* The error state. */ + fsmTables->errorState = ( errState != 0 ) ? + errState->id : -1; + + /* The array pointing to actions. */ + pos = 0; + fsmTables->numActionSwitch = genActionList.length(); + fsmTables->actionSwitch = new GenAction*[fsmTables->numActionSwitch]; + for ( GenActionList::Iter act = genActionList; act.lte(); act++ ) + fsmTables->actionSwitch[pos++] = act; + + /* + * entryByRegion + */ + + fsmTables->numRegions = regionToEntry.length()+1; + fsmTables->entryByRegion = new long[fsmTables->numRegions]; + fsmTables->entryByRegion[0] = fsmTables->errorState; + + pos = 1; + for ( RegionToEntry::Iter en = regionToEntry; en.lte(); en++ ) { + /* Find the entry state from the entry id. */ + RedEntryMapEl *entryMapEl = redEntryMap.find( *en ); + + /* Save it off. */ + fsmTables->entryByRegion[pos++] = entryMapEl != 0 ? entryMapEl->value + : fsmTables->errorState; + } + + return fsmTables; +} + + diff --git a/src/redfsm.h b/src/redfsm.h new file mode 100644 index 0000000..1858fe8 --- /dev/null +++ b/src/redfsm.h @@ -0,0 +1,475 @@ +/* + * Copyright 2006-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _REDFSM_H +#define _REDFSM_H + +#include <assert.h> +#include <string.h> +#include <string> +#include "keyops.h" +#include "vector.h" +#include "dlist.h" +#include "compare.h" +#include "bstmap.h" +#include "bstset.h" +#include "avlmap.h" +#include "avltree.h" +#include "avlbasic.h" +#include "mergesort.h" +#include "sbstmap.h" +#include "sbstset.h" +#include "sbsttable.h" +#include "global.h" +#include "pdarun.h" + +#define TRANS_ERR_TRANS 0 +#define STATE_ERR_STATE 0 +#define FUNC_NO_FUNC 0 + +using std::string; + +struct RedState; +struct InlineList; +struct Compiler; +struct ObjectField; + +/* Element in list of actions. Contains the string for the code to exectute. */ +struct GenAction +{ + /* Data collected during parse. */ + InputLoc loc; + char *name; + InlineList *inlineList; + int actionId; + MarkType markType; + ObjectField *objField; + long markId; + + int numTransRefs; + int numToStateRefs; + int numFromStateRefs; + int numEofRefs; + + GenAction *prev, *next; +}; + +typedef DList<GenAction> GenActionList; +string nameOrLoc( GenAction *genAction ); + +/* Number of references in the final machine. */ +inline int numRefs( GenAction *genAction ) +{ + return genAction->numTransRefs + + genAction->numToStateRefs + + genAction->numFromStateRefs + + genAction->numEofRefs; +} + + +/* Forwards. */ +struct RedState; +struct FsmState; + +/* Transistion GenAction Element. */ +typedef SBstMapEl< int, GenAction* > GenActionTableEl; + +/* Transition GenAction Table. */ +struct GenActionTable + : public SBstMap< int, GenAction*, CmpOrd<int> > +{ + void setAction( int ordering, GenAction *action ); + void setActions( int *orderings, GenAction **actions, int nActs ); + void setActions( const GenActionTable &other ); +}; + +/* Compare of a whole action table element (key & value). */ +struct GenCmpActionTableEl +{ + static int compare( const GenActionTableEl &action1, + const GenActionTableEl &action2 ) + { + if ( action1.key < action2.key ) + return -1; + else if ( action1.key > action2.key ) + return 1; + else if ( action1.value < action2.value ) + return -1; + else if ( action1.value > action2.value ) + return 1; + return 0; + } +}; + +/* Compare for GenActionTable. */ +typedef CmpSTable< GenActionTableEl, GenCmpActionTableEl > GenCmpActionTable; + +/* Set of states. */ +typedef BstSet<RedState*> RedStateSet; +typedef BstSet<int> IntSet; + +/* Reduced action. */ +struct RedAction +: + public AvlTreeEl<RedAction> +{ + RedAction( ) + : + key(), + eofRefs(0), + numTransRefs(0), + numToStateRefs(0), + numFromStateRefs(0), + numEofRefs(0), + bAnyNextStmt(false), + bAnyCurStateRef(false), + bAnyBreakStmt(false) + { } + + const GenActionTable &getKey() + { return key; } + + GenActionTable key; + int actListId; + int location; + IntSet *eofRefs; + + /* Number of references in the final machine. */ + bool numRefs() + { return numTransRefs + numToStateRefs + numFromStateRefs + numEofRefs; } + int numTransRefs; + int numToStateRefs; + int numFromStateRefs; + int numEofRefs; + + bool anyNextStmt() { return bAnyNextStmt; } + bool anyCurStateRef() { return bAnyCurStateRef; } + bool anyBreakStmt() { return bAnyBreakStmt; } + + bool bAnyNextStmt; + bool bAnyCurStateRef; + bool bAnyBreakStmt; +}; +typedef AvlTree<RedAction, GenActionTable, GenCmpActionTable> GenActionTableMap; + +/* Reduced transition. */ +struct RedTrans +: + public AvlTreeEl<RedTrans> +{ + RedTrans( RedState *targ, RedAction *action, int id ) + : targ(targ), action(action), id(id), labelNeeded(true) { } + + RedState *targ; + RedAction *action; + int id; + bool partitionBoundary; + bool labelNeeded; +}; + +/* Compare of transitions for the final reduction of transitions. Comparison + * is on target and the pointer to the shared action table. It is assumed that + * when this is used the action tables have been reduced. */ +struct CmpRedTrans +{ + static int compare( const RedTrans &t1, const RedTrans &t2 ) + { + if ( t1.targ < t2.targ ) + return -1; + else if ( t1.targ > t2.targ ) + return 1; + else if ( t1.action < t2.action ) + return -1; + else if ( t1.action > t2.action ) + return 1; + else + return 0; + } +}; + +typedef AvlBasic<RedTrans, CmpRedTrans> RedTransSet; + +/* Element in out range. */ +struct RedTransEl +{ + /* Constructors. */ + RedTransEl( Key lowKey, Key highKey, RedTrans *value ) + : lowKey(lowKey), highKey(highKey), value(value) { } + + Key lowKey, highKey; + RedTrans *value; +}; + +typedef Vector<RedTransEl> RedTransList; +typedef Vector<RedState*> RedStateVect; + +typedef BstMapEl<RedState*, unsigned long long> RedSpanMapEl; +typedef BstMap<RedState*, unsigned long long> RedSpanMap; + +/* Compare used by span map sort. Reverse sorts by the span. */ +struct CmpRedSpanMapEl +{ + static int compare( const RedSpanMapEl &smel1, const RedSpanMapEl &smel2 ) + { + if ( smel1.value > smel2.value ) + return -1; + else if ( smel1.value < smel2.value ) + return 1; + else + return 0; + } +}; + +/* Sorting state-span map entries by span. */ +typedef MergeSort<RedSpanMapEl, CmpRedSpanMapEl> RedSpanMapSort; + +/* Set of entry ids that go into this state. */ +typedef Vector<int> EntryIdVect; +typedef Vector<char*> EntryNameVect; + +/* Maps entry ids (defined by the frontend, to reduced state ids. */ +typedef BstMap<int, int> RedEntryMap; +typedef BstMapEl<int, int> RedEntryMapEl; + +typedef Vector<int> RegionToEntry; + +/* Reduced state. */ +struct RedState +{ + RedState() + : + defTrans(0), + transList(0), + isFinal(false), + labelNeeded(false), + outNeeded(false), + onStateList(false), + toStateAction(0), + fromStateAction(0), + eofAction(0), + eofTrans(0), + id(0), + bAnyRegCurStateRef(false), + partitionBoundary(false), + inTrans(0), + numInTrans(0) + { } + + /* Transitions out. */ + RedTransList outSingle; + RedTransList outRange; + RedTrans *defTrans; + + /* For flat conditions. */ + Key condLowKey, condHighKey; + + /* For flat keys. */ + Key lowKey, highKey; + RedTrans **transList; + + /* The list of states that transitions from this state go to. */ + RedStateVect targStates; + + bool isFinal; + bool labelNeeded; + bool outNeeded; + bool onStateList; + RedAction *toStateAction; + RedAction *fromStateAction; + RedAction *eofAction; + RedTrans *eofTrans; + int id; + + /* Pointers for the list of states. */ + RedState *prev, *next; + + bool anyRegCurStateRef() { return bAnyRegCurStateRef; } + bool bAnyRegCurStateRef; + + int partition; + bool partitionBoundary; + + RedTrans **inTrans; + int numInTrans; +}; + +/* List of states. */ +typedef DList<RedState> RedStateList; + +/* Set of reduced transitons. Comparison is by pointer. */ +typedef BstSet< RedTrans*, CmpOrd<RedTrans*> > RedTransPtrSet; + +/* Next version of the fsm machine. */ +struct RedFsm +{ + RedFsm(); + + bool wantComplete; + bool forcedErrorState; + + int nextActionId; + int nextTransId; + + /* Next State Id doubles as the total number of state ids. */ + int nextStateId; + + RedTransSet transSet; + GenActionTableMap actionMap; + RedStateList stateList; + RedStateSet entryPoints; + RedState *startState; + RedState *errState; + RedTrans *errTrans; + RedTrans *errActionTrans; + RedState *firstFinState; + int numFinStates; + int nParts; + + GenAction *allActions; + RedAction *allActionTables; + RedState *allStates; + GenActionList genActionList; + EntryIdVect entryPointIds; + RedEntryMap redEntryMap; + RegionToEntry regionToEntry; + + bool bAnyToStateActions; + bool bAnyFromStateActions; + bool bAnyRegActions; + bool bAnyEofActions; + bool bAnyActionGotos; + bool bAnyActionCalls; + bool bAnyActionRets; + bool bAnyRegActionRets; + bool bAnyRegActionByValControl; + bool bAnyRegNextStmt; + bool bAnyRegCurStateRef; + bool bAnyRegBreak; + bool bAnyLmSwitchError; + bool bAnyConditions; + + int maxState; + int maxSingleLen; + int maxRangeLen; + int maxKeyOffset; + int maxIndexOffset; + int maxIndex; + int maxActListId; + int maxActionLoc; + int maxActArrItem; + unsigned long long maxSpan; + unsigned long long maxCondSpan; + int maxFlatIndexOffset; + Key maxKey; + int maxCondOffset; + int maxCondLen; + int maxCondSpaceId; + int maxCondIndexOffset; + int maxCond; + + bool anyActions(); + bool anyToStateActions() { return bAnyToStateActions; } + bool anyFromStateActions() { return bAnyFromStateActions; } + bool anyRegActions() { return bAnyRegActions; } + bool anyEofActions() { return bAnyEofActions; } + bool anyActionGotos() { return bAnyActionGotos; } + bool anyActionCalls() { return bAnyActionCalls; } + bool anyActionRets() { return bAnyActionRets; } + bool anyRegActionRets() { return bAnyRegActionRets; } + bool anyRegActionByValControl() { return bAnyRegActionByValControl; } + bool anyRegNextStmt() { return bAnyRegNextStmt; } + bool anyRegCurStateRef() { return bAnyRegCurStateRef; } + bool anyRegBreak() { return bAnyRegBreak; } + bool anyLmSwitchError() { return bAnyLmSwitchError; } + bool anyConditions() { return bAnyConditions; } + + /* Is is it possible to extend a range by bumping ranges that span only + * one character to the singles array. */ + bool canExtend( const RedTransList &list, int pos ); + + /* Pick single transitions from the ranges. */ + void moveTransToSingle( RedState *state ); + void chooseSingle(); + + void makeFlat(); + + /* Move a selected transition from ranges to default. */ + void moveToDefault( RedTrans *defTrans, RedState *state ); + + /* Pick a default transition by largest span. */ + RedTrans *chooseDefaultSpan( RedState *state ); + void chooseDefaultSpan(); + + /* Pick a default transition by most number of ranges. */ + RedTrans *chooseDefaultNumRanges( RedState *state ); + void chooseDefaultNumRanges(); + + /* Pick a default transition tailored towards goto driven machine. */ + RedTrans *chooseDefaultGoto( RedState *state ); + void chooseDefaultGoto(); + + /* Ordering states by transition connections. */ + void optimizeStateOrdering( RedState *state ); + void optimizeStateOrdering(); + + /* Ordering states by transition connections. */ + void depthFirstOrdering( RedState *state ); + void depthFirstOrdering(); + + /* Set state ids. */ + void sequentialStateIds(); + void sortStateIdsByFinal(); + + /* Arrange states in by final id. This is a stable sort. */ + void sortStatesByFinal(); + + /* Sorting states by id. */ + void sortByStateId(); + + /* Locating the first final state. This is the final state with the lowest + * id. */ + void findFirstFinState(); + + void assignActionLocs(); + + RedTrans *getErrorTrans(); + RedState *getErrorState(); + + /* Is every char in the alphabet covered? */ + bool alphabetCovered( RedTransList &outRange ); + + RedTrans *allocateTrans( RedState *targState, RedAction *actionTable ); + + void partitionFsm( int nParts ); + + void setInTrans(); + void setValueLimits(); + void assignActionIds(); + void analyzeActionList( RedAction *redAct, InlineList *inlineList ); + void analyzeAction( GenAction *act, InlineList *inlineList ); + void findFinalActionRefs(); + void analyzeMachine(); + + FsmTables *makeFsmTables(); +}; + + +#endif /* _REDFSM_H */ diff --git a/src/resolve.cc b/src/resolve.cc new file mode 100644 index 0000000..6b5dc75 --- /dev/null +++ b/src/resolve.cc @@ -0,0 +1,799 @@ +/* + * Copyright 2009-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "bytecode.h" +#include "parsedata.h" +#include <iostream> +#include <assert.h> + +using std::cout; +using std::cerr; +using std::endl; + +Namespace *TypeRef::resolveNspace( Compiler *pd ) +{ + if ( parsedVarRef != 0 && !nspaceQual->thisOnly() ) { + UniqueType *ut = parsedVarRef->lookup( pd ); + return ut->langEl->nspace; + } + else if ( parsedTypeRef != 0 && !nspaceQual->thisOnly() ) { + UniqueType *ut = parsedTypeRef->resolveType( pd ); + return ut->langEl->nspace; + } + else { + /* Lookup up the qualifiction and then the name. */ + return nspaceQual->getQual( pd ); + } +} + +UniqueType *TypeRef::resolveTypeName( Compiler *pd ) +{ + nspace = resolveNspace( pd ); + + if ( nspace == 0 ) + error(loc) << "do not have region for resolving reference" << endp; + + while ( nspace != 0 ) { + /* Search for the token in the region by typeName. */ + TypeMapEl *inDict = nspace->typeMap.find( typeName ); + + if ( inDict != 0 ) { + switch ( inDict->type ) { + /* Defer to the typeRef we are an alias of. We need to guard against loops here. */ + case TypeMapEl::TypeAliasType: + return inDict->typeRef->resolveType( pd ); + + case TypeMapEl::LangElType: + return pd->findUniqueType( TYPE_TREE, inDict->value ); + } + } + + if ( nspaceQual->thisOnly() ) + break; + + nspace = nspace->parentNamespace; + } + + error(loc) << "unknown type in typeof expression" << endp; + return 0; +} + +UniqueType *TypeRef::resolveTypeLiteral( Compiler *pd ) +{ + /* Lookup up the qualifiction and then the name. */ + nspace = resolveNspace( pd ); + + if ( nspace == 0 ) + error(loc) << "do not have region for resolving reference" << endp; + + /* Interpret escape sequences and remove quotes. */ + bool unusedCI; + String interp; + prepareLitString( interp, unusedCI, pdaLiteral->data, + pdaLiteral->loc ); + + while ( nspace != 0 ) { + LiteralDictEl *ldel = nspace->literalDict.find( interp ); + + if ( ldel != 0 ) + return pd->findUniqueType( TYPE_TREE, ldel->value->tokenDef->tdLangEl ); + + if ( nspaceQual->thisOnly() ) + break; + + nspace = nspace->parentNamespace; + } + + error(loc) << "unknown type in typeof expression" << endp; + return 0; +} + +UniqueType *TypeRef::resolveTypeMap( Compiler *pd ) +{ + nspace = pd->rootNamespace; + + UniqueType *utKey = typeRef1->resolveType( pd ); + UniqueType *utValue = typeRef2->resolveType( pd ); + + UniqueMap searchKey( utKey, utValue ); + UniqueMap *inMap = pd->uniqueMapMap.find( &searchKey ); + if ( inMap == 0 ) { + inMap = new UniqueMap( utKey, utValue ); + pd->uniqueMapMap.insert( inMap ); + + /* FIXME: Need uniqe name allocator for types. */ + static int mapId = 0; + String name( 36, "__map%d", mapId++ ); + + GenericType *generic = new GenericType( name, GEN_MAP, + pd->nextGenericId++, 0/*langEl*/, typeRef2 ); + generic->keyTypeArg = typeRef1; + + nspace->genericList.append( generic ); + + generic->declare( pd, nspace ); + + inMap->generic = generic; + } + + generic = inMap->generic; + return pd->findUniqueType( TYPE_TREE, inMap->generic->langEl ); +} + +UniqueType *TypeRef::resolveTypeList( Compiler *pd ) +{ + nspace = pd->rootNamespace; + + UniqueType *utValue = typeRef1->resolveType( pd ); + + UniqueList searchKey( utValue ); + UniqueList *inMap = pd->uniqueListMap.find( &searchKey ); + if ( inMap == 0 ) { + inMap = new UniqueList( utValue ); + pd->uniqueListMap.insert( inMap ); + + /* FIXME: Need uniqe name allocator for types. */ + static int listId = 0; + String name( 36, "__list%d", listId++ ); + + GenericType *generic = new GenericType( name, GEN_LIST, + pd->nextGenericId++, 0/*langEl*/, typeRef1 ); + + nspace->genericList.append( generic ); + + generic->declare( pd, nspace ); + + inMap->generic = generic; + } + + generic = inMap->generic; + return pd->findUniqueType( TYPE_TREE, inMap->generic->langEl ); +} + +UniqueType *TypeRef::resolveTypeVector( Compiler *pd ) +{ + nspace = pd->rootNamespace; + + UniqueType *utValue = typeRef1->resolveType( pd ); + + UniqueVector searchKey( utValue ); + UniqueVector *inMap = pd->uniqueVectorMap.find( &searchKey ); + if ( inMap == 0 ) { + inMap = new UniqueVector( utValue ); + pd->uniqueVectorMap.insert( inMap ); + + /* FIXME: Need uniqe name allocator for types. */ + static int vectorId = 0; + String name( 36, "__vector%d", vectorId++ ); + + GenericType *generic = new GenericType( name, GEN_VECTOR, + pd->nextGenericId++, 0/*langEl*/, typeRef1 ); + + nspace->genericList.append( generic ); + + generic->declare( pd, nspace ); + + inMap->generic = generic; + } + + generic = inMap->generic; + return pd->findUniqueType( TYPE_TREE, inMap->generic->langEl ); +} + +UniqueType *TypeRef::resolveTypeParser( Compiler *pd ) +{ + nspace = pd->rootNamespace; + + UniqueType *utParse = typeRef1->resolveType( pd ); + + UniqueParser searchKey( utParse ); + UniqueParser *inMap = pd->uniqueParserMap.find( &searchKey ); + if ( inMap == 0 ) { + inMap = new UniqueParser( utParse ); + pd->uniqueParserMap.insert( inMap ); + + /* FIXME: Need uniqe name allocator for types. */ + static int accumId = 0; + String name( 36, "__accum%d", accumId++ ); + + GenericType *generic = new GenericType( name, GEN_PARSER, + pd->nextGenericId++, 0/*langEl*/, typeRef1 ); + + nspace->genericList.append( generic ); + + generic->declare( pd, nspace ); + + inMap->generic = generic; + } + + generic = inMap->generic; + return pd->findUniqueType( TYPE_TREE, inMap->generic->langEl ); +} + +UniqueType *TypeRef::resolveTypePtr( Compiler *pd ) +{ + typeRef1->resolveType( pd ); + return pd->findUniqueType( TYPE_PTR, typeRef1->uniqueType->langEl ); +} + +UniqueType *TypeRef::resolveTypeRef( Compiler *pd ) +{ + typeRef1->resolveType( pd ); + return pd->findUniqueType( TYPE_REF, typeRef1->uniqueType->langEl ); +} + +void TypeRef::resolveRepeat( Compiler *pd ) +{ + if ( uniqueType->typeId != TYPE_TREE ) + error(loc) << "cannot repeat non-tree type" << endp; + + UniqueRepeat searchKey( repeatType, uniqueType->langEl ); + UniqueRepeat *uniqueRepeat = pd->uniqeRepeatMap.find( &searchKey ); + if ( uniqueRepeat == 0 ) { + uniqueRepeat = new UniqueRepeat( repeatType, uniqueType->langEl ); + pd->uniqeRepeatMap.insert( uniqueRepeat ); + + LangEl *declLangEl = 0; + + switch ( repeatType ) { + case RepeatRepeat: { + /* If the factor is a repeat, create the repeat element and link the + * factor to it. */ + String repeatName( 128, "_repeat_%s", typeName.data ); + declLangEl = pd->makeRepeatProd( loc, nspace, repeatName, uniqueType ); + break; + } + case RepeatList: { + /* If the factor is a repeat, create the repeat element and link the + * factor to it. */ + String listName( 128, "_list_%s", typeName.data ); + declLangEl = pd->makeListProd( loc, nspace, listName, uniqueType ); + break; + } + case RepeatOpt: { + /* If the factor is an opt, create the opt element and link the factor + * to it. */ + String optName( 128, "_opt_%s", typeName.data ); + declLangEl = pd->makeOptProd( loc, nspace, optName, uniqueType ); + break; + } + + case RepeatNone: + break; + } + + uniqueRepeat->declLangEl = declLangEl; + declLangEl->repeatOf = uniqueRepeat->langEl; + } + + uniqueType = pd->findUniqueType( TYPE_TREE, uniqueRepeat->declLangEl ); +} + +UniqueType *TypeRef::resolveIterator( Compiler *pd ) +{ + UniqueType *searchUT = searchTypeRef->resolveType( pd ); + + /* Lookup the iterator call. Make sure it is an iterator. */ + VarRefLookup lookup = iterCall->langTerm->varRef->lookupMethod( pd ); + if ( lookup.objMethod->iterDef == 0 ) { + error(loc) << "attempt to iterate using something " + "that is not an iterator" << endp; + } + + /* Now that we have done the iterator call lookup we can make the type + * reference for the object field. */ + UniqueType *iterUniqueType = pd->findUniqueType( TYPE_ITER, lookup.objMethod->iterDef ); + + iterDef = lookup.objMethod->iterDef; + searchUniqueType = searchUT; + + return iterUniqueType; +} + + +UniqueType *TypeRef::resolveType( Compiler *pd ) +{ + if ( uniqueType != 0 ) + return uniqueType; + + /* Not an iterator. May be a reference. */ + switch ( type ) { + case Name: + uniqueType = resolveTypeName( pd ); + break; + case Literal: + uniqueType = resolveTypeLiteral( pd ); + break; + case Map: + uniqueType = resolveTypeMap( pd ); + break; + case List: + uniqueType = resolveTypeList( pd ); + break; + case Vector: + uniqueType = resolveTypeVector( pd ); + break; + case Parser: + uniqueType = resolveTypeParser( pd ); + break; + case Ptr: + uniqueType = resolveTypePtr( pd ); + break; + case Ref: + uniqueType = resolveTypeRef( pd ); + break; + case Iterator: + uniqueType = resolveIterator( pd ); + break; + case Unspecified: + /* No lookup needed, unique type(s) set when constructed. */ + break; + } + + if ( repeatType != RepeatNone ) + resolveRepeat( pd ); + + return uniqueType; +} + +void Compiler::resolveProdEl( ProdEl *prodEl ) +{ + prodEl->typeRef->resolveType( this ); + prodEl->langEl = prodEl->typeRef->uniqueType->langEl; +} + +void LangTerm::resolve( Compiler *pd ) +{ + switch ( type ) { + case ConstructType: + typeRef->resolveType( pd ); + + /* Initialization expressions. */ + if ( fieldInitArgs != 0 ) { + for ( FieldInitVect::Iter pi = *fieldInitArgs; pi.lte(); pi++ ) + (*pi)->expr->resolve( pd ); + } + + /* Types in constructor. */ + for ( ConsItemList::Iter item = *constructor->list; item.lte(); item++ ) { + switch ( item->type ) { + case ConsItem::LiteralType: + /* Use pdaFactor reference resolving. */ + pd->resolveProdEl( item->prodEl ); + break; + case ConsItem::InputText: + case ConsItem::ExprType: + break; + } + } + break; + case VarRefType: + break; + + case MakeTreeType: + case MakeTokenType: + case MethodCallType: + if ( args != 0 ) { + for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) + (*pe)->expr->resolve( pd ); + } + break; + + case NumberType: + case StringType: + break; + + case MatchType: + for ( PatternItemList::Iter item = *pattern->list; item.lte(); item++ ) { + switch ( item->form ) { + case PatternItem::TypeRefForm: + /* Use pdaFactor reference resolving. */ + pd->resolveProdEl( item->prodEl ); + break; + case PatternItem::InputTextForm: + /* Nothing to do here. */ + break; + } + } + + break; + case NewType: + expr->resolve( pd ); + break; + case TypeIdType: + typeRef->resolveType( pd ); + break; + case SearchType: + typeRef->resolveType( pd ); + break; + case NilType: + case TrueType: + case FalseType: + break; + + case ParseStopType: + case ParseType: + typeRef->resolveType( pd ); + /* Evaluate the initialization expressions. */ + if ( fieldInitArgs != 0 ) { + for ( FieldInitVect::Iter pi = *fieldInitArgs; pi.lte(); pi++ ) + (*pi)->expr->resolve( pd ); + } + + for ( ConsItemList::Iter item = *parserText->list; item.lte(); item++ ) { + switch ( item->type ) { + case ConsItem::LiteralType: + pd->resolveProdEl( item->prodEl ); + break; + case ConsItem::InputText: + case ConsItem::ExprType: + break; + } + } + break; + + case SendType: + break; + case EmbedStringType: + break; + case CastType: + typeRef->resolveType( pd ); + expr->resolve( pd ); + break; + } +} + +void LangVarRef::resolve( Compiler *pd ) const +{ +} + +void LangExpr::resolve( Compiler *pd ) const +{ + switch ( type ) { + case BinaryType: { + left->resolve( pd ); + right->resolve( pd ); + break; + } + case UnaryType: { + right->resolve( pd ); + break; + } + case TermType: { + term->resolve( pd ); + break; + } + } +} + +void IterCall::resolve( Compiler *pd ) const +{ + switch ( form ) { + case IterCallForm: + langTerm->resolve( pd ); + break; + case VarRefForm: + case ExprForm: + langExpr->resolve( pd ); + break; + } +} + +void LangStmt::resolveForIter( Compiler *pd ) const +{ + iterCall->resolve( pd ); + + /* Search type ref. */ + typeRef->resolveType( pd ); + + /* Iterator type ref. */ + objField->typeRef->resolveType( pd ); + + /* Resolve the statements. */ + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->resolve( pd ); +} + +void LangStmt::resolve( Compiler *pd ) const +{ + switch ( type ) { + case PrintType: + case PrintXMLACType: + case PrintXMLType: + case PrintStreamType: { + /* Push the args backwards. */ + for ( CallArgVect::Iter pex = exprPtrVect->last(); pex.gtb(); pex-- ) + (*pex)->expr->resolve( pd ); + break; + } + case ExprType: { + /* Evaluate the exrepssion, then pop it immediately. */ + expr->resolve( pd ); + break; + } + case IfType: { + /* Evaluate the test. */ + expr->resolve( pd ); + + /* Analyze the if true branch. */ + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->resolve( pd ); + + if ( elsePart != 0 ) + elsePart->resolve( pd ); + + break; + } + case ElseType: { + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->resolve( pd ); + break; + } + case RejectType: + break; + case WhileType: { + expr->resolve( pd ); + + /* Compute the while block. */ + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->resolve( pd ); + break; + } + case AssignType: { + /* Evaluate the exrepssion. */ + expr->resolve( pd ); + break; + } + case ForIterType: { + resolveForIter( pd ); + break; + } + case ReturnType: { + /* Evaluate the exrepssion. */ + expr->resolve( pd ); + break; + } + case BreakType: { + break; + } + case YieldType: { + /* take a reference and yield it. Immediately reset the referece. */ + varRef->resolve( pd ); + break; + } + } +} + +void ObjectDef::resolve( Compiler *pd ) +{ + for ( ObjFieldList::Iter fli = *objFieldList; fli.lte(); fli++ ) { + ObjectField *field = fli->value; + + if ( field->typeRef != 0 ) + field->typeRef->resolveType( pd ); + } +} + +void CodeBlock::resolve( Compiler *pd ) const +{ + if ( localFrame != 0 ) { + localFrame->resolve( pd ); + } + + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->resolve( pd ); +} + +void Compiler::resolveFunction( Function *func ) +{ + if ( func->typeRef != 0 ) + func->typeRef->resolveType( this ); + + for ( ParameterList::Iter param = *func->paramList; param.lte(); param++ ) + param->typeRef->resolveType( this ); + + CodeBlock *block = func->codeBlock; + block->resolve( this ); +} + +void Compiler::resolvePreEof( TokenRegion *region ) +{ + CodeBlock *block = region->preEofBlock; + block->resolve( this ); +} + +void Compiler::resolveRootBlock() +{ + CodeBlock *block = rootCodeBlock; + block->resolve( this ); +} + +void Compiler::resolveTranslateBlock( LangEl *langEl ) +{ + CodeBlock *block = langEl->transBlock; + block->resolve( this ); +} + +void Compiler::resolveReductionCode( Production *prod ) +{ + CodeBlock *block = prod->redBlock; + block->resolve( this ); +} + +void Compiler::resolveParseTree() +{ + /* Compile functions. */ + for ( FunctionList::Iter f = functionList; f.lte(); f++ ) + resolveFunction( f ); + + /* Compile the reduction code. */ + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + if ( prod->redBlock != 0 ) + resolveReductionCode( prod ); + } + + /* Compile the token translation code. */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->transBlock != 0 ) + resolveTranslateBlock( lel ); + } + + /* Compile preeof blocks. */ + for ( RegionList::Iter r = regionList; r.lte(); r++ ) { + if ( r->preEofBlock != 0 ) + resolvePreEof( r ); + } + + /* Compile the init code */ + resolveRootBlock( ); + + rootLocalFrame->resolve( this ); + + /* Init all user object fields (need consistent size). */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + ObjectDef *objDef = lel->objectDef; + if ( objDef != 0 ) { + /* Init all fields of the object. */ + for ( ObjFieldList::Iter f = *objDef->objFieldList; f.lte(); f++ ) { + f->value->typeRef->resolveType( this ); + } + } + } + + /* Init all fields of the global object. */ + for ( ObjFieldList::Iter f = *globalObjectDef->objFieldList; f.lte(); f++ ) { + f->value->typeRef->resolveType( this ); + } + +} + +/* Resolves production els and computes the precedence of each prod. */ +void Compiler::resolveProductionEls() +{ + /* NOTE: as we process this list it may be growing! */ + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + /* First resolve. */ + for ( ProdElList::Iter prodEl = *prod->prodElList; prodEl.lte(); prodEl++ ) + resolveProdEl( prodEl ); + + /* If there is no explicit precdence ... */ + if ( prod->predOf == 0 ) { + /* Compute the precedence of the productions. */ + for ( ProdElList::Iter prodEl = prod->prodElList->last(); prodEl.gtb(); prodEl-- ) { + /* Production inherits the precedence of the last terminal with + * precedence. */ + if ( prodEl->langEl->predType != PredNone ) { + prod->predOf = prodEl->langEl; + break; + } + } + } + } +} + +void Compiler::resolveGenericTypes() +{ + for ( NamespaceList::Iter ns = namespaceList; ns.lte(); ns++ ) { + for ( GenericList::Iter gen = ns->genericList; gen.lte(); gen++ ) { + gen->utArg = gen->typeArg->resolveType( this ); + + if ( gen->typeId == GEN_MAP ) + gen->keyUT = gen->keyTypeArg->resolveType( this ); + } + } +} + +void Compiler::makeTerminalWrappers() +{ + /* Make terminal language elements corresponding to each nonterminal in + * the grammar. */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->type == LangEl::NonTerm ) { + String name( lel->name.length() + 5, "_T_%s", lel->name.data ); + LangEl *termDup = new LangEl( lel->nspace, name, LangEl::Term ); + + /* Give the dup the attributes of the nonterminal. This ensures + * that the attributes are allocated when patterns and + * constructors are parsed. */ + termDup->objectDef = lel->objectDef; + + langEls.append( termDup ); + lel->termDup = termDup; + termDup->termDup = lel; + } + } +} + +void Compiler::makeEofElements() +{ + /* Make eof language elements for each user terminal. This is a bit excessive and + * need to be reduced to the ones that we need parsers for, but we don't know that yet. + * Another pass before this one is needed. */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->eofLel == 0 && + lel != eofLangEl && + lel != errorLangEl && + lel != noTokenLangEl /* && + !( lel->tokenInstance == 0 || lel->tokenInstance->dupOf == 0 ) */ ) + { + String name( lel->name.length() + 5, "_eof_%s", lel->name.data ); + LangEl *eofLel = new LangEl( lel->nspace, name, LangEl::Term ); + + langEls.append( eofLel ); + lel->eofLel = eofLel; + eofLel->eofLel = lel; + eofLel->isEOF = true; + } + } +} + +void Compiler::resolvePrecedence() +{ + for ( PredDeclList::Iter predDecl = predDeclList; predDecl != 0; predDecl++ ) { + predDecl->typeRef->resolveType( this ); + + LangEl *langEl = predDecl->typeRef->uniqueType->langEl; + langEl->predType = predDecl->predType; + langEl->predValue = predDecl->predValue; + } +} + + +void Compiler::resolvePass() +{ + /* + * Type Resolving. + */ + + resolvePrecedence(); + + resolveParseTree(); + + resolveGenericTypes(); + + argvTypeRef->resolveType( this ); + + /* We must do this as the last step in the type resolution process because + * all type resolves can cause new language elments with associated + * productions. They get tacked onto the end of the list of productions. + * Doing it at the end results processing a growing list. */ + resolveProductionEls(); +} diff --git a/src/rtvector.h b/src/rtvector.h new file mode 100644 index 0000000..e03a17f --- /dev/null +++ b/src/rtvector.h @@ -0,0 +1,34 @@ +/* + * Copyright 2002, 2006, 2009 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Aapl. + * + * Aapl is free software; you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * Aapl 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 Lesser General Public License for + * more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Aapl; if not, write to the Free Software Foundation, Inc., 59 + * Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _RT_VECTOR_H +#define _RT_VECTOR_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/src/string.c b/src/string.c new file mode 100644 index 0000000..31472e2 --- /dev/null +++ b/src/string.c @@ -0,0 +1,246 @@ +/* + * Copyright 2007-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <colm/pool.h> +#include <colm/pdarun.h> +#include <colm/bytecode.h> + +#include <assert.h> +#include <string.h> +#include <stdio.h> +#include <stdlib.h> +#include <ctype.h> + +/* + * In this system strings are not null terminated. Often strings come from a + * parse, in which case the string is just a pointer into the the data string. + * A block in a parsed stream can house many tokens and there is no room for + * nulls. + */ + +Head *stringCopy( Program *prg, Head *head ) +{ + Head *result = 0; + if ( head != 0 ) { + if ( (char*)(head+1) == head->data ) + result = stringAllocFull( prg, head->data, head->length ); + else + result = stringAllocPointer( prg, head->data, head->length ); + + if ( head->location != 0 ) { + result->location = locationAllocate( prg ); + result->location->name = head->location->name; + result->location->line = head->location->line; + result->location->column = head->location->column; + result->location->byte = head->location->byte; + } + } + return result; +} + +void stringFree( Program *prg, Head *head ) +{ + if ( head != 0 ) { + if ( head->location != 0 ) + locationFree( prg, head->location ); + + if ( (char*)(head+1) == head->data ) { + /* Full string allocation. */ + free( head ); + } + else { + /* Just a string head. */ + headFree( prg, head ); + } + } +} + +const char *stringData( Head *head ) +{ + if ( head == 0 ) + return 0; + return head->data; +} + +long stringLength( Head *head ) +{ + if ( head == 0 ) + return 0; + return head->length; +} + +void stringShorten( Head *head, long newlen ) +{ + assert( newlen <= head->length ); + head->length = newlen; +} + +Head *initStrSpace( long length ) +{ + /* Find the length and allocate the space for the shared string. */ + Head *head = (Head*) malloc( sizeof(Head) + length ); + + /* Init the header. */ + head->data = (char*)(head+1); + head->length = length; + head->location = 0; + + /* Save the pointer to the data. */ + return head; +} + +/* Create from a c-style string. */ +Head *stringAllocFull( Program *prg, const char *data, long length ) +{ + /* Init space for the data. */ + Head *head = initStrSpace( length ); + + /* Copy in the data. */ + memcpy( (head+1), data, length ); + + return head; +} + +/* Create from a c-style string. */ +Head *stringAllocPointer( Program *prg, const char *data, long length ) +{ + /* Find the length and allocate the space for the shared string. */ + Head *head = headAllocate( prg ); + + /* Init the header. */ + head->data = data; + head->length = length; + + return head; +} + +Head *concatStr( Head *s1, Head *s2 ) +{ + long s1Len = s1->length; + long s2Len = s2->length; + + /* Init space for the data. */ + Head *head = initStrSpace( s1Len + s2Len ); + + /* Copy in the data. */ + memcpy( (head+1), s1->data, s1Len ); + memcpy( (char*)(head+1) + s1Len, s2->data, s2Len ); + + return head; +} + +Head *stringToUpper( Head *s ) +{ + /* Init space for the data. */ + long len = s->length; + Head *head = initStrSpace( len ); + + /* Copy in the data. */ + const char *src = s->data; + char *dst = (char*)(head+1); + int i; + for ( i = 0; i < len; i++ ) + *dst++ = toupper( *src++ ); + + return head; +} + +Head *stringToLower( Head *s ) +{ + /* Init space for the data. */ + long len = s->length; + Head *head = initStrSpace( len ); + + /* Copy in the data. */ + const char *src = s->data; + char *dst = (char*)(head+1); + int i; + for ( i = 0; i < len; i++ ) + *dst++ = tolower( *src++ ); + + return head; +} + + +/* Compare two strings. If identical returns 1, otherwise 0. */ +Word cmpString( Head *s1, Head *s2 ) +{ + if ( s1->length < s2->length ) + return -1; + else if ( s1->length > s2->length ) + return 1; + else { + char *d1 = (char*)(s1->data); + char *d2 = (char*)(s2->data); + return memcmp( d1, d2, s1->length ); + } +} + +Word strAtoi( Head *str ) +{ + /* FIXME: need to implement this by hand. There is no null terminator. */ + char *nulled = (char*)malloc( str->length + 1 ); + memcpy( nulled, str->data, str->length ); + nulled[str->length] = 0; + int res = atoi( nulled ); + free( nulled ); + return res; +} + +Head *intToStr( Program *prg, Word i ) +{ + char data[20]; + sprintf( data, "%ld", i ); + return stringAllocFull( prg, data, strlen(data) ); +} + +Word strUord16( Head *head ) +{ + uchar *data = (uchar*)(head->data); + ulong res; + res = (ulong)data[1]; + res |= ((ulong)data[0]) << 8; + return res; +} + +Word strUord8( Head *head ) +{ + uchar *data = (uchar*)(head->data); + ulong res = (ulong)data[0]; + return res; +} + +Head *makeLiteral( Program *prg, long offset ) +{ + return stringAllocPointer( prg, + prg->rtd->litdata[offset], + prg->rtd->litlen[offset] ); +} + +Head *stringSprintf( Program *prg, Str *format, Int *integer ) +{ + Head *formatHead = format->value; + long written = snprintf( 0, 0, stringData(formatHead), integer->value ); + Head *head = initStrSpace( written+1 ); + written = snprintf( (char*)head->data, written+1, stringData(formatHead), integer->value ); + head->length -= 1; + return head; +} diff --git a/src/synthesis.cc b/src/synthesis.cc new file mode 100644 index 0000000..f6f7b56 --- /dev/null +++ b/src/synthesis.cc @@ -0,0 +1,2687 @@ +/* + * Copyright 2007-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "bytecode.h" +#include "parsedata.h" +#include "pdarun.h" +#include "input.h" +#include <iostream> +#include <assert.h> + +using std::cout; +using std::cerr; +using std::endl; + +IterDef::IterDef( Type type ) : + type(type), + func(0), + useFuncId(false), + useSearchUT(false) +{ + switch ( type ) { + case Tree: + inCreateWV = IN_TRITER_FROM_REF; + inCreateWC = IN_TRITER_FROM_REF; + inDestroy = IN_TRITER_DESTROY; + inAdvance = IN_TRITER_ADVANCE; + + inGetCurR = IN_TRITER_GET_CUR_R; + inGetCurWC = IN_TRITER_GET_CUR_WC; + inSetCurWC = IN_TRITER_SET_CUR_WC; + inRefFromCur = IN_TRITER_REF_FROM_CUR; + useSearchUT = true; + break; + case Child: + inCreateWV = IN_TRITER_FROM_REF; + inCreateWC = IN_TRITER_FROM_REF; + inDestroy = IN_TRITER_DESTROY; + inAdvance = IN_TRITER_NEXT_CHILD; + + inGetCurR = IN_TRITER_GET_CUR_R; + inGetCurWC = IN_TRITER_GET_CUR_WC; + inSetCurWC = IN_TRITER_SET_CUR_WC; + inRefFromCur = IN_TRITER_REF_FROM_CUR; + useSearchUT = true; + break; + case RevChild: + inCreateWV = IN_REV_TRITER_FROM_REF; + inCreateWC = IN_REV_TRITER_FROM_REF; + inDestroy = IN_REV_TRITER_DESTROY; + inAdvance = IN_REV_TRITER_PREV_CHILD; + + inGetCurR = IN_TRITER_GET_CUR_R; + inGetCurWC = IN_TRITER_GET_CUR_WC; + inSetCurWC = IN_TRITER_SET_CUR_WC; + inRefFromCur = IN_TRITER_REF_FROM_CUR; + useSearchUT = true; + break; + + case Repeat: + inCreateWV = IN_TRITER_FROM_REF; + inCreateWC = IN_TRITER_FROM_REF; + inDestroy = IN_TRITER_DESTROY; + inAdvance = IN_TRITER_NEXT_REPEAT; + + inGetCurR = IN_TRITER_GET_CUR_R; + inGetCurWC = IN_TRITER_GET_CUR_WC; + inSetCurWC = IN_TRITER_SET_CUR_WC; + inRefFromCur = IN_TRITER_REF_FROM_CUR; + useSearchUT = true; + break; + + case RevRepeat: + inCreateWV = IN_TRITER_FROM_REF; + inCreateWC = IN_TRITER_FROM_REF; + inDestroy = IN_TRITER_DESTROY; + inAdvance = IN_TRITER_PREV_REPEAT; + + inGetCurR = IN_TRITER_GET_CUR_R; + inGetCurWC = IN_TRITER_GET_CUR_WC; + inSetCurWC = IN_TRITER_SET_CUR_WC; + inRefFromCur = IN_TRITER_REF_FROM_CUR; + useSearchUT = true; + break; + + case User: + assert(false); + } +} + +IterDef::IterDef( Type type, Function *func ) : + type(type), + func(func), + useFuncId(true), + useSearchUT(true), + inCreateWV(IN_UITER_CREATE_WV), + inCreateWC(IN_UITER_CREATE_WC), + inDestroy(IN_UITER_DESTROY), + inAdvance(IN_UITER_ADVANCE), + inGetCurR(IN_UITER_GET_CUR_R), + inGetCurWC(IN_UITER_GET_CUR_WC), + inSetCurWC(IN_UITER_SET_CUR_WC), + inRefFromCur(IN_UITER_REF_FROM_CUR) +{} + +ObjMethod *initFunction( UniqueType *retType, ObjectDef *obj, + const String &name, int methIdWV, int methIdWC, bool isConst ) +{ + ObjMethod *objMethod = new ObjMethod( retType, name, + methIdWV, methIdWC, 0, 0, 0, isConst ); + obj->objMethodMap->insert( name, objMethod ); + return objMethod; +} + +ObjMethod *initFunction( UniqueType *retType, ObjectDef *obj, + const String &name, int methIdWV, int methIdWC, UniqueType *arg1, bool isConst ) +{ + UniqueType *args[] = { arg1 }; + ObjMethod *objMethod = new ObjMethod( retType, name, + methIdWV, methIdWC, 1, args, 0, isConst ); + obj->objMethodMap->insert( name, objMethod ); + return objMethod; +} + +ObjMethod *initFunction( UniqueType *retType, ObjectDef *obj, + const String &name, int methIdWV, int methIdWC, + UniqueType *arg1, UniqueType *arg2, bool isConst ) +{ + UniqueType *args[] = { arg1, arg2 }; + ObjMethod *objMethod = new ObjMethod( retType, name, + methIdWV, methIdWC, 2, args, 0, isConst ); + obj->objMethodMap->insert( name, objMethod ); + return objMethod; +} + +IterDef *Compiler::findIterDef( IterDef::Type type, Function *func ) +{ + IterDefSetEl *el = iterDefSet.find( IterDef( type, func ) ); + if ( el == 0 ) + el = iterDefSet.insert( IterDef( type, func ) ); + return &el->key; +} + +IterDef *Compiler::findIterDef( IterDef::Type type ) +{ + IterDefSetEl *el = iterDefSet.find( IterDef( type ) ); + if ( el == 0 ) + el = iterDefSet.insert( IterDef( type ) ); + return &el->key; +} + +UniqueType *Compiler::findUniqueType( int typeId ) +{ + UniqueType searchKey( typeId ); + UniqueType *uniqueType = uniqeTypeMap.find( &searchKey ); + if ( uniqueType == 0 ) { + uniqueType = new UniqueType( typeId ); + uniqeTypeMap.insert( uniqueType ); + } + return uniqueType; +} + +UniqueType *Compiler::findUniqueType( int typeId, LangEl *langEl ) +{ + UniqueType searchKey( typeId, langEl ); + UniqueType *uniqueType = uniqeTypeMap.find( &searchKey ); + if ( uniqueType == 0 ) { + uniqueType = new UniqueType( typeId, langEl ); + uniqeTypeMap.insert( uniqueType ); + } + return uniqueType; +} + +UniqueType *Compiler::findUniqueType( int typeId, IterDef *iterDef ) +{ + UniqueType searchKey( typeId, iterDef ); + UniqueType *uniqueType = uniqeTypeMap.find( &searchKey ); + if ( uniqueType == 0 ) { + uniqueType = new UniqueType( typeId, iterDef ); + uniqeTypeMap.insert( uniqueType ); + } + return uniqueType; +} + + +/* 0-based. */ +ObjectField *ObjectDef::findFieldNum( long offset ) +{ + int fn = 0; + ObjFieldList::Iter field = *objFieldList; + while ( fn < offset ) { + fn++; + field++; + } + return field->value; +} + +long sizeOfField( UniqueType *fieldUT ) +{ + long size = 0; + if ( fieldUT->typeId == TYPE_ITER ) { + /* Select on the iterator type. */ + switch ( fieldUT->iterDef->type ) { + case IterDef::Tree: + case IterDef::Child: + case IterDef::Repeat: + case IterDef::RevRepeat: + size = sizeof(TreeIter) / sizeof(Word); + break; + case IterDef::RevChild: + size = sizeof(RevTreeIter) / sizeof(Word); + break; + + case IterDef::User: + /* User iterators are just a pointer to the UserIter struct. The + * struct needs to go right beneath the call to the user iterator + * so it can be found by a yield. It is therefore allocated on the + * stack right before the call. */ + size = 1; + break; + } + } + else if ( fieldUT->typeId == TYPE_REF ) + size = 2; + else + size = 1; + + return size; +} + +void ObjectDef::referenceField( Compiler *pd, ObjectField *field ) +{ + field->beenReferenced = true; + initField( pd, field ); +} + +void ObjectDef::initField( Compiler *pd, ObjectField *field ) +{ + if ( !field->beenInitialized ) { + field->beenInitialized = true; + UniqueType *fieldUT = field->typeRef->uniqueType; + + if ( type == FrameType ) { + nextOffset += sizeOfField( fieldUT ); + field->offset = -nextOffset; + + pd->initLocalInstructions( field ); + } + else if ( field->isRhsGet ) { + field->useOffset = false; + field->inGetR = IN_GET_RHS_VAL_R; + field->inGetWC = IN_GET_RHS_VAL_WC; + field->inGetWV = IN_GET_RHS_VAL_WV; + field->inSetWC = IN_SET_RHS_VAL_WC; + field->inSetWV = IN_SET_RHS_VAL_WC; + } + else { + field->offset = nextOffset; + nextOffset += sizeOfField( fieldUT ); + + /* Initialize the instructions. */ + pd->initFieldInstructions( field ); + } + } +} + +UniqueType *LangVarRef::loadField( Compiler *pd, CodeVect &code, + ObjectDef *inObject, ObjectField *el, bool forWriting, bool revert ) const +{ + /* Ensure that the field is referenced. */ + inObject->referenceField( pd, el ); + + UniqueType *elUT = el->typeRef->uniqueType; + + /* If it's a reference then we load it read always. */ + if ( forWriting ) { + /* The instruction, depends on whether or not we are reverting. */ + if ( elUT->typeId == TYPE_ITER ) + code.append( elUT->iterDef->inGetCurWC ); + else if ( pd->revertOn && revert ) + code.append( el->inGetWV ); + else + code.append( el->inGetWC ); + } + else { + /* Loading something for writing */ + if ( elUT->typeId == TYPE_ITER ) + code.append( elUT->iterDef->inGetCurR ); + else + code.append( el->inGetR ); + } + + if ( el->useOffset ) { + /* Gets of locals and fields require offsets. Fake vars like token + * data and lhs don't require it. */ + code.appendHalf( el->offset ); + } + else if ( el->isRhsGet ) { + /* Need to place the array computing the val. */ + code.append( el->rhsVal.length() ); + for ( Vector<RhsVal>::Iter rg = el->rhsVal; rg.lte(); rg++ ) { + code.append( rg->prodEl->production->prodNum ); + code.append( rg->prodEl->pos ); + } + } + + /* If we are dealing with an iterator then dereference it. */ + if ( elUT->typeId == TYPE_ITER ) + elUT = el->typeRef->searchUniqueType; + + return elUT; +} + +/* The qualification must start at a local frame. There cannot be any pointer. */ +long LangVarRef::loadQualificationRefs( Compiler *pd, CodeVect &code, ObjNameScope *rootScope ) const +{ + long count = 0; + + /* Start the search from the root object. */ + ObjNameScope *searchScope = rootScope; + + for ( QualItemVect::Iter qi = *qual; qi.lte(); qi++ ) { + /* Lookup the field in the current qualification. */ + ObjectField *el = searchScope->findField( qi->data ); + if ( el == 0 ) + error(qi->loc) << "cannot resolve qualification " << qi->data << endp; + + if ( qi.pos() > 0 ) { + code.append( IN_REF_FROM_QUAL_REF ); + code.appendHalf( 0 ); + code.appendHalf( el->offset ); + } + else if ( el->typeRef->iterDef != 0 ) { + code.append( el->typeRef->iterDef->inRefFromCur ); + code.appendHalf( el->offset ); + } + else if ( el->typeRef->type == TypeRef::Ref ) { + code.append( IN_REF_FROM_REF ); + code.appendHalf( el->offset ); + } + else { + code.append( IN_REF_FROM_LOCAL ); + code.appendHalf( el->offset ); + } + + UniqueType *elUT = el->typeRef->uniqueType; + if ( elUT->typeId == TYPE_ITER ) + elUT = el->typeRef->searchUniqueType; + + assert( qi->form == QualItem::Dot ); + + ObjectDef *searchObjDef = elUT->objectDef(); + searchScope = searchObjDef->rootScope; + + count += 1; + } + return count; +} + +void LangVarRef::loadQualification( Compiler *pd, CodeVect &code, + ObjNameScope *rootScope, int lastPtrInQual, bool forWriting, bool revert ) const +{ + /* Start the search from the root object. */ + ObjNameScope *searchScope = rootScope; + + for ( QualItemVect::Iter qi = *qual; qi.lte(); qi++ ) { + /* Lookup the field int the current qualification. */ + ObjectField *el = searchScope->findField( qi->data ); + if ( el == 0 ) + error(qi->loc) << "cannot resolve qualification " << qi->data << endp; + + if ( forWriting && el->refActive ) + error(qi->loc) << "reference active, cannot write to object" << endp; + + bool lfForWriting = forWriting; + bool lfRevert = revert; + + /* If there is a pointer in the qualification, we need to compute + * forWriting and revert. */ + if ( lastPtrInQual >= 0 ) { + if ( qi.pos() <= lastPtrInQual ) { + /* If we are before or at the pointer we are strictly read + * only, regardless of the origin. */ + lfForWriting = false; + lfRevert = false; + } + else { + /* If we are past the pointer then we are always reverting + * because the object is global. Forwriting is as passed in. + * */ + lfRevert = true; + } + } + + UniqueType *qualUT = loadField( pd, code, searchScope->owner, + el, lfForWriting, lfRevert ); + + if ( qi->form == QualItem::Dot ) { + /* Cannot a reference. Iterator yes (access of the iterator not + * hte current) */ + if ( qualUT->typeId == TYPE_PTR ) + error(loc) << "dot cannot be used to access a pointer" << endp; + } + else if ( qi->form == QualItem::Arrow ) { + if ( qualUT->typeId == TYPE_PTR ) { + /* Always dereference references when used for qualification. If + * this is the last one then we must start with the reverse + * execution business. */ + if ( pd->revertOn && qi.pos() == lastPtrInQual && forWriting ) { + /* This is like a global load. */ + code.append( IN_PTR_DEREF_WV ); + } + else { + /* If reading or not yet the last in ref then we only need a + * reading deref. */ + code.append( IN_PTR_DEREF_R ); + } + + qualUT = pd->findUniqueType( TYPE_TREE, qualUT->langEl ); + } + else { + error(loc) << "arrow operator cannot be used to access this type" << endp; + } + } + + ObjectDef *searchObjDef = qualUT->objectDef(); + searchScope = searchObjDef->rootScope; + } +} + +void LangVarRef::loadContextObj( Compiler *pd, CodeVect &code, + int lastPtrInQual, bool forWriting ) const +{ + /* Start the search in the global object. */ + ObjectDef *rootObj = context->contextObjDef; + + if ( forWriting && lastPtrInQual < 0 ) { + /* If we are writing an no reference was found in the qualification + * then load the gloabl with a revert. */ + if ( pd->revertOn ) + code.append( IN_LOAD_CONTEXT_WV ); + else + code.append( IN_LOAD_CONTEXT_WC ); + } + else { + /* Either we are reading or we are loading a pointer that will be + * dereferenced. */ + code.append( IN_LOAD_CONTEXT_R ); + } + + loadQualification( pd, code, rootObj->rootScope, lastPtrInQual, forWriting, true ); +} + +void LangVarRef::loadGlobalObj( Compiler *pd, CodeVect &code, + int lastPtrInQual, bool forWriting ) const +{ + /* Start the search in the global object. */ + ObjectDef *rootObj = pd->globalObjectDef; + + if ( forWriting && lastPtrInQual < 0 ) { + /* If we are writing an no reference was found in the qualification + * then load the gloabl with a revert. */ + if ( pd->revertOn ) + code.append( IN_LOAD_GLOBAL_WV ); + else + code.append( IN_LOAD_GLOBAL_WC ); + } + else { + /* Either we are reading or we are loading a pointer that will be + * dereferenced. */ + code.append( IN_LOAD_GLOBAL_R ); + } + + loadQualification( pd, code, rootObj->rootScope, lastPtrInQual, forWriting, true ); +} + +void LangVarRef::loadCustom( Compiler *pd, CodeVect &code, + int lastPtrInQual, bool forWriting ) const +{ + /* Start the search in the local frame. */ + loadQualification( pd, code, scope, lastPtrInQual, forWriting, pd->revertOn ); +} + +void LangVarRef::loadLocalObj( Compiler *pd, CodeVect &code, + int lastPtrInQual, bool forWriting ) const +{ + /* Start the search in the local frame. */ + loadQualification( pd, code, scope, lastPtrInQual, forWriting, false ); +} + +void LangVarRef::loadObj( Compiler *pd, CodeVect &code, + int lastPtrInQual, bool forWriting ) const +{ + if ( isCustom() ) + loadCustom( pd, code, lastPtrInQual, forWriting ); + else if ( isLocalRef() ) + loadLocalObj( pd, code, lastPtrInQual, forWriting ); + else if ( isContextRef() ) + loadContextObj( pd, code, lastPtrInQual, forWriting ); + else + loadGlobalObj( pd, code, lastPtrInQual, forWriting ); +} + + +bool castAssignment( Compiler *pd, CodeVect &code, UniqueType *destUT, + UniqueType *destSearchUT, UniqueType *srcUT ) +{ + if ( destUT == srcUT ) + return true; + + /* Casting trees to any. */ + if ( destUT->typeId == TYPE_TREE && destUT->langEl == pd->anyLangEl && + srcUT->typeId == TYPE_TREE ) + return true; + + /* Setting a reference from a tree. */ + if ( destUT->typeId == TYPE_REF && srcUT->typeId == TYPE_TREE && + destUT->langEl == srcUT->langEl ) + return true; + + /* Setting a tree from a reference. */ + if ( destUT->typeId == TYPE_TREE && srcUT->typeId == TYPE_REF && + destUT->langEl == srcUT->langEl ) + return true; + + /* Setting an iterator from a tree. */ + if ( destUT->typeId == TYPE_ITER && srcUT->typeId == TYPE_TREE && + destSearchUT->langEl == srcUT->langEl ) + return true; + + /* Assigning nil to a tree. */ + if ( destUT->typeId == TYPE_TREE && srcUT->typeId == TYPE_NIL ) + return true; + + /* Assigning nil to a pointer. */ + if ( destUT->typeId == TYPE_PTR && srcUT->typeId == TYPE_NIL ) + return true; + + return false; +} + +void LangVarRef::setFieldIter( Compiler *pd, CodeVect &code, + ObjectDef *inObject, ObjectField *el, UniqueType *objUT, + UniqueType *exprType, bool revert ) const +{ + code.append( objUT->iterDef->inSetCurWC ); + code.appendHalf( el->offset ); +} + +void LangVarRef::setField( Compiler *pd, CodeVect &code, + ObjectDef *inObject, ObjectField *el, + UniqueType *exprUT, bool revert ) const +{ + /* Ensure that the field is referenced. */ + inObject->referenceField( pd, el ); + + if ( pd->revertOn && revert ) + code.append( el->inSetWV ); + else + code.append( el->inSetWC ); + + /* Maybe write out an offset. */ + if ( el->useOffset ) + code.appendHalf( el->offset ); +} + + +UniqueType *LangVarRef::evaluate( Compiler *pd, CodeVect &code, bool forWriting ) const +{ + /* Lookup the loadObj. */ + VarRefLookup lookup = lookupField( pd ); + + /* Load the object, if any. */ + loadObj( pd, code, lookup.lastPtrInQual, forWriting ); + + /* Load the field. */ + UniqueType *ut = loadField( pd, code, lookup.inObject, + lookup.objField, forWriting, false ); + + return ut; +} + +bool LangVarRef::canTakeRefTest( Compiler *pd, VarRefLookup &lookup ) const +{ + bool canTake = false; + + /* If the var is not a local, it must be an attribute accessed + * via a local and attributes. */ + if ( lookup.inObject->type == ObjectDef::FrameType ) + canTake = true; + else if ( isLocalRef() && lookup.lastPtrInQual < 0 && lookup.uniqueType->typeId != TYPE_PTR ) + canTake = true; + + return canTake; +} + +void LangVarRef::canTakeRef( Compiler *pd, VarRefLookup &lookup ) const +{ + bool canTake = canTakeRefTest( pd, lookup ); + + if ( !canTake ) { + error(loc) << "can only take references of locals or " + "attributes accessed via a local" << endp; + } + + if ( lookup.objField->refActive ) + error(loc) << "reference currently active, cannot take another" << endp; +} + +bool LangExpr::canTakeRefTest( Compiler *pd ) const +{ + bool canTake = false; + + if ( type == LangExpr::TermType && term->type == LangTerm::VarRefType ) { + VarRefLookup lookup = term->varRef->lookupField( pd ); + if ( term->varRef->canTakeRefTest( pd, lookup ) ) + canTake = true; + } + return canTake; +} + + +/* Return the field referenced. */ +ObjectField *LangVarRef::preEvaluateRef( Compiler *pd, CodeVect &code ) const +{ + VarRefLookup lookup = lookupField( pd ); + + canTakeRef( pd, lookup ); + + loadQualificationRefs( pd, code, scope ); + + return lookup.objField; +} + +/* Return the field referenced. */ +ObjectField *LangVarRef::evaluateRef( Compiler *pd, CodeVect &code, long pushCount ) const +{ + VarRefLookup lookup = lookupField( pd ); + + canTakeRef( pd, lookup ); + + /* Ensure that the field is referenced. */ + lookup.inObject->referenceField( pd, lookup.objField ); + + /* Note that we could have modified children. */ + if ( qual->length() == 0 ) + lookup.objField->refActive = true; + + /* Whenever we take a reference we have to assume writing and that the + * tree is dirty. */ + lookup.objField->dirtyTree = true; + + if ( qual->length() > 0 ) { + code.append( IN_REF_FROM_QUAL_REF ); + code.appendHalf( pushCount ); + code.appendHalf( lookup.objField->offset ); + } + else if ( lookup.objField->typeRef->iterDef != 0 ) { + code.append( lookup.objField->typeRef->iterDef->inRefFromCur ); + code.appendHalf( lookup.objField->offset ); + } + else if ( lookup.objField->typeRef->type == TypeRef::Ref ) { + code.append( IN_REF_FROM_REF ); + code.appendHalf( lookup.objField->offset ); + } + else { + code.append( IN_REF_FROM_LOCAL ); + code.appendHalf( lookup.objField->offset ); + } + + return lookup.objField; +} + + +ObjectField **LangVarRef::evaluateArgs( Compiler *pd, CodeVect &code, + VarRefLookup &lookup, CallArgVect *args ) const +{ + /* Parameter list is given only for user defined methods. Otherwise it + * will be null. */ + ParameterList *paramList = lookup.objMethod->paramList; + + /* Match the number of arguments. */ + int numArgs = args != 0 ? args->length() : 0; + if ( numArgs != lookup.objMethod->numParams ) + error(loc) << "wrong number of arguments" << endp; + + /* This is for storing the object fields used by references. */ + ObjectField **paramRefs = new ObjectField*[numArgs]; + memset( paramRefs, 0, sizeof(ObjectField*) * numArgs ); + + /* Evaluate and push the args. */ + if ( args != 0 ) { + /* We use this only if there is a paramter list. */ + ParameterList::Iter p; + long size = 0; + + /* First pass we need to allocate and evaluate temporaries. */ + paramList != 0 && ( p = *paramList ); + for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) { + /* Get the expression and the UT for the arg. */ + LangExpr *expression = (*pe)->expr; + UniqueType *paramUT = lookup.objMethod->paramUTs[pe.pos()]; + + if ( paramUT->typeId == TYPE_REF ) { + /* Make sure we are dealing with a variable reference. */ + if ( ! expression->canTakeRefTest( pd ) ) { + /* Evaluate the expression. */ + UniqueType *exprUT = expression->evaluate( pd, code ); + (*pe)->exprUT = exprUT; + + size += 1; + (*pe)->offTmp = size; + } + } + + /* Advance the parameter list iterator if we have it. */ + paramList != 0 && p.increment(); + } + + + /* Second pass we need to push object loads for reference parameters. */ + paramList != 0 && ( p = *paramList ); + for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) { + /* Get the expression and the UT for the arg. */ + LangExpr *expression = (*pe)->expr; + UniqueType *paramUT = lookup.objMethod->paramUTs[pe.pos()]; + + if ( paramUT->typeId == TYPE_REF ) { + if ( expression->canTakeRefTest( pd ) ) { + /* Lookup the field. */ + LangVarRef *varRef = expression->term->varRef; + ObjectField *refOf = varRef->preEvaluateRef( pd, code ); + paramRefs[pe.pos()] = refOf; + + size += varRef->qual->length() * 2; + (*pe)->offQualRef = size; + } + } + + /* Advance the parameter list iterator if we have it. */ + paramList != 0 && p.increment(); + } + + paramList != 0 && ( p = *paramList ); + for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) { + /* Get the expression and the UT for the arg. */ + LangExpr *expression = (*pe)->expr; + UniqueType *paramUT = lookup.objMethod->paramUTs[pe.pos()]; + + if ( paramUT->typeId == TYPE_REF ) { + if ( expression->canTakeRefTest( pd ) ) { + /* Lookup the field. */ + LangVarRef *varRef = expression->term->varRef; + + ObjectField *refOf = varRef->evaluateRef( pd, code, (size - (*pe)->offQualRef) ); + paramRefs[pe.pos()] = refOf; + + size += 2; + } + else { + code.append( IN_REF_FROM_BACK ); + code.appendHalf( size - (*pe)->offTmp ); + + size += 2; + } + } + else { + UniqueType *exprUT = expression->evaluate( pd, code ); + + if ( !castAssignment( pd, code, paramUT, 0, exprUT ) ) + error(loc) << "arg " << pe.pos()+1 << " is of the wrong type" << endp; + + size += 1; + } + + /* Advance the parameter list iterator if we have it. */ + paramList != 0 && p.increment(); + } + } + + return paramRefs; +} + +void LangVarRef::resetActiveRefs( Compiler *pd, VarRefLookup &lookup, ObjectField **paramRefs ) const +{ + /* Parameter list is given only for user defined methods. Otherwise it + * will be null. */ + for ( long p = 0; p < lookup.objMethod->numParams; p++ ) { + if ( paramRefs[p] != 0 ) + paramRefs[p]->refActive = false; + } +} + +void LangVarRef::callOperation( Compiler *pd, CodeVect &code, VarRefLookup &lookup ) const +{ + /* This is for writing if it is a non-const builtin. */ + bool forWriting = lookup.objMethod->func == 0 && + !lookup.objMethod->isConst; + + if ( lookup.objMethod->useCallObj ) { + /* Load the object, if any. */ + loadObj( pd, code, lookup.lastPtrInQual, forWriting ); + } + + /* Check if we need to revert the function. If it operates on a reference + * or if it is not local then we need to revert it. */ + bool revert = lookup.lastPtrInQual >= 0 || !isLocalRef() || isCustom(); + + /* The call instruction. */ + if ( pd->revertOn && revert ) { + if ( lookup.objMethod->opcodeWV == IN_PARSE_FINISH_WV ) { + code.append( IN_PARSE_SAVE_STEPS ); + code.append( IN_PARSE_FINISH_WV ); + code.appendHalf( 0 ); + code.append( IN_PCR_CALL ); + code.append( IN_PARSE_FINISH_EXIT_WV ); + } + else { + code.append( lookup.objMethod->opcodeWV ); + } + } + else { + if ( lookup.objMethod->opcodeWC == IN_PARSE_FINISH_WC ) { + code.append( IN_PARSE_SAVE_STEPS ); + code.append( IN_PARSE_FINISH_WC ); + code.appendHalf( 0 ); + code.append( IN_PCR_CALL ); + code.append( IN_PARSE_FINISH_EXIT_WC ); + } + else { + code.append( lookup.objMethod->opcodeWC ); + } + } + + if ( lookup.objMethod->useFuncId ) + code.appendHalf( lookup.objMethod->funcId ); +} + +void LangVarRef::popRefQuals( Compiler *pd, CodeVect &code, + VarRefLookup &lookup, CallArgVect *args ) const +{ + long popCount = 0; + + /* Evaluate and push the args. */ + if ( args != 0 ) { + for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) { + /* Get the expression and the UT for the arg. */ + LangExpr *expression = (*pe)->expr; + UniqueType *paramUT = lookup.objMethod->paramUTs[pe.pos()]; + + if ( paramUT->typeId == TYPE_REF ) { + if ( expression->canTakeRefTest( pd ) ) { + LangVarRef *varRef = expression->term->varRef; + popCount += varRef->qual->length() * 2; + } + } + } + + if ( popCount > 0 ) { + code.append( IN_POP_N_WORDS ); + code.appendHalf( (short)popCount ); + } + + for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) { + /* Get the expression and the UT for the arg. */ + LangExpr *expression = (*pe)->expr; + UniqueType *paramUT = lookup.objMethod->paramUTs[pe.pos()]; + + if ( paramUT->typeId == TYPE_REF ) { + if ( ! expression->canTakeRefTest( pd ) ) + code.append( IN_POP ); + } + } + + } +} + +bool Compiler::beginContiguous( CodeVect &code, int stretch ) +{ + bool resetContiguous = false; + + if ( inContiguous ) + contiguousStretch += stretch; + else { + /* We add one for the push that always comes with the contiguous + * statement. */ + contiguousStretch = stretch + 1; + + code.append( IN_CONTIGUOUS ); + contiguousOffset = code.length(); + code.appendHalf( 0 ); + inContiguous = true; + resetContiguous = true; + } + + return resetContiguous; +} + +void Compiler::endContiguous( CodeVect &code, bool resetContiguous ) +{ + if ( resetContiguous ) { + inContiguous = false; + code.setHalf( contiguousOffset, contiguousStretch ); + contiguousOffset = 0; + } +} + +void Compiler::clearContiguous( CodeVect &code, bool resetContiguous ) +{ + if ( resetContiguous ) { + code.append( IN_TOP_SWAP ); + code.append( IN_POP ); + } +} + +UniqueType *LangVarRef::evaluateCall( Compiler *pd, CodeVect &code, CallArgVect *args ) +{ + /* Evaluate the object. */ + VarRefLookup lookup = lookupMethod( pd ); + + bool resetContiguous = false; + Function *func = lookup.objMethod->func; + if ( func != 0 ) { + long stretch = func->paramListSize + 5 + func->localFrame->size(); + resetContiguous = pd->beginContiguous( code, stretch ); + } + + /* Evaluate and push the arguments. */ + ObjectField **paramRefs = evaluateArgs( pd, code, lookup, args ); + + /* Write the call opcode. */ + callOperation( pd, code, lookup ); + + popRefQuals( pd, code, lookup, args ); + + resetActiveRefs( pd, lookup, paramRefs); + delete[] paramRefs; + + pd->endContiguous( code, resetContiguous ); + pd->clearContiguous( code, resetContiguous ); + + /* Return the type to the expression. */ + return lookup.uniqueType; +} + +UniqueType *LangTerm::evaluateMatch( Compiler *pd, CodeVect &code ) const +{ + /* Add the vars bound by the pattern into the local scope. */ + for ( PatternItemList::Iter item = *pattern->list; item.lte(); item++ ) { + if ( item->varRef != 0 ) + item->bindId = pattern->nextBindId++; + } + + UniqueType *ut = varRef->evaluate( pd, code ); + if ( ut->typeId != TYPE_TREE && ut->typeId != TYPE_REF ) { + error(varRef->loc) << "expected match against a tree/ref type" << endp; + } + + /* Store the language element type in the pattern. This is needed by + * the pattern parser. */ + pattern->langEl = ut->langEl; + + code.append( IN_MATCH ); + code.appendHalf( pattern->patRepId ); + + for ( PatternItemList::Iter item = pattern->list->last(); item.gtb(); item-- ) { + if ( item->varRef != 0 ) { + /* Compute the unique type. */ + UniqueType *exprType = pd->findUniqueType( TYPE_TREE, item->prodEl->langEl ); + + /* Get the type of the variable being assigned to. */ + VarRefLookup lookup = item->varRef->lookupField( pd ); + + item->varRef->loadObj( pd, code, lookup.lastPtrInQual, false ); + item->varRef->setField( pd, code, lookup.inObject, lookup.objField, exprType, false ); + } + } + + return ut; +} + +UniqueType *LangTerm::evaluateNew( Compiler *pd, CodeVect &code ) const +{ + /* Evaluate the expression. */ + UniqueType *ut = expr->evaluate( pd, code ); + if ( ut->typeId != TYPE_TREE ) + error() << "new can only be applied to tree types" << endp; + + code.append( IN_TREE_NEW ); + return pd->findUniqueType( TYPE_PTR, ut->langEl ); +} + +UniqueType *LangTerm::evaluateCast( Compiler *pd, CodeVect &code ) const +{ + expr->evaluate( pd, code ); + code.append( IN_TREE_CAST ); + code.appendHalf( typeRef->uniqueType->langEl->id ); + return typeRef->uniqueType; +} + +void LangTerm::assignFieldArgs( Compiler *pd, CodeVect &code, UniqueType *replUT ) const +{ + /* Now assign the field initializations. Note that we need to do this in + * reverse because the last expression evaluated is at the top of the + * stack. */ + if ( fieldInitArgs != 0 && fieldInitArgs->length() > 0 ) { + ObjectDef *objDef = replUT->objectDef(); + /* Note the reverse traversal. */ + for ( FieldInitVect::Iter pi = fieldInitArgs->last(); pi.gtb(); pi-- ) { + FieldInit *fieldInit = *pi; + ObjectField *field = objDef->findFieldNum( pi.pos() ); + if ( field == 0 ) { + error(fieldInit->loc) << "failed to find init pos " << + pi.pos() << " in object" << endp; + } + + /* Lookup the type of the field and compare it to the type of the + * expression. */ + UniqueType *fieldUT = field->typeRef->uniqueType; + if ( !castAssignment( pd, code, fieldUT, 0, fieldInit->exprUT ) ) + error(fieldInit->loc) << "type mismatch in initialization" << endp; + + /* The set field instruction must leave the object on the top of + * the stack. */ + code.append( IN_SET_FIELD_LEAVE_WC ); + code.appendHalf( field->offset ); + } + } +} + +UniqueType *LangTerm::evaluateConstruct( Compiler *pd, CodeVect &code ) const +{ + /* Evaluate the initialization expressions. */ + if ( fieldInitArgs != 0 && fieldInitArgs->length() > 0 ) { + for ( FieldInitVect::Iter pi = *fieldInitArgs; pi.lte(); pi++ ) { + FieldInit *fieldInit = *pi; + fieldInit->exprUT = fieldInit->expr->evaluate( pd, code ); + } + } + + /* Assign bind ids to the variables in the replacement. */ + for ( ConsItemList::Iter item = *constructor->list; item.lte(); item++ ) { + if ( item->expr != 0 ) + item->bindId = constructor->nextBindId++; + } + + /* Evaluate variable references. */ + for ( ConsItemList::Iter item = constructor->list->last(); item.gtb(); item-- ) { + if ( item->type == ConsItem::ExprType ) { + UniqueType *ut = item->expr->evaluate( pd, code ); + + if ( ut->typeId != TYPE_TREE ) + error() << "variables used in replacements must be trees" << endp; + + item->langEl = ut->langEl; + } + } + + /* Construct the tree using the tree information stored in the compiled + * code. */ + code.append( IN_CONSTRUCT ); + code.appendHalf( constructor->patRepId ); + + /* Lookup the type of the replacement and store it in the replacement + * object so that replacement parsing has a target. */ + UniqueType *replUT = typeRef->uniqueType; + if ( replUT->typeId != TYPE_TREE ) + error(loc) << "don't know how to construct this type" << endp; + + if ( replUT->langEl->generic != 0 && replUT->langEl->generic->typeId == GEN_PARSER ) { + code.append( IN_DUP_TOP ); + code.append( IN_CONSTRUCT_INPUT ); + code.append( IN_TOP_SWAP ); + code.append( IN_SET_INPUT ); + } + + constructor->langEl = replUT->langEl; + assignFieldArgs( pd, code, replUT ); + + if ( varRef != 0 ) { + code.append( IN_DUP_TOP ); + + /* Get the type of the variable being assigned to. */ + VarRefLookup lookup = varRef->lookupField( pd ); + + varRef->loadObj( pd, code, lookup.lastPtrInQual, false ); + varRef->setField( pd, code, lookup.inObject, lookup.objField, replUT, false ); + } + + return replUT; +} + +void LangTerm::parseFrag( Compiler *pd, CodeVect &code, int stopId ) const +{ + /* Parse instruction, dependent on whether or not we are producing + * revert or commit code. */ + if ( pd->revertOn ) { + code.append( IN_PARSE_SAVE_STEPS ); + code.append( IN_PARSE_FRAG_WV ); + code.appendHalf( stopId ); + code.append( IN_PCR_CALL ); + code.append( IN_PARSE_FRAG_EXIT_WV ); + } + else { + code.append( IN_PARSE_SAVE_STEPS ); + code.append( IN_PARSE_FRAG_WC ); + code.appendHalf( stopId ); + code.append( IN_PCR_CALL ); + code.append( IN_PARSE_FRAG_EXIT_WC ); + } +} + +UniqueType *LangTerm::evaluateParse( Compiler *pd, CodeVect &code, bool stop ) const +{ + UniqueType *targetUT = typeRef->uniqueType->langEl->generic->utArg; + + /* If this is a parse stop then we need to verify that the type is + * compatible with parse stop. */ + if ( stop ) + targetUT->langEl->parseStop = true; + int stopId = stop ? targetUT->langEl->id : 0; + + bool context = false; + if ( targetUT->langEl->contextIn != 0 ) { + if ( fieldInitArgs == 0 || fieldInitArgs->length() != 1 ) + error(loc) << "parse command requires just input" << endp; + context = true; + } + + /* Assign bind ids to the variables in the replacement. */ + for ( ConsItemList::Iter item = *constructor->list; item.lte(); item++ ) { + if ( item->expr != 0 ) + item->bindId = constructor->nextBindId++; + } + + /* Evaluate variable references. */ + for ( ConsItemList::Iter item = constructor->list->last(); item.gtb(); item-- ) { + if ( item->type == ConsItem::ExprType ) { + UniqueType *ut = item->expr->evaluate( pd, code ); + + if ( ut->typeId != TYPE_TREE ) + error() << "variables used in replacements must be trees" << endp; + + item->langEl = ut->langEl; + } + } + + /* Construct the tree using the tree information stored in the compiled + * code. */ + code.append( IN_CONSTRUCT ); + code.appendHalf( constructor->patRepId ); + + /* Dup for the finish operation. */ + code.append( IN_DUP_TOP ); + + /* + * First load the context into the parser. + */ + if ( context ) { + /* Dup the parser. */ + code.append( IN_DUP_TOP ); + + /* Eval the context. */ + UniqueType *argUT = fieldInitArgs->data[0]->expr->evaluate( pd, code ); + + if ( argUT != pd->uniqueTypeStream && argUT->typeId != TYPE_TREE ) + error(loc) << "context argument must be a stream or a tree" << endp; + + /* Store the context. */ + code.append( IN_TOP_SWAP ); + code.append( IN_SET_PARSER_CTX_WC ); + } + + /* For access to the replacement pattern. */ + UniqueType *parserUT = typeRef->uniqueType; + constructor->langEl = parserUT->langEl; + + /*****************************/ + + code.append( IN_DUP_TOP ); + code.append( IN_CONSTRUCT_INPUT ); + code.append( IN_TOP_SWAP ); + code.append( IN_SET_INPUT ); + + for ( ConsItemList::Iter item = *parserText->list; item.lte(); item++ ) + code.append( IN_DUP_TOP ); + + /* Assign bind ids to the variables in the replacement. */ + for ( ConsItemList::Iter item = *parserText->list; item.lte(); item++ ) { + switch ( item->type ) { + case ConsItem::LiteralType: { + String result; + bool unusedCI; + prepareLitString( result, unusedCI, + item->prodEl->typeRef->pdaLiteral->data, + item->prodEl->typeRef->pdaLiteral->loc ); + + /* Make sure we have this string. */ + StringMapEl *mapEl = 0; + if ( pd->literalStrings.insert( result, &mapEl ) ) + mapEl->value = pd->literalStrings.length()-1; + + code.append( IN_LOAD_STR ); + code.appendWord( mapEl->value ); + break; + } + case ConsItem::InputText: { + /* Make sure we have this string. */ + StringMapEl *mapEl = 0; + if ( pd->literalStrings.insert( item->data, &mapEl ) ) + mapEl->value = pd->literalStrings.length()-1; + + code.append( IN_LOAD_STR ); + code.appendWord( mapEl->value ); + break; + } + case ConsItem::ExprType: + item->expr->evaluate( pd, code ); + break; + } + + code.append( IN_TOP_SWAP ); + + /* Not a stream. Get the input first. */ + code.append( IN_GET_INPUT ); + if ( pd->revertOn ) + code.append( IN_INPUT_APPEND_WV ); + else + code.append( IN_INPUT_APPEND_WC ); + code.append( IN_POP ); + + code.append( IN_DUP_TOP ); + + /* Parse instruction, dependent on whether or not we are producing + * revert or commit code. */ + parseFrag( pd, code, stopId ); + } + + /* + * Finish operation + */ + + /* Parse instruction, dependent on whether or not we are producing revert + * or commit code. */ + if ( pd->revertOn ) { + /* Finish immediately. */ + code.append( IN_PARSE_SAVE_STEPS ); + code.append( IN_PARSE_FINISH_WV ); + code.appendHalf( stopId ); + code.append( IN_PCR_CALL ); + code.append( IN_PARSE_FINISH_EXIT_WV ); + } + else { + /* Finish immediately. */ + code.append( IN_PARSE_SAVE_STEPS ); + code.append( IN_PARSE_FINISH_WC ); + code.appendHalf( stopId ); + code.append( IN_PCR_CALL ); + code.append( IN_PARSE_FINISH_EXIT_WC ); + } + + code.append( IN_POP ); + + /* Parser is on the top of the stack. */ + + /* Pull out the error and save it off. */ + code.append( IN_DUP_TOP ); + code.append( IN_GET_PARSER_MEM_R ); + code.appendHalf( 1 ); + code.append( IN_SET_ERROR ); + + /* Replace the parser with the parsed tree. */ + code.append( IN_GET_PARSER_MEM_R ); + code.appendHalf( 0 ); + + /* + * Capture to the local var. + */ + if ( varRef != 0 ) { + code.append( IN_DUP_TOP ); + + /* Get the type of the variable being assigned to. */ + VarRefLookup lookup = varRef->lookupField( pd ); + + varRef->loadObj( pd, code, lookup.lastPtrInQual, false ); + varRef->setField( pd, code, lookup.inObject, lookup.objField, targetUT, false ); + } + + return targetUT; +} + +void LangTerm::evaluateSendStream( Compiler *pd, CodeVect &code ) const +{ + varRef->evaluate( pd, code ); + + for ( ConsItemList::Iter item = parserText->list->first(); item.lte(); item++ ) { + /* Load a dup of the stream. */ + code.append( IN_DUP_TOP ); + + switch ( item->type ) { + case ConsItem::LiteralType: { + String result; + bool unusedCI; + prepareLitString( result, unusedCI, + item->prodEl->typeRef->pdaLiteral->data, + item->prodEl->typeRef->pdaLiteral->loc ); + + /* Make sure we have this string. */ + StringMapEl *mapEl = 0; + if ( pd->literalStrings.insert( result, &mapEl ) ) + mapEl->value = pd->literalStrings.length()-1; + + code.append( IN_LOAD_STR ); + code.appendWord( mapEl->value ); + break; + } + case ConsItem::InputText: { + /* Make sure we have this string. */ + StringMapEl *mapEl = 0; + if ( pd->literalStrings.insert( item->data, &mapEl ) ) + mapEl->value = pd->literalStrings.length()-1; + + code.append( IN_LOAD_STR ); + code.appendWord( mapEl->value ); + break; + } + case ConsItem::ExprType: + UniqueType *ut = item->expr->evaluate( pd, code ); + if ( ut->typeId == TYPE_TREE && ut->langEl == pd->voidLangEl ) { + code.append( IN_POP ); + code.append( IN_POP ); + continue; + } + + break; + } + + code.append( IN_PRINT_STREAM ); + code.append( 1 ); + } + + + /* Normally we would have to pop the stream var ref that we evaluated + * before all the print arguments (which includes the stream, evaluated + * last), however we send is part of an expression, and is supposed to + * leave the varref on the stack. */ +} + +void LangTerm::evaluateSendParser( Compiler *pd, CodeVect &code ) const +{ + varRef->evaluate( pd, code ); + + /* Dup for every send. */ + for ( ConsItemList::Iter item = *parserText->list; item.lte(); item++ ) + code.append( IN_DUP_TOP ); + + /* Assign bind ids to the variables in the replacement. */ + for ( ConsItemList::Iter item = *parserText->list; item.lte(); item++ ) { + switch ( item->type ) { + case ConsItem::LiteralType: { + String result; + bool unusedCI; + prepareLitString( result, unusedCI, + item->prodEl->typeRef->pdaLiteral->data, + item->prodEl->typeRef->pdaLiteral->loc ); + + /* Make sure we have this string. */ + StringMapEl *mapEl = 0; + if ( pd->literalStrings.insert( result, &mapEl ) ) + mapEl->value = pd->literalStrings.length()-1; + + code.append( IN_LOAD_STR ); + code.appendWord( mapEl->value ); + break; + } + case ConsItem::InputText: { + /* Make sure we have this string. */ + StringMapEl *mapEl = 0; + if ( pd->literalStrings.insert( item->data, &mapEl ) ) + mapEl->value = pd->literalStrings.length()-1; + + code.append( IN_LOAD_STR ); + code.appendWord( mapEl->value ); + break; + } + case ConsItem::ExprType: + UniqueType *ut = item->expr->evaluate( pd, code ); + + if ( ut->typeId == TYPE_TREE && ut->langEl == pd->voidLangEl ) { + code.append( IN_POP ); + code.append( IN_POP ); + continue; + } + break; + } + + code.append( IN_TOP_SWAP ); + + /* Not a stream. Get the input first. */ + code.append( IN_GET_INPUT ); + if ( pd->revertOn ) + code.append( IN_INPUT_APPEND_WV ); + else + code.append( IN_INPUT_APPEND_WC ); + code.append( IN_POP ); + + code.append( IN_DUP_TOP ); + + parseFrag( pd, code, 0 ); + } + + if ( eof ) { + code.append( IN_PARSE_SAVE_STEPS ); + if ( pd->revertOn ) { + code.append( IN_PARSE_FINISH_WV ); + code.appendHalf( 0 ); + code.append( IN_PCR_CALL ); + code.append( IN_PARSE_FINISH_EXIT_WV ); + } + else { + code.append( IN_PARSE_FINISH_WC ); + code.appendHalf( 0 ); + code.append( IN_PCR_CALL ); + code.append( IN_PARSE_FINISH_EXIT_WC ); + } + } +} + +UniqueType *LangTerm::evaluateSend( Compiler *pd, CodeVect &code ) const +{ + UniqueType *varUt = varRef->lookup( pd ); + + if ( varUt == pd->uniqueTypeStream ) { + evaluateSendStream( pd, code ); + } + else if ( varUt->langEl->generic != 0 && + varUt->langEl->generic->typeId == GEN_PARSER ) + { + evaluateSendParser( pd, code ); + } + else { + error(loc) << "can only send to parsers and streams" << endl; + } + + return varUt; +} + + +UniqueType *LangTerm::evaluateEmbedString( Compiler *pd, CodeVect &code ) const +{ + /* Assign bind ids to the variables in the replacement. */ + for ( ConsItemList::Iter item = *consItemList; item.lte(); item++ ) { + switch ( item->type ) { + case ConsItem::LiteralType: { + String result; + bool unusedCI; + prepareLitString( result, unusedCI, + item->prodEl->typeRef->pdaLiteral->data, + item->prodEl->typeRef->pdaLiteral->loc ); + + /* Make sure we have this string. */ + StringMapEl *mapEl = 0; + if ( pd->literalStrings.insert( result, &mapEl ) ) + mapEl->value = pd->literalStrings.length()-1; + + code.append( IN_LOAD_STR ); + code.appendWord( mapEl->value ); + break; + } + case ConsItem::InputText: { + /* Make sure we have this string. */ + StringMapEl *mapEl = 0; + if ( pd->literalStrings.insert( item->data, &mapEl ) ) + mapEl->value = pd->literalStrings.length()-1; + + code.append( IN_LOAD_STR ); + code.appendWord( mapEl->value ); + break; + } + case ConsItem::ExprType: + item->expr->evaluate( pd, code ); + break; + } + + } + + /* If there was nothing loaded, load the empty string. We must produce + * something. */ + if ( consItemList->length() == 0 ) { + String result = ""; + + /* Make sure we have this string. */ + StringMapEl *mapEl = 0; + if ( pd->literalStrings.insert( result, &mapEl ) ) + mapEl->value = pd->literalStrings.length()-1; + + code.append( IN_LOAD_STR ); + code.appendWord( mapEl->value ); + } + + long items = consItemList->length(); + for ( long i = 0; i < items-1; i++ ) + code.append( IN_CONCAT_STR ); + + return pd->uniqueTypeStr; +} + +UniqueType *LangTerm::evaluateSearch( Compiler *pd, CodeVect &code ) const +{ + UniqueType *ut = typeRef->uniqueType; + if ( ut->typeId != TYPE_TREE ) + error(loc) << "can only search for tree types" << endp; + + /* Evaluate the expression. */ + UniqueType *treeUT = varRef->evaluate( pd, code ); + if ( treeUT->typeId != TYPE_TREE && treeUT->typeId != TYPE_REF ) + error(loc) << "search can be applied only to tree/ref types" << endp; + + /* Run the search. */ + code.append( IN_TREE_SEARCH ); + code.appendWord( ut->langEl->id ); + return ut; +} + +UniqueType *LangTerm::evaluate( Compiler *pd, CodeVect &code ) const +{ + switch ( type ) { + case VarRefType: + return varRef->evaluate( pd, code ); + case MethodCallType: + return varRef->evaluateCall( pd, code, args ); + case NilType: + code.append( IN_LOAD_NIL ); + return pd->uniqueTypeNil; + case TrueType: + code.append( IN_LOAD_TRUE ); + return pd->uniqueTypeBool; + case FalseType: + code.append( IN_LOAD_FALSE ); + return pd->uniqueTypeBool; + case MakeTokenType: + return evaluateMakeToken( pd, code ); + case MakeTreeType: + return evaluateMakeTree( pd, code ); + case NumberType: { + unsigned int n = atoi( data ); + code.append( IN_LOAD_INT ); + code.appendWord( n ); + return pd->uniqueTypeInt; + } + case StringType: { + String interp; + bool unused; + prepareLitString( interp, unused, data, InputLoc() ); + + /* Make sure we have this string. */ + StringMapEl *mapEl = 0; + if ( pd->literalStrings.insert( interp, &mapEl ) ) + mapEl->value = pd->literalStrings.length()-1; + + code.append( IN_LOAD_STR ); + code.appendWord( mapEl->value ); + return pd->uniqueTypeStr; + } + case MatchType: + return evaluateMatch( pd, code ); + case ParseType: + return evaluateParse( pd, code, false ); + case ParseStopType: + return evaluateParse( pd, code, true ); + case ConstructType: + return evaluateConstruct( pd, code ); + case SendType: + return evaluateSend( pd, code ); + case NewType: + return evaluateNew( pd, code ); + case TypeIdType: { + /* Evaluate the expression. */ + UniqueType *ut = typeRef->uniqueType; + if ( ut->typeId != TYPE_TREE ) + error() << "typeid can only be applied to tree types" << endp; + + code.append( IN_LOAD_INT ); + code.appendWord( ut->langEl->id ); + return pd->uniqueTypeInt; + } + case SearchType: + return evaluateSearch( pd, code ); + case EmbedStringType: + return evaluateEmbedString( pd, code ); + case CastType: + return evaluateCast( pd, code ); + } + return 0; +} + +UniqueType *LangExpr::evaluate( Compiler *pd, CodeVect &code ) const +{ + switch ( type ) { + case BinaryType: { + switch ( op ) { + case '+': { + UniqueType *lt = left->evaluate( pd, code ); + UniqueType *rt = right->evaluate( pd, code ); + + if ( lt == pd->uniqueTypeInt && rt == pd->uniqueTypeInt ) { + code.append( IN_ADD_INT ); + return pd->uniqueTypeInt; + } + + if ( lt == pd->uniqueTypeStr && rt == pd->uniqueTypeStr ) { + code.append( IN_CONCAT_STR ); + return pd->uniqueTypeStr; + } + + error(loc) << "do not have an addition operator for these types" << endp; + break; + } + case '-': { + UniqueType *lt = left->evaluate( pd, code ); + UniqueType *rt = right->evaluate( pd, code ); + + if ( lt == pd->uniqueTypeInt && rt == pd->uniqueTypeInt ) { + code.append( IN_SUB_INT ); + return pd->uniqueTypeInt; + } + + error(loc) << "do not have an addition operator for these types" << endp; + break; + } + case '*': { + UniqueType *lt = left->evaluate( pd, code ); + UniqueType *rt = right->evaluate( pd, code ); + + if ( lt == pd->uniqueTypeInt && rt == pd->uniqueTypeInt ) { + code.append( IN_MULT_INT ); + return pd->uniqueTypeInt; + } + + error(loc) << "do not have an multiplication " + "operator for these types" << endp; + break; + } + case '/': { + UniqueType *lt = left->evaluate( pd, code ); + UniqueType *rt = right->evaluate( pd, code ); + + if ( lt == pd->uniqueTypeInt && rt == pd->uniqueTypeInt ) { + code.append( IN_DIV_INT ); + return pd->uniqueTypeInt; + } + + error(loc) << "do not have an division" + "operator for these types" << endp; + break; + } + case OP_DoubleEql: { + UniqueType *lt = left->evaluate( pd, code ); + UniqueType *rt = right->evaluate( pd, code ); + + if ( lt != rt ) + error(loc) << "comparison of different types" << endp; + + code.append( IN_TST_EQL ); + return pd->uniqueTypeBool; + } + case OP_NotEql: { + UniqueType *lt = left->evaluate( pd, code ); + UniqueType *rt = right->evaluate( pd, code ); + + if ( lt != rt ) + error(loc) << "comparison of different types" << endp; + + code.append( IN_TST_NOT_EQL ); + return pd->uniqueTypeBool; + } + case '<': { + left->evaluate( pd, code ); + right->evaluate( pd, code ); + + code.append( IN_TST_LESS ); + return pd->uniqueTypeBool; + } + case '>': { + left->evaluate( pd, code ); + right->evaluate( pd, code ); + + code.append( IN_TST_GRTR ); + return pd->uniqueTypeBool; + } + case OP_LessEql: { + left->evaluate( pd, code ); + right->evaluate( pd, code ); + + code.append( IN_TST_LESS_EQL ); + return pd->uniqueTypeBool; + } + case OP_GrtrEql: { + left->evaluate( pd, code ); + right->evaluate( pd, code ); + + code.append( IN_TST_GRTR_EQL ); + return pd->uniqueTypeBool; + } + case OP_LogicalAnd: { + /* Evaluate the left and duplicate it. */ + left->evaluate( pd, code ); + code.append( IN_DUP_TOP ); + + /* Jump over the right if false, leaving the original left + * result on the top of the stack. We don't know the + * distance yet so record the position of the jump. */ + long jump = code.length(); + code.append( IN_JMP_FALSE ); + code.appendHalf( 0 ); + + /* Evauluate the right, add the test. Store it separately. */ + right->evaluate( pd, code ); + code.append( IN_TST_LOGICAL_AND ); + + /* Set the distance of the jump. */ + long distance = code.length() - jump - 3; + code.setHalf( jump+1, distance ); + + return pd->uniqueTypeInt; + } + case OP_LogicalOr: { + /* Evaluate the left and duplicate it. */ + left->evaluate( pd, code ); + code.append( IN_DUP_TOP ); + + /* Jump over the right if true, leaving the original left + * result on the top of the stack. We don't know the + * distance yet so record the position of the jump. */ + long jump = code.length(); + code.append( IN_JMP_TRUE ); + code.appendHalf( 0 ); + + /* Evauluate the right, add the test. */ + right->evaluate( pd, code ); + code.append( IN_TST_LOGICAL_OR ); + + /* Set the distance of the jump. */ + long distance = code.length() - jump - 3; + code.setHalf( jump+1, distance ); + + return pd->uniqueTypeInt; + } + } + + assert(false); + return 0; + } + case UnaryType: { + switch ( op ) { + case '!': { + /* Evaluate the left and duplicate it. */ + right->evaluate( pd, code ); + code.append( IN_NOT ); + return pd->uniqueTypeBool; + } + case '$': { + right->evaluate( pd, code ); + code.append( IN_TREE_TO_STR_TRIM ); + return pd->uniqueTypeStr; + + } + case '%': { + right->evaluate( pd, code ); + code.append( IN_TREE_TO_STR ); + return pd->uniqueTypeStr; + } + case '^': { + UniqueType *rt = right->evaluate( pd, code ); + code.append( IN_TREE_TRIM ); + return rt; + } + case OP_Deref: { + UniqueType *ut = right->evaluate( pd, code ); + if ( ut->typeId != TYPE_PTR ) + error(loc) << "can only dereference pointers" << endl; + + code.append( IN_PTR_DEREF_R ); + ut = pd->findUniqueType( TYPE_TREE, ut->langEl ); + return ut; + } + default: + assert(false); + } + return 0; + } + case TermType: { + return term->evaluate( pd, code ); + } + } + return 0; +} + +void LangVarRef::assignValue( Compiler *pd, CodeVect &code, + UniqueType *exprUT ) const +{ + /* Lookup the left hand side of the assignment. */ + VarRefLookup lookup = lookupField( pd ); + + if ( lookup.objField->refActive ) + error(loc) << "reference active, cannot write to object" << endp; + + if ( lookup.firstConstPart >= 0 ) { + error(loc) << "left hand side qualification \"" << + qual->data[lookup.firstConstPart].data << "\" is const" << endp; + } + + if ( lookup.objField->isConst ) + error(loc) << "field \"" << name << "\" is const" << endp; + + /* Writing guarantees the field is dirty. tree is dirty. */ + lookup.objField->dirtyTree = true; + + /* Check the types of the assignment and possibly cast. */ + UniqueType *objUT = lookup.objField->typeRef->uniqueType; + assert( lookup.uniqueType == lookup.objField->typeRef->uniqueType ); + if ( !castAssignment( pd, code, objUT, lookup.iterSearchUT, exprUT ) ) + error(loc) << "type mismatch in assignment" << endp; + + /* Decide if we need to revert the assignment. */ + bool revert = lookup.lastPtrInQual >= 0 || !isLocalRef(); + + /* Load the object and generate the field setting code. */ + loadObj( pd, code, lookup.lastPtrInQual, true ); + + if ( lookup.uniqueType->typeId == TYPE_ITER ) + setFieldIter( pd, code, lookup.inObject, lookup.objField, lookup.uniqueType, exprUT, false ); + else + setField( pd, code, lookup.inObject, lookup.objField, exprUT, revert ); +} + +UniqueType *LangTerm::evaluateMakeToken( Compiler *pd, CodeVect &code ) const +{ +// if ( pd->compileContext != Compiler::CompileTranslation ) +// error(loc) << "make_token can be used only in a translation block" << endp; + + /* Match the number of arguments. */ + int numArgs = args != 0 ? args->length() : 0; + if ( numArgs < 2 ) + error(loc) << "need at least two arguments" << endp; + + for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) { + /* Evaluate. */ + UniqueType *exprUT = (*pe)->expr->evaluate( pd, code ); + + if ( pe.pos() == 0 && exprUT != pd->uniqueTypeInt ) + error(loc) << "first arg, id, must be an int" << endp; + + if ( pe.pos() == 1 && exprUT != pd->uniqueTypeStr ) + error(loc) << "second arg, length, must be a string" << endp; + } + + /* The token is now created, send it. */ + code.append( IN_MAKE_TOKEN ); + code.append( args->length() ); + + return pd->uniqueTypeAny; +} + +UniqueType *LangTerm::evaluateMakeTree( Compiler *pd, CodeVect &code ) const +{ +// if ( pd->compileContext != Compiler::CompileTranslation ) +// error(loc) << "make_tree can be used only in a translation block" << endp; + + /* Match the number of arguments. */ + int numArgs = args != 0 ? args->length() : 0; + if ( numArgs < 1 ) + error(loc) << "need at least one argument" << endp; + + for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) { + /* Evaluate. */ + UniqueType *exprUT = (*pe)->expr->evaluate( pd, code ); + + if ( pe.pos() == 0 && exprUT != pd->uniqueTypeInt ) + error(loc) << "first arg, nonterm id, must be an int" << endp; + } + + /* The token is now created, send it. */ + code.append( IN_MAKE_TREE ); + code.append( args->length() ); + + return pd->uniqueTypeAny; +} + +void LangStmt::compileForIterBody( Compiler *pd, + CodeVect &code, UniqueType *iterUT ) const +{ + /* Remember the top of the loop. */ + long top = code.length(); + + /* Advance */ + code.append( iterUT->iterDef->inAdvance ); + code.appendHalf( objField->offset ); + + /* Test: jump past the while block if false. Note that we don't have the + * distance yet. */ + long jumpFalse = code.length(); + code.append( IN_JMP_FALSE ); + code.appendHalf( 0 ); + + /* + * Set up the loop cleanup code. + */ + + /* Set up the current loop cleanup. */ + CodeVect loopCleanup; + if ( pd->loopCleanup != 0 ) + loopCleanup.setAs( *pd->loopCleanup ); + + /* Add the cleanup for the current loop. */ + loopCleanup.append( iterUT->iterDef->inDestroy ); + loopCleanup.appendHalf( objField->offset ); + + /* Push the loop cleanup. */ + CodeVect *oldLoopCleanup = pd->loopCleanup; + pd->loopCleanup = &loopCleanup; + + /* Compile the contents. */ + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->compile( pd, code ); + + pd->loopCleanup = oldLoopCleanup; + + /* Jump back to the top to retest. */ + long retestDist = code.length() - top + 3; + code.append( IN_JMP ); + code.appendHalf( -retestDist ); + + /* Set the jump false distance. */ + long falseDist = code.length() - jumpFalse - 3; + code.setHalf( jumpFalse+1, falseDist ); + + /* Compute the jump distance for the break jumps. */ + for ( LongVect::Iter brk = pd->breakJumps; brk.lte(); brk++ ) { + long distance = code.length() - *brk - 3; + code.setHalf( *brk+1, distance ); + } + pd->breakJumps.empty(); + + /* Destroy the iterator. */ + code.append( iterUT->iterDef->inDestroy ); + code.appendHalf( objField->offset ); + + /* Clean up any prepush args. */ +} + +void LangStmt::compileForIter( Compiler *pd, CodeVect &code ) const +{ + /* The type we are searching for. */ + UniqueType *searchUT = typeRef->uniqueType; + + /* Lookup the iterator call. Make sure it is an iterator. */ + VarRefLookup lookup = iterCall->langTerm->varRef->lookupMethod( pd ); + if ( lookup.objMethod->iterDef == 0 ) { + error(loc) << "attempt to iterate using something " + "that is not an iterator" << endp; + } + + bool resetContiguous = false; + Function *func = lookup.objMethod->func; + if ( func != 0 ) { + /* FIXME: what is the right size here (16)? */ + long stretch = func->paramListSize + 16 + func->localFrame->size(); + resetContiguous = pd->beginContiguous( code, stretch ); + } + + /* Also force the field to be initialized. */ + objField->scope->owner->initField( pd, objField ); + + /* + * Create the iterator from the local var. + */ + + UniqueType *iterUT = objField->typeRef->uniqueType; + + /* Evaluate and push the arguments. */ + ObjectField **paramRefs = iterCall->langTerm->varRef->evaluateArgs( + pd, code, lookup, iterCall->langTerm->args ); + + pd->endContiguous( code, resetContiguous ); + + if ( pd->revertOn ) + code.append( iterUT->iterDef->inCreateWV ); + else + code.append( iterUT->iterDef->inCreateWC ); + + code.appendHalf( objField->offset ); + if ( lookup.objMethod->func != 0 ) + code.appendHalf( lookup.objMethod->func->funcId ); + + if ( iterUT->iterDef->useSearchUT ) { + if ( searchUT->typeId == TYPE_PTR ) + code.appendHalf( pd->uniqueTypePtr->langEl->id ); + else + code.appendHalf( searchUT->langEl->id ); + } + + compileForIterBody( pd, code, iterUT ); + + + iterCall->langTerm->varRef->popRefQuals( pd, code, lookup, iterCall->langTerm->args ); + + iterCall->langTerm->varRef->resetActiveRefs( pd, lookup, paramRefs ); + delete[] paramRefs; + + if ( resetContiguous ) + code.append( IN_POP ); +} + +void LangStmt::compileWhile( Compiler *pd, CodeVect &code ) const +{ + /* Generate code for the while test. Remember the top. */ + long top = code.length(); + expr->evaluate( pd, code ); + + /* Jump past the while block if false. Note that we don't have the + * distance yet. */ + long jumpFalse = code.length(); + code.append( IN_JMP_FALSE ); + code.appendHalf( 0 ); + + /* Compute the while block. */ + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->compile( pd, code ); + + /* Jump back to the top to retest. */ + long retestDist = code.length() - top + 3; + code.append( IN_JMP ); + code.appendHalf( -retestDist ); + + /* Set the jump false distance. */ + long falseDist = code.length() - jumpFalse - 3; + code.setHalf( jumpFalse+1, falseDist ); + + /* Compute the jump distance for the break jumps. */ + for ( LongVect::Iter brk = pd->breakJumps; brk.lte(); brk++ ) { + long distance = code.length() - *brk - 3; + code.setHalf( *brk+1, distance ); + } + pd->breakJumps.empty(); +} + +void LangStmt::compile( Compiler *pd, CodeVect &code ) const +{ + switch ( type ) { + case PrintType: + case PrintXMLACType: + case PrintXMLType: + case PrintStreamType: { + UniqueType **types = new UniqueType*[exprPtrVect->length()]; + + /* Push the args backwards. */ + for ( CallArgVect::Iter pex = exprPtrVect->first(); pex.lte(); pex++ ) + types[pex.pos()] = (*pex)->expr->evaluate( pd, code ); + + /* Run the printing forwards. */ + if ( type == PrintType ) { + code.append( IN_PRINT ); + code.append( exprPtrVect->length() ); + } + else if ( type == PrintXMLACType ) { + code.append( IN_PRINT_XML_AC ); + code.append( exprPtrVect->length() ); + } + else if ( type == PrintXMLType ) { + code.append( IN_PRINT_XML ); + code.append( exprPtrVect->length() ); + } + else if ( type == PrintStreamType ) { + /* Minus one because the first arg is the stream. */ + code.append( IN_PRINT_STREAM ); + code.append( exprPtrVect->length() - 1 ); + } + + delete[] types; + + break; + } + case ExprType: { + /* Evaluate the exrepssion, then pop it immediately. */ + expr->evaluate( pd, code ); + code.append( IN_POP ); + break; + } + case IfType: { + long jumpFalse = 0, jumpPastElse = 0, distance = 0; + + /* Evaluate the test. */ + expr->evaluate( pd, code ); + + /* Jump past the if block if false. We don't know the distance + * yet so store the location of the jump. */ + jumpFalse = code.length(); + code.append( IN_JMP_FALSE ); + code.appendHalf( 0 ); + + /* Compile the if true branch. */ + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->compile( pd, code ); + + if ( elsePart != 0 ) { + /* Jump past the else code for the if true branch. */ + jumpPastElse = code.length(); + code.append( IN_JMP ); + code.appendHalf( 0 ); + } + + /* Set the distance for the jump false case. */ + distance = code.length() - jumpFalse - 3; + code.setHalf( jumpFalse+1, distance ); + + if ( elsePart != 0 ) { + /* Compile the else branch. */ + elsePart->compile( pd, code ); + + /* Set the distance for jump over the else part. */ + distance = code.length() - jumpPastElse - 3; + code.setHalf( jumpPastElse+1, distance ); + } + + break; + } + case ElseType: { + /* Compile the else branch. */ + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->compile( pd, code ); + break; + } + case RejectType: { + code.append( IN_REJECT ); + break; + } + case WhileType: { + compileWhile( pd, code ); + break; + } + case AssignType: { + /* Evaluate the exrepssion. */ + UniqueType *exprUT = expr->evaluate( pd, code ); + + /* Do the assignment. */ + varRef->assignValue( pd, code, exprUT ); + break; + } + case ForIterType: { + compileForIter( pd, code ); + break; + } + case ReturnType: { + /* Evaluate the exrepssion. */ + UniqueType *exprUT = expr->evaluate( pd, code ); + + if ( pd->curFunction == 0 ) { + /* In the main function */ + pd->mainReturnUT = exprUT; + } + else { + UniqueType *resUT = pd->curFunction->typeRef->uniqueType; + if ( !castAssignment( pd, code, resUT, 0, exprUT ) ) + error(loc) << "return value wrong type" << endp; + } + + code.append( IN_SAVE_RET ); + + /* The loop cleanup code. */ + if ( pd->loopCleanup != 0 ) + code.append( *pd->loopCleanup ); + + /* Jump to the return label. The distnacnce will be filled in + * later. */ + pd->returnJumps.append( code.length() ); + code.append( IN_JMP ); + code.appendHalf( 0 ); + break; + } + case BreakType: { + pd->breakJumps.append( code.length() ); + code.append( IN_JMP ); + code.appendHalf( 0 ); + break; + } + case YieldType: { + /* take a reference and yield it. Immediately reset the referece. */ + varRef->preEvaluateRef( pd, code ); + ObjectField *objField = varRef->evaluateRef( pd, code, 0 ); + code.append( IN_YIELD ); + + if ( varRef->qual->length() > 0 ) { + code.append( IN_POP_N_WORDS ); + code.appendHalf( (short)(varRef->qual->length()*2) ); + } + + objField->refActive = false; + break; + } + } +} + +void CodeBlock::compile( Compiler *pd, CodeVect &code ) const +{ + for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ ) + stmt->compile( pd, code ); +} + +void Compiler::findLocals( ObjectDef *localFrame, CodeBlock *block ) +{ + Locals &locals = block->locals; + + for ( ObjFieldList::Iter ol = *localFrame->objFieldList; ol.lte(); ol++ ) { + ObjectField *el = ol->value; + + /* FIXME: This test needs to be improved. Match_text was getting + * through before useOffset was tested. What will? */ + if ( el->useOffset && !el->isLhsEl && ( el->beenReferenced || el->isParam ) ) { + UniqueType *ut = el->typeRef->uniqueType; + if ( ut->typeId == TYPE_TREE || ut->typeId == TYPE_PTR ) { + int depth = el->scope->depth(); + locals.append( LocalLoc( LT_Tree, depth, el->offset ) ); + } + } + + if ( el->useOffset ) { + UniqueType *ut = el->typeRef->uniqueType; + if ( ut->typeId == TYPE_ITER ) { + int depth = el->scope->depth(); + LocalType type; + switch ( ut->iterDef->type ) { + case IterDef::Tree: + case IterDef::Child: + case IterDef::Repeat: + case IterDef::RevRepeat: + type = LT_Iter; + break; + case IterDef::RevChild: + type = LT_RevIter; + break; + case IterDef::User: + type = LT_UserIter; + break; + } + + locals.append( LocalLoc( type, depth, (int)el->offset ) ); + } + } + } +} + +void Compiler::makeProdCopies( Production *prod ) +{ + int pos = 0; + for ( ProdElList::Iter pel = *prod->prodElList; pel.lte(); pel++, pos++) { + if ( pel->captureField != 0 ) { + prod->copy.append( pel->captureField->offset ); + prod->copy.append( pos ); + } + } +} + +void Compiler::compileReductionCode( Production *prod ) +{ + CodeBlock *block = prod->redBlock; + + /* Init the compilation context. */ + compileContext = CompileReduction; + revertOn = true; + block->frameId = nextFrameId++; + + CodeVect &code = block->codeWV; + + /* Add the alloc frame opcode. We don't have the right + * frame size yet. We will fill it in later. */ + code.append( IN_INIT_LOCALS ); + code.appendHalf( 0 ); + long afterInit = code.length(); + + /* Compile the reduce block. */ + block->compile( this, code ); + + /* We have the frame size now. Set in the alloc frame instruction. */ + long frameSize = block->localFrame->size(); + code.setHalf( 1, frameSize ); + + /* Might need to load right hand side values. */ + addProdRHSLoads( prod, code, afterInit ); + + addProdLHSLoad( prod, code, afterInit ); + addPushBackLHS( prod, code, afterInit ); + + code.append( IN_PCR_RET ); + + /* Now that compilation is done variables are referenced. Make the local + * trees descriptor. */ + findLocals( block->localFrame, block ); +} + +void Compiler::compileTranslateBlock( LangEl *langEl ) +{ + CodeBlock *block = langEl->transBlock; + + /* Set up compilation context. */ + compileContext = CompileTranslation; + revertOn = true; + block->frameId = nextFrameId++; + + CodeVect &code = block->codeWV; + + /* Add the alloc frame opcode. We don't have the right + * frame size yet. We will fill it in later. */ + code.append( IN_INIT_LOCALS ); + code.appendHalf( 0 ); + + if ( langEl->tokenDef->reCaptureVect.length() > 0 ) { + code.append( IN_INIT_CAPTURES ); + code.append( langEl->tokenDef->reCaptureVect.length() ); + } + + /* Set the local frame and compile the reduce block. */ + block->compile( this, code ); + + /* We have the frame size now. Set in the alloc frame instruction. */ + long frameSize = block->localFrame->size(); + code.setHalf( 1, frameSize ); + + code.append( IN_PCR_RET ); + + /* Now that compilation is done variables are referenced. Make the local + * trees descriptor. */ + findLocals( block->localFrame, block ); +} + +void Compiler::compilePreEof( TokenRegion *region ) +{ + CodeBlock *block = region->preEofBlock; + + /* Set up compilation context. */ + compileContext = CompileTranslation; + revertOn = true; + block->frameId = nextFrameId++; + + addInput( block->localFrame ); + addCtx( block->localFrame ); + + CodeVect &code = block->codeWV; + + /* Add the alloc frame opcode. We don't have the right + * frame size yet. We will fill it in later. */ + code.append( IN_INIT_LOCALS ); + code.appendHalf( 0 ); + + /* Set the local frame and compile the reduce block. */ + block->compile( this, code ); + + /* We have the frame size now. Set in the alloc frame instruction. */ + long frameSize = block->localFrame->size(); + code.setHalf( 1, frameSize ); + + code.append( IN_PCR_RET ); + + /* Now that compilation is done variables are referenced. Make the local + * trees descriptor. */ + findLocals( block->localFrame, block ); +} + +void Compiler::compileRootBlock( ) +{ + CodeBlock *block = rootCodeBlock; + + /* The root block never needs to be reverted. */ + + /* Set up the compile context. No locals are needed for the root code + * block, but we need an empty local frame for the compile. */ + compileContext = CompileRoot; + revertOn = false; + + /* The block needs a frame id. */ + block->frameId = nextFrameId++; + + /* The root block is not reverted. */ + CodeVect &code = block->codeWC; + + /* Add the alloc frame opcode. We don't have the right + * frame size yet. We will fill it in later. */ + code.append( IN_INIT_LOCALS ); + code.appendHalf( 0 ); + + code.append( IN_LOAD_ARGV ); + code.appendHalf( argvOffset() ); + + block->compile( this, code ); + + /* We have the frame size now. Store it in frame init. */ + long frameSize = rootLocalFrame->size(); + code.setHalf( 1, frameSize ); + + code.append( IN_STOP ); + + /* Make the local trees descriptor. */ + findLocals( rootLocalFrame, block ); +} + +void Compiler::initAllLanguageObjects() +{ + /* Init all user object fields (need consistent size). */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + ObjectDef *objDef = lel->objectDef; + if ( objDef != 0 ) { + /* Init all fields of the object. */ + for ( ObjFieldList::Iter f = *objDef->objFieldList; f.lte(); f++ ) + objDef->initField( this, f->value ); + } + } + + /* Init all fields of the global object. */ + for ( ObjFieldList::Iter f = *globalObjectDef->objFieldList; f.lte(); f++ ) + globalObjectDef->initField( this, f->value ); +} + +void Compiler::initLocalFrame( ObjectDef *localFrame ) +{ + for ( ObjFieldList::Iter f = *localFrame->objFieldList; f.lte(); f++ ) + localFrame->initField( this, f->value ); +} + +void Compiler::initAllFrameObjects() +{ + /* Functions. */ + for ( FunctionList::Iter f = functionList; f.lte(); f++ ) + initLocalFrame( f->localFrame ); + + /* Reduction code. */ + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + if ( prod->redBlock != 0 ) + initLocalFrame( prod->redBlock->localFrame ); + } + + /* Token translation code. */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->transBlock != 0 ) { + ObjectDef *localFrame = lel->transBlock->localFrame; + if ( lel->tokenDef->reCaptureVect.length() > 0 ) { + ObjFieldList::Iter f = *localFrame->objFieldList; + for ( int i = 0; i < lel->tokenDef->reCaptureVect.length(); i++, f++ ) + localFrame->initField( this, f->value ); + } + + initLocalFrame( localFrame ); + } + } + + /* Preeof blocks. */ + for ( RegionList::Iter r = regionList; r.lte(); r++ ) { + if ( r->preEofBlock != 0 ) + initLocalFrame( r->preEofBlock->localFrame ); + } + + /* Root code. */ + initLocalFrame( rootLocalFrame ); +} + +void Compiler::initUserFunctions( Function *func, bool isUserIter ) +{ + /* Set up the parameters. */ + long paramPos = 0, paramListSize = 0; + UniqueType **paramUTs = new UniqueType*[func->paramList->length()]; + for ( ParameterList::Iter param = *func->paramList; param.lte(); param++ ) { + paramUTs[paramPos] = param->typeRef->uniqueType; + + /* Initialize the object field as a local variable. We also want trees + * downreffed. */ + if ( paramUTs[paramPos]->typeId == TYPE_REF ) + initLocalRefInstructions( param ); + else + initLocalInstructions( param ); + + paramListSize += sizeOfField( paramUTs[paramPos] ); + paramPos += 1; + } + + /* Param offset is relative to one past the last item in the array of + * words containing the args. */ + long paramOffset = 0; + for ( ParameterList::Iter param = *func->paramList; param.lte(); param++ ) { + /* Moving downward, and need the offset to point to the lower half of + * the argument. */ + paramOffset -= sizeOfField( paramUTs[param->pos] ); + + /* How much space do we need to make for call overhead. */ + long frameAfterArgs = isUserIter ? IFR_AA : FR_AA; + + /* Going up first we have the frame data, then maybe + * the user iterator, then the args from high to low. */ + param->offset = frameAfterArgs + + ( isUserIter ? ( sizeof(UserIter) / sizeof(Word) ) : 0 ) + + paramListSize + paramOffset; + } + + func->paramListSize = paramListSize; + func->paramUTs = paramUTs; + + func->objMethod->paramUTs = paramUTs; + + /* Insert the function into the global function map. */ + UniqueType *returnUT = func->typeRef != 0 ? + func->typeRef->uniqueType : uniqueTypeInt; + func->objMethod->returnUT = returnUT; + + func->objMethod->paramUTs = new UniqueType*[func->paramList->length()]; + memcpy( func->objMethod->paramUTs, paramUTs, sizeof(UniqueType*) * func->paramList->length() ); +} + +void Compiler::compileUserIter( Function *func, CodeVect &code ) +{ + CodeBlock *block = func->codeBlock; + + /* Add the alloc frame opcode. We don't have the right + * frame size yet. We will fill it in later. */ + code.append( IN_INIT_LOCALS ); + code.appendHalf( 0 ); + + /* Compile the block. */ + block->compile( this, code ); + + /* We have the frame size now. Set in the alloc frame instruction. */ + int frameSize = func->localFrame->size(); + code.setHalf( 1, frameSize ); + + /* Check for a return statement. */ + if ( block->stmtList->length() == 0 || + block->stmtList->tail->type != LangStmt::YieldType ) + { + /* Push the return value. */ + code.append( IN_LOAD_NIL ); + code.append( IN_YIELD ); + } +} + +void Compiler::compileUserIter( Function *func ) +{ + CodeBlock *block = func->codeBlock; + + /* Set up the context. */ + compileContext = CompileFunction; + curFunction = func; + block->frameId = nextFrameId++; + + /* Compile for revert and commit. */ + revertOn = true; + compileUserIter( func, block->codeWV ); + + revertOn = false; + compileUserIter( func, block->codeWC ); + + /* Now that compilation is done variables are referenced. Make the local + * trees descriptor. */ + findLocals( block->localFrame, block ); + + /* FIXME: Need to deal with the freeing of local trees. */ +} + +/* Called for each type of function compile: revert and commit. */ +void Compiler::compileFunction( Function *func, CodeVect &code ) +{ + CodeBlock *block = func->codeBlock; + + /* Add the alloc frame opcode. We don't have the right + * frame size yet. We will fill it in later. */ + code.append( IN_INIT_LOCALS ); + code.appendHalf( 0 ); + + /* Compile the block. */ + block->compile( this, code ); + + /* We have the frame size now. Set in the alloc frame instruction. */ + int frameSize = func->localFrame->size(); + code.setHalf( 1, frameSize ); + + /* Check for a return statement. */ + if ( block->stmtList->length() == 0 || + block->stmtList->tail->type != LangStmt::ReturnType ) + { + /* Push the return value. */ + code.append( IN_LOAD_NIL ); + code.append( IN_SAVE_RET ); + } + + /* Compute the jump distance for the return jumps. */ + for ( LongVect::Iter rj = returnJumps; rj.lte(); rj++ ) { + long distance = code.length() - *rj - 3; + code.setHalf( *rj+1, distance ); + } + + /* Reset the vector of return jumps. */ + returnJumps.empty(); + + /* Return cleans up the stack (including the args) and leaves the return + * value on the top. */ + code.append( IN_RET ); +} + +void Compiler::compileFunction( Function *func ) +{ + CodeBlock *block = func->codeBlock; + + /* Set up the compilation context. */ + compileContext = CompileFunction; + curFunction = func; + + /* Assign a frame Id. */ + block->frameId = nextFrameId++; + + /* Compile once for revert. */ + revertOn = true; + compileFunction( func, block->codeWV ); + + /* Compile once for commit. */ + revertOn = false; + compileFunction( func, block->codeWC ); + + /* Now that compilation is done variables are referenced. Make the local + * trees descriptor. */ + findLocals( block->localFrame, block ); +} + +void Compiler::removeNonUnparsableRepls() +{ + for ( ConsList::Iter repl = replList; repl.lte(); ) { + Constructor *maybeDel = repl++; + if ( !maybeDel->parse ) + replList.detach( maybeDel ); + } +} + +void Compiler::compileByteCode() +{ + /* Compile functions. */ + for ( FunctionList::Iter f = functionList; f.lte(); f++ ) { + if ( f->isUserIter ) + compileUserIter( f ); + else + compileFunction( f ); + } + + /* Compile the reduction code. */ + for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { + makeProdCopies( prod ); + if ( prod->redBlock != 0 ) + compileReductionCode( prod ); + } + + /* Compile the token translation code. */ + for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { + if ( lel->transBlock != 0 ) + compileTranslateBlock( lel ); + } + + /* Compile preeof blocks. */ + for ( RegionList::Iter r = regionList; r.lte(); r++ ) { + if ( r->preEofBlock != 0 ) + compilePreEof( r ); + } + + /* Compile the init code */ + compileRootBlock( ); + removeNonUnparsableRepls(); +} diff --git a/src/tree.c b/src/tree.c new file mode 100644 index 0000000..1abb720 --- /dev/null +++ b/src/tree.c @@ -0,0 +1,2263 @@ +/* + * Copyright 2007-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <colm/pdarun.h> +#include <colm/tree.h> +#include <colm/pool.h> +#include <colm/bytecode.h> +#include <colm/debug.h> +#include <colm/map.h> +#include <string.h> +#include <stdlib.h> +#include <stdio.h> +#include <unistd.h> +#include <assert.h> +#include <errno.h> + +#define true 1 +#define false 0 + +#define BUFFER_INITIAL_SIZE 4096 + +void listPrepend( List *list, ListEl *new_el) { listAddBefore(list, list->head, new_el); } +void listAppend( List *list, ListEl *new_el) { listAddAfter(list, list->tail, new_el); } + +ListEl *listDetach( List *list, ListEl *el ); +ListEl *listDetachFirst(List *list ) { return listDetach(list, list->head); } +ListEl *listDetachLast(List *list ) { return listDetach(list, list->tail); } + +long listLength(List *list) + { return list->listLen; } + +Kid *allocAttrs( Program *prg, long length ) +{ + Kid *cur = 0; + long i; + for ( i = 0; i < length; i++ ) { + Kid *next = cur; + cur = kidAllocate( prg ); + cur->next = next; + } + return cur; +} + +void freeAttrs( Program *prg, Kid *attrs ) +{ + Kid *cur = attrs; + while ( cur != 0 ) { + Kid *next = cur->next; + kidFree( prg, cur ); + cur = next; + } +} + +void freeKidList( Program *prg, Kid *kid ) +{ + while ( kid != 0 ) { + Kid *next = kid->next; + kidFree( prg, kid ); + kid = next; + } +} + +void setAttr( Tree *tree, long pos, Tree *val ) +{ + long i; + Kid *kid = tree->child; + + if ( tree->flags & AF_LEFT_IGNORE ) + kid = kid->next; + if ( tree->flags & AF_RIGHT_IGNORE ) + kid = kid->next; + + for ( i = 0; i < pos; i++ ) + kid = kid->next; + kid->tree = val; +} + +Tree *colm_get_global( Program *prg, long pos ) + { return colm_get_attr( prg->global, pos ); } + +Tree *colm_get_attr( Tree *tree, long pos ) +{ + long i; + Kid *kid = tree->child; + + if ( tree->flags & AF_LEFT_IGNORE ) + kid = kid->next; + if ( tree->flags & AF_RIGHT_IGNORE ) + kid = kid->next; + + for ( i = 0; i < pos; i++ ) + kid = kid->next; + return kid->tree; +} + + +Tree *colm_get_repeat_next( Tree *tree ) +{ + Kid *kid = tree->child; + + if ( tree->flags & AF_LEFT_IGNORE ) + kid = kid->next; + if ( tree->flags & AF_RIGHT_IGNORE ) + kid = kid->next; + + return kid->next->tree; +} + +Tree *colm_get_repeat_val( Tree *tree ) +{ + Kid *kid = tree->child; + + if ( tree->flags & AF_LEFT_IGNORE ) + kid = kid->next; + if ( tree->flags & AF_RIGHT_IGNORE ) + kid = kid->next; + + return kid->tree; +} + +int colm_repeat_end( Tree *tree ) +{ + Kid *kid = tree->child; + + if ( tree->flags & AF_LEFT_IGNORE ) + kid = kid->next; + if ( tree->flags & AF_RIGHT_IGNORE ) + kid = kid->next; + + return kid == 0; +} + +int colm_list_last( Tree *tree ) +{ + Kid *kid = tree->child; + + if ( tree->flags & AF_LEFT_IGNORE ) + kid = kid->next; + if ( tree->flags & AF_RIGHT_IGNORE ) + kid = kid->next; + + return kid->next == 0; +} + +Kid *getAttrKid( Tree *tree, long pos ) +{ + long i; + Kid *kid = tree->child; + + if ( tree->flags & AF_LEFT_IGNORE ) + kid = kid->next; + if ( tree->flags & AF_RIGHT_IGNORE ) + kid = kid->next; + + for ( i = 0; i < pos; i++ ) + kid = kid->next; + return kid; +} + +Kid *kidListConcat( Kid *list1, Kid *list2 ) +{ + if ( list1 == 0 ) + return list2; + else if ( list2 == 0 ) + return list1; + + Kid *dest = list1; + while ( dest->next != 0 ) + dest = dest->next; + dest->next = list2; + return list1; +} + + +Stream *openStreamFile( Program *prg, char *name, FILE *file ) +{ + Stream *res = (Stream*)mapElAllocate( prg ); + res->id = LEL_ID_STREAM; + res->in = newSourceStreamFile( name, file ); + return res; +} + +Stream *openStreamFd( Program *prg, char *name, long fd ) +{ + Stream *res = (Stream*)mapElAllocate( prg ); + res->id = LEL_ID_STREAM; + res->in = newSourceStreamFd( name, fd ); + return res; +} + +Stream *openFile( Program *prg, Tree *name, Tree *mode ) +{ + Head *headName = ((Str*)name)->value; + Head *headMode = ((Str*)mode)->value; + Stream *stream = 0; + + const char *givenMode = stringData(headMode); + const char *fopenMode = 0; + if ( memcmp( givenMode, "r", stringLength(headMode) ) == 0 ) + fopenMode = "rb"; + else if ( memcmp( givenMode, "w", stringLength(headMode) ) == 0 ) + fopenMode = "wb"; + else { + fatal( "unknown file open mode: %s\n", givenMode ); + } + + /* Need to make a C-string (null terminated). */ + char *fileName = (char*)malloc(stringLength(headName)+1); + memcpy( fileName, stringData(headName), stringLength(headName) ); + fileName[stringLength(headName)] = 0; + FILE *file = fopen( fileName, fopenMode ); + if ( file != 0 ) + stream = openStreamFile( prg, fileName, file ); + + return stream; +} + +Tree *constructInteger( Program *prg, long i ) +{ + Int *integer = (Int*) treeAllocate( prg ); + integer->id = LEL_ID_INT; + integer->value = i; + + return (Tree*)integer; +} + +Tree *constructString( Program *prg, Head *s ) +{ + Str *str = (Str*) treeAllocate( prg ); + str->id = LEL_ID_STR; + str->value = s; + + return (Tree*)str; +} + +Tree *constructPointer( Program *prg, Tree *tree ) +{ + Kid *kid = kidAllocate( prg ); + kid->tree = tree; + kid->next = prg->heap; + prg->heap = kid; + + Pointer *pointer = (Pointer*) treeAllocate( prg ); + pointer->id = LEL_ID_PTR; + pointer->value = kid; + + return (Tree*)pointer; +} + +Tree *constructTerm( Program *prg, Word id, Head *tokdata ) +{ + LangElInfo *lelInfo = prg->rtd->lelInfo; + + Tree *tree = treeAllocate( prg ); + tree->id = id; + tree->refs = 0; + tree->tokdata = tokdata; + + int objectLength = lelInfo[tree->id].objectLength; + tree->child = allocAttrs( prg, objectLength ); + + return tree; +} + +Tree *constructStream( Program *prg ) +{ + Stream *input = streamAllocate( prg ); + input->refs = 0; + input->id = LEL_ID_STREAM; + + input->in = newSourceStreamGeneric( "<internal>" ); + return (Tree*)input; +} + +Kid *constructReplacementKid( Tree **bindings, Program *prg, Kid *prev, long pat ); + +static Kid *constructIgnoreList( Program *prg, long ignoreInd ) +{ + PatConsNode *nodes = prg->rtd->patReplNodes; + + Kid *first = 0, *last = 0; + while ( ignoreInd >= 0 ) { + Head *ignoreData = stringAllocPointer( prg, nodes[ignoreInd].data, nodes[ignoreInd].length ); + + Tree *ignTree = treeAllocate( prg ); + ignTree->refs = 1; + ignTree->id = nodes[ignoreInd].id; + ignTree->tokdata = ignoreData; + + Kid *ignKid = kidAllocate( prg ); + ignKid->tree = ignTree; + ignKid->next = 0; + + if ( last == 0 ) + first = ignKid; + else + last->next = ignKid; + + ignoreInd = nodes[ignoreInd].next; + last = ignKid; + } + + return first; +} + +static Kid *constructLeftIgnoreList( Program *prg, long pat ) +{ + PatConsNode *nodes = prg->rtd->patReplNodes; + return constructIgnoreList( prg, nodes[pat].leftIgnore ); +} + +static Kid *constructRightIgnoreList( Program *prg, long pat ) +{ + PatConsNode *nodes = prg->rtd->patReplNodes; + return constructIgnoreList( prg, nodes[pat].rightIgnore ); +} + +static void insLeftIgnore( Program *prg, Tree *tree, Tree *ignoreList ) +{ + assert( ! (tree->flags & AF_LEFT_IGNORE) ); + + /* Allocate. */ + Kid *kid = kidAllocate( prg ); + kid->tree = ignoreList; + treeUpref( ignoreList ); + + /* Attach it. */ + kid->next = tree->child; + tree->child = kid; + + tree->flags |= AF_LEFT_IGNORE; +} + +static void insRightIgnore( Program *prg, Tree *tree, Tree *ignoreList ) +{ + assert( ! (tree->flags & AF_RIGHT_IGNORE) ); + + /* Insert an ignore head in the child list. */ + Kid *kid = kidAllocate( prg ); + kid->tree = ignoreList; + treeUpref( ignoreList ); + + /* Attach it. */ + if ( tree->flags & AF_LEFT_IGNORE ) { + kid->next = tree->child->next; + tree->child->next = kid; + } + else { + kid->next = tree->child; + tree->child = kid; + } + + tree->flags |= AF_RIGHT_IGNORE; +} + +Tree *pushRightIgnore( Program *prg, Tree *pushTo, Tree *rightIgnore ) +{ + /* About to alter the data tree. Split first. */ + pushTo = splitTree( prg, pushTo ); + + if ( pushTo->flags & AF_RIGHT_IGNORE ) { + /* The previous token already has a right ignore. Merge by + * attaching it as a left ignore of the new list. */ + Kid *curIgnore = treeRightIgnoreKid( prg, pushTo ); + insLeftIgnore( prg, rightIgnore, curIgnore->tree ); + + /* Replace the current ignore. Safe to access refs here because we just + * upreffed it in insLeftIgnore. */ + curIgnore->tree->refs -= 1; + curIgnore->tree = rightIgnore; + treeUpref( rightIgnore ); + } + else { + /* Attach The ignore list. */ + insRightIgnore( prg, pushTo, rightIgnore ); + } + + return pushTo; +} + +Tree *pushLeftIgnore( Program *prg, Tree *pushTo, Tree *leftIgnore ) +{ + pushTo = splitTree( prg, pushTo ); + + /* Attach as left ignore to the token we are sending. */ + if ( pushTo->flags & AF_LEFT_IGNORE ) { + /* The token already has a left-ignore. Merge by attaching it as a + * right ignore of the new list. */ + Kid *curIgnore = treeLeftIgnoreKid( prg, pushTo ); + insRightIgnore( prg, leftIgnore, curIgnore->tree ); + + /* Replace the current ignore. Safe to upref here because we just + * upreffed it in insRightIgnore. */ + curIgnore->tree->refs -= 1; + curIgnore->tree = leftIgnore; + treeUpref( leftIgnore ); + } + else { + /* Attach the ignore list. */ + insLeftIgnore( prg, pushTo, leftIgnore ); + } + + return pushTo; +} + +static void remLeftIgnore( Program *prg, Tree **sp, Tree *tree ) +{ + assert( tree->flags & AF_LEFT_IGNORE ); + + Kid *next = tree->child->next; + treeDownref( prg, sp, tree->child->tree ); + kidFree( prg, tree->child ); + tree->child = next; + + tree->flags &= ~AF_LEFT_IGNORE; +} + +static void remRightIgnore( Program *prg, Tree **sp, Tree *tree ) +{ + assert( tree->flags & AF_RIGHT_IGNORE ); + + if ( tree->flags & AF_LEFT_IGNORE ) { + Kid *next = tree->child->next->next; + treeDownref( prg, sp, tree->child->next->tree ); + kidFree( prg, tree->child->next ); + tree->child->next = next; + } + else { + Kid *next = tree->child->next; + treeDownref( prg, sp, tree->child->tree ); + kidFree( prg, tree->child ); + tree->child = next; + } + + tree->flags &= ~AF_RIGHT_IGNORE; +} + +Tree *popRightIgnore( Program *prg, Tree **sp, Tree *popFrom, Tree **rightIgnore ) +{ + /* Modifying the tree we are detaching from. */ + popFrom = splitTree( prg, popFrom ); + + Kid *riKid = treeRightIgnoreKid( prg, popFrom ); + + /* If the right ignore has a left ignore, then that was the original + * right ignore. */ + Kid *li = treeLeftIgnoreKid( prg, riKid->tree ); + if ( li != 0 ) { + treeUpref( li->tree ); + remLeftIgnore( prg, sp, riKid->tree ); + *rightIgnore = riKid->tree; + treeUpref( *rightIgnore ); + riKid->tree = li->tree; + } + else { + *rightIgnore = riKid->tree; + treeUpref( *rightIgnore ); + remRightIgnore( prg, sp, popFrom ); + } + + return popFrom; +} + +Tree *popLeftIgnore( Program *prg, Tree **sp, Tree *popFrom, Tree **leftIgnore ) +{ + /* Modifying, make the write safe. */ + popFrom = splitTree( prg, popFrom ); + + Kid *liKid = treeLeftIgnoreKid( prg, popFrom ); + + /* If the left ignore has a right ignore, then that was the original + * left ignore. */ + Kid *ri = treeRightIgnoreKid( prg, liKid->tree ); + if ( ri != 0 ) { + treeUpref( ri->tree ); + remRightIgnore( prg, sp, liKid->tree ); + *leftIgnore = liKid->tree; + treeUpref( *leftIgnore ); + liKid->tree = ri->tree; + } + else { + *leftIgnore = liKid->tree; + treeUpref( *leftIgnore ); + remLeftIgnore( prg, sp, popFrom ); + } + + return popFrom; +} + + +/* Returns an uprefed tree. Saves us having to downref and bindings to zero to + * return a zero-ref tree. */ +Tree *constructReplacementTree( Kid *kid, Tree **bindings, Program *prg, long pat ) +{ + PatConsNode *nodes = prg->rtd->patReplNodes; + LangElInfo *lelInfo = prg->rtd->lelInfo; + Tree *tree = 0; + + if ( nodes[pat].bindId > 0 ) { + /* All bindings have been uprefed. */ + tree = bindings[nodes[pat].bindId]; + + long ignore = nodes[pat].leftIgnore; + Tree *leftIgnore = 0; + if ( ignore >= 0 ) { + Kid *ignore = constructLeftIgnoreList( prg, pat ); + + leftIgnore = treeAllocate( prg ); + leftIgnore->id = LEL_ID_IGNORE; + leftIgnore->child = ignore; + + tree = pushLeftIgnore( prg, tree, leftIgnore ); + } + + ignore = nodes[pat].rightIgnore; + Tree *rightIgnore = 0; + if ( ignore >= 0 ) { + Kid *ignore = constructRightIgnoreList( prg, pat ); + + rightIgnore = treeAllocate( prg ); + rightIgnore->id = LEL_ID_IGNORE; + rightIgnore->child = ignore; + + tree = pushRightIgnore( prg, tree, rightIgnore ); + } + } + else { + tree = treeAllocate( prg ); + tree->id = nodes[pat].id; + tree->refs = 1; + tree->tokdata = nodes[pat].length == 0 ? 0 : + stringAllocPointer( prg, + nodes[pat].data, nodes[pat].length ); + tree->prodNum = nodes[pat].prodNum; + + int objectLength = lelInfo[tree->id].objectLength; + + Kid *attrs = allocAttrs( prg, objectLength ); + Kid *child = constructReplacementKid( bindings, prg, + 0, nodes[pat].child ); + + tree->child = kidListConcat( attrs, child ); + + /* Right first, then left. */ + Kid *ignore = constructRightIgnoreList( prg, pat ); + if ( ignore != 0 ) { + Tree *ignoreList = treeAllocate( prg ); + ignoreList->id = LEL_ID_IGNORE; + ignoreList->refs = 1; + ignoreList->child = ignore; + + Kid *ignoreHead = kidAllocate( prg ); + ignoreHead->tree = ignoreList; + ignoreHead->next = tree->child; + tree->child = ignoreHead; + + tree->flags |= AF_RIGHT_IGNORE; + } + + ignore = constructLeftIgnoreList( prg, pat ); + if ( ignore != 0 ) { + Tree *ignoreList = treeAllocate( prg ); + ignoreList->id = LEL_ID_IGNORE; + ignoreList->refs = 1; + ignoreList->child = ignore; + + Kid *ignoreHead = kidAllocate( prg ); + ignoreHead->tree = ignoreList; + ignoreHead->next = tree->child; + tree->child = ignoreHead; + + tree->flags |= AF_LEFT_IGNORE; + } + + int i; + for ( i = 0; i < lelInfo[tree->id].numCaptureAttr; i++ ) { + long ci = pat+1+i; + CaptureAttr *ca = prg->rtd->captureAttr + lelInfo[tree->id].captureAttr + i; + Tree *attr = treeAllocate( prg ); + attr->id = nodes[ci].id; + attr->refs = 1; + attr->tokdata = nodes[ci].length == 0 ? 0 : + stringAllocPointer( prg, + nodes[ci].data, nodes[ci].length ); + + setAttr( tree, ca->offset, attr ); + } + } + + return tree; +} + +Kid *constructReplacementKid( Tree **bindings, Program *prg, Kid *prev, long pat ) +{ + PatConsNode *nodes = prg->rtd->patReplNodes; + Kid *kid = 0; + + if ( pat != -1 ) { + kid = kidAllocate( prg ); + kid->tree = constructReplacementTree( kid, bindings, prg, pat ); + + /* Recurse down next. */ + Kid *next = constructReplacementKid( bindings, prg, + kid, nodes[pat].next ); + + kid->next = next; + } + + return kid; +} + +Tree *constructToken( Program *prg, Tree **args, long nargs ) +{ + Int *idInt = (Int*)args[0]; + Str *textStr = (Str*)args[1]; + + long id = idInt->value; + Head *tokdata = stringCopy( prg, textStr->value ); + + LangElInfo *lelInfo = prg->rtd->lelInfo; + Tree *tree; + + if ( lelInfo[id].ignore ) { + tree = treeAllocate( prg ); + tree->refs = 1; + tree->id = id; + tree->tokdata = tokdata; + } + else { + long objectLength = lelInfo[id].objectLength; + assert( nargs-2 <= objectLength ); + + Kid *attrs = allocAttrs( prg, objectLength ); + + tree = treeAllocate( prg ); + tree->id = id; + tree->refs = 1; + tree->tokdata = tokdata; + + tree->child = attrs; + + long i; + for ( i = 2; i < nargs; i++ ) { + setAttr( tree, i-2, args[i] ); + treeUpref( colm_get_attr( tree, i-2 ) ); + } + } + return tree; +} + +Tree *castTree( Program *prg, int langElId, Tree *tree ) +{ + LangElInfo *lelInfo = prg->rtd->lelInfo; + + /* Need to keep a lookout for next down. If + * copying it, return the copy. */ + Tree *newTree = treeAllocate( prg ); + + newTree->id = langElId; + newTree->tokdata = stringCopy( prg, tree->tokdata ); + + /* Invalidate the production number. */ + newTree->prodNum = -1; + + /* Copy the child list. Start with ignores, then the list. */ + Kid *child = tree->child, *last = 0; + + /* Flags we are interested in. */ + newTree->flags |= tree->flags & ( AF_LEFT_IGNORE | AF_RIGHT_IGNORE ); + + int ignores = 0; + if ( tree->flags & AF_LEFT_IGNORE ) + ignores += 1; + if ( tree->flags & AF_RIGHT_IGNORE ) + ignores += 1; + + /* Igores. */ + while ( ignores-- > 0 ) { + Kid *newKid = kidAllocate( prg ); + + newKid->tree = child->tree; + newKid->next = 0; + newKid->tree->refs += 1; + + /* Store the first child. */ + if ( last == 0 ) + newTree->child = newKid; + else + last->next = newKid; + + child = child->next; + last = newKid; + } + + /* Skip over the source's attributes. */ + int objectLength = lelInfo[tree->id].objectLength; + while ( objectLength-- > 0 ) + child = child->next; + + /* Allocate the target type's kids. */ + objectLength = lelInfo[langElId].objectLength; + while ( objectLength-- > 0 ) { + Kid *newKid = kidAllocate( prg ); + + newKid->tree = 0; + newKid->next = 0; + + /* Store the first child. */ + if ( last == 0 ) + newTree->child = newKid; + else + last->next = newKid; + + last = newKid; + } + + /* Copy the source's children. */ + while ( child != 0 ) { + Kid *newKid = kidAllocate( prg ); + + newKid->tree = child->tree; + newKid->next = 0; + newKid->tree->refs += 1; + + /* Store the first child. */ + if ( last == 0 ) + newTree->child = newKid; + else + last->next = newKid; + + child = child->next; + last = newKid; + } + + return newTree; +} + +Tree *makeTree( Program *prg, Tree **args, long nargs ) +{ + Int *idInt = (Int*)args[0]; + + long id = idInt->value; + LangElInfo *lelInfo = prg->rtd->lelInfo; + + Tree *tree = treeAllocate( prg ); + tree->id = id; + tree->refs = 1; + + long objectLength = lelInfo[id].objectLength; + Kid *attrs = allocAttrs( prg, objectLength ); + + Kid *last = 0, *child = 0; + for ( id = 1; id < nargs; id++ ) { + Kid *kid = kidAllocate( prg ); + kid->tree = args[id]; + treeUpref( kid->tree ); + + if ( last == 0 ) + child = kid; + else + last->next = kid; + + last = kid; + } + + tree->child = kidListConcat( attrs, child ); + + return tree; +} + +int testFalse( Program *prg, Tree *tree ) +{ + int flse = ( + tree == 0 || + tree == prg->falseVal || + ( tree->id == LEL_ID_INT && ((Int*)tree)->value == 0 ) ); + return flse; +} + +Kid *copyIgnoreList( Program *prg, Kid *ignoreHeader ) +{ + Kid *newHeader = kidAllocate( prg ); + Kid *last = 0, *ic = (Kid*)ignoreHeader->tree; + while ( ic != 0 ) { + Kid *newIc = kidAllocate( prg ); + + newIc->tree = ic->tree; + newIc->tree->refs += 1; + + /* List pointers. */ + if ( last == 0 ) + newHeader->tree = (Tree*)newIc; + else + last->next = newIc; + + ic = ic->next; + last = newIc; + } + return newHeader; +} + +Kid *copyKidList( Program *prg, Kid *kidList ) +{ + Kid *newList = 0, *last = 0, *ic = kidList; + + while ( ic != 0 ) { + Kid *newIc = kidAllocate( prg ); + + newIc->tree = ic->tree; + treeUpref( newIc->tree ); + + /* List pointers. */ + if ( last == 0 ) + newList = newIc; + else + last->next = newIc; + + ic = ic->next; + last = newIc; + } + return newList; +} + +/* New tree has zero ref. */ +Tree *copyRealTree( Program *prg, Tree *tree, Kid *oldNextDown, Kid **newNextDown ) +{ + /* Need to keep a lookout for next down. If + * copying it, return the copy. */ + Tree *newTree = treeAllocate( prg ); + + newTree->id = tree->id; + newTree->tokdata = stringCopy( prg, tree->tokdata ); + newTree->prodNum = tree->prodNum; + + /* Copy the child list. Start with ignores, then the list. */ + Kid *child = tree->child, *last = 0; + + /* Left ignores. */ + if ( tree->flags & AF_LEFT_IGNORE ) { + newTree->flags |= AF_LEFT_IGNORE; +// Kid *newHeader = copyIgnoreList( prg, child ); +// +// /* Always the head. */ +// newTree->child = newHeader; +// +// child = child->next; +// last = newHeader; + } + + /* Right ignores. */ + if ( tree->flags & AF_RIGHT_IGNORE ) { + newTree->flags |= AF_RIGHT_IGNORE; +// Kid *newHeader = copyIgnoreList( prg, child ); +// if ( last == 0 ) +// newTree->child = newHeader; +// else +// last->next = newHeader; +// child = child->next; +// last = newHeader; + } + + /* Attributes and children. */ + while ( child != 0 ) { + Kid *newKid = kidAllocate( prg ); + + /* Watch out for next down. */ + if ( child == oldNextDown ) + *newNextDown = newKid; + + newKid->tree = child->tree; + newKid->next = 0; + + /* May be an attribute. */ + if ( newKid->tree != 0 ) + newKid->tree->refs += 1; + + /* Store the first child. */ + if ( last == 0 ) + newTree->child = newKid; + else + last->next = newKid; + + child = child->next; + last = newKid; + } + + return newTree; +} + +List *copyList( Program *prg, List *list, Kid *oldNextDown, Kid **newNextDown ) +{ + /* Not a need copy. */ + List *newList = (List*)mapElAllocate( prg ); + newList->id = list->genericInfo->langElId; + newList->genericInfo = list->genericInfo; + + ListEl *src = list->head; + while( src != 0 ) { + ListEl *newEl = listElAllocate( prg ); + newEl->value = src->value; + treeUpref( newEl->value ); + + listAppend( newList, newEl ); + + /* Watch out for next down. */ + if ( (Kid*)src == oldNextDown ) + *newNextDown = (Kid*)newEl; + + src = src->next; + } + + return newList; +} + +Map *copyMap( Program *prg, Map *map, Kid *oldNextDown, Kid **newNextDown ) +{ + Map *newMap = (Map*)mapElAllocate( prg ); + newMap->id = map->genericInfo->langElId; + newMap->genericInfo = map->genericInfo; + newMap->treeSize = map->treeSize; + newMap->root = 0; + + /* If there is a root, copy the tree. */ + if ( map->root != 0 ) { + newMap->root = mapCopyBranch( prg, newMap, map->root, + oldNextDown, newNextDown ); + } + MapEl *el; + for ( el = newMap->head; el != 0; el = el->next ) { + assert( map->genericInfo->typeArg == TYPE_TREE ); + treeUpref( el->tree ); + } + + return newMap; +} + +Tree *copyTree( Program *prg, Tree *tree, Kid *oldNextDown, Kid **newNextDown ) +{ + LangElInfo *lelInfo = prg->rtd->lelInfo; + long genericId = lelInfo[tree->id].genericId; + if ( genericId > 0 ) { + GenericInfo *generic = &prg->rtd->genericInfo[genericId]; + if ( generic->type == GEN_LIST ) + tree = (Tree*) copyList( prg, (List*) tree, oldNextDown, newNextDown ); + else if ( generic->type == GEN_MAP ) + tree = (Tree*) copyMap( prg, (Map*) tree, oldNextDown, newNextDown ); + else if ( generic->type == GEN_PARSER ) { + /* Need to figure out the semantics here. */ + fatal( "ATTEMPT TO COPY PARSER\n" ); + assert(false); + } + } + else if ( tree->id == LEL_ID_PTR ) + assert(false); + else if ( tree->id == LEL_ID_BOOL ) + assert(false); + else if ( tree->id == LEL_ID_INT ) + assert(false); + else if ( tree->id == LEL_ID_STR ) + assert(false); + else if ( tree->id == LEL_ID_STREAM ) + assert(false); + else { + tree = copyRealTree( prg, tree, oldNextDown, newNextDown ); + } + + assert( tree->refs == 0 ); + return tree; +} + +Tree *splitTree( Program *prg, Tree *tree ) +{ + if ( tree != 0 ) { + assert( tree->refs >= 1 ); + + if ( tree->refs > 1 ) { + Kid *oldNextDown = 0, *newNextDown = 0; + Tree *newTree = copyTree( prg, tree, oldNextDown, &newNextDown ); + treeUpref( newTree ); + + /* Downref the original. Don't need to consider freeing because + * refs were > 1. */ + tree->refs -= 1; + + tree = newTree; + } + + assert( tree->refs == 1 ); + } + return tree; +} + +Tree *createGeneric( Program *prg, long genericId ) +{ + GenericInfo *genericInfo = &prg->rtd->genericInfo[genericId]; + Tree *newGeneric = 0; + switch ( genericInfo->type ) { + case GEN_MAP: { + Map *map = (Map*)mapElAllocate( prg ); + map->id = genericInfo->langElId; + map->genericInfo = genericInfo; + newGeneric = (Tree*) map; + break; + } + case GEN_LIST: { + List *list = (List*)mapElAllocate( prg ); + list->id = genericInfo->langElId; + list->genericInfo = genericInfo; + newGeneric = (Tree*) list; + break; + } + case GEN_PARSER: { + Parser *parser = (Parser*)mapElAllocate( prg ); + parser->id = genericInfo->langElId; + parser->genericInfo = genericInfo; + parser->pdaRun = malloc( sizeof(PdaRun) ); + + /* Start off the parsing process. */ + initPdaRun( prg, parser->pdaRun, prg->rtd->pdaTables, + genericInfo->parserId, false, false, 0 ); + + newGeneric = (Tree*) parser; + break; + } + default: + assert(false); + return 0; + } + + return newGeneric; +} + + +/* We can't make recursive calls here since the tree we are freeing may be + * very large. Need the VM stack. */ +void treeFreeRec( Program *prg, Tree **sp, Tree *tree ) +{ + Tree **top = vm_ptop(); + LangElInfo *lelInfo; + long genericId; + +free_tree: + lelInfo = prg->rtd->lelInfo; + genericId = lelInfo[tree->id].genericId; + if ( genericId > 0 ) { + GenericInfo *generic = &prg->rtd->genericInfo[genericId]; + if ( generic->type == GEN_LIST ) { + List *list = (List*) tree; + ListEl *el = list->head; + while ( el != 0 ) { + ListEl *next = el->next; + vm_push( el->value ); + listElFree( prg, el ); + el = next; + } + mapElFree( prg, (MapEl*)list ); + } + else if ( generic->type == GEN_MAP ) { + Map *map = (Map*)tree; + MapEl *el = map->head; + while ( el != 0 ) { + MapEl *next = el->next; + vm_push( el->key ); + vm_push( el->tree ); + mapElFree( prg, el ); + el = next; + } + mapElFree( prg, (MapEl*)map ); + } + else if ( generic->type == GEN_PARSER ) { + Parser *parser = (Parser*)tree; + clearPdaRun( prg, sp, parser->pdaRun ); + free( parser->pdaRun ); + treeDownref( prg, sp, (Tree*)parser->input ); + mapElFree( prg, (MapEl*)parser ); + } + else { + assert(false); + } + } + else { + if ( tree->id == LEL_ID_STR ) { + Str *str = (Str*) tree; + stringFree( prg, str->value ); + treeFree( prg, tree ); + } + else if ( tree->id == LEL_ID_BOOL || tree->id == LEL_ID_INT ) + treeFree( prg, tree ); + else if ( tree->id == LEL_ID_PTR ) + treeFree( prg, tree ); + else if ( tree->id == LEL_ID_STREAM ) { + Stream *stream = (Stream*)tree; + clearSourceStream( prg, sp, stream->in ); + if ( stream->in->file != 0 ) + fclose( stream->in->file ); + else if ( stream->in->fd > 0 ) + close( stream->in->fd ); + free( stream->in ); + streamFree( prg, stream ); + } + else { + if ( tree->id != LEL_ID_IGNORE ) + stringFree( prg, tree->tokdata ); + + /* Attributes and grammar-based children. */ + Kid *child = tree->child; + while ( child != 0 ) { + Kid *next = child->next; + vm_push( child->tree ); + kidFree( prg, child ); + child = next; + } + + treeFree( prg, tree ); + } + } + + /* Any trees to downref? */ + while ( sp != top ) { + tree = vm_pop(); + if ( tree != 0 ) { + assert( tree->refs > 0 ); + tree->refs -= 1; + if ( tree->refs == 0 ) + goto free_tree; + } + } +} + +void treeUpref( Tree *tree ) +{ + if ( tree != 0 ) + tree->refs += 1; +} + +void treeDownref( Program *prg, Tree **sp, Tree *tree ) +{ + if ( tree != 0 ) { + assert( tree->refs > 0 ); + tree->refs -= 1; + if ( tree->refs == 0 ) + treeFreeRec( prg, sp, tree ); + } +} + +/* Find the first child of a tree. */ +Kid *treeChild( Program *prg, const Tree *tree ) +{ + LangElInfo *lelInfo = prg->rtd->lelInfo; + Kid *kid = tree->child; + + if ( tree->flags & AF_LEFT_IGNORE ) + kid = kid->next; + if ( tree->flags & AF_RIGHT_IGNORE ) + kid = kid->next; + + /* Skip over attributes. */ + long objectLength = lelInfo[tree->id].objectLength; + long a; + for ( a = 0; a < objectLength; a++ ) + kid = kid->next; + + return kid; +} + +/* Detach at the first real child of a tree. */ +Kid *treeExtractChild( Program *prg, Tree *tree ) +{ + LangElInfo *lelInfo = prg->rtd->lelInfo; + Kid *kid = tree->child, *last = 0; + + if ( tree->flags & AF_LEFT_IGNORE ) + kid = kid->next; + if ( tree->flags & AF_RIGHT_IGNORE ) + kid = kid->next; + + /* Skip over attributes. */ + long a, objectLength = lelInfo[tree->id].objectLength; + for ( a = 0; a < objectLength; a++ ) { + last = kid; + kid = kid->next; + } + + if ( last == 0 ) + tree->child = 0; + else + last->next = 0; + + return kid; +} + + +/* Find the first child of a tree. */ +Kid *treeAttr( Program *prg, const Tree *tree ) +{ + Kid *kid = tree->child; + + if ( tree->flags & AF_LEFT_IGNORE ) + kid = kid->next; + if ( tree->flags & AF_RIGHT_IGNORE ) + kid = kid->next; + + return kid; +} + +Tree *treeLeftIgnore( Program *prg, Tree *tree ) +{ + if ( tree->flags & AF_LEFT_IGNORE ) + return tree->child->tree; + return 0; +} + +Tree *treeRightIgnore( Program *prg, Tree *tree ) +{ + if ( tree->flags & AF_RIGHT_IGNORE ) { + if ( tree->flags & AF_LEFT_IGNORE ) + return tree->child->next->tree; + else + return tree->child->tree; + } + return 0; +} + +Kid *treeLeftIgnoreKid( Program *prg, Tree *tree ) +{ + if ( tree->flags & AF_LEFT_IGNORE ) + return tree->child; + return 0; +} + +Kid *treeRightIgnoreKid( Program *prg, Tree *tree ) +{ + if ( tree->flags & AF_RIGHT_IGNORE ) { + if ( tree->flags & AF_LEFT_IGNORE ) + return tree->child->next; + else + return tree->child; + } + return 0; +} + +void refSetValue( Program *prg, Tree **sp, Ref *ref, Tree *v ) +{ + treeDownref( prg, sp, ref->kid->tree ); + ref->kid->tree = v; +} + +Tree *getRhsEl( Program *prg, Tree *lhs, long position ) +{ + Kid *pos = treeChild( prg, lhs ); + while ( position > 0 ) { + pos = pos->next; + position -= 1; + } + return pos->tree; +} + +Tree *colm_get_rhs_val( Program *prg, Tree *tree, int *a ) +{ + int i, len = a[0]; + for ( i = 0; i < len; i++ ) { + int prodNum = a[1 + i * 2]; + int childNum = a[1 + i * 2 + 1]; + if ( tree->prodNum == prodNum ) + return getRhsEl( prg, tree, childNum ); + } + return 0; +} + +void setField( Program *prg, Tree *tree, long field, Tree *value ) +{ + assert( tree->refs == 1 ); + if ( value != 0 ) + assert( value->refs >= 1 ); + setAttr( tree, field, value ); +} + +Tree *getField( Tree *tree, Word field ) +{ + return colm_get_attr( tree, field ); +} + +Kid *getFieldKid( Tree *tree, Word field ) +{ + return getAttrKid( tree, field ); +} + +Tree *getFieldSplit( Program *prg, Tree *tree, Word field ) +{ + Tree *val = colm_get_attr( tree, field ); + Tree *split = splitTree( prg, val ); + setAttr( tree, field, split ); + return split; +} + +Tree *getPtrVal( Pointer *ptr ) +{ + return ptr->value->tree; +} + +Tree *getPtrValSplit( Program *prg, Pointer *ptr ) +{ + Tree *val = ptr->value->tree; + Tree *split = splitTree( prg, val ); + ptr->value->tree = split; + return split; +} + +/* This must traverse in the same order that the bindId assignments are done + * in. */ +int matchPattern( Tree **bindings, Program *prg, long pat, Kid *kid, int checkNext ) +{ + PatConsNode *nodes = prg->rtd->patReplNodes; + + /* match node, recurse on children. */ + if ( pat != -1 && kid != 0 ) { + if ( nodes[pat].id == kid->tree->id ) { + /* If the pattern node has data, then this means we need to match + * the data against the token data. */ + if ( nodes[pat].data != 0 ) { + /* Check the length of token text. */ + if ( nodes[pat].length != stringLength( kid->tree->tokdata ) ) + return false; + + /* Check the token text data. */ + if ( nodes[pat].length > 0 && memcmp( nodes[pat].data, + stringData( kid->tree->tokdata ), nodes[pat].length ) != 0 ) + return false; + } + + /* No failure, all okay. */ + if ( nodes[pat].bindId > 0 ) { + bindings[nodes[pat].bindId] = kid->tree; + } + + /* If we didn't match a terminal duplicate of a nonterm then check + * down the children. */ + if ( !nodes[pat].stop ) { + /* Check for failure down child branch. */ + int childCheck = matchPattern( bindings, prg, + nodes[pat].child, treeChild( prg, kid->tree ), true ); + if ( ! childCheck ) + return false; + } + + /* If checking next, then look for failure there. */ + if ( checkNext ) { + int nextCheck = matchPattern( bindings, prg, + nodes[pat].next, kid->next, true ); + if ( ! nextCheck ) + return false; + } + + return true; + } + } + else if ( pat == -1 && kid == 0 ) { + /* Both null is a match. */ + return 1; + } + + return false; +} + + +long cmpTree( Program *prg, const Tree *tree1, const Tree *tree2 ) +{ + long cmpres = 0; + if ( tree1 == 0 ) { + if ( tree2 == 0 ) + return 0; + else + return -1; + } + else if ( tree2 == 0 ) + return 1; + else if ( tree1->id < tree2->id ) + return -1; + else if ( tree1->id > tree2->id ) + return 1; + else if ( tree1->id == LEL_ID_PTR ) { + if ( ((Pointer*)tree1)->value < ((Pointer*)tree2)->value ) + return -1; + else if ( ((Pointer*)tree1)->value > ((Pointer*)tree2)->value ) + return 1; + } + else if ( tree1->id == LEL_ID_INT ) { + if ( ((Int*)tree1)->value < ((Int*)tree2)->value ) + return -1; + else if ( ((Int*)tree1)->value > ((Int*)tree2)->value ) + return 1; + } + else if ( tree1->id == LEL_ID_STR ) { + cmpres = cmpString( ((Str*)tree1)->value, ((Str*)tree2)->value ); + if ( cmpres != 0 ) + return cmpres; + } + else { + if ( tree1->tokdata == 0 && tree2->tokdata != 0 ) + return -1; + else if ( tree1->tokdata != 0 && tree2->tokdata == 0 ) + return 1; + else if ( tree1->tokdata != 0 && tree2->tokdata != 0 ) { + cmpres = cmpString( tree1->tokdata, tree2->tokdata ); + if ( cmpres != 0 ) + return cmpres; + } + } + + Kid *kid1 = treeChild( prg, tree1 ); + Kid *kid2 = treeChild( prg, tree2 ); + + while ( true ) { + if ( kid1 == 0 && kid2 == 0 ) + return 0; + else if ( kid1 == 0 && kid2 != 0 ) + return -1; + else if ( kid1 != 0 && kid2 == 0 ) + return 1; + else { + cmpres = cmpTree( prg, kid1->tree, kid2->tree ); + if ( cmpres != 0 ) + return cmpres; + } + kid1 = kid1->next; + kid2 = kid2->next; + } +} + + +void splitRef( Program *prg, Tree ***psp, Ref *fromRef ) +{ + /* Go up the chain of kids, turing the pointers down. */ + Ref *last = 0, *ref = fromRef, *next = 0; + while ( ref->next != 0 ) { + next = ref->next; + ref->next = last; + last = ref; + ref = next; + } + ref->next = last; + + /* Now traverse the list, which goes down. */ + while ( ref != 0 ) { + if ( ref->kid->tree->refs > 1 ) { + Ref *nextDown = ref->next; + while ( nextDown != 0 && nextDown->kid == ref->kid ) + nextDown = nextDown->next; + + Kid *oldNextKidDown = nextDown != 0 ? nextDown->kid : 0; + Kid *newNextKidDown = 0; + + Tree *newTree = copyTree( prg, ref->kid->tree, + oldNextKidDown, &newNextKidDown ); + treeUpref( newTree ); + + /* Downref the original. Don't need to consider freeing because + * refs were > 1. */ + ref->kid->tree->refs -= 1; + + while ( ref != 0 && ref != nextDown ) { + next = ref->next; + ref->next = 0; + + ref->kid->tree = newTree; + ref = next; + } + + /* Correct kid pointers down from ref. */ + while ( nextDown != 0 && nextDown->kid == oldNextKidDown ) { + nextDown->kid = newNextKidDown; + nextDown = nextDown->next; + } + } + else { + /* Reset the list as we go down. */ + next = ref->next; + ref->next = 0; + ref = next; + } + } +} + +Tree *setListMem( List *list, Half field, Tree *value ) +{ + assert( list->refs == 1 ); + if ( value != 0 ) + assert( value->refs >= 1 ); + + Tree *existing = 0; + switch ( field ) { + case 0: + existing = list->head->value; + list->head->value = value; + break; + case 1: + existing = list->tail->value; + list->tail->value = value; + break; + default: + assert( false ); + break; + } + return existing; +} + +TreePair mapRemove( Program *prg, Map *map, Tree *key ) +{ + MapEl *mapEl = mapImplFind( prg, map, key ); + TreePair result = { 0, 0 }; + if ( mapEl != 0 ) { + mapDetach( prg, map, mapEl ); + result.key = mapEl->key; + result.val = mapEl->tree; + mapElFree( prg, mapEl ); + } + + return result; +} + +Tree *mapUnstore( Program *prg, Map *map, Tree *key, Tree *existing ) +{ + Tree *stored = 0; + if ( existing == 0 ) { + MapEl *mapEl = mapDetachByKey( prg, map, key ); + stored = mapEl->tree; + mapElFree( prg, mapEl ); + } + else { + MapEl *mapEl = mapImplFind( prg, map, key ); + stored = mapEl->tree; + mapEl->tree = existing; + } + return stored; +} + +Tree *mapFind( Program *prg, Map *map, Tree *key ) +{ + MapEl *mapEl = mapImplFind( prg, map, key ); + return mapEl == 0 ? 0 : mapEl->tree; +} + +long mapLength( Map *map ) +{ + return map->treeSize; +} + +void listAppend2( Program *prg, List *list, Tree *val ) +{ + assert( list->refs == 1 ); + if ( val != 0 ) + assert( val->refs >= 1 ); + ListEl *listEl = listElAllocate( prg ); + listEl->value = val; + listAppend( list, listEl ); +} + +Tree *listRemoveEnd( Program *prg, List *list ) +{ + Tree *tree = list->tail->value; + listElFree( prg, listDetachLast( list ) ); + return tree; +} + +Tree *getListMem( List *list, Word field ) +{ + Tree *result = 0; + switch ( field ) { + case 0: + result = list->head->value; + break; + case 1: + result = list->tail->value; + break; + default: + assert( false ); + break; + } + return result; +} + +Tree *getParserMem( Parser *parser, Word field ) +{ + Tree *result = 0; + switch ( field ) { + case 0: + result = parser->result; + break; + case 1: + result = parser->pdaRun->parseErrorText; + break; + default: + assert( false ); + break; + } + return result; +} + +Tree *getListMemSplit( Program *prg, List *list, Word field ) +{ + Tree *sv = 0; + switch ( field ) { + case 0: + sv = splitTree( prg, list->head->value ); + list->head->value = sv; + break; + case 1: + sv = splitTree( prg, list->tail->value ); + list->tail->value = sv; + break; + default: + assert( false ); + break; + } + return sv; +} + + +int mapInsert( Program *prg, Map *map, Tree *key, Tree *element ) +{ + MapEl *mapEl = mapInsertKey( prg, map, key, 0 ); + + if ( mapEl != 0 ) { + mapEl->tree = element; + return true; + } + + return false; +} + +void mapUnremove( Program *prg, Map *map, Tree *key, Tree *element ) +{ + MapEl *mapEl = mapInsertKey( prg, map, key, 0 ); + assert( mapEl != 0 ); + mapEl->tree = element; +} + +Tree *mapUninsert( Program *prg, Map *map, Tree *key ) +{ + MapEl *el = mapDetachByKey( prg, map, key ); + Tree *val = el->tree; + mapElFree( prg, el ); + return val; +} + +Tree *mapStore( Program *prg, Map *map, Tree *key, Tree *element ) +{ + Tree *oldTree = 0; + MapEl *elInTree = 0; + MapEl *mapEl = mapInsertKey( prg, map, key, &elInTree ); + + if ( mapEl != 0 ) + mapEl->tree = element; + else { + /* Element with key exists. Overwriting the value. */ + oldTree = elInTree->tree; + elInTree->tree = element; + } + + return oldTree; +} + +static Tree *treeSearchKid( Program *prg, Kid *kid, long id ) +{ + /* This node the one? */ + if ( kid->tree->id == id ) + return kid->tree; + + Tree *res = 0; + + /* Search children. */ + Kid *child = treeChild( prg, kid->tree ); + if ( child != 0 ) + res = treeSearchKid( prg, child, id ); + + /* Search siblings. */ + if ( res == 0 && kid->next != 0 ) + res = treeSearchKid( prg, kid->next, id ); + + return res; +} + +Tree *treeSearch( Program *prg, Tree *tree, long id ) +{ + Tree *res = 0; + if ( tree->id == id ) + res = tree; + else { + Kid *child = treeChild( prg, tree ); + if ( child != 0 ) + res = treeSearchKid( prg, child, id ); + } + return res; +} + +static Location *locSearchKid( Program *prg, Kid *kid ) +{ + /* This node the one? */ + if ( kid->tree->tokdata != 0 && kid->tree->tokdata->location != 0 ) + return kid->tree->tokdata->location; + + Location *res = 0; + + /* Search children. */ + Kid *child = treeChild( prg, kid->tree ); + if ( child != 0 ) + res = locSearchKid( prg, child ); + + /* Search siblings. */ + if ( res == 0 && kid->next != 0 ) + res = locSearchKid( prg, kid->next ); + + return res; +} + +Location *locSearch( Program *prg, Tree *tree ) +{ + Location *res = 0; + if ( tree->tokdata != 0 && tree->tokdata->location != 0 ) + return tree->tokdata->location; + + Kid *child = treeChild( prg, tree ); + if ( child != 0 ) + res = locSearchKid( prg, child ); + + return res; +} + +struct colm_location *colm_find_location( Program *prg, Tree *tree ) +{ + return locSearch( prg, tree ); +} + +void xmlEscapeData( struct colm_print_args *printArgs, const char *data, long len ) +{ + int i; + for ( i = 0; i < len; i++ ) { + if ( data[i] == '<' ) + printArgs->out( printArgs, "<", 4 ); + else if ( data[i] == '>' ) + printArgs->out( printArgs, ">", 4 ); + else if ( data[i] == '&' ) + printArgs->out( printArgs, "&", 5 ); + else if ( (32 <= data[i] && data[i] <= 126) || + data[i] == '\t' || data[i] == '\n' || data[i] == '\r' ) + { + printArgs->out( printArgs, &data[i], 1 ); + } + else { + char out[64]; + sprintf( out, "&#%u;", ((unsigned)data[i]) ); + printArgs->out( printArgs, out, strlen(out) ); + } + } +} + +void initStrCollect( StrCollect *collect ) +{ + collect->data = (char*) malloc( BUFFER_INITIAL_SIZE ); + collect->allocated = BUFFER_INITIAL_SIZE; + collect->length = 0; +} + +void strCollectDestroy( StrCollect *collect ) +{ + free( collect->data ); +} + +void strCollectAppend( StrCollect *collect, const char *data, long len ) +{ + long newLen = collect->length + len; + if ( newLen > collect->allocated ) { + collect->allocated = newLen * 2; + collect->data = (char*) realloc( collect->data, collect->allocated ); + } + memcpy( collect->data + collect->length, data, len ); + collect->length += len; +} + +void strCollectClear( StrCollect *collect ) +{ + collect->length = 0; +} + +#define INT_SZ 32 + +void printStr( struct colm_print_args *printArgs, Head *str ) +{ + printArgs->out( printArgs, (char*)(str->data), str->length ); +} + +void appendCollect( struct colm_print_args *args, const char *data, int length ) +{ + strCollectAppend( (StrCollect*) args->arg, data, length ); +} + +void appendFile( struct colm_print_args *args, const char *data, int length ) +{ + fwrite( data, 1, length, (FILE*)args->arg ); +} + +void appendFd( struct colm_print_args *args, const char *data, int length ) +{ + int fd = (long)args->arg; + int res = write( fd, data, length ); + if ( res < 0 ) + message( "write error on fd: %d: %s\n", fd, strerror(errno) ); +} + +Tree *treeTrim( struct colm_program *prg, Tree **sp, Tree *tree ) +{ + debug( prg, REALM_PARSE, "attaching left ignore\n" ); + + /* Make the ignore list for the left-ignore. */ + Tree *leftIgnore = treeAllocate( prg ); + leftIgnore->id = LEL_ID_IGNORE; + leftIgnore->flags |= AF_SUPPRESS_RIGHT; + + tree = pushLeftIgnore( prg, tree, leftIgnore ); + + debug( prg, REALM_PARSE, "attaching ignore right\n" ); + + /* Copy the ignore list first if we need to attach it as a right + * ignore. */ + Tree *rightIgnore = 0; + rightIgnore = treeAllocate( prg ); + rightIgnore->id = LEL_ID_IGNORE; + rightIgnore->flags |= AF_SUPPRESS_LEFT; + + tree = pushRightIgnore( prg, tree, rightIgnore ); + + return tree; +} + +enum ReturnType +{ + Done = 1, + CollectIgnoreLeft, + CollectIgnoreRight, + RecIgnoreList, + ChildPrint +}; + +enum VisitType +{ + IgnoreWrapper, + IgnoreData, + Term, + NonTerm, +}; + +#define TF_TERM_SEEN 0x1 + +void printKid( Program *prg, Tree **sp, struct colm_print_args *printArgs, Kid *kid ) +{ + enum ReturnType rt; + Kid *parent = 0; + Kid *leadingIgnore = 0; + enum VisitType visitType; + int flags = 0; + + /* Iterate the kids passed in. We are expecting a next, which will allow us + * to print the trailing ignore list. */ + while ( kid != 0 ) { + vm_push( (SW) Done ); + goto rec_call; + rec_return_top: + kid = kid->next; + } + + return; + +rec_call: + if ( kid->tree == 0 ) + goto skip_null; + + /* If not currently skipping ignore data, then print it. Ignore data can + * be associated with terminals and nonterminals. */ + if ( kid->tree->flags & AF_LEFT_IGNORE ) { + vm_push( (SW)parent ); + vm_push( (SW)kid ); + parent = kid; + kid = treeLeftIgnoreKid( prg, kid->tree ); + vm_push( (SW) CollectIgnoreLeft ); + goto rec_call; + rec_return_ign_left: + kid = (Kid*)vm_pop(); + parent = (Kid*)vm_pop(); + } + + if ( kid->tree->id == LEL_ID_IGNORE ) + visitType = IgnoreWrapper; + else if ( parent != 0 && parent->tree->id == LEL_ID_IGNORE ) + visitType = IgnoreData; + else if ( kid->tree->id < prg->rtd->firstNonTermId ) + visitType = Term; + else + visitType = NonTerm; + + debug( prg, REALM_PRINT, "visit type: %d\n", visitType ); + + if ( visitType == IgnoreData ) { + debug( prg, REALM_PRINT, "putting %p on ignore list\n", kid->tree ); + Kid *newIgnore = kidAllocate( prg ); + newIgnore->next = leadingIgnore; + leadingIgnore = newIgnore; + leadingIgnore->tree = kid->tree; + goto skip_node; + } + + if ( visitType == IgnoreWrapper ) { + Kid *newIgnore = kidAllocate( prg ); + newIgnore->next = leadingIgnore; + leadingIgnore = newIgnore; + leadingIgnore->tree = kid->tree; + /* Don't skip. */ + } + + /* print leading ignore? Triggered by terminals. */ + if ( visitType == Term ) { + /* Reverse the leading ignore list. */ + if ( leadingIgnore != 0 ) { + Kid *ignore = 0, *last = 0; + + /* Reverse the list and take the opportunity to implement the + * suppress left. */ + while ( true ) { + Kid *next = leadingIgnore->next; + leadingIgnore->next = last; + + if ( leadingIgnore->tree->flags & AF_SUPPRESS_LEFT ) { + /* We are moving left. Chop off the tail. */ + debug( prg, REALM_PRINT, "suppressing left\n" ); + freeKidList( prg, next ); + break; + } + + if ( next == 0 ) + break; + + last = leadingIgnore; + leadingIgnore = next; + } + + /* Print the leading ignore list. Also implement the suppress right + * in the process. */ + if ( printArgs->comm && (!printArgs->trim || (flags & TF_TERM_SEEN && kid->tree->id > 0)) ) { + ignore = leadingIgnore; + while ( ignore != 0 ) { + if ( ignore->tree->flags & AF_SUPPRESS_RIGHT ) + break; + + if ( ignore->tree->id != LEL_ID_IGNORE ) { + vm_push( (SW)visitType ); + vm_push( (SW)leadingIgnore ); + vm_push( (SW)ignore ); + vm_push( (SW)parent ); + vm_push( (SW)kid ); + + leadingIgnore = 0; + kid = ignore; + parent = 0; + + debug( prg, REALM_PRINT, "rec call on %p\n", kid->tree ); + vm_push( (SW) RecIgnoreList ); + goto rec_call; + rec_return_il: + + kid = (Kid*)vm_pop(); + parent = (Kid*)vm_pop(); + ignore = (Kid*)vm_pop(); + leadingIgnore = (Kid*)vm_pop(); + visitType = (enum VisitType)vm_pop(); + } + + ignore = ignore->next; + } + } + + /* Free the leading ignore list. */ + freeKidList( prg, leadingIgnore ); + leadingIgnore = 0; + } + } + + if ( visitType == Term || visitType == NonTerm ) { + /* Open the tree. */ + printArgs->open_tree( prg, sp, printArgs, parent, kid ); + } + + if ( visitType == Term ) + flags |= TF_TERM_SEEN; + + if ( visitType == Term || visitType == IgnoreData ) { + /* Print contents. */ + if ( kid->tree->id < prg->rtd->firstNonTermId ) { + debug( prg, REALM_PRINT, "printing terminal %p\n", kid->tree ); + if ( kid->tree->id != 0 ) + printArgs->print_term( prg, sp, printArgs, kid ); + } + } + + /* Print children. */ + Kid *child = printArgs->attr ? + treeAttr( prg, kid->tree ) : + treeChild( prg, kid->tree ); + + if ( child != 0 ) { + vm_push( (SW)visitType ); + vm_push( (SW)parent ); + vm_push( (SW)kid ); + parent = kid; + kid = child; + while ( kid != 0 ) { + vm_push( (SW) ChildPrint ); + goto rec_call; + rec_return: + kid = kid->next; + } + kid = (Kid*)vm_pop(); + parent = (Kid*)vm_pop(); + visitType = (enum VisitType)vm_pop(); + } + + if ( visitType == Term || visitType == NonTerm ) { + /* close the tree. */ + printArgs->close_tree( prg, sp, printArgs, parent, kid ); + } + +skip_node: + + /* If not currently skipping ignore data, then print it. Ignore data can + * be associated with terminals and nonterminals. */ + if ( kid->tree->flags & AF_RIGHT_IGNORE ) { + debug( prg, REALM_PRINT, "right ignore\n" ); + vm_push( (SW)parent ); + vm_push( (SW)kid ); + parent = kid; + kid = treeRightIgnoreKid( prg, kid->tree ); + vm_push( (SW) CollectIgnoreRight ); + goto rec_call; + rec_return_ign_right: + kid = (Kid*)vm_pop(); + parent = (Kid*)vm_pop(); + } + +/* For skiping over content on null. */ +skip_null: + + rt = (enum ReturnType)vm_pop(); + switch ( rt ) { + case Done: + debug( prg, REALM_PRINT, "return: done\n" ); + goto rec_return_top; + break; + case CollectIgnoreLeft: + debug( prg, REALM_PRINT, "return: ignore left\n" ); + goto rec_return_ign_left; + case CollectIgnoreRight: + debug( prg, REALM_PRINT, "return: ignore right\n" ); + goto rec_return_ign_right; + case RecIgnoreList: + debug( prg, REALM_PRINT, "return: ignore list\n" ); + goto rec_return_il; + case ChildPrint: + debug( prg, REALM_PRINT, "return: child print\n" ); + goto rec_return; + } +} + +void colm_print_tree_args( Program *prg, Tree **sp, struct colm_print_args *printArgs, Tree *tree ) +{ + if ( tree == 0 ) + printArgs->out( printArgs, "NIL", 3 ); + else { + /* This term tree allows us to print trailing ignores. */ + Tree termTree; + memset( &termTree, 0, sizeof(termTree) ); + + Kid kid, term; + term.tree = &termTree; + term.next = 0; + term.flags = 0; + + kid.tree = tree; + kid.next = &term; + kid.flags = 0; + + printKid( prg, sp, printArgs, &kid ); + } +} + +void colm_print_term_tree( Program *prg, Tree **sp, struct colm_print_args *printArgs, Kid *kid ) +{ + debug( prg, REALM_PRINT, "printing term %p\n", kid->tree ); + + if ( kid->tree->id == LEL_ID_INT ) { + char buf[INT_SZ]; + sprintf( buf, "%ld", ((Int*)kid->tree)->value ); + printArgs->out( printArgs, buf, strlen(buf) ); + } + else if ( kid->tree->id == LEL_ID_BOOL ) { + if ( ((Int*)kid->tree)->value ) + printArgs->out( printArgs, "true", 4 ); + else + printArgs->out( printArgs, "false", 5 ); + } + else if ( kid->tree->id == LEL_ID_PTR ) { + char buf[INT_SZ]; + printArgs->out( printArgs, "#", 1 ); + sprintf( buf, "%p", (void*) ((Pointer*)kid->tree)->value ); + printArgs->out( printArgs, buf, strlen(buf) ); + } + else if ( kid->tree->id == LEL_ID_STR ) { + printStr( printArgs, ((Str*)kid->tree)->value ); + } + else if ( kid->tree->id == LEL_ID_STREAM ) { + char buf[INT_SZ]; + printArgs->out( printArgs, "#", 1 ); + sprintf( buf, "%p", (void*) ((Stream*)kid->tree)->in->file ); + printArgs->out( printArgs, buf, strlen(buf) ); + } + else if ( kid->tree->tokdata != 0 && + stringLength( kid->tree->tokdata ) > 0 ) + { + printArgs->out( printArgs, stringData( kid->tree->tokdata ), + stringLength( kid->tree->tokdata ) ); + } +} + + +void colm_print_null( Program *prg, Tree **sp, struct colm_print_args *args, Kid *parent, Kid *kid ) +{ +} + +void openTreeXml( Program *prg, Tree **sp, struct colm_print_args *args, Kid *parent, Kid *kid ) +{ + /* Skip the terminal that is for forcing trailing ignores out. */ + if ( kid->tree->id == 0 ) + return; + + LangElInfo *lelInfo = prg->rtd->lelInfo; + + /* List flattening: skip the repeats and lists that are a continuation of + * the list. */ + if ( parent != 0 && parent->tree->id == kid->tree->id && kid->next == 0 && + ( lelInfo[parent->tree->id].repeat || lelInfo[parent->tree->id].list ) ) + { + return; + } + + const char *name = lelInfo[kid->tree->id].xmlTag; + args->out( args, "<", 1 ); + args->out( args, name, strlen( name ) ); + args->out( args, ">", 1 ); +} + +void printTermXml( Program *prg, Tree **sp, struct colm_print_args *printArgs, Kid *kid ) +{ + //Kid *child; + + /*child = */ treeChild( prg, kid->tree ); + if ( kid->tree->id == LEL_ID_PTR ) { + char ptr[32]; + sprintf( ptr, "%p\n", (void*)((Pointer*)kid->tree)->value ); + printArgs->out( printArgs, ptr, strlen(ptr) ); + } + else if ( kid->tree->id == LEL_ID_BOOL ) { + if ( ((Int*)kid->tree)->value ) + printArgs->out( printArgs, "true", 4 ); + else + printArgs->out( printArgs, "false", 5 ); + } + else if ( kid->tree->id == LEL_ID_INT ) { + char ptr[32]; + sprintf( ptr, "%ld", ((Int*)kid->tree)->value ); + printArgs->out( printArgs, ptr, strlen(ptr) ); + } + else if ( kid->tree->id == LEL_ID_STR ) { + Head *head = (Head*) ((Str*)kid->tree)->value; + + xmlEscapeData( printArgs, (char*)(head->data), head->length ); + } + else if ( 0 < kid->tree->id && kid->tree->id < prg->rtd->firstNonTermId && + kid->tree->id != LEL_ID_IGNORE && + kid->tree->tokdata != 0 && + stringLength( kid->tree->tokdata ) > 0 ) + { + xmlEscapeData( printArgs, stringData( kid->tree->tokdata ), + stringLength( kid->tree->tokdata ) ); + } +} + + +void closeTreeXml( Program *prg, Tree **sp, struct colm_print_args *args, Kid *parent, Kid *kid ) +{ + /* Skip the terminal that is for forcing trailing ignores out. */ + if ( kid->tree->id == 0 ) + return; + + LangElInfo *lelInfo = prg->rtd->lelInfo; + + /* List flattening: skip the repeats and lists that are a continuation of + * the list. */ + if ( parent != 0 && parent->tree->id == kid->tree->id && kid->next == 0 && + ( lelInfo[parent->tree->id].repeat || lelInfo[parent->tree->id].list ) ) + { + return; + } + + const char *name = lelInfo[kid->tree->id].xmlTag; + args->out( args, "</", 2 ); + args->out( args, name, strlen( name ) ); + args->out( args, ">", 1 ); +} + +void printTreeCollect( Program *prg, Tree **sp, StrCollect *collect, Tree *tree, int trim ) +{ + struct colm_print_args printArgs = { collect, true, false, trim, &appendCollect, + &colm_print_null, &colm_print_term_tree, &colm_print_null }; + colm_print_tree_args( prg, sp, &printArgs, tree ); +} + +void printTreeFile( Program *prg, Tree **sp, FILE *out, Tree *tree, int trim ) +{ + struct colm_print_args printArgs = { out, true, false, trim, &appendFile, + &colm_print_null, &colm_print_term_tree, &colm_print_null }; + colm_print_tree_args( prg, sp, &printArgs, tree ); +} + +void printTreeFd( Program *prg, Tree **sp, int fd, Tree *tree, int trim ) +{ + struct colm_print_args printArgs = { (void*)((long)fd), true, false, trim, &appendFd, + &colm_print_null, &colm_print_term_tree, &colm_print_null }; + colm_print_tree_args( prg, sp, &printArgs, tree ); +} + +void printXmlStdout( Program *prg, Tree **sp, Tree *tree, int commAttr, int trim ) +{ + struct colm_print_args printArgs = { stdout, commAttr, commAttr, trim, &appendFile, + &openTreeXml, &printTermXml, &closeTreeXml }; + colm_print_tree_args( prg, sp, &printArgs, tree ); +} + + diff --git a/src/tree.h b/src/tree.h new file mode 100644 index 0000000..7072326 --- /dev/null +++ b/src/tree.h @@ -0,0 +1,361 @@ +/* + * Copyright 2010-2012 Adrian Thurston <thurston@complang.org> + */ + +/* This file is part of Colm. + * + * Colm 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 2 of the License, or + * (at your option) any later version. + * + * Colm 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 Colm; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __COLM_TREE_H +#define __COLM_TREE_H + +#if defined(__cplusplus) +extern "C" { +#endif + +#include <colm/colm.h> +#include <colm/input.h> + +typedef unsigned char Code; +typedef unsigned long Word; +typedef unsigned long Half; +struct Bindings; +struct _FunctionInfo; + +typedef struct colm_location +{ + const char *name; + long line; + long column; + long byte; +} Location; + +/* Header located just before string data. */ +typedef struct colm_data +{ + const char *data; + long length; + struct colm_location *location; +} Head; + +typedef struct colm_kid +{ + /* The tree needs to be first since pointers to kids are used to reference + * trees on the stack. A pointer to the word that is a Tree* is cast to + * a Kid*. */ + struct colm_tree *tree; + struct colm_kid *next; + unsigned char flags; +} Kid; + +typedef struct _Ref +{ + Kid *kid; + struct _Ref *next; +} Ref; + +typedef struct colm_tree Tree; + +typedef struct _TreePair +{ + Tree *key; + Tree *val; +} TreePair; + +typedef struct _ParseTree +{ + short id; + unsigned short flags; + + struct _ParseTree *child; + struct _ParseTree *next; + struct _ParseTree *leftIgnore; + struct _ParseTree *rightIgnore; + Kid *shadow; + + /* Parsing algorithm. */ + long state; + long region; + short causeReduce; + + /* FIXME: unify probably. */ + char retryLower; + char retryUpper; +} ParseTree; + +typedef struct _Int +{ + /* Must overlay Tree. */ + short id; + unsigned short flags; + long refs; + Kid *child; + + long value; +} Int; + +typedef struct _Pointer +{ + /* Must overlay Tree. */ + short id; + unsigned short flags; + long refs; + Kid *child; + + Kid *value; +} Pointer; + +typedef struct _Str +{ + /* Must overlay Tree. */ + short id; + unsigned short flags; + long refs; + Kid *child; + + Head *value; +} Str; + +typedef struct _ListEl +{ + /* Must overlay kid. */ + Tree *value; + struct _ListEl *next; + struct _ListEl *prev; +} ListEl; + +/* + * Maps + */ +typedef struct _GenericInfo +{ + long type; + long typeArg; + long keyOffset; + long keyType; + long langElId; + long parserId; +} GenericInfo; + +typedef struct _List +{ + /* Must overlay Tree. */ + short id; + unsigned short flags; + long refs; + ListEl *head; + + ListEl *tail; + long listLen; + GenericInfo *genericInfo; + +} List; + +typedef struct _Stream +{ + /* Must overlay Tree. */ + short id; + unsigned short flags; + long refs; + Kid *child; + + StreamImpl *in; +} Stream; + +typedef struct _Parser +{ + /* Must overlay Tree. */ + short id; + unsigned short flags; + long refs; + Kid *child; + + GenericInfo *genericInfo; + + struct _PdaRun *pdaRun; + struct _Stream *input; + Tree *result; +} Parser; + +enum IterType +{ + IT_Tree = 1, + IT_RevTree, + IT_User +}; + +typedef struct _TreeIter +{ + enum IterType type; + Ref rootRef; + Ref ref; + long searchId; + Tree **stackRoot; + long yieldSize; + long rootSize; +} TreeIter; + +/* This must overlay tree iter because some of the same bytecodes are used. */ +typedef struct _RevTreeIter +{ + enum IterType type; + Ref rootRef; + Ref ref; + long searchId; + Tree **stackRoot; + long yieldSize; + long rootSize; + + /* For detecting a split at the leaf. */ + Kid *kidAtYield; + long children; +} RevTreeIter; + +typedef struct _UserIter +{ + enum IterType type; + /* The current item. */ + Ref ref; + Tree **stackRoot; + long argSize; + long yieldSize; + long rootSize; + + Code *resume; + Tree **frame; + long searchId; +} UserIter; + + +void treeUpref( Tree *tree ); +void treeDownref( struct colm_program *prg, Tree **sp, Tree *tree ); +long cmpTree( struct colm_program *prg, const Tree *tree1, const Tree *tree2 ); + +Tree *pushRightIgnore( struct colm_program *prg, Tree *pushTo, Tree *rightIgnore ); +Tree *pushLeftIgnore( struct colm_program *prg, Tree *pushTo, Tree *leftIgnore ); +Tree *popRightIgnore( struct colm_program *prg, Tree **sp, Tree *popFrom, Tree **rightIgnore ); +Tree *popLeftIgnore( struct colm_program *prg, Tree **sp, Tree *popFrom, Tree **leftIgnore ); +Tree *treeLeftIgnore( struct colm_program *prg, Tree *tree ); +Tree *treeRightIgnore( struct colm_program *prg, Tree *tree ); +Kid *treeLeftIgnoreKid( struct colm_program *prg, Tree *tree ); +Kid *treeRightIgnoreKid( struct colm_program *prg, Tree *tree ); +Kid *treeChild( struct colm_program *prg, const Tree *tree ); +Kid *treeAttr( struct colm_program *prg, const Tree *tree ); +Kid *kidListConcat( Kid *list1, Kid *list2 ); +Kid *treeExtractChild( struct colm_program *prg, Tree *tree ); +Kid *reverseKidList( Kid *kid ); + +Tree *constructInteger( struct colm_program *prg, long i ); +Tree *constructPointer( struct colm_program *prg, Tree *tree ); +Tree *constructTerm( struct colm_program *prg, Word id, Head *tokdata ); +Tree *constructReplacementTree( Kid *kid, Tree **bindings, struct colm_program *prg, long pat ); +Tree *createGeneric( struct colm_program *prg, long genericId ); +Tree *constructToken( struct colm_program *prg, Tree **args, long nargs ); +Tree *constructStream( struct colm_program *prg ); + + +int testFalse( struct colm_program *prg, Tree *tree ); +Tree *makeTree( struct colm_program *prg, Tree **args, long nargs ); +Stream *openFile( struct colm_program *prg, Tree *name, Tree *mode ); +Stream *openStreamFd( struct colm_program *prg, char *name, long fd ); +Kid *copyIgnoreList( struct colm_program *prg, Kid *ignoreHeader ); +Kid *copyKidList( struct colm_program *prg, Kid *kidList ); +void streamFree( struct colm_program *prg, Stream *s ); +Tree *copyTree( struct colm_program *prg, Tree *tree, Kid *oldNextDown, Kid **newNextDown ); + +Tree *getPtrVal( Pointer *ptr ); +Tree *getPtrValSplit( struct colm_program *prg, Pointer *ptr ); +Tree *getField( Tree *tree, Word field ); +Tree *getFieldSplit( struct colm_program *prg, Tree *tree, Word field ); +Tree *getRhsEl( struct colm_program *prg, Tree *lhs, long position ); +void setField( struct colm_program *prg, Tree *tree, long field, Tree *value ); + +void setTriterCur( struct colm_program *prg, TreeIter *iter, Tree *tree ); +void setUiterCur( struct colm_program *prg, UserIter *uiter, Tree *tree ); +void refSetValue( struct colm_program *prg, Tree **sp, Ref *ref, Tree *v ); +Tree *treeSearch( struct colm_program *prg, Tree *tree, long id ); +Location *locSearch( struct colm_program *prg, Tree *tree ); + +int matchPattern( Tree **bindings, struct colm_program *prg, long pat, Kid *kid, int checkNext ); +Tree *treeIterDerefCur( TreeIter *iter ); + +/* For making references of attributes. */ +Kid *getFieldKid( Tree *tree, Word field ); + +Tree *copyRealTree( struct colm_program *prg, Tree *tree, Kid *oldNextDown, Kid **newNextDown ); +void splitIterCur( struct colm_program *prg, Tree ***psp, TreeIter *iter ); +Tree *setListMem( List *list, Half field, Tree *value ); + +void listAppend2( struct colm_program *prg, List *list, Tree *val ); +Tree *listRemoveEnd( struct colm_program *prg, List *list ); +Tree *getListMem( List *list, Word field ); +Tree *getListMemSplit( struct colm_program *prg, List *list, Word field ); +Tree *getParserMem( Parser *parser, Word field ); + +Tree *treeIterAdvance( struct colm_program *prg, Tree ***psp, TreeIter *iter ); +Tree *treeIterNextChild( struct colm_program *prg, Tree ***psp, TreeIter *iter ); +Tree *treeRevIterPrevChild( struct colm_program *prg, Tree ***psp, RevTreeIter *iter ); +Tree *treeIterNextRepeat( struct colm_program *prg, Tree ***psp, TreeIter *iter ); +Tree *treeIterPrevRepeat( struct colm_program *prg, Tree ***psp, TreeIter *iter ); + +/* An automatically grown buffer for collecting tokens. Always reuses space; + * never down resizes. */ +typedef struct _StrCollect +{ + char *data; + int allocated; + int length; +} StrCollect; + +void initStrCollect( StrCollect *collect ); +void strCollectDestroy( StrCollect *collect ); +void strCollectAppend( StrCollect *collect, const char *data, long len ); +void strCollectClear( StrCollect *collect ); +Tree *treeTrim( struct colm_program *prg, Tree **sp, Tree *tree ); + +void printTreeCollect( struct colm_program *prg, Tree **sp, StrCollect *collect, Tree *tree, int trim ); +void printTreeFile( struct colm_program *prg, Tree **sp, FILE *out, Tree *tree, int trim ); +void printTreeFd( struct colm_program *prg, Tree **sp, int fd, Tree *tree, int trim ); +void printXmlStdout( struct colm_program *prg, Tree **sp, Tree *tree, int commAttr, int trim ); + +/* + * Iterators. + */ + +UserIter *uiterCreate( struct colm_program *prg, Tree ***psp, struct _FunctionInfo *fi, long searchId ); +void uiterInit( struct colm_program *prg, Tree **sp, UserIter *uiter, + struct _FunctionInfo *fi, int revertOn ); + +void initTreeIter( TreeIter *treeIter, Tree **stackRoot, long rootSize, + const Ref *rootRef, int searchId ); +void initRevTreeIter( RevTreeIter *revTriter, Tree **stackRoot, long rootSize, + const Ref *rootRef, int searchId, int children ); +void initUserIter( UserIter *userIter, Tree **stackRoot, long rootSize, + long argSize, long searchId ); + +void treeIterDestroy( struct colm_program *prg, Tree ***psp, TreeIter *iter ); +void revTreeIterDestroy( struct colm_program *prg, Tree ***psp, RevTreeIter *iter ); +void userIterDestroy( struct colm_program *prg, Tree ***psp, UserIter *uiter ); +void userIterDestroy2( struct colm_program *prg, Tree ***psp, UserIter *uiter ); + +Tree *castTree( struct colm_program *prg, int langElId, Tree *tree ); + +#if defined(__cplusplus) +} +#endif + +#endif + diff --git a/src/version.h b/src/version.h new file mode 100644 index 0000000..2dd8c01 --- /dev/null +++ b/src/version.h @@ -0,0 +1,2 @@ +#define VERSION "0.12.0" +#define PUBDATE "Jan 2014" |
