kimwitu++-2.3.13/0000755000175000017500000000000011135163773012144 5ustar useruserkimwitu++-2.3.13/AUTHORS0000644000175000017500000000106210752410077013207 0ustar useruserAuthors of Kimwitu++. Axel Belinfante . Wrote the original Kimwitu program. The structure-file-io reading and writing code has been derived, in part, from The Synthesizer Generator (tm), see the LICENSE file. Michael Piefel . Derived Kimwitu++. Various hacks and improvements written by Ralf Schröder , Martin v. Löwis , Carsten Dumke , Gerd Kurzbach , Ralf Schuchardt . kimwitu++-2.3.13/man/0000755000175000017500000000000011135163773012717 5ustar useruserkimwitu++-2.3.13/man/man1/0000755000175000017500000000000011135163773013553 5ustar useruserkimwitu++-2.3.13/man/man1/kc++.10000644000175000017500000001454210752413062014357 0ustar useruser.TH KC++ 1 "February 2008" "Kimwitu++" .SH "NAME" Kimwitu++ \(en generate C++ code from Kimwitu++ input .SH "SYNOPSIS" .B kc++ .IR "" [ options ] " \(file" ... .SH "DESCRIPTION" .B kc++ reads the abstract syntax de\(finition, function de\(finitions, rewrite rules and unparse rules from the \(files given on the command line, or from the standard input if no \(file arguments were given. It generates for each .IB \(file .k input \(file a pair of .IB \(file .cc and .IB \(file .h \(files that contain the translation of the functions de\(fined in the corresponding .IB \(file .k \fR. .PP Additionally the following \(files are generated: .BR csgiok.{h,cc} ", " rk.{h,cc} " and " unpk.{h,cc} , that contain the CSGIO-, the rewrite- and the unparse-functions, respectively, and the .BR k.cc " and " k.h \(files that contain the grammar tables and the remaining `default' functions as well as the declaration of the classes for each phylum in the de\(finition of the abstract syntax. .PP If no command line \(file arguments are given, the translation of the user-de\(fined functions will be generated in .B stdin.{h,cc} \(files. .PP .B kc++ does not unnecessarily overwrite a \(file: if a \(file would be overwritten with its own (identical) contents, it will not be touched. This makes it easy to write an e\(Ficient Make\(file. .SH "OPTIONS" .SS "KIMWITU++ FEATURES" .TP .BR -c ", " --no-csgio no read/write functions (csgio.{h,cc}) are generated. .TP .BR -r ", " --no-rewrite no code for rewrite rules (rk.{h,cc}) is generated. .TP .BR -u ", " --no-unparse no code for unparse rules (unpk.{h,cc}) is generated. .TP .BR -d ", " -no-printdot no printdot functions for printing dot-\(files (input for the graphviz package) are generated. .TP .BR -t ", " -no-hashtables no code for hastables is generated (works only when both .BR --no-csgio " and " --no-printdot are speci\(fied). .TP .B --operator-cast generate \fBoperatork.h\fR for operator_cast<> .SS "C++ COMPILER OPTIONS" .TP .BR -n ", " --covariant "=\fIC\fR" use covariant return types; options are \fByes\fR (use them), \fBno\fR (don't use them, requires explicit casting), or \fBpre\fR (use preprocessor symbol NO_COVARIANT_RETURN to guard the de\(finitions). .TP .IR \fB--stdafx\fR [= FILE ] include for Microsoft precompiled header \(files is generated (default stdafx.h). .TP .BR -e ", " --dllexport =\fISTRING\fR generates string between keyword class and the class name of all operators and phyla (used eg. for DLL export de\(finitions for Windows). .TP .BR -m ", " --smart-pointer generates code for smart pointers (does reference counting). .TP .BR -w ", " --weak-pointer generates code for weak pointers (implies \fB--smart-pointer\fR). .SS "OPTIONS FOR FILE GENERATION" .TP .BR -s ", " --suffix =\fIEXT\fR extension for generated source \(files (default cc). .TP .BR -f ", " --file-prefix =\fIPREF\fR pre\(fix for generated \(files. .TP .BR -o , " --overwrite" always write generated \(files even if not changed. .TP .BR -b , .IR \fB--yystype\fR [= FILE ] generates \(file (default yystype.h) containg YYSTYPE for \fByacc\fR(1) or \fBbison\fR(1). .TP .BR -y , "--yxx-union" generates \(file yxx_union.h for yacc++. .SS "ADVANCED OPTIONS" .TP .BR -l ", " --no-linedirec does not emit line directives (`#line'). This is sometimes handy when you need to debug your program. .TP .B --comment-line prints line comments (`//line') instead of line directives. This may aid debugging when the bugs are not in your code but in Kimwitu++. .TP .B --dir-line prepends the current working directory to the \(file name in line directives. .TP .B --rw-loop generates a non recursive rewrite function. .TP .BR -p ", " --pipe =\fICMD\fR \(filter every input \(file through \fICMD\fR. The programm will be called as .IB "CMD \(file" .k and must deliver its output to standard output. .SS "GENERAL OPTIONS" .TP .BR -M ", " --msg-format =\fIPATTERN\fR speci\(fies format of (error) messages. The actual message is appended. \fIPATTERN\fR can contain: .IP %p (program name) %s (severity) %f (\(file name) %d (current working directory) %l (line number) %c (column) .TP .BR -q ", " --quiet be quite quiet about warnings etc., give only return status (not implemented). .TP .BR -v ", " --verbose print additional status information while processing. .TP .IR \fB-W\fR [ what ] enable all warnings; use comma-seperated list for detailed control (can be prefixed with `no') .IP drop \(en dropped rule bodies (no code generated) equiv \(en equivalent patterns (cannot match) overlap \(en possibly overlapping patterns .TP .BR -h ", " --help give a short help message. .TP .BR -V ", " --version print the version number of \fBkc++\fR and exit. .SH "GENERATED FILES" .TP k.{h,cc} the grammar and default functions .TP rk.{h,cc} the rewrite view declarations and rewrite functions .TP csgiok.{h,cc} the CSGIO functions .TP unpk.{h,cc} the unparse view declarations and unparsing functions .TP \fI\(file\fR.{h,cc} translation of user-provided Kimwitu++ functions. .TP stdin.{h,cc} translation of user-provided Kimwitu++ functions if no command line \(file arguments were given. .TP yystype.h (or any other name you specify) the YYSTYPE union. .TP yxx_union.h the (anonymous?) union (for yacc++, apparently). .SH "DIAGNOSTICS" If an error is encountered in the Kimwitu++ input, an appropriate error message will be written on standard error, code generation will be suppressed and a non-zero exit value will be returned. The error messages should be self-explanatory. .SH "BUGS" The error messages are not always very self-explanatory. Sometimes \fBkc++\fR gets confused by parse errors. .br The option \fB-p\fR is a hack. Not much checking is done, no fault recovery. Don't interrupt \fBkc++\fR when piping, you will regret it. .SH "AUTHOR" .TP 3 Kimwitu was written by Axel Belinfante, University of Twente, the Netherlands. .br .TP 3 Kimwitu++ was written by Michael Piefel, Humboldt-Universit\(:at zu Berlin, Germany. .SH "REPORTING BUGS" Report bugs to ; we'd also like to hear from you when you successfully use Kimwitu++ for your projects. .SH "COPYRIGHT" Copyright \(co 1998-2008 Michael Piefel, Humboldt-Universit\(:at zu Berlin .br Kimwitu++ comes with \fBno\fR warranty; for details see GPL. .br This is free software, and you are welcome to redistribute it under certain conditions; for details see GPL. kimwitu++-2.3.13/configure0000755000175000017500000063633411135163557014072 0ustar useruser#! /bin/sh # From configure.ac Id: configure.ac,v 1.28 2008/02/06 20:28:58 piefel Exp . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for Kimwitu++ 2.3.13. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # # Copyright 2000, 2001, 2002, 2003, 2007, 2008, 2009 Humboldt-Universitaet zu Berlin ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='Kimwitu++' PACKAGE_TARNAME='kimwitu++' PACKAGE_VERSION='2.3.13' PACKAGE_STRING='Kimwitu++ 2.3.13' PACKAGE_BUGREPORT='piefel@informatik.hu-berlin.de' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_unique_file="src/gen.k" ac_subst_vars='LTLIBOBJS arch PYLIBS PYOBJS PYCFLAGS PYTHON LIBOBJS hashset CXXCPP INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM SET_MAKE YFLAGS YACC LEXLIB LEX_OUTPUT_ROOT LEX ac_ct_CXX CXXFLAGS CXX EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_universal with_python ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC YACC YFLAGS CXXCPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures Kimwitu++ 2.3.13 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/kimwitu++] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of Kimwitu++ 2.3.13:";; esac cat <<\_ACEOF Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-universal build a universal binary (MacOS X) --with-python link with Python for debugging support Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Kimwitu++ configure 2.3.13 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Copyright 2000, 2001, 2002, 2003, 2007, 2008, 2009 Humboldt-Universitaet zu Berlin _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Kimwitu++ $as_me 2.3.13, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi fi fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_minix_config_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 $as_echo_n "checking for minix/config.h... " >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 $as_echo "$ac_cv_header_minix_config_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 $as_echo_n "checking minix/config.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 $as_echo_n "checking minix/config.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------------------- ## ## Report this to piefel@informatik.hu-berlin.de ## ## --------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 $as_echo_n "checking for minix/config.h... " >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_minix_config_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 $as_echo "$ac_cv_header_minix_config_h" >&6; } fi if test "x$ac_cv_header_minix_config_h" = x""yes; then MINIX=yes else MINIX= fi if test "$MINIX" = yes; then cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_1_SOURCE 2 _ACEOF cat >>confdefs.h <<\_ACEOF #define _MINIX 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test "${ac_cv_safe_to_define___extensions__+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_safe_to_define___extensions__=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && cat >>confdefs.h <<\_ACEOF #define __EXTENSIONS__ 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_PTHREAD_SEMANTICS 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _TANDEM_SOURCE 1 _ACEOF ac_config_headers="$ac_config_headers src/config.h" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Check for command line arguments (Universal Binary) { $as_echo "$as_me:$LINENO: checking whether a universal binary is requested" >&5 $as_echo_n "checking whether a universal binary is requested... " >&6; } universal=no # Check whether --with-universal was given. if test "${with_universal+set}" = set; then withval=$with_universal; case $withval in no) ;; yes) CXXCPP="${CXX:-g++} -E" CXX="${CXX:-g++} -arch i386 -arch ppc" CC="${CC:-gcc} -arch i386 -arch ppc" universal=yes ;; *) CXXCPP="${CXX:-g++} -E" CXX="${CXX:-g++} $withval" CC="${CC:-gcc} $withval" universal=yes ;; esac fi { $as_echo "$as_me:$LINENO: result: $universal" >&5 $as_echo "$universal" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LEX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:$LINENO: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { yyless (input () != 0); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { (ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if test "${ac_cv_prog_lex_root+set}" = set; then $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else { { $as_echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 $as_echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:$LINENO: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if test "${ac_cv_lib_lex+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_lex=$ac_lib else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_prog_lex_yytext_pointer=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then cat >>confdefs.h <<\_ACEOF #define YYTEXT_POINTER 1 _ACEOF fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_YACC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:$LINENO: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu for ac_header in unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------------------- ## ## Report this to piefel@informatik.hu-berlin.de ## ## --------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in string.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------------------- ## ## Report this to piefel@informatik.hu-berlin.de ## ## --------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in hash_set ext/hash_set do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------------------- ## ## Report this to piefel@informatik.hu-berlin.de ## ## --------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF hashset=-DUSE_HASHSET fi done { $as_echo "$as_me:$LINENO: checking for working memcmp" >&5 $as_echo_n "checking for working memcmp... " >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_memcmp_working=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) return 1; } return 0; } ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_memcmp_working=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 $as_echo "$ac_cv_func_memcmp_working" >&6; } test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac { $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if test "${ac_cv_type_signal+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_signal=int else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in vprintf do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF { $as_echo "$as_me:$LINENO: checking for _doprnt" >&5 $as_echo_n "checking for _doprnt... " >&6; } if test "${ac_cv_func__doprnt+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub__doprnt || defined __stub____doprnt choke me #endif int main () { return _doprnt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func__doprnt=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 $as_echo "$ac_cv_func__doprnt" >&6; } if test "x$ac_cv_func__doprnt" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done # Check for command line arguments (Python) # Check whether --with-python was given. if test "${with_python+set}" = set; then withval=$with_python; case $withval in no) PYTHON=/usr/bin/false ;; yes) # Extract the first word of "python", so it can be a program name with args. set dummy python; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PYTHON+set}" = set; then $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="/usr/bin/false" ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi ;; *) PYTHON=$withval ;; esac else PYTHON=/usr/bin/false fi if test $PYTHON = "/usr/bin/false"; then PYLIBS= PYOBJS= PYCFLAGS= else # The double [[]] are necessary for m4 quoting eval `python - <>confdefs.h <<\_ACEOF #define NEED_TKINTER 1 _ACEOF fi fi { $as_echo "$as_me:$LINENO: checking how we like to call the build architecture" >&5 $as_echo_n "checking how we like to call the build architecture... " >&6; } arch=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` if test X$arch = Xsunos && test `uname -r|cut -c1` -gt 4 then arch=solaris fi if test X`echo $arch|cut -c1-6` = Xcygwin then arch=cygwin fi if test X$cross_compiling = Xyes then arch=cross fi { $as_echo "$as_me:$LINENO: result: $arch" >&5 $as_echo "$arch" >&6; } ac_config_files="$ac_config_files Makefile src/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by Kimwitu++ $as_me 2.3.13, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ Kimwitu++ config.status 2.3.13 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 $as_echo "$as_me: error: could not setup config headers machinery" >&2;} { (exit 1); exit 1; }; } fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } fi ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi kimwitu++-2.3.13/configure.ac0000644000175000017500000000625411135163551014433 0ustar useruserdnl Process this file with autoconf to produce a configure script. AC_INIT(Kimwitu++, 2.3.13, piefel@informatik.hu-berlin.de, kimwitu++) AC_PREREQ(2.50) AC_COPYRIGHT([Copyright 2000, 2001, 2002, 2003, 2007, 2008, 2009 Humboldt-Universitaet zu Berlin]) AC_REVISION([$Id: configure.ac,v 1.28 2008/02/06 20:28:58 piefel Exp $]) AC_USE_SYSTEM_EXTENSIONS AC_CONFIG_SRCDIR(src/gen.k) AC_CONFIG_HEADERS(src/config.h) AC_LANG([C++]) # Check for command line arguments (Universal Binary) AC_MSG_CHECKING([whether a universal binary is requested]) universal=no AC_ARG_WITH(universal, [ --with-universal build a universal binary (MacOS X)], [case $withval in no) ;; yes) CXXCPP="${CXX:-g++} -E" CXX="${CXX:-g++} -arch i386 -arch ppc" CC="${CC:-gcc} -arch i386 -arch ppc" universal=yes ;; *) CXXCPP="${CXX:-g++} -E" CXX="${CXX:-g++} $withval" CC="${CC:-gcc} $withval" universal=yes ;; esac ],[]) AC_MSG_RESULT($universal) dnl Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_LEX AC_PROG_YACC AC_PROG_MAKE_SET AC_PROG_INSTALL dnl Checks for libraries. dnl Checks for header files. AC_CHECK_HEADERS(unistd.h) AC_CHECK_HEADERS(string.h) AC_CHECK_HEADERS([hash_set ext/hash_set], [AC_SUBST(hashset, [-DUSE_HASHSET])]) dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for library functions. AC_FUNC_MEMCMP AC_TYPE_SIGNAL AC_FUNC_VPRINTF # Check for command line arguments (Python) AC_ARG_WITH(python, [ --with-python link with Python for debugging support], [case $withval in no) PYTHON=/usr/bin/false ;; yes) AC_PATH_PROG(PYTHON, python, /usr/bin/false) ;; *) PYTHON=$withval ;; esac ],[ PYTHON=/usr/bin/false ]) if test $PYTHON = "/usr/bin/false"; then PYLIBS= PYOBJS= PYCFLAGS= else # The double [[]] are necessary for m4 quoting eval `python - <() just like phylum_cast<>() or dynamic_cast<>() ** support for named subphyla for greater type safety * Changes in kimwitu++ 2.3.6 ** new option -W allows greater control of warning levels ** new option --rw-loop generates iterative rewrite algorithm (instead of recursive) and greater control (or hacking) * Changes in kimwitu++ 2.3.5 ** New options for error reporting format ** Allow {con,de}structors for any class (but give warning) ** Add options to morph line directives into comments * Changes in kimwitu++ 2.3.1 ** Version number of generating Kimwitu++ goes into the generated code as a number of #define's (KIMWITUVERSIONMAJOR, *MINOR, *MICRO) ** Rename kc_.views to .views (should have happened before). ** Added a virtual default_unparse method to have replaceable default unparse behaviour. There is not yet a Kimwitu++ syntax extension for it. * Changes in kimwitu++ 2.3.0 ** Change back the semantic of append to return the element for the list where we insert the value. ** This warrants a version number bump 3.0: Give warnings for overlapping patterns in unparse, rewrite and with. ** Support for g++ 3.2 ** --no-linedirec does not emit any line directives now. * Changes in kimwitu++ 2.2.0 ** Removed the kc_ prefix in many places. There are some macros you can use to get the old names, you just have to define DEPRECATED. ** Renamed kc_tag_ to impl_; macros as above. ** Changed language macros to is_language and set_language. * Changes in kimwitu++ 2.1.4 ** Allow conversion operators in phyla. * Changes in kimwitu++ 2.1.3 ** Lines can have arbitrary lengths now. * Changes in kimwitu++ 2.1.2 ** User-defined member functions now possible for primitive phyla. This is actually a bug fix, but since it never worked before it can be considered a new feature. * Changes in kimwitu++ 2.1.0 ** Some care is taken to allow unparsing of lists to be done iteratively instead of recursively by default. Faster and leaner on stack space. ** Some more lists in kimwitu++ itself unparsing iteratively even though not using default unparsing. Now very large files can be processed. ** If available, kimwitu++ now uses hash sets for storing casestrings. This can speed up things dramatically. Use -DUSE_HASHSET while compiling k.cc * Changes in kimwitu++ 2.0.3 ** Using getopt_long now, this make option parsing more robust * Changes in kimwitu++ 2.0.2 ** Added terminator statement to attributeOf ** Fixed some namespace-related bugs * Changes in kimwitu++ 2.0.0 ** Brought Kimwitu++ in sync with Kimwitu 4.6 ** Added option --overwrite to always overwrite generated files, even if they did not change ** Renamed the fprintdotheader and fprintdotfooter functions into ...prologue and ...epilogue, because these names better reflect their use * Changes in kimwitu++ 1.3.12 ** Note: This really is not a step from 1.3.5, but rather one from 2.0; I just missed the chance to change to 1.9999 earlier ** Added option --yystype (generates YYSTYPE in yystype.h) ** Changed CSGIO functions (read takes reference, both throw exceptions) ** Keywords `%member' and `%attr'; the latter generates attributes which are handled by CSGIO ** Keywords `%ctor' and `%dtor' (not really, they appeared in some earlier version, but I forget which) ** All in namespace kc ** Keyword `%option' to specify fixed options in file instead of on command line * Changes in kimwitu++ 1.3.5 ** Added options --smart-pointer and --weak-pointer ** Made rviews and uviews work the same way once more * Changes in kimwitu++ 1.3.4 ** Changed a whole lot of type names for printer functions ** Added real old-style printer function support * Changes in kimwitu++ 1.3.3 ** Fixed old nullary operators bug * Changes in kimwitu++ 1.3.2 ** Added keyword `provided' ** made option `--verbose' work * Changes in kimwitu++ 1.2.3 ** Prettied up print method * Changes in kimwitu++ 1.2.1 ** Change kc_uviews::view to be a pointer type. * Changes in kimwitu++ 1.2 ** Rename KC_UView and uview to uview_class and uview_enum; introduce uview as uview_class &. ** Change option names to use dashes instead of underscores. ** Remove support for non-sharing CSGIO (This was a feature to make kimwitu 4 compatible with earlier versions) ** Add is_nil method to lists. * Changes in kimwitu++ 1.1.1 ** Rename kc_view_count to kc_last_uview; add kc_last_rview. ** Fix old kimwitu double-rewrite bug. * Changes in kimwitu++ 1.1 ** Rename kc_view_names to kc_uviews To access view objects, you can use the kc_uviews array. ** The subphyla union has been removed; the subphyla are now called _. ** The KC_SUBPHYLUM data structurs have been removed; access to subphyla is now possible via the subphylum method. ** Lists now produce a single class only; the Nillist is represented with two null subphyla. ** Syntax for C++ operators and overloading is now recognized. kimwitu++-2.3.13/install-sh0000755000175000017500000001273607304733514014160 0ustar useruser#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 kimwitu++-2.3.13/doc/0000755000175000017500000000000011135163773012711 5ustar useruserkimwitu++-2.3.13/doc/formatters/0000755000175000017500000000000011135163773015077 5ustar useruserkimwitu++-2.3.13/doc/formatters/docbook2html.sh0000755000175000017500000000051007674325732020031 0ustar useruser#! /bin/sh set -x # Use XSLT processor to make XML into XHTML STYLESHEET=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/xhtml/docbook.xsl if [ -f $STYLESHEET ] then xsltproc $STYLESHEET $1 > $2 2> .kkkk_eeee || cat .kkkk_eeee else echo Error: stylesheet not found: $STYLESHEET exit fi echo Errors: cat .kkkk_eeee kimwitu++-2.3.13/doc/formatters/docbook2tex.xsl0000644000175000017500000010024010753341613020043 0ustar useruser UNKNOWN TAG Unknown tag % PROCESSING INSTRUCTION NOT HANDLED \textbraceleft{} \textbraceright{} \$ \_ \% \# \& \textbackslash{} <\/< >\/> -\/- -\/-\/- `\/` '\/' ?\/` !\/` \textquoteleft{} \textquoteright{} \textquotedblleft{} \textquotedblright{} \quotedblbase{} \textquotedbl{} \EUR{} {i\kern-.1em j} -\/- - --\,-- -- ---\,--- --- \ifx\pdfoutput\undefined \documentclass[10pt,twoside,dvips ,pointlessnumbers,bibtotoc,idxtotoc,openright]{} \else \documentclass[10pt,twoside,pdftex,pointlessnumbers,bibtotoc,idxtotoc,openany]{} \pdfcompresslevel=7 \fi \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{newcent}\renewcommand\sfdefault{pvn} \usepackage{mdwtab,booktabs,tabularx} \usepackage{graphicx,color,ngerman,marvosym} \let\Rightarrow\relax% Marvosym defines \Rightarrow, which is also in euler \usepackage{euler,xspace,soul,relsize,remreset,float,listings} \usepackage{makeidx} \makeindex \usepackage[T1,hyphens]{url} \urlstyle{rm} \lstset{columns=fullflexible,commentstyle=\itshape,literate={<<}{\textless{\kern-0.1em}\textless}2} \paperwidth=21cm \paperheight=297mm \typearea{8} \makeatletter \ifx\pdfoutput\undefined \newcommand{\hyperdef}[2]{} \else \setlength{\paperwidth}{24cm} \setlength{\paperheight}{20cm} \@twosidefalse \typearea{15} \usepackage[pagebackref,colorlinks,bookmarks,bookmarksopen]{hyperref} \DeclareGraphicsExtensions{.pdf} \fi % \if PDF \newif\ifAppendicesBegun \AppendicesBegunfalse \selectlanguage{english} \selectlanguage{ngerman} No known language given (try 'en' or 'de') \floatstyle{plain} \newfloat{example}{htb}{loe}[ chapter section ] \floatname{example}{ Example Beispiel } %\newenvironment{informalexample}{\pagebreak[3]\kern2pt\hrule\kern-2pt\nopagebreak}{\nopagebreak\hrule\medskip\pagebreak[3]} \newenvironment{informalexample}{}{\pagebreak[3]} \restylefloat{table} \@removefromreset{footnote}{chapter} \makeatother \begin{document} \frontmatter \printindex \end{document} \begin{titlepage} \enlargethispage{8ex} \noindent \vspace*{\fill} \begin{center}{\bfseries \Huge \\[0.5em] \Large \vfill \vfill} \large \\ \normalsize , \\ ~\\[1ex] \end{center} \vfill \end{titlepage} \thispagestyle{empty} \noindent\textbf{\large : }\\ , \\[2ex] , published , veröffentlicht Published Veröffentlicht \\[2ex] Copyright © , ~~ , \small \vspace{2ex} \vspace*{\fill} \noindent \noindent This paper was written in XML using the DocBook DTD.\\[1ex] Output is produced with the typesetting system \TeX{} using the KOMA Script package after conversion to \LaTeX{} with the XSLT program docbook2tex. \noindent \small Diese Arbeit wurde in XML mit der DocBook-DTD geschrieben.\\[1ex] Die Ausgabe erfolgt durch Konvertierung mittels des XSLT-Programms docbook2tex nach \LaTeX{} mit dem Textsatzsystem \TeX{} unter Zuhilfenahme des KOMA-Script-Pakets. \normalsize \ifx\pdfoutput\undefined\else \hypersetup{pdftitle=,% pdfsubject=,% pdfauthor= } \fi \clearpage scrartcl \makeatother \begin{document} \printindex \end{document} Must specify exactly one authorgroup or author in articleinfo \author{} \author{ \and } \title{} \date{} \maketitle \noindent\textbf{Keywords: } \noindent\textbf{Schlüsselwörter: } , (, ) \pagestyle{plain} \tableofcontents \clearpage \listof{example}{ Examples Beispiele } \cleardoublepage \pagestyle{headings} \mainmatter \pagenumbering{roman} \vspace*{\fill} \begin{list}{}{\setlength{\leftmargin}{4em}\setlength{\rightmargin}{4em}}\item \hspace*{\fill}\textbf{\LARGE }\hspace*{\fill} \vspace*{2ex} \end{list} \vspace*{\fill} \cleardoublepage \part{} \setpartpreamble{% \begin{list}{}{\setlength{\leftmargin}{4em}\setlength{\rightmargin}{4em}}\item \hspace*{\fill}\textbf{\Large }\hspace*{\fill} \vspace*{2ex} \end{list}} \chapter{} \ifAppendicesBegun\relax\else \appendix \AppendicesBeguntrue \fi \chapter{} \setcounter{section}{} \section*{} \subsection{} \subsubsection{} \paragraph{} \subparagraph{} \begin{description} \end{description} \item[ , ] \label{} \chapter*{ No title given for glossary Glossary Glossar } \section*{} \item[ ( , )] see siehe See also Siehe auch , . \begin{description} \end{description} \renewcommand{\bibname}{} \bib@heading \section*{} Must specify exactly one authorgroup or author in biblioentry/bibliomixed \bibitem[]{} } . , and und . \newblock {\em -- \newblock \newblock , , , \begin{thebibliography}{MPi01} \end{thebibliography} \begin{quotation} \par\hfill\textit{}\\ \end{quotation} \textquotedblleft{} \glqq{} \textquotedblright{} \grqq{} \begin{itemize} \item \end{itemize} \begin{enumerate} \item \end{enumerate} \begin{lstlisting} [language= {} ] {} \end{lstlisting} \begin{example} \caption{ } \end{example} \begin{informalexample} \vspace*{1ex} \end{informalexample} \cite{} \ref{} \begin{center}\end{center} \index{ Indexterm element must be empty for end of range. |) | Indexterm start of range must have an ID. ( see{} textbf } Index zones are not supported ! ! \minisec{} \begin{table}[htb] \caption{ } 0 1 \end{table} 1 0 \begin{ tabular } { r c l }\toprule \bottomrule \end{ tabular } \midrule \bf & \cr \midrule \url{} <\url{}> (\url{}) \textbf{} \emph{} \textsf{} \textsf{} \textsf{} \textsf{} \textsl{} \texttt{} \texttt{} \texttt{} \texttt{} \textsc{} \textit{\textless{}\textgreater{}} \textsuperscript{} \begin{figure}[htb]\begin{center} \caption{ } \end{center}\end{figure} \include{} \includegraphics{} kimwitu++-2.3.13/doc/formatters/docbook2tex.sh0000755000175000017500000000132507700257037017662 0ustar useruser#! /bin/sh set -e set -x # Use XSLT processor to make XML into LaTeX if [ -f docbook2tex.xsl ] then xsltproc docbook2tex.xsl $1 > .kkkk_kkkk 2> .kkkk_eeee || cat .kkkk_eeee else xsltproc formatters/docbook2tex.xsl $1 > .kkkk_kkkk 2> .kkkk_eeee || cat .kkkk_eeee fi # Use Saxon processor to make XML into LaTeX (if current xsltproc fails) #if [ -f docbook2tex.xsl ] #then # saxoncat -S $1 docbook2tex.xsl > .kkkk_kkkk 2> .kkkk_eeee || cat .kkkk_eeee #else # saxoncat -S $1 formatters/docbook2tex.xsl > .kkkk_kkkk 2> .kkkk_eeee || cat .kkkk_eeee #fi echo Errors: cat .kkkk_eeee # Finally convert UTF8 (the XML standard encoding) # to Latin 1 (our standard encoding) iconv -f utf8 -t latin1 .kkkk_kkkk -o $2 kimwitu++-2.3.13/doc/figures/0000755000175000017500000000000011135163773014355 5ustar useruserkimwitu++-2.3.13/doc/figures/simplify.fig0000644000175000017500000000474007450065537016711 0ustar useruser#FIG 3.2 Landscape Center Metric A4 100.00 Single -2 1200 2 6 3915 4500 4365 4950 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 3915 4500 4365 4500 4365 4950 3915 4950 3915 4500 4 0 0 50 0 0 12 0.0000 2 90 90 4095 4770 x\001 -6 6 3285 4500 3735 4950 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 3285 4500 3735 4500 3735 4950 3285 4950 3285 4500 4 0 0 50 0 0 12 0.0000 2 135 90 3420 4770 3\001 -6 6 1935 4500 2385 4950 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 1935 4500 2385 4500 2385 4950 1935 4950 1935 4500 4 0 0 50 0 0 12 0.0000 2 135 90 2115 4770 4\001 -6 6 2565 4500 3015 4950 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2565 4500 3015 4500 3015 4950 2565 4950 2565 4500 4 0 0 50 0 0 12 0.0000 2 90 90 2745 4770 x\001 -6 6 4860 4500 5310 4950 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 4860 4500 5310 4500 5310 4950 4860 4950 4860 4500 4 0 0 50 0 0 12 0.0000 2 135 90 5040 4770 4\001 -6 6 5535 4500 5985 4950 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 5535 4500 5985 4500 5985 4950 5535 4950 5535 4500 4 0 0 50 0 0 12 0.0000 2 135 90 5670 4770 3\001 -6 6 6525 3825 6975 4275 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 6525 3825 6975 3825 6975 4275 6525 4275 6525 3825 4 0 0 50 0 0 12 0.0000 2 90 90 6705 4095 x\001 -6 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 3150 3600 2475 3825 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 3150 3600 3825 3825 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 2475 4275 2160 4500 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 2475 4275 2790 4500 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 3825 4275 3510 4500 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 3825 4275 4140 4500 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2925 3150 3375 3150 3375 3600 2925 3600 2925 3150 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2250 3825 2700 3825 2700 4275 2250 4275 2250 3825 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 3600 3825 4050 3825 4050 4275 3600 4275 3600 3825 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 6075 3600 5400 3825 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 6075 3600 6750 3825 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 5400 4275 5085 4500 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 5400 4275 5715 4500 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 5175 3825 5625 3825 5625 4275 5175 4275 5175 3825 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 5850 3150 6300 3150 6300 3600 5850 3600 5850 3150 4 0 0 50 0 0 12 0.0000 2 120 165 3060 3420 '+'\001 4 0 0 50 0 0 12 0.0000 2 75 150 2385 4140 '*'\001 4 0 0 50 0 0 12 0.0000 2 75 150 3735 4140 '*'\001 4 0 0 50 0 0 12 0.0000 2 120 165 5310 4095 '+'\001 4 0 0 50 0 0 12 0.0000 2 75 150 5985 3465 '*'\001 kimwitu++-2.3.13/doc/figures/equation1.png0000644000175000017500000000032107473400244016762 0ustar useruserPNG  IHDRO 3BPLTEU~ pHYs``zxEtIME7B>^IDATxc` !f < GB $ kcidx8075c78 3 4 1 1 0 0 0 0 -1 12.000 0 0 0 4 1278 3449 1278 3545 1278 3666 1278 3786 -1.000 1.000 1.000 -1.000 # kcidx8075c78 -> kcidx8075c60 3 4 1 1 0 0 0 0 -1 12.000 0 0 0 4 904 4389 856 4534 783 4751 711 4944 -1.000 1.000 1.000 -1.000 # kcidx8075c78 -> kcidx8075c38 3 4 1 1 0 0 0 0 -1 12.000 0 0 0 4 1652 4389 1700 4534 1784 4751 1857 4944 -1.000 1.000 1.000 -1.000 # kcidx8075c38 -> kcidx8075c28 3 4 1 1 0 0 0 0 -1 12.000 0 0 0 4 1977 5547 1965 5692 1941 5933 1929 6138 -1.000 1.000 1.000 -1.000 # kcidx8075c60 -> kcidx8075c50 3 4 1 1 0 0 0 0 -1 12.000 0 0 0 4 615 5547 639 5692 675 5909 711 6102 -1.000 1.000 1.000 -1.000 # kcidx8075c50 -> kcidi8075c18 3 4 1 1 0 0 0 0 -1 12.000 0 0 0 7 795 6705 820 6874 868 7127 880 7163 916 7236 976 7296 1037 7344 -1.000 1.000 1.000 -1.000 1.000 1.000 -1.000 # kcidx8075c28 -> kcidi8075c18 3 4 1 1 0 0 0 0 -1 12.000 0 0 0 4 1821 6705 1736 6862 1591 7103 1495 7296 -1.000 1.000 1.000 -1.000 4 1 0 0 0 0 10 0.0000 0 135 705 1278 3340 root_aterm\001 4 1 0 0 0 0 10 0.0000 0 105 285 1278 4088 Plus\001 4 1 0 0 0 0 10 0.0000 0 90 360 952 4329 aterm\001 4 1 0 0 0 0 10 0.0000 0 90 360 1604 4329 aterm\001 4 1 0 0 0 0 10 0.0000 0 135 765 590 5246 SimpleTerm\001 4 1 0 0 0 0 10 0.0000 0 135 720 590 5487 simpleterm\001 4 1 0 0 0 0 10 0.0000 0 135 345 1145 4787 edge1\001 4 1 0 0 0 0 10 0.0000 0 135 765 1989 5246 SimpleTerm\001 4 1 0 0 0 0 10 0.0000 0 135 720 1989 5487 simpleterm\001 4 1 0 0 0 0 10 0.0000 0 135 345 2134 4787 edge4\001 4 1 0 0 0 0 10 0.0000 0 105 510 783 6404 Number\001 4 1 0 0 0 0 10 0.0000 0 135 435 783 6645 integer\001 4 1 0 0 0 0 10 0.0000 0 135 345 1037 5945 edge2\001 4 1 0 0 0 0 10 0.0000 0 105 75 1338 7610 7\001 4 1 0 0 0 0 10 0.0000 0 135 345 1193 7103 edge3\001 4 1 0 0 0 0 10 0.0000 0 105 510 1893 6404 Number\001 4 1 0 0 0 0 10 0.0000 0 135 435 1893 6645 integer\001 4 1 0 0 0 0 10 0.0000 0 135 345 2255 5945 edge5\001 4 1 0 0 0 0 10 0.0000 0 135 345 2014 7103 edge6\001 kimwitu++-2.3.13/doc/figures/equation3.png0000644000175000017500000000044007473400244016766 0ustar useruserPNG  IHDRt BymPLTEU~ pHYs``zxEtIMEHrIDATx51 @пc !fb1RXL*#dr+ ^`č0gP` R!#>[&H%dk) jy21Smyt.{v! ~Jh)tN/%gBf7A\A?Q+R IENDB`kimwitu++-2.3.13/doc/figures/syntaxtreex.fig0000644000175000017500000000450107450065537017446 0ustar useruser#FIG 3.2 Landscape Center Metric A4 100.00 Single -2 1200 2 6 1935 4500 2385 4950 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 1935 4500 2385 4500 2385 4950 1935 4950 1935 4500 4 0 0 50 0 0 12 0.0000 2 135 90 2115 4770 4\001 -6 6 2565 4500 3015 4950 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2565 4500 3015 4500 3015 4950 2565 4950 2565 4500 4 0 0 50 0 0 12 0.0000 2 90 90 2745 4770 x\001 -6 6 3285 4500 3735 4950 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 3285 4500 3735 4500 3735 4950 3285 4950 3285 4500 4 0 0 50 0 0 12 0.0000 2 135 90 3420 4770 3\001 -6 6 3915 4500 4365 4950 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 3915 4500 4365 4500 4365 4950 3915 4950 3915 4500 4 0 0 50 0 0 12 0.0000 2 90 90 4095 4770 x\001 -6 6 1800 3150 2250 3600 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 1800 3150 2250 3150 2250 3600 1800 3600 1800 3150 4 0 0 50 0 0 12 0.0000 2 135 180 1935 3420 30\001 -6 6 3510 2475 3960 2925 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 3510 2475 3960 2475 3960 2925 3510 2925 3510 2475 4 0 0 50 0 0 12 0.0000 2 135 270 3555 2745 100\001 -6 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 3150 2250 2565 2475 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 3150 2250 3735 2475 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 2565 2925 2025 3150 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 2565 2925 3150 3150 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 3150 3600 2475 3825 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 3150 3600 3825 3825 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 2475 4275 2160 4500 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 2475 4275 2790 4500 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 3825 4275 3510 4500 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 3825 4275 4140 4500 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2925 1800 3375 1800 3375 2250 2925 2250 2925 1800 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2340 2475 2790 2475 2790 2925 2340 2925 2340 2475 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2925 3150 3375 3150 3375 3600 2925 3600 2925 3150 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 3600 3825 4050 3825 4050 4275 3600 4275 3600 3825 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2250 3825 2700 3825 2700 4275 2250 4275 2250 3825 4 0 0 50 0 0 12 0.0000 2 75 150 2385 4140 '*'\001 4 0 0 50 0 0 12 0.0000 2 75 150 2475 2790 '*'\001 4 0 0 50 0 0 12 0.0000 2 90 120 3060 2070 '-'\001 4 0 0 50 0 0 12 0.0000 2 120 165 3060 3420 '+'\001 4 0 0 50 0 0 12 0.0000 2 75 150 3735 4140 '*'\001 kimwitu++-2.3.13/doc/figures/equation2.png0000644000175000017500000000034007473400244016764 0ustar useruserPNG  IHDR@ #a/PLTEU~ pHYs``zxEtIMEmIDATxcPh``a# s1 8b`pA-L!2 g8 pH@![&uf&9 @b(1BOH=IENDB`kimwitu++-2.3.13/doc/figures/equation4.png0000644000175000017500000000045607473400245016777 0ustar useruserPNG  IHDR  >PLTEU~ pHYs``zxEtIME+(hIDATx=1@EM0t4+l&cPX,QD-T\#Px :|j #'bbFi` dYY !HrVRȥ< lBT&5zd޵'.6uЩcGAiM sJuv{`s!W-EOFa1-h/.1"NIENDB`kimwitu++-2.3.13/doc/Makefile0000644000175000017500000000425407735004256014357 0ustar useruser# Kimwitu++ documentation Makefile # Copyright (c) 2000 Michael Piefel, Humboldt-University Berlin # This is GPLed, but who would want it? .PHONY: all pdf tex dvi force index clean html XMLs := kpp-main.xml kpp-intro.xml kpp-manual.xml kpp-cook.xml kpp-rpn.xml FIGs := syntaxtreex.fig simplify.fig fprintdot.fig FIGDIR:= figures IMGDIR:= imagesgen DEST:=manual EPSs := $(subst .fig,.eps,$(FIGs)) PDFs := $(subst .fig,.pdf,$(FIGs)) PNGs := $(subst .fig,.png,$(FIGs)) PSTEXs := $(addprefix $(IMGDIR)/, $(subst .fig,.tex,$(FIGs))) FIGs := $(addprefix $(FIGDIR)/,$(FIGs)) EPSs := $(addprefix $(IMGDIR)/,$(EPSs)) PDFs := $(addprefix $(IMGDIR)/,$(PDFs)) PNGs := $(addprefix $(IMGDIR)/,$(PNGs)) all: @echo "Call with pdf, tex or target document name" pdf: $(DEST).pdf tex: $(DEST).tex dvi: $(DEST).dvi html: $(DEST).html force: touch $(DEST).tex index: makeindex $(MIFLAGS) $(DEST) $(DEST).dvi: $(DEST).tex $(EPSs) $(PSTEXs) %.dvi: %.tex latex $< #%.tex: %.xml # xsltproc formatters/docbook2tex.xsl $< > $@ .PRECIOUS: kpp-main.fo %.fo: %.xml xsltproc formatters/kimwitu++.xsl $< > $@ %.pdf: %.fo # New FOP does not seem to need this adaption any more # xsltproc formatters/fo2fop.xsl $< > $@-fop.fo # fop $@-fop.fo $@ fop $< -pdf $@ $(DEST).tex: $(XMLs) formatters/docbook2tex.xsl formatters/docbook2tex.sh $< $@ %.tex: %.xml formatters/docbook2tex.xsl formatters/docbook2tex.sh $< $@ $(DEST).html: $(XMLs) $(PNGs) formatters/docbook2html.sh $< $@ $(IMGDIR)/%.eps:$(FIGDIR)/%.fig if [ ! -d $(IMGDIR) ] ; then \ mkdir $(IMGDIR) ; \ fi fig2dev -L pstex -b1 $? $@ $(IMGDIR)/%.pdf:$(FIGDIR)/%.fig if [ ! -d $(IMGDIR) ] ; then \ mkdir $(IMGDIR) ; \ fi fig2dev -L pdftex -b1 $? $@ $(IMGDIR)/%.png:$(FIGDIR)/%.fig if [ ! -d $(IMGDIR) ] ; then \ mkdir $(IMGDIR) ; \ fi fig2dev -L png -b1 -S4 $? $@ $(IMGDIR)/%.tex:$(FIGDIR)/%.fig if [ ! -d $(IMGDIR) ] ; then \ mkdir $(IMGDIR) ; \ fi fig2dev -L pstex_t -p $(basename $@) $? $@ $(DEST).pdf: $(DEST).tex $(PDFs) $(PSTEXs) %.pdf: %.tex pdflatex $< clean: rm -f *.aux *.log *.toc *.dvi *.out *.idx *.ind *.loe *.ilg *.fot *.fo rm -f .kkkk_eeee .kkkk_kkkk rm -rf $(IMGDIR) veryclean: clean rm -f manual.tex manual.pdf manual.html kimwitu++-2.3.13/doc/kc2kc++.tex0000644000175000017500000001040307475672352014566 0ustar useruser\documentclass[a4paper,10pt]{article} \usepackage{url,a4wide,newcent} \usepackage[latin1]{inputenc} \newcommand{\programtext}[1]{\texttt{\textbf{#1}}} \begin{document} \begin{center}\Huge From Kimwitu to Kimwitu++\end{center} This document is meant as a short guide for converting projects that employ Kimwitu to use Kimwitu++ instead. It is probably not complete. Please mail any comments to \url{piefel@informatik.hu-berlin.de}. % @ \begin{itemize} \item Generally Kimwitu++ works together with C++, while Kimwitu worked with C. This will possibly cause some of the usual C to C++ hassle. \item Kernighan \& Ritchie style for C functions is not allowed in *.k files. Use proper ISO~C instead. \item There is no longer a predefined phylum called `\programtext{int}'. There is, however, a phylum providing the same functionality called `\programtext{integer}'. When converting, please note that `\programtext{integer i; i=5;}' will be caught by the compiler, while `\programtext{i=0;}' will not. This is nasty, I'm sorry. The right way to use them is `\programtext{integer i; i=mkinteger(5);} and `\programtext{if (i->value==5) \dots}'. \item Similar things apply to `\programtext{float}' et.\,al., there is now a phylum `\programtext{real}'. \item \programtext{Bool}, \programtext{True} and \programtext{False} disappeared and are supplanted by their respective C++ counterparts. \item Phyla are classes or objects, respectively. Instead of `\programtext{unparse\_completeSyntaxTree( synTree, printer, view );}' you can use the more natural `\programtext{synTree->unparse( printer, view );}'. \item The keyword and typename `\programtext{\%view}' and `\programtext{view}' are no longer available (they were deprecated anyway). Use `\programtext{\%uview}' and `\programtext{uview}'. \item Printers are now by default not functions taking \programtext{(char*, uview)}, but rather objects of a class with \programtext{operator()(const char*, uview)} defined. This allows a printer to have its own state. You can also still use functions if you want, they will be wrapped when calling \programtext{unparse}. \item Everthing is in the namespace \programtext{kc}. If you put \programtext{using namespace kc;} in your program, everthing else will continue to work as it did. \item If you want to interface with flex and bison, not that the union \programtext{YYSTYPE} is not generated automatically anymore. Instead, use the command line option --yystype, which will create a seperate yystype.h containing the type definition. \item CSGIO works a little different in two respects.\begin{itemize} \item The old functions returned a string which indicated success or failure. The new functions instead return \programtext{void}. Errors will be reported by throwing exceptions of type \programtext{IO\_exception}; there is a function \programtext{IO\_exception2char} turning that into a string. \item While \programtext{CSGIOwrite} is a member function, \programtext{CSGIOread} cannot be. The latter takes just the phylum type, not a pointer to it---just write \programtext{CSGIOread(f, p)}. \end{itemize} \end{itemize} \clearpage \begin{center}\large New Features\end{center} This is just a very brief list of some of the nicest new features, it is not exhaustive. \begin{itemize} \item Everything can be unparsed. As long as the (somewhat limited) parser can read it, it will be handed to a global unparse function (in namespace kc); define your own function if it is needed. \item All patterns (eg. for unparse rules) can have a guard condition; the condition comes in parentheses after the pattern following the new keyword \programtext{provided}. \item New functions for phylum types can be defined, just write something like \programtext{void foo::bar() \{ \dots~\}}. \item There is a new (additional) syntax for defining attributes of phyla such as \programtext{\%member int foo::baz}; when using \programtext{\%attr} instead, the attribute will be written out and read in with CSGIO functions. \item Likewise you can define additional constructors and destructors with \programtext{\%ctor} and \programtext{\%dtor}. \end{itemize} \end{document} kimwitu++-2.3.13/doc/kpp-intro.xml0000644000175000017500000010064007700775701015362 0ustar useruser What is &kpp;? This chapter sketches out the field on which &kpp; is usefully employed and explains important terms. It develops an example to outline the advantages of this tool compared to conventional techniques. The example will be used throughout the following chapters to introduce concept by concept. The complete code to make it work can be found in appendix . What for is &kpp; used? To illustratively explain what we can do with the help of &kpp; we call upon an example. Let us imagine we want to write a computer game. Neat example. Respectable programmers as we are we calculate the overall costs of the new project in advance. It will take us, say, 30 days, on each we need to have a pizza at 7 € and 3 beer at 2 € each, but luckily meanwhile our grandma supports us with 100 €. We get the expression 30*(8+3*2)-100 and type it in postfix notation into our RPNrpn-calculator. You know, one of the antiquated devices knowing nothing about precedence nor parentheses and expecting input in Reverse Polish Notation, where operands precede their operator. So we type 30 8 3 2 * + * 100 -. Er, we cannot. I remember. The calculator gave up the ghost last week. But don't despair. We quickly program a new one. A Simple Example What exactly should the new calculator be able to do? Anyhow, it better would accept also variables. Why? Just imagine a drastic shortage of pizza and beer what would urge us to setup a new expression again. We better use a flexible one which can be seen in example , in which x is the price of a beer and we know the price of a pizza always to be 4 times a beer. Sample Expression 30*(4*x+3*x)-100 (and resulting input in RPN: 30 4 x * 3 x * + * 100 -) We now list the requirements on the calculator in proper order. We want it to analyse an input expression (term) of digits, arithmetical operators, and variables. It should calculate the expression if possible or simplify it at least. It then should output a result. We assume the existence of a code component (a scanner) providing us with syntactical tokens like operators, numbers and identifiers (variables). We then need a description of correct input, a grammargrammar. Our example demands a valid arithmetical term only to consist of numbers, identifiers, and the four arithmetical operators. A formal notation as used by the parser generator &yacc; (see ) would look like in example . &yacc; Grammar for Sample aritherm: simpleterm | aritherm aritherm '+' | aritherm aritherm '-' | aritherm aritherm '*' | aritherm aritherm '/'; simpleterm: NUMBER | IDENT; Such a grammar is made up of rules, each having two sides separated by a colon. These rules describe how the left-hand side called nonterminalnonterminal can be composed of syntactical tokens called terminalsterminal, which are typed in upper case letters or as single quoted characters. Different alternatives are separated by bar. The right-hand side may also contain nonterminals which there can be regarded to be an application of their respective composition rule. The first rule of this grammar defines an &aritherm; to be a &simpleterm; or a composition of two &aritherm;s and an operator sign. These &aritherm;s in turn may be composed according to the &aritherm; rule. The second rule describes what an &aritherm; looks like, if it is a &simpleterm;. A common way to hold an input term internally is to keep it as a syntax treetreesyntax tree, that is a hierarchical structure of nodesnode (upside down tree). A nonterminal can be regarded as a node typenode type and every alternative of the assigned right-hand side as one &kind;&kind; of that type. Every actual node thus is a &kind; of a node type with a specific number of child nodes, which depends on the &kind;. For example '+' is a &kind; of &aritherm; and it has 2 child nodes, while NUMBER is a &kind; of &simpleterm; and it has none. Figure shows a syntax tree for our sample input term. Since every node is a termterm itself such a tree is more generally called a term treetreeterm tree.
Syntax tree representing sample term
To summarise the task identified: we want to build a tree from the term which has been typed in, walk over the tree nodes, and perform appropriate actions like calculating, simplifying or printing some results.
Conventional Approach In a programming language a node type is usually represented as a structured data type, that is, as a class in object oriented languages and as a sort of record in others. A &kind;, then, may be a class variant or a subclass, and a variant record respectively. The code fragment in example illustrates a possible implementation in &cpp; (the &kind; as a subclass). The classes left out are to define similar. Node Types as Classes with &cpp; class Aritherm { /* ... */ }; class Simpleterm : Aritherm { /* ... */ }; class Plus : public Aritherm { public : Plus( Aritherm *a, Aritherm *b ) : t1 ( a ), t2 ( b ) { /* ... */ }; private: Aritherm *t1, *t2; }; class Number : public Simpleterm { public : Number( int a ) : n ( a ) { /* ... */ }; private: int n; }; From these classes we can instantiate &cpp; objects to represent our sample tree. We can navigate through it by accessing the child nodes of nodes. Not really yet, if you look closely at it. The child nodes are private members and thus they can not be accessed. We have to make them public or to add methods for their access. But what about the next step, simplifying parts of the tree? The subtree 4*x+3*x could be transformed to, right, (4+3)*x , by putting x outside the parentheses, as illustrated in figure . For &cpp; this may look like listed in example .
Simplification of a samples subtree
Term Substitution with &cpp; ( A ) !=0 && dynamic_cast ( dynamic_cast( A ) -> t1 ) !=0 && dynamic_cast ( dynamic_cast( A ) -> t2 ) !=0 && dynamic_cast ( dynamic_cast( A ) -> t1 ) -> t2 == dynamic_cast ( dynamic_cast( A ) -> t2 ) -> t2 ) { A = new Mul ( new Sum ( dynamic_cast ( dynamic_cast( A ) -> t1 ) -> t1, dynamic_cast ( dynamic_cast( A ) -> t2 ) -> t1 ), dynamic_cast ( dynamic_cast( A ) -> t1 ) -> t2 ); }; ]]> That seems quite complicated and it is even more so! Not only have we to cast for every child node access, to avoid memory leaks we had to free memory of unused nodes as old A and its child nodes. Furthermore the equality check between t1 and t2 will merely compare pointer values, instead of checking whether the subtrees are structurally equal. Thus we additionally need to overload the equality operators. What a lot of trouble for such a simple example!
&kpp; Approach &kpp;'s&kpp; name is formed after Swahili while the ‘++’ reminds on &cpp;. witu : ‘tree’ m- : plural prefix ki- : adjectival prefix: ‘being like’ kimwitu = ‘tree-s-ish’ Thus the name indicates affiliation to trees and to &cpp;. You guessed it before, didn't you? More strictly spoken &kpp; is a tool which allows to describe in an easy way how to manipulate and to evaluate a given term tree. From these descriptions &cpp; code is generated and compiled to a program which processes terms. That is why &kpp; itself is called a term processor. The code for building a tree, we have to write ourselves, or we let preferably other tools generate it. We use &yacc; to call term creation routines which are generated from a &kpp; abstract grammar. This we have to specify first. It is similar to the &yacc; grammar, but its right-hand side alternatives are operators applied to nonterminals. An abstract grammar for our sample can be seen in example . The nonterminals integer and casestring are predefined in &kpp;. Abstract Grammar for Sample aritherm: SimpleTerm ( simpleterm ) | Plus ( aritherm aritherm ) | Minus ( aritherm aritherm ) | Mul ( aritherm aritherm ) | Div ( aritherm aritherm ); simpleterm: Number ( integer ) | Ident ( casestring ); Next we have to complete the &yacc; grammar by adding semantic actions in braces to every alternative. These recursively create a term tree which has its root element assigned to the variable root_term. Example shows this grammar, in which $$ denotes the term under construction and $1 and $2 its first and its second subtermsubterm (child node). Completed &yacc; Grammar for Sample aritherm: simpleterm { root_term = $$ = SimpleTerm( $1 ); } | aritherm aritherm '+' { root_term = $$ = Plus( $1, $2 ); } | aritherm aritherm '-' { root_term = $$ = Minus( $1, $2 ); } | aritherm aritherm '*' { root_term = $$ = Mul( $1, $2 ); } | aritherm aritherm '/' { root_term = $$ = Div( $1, $2 ); }; simpleterm: NUMBER { $$ = Number( $1 ); } | IDENT { $$ = Ident( $1 ); }; That is it for building a tree. Everything else is left to the automatic code generation. Modifying or evaluating the tree needs its own rules (see chapter ). Summary The language &kpp; is an extension of &cpp; for handling of term trees. It allows the definition of term typesterm typenode type, creation of terms, and provides mechanisms for transforming and traversing trees as well as saving and restoring them. Besides creating it in static code a tree can dynamically be obtained by interfacing with compiler generator &cpp; code (as from &yacc;/&bison;). The &kpp; processor generates &cpp; code from the contents of &kpp; input (.k-files). Compilation of that code yields the term processing program.
How to Define Term Types This chapter describes possibilities to define term types, which make up the &kpp; input. In &kpp; they are called phylaphylaphylum (singular phylum)phylum, and that is what we will call them from now on. A phylum instance is called a termterm. Definition phylumdefinition How are phyla defined? Example shows that each phylum is defined as an enumeration of its &kind;s, each being an operator applied to a number of phyla, maybe zero. So the operator SimpleTerm takes one &simpleterm; phylum, Plus takes two &aritherm; phyla. There are several predefined phyla, of which integer and casestring already have been mentioned. The latter denotes a case sensitive character string. If a phylum is defined more than once, all occurrences contribute to the first one. For each phylum, a &cpp; class is generated. Lists<indexterm><primary>list</primary></indexterm> list We may want to define a phylum as a list of phyla. Imagine we wanted not only to type one expression into our calculator but several ones at once, separated in input by, say, a semicolon. The main phylum, representing whole the input, would be a list of &aritherm;s. This is a right-recursive definition of a list which may be a nil (empty) list. The name of the list phylum prefixed by NilNil and ConsCons make up common names for the two list operators. The other way to define a list phylum is to use the built-in list operator. This not only looks more simple but causes the generation of additional list functions. Example shows both definitions. Recursive and built-in List Definition arithermlist: Nilarithermlist ( ) | Consarithermlist( aritherm arithermlist ); arithermlist: list aritherm; Attributes<indexterm id="intro_attributes" class="startofrange"><primary>attributes</primary></indexterm> Each phylum definition can contain declarations of attributes of phylum or arbitrary &cpp; types. They follow the operator enumeration as a block enclosed in braces. What purpose do they serve? With them, we can attach additional information to nodes, which otherwise could only unfavourably be represented in the tree. In our example, we may take advantage of attributes by saving intermediate results to support the calculation. Therefore we extend the definition of &aritherm; from example to example . Phylum Definition with Attributes aritherm: SimpleTerm ( simpleterm ) | Plus ( aritherm aritherm ) | Minus ( aritherm aritherm ) | Mul ( aritherm aritherm ) | Div ( aritherm aritherm ) { int result = 0; bool evaluated = false; bool computable = true; }; Attribute result should hold the intermediate result of an &aritherm;, if it already has been evaluated (evaluated==true) and found computable during the evaluation (computable==true), that is the subterms contain no variables. The attributes can be initialized at the declaration or inside an additional braces block which may follow the declarations and can contain arbitrary &cpp; code. Example shows an alternative to the initialization from example . Alternative Attributes Initialization result = 0; $0->evaluated = false; $0->computable = true; } };]]> That &cpp; code is executed when a term of that phylum has been created. It can be referred to as $0 and its attributes can be accessed via the operator ]]>. Aid with Term Handling This chapter describes techniques necessary and useful to traverse a term structure: the application of term patterns and the use of special &kpp; language constructs for term handling. Patterns<indexterm><primary>patterns</primary></indexterm> Patterns are a means to select specific terms which can be associated with a desired action. Example shows some patterns and explains what terms they match. Patterns are used in special statements and in rewrite and unparse rules (see and respectively). Patterns Special Statements &kpp; provides two statements as extensions to &cpp; which make it more comfortable to deal with terms. These are the &with;-statement and the &foreach;-statement. They can be used in functions and in the &cpp; parts of unparse rules (see ). The &with;&with;-statement can be considered as a switch-statement for a phylum. It contains an enumeration of patterns which must describe &kind;s of the specified phylum. From these, the one is chosen which matches a given term best. Then the &cpp; code is executed, which was assigned to that pattern. Example takes a term of the phylum &aritherm; and calculates the attribute result, if the term is a sum or a difference, by adding or subtracting the results of the subterms. The keyword default serves as a special pattern in &with;, which matches when none of the others does. In the first case, the two subterms are assigned to the variables a and b, which can be used in the &cpp; part. The term itself is assigned to variable c which thus refers to the same term as the variable at. Variable at is visible throughout the entire &with; body and it can be accessed in all &cpp; parts. It may get a new term assigned as it is done in the second case whithin which the variable at refers to the first subterm. &with;-statement result = a -> result + b -> result; } Minus ( at, b ) : { c -> result = at -> result - b -> result; } default : { } }]]> The second special construct is the &foreach;&foreach;-statement, which iterates over a term of a list phylum and performs the specified actions for every list element. Example determines the greatest result from the terms in the list a. &foreach;-statement result > max ) max = a -> result; }]]> Modifying and Evaluating Term Trees This chapter describes how the tree of terms can be processed once it has been created. On one hand we can change its structure and hopefully simplify it by applying rewrite rules. On the other hand we can step through it and create a formatted output by applying unparse rules. Transforming Rewritingrewriting denotes the process of stepping through the tree, seeking the terms that match a pattern and substituting them by the appropriate substitution term. Rewrite rules consist of two parts, where the left-hand side is a pattern (as described in ) and the right-hand side is a substitution term enclosed by angle brackets. A term must always be substituted by a simpler one, that is by one that is nearer to the desired form of result. Otherwise the substitution process may never stop. Let us try simplifying according to figure to demonstrate the usage of rewrite rules. What would the rules look like in &kpp; to achieve a simplification of that kind? Example shows a solution using rewriting. It is quite short in comparison with example , isn't it? Term Substitution using &kpp; <: Plus( Mul( a, c ), b )> ;]]> An equivalent part would cover the case that b takes the first position in both subterms. The meaning of the colon will be explained in . Traversing Originally unparsing was meant to be a reverse parse, used to give a formatted output of the tree built. In general it should better be recognized as a way to traverse the tree. Unparse rules have a structure similar to that of rewrite rules. The left-hand side consists of a pattern, the right-hand side of a list of unparse items enclosed by square brackets. Some more common unparse items are strings, pattern variables, attributes, and blocks of arbitrary &cpp; code enclosed in braces. Unparsing starts by calling the unparseunparse()-method of a term, usually the root term, and when a rule matches a term the specified items are ‘printed’. Only string items are really delivered to the current printer. This printer has to be defined by the user, and it usually writes to the standard output or into a file. Variable items and attribute items are further unparsed, code fragments are executed. If no pattern matches then the default rule is used, which exists for every phylum operator and which simply unparses the subterms. We could do quite a lot of different things with the information saved in the tree. It just depends on the rules we use. For example we choose to print the input term in infix notation, because it is better readable to humans. [infix: "(" a "+" b ")" ];]]> For every Plus term this rule prints an opening parenthesis, unparses the first subterm, prints a plus sign, unparses the second subterm, and then prints the closing parenthesis. The other operators are handled by similar rules. We also may want to eventually compute the result of expressions. This can be achieved with rules like this. [: a b { c -> result = a -> result + b -> result; } ];]]> Here the subterms are unparsed and then an attribute of the term gets assigned the sum of the subterm results. This will work only if these do not contain Idents. The meaning of the colon will be explained in . The &cpp; code is enclosed by braces, but can itself contain braces in matching pairs. If a single brace is needed, as when mixing code and variable items, it has to be escaped with the dollar sign. Example shows an application. If the function yields true the first branch is taken, and b is unparsed before a. Escaped Braces in Unparse Rule [ : { if( smaller_than( a, b ) ) } ${ b "+" a $} { else } ${ a "+" b $} ];]]> Views<indexterm class="startofrange" id="idx:view"><primary>view</primary></indexterm> The whole process of rewriting and unparsing as well as parts of it can be executed under different views. Each rule contains a view list between the respective opening brace and the colon, and it is used only if the current view appears in the list. This allows to specify different rules for a pattern. If a term is visited twice under different views, different rules are applied. These rules can be merged into one by listing all right-hand sides after one left-hand side, separating them by a comma. Example defines two rewrite views (simplify and canonify) and two rules, each of which will only be applied to a matching term if the current view is among the specified ones. The first rule replaces the quotient of the same two identifiers by the number 1, the second expresses the associativity of addition. Both change the tree. Views in Rewrite Rules mkinteger < simplify: SimpleTerm( Number( mkinteger( 1 ) ) ) >; Plus( Plus( a, b ), c ) -> < canonify: Plus( a, Plus( b, c ) ) >;]]> Example defines two unparse views (infix and postfix) and two rules for the same pattern, the one of which is used which matches both the term and the current view. It is possible to force a variable item to be unparsed under a desired view by specifying it after the variable and an intermediate colon. Subterm b is further unparsed under the view check_zero instead of the view infix. %uview [ infix : a "/" b : check_zero ]; ]]> Views in Unparse Rules [ infix : a "+" b ], [ postfix : a b "+" ];]]> kimwitu++-2.3.13/doc/kpp-manual.xml0000644000175000017500000026214610611647713015512 0ustar useruser Definition of Phyla Basic Definition A phylum definition consists of two sides. The left-hand side specifies the phylum name, the right-hand side, behind a colon, a set of alternative operators, which are separated by bars. An operator is followed by a matching pair of parentheses, which may enclose a list of phyla as arguments. A nullary operator has an empty list. Example presents a basic definition with operators of different arity. Before the semicolon closing the definition an attribute block may appear. The definition of a phylum follows the general form: For the names of phyla and operators, the same restrictions hold as for &cpp; identifiers. Multiple definitions of of a phylum with the same name are interpreted as additional alternative branches of the first definition. There are some simple predefined phyla: integerinteger, realreal, casestringcasestring, and nocasestringnocasestring, representing integer values, real values, case sensitive strings, and case insensitive strings respectively. Terms of these are not created by calls of operators but of special generated functions: mkinteger()mkinteger, mkreal()mkreal, mkcasestring()mkcasestring and mknocasestring()mknocasestring. The phylum abstract_phylum represents the direct base of all phyla. Adding properties, like attributes or methods, to it makes them available for all phyla. Other direct bases may be specified for a phylum by using the keyword %base%base. One of them has to be derived from abstract_phylum, not necessarily directly. Example makes phylum math_expression to be derived from a phylum expression and a user defined &cpp; class counter_class. Definition of a Phylum Changing base of a phylum %base List Phyla<indexterm id="idx:list_man" significance="preferred" class="startofrange"><primary>list</primary></indexterm> phylumlistlist A list phylum can be defined by using the basic form of phylum definitions in a (right-) recursive way. The nullary operator constructs a list which is empty, and the binary, a list which is concatenated of a single list element and a list. The other variant uses the predefined operator list after which is specified the phylum of the list elements. The latter notation is to prefer because it is concise and causes the generation of additional list functions. That includes two operators which are named according to the scheme which is used in the right-recursive definition (prefixes Nil and Const). Other names could be chosen as well but this may cause some confusion. With either variants, a term is created by calling one of the two operators. The two definitions in example yield the same list of elements of a phylum expression. Alternative Definitions of one List Attributes of Phyla<indexterm significance="preferred" class="startofrange" id="idx:attributes"><primary>attributes</primary></indexterm> A phylum definition may have an attribute part attached which is enclosed in braces. It contains declarations of attributes of phylum types or other &cpp; types and optionally their initial value assignment. After that arbitrary &cpp; code can follow again enclosed in braces. This is the general form of the attribute part: In particular, the initialization of attributes can be done in the &cpp; part too; though technically then it is not initialization, but assignment. Attributes may also be defined outside the phylum definition according to the general form beneath. Only attributes of phylum types can be defined with %attr%attr. This is because they are considered part of the enclosing phylum by &kpp;. When a term is written to a file using the CSGIO functions (see ), its attributes are saved and can thus be restored. Using the keyword %member%member instead allows also &cpp; types to be used. The values of attributes defined in this way will get lost when their term is written to a file. Restoring a saved term will assign the initial values to all %member attributes. The &cpp; code is executed after the term creation and the attribute initializations. Inside that code the newly created term can be referred to as $0$0. Attributes are accessed via the operator ]]>. Each predefined phylum has an attribute which holds its value, which is value for integerinteger and realreal, and name for casestringcasestring and nocasestringnocasestring. Example shows three alternative ways to define and initialize one attribute (of &cpp; type). Alternative Definitions of one Attribute is_valid = true; } }; expression: Div ( expression expression ); %member bool expression::is_valid = true;]]> Supplemental Definitions It is possible to supplement the classes which will be generated from phylum definitions with additional methods. These are defined as usual but have as qualifier the name of either a phylum or of an operator. Such a method is known for all terms of the phylum or only for those constructed by the specified operator. Predefined phyla can get additional methods too. Additional Methods Definitions It may appear desirable to initialize attributes attributes of a phylum with non-default values immediately at term creation. This can be realized by using the &kpp; keyword %ctor%ctor to define own constructors which will replace the default ones. Additional constructors are possible for phyla as well as for operators, but not for predefined phyla. If these constructors are defined to have arguments then of some points are to take note. First, when used with operators the arguments will be added to those in the operator definition. Second, since the default constructors are replaced but relied on by some internal mechanism, the user has to define new ones or alternatively just provide default values for all new arguments. The latter may cause performance loss in the case of many or non-simple arguments. The keyword %dtor%dtor allows own destructor definitions for freeing memory of attributes or something similar. It is applicable to phyla and operators but not to predefined phyla. User provided Constructors and Destructors Phylum Storage Options storage optionsstorage class storage class For every phylum a &cpp; class is generated, with one create-method for every operator. A term is created by calling the appropriate method, which returns a pointer to the object representing the term. As a default for every such object a new cell is allocated in memory. But the user may influence the memory management for optimization purposes. At phylum definition time the phylum can be declared to use a special storage class. There is one predefined storage class: uniquniq. It is allowed to specify !uniq what is the same as specifying nothing and results in usage of the default storage. Subphyla of a phylum with storage class can not use the default storage, but must be defined with a storage class too. The completed general form of a phylum definition is the following one. Phylum with Storage Class The first phylum in example declares explicitly to use the default storage. All other phyla defined until now got that implicitly. Memory of such terms can be freed individually, terms of the second phylum can not. They are kept under uniq storage. What does this mean? Each storage class has a hashtables hashtable assigned. All terms of phyla with that class are stored there. If a term is to be created the create routine does conditionally allocate new storage. It checks first whether there is already stored an object created with the same arguments. If found true, the routine will return a pointer to that object in memory. Such every term is created only once. All predefined phyla, such as integer, are declared uniq. So the example has the effect that if two &simpleterm;s are created from the same int value they will both point to the same memory cell. It is possible to define additional storage classes, which each get their own table. Tables also can be explicitly created and assigned to storage classes, as well as cleared or freed (see ). Example declares two additional storage classes and defines two phyla using them. Storage Class Definition and Application Processing phyla Pattern Matching<indexterm significance="preferred"><primary>patterns</primary></indexterm> Patterns make it easier to select terms and subterms and to distinguish cases. They appear in rules for rewriting and unparsing and in &with;- and &foreach;-statements. Here there are explained common features while the slight differences will be mentioned in the appropriate place. The term ‘pattern’ can be defined through induction. Each of the following is a pattern in the context of &kpp;: the literal of a predefined phylum or the asterisk sign, the phylum operator with zero or more patterns as arguments, the assignment of a pattern to a variable, and the enumeration of patterns delimited by commas. Additionally some restrictions hold regarding the use of patterns. The patterns of item are not allowed as the outermost pattern, while these of item are allowed only as the outermost pattern. The assignment of an asterisk to a variable can be abbreviated by stating only the variable. If more than one pattern matches a term, the most specific pattern is chosen. If there is no most specific one, the first of the matches is chosen. The matched term can be accessed as $0$0, its first subtermsubterm as $1, the second as $2 etc. (not in rewrite rules). Table lists pattern examples, which are in each group equally specific. &kpp; is not yet able to decide between more complex patterns (maybe partly overlapping each other) which to be most specific, but chooses the first found. Pattern groups increasingly specific pattern matches * any term; not allowed as the outermost pattern. SimpleTerm term SimpleTerm with an unspecified number of subterms; only allowed as the outermost pattern. SimpleTerm(*) term SimpleTerm with a subterm. a=SimpleTerm(b) term SimpleTerm with a subterm; the term is assigned to a variable a, the subterm, to b. Number(7) term Number with an integer subterm of value the 7. SimpleTerm(*),Mul(b,b) either term SimpleTerm with a subterm or term Mul with two subterms which are structurally equal (the first of the two is assigned to b). SimpleTerm(Number(*)) term SimpleTerm with a subterm being a Number. a=SimpleTerm(Number(b)) term SimpleTerm with a subterm being a Number; the term is assigned to a and the sub-subterm to b. value!=0)]]> term SimpleTerm with a subterm being a Number, which is assigned to b, but matches only if the integer b is not zero.
&kpp; Control Structures &kpp; provides two control structures which help dealing with terms: the &with;&with;-statement and the &foreach;&foreach;-statement. They appear in different variants, fitting slightly different purposes. Explicit &with;<indexterm><primary>&with;</primary><secondary>explicit</secondary></indexterm> The &with;-statement is similar to a &cpp; switch and decides for a given term which alternative branch to choose. The alternatives are patterns describing &kind;s of one phylum and have assigned a &cpp; block, maybe an empty one. The example lists a code piece containing an explicitly stated &with;. It decides whether the term a is an identifier or a number and executes its code. That term is accessable throughout the whole &with; body unless an other term is assigned to the variable a, as it is done in the second case. There, variable a gets assigned the subterm of the Number. The special pattern default matches when the preceding patterns do not. Here this would never occur, because a &simpleterm; is defined to be one of the two specified. If no default case is specified and none of the patterns matches the term a runtime exception is released (program execution aborted). The pattern default is allowed in all &with;-variants (implicit-, explicit-, and &foreach;-&with;). Explicit &with; computable = false; } c=Number( a ) : { c -> computable = true; c -> result = a -> value; } default : { // never reached, because simpleterm has only // the above two ]]>&kind; Implicit &with;<indexterm><primary>&with;</primary><secondary>implicit</secondary></indexterm> If a function is defined to have a phylum argument whose variable name begins with a dollar sign, the function body is assumed to be the body of an implicitly given &with;-statement. Example presents a function which returns true if the given &aritherm; matches one of the specified patterns, that is represents an arithmetic term. If the term has the &kind; SimpleTerm, the default case would catch. Implicit &with; Simple &foreach; The &foreach;-statement is a loop which runs over all elements of a term which is a list phylum and executes at every run the code which is specified in the statement body. The &foreach; in example counts the appearances of arithmetic terms by calling the function is_arithmetic_term for a during each run. This variable holds the current list element. Simple foreach &foreach;-&with;<indexterm><primary>&foreach;-&with;</primary></indexterm> This foreach variant also steps through a list, but performs a &with; for every element. A dollar prefixed list variable is used instead of a simple variable. The statement body contains patterns with a &cpp; block assigned to each. Example demonstrates the usage. It counts the number of sums and differences within the term list. &foreach;-&with; &foreach; with Pattern This third variant of &foreach; allows to specify a pattern instead of a list variable. The action is executed only for those list elements which match the pattern. Thus it combines &foreach; and an implicit &with; containing only one pattern of interest. Example is similar to example but it counts only the number of sums in the list. &foreach; with Pattern Multiple Patterns<indexterm><primary>multiple patterns</primary></indexterm> For every one of the preceding statements it is possible to specify not only one but multiple variables or patterns respectively. Used with &foreach;, multiple lists can be iterated over at one time. The variables or patterns are separated by ampersand signs (&), the list specifications by commas. Used with &with;, multiple terms can be checked at one time whether matching complex patterns. Here, the variables are separated by commas. The complex patterns are made up by concatenating single patterns by ampersand signs (&)&, where the first pattern has to match the first term, the second the second term (and so on) to have the complex pattern to match. A complex pattern can also be a grouping of patterns, but then it must be enclosed in parentheses. Example shows a &with; over two variables. The statement simply prints out whether the two terms have the same &kind;. Multiple Patterns in &with; <constant>afterforeach</constant><indexterm><primary>afterforeach</primary></indexterm> When a &foreach; iterates over more than one list at one time, the execution will stop if one of the lists reaches its end, while the others may still contain elements. The afterforeach-statement is useful if it is desired to iterate further over the remainders of the lists. The variables of the afterforeach refer to the list remainders. Their phyla are already known from the preceding &foreach;. The code fragment in example uses &foreach;-&with; and afterforeach to decide whether list A is longer than list B, returning true if it is. <constant>afterforeach</constant> in Length Test Rewriting<indexterm significance="preferred" id="idx:rewriting" class="startofrange"><primary>rewriting</primary></indexterm> The process of rewriting transforms a term tree. The left-hand side of each rewrite rule is a pattern specifying which term to substitute. The right-hand side denotes the term to substitute by, which has to be of the same phylum as the original one. This is done by calls of operators and term returning functions. Variables from the left-hand side may be used. Example simplifies terms by replacing every sum of numbers by its evaluated result. A helper function is necessary since it is not possible directly to use &cpp; operators in a rewrite rule (except method calls, see ). Rewriting <: SimpleTerm( Number( plus( a, b ) ) ) >; %{ KC_REWRITE /* code redirection */ integer plus( integer a, integer b ){ return mkinteger( a -> value + b -> value ); } %}]]> To allow rewriting to end, each rule has to replace the term in question by one which is really simpler, reduced, or closer to a normal form. Since rewriting searches depth first, the subtermssubterm are usually already the result of a transformation. Calling the rewriterewrite() method of the root term starts the transforming process for the tree. Choosing an arbitrary term instead rewrites the subtree beneath. Unparsing<indexterm class="startofrange" significance="preferred" id="idx:unparsing"><primary>unparsing</primary></indexterm> The process of unparsing traverses a term tree and executes the instructions for every term matching a pattern as specified in the unparse rules. The left-hand side of a rule denotes a term pattern, the right-hand side a list of unparse items which are evaluated for matching terms. The various items allowed are listed below and appear all in example , which is completely nonsensically. string Text strings in double quotes are delivered to the printer unchanged. variable The term denoted by this term variable will be unparsed by calling its unparse-method. attribute The attributeattributes of a term will be unparsed by calling its unparseunparse()-method. If it is of non-phylum type the user has to provide such a method. &cpp; code Inside a pair of braces arbitrary &cpp; code may be placed. escaped braces ${ $} If a non-matching brace is needed it has to be escaped by a dollar sign. variable with view A view can be specified if a variable should be unparsed under other than the current view (see ). unparse view variable definition Variables of user defined unparse view classes can be defined inside a rule (see ). Unparse Items [: "zero" a b->result { if (a->value == 0) } ${ a:infix $} %uviewvar prefix p1; a:p1 ];]]> For every operator, there is a default pattern which matches if no other pattern does. Its associated rule unparses all subtermssubterm. The unparse-method generated for every phylum can also be called explicitly. It has 3 arguments: the term to be unparsed, a printer and an unparse view. The names kc_printerkc_printer and kc_current_viewkc_current_view respectively refer to the printer and the view which are currently in use. Printer printer The user himself has to provide a printer function which satisfies his needs. Usually it prints to the standard output or into some file, and may take actions dependent on the view. void printer( const char* the_string, uview the_view ) { ... }; Since several printer instances may be needed also a printer functor can be specified as the printer. The printer functor class must be derived public from the class printer_functor_class. %{ HEADER /* redirection since no class definitions allowed in .k */ class example_printer : public printer_functor_class { public: void operator( ) ( const char* the_string, uview the_view ) { ... }; } %} Language Options language options Often a term tree has to be pretty printed into different but similar destination languages, which sometimes require only slightly different output to be generated. To avoid whole rule sets to be multiplied and to allow a more flexible choice concerning the destination language, the concept of language options has been introduced. Every unparse item can be preceded by a language option, which is a language name in angle brackets followed by a colon. That item will be unparsed only if the language specified is active. Languages are declared using the keyword %language%language and they are set by calling set_language(...)set_language(). The active language can be checked by calling is_language(...)is_language(). The language names must satisfy the requirements for &cpp; identifiers. Example demonstrates the application of language options. Language Options [: : "public " "class " name : " extends " : " : " base_name " {\n" class_body "}" : ";" "\n" ]; ]]> View Classes<indexterm significance="preferred" class="startofrange" id="idx:view_man"><primary>view</primary></indexterm> Rewriting and unparsing of each term is done under a certain view. The view serves as a means to further differentiate between rules when choosing one to apply. To be a match a rule must have the current view to appear in its view list, which is the left part of the right-hand side between the bracket and the colon. If no rule matches the rules with empty list are considered. Below is shown the general form of rules with views. " "<" rview_list ":" {operator|function} ">;" unparse_rule := pattern "->" "[" uview_list ":" unparse_items "];"]]> Views are declared by enumerating them after the keyword %rview%rview and %uview%uview for rewriting and unparsing respectively, separated by a space or a comma. These declarations enable &kpp; to check for view consistency, although it is possible to leave them out entirely. But that should be avoided, because then even simple misspellings in a view list cause the implicit introduction of new views. One view is predefined for rewriting and unparsing respectively, base_rviewbase_rview and base_uviewbase_uview, which is implicitly included in the empty view list. The view can be changed for a term by calling its rewrite/unparserewrite()-method with a new view argument. In unparse rules there the same can also be achieved by appending a colon and a new view name to a variable unparse item. Thus a whole subtree can be rewritten/unparsed under a different view, or even multiple times under changing views. Changing views allows to interlock several tasks on a certain subtree. <: a -> rewrite( demo1 ) >; %uview demo2 ; Plus( a, b ) -> [: a:demo2 { b->unparse( kc_printer, demo2 ); } ]; // both subterms of Plus are further unparsed under view demo2;]]> viewclassEvery view introduced by the user actually causes the generation of a view class and one view variable of the same name. Since the user cannot distinguish them, the generalizing term ‘view’ is used. For unparse views that may matter since the user can define his own unparse view classes. These are declared by enclosing the view name in parentheses. The user has to provide a class view_class derived from a generated class view_baseclass. In particular, that class may contain member variables to hold information persistent over several rules. The base class provides an equality operator (==) deciding whether two view variables are of the same class and a name-method returning the name of the view. No global view variable of the same name is generated for a user defined unparse view class. Variables of such a view are instantiated inside of unparse rules by %uviewvar%uviewvar and may bear the same name as their class. They can be used like the implicitly created view variables, but additionally provide all features of their class. Example shows the definition of an unparse view class and demonstrates its usage. User defined Unparse View Class [: %uviewvar number_count nc; // instantiate view variable c:nc // and unparse c with it { std::cout << "Numbers counted: " << nc.counter << std::endl; } ]; Plus( a, b ), Minus( a, b ), Mul( a, b ), Div( a, b ) -> [ number_count: a b ]; SimpleTerm( a ) -> [ number_count: a ]; Number -> [ number_count: { kc_current_view.counter++; } ]; Ident -> [ number_count: ];]]> View lists contain names of view classes, all other occurrences of views actually are view variables. The scope of an unparse view variable ends with its defining rule. Since its name is not known inside other rules there it can be accessed only by means of the name kc_current_viewkc_current_view, which always refers to the view variable currently used. Restrictions on &cpp; in &kpp; There are many places in a .k-file where &cpp; code can be used. But for some of them, the &kpp; processor allows only restricted use of &cpp; constructs. These places are listed in the following along with the restrictions they impose. .k-file Only function definitions are allowed. These must have no types as arguments which have compound names (for example no long int). &cpp; commentscomments are allowed everywhere in .k-files. &cpp; unparse item Almost arbitrary &cpp; code is allowed, that is, everything which is allowed inside a local &cpp; block. rewrite rule Only simple function calls are allowed, that is, calls which have as arguments only term variables and term literals, phylum operators and other simple function calls; in particular no &cpp; operators, except access of member functions. code redirection Arbitrary &cpp; code is allowed, but it has to be pure &cpp; since redirection code is not evaluated by &kpp;. There is a way to get around the restrictions of the &kpp; processor using macros. A macro is defined inside a code redirection, which the processor does not evaluate. Therefore it can be as complex as necessary, while the macro call inside the rewrite rule looks as simple as &kpp; wishes. Example defines a function for addition, which can be avoided when using a macro as in example . Macro Application in Rewriting <: SimpleTerm( Number( PLUS( a, b ) ) ) >; %{ KC_REWRITE /* code redirection */ #define PLUS( a, b ) mkinteger( ( a ) -> value + ( b ) -> value ) %}]]> Some generated functions return terms of the phylum abstract_phylum which have to be cast to the actual phylum. The &cpp; cast operators may be used also for phylum conversionphylumconversion but &kpp; provides phylum_castphylum_cast, a cast operator for phyla, which is better to use.
Generated Code From the &kpp; definitions, rules and &cpp; code pieces, several classes and functions in pure &cpp; are generated and distributed over multiple files. Compiled, they will perform the desired tree handling. Additional code is needed to create the trees, probably created by scanner and parser generators, for instance Flex and &bison;. Generated Classes and Types The definition of phyla and operators result in generated &cpp; classes. But these should be of no further interest for the user since the phylum names can be used in &cpp; code as if being pointer types of these classes, the operators as if being &cpp; constructors. Every phylum has a const counterpart of the same name prefixed by c_, which is the only means to get a const phylum variable. Just for the sake of completeness, be it mentioned that every phylum corresponds to a class impl_phylum and every operator to a subclass impl_phylum_operator. All the classes are derived from a common base class which can be referred to as abstract_phylum. By adding constructors, methods or attributes to it, all phyla will be changed in that way. The interworking with &yacc;/&bison; requires a type YYSTYPE which will be generated by &kpp; when the option yystype is specified (see ) Smart-pointer<indexterm><primary>smart pointer</primary></indexterm> Memory often leaks when phylum operators are used in expressions, and that is sometimes hard to detect. The option smart-pointer enables a smart memory management which avoids unnecessary copying of terms and automatically frees memory of unused terms. This is achieved by using so called smart-pointers which do reference counting and allow to free a term if it is no longer referenced. An additional type is generated for every phylum with the suffix _ptr. Variables of such types are unnecessary ever to be freed. Avoid mixing them with variables of the usual types, especially never assign between them, because that is likely to cause memory access errors. Weak-pointer<indexterm><primary>weak pointer</primary></indexterm> The option weak-pointer extends the smart-pointer technique and supports a third type for every phylum. It gets prefix weak_ and suffix _ptr. Weak-pointer variables of a term will not contribute to the reference counting, such that the term already is freed if merely weak-pointers reference it yet. That is why they are only usefully employed in conjunction with smart-pointers. In contrast to usual variables, weak-pointers have their own reference counting, which allows to determine whether such a pointer dangles, that is points to a term already freed and thus is no longer valid. Generated Functions &kpp; generates a number of functions which are available wherever &cpp; code is allowed in .k-files. The table lists all these functions and the sections which contain a more detailed description. Generated Functions function see section append concat eq CSGIOread CSGIOwrite filter fprint fprintdot fprintdotepilogue fprintdotprologue free freelist ht_create_simple ht_assign ht_assigned ht_clear ht_delete is_nil function see section last length map merge mkcasestring mkinteger mknocasestring mkreal op_name phylum_name print reduce reverse rewrite set_subphylum subphylum unparse
Common Functions Since abstract_phylum has an unparse-method defined and all phyla are derived from abstract_phylum all phyla have it. The same is true for some other methods. copy<indexterm><primary>copy()</primary></indexterm> abstract_phylum copy( bool copy_attributes ) const; The method copies this term completely, including its subterms. Since the result is always abstract_phylum it has to be casted to the phylum of this term. If true is specified as argument, the attributes are copied too. But beware! Merely the addresses are copied if the attributes are phyla or &cpp; pointers, that is, the new term references the attributes of the old one. eq<indexterm><primary>eq()</primary></indexterm> bool eq( c_abstract_phylum c_p ) const; The method returns true if this term is structurally equal to the argument, that is, both terms have equal subtrees. fprint<indexterm><primary>fprint()</primary></indexterm> void fprint( FILE* file ); The method prints a textual presentation of this term to the specified file. This simple example produces the output underneath. simpleterm a_number = SimpleTerm( mkinteger( 23 ) ); a_number -> print( ); SimpleTerm( Number( 23 ) ) fprintdot<indexterm><primary>fprintdot()</primary></indexterm> void fprintdot( FILE *f, const char *root_label_prefix, const char *edge_label_prefix, const char *edge_attributes, bool print_node_labels, bool use_context_when_sharing_leaves, bool print_prologue_and_epilogue ) const; This function creates a representation of the term in a format understood by the program dot, which is part of the graphics package graphviz and draws directed acyclic graphs in various output formats like PostScript or GIF. The target of the operation is the file f, while the other arguments control the details of the graphs appearence. root_label_prefix Adds a label to the graph denoting the root term. The label has the name of the phylum of that term prefixed by this string argument. edge_label_prefix Every edge in the graph is labelled with a number. This string argument appears as the prefix of these labels. edge_attributes For dot, the edges can have attributes which specify additional features like font name or edge colour (see dot manual for attribute names and values). This string argument is a list of attribute/value pairs (attribute=value), separated by commas. print_node_labels If this argument is set to true, the names of the subterms phyla appear in the graph. Otherwise they are suppressed and only the term names (operator names) are printed. use_context_when_sharing_leaves Terms which are shared in the tree usually appear only once in the graph (terms of uniq phyla). In particular, terms of predefined phyla are shared if they are equal. They are always leaves since they have no subphyla. If this argument is set to true, the leaves appear shared in the graph only if they are subterms of shared (uniq) terms. print_prologue_and_epilogue This argument is usually set to true since a certain prologue and epilogue are necessary to frame the graph. This is set to false if multiple graphs are to be grouped into one figure. In that case the prologue function has to be called explicitly, then some fprintdot calls follow, and finally the epilogue call finishes the figure creation. The following call of fprintdot writes a a presentation of the term t to a file exa. From that file dot creates a graph like that in figure . aterm t = Plus( SimpleTerm( Number( mkinteger( 7 ) ) ), SimpleTerm( Number( mkinteger( 7 ) ) ) ); t -> fprintdot(exa, "root_", "edge", "style=dashed", true, false, true);
Dot Created Graph of an Example Term
fprintdotprologue<indexterm><primary>fprintdotprologue()</primary></indexterm> void fprintdotprologue ( FILE *f ); This function writes the prologue to f, which is needed to set up graphviz. Usually, when the figure contains only one graph, this function will be called implicitly by fprintdot; call this function when you set print_prologue_and_epilogue to false in the function call above. fprintdotepilogue<indexterm><primary>fprintdotepilogue()</primary></indexterm> void fprintdotepilogue ( FILE *f ); This function writes the epilogue to f, which is needed to finish the graph for graphviz. Usually, when the figure contains only one graph, this function will be called implicitly by fprintdot; call this function when you set print_prologue_and_epilogue to false in the function call above. op_name<indexterm><primary>op_name()</primary></indexterm> const char* op_name( ) const; This function returns the name of the phylum operator which has been used to create this term. phylum_name<indexterm><primary>phylum_name()</primary></indexterm> const char* phylum_name( ) const; This function returns the name of the phylum of this term. print<indexterm><primary>print()</primary></indexterm> void print( ); This function prints a textual presentation of this term to the standard output. It is similar to the output of fprint. set_subphylum<indexterm><primary>set_subphylum()</primary></indexterm> void set_subphylum( int n, abstract_phylum p, bool=false ); This function replaces the nth subterm of this term by term p, which must be of a phylum castable to the phylum of the appropriate subterm. Numbering starts with 0. subphylum<indexterm><primary>subphylum()</primary></indexterm> abstract_phylum subphylum( int n, bool=false ) const; This function returns the nth subterm of this term. Numbering starts with 0. unparse<indexterm significance= "preferred"><primary>unparse()</primary></indexterm> void unparse( printer_functor pf, uview uv); void unparse( printer_function opf, uview uv ); This function starts unparsing for this term. It is recursively called for every subterm. Unparsing is processed under the specified unparse view, and the strings to output are delivered to the printer functor or function respectively. rewrite<indexterm><primary>rewrite()</primary></indexterm> rewrite( rview rv ); ]]> This functions starts rewriting for this term. It returns a new term of the actual phylum. Usually it is called at the root term whereupon the entire tree is searched under the specified view.
CSGIO Functions The generated files csgiok.h and csgiok.cccsgiok.cc,h provide means to write terms to files and to reconstruct terms from such files. Whole term trees thus can be saved and exchanged between different applications. Reading and writing is performed by two functions. The format of the files has once been designed to be compatible to the structure files of the commercial tool Synthesizer Generator. The format written now by &kpp; is somewhat extended so that they are not compatible any more, but old structure files are expected to be still understood. CSGIOwrite<indexterm><primary>CSGIOwrite()</primary></indexterm> The methods writes this term to f, that is, the entire subterm tree. The attributes are ignored except they are phyla which have been defined using the keyword %member. CSGIOread<indexterm><primary>CSGIOread()</primary></indexterm> void CSGIOread( FILE *f, P &p ) ]]> The function reads from f the presentation of a term. The term is constructed by successively calling the appropriate operators of the subterms. The operators initialize the attributes according to the phylum definition; except the %member-attributes which get their values from the saved term. The created term is assigned to p which has to be a variable of the correct phylum. Creation Functions Terms of predefined phyla are created by functions. mkcasestring<indexterm significance= "preferred"><primary>mkcasestring()</primary></indexterm> casestring mkcasestring( const char *str ); casestring mkcasestring( const char *str, unsigned int length ); The function creates a term of the phylum casestring from the specified string. Upper and lower case characters are distinguished. The second variant uses only the first length characters of the specified string. mkinteger<indexterm significance= "preferred"><primary>mkinteger()</primary></indexterm> integer mkinteger( const INTEGER i ); The function creates a term of the phylum integer from the specified value. INTEGER is a macro which can be defined by the user as needed but defaults to int. mknocasestring<indexterm significance= "preferred"><primary>mknocasestring()</primary></indexterm> nocasestring mknocasestring( const char *str ); nocasestring mknocasestring( const char *str, unsigned int length ); The function creates a term of the phylum nocasestring from the specified string. Upper and lower case characters are not distinguished. The second variant uses only the first length characters of the specified string. mkreal<indexterm significance= "preferred"><primary>mkreal()</primary></indexterm> real mkreal( const REAL r ); The function creates a term of the phylum real from the specified value. REAL is a macro which can be defined by the user as needed but defaults to double. Memory Management Functions When terms, once constructed, are no longer needed it is usually reasonable to free the memory they allocate, especially when dealing with large numbers of terms. The same does not hold not for the use of smart-pointers, because these keep track of allocated memory by their own. Never apply free or freelist to smart-pointers. The &cpp; delete should never be applied to any term, since that would get around some &kpp; mechanisms. free<indexterm><primary>free()</primary></indexterm> void free( bool recursive=true ); The method frees the memory allocated by this term and by default it frees also the subterms recursively. When it is applied to a list term, the whole list and all its elements are freed. The non-recursive form only separates the list into its first element and the remainder of the list. Terms of phyla under non-default storage management can not be freed individually, calling free on them has no effect. freelist<indexterm><primary>freelist()</primary></indexterm> void freelist( ); The method frees the spine of this list term and leaves the list elements untouched. Hashtable Functions hashtables The memory management of terms of storage class uniquniq or a user defined one can only be influenced by hashtable operations. ht_create_simple<indexterm><primary>ht_create_simple()</primary></indexterm> hashtable_t ht_create_simple ( int size ); The function creates a new hashtable and returns it. The current implementation ignores the size argument. ht_assign<indexterm><primary>ht_assign()</primary></indexterm> hashtable_t ht_assign ( hashtable_t ht, storageclass_t sc, bool still_unique=false ); The function assigns the hashtable ht to the storage class sc and returns the hashtable which has previously been assigned to sc. ht_assigned<indexterm><primary>ht_assigned()</primary></indexterm> hashtable_t ht_assigned ( storageclass_t sc ); The function returns the hashtable which is assigned to the storageclass sc. ht_clear<indexterm><primary>ht_clear()</primary></indexterm> void ht_clear ( hashtable_t ht ); The function removes all entries from the hashtable ht. ht_delete<indexterm><primary>ht_delete()</primary></indexterm> void ht_delete ( hashtable_t ht ); The function deletes the hashtable ht entirely. List Functions<indexterm id="idx:listfunc" class="startofrange"><primary>list</primary></indexterm> List phyla which have been defined using the list keyword get some methods performing convenient tasks. In the function signatures, the name ]]> denotes the actual list phylum, ]]> denotes the phylum of the list elements. append<indexterm><primary>append()</primary></indexterm> append( p );]]> The method appends the specified term to this list and returns the tail of the new list, ie. the sublist that has p as its only element. This make appending several elements in a row more efficient. concat<indexterm><primary>concat()</primary></indexterm> concat( c_ l1, c_ l2 );]]> The function constructs a new list from the terms of l1 followed by the terms of l2 and returns that list. filter<indexterm><primary>filter()</primary></indexterm> filter( bool (*fp) () );]]> The method constructs a new list from the terms of this list for which the function fp yields true. is_nil<indexterm><primary>is_nil()</primary></indexterm> The method returns true if this list is empty. last<indexterm><primary>last()</primary></indexterm> last( ) const;]]> The method returns the remainder of this list which contains only one, the last, element. If this list is empty the empty list is returned. length<indexterm><primary>length()</primary></indexterm> The method returns the number of elements in this list. map<indexterm><primary>map()</primary></indexterm> map( (*fp) () );]]> The method constructs a new list containing the terms which are returned by the fp which is called for every element of this list. The new list is returned. merge<indexterm><primary>merge()</primary></indexterm> merge( l, (*fp) (, ) );]]> The method constructs a new list containing the terms which are returned by the fp which is called for every element of this list taking the second argument from the specified list. The new list is returned. reduce<indexterm><primary>reduce()</primary></indexterm> reduce( p, (*fp) (, ) );]]> The method successively applies the function fp to each element of this list and fps last result which initially is the term p. The final result is returned. reverse<indexterm><primary>reverse()</primary></indexterm> reverse( ) const;]]> The method constructs a new list which contains the elements of this list in reverse order. The new list is returned.
Generated Files The generated code is spread over several files. The table lists these files and a description of their contents. Every file defines a macro symbol which can be used in preprocessor instructions and in code redirectionsredirection. These symbols are listed as well. From every &kpp; file a &cpp; file and a header file are generated. The name file in the table refers to such files. Generated files file symbol contents csgiok.cccsgiok.cc,h KC_CSGIO functions for saving and restoring of terms csgiok.h KC_CSGIO_HEADER some definitions for saving and restoring of terms k.cck.cc,h KC_TYPES implementation of all classes generated from phylum definitions k.h KC_TYPES_HEADER all class declarations generated from phylum definitions; included by all implicitly generated files rk.ccrk.cc,h KC_REWRITE rewrite methods for all phyla rk.h KC_REWRITE_HEADER rewrite view class definitions unpk.ccunpk.cc,h KC_UNPARSE unparse methods for all phyla unpk.h KC_UNPARSE_HEADER unparse view class definitions file.cc KC_FUNCTIONS_file or CODE function definitions from file.k-file file.h KC_FUNCTIONS_file_HEADER or HEADER declarations of functions from file.k-file
Code Redirection<indexterm significance="preferred"><primary>redirection</primary></indexterm> A .k-file can contain pieces of arbitrary &cpp; enclosed between a line starting with %{%{ and one starting with %}%}. Since it will not be parsed by &kpp; but copied directly into generated code, it can not contain special &kpp; constructs, but merely pure &cpp;. It will go to the matching .cc-file, if no redirection is specified. Giving a list of file symbols after %{ will copy the code each of the specified files instead. The available redirection symbols are listed in table . // this be a file example.k %{ // everything between the brace lines will be copied to example.cc %} %{ HEADER KC_UNPARSE /* beware of //-comments here */ // everything between the brace lines will be copied to example.h and unpk.cc %}
Running &kpp; The &kpp; processor is invoked with the command kc++. It can be invoked on any number of .k-files and will create a number of output files as outlined above. A typical call looks like this: kc++ abstr.k rpn.k main.k When used together with other tools (see ) a makefile is helpful. Be aware, though, that every source file may influence every generated file (because of the code redirections). Thus multiple destination files depend on multiple source files. That means the makefile becomes more complicated in order to handle these dependencies. That is why an example makefile is provided in appendix (see ). It is sufficient for the RPN example and may easily be adapted for many more. Options<indexterm id="idx:options" class="startofrange"><primary>options</primary></indexterm> &kpp; recognizes a number of command line options which affect the process of parsing and code generation, some rather drastically. Table presents, in alphabetical order, all available options and their explanation. In most environments, two forms are provided, short and GNU style long options. Suppose you do not need CSGIO input/output, but want to interface with your favourite compiler compiler, you might use: kc++ --no-csgio --yystype abstr.k rpn.k main.k Some vital options can be specified directly in &kpp; using the keyword %option. Such specified options take higher priority than command line options and thus override them. Table lists them in alphabetical order. They behave like their command line counterparts. A line like this could be specified in a &kpp; file: %option yystype smart-pointer Command line options option explanation -c --no-csgio do not generate phylum read/write functions (csgiok.{h,cc}) -r --no-rewrite do not generate code for rewrite rules (rk.{h,cc}) -u --no-unparse do not generate code for unparse rules (unpk.{h,cc}) -d --no-printdot no fprintdot functions are generated -t --no-hashtables do not generate code for hashtable operations --operator-cast generate operatork.h for operator_cast<> -n --covariant=C use covariant return types: y|n|p (yes, no or generate both and decide per preprocessor macro NO_COVARIANT_RETURN) --stdafx[=FILE] generate include for Microsoft precompiled header files (default stdafx.h) -e --dllexport=STRING generates string between keyword class and the class name of all operators and phyla -m --smart-pointer generates code for smart pointers (reference counting) -w --weak-pointer generates code for weak pointers (implies smart pointers) -s --suffix=EXT extension for generated source files (default .cc) -f --file-prefix=PREF prefix all generated files -o --overwrite always write generated files even if not changed -b --yystype[=FILE] generate file (default yystype.h) containing YYSTYPE, for &yacc; and &bison; -y --yxxunion generate file yxx_union.h) for use with for Yacc++. -l --no-linedirec omit the line directives (#line) altogether --comment-line change line directives to mere comments --dir-line prepends the current working directory to the file name in line directives --rw-loop generates a non recursive rewrite function -p --pipe=CMD process all files while piping them through CMD -M --msg-format=PAT specifies format of (error) messages, PAT can contain: %p (program name), %s (severity), %f (file name), %d (current working directory), %l (line number), %c (column); the actual message is appended -q --quiet quiet operation (is default) -v --verbose print additional status information while processing -W enable all warnings; use comma-seperated list for detailed control (can be prefixed with 'no') drop – dropped rule bodies (no code generated) equiv – equivalent patterns (cannot match) overlap – possibly overlapping patterns -h --help display the help and exit -V --version output version information and exit
Built-in options no-csgiono-hashtablesno-printdotno-rewriteno-unparsesmart-pointerweak-pointeryystype
&yacc;/&bison; Interfacing with a compiler generator is useful when a tree should be build from some kind of input. &kpp; provides the yystype-option (see ) which causes the generation of a header file needed by &yacc; to cooperate. For every token found, the desired &kpp; operator is called to create a term. If lex/flex is used too, &yacc; has to be run with the option which causes the generation of an other header file needed by lex/flex (–d for &bison;). Appropriate files for the example can be found in appendix . The makefile uses implicit rules for flex and &bison;.
kimwitu++-2.3.13/doc/kpp-main.xml0000644000175000017500000001206710752414036015150 0ustar useruser --> Kimwitu++"> C++"> Yacc"> Bison"> with"> foreach"> aritherm"> simpleterm"> ]> &kpp; A Term Processor Toby Neumann Humboldt-Universität zu Berlin Institute for Informatics Michael Piefel Humboldt-Universität zu Berlin Institute for Informatics User's guide 1.01 2002 Initial version in December 2001 First draft in February 2002 Unamended version missing part III in May 2002 Amended version missing part III in July 2002 This document is still missing its third part. Humboldt-Universität zu Berlin
Unter den Linden 6 10099 Berlin Germany
2001 2002 Toby Neumann, Institut für Informatik, Humboldt-Universität zu Berlin This document describes the term processor &kpp;. &kpp; 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 Licence, or (at your option) any later version. Likewise this documentation is free. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ‘GNU Free Documentation License’. The program &kpp; is based on Kimwitu (with its own web site), written by Axel Belinfante (belinfan@utwente.nl). Kimwitu is also free software, licensed under the GPL, since its 4.6.1 release.
Introduction to &kpp; This part explains what essentially &kpp; is and what advantages it provides. It gives an overview of the functionality of &kpp;, which is demonstrated with example. Detailed discussion of concepts is left to the reference part later in this book. &kpp-intro; Reference Manual This part lists all concepts of &kpp; and explains them in detail. It is meant as a complete documentation of all features and contains advices of do's and don'ts. To the advanced user it should serve as a programming reference. &kpp-manual; &app-rpn; &app-fdl;
kimwitu++-2.3.13/doc/kpp-rpn.xml0000644000175000017500000002154207472437540015033 0ustar useruser Complete code of RPN example main.k #include "k.h" #include "rk.h" #include "unpk.h" #include "csgiok.h" int yyparse( ); aritherm root_term; %} %{ KC_TYPES_HEADER extern aritherm root_term; %} %option yystype void printer( const char *s, uview v ) { std::cout << s; } int main( int argc, char** argv ) { std::cout << "rpn calculator" << std::endl; yyparse( ); aritherm canon_term = root_term -> rewrite( canonify ); aritherm simpl_term = canon_term -> rewrite( simplify ); std::cout << "simplified term in infix notation" << endl; simpl_term -> unparse( printer, infix ); std::cout << std::endl; } ]]> abstr.k rpn.k 3 Plus(SimpleTerm(Number(a)),SimpleTerm(Number(b)))-> ; // 1 + 3 + b -> 4 + b Plus(SimpleTerm(Number(a)),Plus(SimpleTerm(Number(b)),rem))-> ; // 1 + 3 - b -> 4 - b Plus(SimpleTerm(Number(a)),Minus(SimpleTerm(Number(b)),rem))-> ; // 6 - 2 -> 4 Minus(SimpleTerm(Number(a)),SimpleTerm(Number(b)))-> ; // 6 - 4 - b -> 2 - b Minus(SimpleTerm(Number(a)),Minus(SimpleTerm(Number(b)),rem))-> ; // 6 - 4 + b -> 2 + b Minus(SimpleTerm(Number(a)),Plus(SimpleTerm(Number(b)),rem))-> ; // 3 * 2 * b -> 6 * b Mul(SimpleTerm(Number(a)),Mul(SimpleTerm(Number(b)),rem))-> ; // 3 * 2 / b -> 6 / b Mul(SimpleTerm(Number(a)),Div(SimpleTerm(Number(b)),rem))-> ; // 3 * 2 -> 6 Mul(SimpleTerm(Number(a)),SimpleTerm(Number(b)))-> ; // 6 / 2 -> 3 Div(SimpleTerm(Number(a)),SimpleTerm(Number(b)))-> ; // 6 / 2 / b -> 3 / b Div(SimpleTerm(Number(a)),Div(SimpleTerm(Number(b)),rem))-> ; // 6 / 2 * b -> 3 * b Div(SimpleTerm(Number(a)),Mul(SimpleTerm(Number(b)),rem))-> ; // a + a -> 2 * a Plus(b=SimpleTerm(Ident(a)),SimpleTerm(Ident(a)))-> ; // a - a -> 0 Minus(SimpleTerm(Ident(a)),SimpleTerm(Ident(a)))-> ; // a / a -> 1 Div(SimpleTerm(Ident(a)),SimpleTerm(Ident(a)))-> ; // 6 * a + a -> 7 * a Plus(Mul(SimpleTerm(Number(a)),SimpleTerm(Ident(b))),c=SimpleTerm(Ident(b)))-> ; // 6 * a -a -> 5 * a Minus(Mul(SimpleTerm(Number(a)),SimpleTerm(Ident(b))),c=SimpleTerm(Ident(b)))-> ; // 6 * a + 3 * a -> 9 * a Plus(Mul(SimpleTerm(Number(a)),SimpleTerm(Ident(b))), Mul(SimpleTerm(Number(d)),c=SimpleTerm(Ident(b))))-> ; // 6 * a - 2 * a -> 4 * a Minus(Mul(SimpleTerm(Number(a)),SimpleTerm(Ident(b))), Mul(SimpleTerm(Number(d)),c=SimpleTerm(Ident(b))))-> ; // a + (a + 2 * b) -> 2 * a + 2 * b Plus(b=SimpleTerm(Ident(a)),Plus(SimpleTerm(Ident(a)),rem))-> ; // a - (a +- 2 * b) -> 2 * b Minus(SimpleTerm(Ident(a)),Plus(SimpleTerm(Ident(a)),rem)), Minus(SimpleTerm(Ident(a)),Minus(SimpleTerm(Ident(a)),rem))-> ; // a + (a - 2 * b) -> 2 * a - 2 * b Plus(b=SimpleTerm(Ident(a)),Minus(SimpleTerm(Ident(a)),rem))-> ; // (a + b) + c -> a + (b + c) Plus( Plus(a, b), c) -> < canonify: Plus(a, Plus(b, c))>; // (a - b) + c -> c + (a - b) Plus( Minus(a, b), c) -> < canonify: Plus(c, Minus(a, b))>; // (a + b) - c -> a + (b - c) Minus( Plus(a, b), c) -> < canonify: Plus(a, Minus(b, c))>; // (a * b) * c -> a * (b * c) Mul( Mul(a, b), c) -> < canonify: Mul(a, Mul(b, c))>; // a + 5 -> 5 + a Plus( a=SimpleTerm(Ident(*)), b=SimpleTerm(Number(*)) ) -> < canonify: Plus(b, a)>; // a * 5 -> 5 * a Mul( a=SimpleTerm(Ident(*)), b=SimpleTerm(Number(*)) ) -> < canonify: Mul(b, a)>; // a + (6 + b) -> 6 + (a + b) Plus( a=SimpleTerm(Ident(*)), Plus(b=SimpleTerm(Number(*)), rest) ) -> < canonify: Plus(b, Plus(a,rest))>; // a * (6 * b) -> 6 * (a * b) Mul( a=SimpleTerm(Ident(*)), Mul(b=SimpleTerm(Number(*)), rest) ) -> < canonify: Mul(b, Mul(a,rest))>; %{ KC_REWRITE inline integer plus(integer a, integer b){ return mkinteger(a->value+b->value); } inline integer minus(integer a, integer b){ return mkinteger(a->value-b->value); } inline integer mul(integer a, integer b){ return mkinteger(a->value*b->value); } inline integer div(integer a, integer b){ return mkinteger(b->value==0 ? 0 : a->value / b->value); } %} %uview infix,postfix; Plus(a,b)->[infix: "(" a "+" b ")"]; Minus(a,b)->[infix: "(" a "-" b ")"]; Mul(a,b)->[infix: "(" a "*" b ")"]; Div(a,b)->[infix: "(" a "/" b ")"]; ]]> lexic.l #include "k.h" #include "yystype.h" #include "syntax.h" #include "rpn.h" %} %option noyywrap %% -?[0-9]+ { yylval.yt_integer = mkinteger(atoi(yytext)); return NUMBER;} [a-z]+ { yylval.yt_casestring = mkcasestring(yytext); return IDENT; } [+*-/] { return yytext[0]; } [\t ]+ { /*empty*/ } \n { return EOF; } . { std::cerr << "Unkown character: " << yytext[0] << std::endl; } %% extern void yyerror(const char *s) { std::cerr << "Syntax error: " << s << std::endl; } ]]> syntax.y NUMBER %token IDENT %token NEWLINE %type aritherm %type simpleterm %% aritherm: simpleterm { root_term = $$ = SimpleTerm($1); } | aritherm aritherm '+' { root_term = $$ = Plus($1,$2); } | aritherm aritherm '*' { root_term = $$ = Mul($1,$2); } | aritherm aritherm '-' { root_term = $$ = Minus($1,$2); } | aritherm aritherm '/' { root_term = $$ = Div($1,$2); } ; simpleterm: NUMBER { $$ = Number($1); } | IDENT { $$ = Ident($1); } ; ]]> Makefile .PRECIOUS: lexic.c y.output # Tools SHELL = /bin/sh YACC = bison LEX = flex CC = ${CXX} KC = kc++ #Flages YFLAGS = -d -y LFLAGS = -t CXXFLAGS = -g -Wall -Wno-unused -DYYDEBUG -DYYERROR_VERBOSE CFLAGS = ${CXXFLAGS} # Sources KFILES = rpn.k main.k abstr.k YFILES = syntax.y LFILES = lexic.l # Goals PARSER = rpn-parser # Help files KC_TIME = .kc_time_stamp KC_OGEN = k.o csgiok.o unpk.o rk.o KC_OSRC = $(KFILES:.k=.o) OBJS = $(KC_OGEN) $(KC_OSRC) $(YFILES:.y=.o) $(LFILES:.l=.o) $(CFILES:.cc=.o) # default rule $(PARSER):: # include or make autodependencies ifeq (.depend,$(wildcard .depend)) include .depend else $(PARSER):: depend endif # Rules $(KC_TIME): $(KFILES) $(KC) $(KFILES) touch $(KC_TIME) $(PARSER):: $(KC_TIME) $(OBJS) $(CXX) $(CFLAGS) $(OBJS) ${LIBS} -o $@ syntax.h : y.tab.h -cmp -s syntax.h y.tab.h || cp y.tab.h syntax.h y.tab.h : syntax.c depend dep: @echo Make dependencies first $(MAKE) $(KC_TIME) $(MAKE) $(YFILES:.y=.c) $(MAKE) $(LFILES:.l=.c) $(MAKE) syntax.h $(CC) -M *.cc > .depend clean: -rm -f $(OBJS) core *~ *.bak $(KFILES:.k=.cc) $(KC_OGEN:.o=.cc) $(KC_TIME) .kc* \ $(YFILES:.y=.c) $(LFILES:.l=.c) $(KC_OGEN:.o=.h) $(KFILES:.k=.h) out.* \ y.tab.h syntax.h syntax.output syntax.tab.c yystype.h ]]> kimwitu++-2.3.13/doc/developers-reference.xml0000644000175000017500000002551410752414212017535 0ustar useruser ]> Kimwitu++ developers reference Michael Piefel Humboldt-Universität zu Berlin Institute for Informatics This document is $Id: developers-reference.xml,v 1.11 2008/02/06 20:28:58 piefel Exp $. Smart Pointers Smart pointers were implemented by Gerd Kurzbach. Their usage is not straightforward, because that is made impossible by a few challenges. Usage What are the pointer types called? For a phylum called phylum there'll be the following pointer types: phylum, a simple C pointer, c_phylum, a simple constant C pointer, phylum_ptr, the normal smart pointer, weak_phylum_ptr, the weak smart pointer (does increment reference count), Implementation TODO Kimwitu++ Source Management Formatting the Kimwitu++ source code The input (<abbrev>ie.</abbrev> Kimwitu++ text) Tabs have a width of 8, in words eight, which means they are exactly 8 characters wide, not two (2), not 4 (four), but 23 characters. The indentation however should be four characters, ie. 22. If you don't want to use tabs, but expand them to spaces, fine. However, recall it's shorter. In a proper editor, it should be easy to get the desired behaviour, eg. in Vim you can set set tabstop=8 softtabstop=4 shiftwidth=4. The output (<abbrev>ie.</abbrev> generated text) In general care should be taken to make the generated source code human readable. It should always look according to the guidelines above. Kimwitu++ features a smart printer. This means you don't have to worry about spaces, tabs and alignment, the printer will do it automatically. It will even ignore your spaces and tabs, so don't bother except for making the input more readable. Occasionally the printer will fail (it's simple, and not a complete parser like entity), so you have to use the following hints in the output strings: \b The printer likes to elide superfluous spaces. Sometimes spaces are important (most notably to avoid nested template specifications with > > being interpreted as the >> operator. The space following \b will not be ignored. \v This causes the following text to be indented one additional level. Mnemonic for vorwärts, which is German for forward. \r This causes the following text to one level of indenting less. Mnemonic for rückwärts, which is German for backward. CVS All changes which have an influence on the user should be marked with a USER: prefix in the CSV change log message. This allows to collect all user visible changes in the CHANGELOG file on release. Uniq Phyla Hash Sets Why are hash sets used? Performance. Red-Black trees are known to be always good, hash tables can have poor performance. But usually they are fast. As very many casestrings are created in common programs, we optimize for this. Why another level of indirection? Performance (compute hash only once). What are the preprocessor decisions for? Hash sets are not standardized yet. There are different implementations. The three compilers I looked at (gcc and Intel's compiler) use three different ways to implement it. (The two gccs only differ in the location of the header file.) The GNU compiler expects two functors: One doing a hash, one doing a test for equality. Predefined tests are not suitable, of course. The Intel compiler expects a single functor both unary and binary: A unary function doing a hash, a binary function doing a test for lessness. Predefined tests are not suitable, of course. There is no knowing how other compilers might implement this. If a known compiler is used, hash sets are employed by default, but can be deactivated by defining DONT_USE_HASHSET. If an unknown compiler is used, hash sets are not employed by default, but can be activated by defining USE_HASHSET (but then keep fingers crossed we guess the right way to use them). Patterns Allowed patterns Patterns over phyla are not allowed. Patterns over predefined operators (e. g. _Str) are not allowed. Patterns over predefined operators It is not desirable to define new unparse and rewrite rules for the predefined phyla. Predefined phyla are primitive, rewriting should not need to change them. Different unparse behaviour can easily be implemented in the unparse function, should it really be needed. A pattern over a predefined operator might be useful in a with-statement. However, this is not necessary or possible: All operators in a with-statement must be of the same phylum, as patterns over phyla are (not yet) allowed. Primitive phyla only have one operator, so a with-statement would have only one alternative and is superfluous. Patterns over phyla Patterns over phyla are not allowed. This should be changed, considering the following. In a pattern over a phylum, there cannot be any references to subphyla. Therefore, they are a bit limited. One possible exception could be lists and abstract_list, as they always have two children. Patterns over phyla are useless in with-statements. They can equally well be implemented with a switch-statement over prod_sel(). Pattern sorting The sorting of patterns is a difficult area. There are some obvious cases, and some which are more twisted. If, at a certain point, two patterns may match the current phylum, which one will be chosen? Let us consider the following cases: A pattern that is truly more specific than another, i. e. all terms that match it would also match the other, but not vice versa, should be tested for before the other. For two patterns that are disjunct, i. e. there cannot exist any terms that match both, ordering does not matter. Two patterns which cover the same terms should be considered an error. Otherwise one would always be preferred over the other, probably not what the user intended. This is not so when there is a guard condition on the pattern (provided); it is difficult to decide for us what the semantics of these are (except when there are two identical conditions, verbatim). For overlapping patterns, the situation is complex. There must exist a pattern (or multiple patterns) that covers exactly the intersection. In general, for each term, there must always be a most specific pattern. This condition is difficult to implement, and it is hoped to be rare. We might focus on easy special cases (as one pattern covering the intersection of two others) and give warnings whenever we are not sure. In all other cases, the patterns have to be sorted, and a warning might be issued to the user if that ordering is not obvious. Currently, pattern sorting in Kimwitu is through an algorithm that is unintuitive. It frequently leads to an unexpected order. A pattern is considered more specific if it is more specific further to the left; when in doubt, the order of appearance in the input is taken. To this end, Gerd proposed two different algorithms, both intuitive but already fairly complex, which both resulted in different orderings. I believe this problem cannot be solved. Unfortunately, for some projects, Kimwitu++ issues many warnings, when order doesn't matter or is indeed obvious. A way to silence this warnings selectively is on the wishlist kimwitu++-2.3.13/doc/fdl.xml0000644000175000017500000005320110557650724014205 0ustar useruser GNU Free Documentation License Version 1.1, March 2000
Copyright © 2000 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble The purpose of this License is to make a manual, textbook, or other written document ‘free’ in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of ‘copyleft’, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. Applicability and Definitions This License applies to any manual or other work that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. The ‘Document’, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as ‘you’. A ‘Modified Version’ of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A ‘Secondary Section’ is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The ‘Invariant Sections’ are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. The ‘Cover Texts’ are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A ‘Transparent’ copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent. A copy that is not ‘Transparent’ is called ‘Opaque’. Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML designed for human modification. Opaque formats include PostScript, PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML produced by some word processors for output purposes only. The ‘Title Page’ means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, ‘Title Page’ means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. Verbatim Copying You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. Copying in Quantity If you publish printed copies of the Document numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a publicly-accessible computer-network location containing a complete Transparent copy of the Document, free of added material, which the general network-using public has access to download anonymously at no charge using public-standard network protocols. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. Modifications You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has less than five). State on the Title page the name of the publisher of the Modified Version, as the publisher. Preserve all the copyright notices of the Document. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. Include an unaltered copy of this License. Preserve the section entitled ‘History’, and its title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section entitled ‘History’ in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the ‘History’ section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. In any section entitled ‘Acknowledgements’ or ‘Dedications’, preserve the section's title, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. Delete any section entitled ‘Endorsements’. Such a section may not be included in the Modified Version. Do not retitle any existing section as ‘Endorsements’ or to conflict in title with any Invariant Section. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section entitled ‘Endorsements’, provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. Combining Documents You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections entitled ‘History’ in the various original documents, forming one section entitled ‘History’; likewise combine any sections entitled ‘Acknowledgements’, and any sections entitled ‘Dedications’. You must delete all sections entitled ‘Endorsements.’ Collections of Documents You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. Aggregation with Independent Works A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, does not as a whole count as a Modified Version of the Document, provided no compilation copyright is claimed for the compilation. Such a compilation is called an ‘aggregate’, and this License does not apply to the other self-contained works thus compiled with the Document, on account of their being thus compiled, if they are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be placed on covers that surround only the Document within the aggregate. Otherwise they must appear on covers around the whole aggregate. Translation Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License provided that you also include the original English version of this License. In case of a disagreement between the translation and the original English version of this License, the original English version will prevail. Termination You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. Future Revisions of This License The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License ‘or any later version’ applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:
Copyright © YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled "GNU Free Documentation License".
If you have no Invariant Sections, write ‘with no Invariant Sections’ instead of saying which ones are invariant. If you have no Front-Cover Texts, write ‘no Front-Cover Texts’ instead of ‘Front-Cover Texts being LIST’; likewise for Back-Cover Texts. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.
kimwitu++-2.3.13/doc/kpp-cook.xml0000644000175000017500000000017107426256065015162 0ustar useruser emptyempty kimwitu++-2.3.13/src/0000755000175000017500000000000011135163773012733 5ustar useruserkimwitu++-2.3.13/src/Gen.boot/0000755000175000017500000000000011135163773014406 5ustar useruserkimwitu++-2.3.13/src/Gen.boot/kimwy.output0000644000175000017500000046614211135163773017045 0ustar useruserTerminals which are not used T_PERCENTRVIEWVAR Grammar 0 $accept: specification $end 1 dollarvar: T_DOLLARVAR 2 id: T_ID 3 integer: T_INT 4 @1: /* empty */ 5 specification: @1 declarations 6 declarations: /* empty */ 7 | declarations declaration 8 declaration: phylumdeclaration 9 | rwdeclaration 10 | ac_function_definition 11 | includedeclaration 12 | unparsedeclaration 13 | uviewdeclaration 14 | rviewdeclaration 15 | storageclassdeclaration 16 | languagedeclaration 17 | baseclassdeclaration 18 baseclassdeclaration: T_BASECLASS id ':' baseclass_list ';' 19 baseclass_list: id 20 | baseclass_list ',' id 21 @2: /* empty */ 22 phylumdeclaration: id storageoption ':' @2 productionblock Ccode_option ';' 23 storageoption: /* empty */ 24 | '{' id '}' 25 | '{' '!' id '}' 26 | '{' error 27 | '{' '!' error 28 productionblock: /* empty */ 29 | T_LIST id 30 | alternatives 31 alternatives: alternative 32 | alternatives '|' alternative 33 | error 34 | alternatives '|' error 35 | alternatives error alternative 36 @3: /* empty */ 37 @4: /* empty */ 38 alternative: id '(' @3 arguments @4 ')' 39 | id '(' error 40 arguments: /* empty */ 41 | arguments id 42 | arguments T_ID ':' id 43 Ccode_option: /* empty */ 44 | '{' attributes_option init_option '}' 45 | '{' error 46 attributes_option: /* empty */ 47 | attributes_option attribute 48 attribute: id id attribute_init_option ';' 49 attribute_init_option: /* empty */ 50 @5: /* empty */ 51 attribute_init_option: '=' @5 Cexpression 52 Cexpression: /* empty */ 53 | Cexpression Cexpression_elem 54 Cexpression_elem: T_CEXPRESSION 55 | dollarvar 56 | '\n' 57 | '"' CexpressionDQ '"' 58 | ''' CexpressionSQ ''' 59 | '(' Cexpression_inner ')' 60 | '[' Cexpression_inner ']' 61 | '"' error 62 | ''' error 63 | '(' error 64 | '[' error 65 Cexpression_inner: /* empty */ 66 | Cexpression_inner Cexpression_elem_inner 67 Cexpression_elem_inner: Cexpression_elem 68 | ',' 69 quote_or_error: '"' 70 | error 71 CexpressionDQ: /* empty */ 72 | CexpressionDQ CexpressionDQ_elem 73 CexpressionDQ_elem: T_CEXPRESSION 74 | '\n' 75 CexpressionSQ: /* empty */ 76 | CexpressionSQ CexpressionSQ_elem 77 CexpressionSQ_elem: T_CEXPRESSION 78 | '\n' 79 idCexpressions: idCexpression 80 | idCexpressions ',' idCexpression 81 @6: /* empty */ 82 @7: /* empty */ 83 idCexpression: id @6 Cexpression @7 84 withCexpression: Cexpression 85 withCexpressions: withCexpression 86 @8: /* empty */ 87 withCexpressions: withCexpressions ',' @8 withCexpression 88 @9: /* empty */ 89 @10: /* empty */ 90 MainCbody: '{' @9 MainCBodycontinuation @10 '}' 91 @11: /* empty */ 92 @12: /* empty */ 93 MainCbodyinC: '{' @11 MainCBodycontinuation @12 '}' 94 MainCBodycontinuation: Ctext 95 | withcases 96 | error 97 @13: /* empty */ 98 @14: /* empty */ 99 Cbody: '{' @13 Ctext @14 '}' 100 Ctext: /* empty */ 101 @15: /* empty */ 102 Ctext: Ctext @15 Ctext_elem 103 Ctext_elem: T_CLINE 104 | dollarvar 105 | '\n' 106 | T_CNEWLINES 107 @16: /* empty */ 108 Ctext_elem: '"' @16 CexpressionDQ '"' 109 @17: /* empty */ 110 Ctext_elem: ''' @17 CexpressionSQ ''' 111 | Cbody 112 @18: /* empty */ 113 Ctext_elem: T_FOREACH @18 foreach_continuation 114 @19: /* empty */ 115 @20: /* empty */ 116 @21: /* empty */ 117 Ctext_elem: T_WITH @19 '(' @20 withCexpressions @21 ')' '{' withcases '}' 118 @22: /* empty */ 119 @23: /* empty */ 120 foreach_continuation: '(' patternchain ';' @22 idCexpressions ')' MainCbodyinC @23 foreach_end_continuation 121 foreach_end_continuation: /* empty */ 122 @24: /* empty */ 123 @25: /* empty */ 124 foreach_end_continuation: T_FOREACH_AFTER @24 '(' patternchain @25 ')' MainCbodyinC 125 init_option: /* empty */ 126 | Cbody 127 @26: /* empty */ 128 includedeclaration: T_INCLUDESTART includefiles_option @26 T_ENDOFINCLUDESTART T_INCLUDEEND 129 | T_INCLUDESTART error T_INCLUDEEND 130 includefiles_option: /* empty */ 131 | includefiles 132 includefiles: T_ID 133 | includefiles T_ID 134 @27: /* empty */ 135 rwdeclaration: outmostpatterns T_ARROW @27 rwclauses semi_or_error 136 rwclauses: rwclause 137 | rwclauses rwclause 138 rwclause: '<' useviewnames ':' term '>' 139 semi_or_error: ';' 140 | error 141 patternchains: patternchain 142 | patternchains ',' patternchain 143 patternchain: patternchainitem_lineinfo 144 | patternchain '&' patternchainitem_lineinfo 145 @28: /* empty */ 146 patternchainitem_lineinfo: @28 patternchainitem 147 patternchainitem: outmostpattern 148 | '(' patternchains ')' 149 | '$' id 150 outmostpatterns: outmostpattern 151 | outmostpatterns ',' outmostpattern 152 | error 153 | outmostpatterns error 154 | outmostpatterns ',' error 155 | outmostpatterns error outmostpattern 156 outmostpattern: id provideds 157 | id '(' patternsoption ')' provideds 158 | id '=' outmostpattern 159 | '*' provideds 160 | T_DEFAULT provideds 161 provideds: /* empty */ 162 @29: /* empty */ 163 @30: /* empty */ 164 provideds: T_PROVIDED '(' @29 Cexpression @30 ')' 165 pattern: id 166 | id '(' patternsoption ')' 167 | '*' 168 | T_DEFAULT 169 | id '=' pattern 170 @31: /* empty */ 171 pattern: '"' @31 CexpressionDQ '"' 172 | integer 173 patternsoption: /* empty */ 174 | patterns 175 patterns: pattern 176 | patterns ',' pattern 177 | error 178 | patterns error 179 | patterns ',' error 180 | patterns error pattern 181 term: id 182 | id '(' termsoption ')' 183 | term T_ARROW id '(' termsoption ')' 184 | term '.' id '(' termsoption ')' 185 | term T_ARROW id 186 | term '.' id 187 @32: /* empty */ 188 term: ''' @32 CexpressionSQ ''' 189 @33: /* empty */ 190 term: '"' @33 CexpressionDQ '"' 191 | integer 192 termsoption: /* empty */ 193 | terms 194 terms: term 195 | terms ',' term 196 | error 197 | terms error 198 | terms ',' error 199 | terms error term 200 withcases: withcase 201 | withcases withcase 202 withcase: patternchains ':' Cbody 203 @34: /* empty */ 204 unparsedeclaration: outmostpatterns T_ARROW @34 unparseclauses ';' 205 | outmostpatterns T_ARROW error ';' 206 unparseclauses: unparseclause 207 | unparseclauses unparseclause 208 unparseclause: '[' useviewnames ':' unparseitems ']' 209 | '[' useviewnames ':' error 210 | '[' error ':' unparseitems ']' 211 | '[' error ':' error 212 | '[' error 213 useviewnames: /* empty */ 214 | useviewnames id 215 unparseitems: /* empty */ 216 | unparseitems unparseitem 217 @35: /* empty */ 218 @36: /* empty */ 219 unparseitem: languageoption '"' @35 CexpressionDQ quote_or_error @36 viewnameoption 220 | languageoption unpsubterm viewnameoption 221 | languageoption Cbody 222 | languageoption T_UNPBLOCKSTART unparseitems T_UNPBLOCKEND 223 @37: /* empty */ 224 @38: /* empty */ 225 unparseitem: T_PERCENTUVIEWVAR id id @37 Cexpression @38 ';' 226 unpsubterm: id 227 | dollarvar 228 | id unpattributes 229 | dollarvar unpattributes 230 | '(' id ')' id 231 unpattributes: unpattribute 232 | unpattributes unpattribute 233 unpattribute: T_ARROW id 234 | T_ARROW error 235 viewnameoption: /* empty */ 236 | ':' id 237 | ':' error 238 uviewdeclaration: T_PERCENTUVIEW defuviewnames ';' 239 | T_PERCENTUVIEW error ';' 240 defuviewnames: id 241 | '(' id ')' 242 | defuviewnames id 243 | defuviewnames '(' id ')' 244 | defuviewnames ',' id 245 | defuviewnames ',' '(' id ')' 246 | defuviewnames error 247 | defuviewnames ',' error 248 rviewdeclaration: T_PERCENTRVIEW defrviewnames ';' 249 | T_PERCENTRVIEW error ';' 250 defrviewnames: id 251 | '(' id ')' 252 | defrviewnames id 253 | defrviewnames '(' id ')' 254 | defrviewnames ',' id 255 | defrviewnames ',' '(' id ')' 256 | defrviewnames error 257 | defrviewnames ',' error 258 storageclassdeclaration: T_PERCENTSTORAGECLASS defstorageclasses ';' 259 | T_PERCENTSTORAGECLASS error ';' 260 defstorageclasses: id 261 | defstorageclasses id 262 | defstorageclasses ',' id 263 | defstorageclasses error 264 | defstorageclasses ',' error 265 ac_function_definition: ac_declaration_specifiers ac_fn_declarator ac_compound_statement 266 | id T_COLONCOLON T_OPERATOR id '(' ')' ac_opt_const ac_compound_statement 267 | T_CONSTRUCTOR id '(' ac_parameter_type_list ')' ac_opt_base_init_list ac_compound_statement 268 | T_DESTRUCTOR opt_virtual id '(' ')' ac_compound_statement 269 | T_MEMBER ac_member_declaration_specifiers ac_member_declarator ac_opt_member_init ';' 270 | T_ATTR ac_member_declaration_specifiers ac_member_declarator ac_opt_member_init ';' 271 ac_opt_base_init_list: /* empty */ 272 | ':' ac_base_init_list 273 ac_base_init_list: ac_base_init 274 | ac_base_init_list ',' ac_base_init 275 ac_base_init: id '(' ac_constant_expression_init_list ')' 276 ac_default_arg_init: /* empty */ 277 | '=' ac_constant_expression 278 ac_opt_member_init: /* empty */ 279 | '=' ac_constant_expression 280 | '(' ac_constant_expression ')' 281 ac_declaration_specifiers: ac_type_specifier 282 | ac_storage_class_specifier ac_type_specifier 283 | ac_type_qualifier ac_type_specifier 284 | ac_storage_class_specifier ac_type_qualifier ac_type_specifier 285 ac_member_declaration_specifiers: ac_type_specifier 286 | ac_member_storage_class_specifier ac_type_specifier 287 | ac_type_qualifier ac_type_specifier 288 | ac_member_storage_class_specifier ac_type_qualifier ac_type_specifier 289 ac_storage_class_specifier: T_AUTO 290 | T_REGISTER 291 | T_STATIC 292 | T_EXTERN 293 | T_TYPEDEF 294 | T_VIRTUAL 295 ac_member_storage_class_specifier: T_STATIC 296 opt_virtual: /* empty */ 297 | T_VIRTUAL 298 ac_type_specifier: id 299 ac_type_qualifier: T_CONST 300 | T_VOLATILE 301 | T_UNSIGNED 302 ac_fn_declarator: ac_direct_fn_declarator 303 | ac_pointer ac_direct_fn_declarator 304 | '&' ac_direct_fn_declarator 305 | ac_pointer '&' ac_direct_fn_declarator 306 ac_declarator: ac_direct_declarator 307 | ac_pointer ac_direct_declarator 308 | '&' ac_direct_declarator 309 | ac_pointer '&' ac_direct_declarator 310 ac_member_declarator: ac_direct_member_declarator 311 | ac_pointer ac_direct_member_declarator 312 | '&' ac_direct_member_declarator 313 | ac_pointer '&' ac_direct_member_declarator 314 ac_pointer_declarator: ac_pointer ac_direct_declarator 315 | ac_pointer '&' ac_direct_declarator 316 ac_direct_declarator: ac_identifier 317 | '(' ac_pointer_declarator ')' 318 | ac_direct_declarator '[' ac_constant_expression_option ']' 319 | ac_direct_declarator '(' ac_parameter_type_list ')' 320 ac_direct_member_declarator: id T_COLONCOLON id ac_constant_expression_list 321 ac_constant_expression_list: /* empty */ 322 | ac_constant_expression_list '[' ac_constant_expression ']' 323 ac_constant_expression_init_list: ac_constant_expression 324 | ac_constant_expression_init_list ',' ac_constant_expression 325 ac_direct_fn_declarator: ac_qualifier '(' ac_parameter_type_list ')' ac_opt_const 326 | ac_qualifier '(' error ')' ac_opt_const 327 ac_qualifier: ac_fn_declarator_id 328 | ac_qualifier T_COLONCOLON ac_fn_declarator_id 329 ac_fn_declarator_id: id 330 | T_OPERATOR T_OPNAME 331 ac_opt_const: /* empty */ 332 | T_CONST 333 ac_pointer: '*' 334 | '*' ac_type_qualifier_list 335 | '*' ac_pointer 336 | '*' ac_type_qualifier_list ac_pointer 337 ac_type_qualifier_list: ac_type_qualifier 338 | ac_type_qualifier_list ac_type_qualifier 339 ac_parameter_type_list: /* empty */ 340 | T_DOTDOTDOT 341 | ac_parameter_list 342 | ac_parameter_list T_DOTDOTDOT 343 | ac_parameter_list ',' T_DOTDOTDOT 344 ac_parameter_list: ac_parameter_declaration 345 | ac_parameter_list ',' ac_parameter_declaration 346 ac_parameter_declaration: ac_declaration_specifiers ac_declarator ac_default_arg_init 347 | ac_declaration_specifiers ac_abstract_declarator ac_default_arg_init 348 ac_abstract_declarator: ac_pointer 349 | ac_direct_abstract_declarator 350 | ac_pointer ac_direct_abstract_declarator 351 ac_direct_abstract_declarator: '(' ac_abstract_declarator ')' 352 | ac_direct_abstract_declarator '[' ac_constant_expression_option ']' 353 | '[' ac_constant_expression_option ']' 354 | ac_direct_abstract_declarator '(' ac_parameter_type_list ')' 355 | '(' ac_parameter_type_list ')' 356 ac_constant_expression_option: ac_constant_expression 357 @39: /* empty */ 358 ac_constant_expression: @39 Cexpression 359 ac_identifier: id 360 | '$' id 361 ac_compound_statement: MainCbody 362 @40: /* empty */ 363 ac_compound_statement: error ';' @40 ac_compound_statement 364 languageoption: '<' languageoptions '>' ':' 365 | /* empty */ 366 languageoptions: id 367 | languageoptions ',' id 368 | error 369 | languageoptions error 370 | languageoptions ',' error 371 | languageoptions error id 372 languagedeclaration: T_PERCENTLANGUAGE deflanguagenames ';' 373 | T_PERCENTLANGUAGE error ';' 374 deflanguagenames: id 375 | deflanguagenames id 376 | deflanguagenames ',' id 377 | deflanguagenames error 378 | deflanguagenames ',' error Terminals, with rules where they appear $end (0) 0 '\n' (10) 56 74 78 105 '!' (33) 25 27 '"' (34) 57 61 69 108 171 190 219 '$' (36) 149 360 '&' (38) 144 304 305 308 309 312 313 315 ''' (39) 58 62 110 188 '(' (40) 38 39 59 63 117 120 124 148 157 164 166 182 183 184 230 241 243 245 251 253 255 266 267 268 275 280 317 319 325 326 351 354 355 ')' (41) 38 59 117 120 124 148 157 164 166 182 183 184 230 241 243 245 251 253 255 266 267 268 275 280 317 319 325 326 351 354 355 '*' (42) 159 167 333 334 335 336 ',' (44) 20 68 80 87 142 151 154 176 179 195 198 244 245 247 254 255 257 262 264 274 324 343 345 367 370 376 378 '.' (46) 184 186 ':' (58) 18 22 42 138 202 208 209 210 211 236 237 272 364 ';' (59) 18 22 48 120 139 204 205 225 238 239 248 249 258 259 269 270 363 372 373 '<' (60) 138 364 '=' (61) 51 158 169 277 279 '>' (62) 138 364 '[' (91) 60 64 208 209 210 211 212 318 322 352 353 ']' (93) 60 208 210 318 322 352 353 '{' (123) 24 25 26 27 44 45 90 93 99 117 '|' (124) 32 34 '}' (125) 24 25 44 90 93 99 117 error (256) 26 27 33 34 35 39 45 61 62 63 64 70 96 129 140 152 153 154 155 177 178 179 180 196 197 198 199 205 209 210 211 212 234 237 239 246 247 249 256 257 259 263 264 326 363 368 369 370 371 373 377 378 T_ID (258) 2 42 132 133 T_OPNAME (259) 330 T_INT (260) 3 T_CNEWLINES (261) 106 T_CLINE (262) 103 T_CEXPRESSION (263) 54 73 77 T_DOLLARVAR (264) 1 T_INCLUDEEND (265) 128 129 T_INCLUDESTART (266) 128 129 T_ENDOFINCLUDESTART (267) 128 T_LIST (268) 29 T_ARROW (269) 135 183 185 204 205 233 234 T_PROVIDED (270) 164 T_STATIC (271) 291 295 T_WITH (272) 117 T_FOREACH (273) 113 T_FOREACH_AFTER (274) 124 T_DEFAULT (275) 160 168 T_UNPBLOCKSTART (276) 222 T_UNPBLOCKEND (277) 222 T_PERCENTRVIEW (278) 248 249 T_PERCENTRVIEWVAR (279) T_PERCENTUVIEW (280) 238 239 T_PERCENTUVIEWVAR (281) 225 T_PERCENTSTORAGECLASS (282) 258 259 T_PERCENTLANGUAGE (283) 372 373 T_AUTO (284) 289 T_REGISTER (285) 290 T_EXTERN (286) 292 T_TYPEDEF (287) 293 T_CONST (288) 299 332 T_VOLATILE (289) 300 T_UNSIGNED (290) 301 T_VIRTUAL (291) 294 297 T_DOTDOTDOT (292) 340 342 343 T_COLONCOLON (293) 266 320 328 T_OPERATOR (294) 266 330 T_CONSTRUCTOR (295) 267 T_DESTRUCTOR (296) 268 T_MEMBER (297) 269 T_ATTR (298) 270 T_BASECLASS (299) 18 Nonterminals, with rules where they appear $accept (66) on left: 0 dollarvar (67) on left: 1, on right: 55 104 227 229 id (68) on left: 2, on right: 18 19 20 22 24 25 29 38 39 41 42 48 83 149 156 157 158 165 166 169 181 182 183 184 185 186 214 225 226 228 230 233 236 240 241 242 243 244 245 250 251 252 253 254 255 260 261 262 266 267 268 275 298 320 329 359 360 366 367 371 374 375 376 integer (69) on left: 3, on right: 172 191 specification (70) on left: 5, on right: 0 @1 (71) on left: 4, on right: 5 declarations (72) on left: 6 7, on right: 5 7 declaration (73) on left: 8 9 10 11 12 13 14 15 16 17, on right: 7 baseclassdeclaration (74) on left: 18, on right: 17 baseclass_list (75) on left: 19 20, on right: 18 20 phylumdeclaration (76) on left: 22, on right: 8 @2 (77) on left: 21, on right: 22 storageoption (78) on left: 23 24 25 26 27, on right: 22 productionblock (79) on left: 28 29 30, on right: 22 alternatives (80) on left: 31 32 33 34 35, on right: 30 32 34 35 alternative (81) on left: 38 39, on right: 31 32 35 @3 (82) on left: 36, on right: 38 @4 (83) on left: 37, on right: 38 arguments (84) on left: 40 41 42, on right: 38 41 42 Ccode_option (85) on left: 43 44 45, on right: 22 attributes_option (86) on left: 46 47, on right: 44 47 attribute (87) on left: 48, on right: 47 attribute_init_option (88) on left: 49 51, on right: 48 @5 (89) on left: 50, on right: 51 Cexpression (90) on left: 52 53, on right: 51 53 83 84 164 225 358 Cexpression_elem (91) on left: 54 55 56 57 58 59 60 61 62 63 64, on right: 53 67 Cexpression_inner (92) on left: 65 66, on right: 59 60 66 Cexpression_elem_inner (93) on left: 67 68, on right: 66 quote_or_error (94) on left: 69 70, on right: 219 CexpressionDQ (95) on left: 71 72, on right: 57 72 108 171 190 219 CexpressionDQ_elem (96) on left: 73 74, on right: 72 CexpressionSQ (97) on left: 75 76, on right: 58 76 110 188 CexpressionSQ_elem (98) on left: 77 78, on right: 76 idCexpressions (99) on left: 79 80, on right: 80 120 idCexpression (100) on left: 83, on right: 79 80 @6 (101) on left: 81, on right: 83 @7 (102) on left: 82, on right: 83 withCexpression (103) on left: 84, on right: 85 87 withCexpressions (104) on left: 85 87, on right: 87 117 @8 (105) on left: 86, on right: 87 MainCbody (106) on left: 90, on right: 361 @9 (107) on left: 88, on right: 90 @10 (108) on left: 89, on right: 90 MainCbodyinC (109) on left: 93, on right: 120 124 @11 (110) on left: 91, on right: 93 @12 (111) on left: 92, on right: 93 MainCBodycontinuation (112) on left: 94 95 96, on right: 90 93 Cbody (113) on left: 99, on right: 111 126 202 221 @13 (114) on left: 97, on right: 99 @14 (115) on left: 98, on right: 99 Ctext (116) on left: 100 102, on right: 94 99 102 @15 (117) on left: 101, on right: 102 Ctext_elem (118) on left: 103 104 105 106 108 110 111 113 117, on right: 102 @16 (119) on left: 107, on right: 108 @17 (120) on left: 109, on right: 110 @18 (121) on left: 112, on right: 113 @19 (122) on left: 114, on right: 117 @20 (123) on left: 115, on right: 117 @21 (124) on left: 116, on right: 117 foreach_continuation (125) on left: 120, on right: 113 @22 (126) on left: 118, on right: 120 @23 (127) on left: 119, on right: 120 foreach_end_continuation (128) on left: 121 124, on right: 120 @24 (129) on left: 122, on right: 124 @25 (130) on left: 123, on right: 124 init_option (131) on left: 125 126, on right: 44 includedeclaration (132) on left: 128 129, on right: 11 @26 (133) on left: 127, on right: 128 includefiles_option (134) on left: 130 131, on right: 128 includefiles (135) on left: 132 133, on right: 131 133 rwdeclaration (136) on left: 135, on right: 9 @27 (137) on left: 134, on right: 135 rwclauses (138) on left: 136 137, on right: 135 137 rwclause (139) on left: 138, on right: 136 137 semi_or_error (140) on left: 139 140, on right: 135 patternchains (141) on left: 141 142, on right: 142 148 202 patternchain (142) on left: 143 144, on right: 120 124 141 142 144 patternchainitem_lineinfo (143) on left: 146, on right: 143 144 @28 (144) on left: 145, on right: 146 patternchainitem (145) on left: 147 148 149, on right: 146 outmostpatterns (146) on left: 150 151 152 153 154 155, on right: 135 151 153 154 155 204 205 outmostpattern (147) on left: 156 157 158 159 160, on right: 147 150 151 155 158 provideds (148) on left: 161 164, on right: 156 157 159 160 @29 (149) on left: 162, on right: 164 @30 (150) on left: 163, on right: 164 pattern (151) on left: 165 166 167 168 169 171 172, on right: 169 175 176 180 @31 (152) on left: 170, on right: 171 patternsoption (153) on left: 173 174, on right: 157 166 patterns (154) on left: 175 176 177 178 179 180, on right: 174 176 178 179 180 term (155) on left: 181 182 183 184 185 186 188 190 191, on right: 138 183 184 185 186 194 195 199 @32 (156) on left: 187, on right: 188 @33 (157) on left: 189, on right: 190 termsoption (158) on left: 192 193, on right: 182 183 184 terms (159) on left: 194 195 196 197 198 199, on right: 193 195 197 198 199 withcases (160) on left: 200 201, on right: 95 117 201 withcase (161) on left: 202, on right: 200 201 unparsedeclaration (162) on left: 204 205, on right: 12 @34 (163) on left: 203, on right: 204 unparseclauses (164) on left: 206 207, on right: 204 207 unparseclause (165) on left: 208 209 210 211 212, on right: 206 207 useviewnames (166) on left: 213 214, on right: 138 208 209 214 unparseitems (167) on left: 215 216, on right: 208 210 216 222 unparseitem (168) on left: 219 220 221 222 225, on right: 216 @35 (169) on left: 217, on right: 219 @36 (170) on left: 218, on right: 219 @37 (171) on left: 223, on right: 225 @38 (172) on left: 224, on right: 225 unpsubterm (173) on left: 226 227 228 229 230, on right: 220 unpattributes (174) on left: 231 232, on right: 228 229 232 unpattribute (175) on left: 233 234, on right: 231 232 viewnameoption (176) on left: 235 236 237, on right: 219 220 uviewdeclaration (177) on left: 238 239, on right: 13 defuviewnames (178) on left: 240 241 242 243 244 245 246 247, on right: 238 242 243 244 245 246 247 rviewdeclaration (179) on left: 248 249, on right: 14 defrviewnames (180) on left: 250 251 252 253 254 255 256 257, on right: 248 252 253 254 255 256 257 storageclassdeclaration (181) on left: 258 259, on right: 15 defstorageclasses (182) on left: 260 261 262 263 264, on right: 258 261 262 263 264 ac_function_definition (183) on left: 265 266 267 268 269 270, on right: 10 ac_opt_base_init_list (184) on left: 271 272, on right: 267 ac_base_init_list (185) on left: 273 274, on right: 272 274 ac_base_init (186) on left: 275, on right: 273 274 ac_default_arg_init (187) on left: 276 277, on right: 346 347 ac_opt_member_init (188) on left: 278 279 280, on right: 269 270 ac_declaration_specifiers (189) on left: 281 282 283 284, on right: 265 346 347 ac_member_declaration_specifiers (190) on left: 285 286 287 288, on right: 269 270 ac_storage_class_specifier (191) on left: 289 290 291 292 293 294, on right: 282 284 ac_member_storage_class_specifier (192) on left: 295, on right: 286 288 opt_virtual (193) on left: 296 297, on right: 268 ac_type_specifier (194) on left: 298, on right: 281 282 283 284 285 286 287 288 ac_type_qualifier (195) on left: 299 300 301, on right: 283 284 287 288 337 338 ac_fn_declarator (196) on left: 302 303 304 305, on right: 265 ac_declarator (197) on left: 306 307 308 309, on right: 346 ac_member_declarator (198) on left: 310 311 312 313, on right: 269 270 ac_pointer_declarator (199) on left: 314 315, on right: 317 ac_direct_declarator (200) on left: 316 317 318 319, on right: 306 307 308 309 314 315 318 319 ac_direct_member_declarator (201) on left: 320, on right: 310 311 312 313 ac_constant_expression_list (202) on left: 321 322, on right: 320 322 ac_constant_expression_init_list (203) on left: 323 324, on right: 275 324 ac_direct_fn_declarator (204) on left: 325 326, on right: 302 303 304 305 ac_qualifier (205) on left: 327 328, on right: 325 326 328 ac_fn_declarator_id (206) on left: 329 330, on right: 327 328 ac_opt_const (207) on left: 331 332, on right: 266 325 326 ac_pointer (208) on left: 333 334 335 336, on right: 303 305 307 309 311 313 314 315 335 336 348 350 ac_type_qualifier_list (209) on left: 337 338, on right: 334 336 338 ac_parameter_type_list (210) on left: 339 340 341 342 343, on right: 267 319 325 354 355 ac_parameter_list (211) on left: 344 345, on right: 341 342 343 345 ac_parameter_declaration (212) on left: 346 347, on right: 344 345 ac_abstract_declarator (213) on left: 348 349 350, on right: 347 351 ac_direct_abstract_declarator (214) on left: 351 352 353 354 355, on right: 349 350 352 354 ac_constant_expression_option (215) on left: 356, on right: 318 352 353 ac_constant_expression (216) on left: 358, on right: 277 279 280 322 323 324 356 @39 (217) on left: 357, on right: 358 ac_identifier (218) on left: 359 360, on right: 316 ac_compound_statement (219) on left: 361 363, on right: 265 266 267 268 363 @40 (220) on left: 362, on right: 363 languageoption (221) on left: 364 365, on right: 219 220 221 222 languageoptions (222) on left: 366 367 368 369 370 371, on right: 364 367 369 370 371 languagedeclaration (223) on left: 372 373, on right: 16 deflanguagenames (224) on left: 374 375 376 377 378, on right: 372 375 376 377 378 state 0 0 $accept: . specification $end $default reduce using rule 4 (@1) specification go to state 1 @1 go to state 2 state 1 0 $accept: specification . $end $end shift, and go to state 3 state 2 5 specification: @1 . declarations $default reduce using rule 6 (declarations) declarations go to state 4 state 3 0 $accept: specification $end . $default accept state 4 5 specification: @1 declarations . 7 declarations: declarations . declaration error shift, and go to state 5 T_ID shift, and go to state 6 T_INCLUDESTART shift, and go to state 7 T_STATIC shift, and go to state 8 T_DEFAULT shift, and go to state 9 T_PERCENTRVIEW shift, and go to state 10 T_PERCENTUVIEW shift, and go to state 11 T_PERCENTSTORAGECLASS shift, and go to state 12 T_PERCENTLANGUAGE shift, and go to state 13 T_AUTO shift, and go to state 14 T_REGISTER shift, and go to state 15 T_EXTERN shift, and go to state 16 T_TYPEDEF shift, and go to state 17 T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 T_VIRTUAL shift, and go to state 21 T_CONSTRUCTOR shift, and go to state 22 T_DESTRUCTOR shift, and go to state 23 T_MEMBER shift, and go to state 24 T_ATTR shift, and go to state 25 T_BASECLASS shift, and go to state 26 '*' shift, and go to state 27 $end reduce using rule 5 (specification) id go to state 28 declaration go to state 29 baseclassdeclaration go to state 30 phylumdeclaration go to state 31 includedeclaration go to state 32 rwdeclaration go to state 33 outmostpatterns go to state 34 outmostpattern go to state 35 unparsedeclaration go to state 36 uviewdeclaration go to state 37 rviewdeclaration go to state 38 storageclassdeclaration go to state 39 ac_function_definition go to state 40 ac_declaration_specifiers go to state 41 ac_storage_class_specifier go to state 42 ac_type_specifier go to state 43 ac_type_qualifier go to state 44 languagedeclaration go to state 45 state 5 152 outmostpatterns: error . $default reduce using rule 152 (outmostpatterns) state 6 2 id: T_ID . $default reduce using rule 2 (id) state 7 128 includedeclaration: T_INCLUDESTART . includefiles_option @26 T_ENDOFINCLUDESTART T_INCLUDEEND 129 | T_INCLUDESTART . error T_INCLUDEEND error shift, and go to state 46 T_ID shift, and go to state 47 T_ENDOFINCLUDESTART reduce using rule 130 (includefiles_option) includefiles_option go to state 48 includefiles go to state 49 state 8 291 ac_storage_class_specifier: T_STATIC . $default reduce using rule 291 (ac_storage_class_specifier) state 9 160 outmostpattern: T_DEFAULT . provideds T_PROVIDED shift, and go to state 50 $default reduce using rule 161 (provideds) provideds go to state 51 state 10 248 rviewdeclaration: T_PERCENTRVIEW . defrviewnames ';' 249 | T_PERCENTRVIEW . error ';' error shift, and go to state 52 T_ID shift, and go to state 6 '(' shift, and go to state 53 id go to state 54 defrviewnames go to state 55 state 11 238 uviewdeclaration: T_PERCENTUVIEW . defuviewnames ';' 239 | T_PERCENTUVIEW . error ';' error shift, and go to state 56 T_ID shift, and go to state 6 '(' shift, and go to state 57 id go to state 58 defuviewnames go to state 59 state 12 258 storageclassdeclaration: T_PERCENTSTORAGECLASS . defstorageclasses ';' 259 | T_PERCENTSTORAGECLASS . error ';' error shift, and go to state 60 T_ID shift, and go to state 6 id go to state 61 defstorageclasses go to state 62 state 13 372 languagedeclaration: T_PERCENTLANGUAGE . deflanguagenames ';' 373 | T_PERCENTLANGUAGE . error ';' error shift, and go to state 63 T_ID shift, and go to state 6 id go to state 64 deflanguagenames go to state 65 state 14 289 ac_storage_class_specifier: T_AUTO . $default reduce using rule 289 (ac_storage_class_specifier) state 15 290 ac_storage_class_specifier: T_REGISTER . $default reduce using rule 290 (ac_storage_class_specifier) state 16 292 ac_storage_class_specifier: T_EXTERN . $default reduce using rule 292 (ac_storage_class_specifier) state 17 293 ac_storage_class_specifier: T_TYPEDEF . $default reduce using rule 293 (ac_storage_class_specifier) state 18 299 ac_type_qualifier: T_CONST . $default reduce using rule 299 (ac_type_qualifier) state 19 300 ac_type_qualifier: T_VOLATILE . $default reduce using rule 300 (ac_type_qualifier) state 20 301 ac_type_qualifier: T_UNSIGNED . $default reduce using rule 301 (ac_type_qualifier) state 21 294 ac_storage_class_specifier: T_VIRTUAL . $default reduce using rule 294 (ac_storage_class_specifier) state 22 267 ac_function_definition: T_CONSTRUCTOR . id '(' ac_parameter_type_list ')' ac_opt_base_init_list ac_compound_statement T_ID shift, and go to state 6 id go to state 66 state 23 268 ac_function_definition: T_DESTRUCTOR . opt_virtual id '(' ')' ac_compound_statement T_VIRTUAL shift, and go to state 67 $default reduce using rule 296 (opt_virtual) opt_virtual go to state 68 state 24 269 ac_function_definition: T_MEMBER . ac_member_declaration_specifiers ac_member_declarator ac_opt_member_init ';' T_ID shift, and go to state 6 T_STATIC shift, and go to state 69 T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 id go to state 70 ac_member_declaration_specifiers go to state 71 ac_member_storage_class_specifier go to state 72 ac_type_specifier go to state 73 ac_type_qualifier go to state 74 state 25 270 ac_function_definition: T_ATTR . ac_member_declaration_specifiers ac_member_declarator ac_opt_member_init ';' T_ID shift, and go to state 6 T_STATIC shift, and go to state 69 T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 id go to state 70 ac_member_declaration_specifiers go to state 75 ac_member_storage_class_specifier go to state 72 ac_type_specifier go to state 73 ac_type_qualifier go to state 74 state 26 18 baseclassdeclaration: T_BASECLASS . id ':' baseclass_list ';' T_ID shift, and go to state 6 id go to state 76 state 27 159 outmostpattern: '*' . provideds T_PROVIDED shift, and go to state 50 $default reduce using rule 161 (provideds) provideds go to state 77 state 28 22 phylumdeclaration: id . storageoption ':' @2 productionblock Ccode_option ';' 156 outmostpattern: id . provideds 157 | id . '(' patternsoption ')' provideds 158 | id . '=' outmostpattern 266 ac_function_definition: id . T_COLONCOLON T_OPERATOR id '(' ')' ac_opt_const ac_compound_statement 298 ac_type_specifier: id . T_PROVIDED shift, and go to state 50 T_COLONCOLON shift, and go to state 78 '{' shift, and go to state 79 '(' shift, and go to state 80 '=' shift, and go to state 81 error reduce using rule 161 (provideds) T_ARROW reduce using rule 161 (provideds) ':' reduce using rule 23 (storageoption) ',' reduce using rule 161 (provideds) $default reduce using rule 298 (ac_type_specifier) storageoption go to state 82 provideds go to state 83 state 29 7 declarations: declarations declaration . $default reduce using rule 7 (declarations) state 30 17 declaration: baseclassdeclaration . $default reduce using rule 17 (declaration) state 31 8 declaration: phylumdeclaration . $default reduce using rule 8 (declaration) state 32 11 declaration: includedeclaration . $default reduce using rule 11 (declaration) state 33 9 declaration: rwdeclaration . $default reduce using rule 9 (declaration) state 34 135 rwdeclaration: outmostpatterns . T_ARROW @27 rwclauses semi_or_error 151 outmostpatterns: outmostpatterns . ',' outmostpattern 153 | outmostpatterns . error 154 | outmostpatterns . ',' error 155 | outmostpatterns . error outmostpattern 204 unparsedeclaration: outmostpatterns . T_ARROW @34 unparseclauses ';' 205 | outmostpatterns . T_ARROW error ';' error shift, and go to state 84 T_ARROW shift, and go to state 85 ',' shift, and go to state 86 state 35 150 outmostpatterns: outmostpattern . $default reduce using rule 150 (outmostpatterns) state 36 12 declaration: unparsedeclaration . $default reduce using rule 12 (declaration) state 37 13 declaration: uviewdeclaration . $default reduce using rule 13 (declaration) state 38 14 declaration: rviewdeclaration . $default reduce using rule 14 (declaration) state 39 15 declaration: storageclassdeclaration . $default reduce using rule 15 (declaration) state 40 10 declaration: ac_function_definition . $default reduce using rule 10 (declaration) state 41 265 ac_function_definition: ac_declaration_specifiers . ac_fn_declarator ac_compound_statement T_ID shift, and go to state 6 T_OPERATOR shift, and go to state 87 '&' shift, and go to state 88 '*' shift, and go to state 89 id go to state 90 ac_fn_declarator go to state 91 ac_direct_fn_declarator go to state 92 ac_qualifier go to state 93 ac_fn_declarator_id go to state 94 ac_pointer go to state 95 state 42 282 ac_declaration_specifiers: ac_storage_class_specifier . ac_type_specifier 284 | ac_storage_class_specifier . ac_type_qualifier ac_type_specifier T_ID shift, and go to state 6 T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 id go to state 70 ac_type_specifier go to state 96 ac_type_qualifier go to state 97 state 43 281 ac_declaration_specifiers: ac_type_specifier . $default reduce using rule 281 (ac_declaration_specifiers) state 44 283 ac_declaration_specifiers: ac_type_qualifier . ac_type_specifier T_ID shift, and go to state 6 id go to state 70 ac_type_specifier go to state 98 state 45 16 declaration: languagedeclaration . $default reduce using rule 16 (declaration) state 46 129 includedeclaration: T_INCLUDESTART error . T_INCLUDEEND T_INCLUDEEND shift, and go to state 99 state 47 132 includefiles: T_ID . $default reduce using rule 132 (includefiles) state 48 128 includedeclaration: T_INCLUDESTART includefiles_option . @26 T_ENDOFINCLUDESTART T_INCLUDEEND $default reduce using rule 127 (@26) @26 go to state 100 state 49 131 includefiles_option: includefiles . 133 includefiles: includefiles . T_ID T_ID shift, and go to state 101 $default reduce using rule 131 (includefiles_option) state 50 164 provideds: T_PROVIDED . '(' @29 Cexpression @30 ')' '(' shift, and go to state 102 state 51 160 outmostpattern: T_DEFAULT provideds . $default reduce using rule 160 (outmostpattern) state 52 249 rviewdeclaration: T_PERCENTRVIEW error . ';' ';' shift, and go to state 103 state 53 251 defrviewnames: '(' . id ')' T_ID shift, and go to state 6 id go to state 104 state 54 250 defrviewnames: id . $default reduce using rule 250 (defrviewnames) state 55 248 rviewdeclaration: T_PERCENTRVIEW defrviewnames . ';' 252 defrviewnames: defrviewnames . id 253 | defrviewnames . '(' id ')' 254 | defrviewnames . ',' id 255 | defrviewnames . ',' '(' id ')' 256 | defrviewnames . error 257 | defrviewnames . ',' error error shift, and go to state 105 T_ID shift, and go to state 6 ';' shift, and go to state 106 ',' shift, and go to state 107 '(' shift, and go to state 108 id go to state 109 state 56 239 uviewdeclaration: T_PERCENTUVIEW error . ';' ';' shift, and go to state 110 state 57 241 defuviewnames: '(' . id ')' T_ID shift, and go to state 6 id go to state 111 state 58 240 defuviewnames: id . $default reduce using rule 240 (defuviewnames) state 59 238 uviewdeclaration: T_PERCENTUVIEW defuviewnames . ';' 242 defuviewnames: defuviewnames . id 243 | defuviewnames . '(' id ')' 244 | defuviewnames . ',' id 245 | defuviewnames . ',' '(' id ')' 246 | defuviewnames . error 247 | defuviewnames . ',' error error shift, and go to state 112 T_ID shift, and go to state 6 ';' shift, and go to state 113 ',' shift, and go to state 114 '(' shift, and go to state 115 id go to state 116 state 60 259 storageclassdeclaration: T_PERCENTSTORAGECLASS error . ';' ';' shift, and go to state 117 state 61 260 defstorageclasses: id . $default reduce using rule 260 (defstorageclasses) state 62 258 storageclassdeclaration: T_PERCENTSTORAGECLASS defstorageclasses . ';' 261 defstorageclasses: defstorageclasses . id 262 | defstorageclasses . ',' id 263 | defstorageclasses . error 264 | defstorageclasses . ',' error error shift, and go to state 118 T_ID shift, and go to state 6 ';' shift, and go to state 119 ',' shift, and go to state 120 id go to state 121 state 63 373 languagedeclaration: T_PERCENTLANGUAGE error . ';' ';' shift, and go to state 122 state 64 374 deflanguagenames: id . $default reduce using rule 374 (deflanguagenames) state 65 372 languagedeclaration: T_PERCENTLANGUAGE deflanguagenames . ';' 375 deflanguagenames: deflanguagenames . id 376 | deflanguagenames . ',' id 377 | deflanguagenames . error 378 | deflanguagenames . ',' error error shift, and go to state 123 T_ID shift, and go to state 6 ';' shift, and go to state 124 ',' shift, and go to state 125 id go to state 126 state 66 267 ac_function_definition: T_CONSTRUCTOR id . '(' ac_parameter_type_list ')' ac_opt_base_init_list ac_compound_statement '(' shift, and go to state 127 state 67 297 opt_virtual: T_VIRTUAL . $default reduce using rule 297 (opt_virtual) state 68 268 ac_function_definition: T_DESTRUCTOR opt_virtual . id '(' ')' ac_compound_statement T_ID shift, and go to state 6 id go to state 128 state 69 295 ac_member_storage_class_specifier: T_STATIC . $default reduce using rule 295 (ac_member_storage_class_specifier) state 70 298 ac_type_specifier: id . $default reduce using rule 298 (ac_type_specifier) state 71 269 ac_function_definition: T_MEMBER ac_member_declaration_specifiers . ac_member_declarator ac_opt_member_init ';' T_ID shift, and go to state 6 '&' shift, and go to state 129 '*' shift, and go to state 89 id go to state 130 ac_member_declarator go to state 131 ac_direct_member_declarator go to state 132 ac_pointer go to state 133 state 72 286 ac_member_declaration_specifiers: ac_member_storage_class_specifier . ac_type_specifier 288 | ac_member_storage_class_specifier . ac_type_qualifier ac_type_specifier T_ID shift, and go to state 6 T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 id go to state 70 ac_type_specifier go to state 134 ac_type_qualifier go to state 135 state 73 285 ac_member_declaration_specifiers: ac_type_specifier . $default reduce using rule 285 (ac_member_declaration_specifiers) state 74 287 ac_member_declaration_specifiers: ac_type_qualifier . ac_type_specifier T_ID shift, and go to state 6 id go to state 70 ac_type_specifier go to state 136 state 75 270 ac_function_definition: T_ATTR ac_member_declaration_specifiers . ac_member_declarator ac_opt_member_init ';' T_ID shift, and go to state 6 '&' shift, and go to state 129 '*' shift, and go to state 89 id go to state 130 ac_member_declarator go to state 137 ac_direct_member_declarator go to state 132 ac_pointer go to state 133 state 76 18 baseclassdeclaration: T_BASECLASS id . ':' baseclass_list ';' ':' shift, and go to state 138 state 77 159 outmostpattern: '*' provideds . $default reduce using rule 159 (outmostpattern) state 78 266 ac_function_definition: id T_COLONCOLON . T_OPERATOR id '(' ')' ac_opt_const ac_compound_statement T_OPERATOR shift, and go to state 139 state 79 24 storageoption: '{' . id '}' 25 | '{' . '!' id '}' 26 | '{' . error 27 | '{' . '!' error error shift, and go to state 140 T_ID shift, and go to state 6 '!' shift, and go to state 141 id go to state 142 state 80 157 outmostpattern: id '(' . patternsoption ')' provideds error shift, and go to state 143 T_ID shift, and go to state 6 T_INT shift, and go to state 144 T_DEFAULT shift, and go to state 145 '"' shift, and go to state 146 '*' shift, and go to state 147 ')' reduce using rule 173 (patternsoption) id go to state 148 integer go to state 149 pattern go to state 150 patternsoption go to state 151 patterns go to state 152 state 81 158 outmostpattern: id '=' . outmostpattern T_ID shift, and go to state 6 T_DEFAULT shift, and go to state 9 '*' shift, and go to state 27 id go to state 153 outmostpattern go to state 154 state 82 22 phylumdeclaration: id storageoption . ':' @2 productionblock Ccode_option ';' ':' shift, and go to state 155 state 83 156 outmostpattern: id provideds . $default reduce using rule 156 (outmostpattern) state 84 153 outmostpatterns: outmostpatterns error . 155 | outmostpatterns error . outmostpattern T_ID shift, and go to state 6 T_DEFAULT shift, and go to state 9 '*' shift, and go to state 27 $default reduce using rule 153 (outmostpatterns) id go to state 153 outmostpattern go to state 156 state 85 135 rwdeclaration: outmostpatterns T_ARROW . @27 rwclauses semi_or_error 204 unparsedeclaration: outmostpatterns T_ARROW . @34 unparseclauses ';' 205 | outmostpatterns T_ARROW . error ';' error shift, and go to state 157 '[' reduce using rule 203 (@34) '<' reduce using rule 134 (@27) @27 go to state 158 @34 go to state 159 state 86 151 outmostpatterns: outmostpatterns ',' . outmostpattern 154 | outmostpatterns ',' . error error shift, and go to state 160 T_ID shift, and go to state 6 T_DEFAULT shift, and go to state 9 '*' shift, and go to state 27 id go to state 153 outmostpattern go to state 161 state 87 330 ac_fn_declarator_id: T_OPERATOR . T_OPNAME T_OPNAME shift, and go to state 162 state 88 304 ac_fn_declarator: '&' . ac_direct_fn_declarator T_ID shift, and go to state 6 T_OPERATOR shift, and go to state 87 id go to state 90 ac_direct_fn_declarator go to state 163 ac_qualifier go to state 93 ac_fn_declarator_id go to state 94 state 89 333 ac_pointer: '*' . 334 | '*' . ac_type_qualifier_list 335 | '*' . ac_pointer 336 | '*' . ac_type_qualifier_list ac_pointer T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 '*' shift, and go to state 89 $default reduce using rule 333 (ac_pointer) ac_type_qualifier go to state 164 ac_pointer go to state 165 ac_type_qualifier_list go to state 166 state 90 329 ac_fn_declarator_id: id . $default reduce using rule 329 (ac_fn_declarator_id) state 91 265 ac_function_definition: ac_declaration_specifiers ac_fn_declarator . ac_compound_statement error shift, and go to state 167 '{' shift, and go to state 168 MainCbody go to state 169 ac_compound_statement go to state 170 state 92 302 ac_fn_declarator: ac_direct_fn_declarator . $default reduce using rule 302 (ac_fn_declarator) state 93 325 ac_direct_fn_declarator: ac_qualifier . '(' ac_parameter_type_list ')' ac_opt_const 326 | ac_qualifier . '(' error ')' ac_opt_const 328 ac_qualifier: ac_qualifier . T_COLONCOLON ac_fn_declarator_id T_COLONCOLON shift, and go to state 171 '(' shift, and go to state 172 state 94 327 ac_qualifier: ac_fn_declarator_id . $default reduce using rule 327 (ac_qualifier) state 95 303 ac_fn_declarator: ac_pointer . ac_direct_fn_declarator 305 | ac_pointer . '&' ac_direct_fn_declarator T_ID shift, and go to state 6 T_OPERATOR shift, and go to state 87 '&' shift, and go to state 173 id go to state 90 ac_direct_fn_declarator go to state 174 ac_qualifier go to state 93 ac_fn_declarator_id go to state 94 state 96 282 ac_declaration_specifiers: ac_storage_class_specifier ac_type_specifier . $default reduce using rule 282 (ac_declaration_specifiers) state 97 284 ac_declaration_specifiers: ac_storage_class_specifier ac_type_qualifier . ac_type_specifier T_ID shift, and go to state 6 id go to state 70 ac_type_specifier go to state 175 state 98 283 ac_declaration_specifiers: ac_type_qualifier ac_type_specifier . $default reduce using rule 283 (ac_declaration_specifiers) state 99 129 includedeclaration: T_INCLUDESTART error T_INCLUDEEND . $default reduce using rule 129 (includedeclaration) state 100 128 includedeclaration: T_INCLUDESTART includefiles_option @26 . T_ENDOFINCLUDESTART T_INCLUDEEND T_ENDOFINCLUDESTART shift, and go to state 176 state 101 133 includefiles: includefiles T_ID . $default reduce using rule 133 (includefiles) state 102 164 provideds: T_PROVIDED '(' . @29 Cexpression @30 ')' $default reduce using rule 162 (@29) @29 go to state 177 state 103 249 rviewdeclaration: T_PERCENTRVIEW error ';' . $default reduce using rule 249 (rviewdeclaration) state 104 251 defrviewnames: '(' id . ')' ')' shift, and go to state 178 state 105 256 defrviewnames: defrviewnames error . $default reduce using rule 256 (defrviewnames) state 106 248 rviewdeclaration: T_PERCENTRVIEW defrviewnames ';' . $default reduce using rule 248 (rviewdeclaration) state 107 254 defrviewnames: defrviewnames ',' . id 255 | defrviewnames ',' . '(' id ')' 257 | defrviewnames ',' . error error shift, and go to state 179 T_ID shift, and go to state 6 '(' shift, and go to state 180 id go to state 181 state 108 253 defrviewnames: defrviewnames '(' . id ')' T_ID shift, and go to state 6 id go to state 182 state 109 252 defrviewnames: defrviewnames id . $default reduce using rule 252 (defrviewnames) state 110 239 uviewdeclaration: T_PERCENTUVIEW error ';' . $default reduce using rule 239 (uviewdeclaration) state 111 241 defuviewnames: '(' id . ')' ')' shift, and go to state 183 state 112 246 defuviewnames: defuviewnames error . $default reduce using rule 246 (defuviewnames) state 113 238 uviewdeclaration: T_PERCENTUVIEW defuviewnames ';' . $default reduce using rule 238 (uviewdeclaration) state 114 244 defuviewnames: defuviewnames ',' . id 245 | defuviewnames ',' . '(' id ')' 247 | defuviewnames ',' . error error shift, and go to state 184 T_ID shift, and go to state 6 '(' shift, and go to state 185 id go to state 186 state 115 243 defuviewnames: defuviewnames '(' . id ')' T_ID shift, and go to state 6 id go to state 187 state 116 242 defuviewnames: defuviewnames id . $default reduce using rule 242 (defuviewnames) state 117 259 storageclassdeclaration: T_PERCENTSTORAGECLASS error ';' . $default reduce using rule 259 (storageclassdeclaration) state 118 263 defstorageclasses: defstorageclasses error . $default reduce using rule 263 (defstorageclasses) state 119 258 storageclassdeclaration: T_PERCENTSTORAGECLASS defstorageclasses ';' . $default reduce using rule 258 (storageclassdeclaration) state 120 262 defstorageclasses: defstorageclasses ',' . id 264 | defstorageclasses ',' . error error shift, and go to state 188 T_ID shift, and go to state 6 id go to state 189 state 121 261 defstorageclasses: defstorageclasses id . $default reduce using rule 261 (defstorageclasses) state 122 373 languagedeclaration: T_PERCENTLANGUAGE error ';' . $default reduce using rule 373 (languagedeclaration) state 123 377 deflanguagenames: deflanguagenames error . $default reduce using rule 377 (deflanguagenames) state 124 372 languagedeclaration: T_PERCENTLANGUAGE deflanguagenames ';' . $default reduce using rule 372 (languagedeclaration) state 125 376 deflanguagenames: deflanguagenames ',' . id 378 | deflanguagenames ',' . error error shift, and go to state 190 T_ID shift, and go to state 6 id go to state 191 state 126 375 deflanguagenames: deflanguagenames id . $default reduce using rule 375 (deflanguagenames) state 127 267 ac_function_definition: T_CONSTRUCTOR id '(' . ac_parameter_type_list ')' ac_opt_base_init_list ac_compound_statement T_ID shift, and go to state 6 T_STATIC shift, and go to state 8 T_AUTO shift, and go to state 14 T_REGISTER shift, and go to state 15 T_EXTERN shift, and go to state 16 T_TYPEDEF shift, and go to state 17 T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 T_VIRTUAL shift, and go to state 21 T_DOTDOTDOT shift, and go to state 192 $default reduce using rule 339 (ac_parameter_type_list) id go to state 70 ac_declaration_specifiers go to state 193 ac_storage_class_specifier go to state 42 ac_type_specifier go to state 43 ac_type_qualifier go to state 44 ac_parameter_type_list go to state 194 ac_parameter_list go to state 195 ac_parameter_declaration go to state 196 state 128 268 ac_function_definition: T_DESTRUCTOR opt_virtual id . '(' ')' ac_compound_statement '(' shift, and go to state 197 state 129 312 ac_member_declarator: '&' . ac_direct_member_declarator T_ID shift, and go to state 6 id go to state 130 ac_direct_member_declarator go to state 198 state 130 320 ac_direct_member_declarator: id . T_COLONCOLON id ac_constant_expression_list T_COLONCOLON shift, and go to state 199 state 131 269 ac_function_definition: T_MEMBER ac_member_declaration_specifiers ac_member_declarator . ac_opt_member_init ';' '(' shift, and go to state 200 '=' shift, and go to state 201 $default reduce using rule 278 (ac_opt_member_init) ac_opt_member_init go to state 202 state 132 310 ac_member_declarator: ac_direct_member_declarator . $default reduce using rule 310 (ac_member_declarator) state 133 311 ac_member_declarator: ac_pointer . ac_direct_member_declarator 313 | ac_pointer . '&' ac_direct_member_declarator T_ID shift, and go to state 6 '&' shift, and go to state 203 id go to state 130 ac_direct_member_declarator go to state 204 state 134 286 ac_member_declaration_specifiers: ac_member_storage_class_specifier ac_type_specifier . $default reduce using rule 286 (ac_member_declaration_specifiers) state 135 288 ac_member_declaration_specifiers: ac_member_storage_class_specifier ac_type_qualifier . ac_type_specifier T_ID shift, and go to state 6 id go to state 70 ac_type_specifier go to state 205 state 136 287 ac_member_declaration_specifiers: ac_type_qualifier ac_type_specifier . $default reduce using rule 287 (ac_member_declaration_specifiers) state 137 270 ac_function_definition: T_ATTR ac_member_declaration_specifiers ac_member_declarator . ac_opt_member_init ';' '(' shift, and go to state 200 '=' shift, and go to state 201 $default reduce using rule 278 (ac_opt_member_init) ac_opt_member_init go to state 206 state 138 18 baseclassdeclaration: T_BASECLASS id ':' . baseclass_list ';' T_ID shift, and go to state 6 id go to state 207 baseclass_list go to state 208 state 139 266 ac_function_definition: id T_COLONCOLON T_OPERATOR . id '(' ')' ac_opt_const ac_compound_statement T_ID shift, and go to state 6 id go to state 209 state 140 26 storageoption: '{' error . $default reduce using rule 26 (storageoption) state 141 25 storageoption: '{' '!' . id '}' 27 | '{' '!' . error error shift, and go to state 210 T_ID shift, and go to state 6 id go to state 211 state 142 24 storageoption: '{' id . '}' '}' shift, and go to state 212 state 143 177 patterns: error . $default reduce using rule 177 (patterns) state 144 3 integer: T_INT . $default reduce using rule 3 (integer) state 145 168 pattern: T_DEFAULT . $default reduce using rule 168 (pattern) state 146 171 pattern: '"' . @31 CexpressionDQ '"' $default reduce using rule 170 (@31) @31 go to state 213 state 147 167 pattern: '*' . $default reduce using rule 167 (pattern) state 148 165 pattern: id . 166 | id . '(' patternsoption ')' 169 | id . '=' pattern '(' shift, and go to state 214 '=' shift, and go to state 215 $default reduce using rule 165 (pattern) state 149 172 pattern: integer . $default reduce using rule 172 (pattern) state 150 175 patterns: pattern . $default reduce using rule 175 (patterns) state 151 157 outmostpattern: id '(' patternsoption . ')' provideds ')' shift, and go to state 216 state 152 174 patternsoption: patterns . 176 patterns: patterns . ',' pattern 178 | patterns . error 179 | patterns . ',' error 180 | patterns . error pattern error shift, and go to state 217 ',' shift, and go to state 218 ')' reduce using rule 174 (patternsoption) state 153 156 outmostpattern: id . provideds 157 | id . '(' patternsoption ')' provideds 158 | id . '=' outmostpattern T_PROVIDED shift, and go to state 50 '(' shift, and go to state 80 '=' shift, and go to state 81 $default reduce using rule 161 (provideds) provideds go to state 83 state 154 158 outmostpattern: id '=' outmostpattern . $default reduce using rule 158 (outmostpattern) state 155 22 phylumdeclaration: id storageoption ':' . @2 productionblock Ccode_option ';' $default reduce using rule 21 (@2) @2 go to state 219 state 156 155 outmostpatterns: outmostpatterns error outmostpattern . $default reduce using rule 155 (outmostpatterns) state 157 205 unparsedeclaration: outmostpatterns T_ARROW error . ';' ';' shift, and go to state 220 state 158 135 rwdeclaration: outmostpatterns T_ARROW @27 . rwclauses semi_or_error '<' shift, and go to state 221 rwclauses go to state 222 rwclause go to state 223 state 159 204 unparsedeclaration: outmostpatterns T_ARROW @34 . unparseclauses ';' '[' shift, and go to state 224 unparseclauses go to state 225 unparseclause go to state 226 state 160 154 outmostpatterns: outmostpatterns ',' error . $default reduce using rule 154 (outmostpatterns) state 161 151 outmostpatterns: outmostpatterns ',' outmostpattern . $default reduce using rule 151 (outmostpatterns) state 162 330 ac_fn_declarator_id: T_OPERATOR T_OPNAME . $default reduce using rule 330 (ac_fn_declarator_id) state 163 304 ac_fn_declarator: '&' ac_direct_fn_declarator . $default reduce using rule 304 (ac_fn_declarator) state 164 337 ac_type_qualifier_list: ac_type_qualifier . $default reduce using rule 337 (ac_type_qualifier_list) state 165 335 ac_pointer: '*' ac_pointer . $default reduce using rule 335 (ac_pointer) state 166 334 ac_pointer: '*' ac_type_qualifier_list . 336 | '*' ac_type_qualifier_list . ac_pointer 338 ac_type_qualifier_list: ac_type_qualifier_list . ac_type_qualifier T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 '*' shift, and go to state 89 $default reduce using rule 334 (ac_pointer) ac_type_qualifier go to state 227 ac_pointer go to state 228 state 167 363 ac_compound_statement: error . ';' @40 ac_compound_statement ';' shift, and go to state 229 state 168 90 MainCbody: '{' . @9 MainCBodycontinuation @10 '}' $default reduce using rule 88 (@9) @9 go to state 230 state 169 361 ac_compound_statement: MainCbody . $default reduce using rule 361 (ac_compound_statement) state 170 265 ac_function_definition: ac_declaration_specifiers ac_fn_declarator ac_compound_statement . $default reduce using rule 265 (ac_function_definition) state 171 328 ac_qualifier: ac_qualifier T_COLONCOLON . ac_fn_declarator_id T_ID shift, and go to state 6 T_OPERATOR shift, and go to state 87 id go to state 90 ac_fn_declarator_id go to state 231 state 172 325 ac_direct_fn_declarator: ac_qualifier '(' . ac_parameter_type_list ')' ac_opt_const 326 | ac_qualifier '(' . error ')' ac_opt_const error shift, and go to state 232 T_ID shift, and go to state 6 T_STATIC shift, and go to state 8 T_AUTO shift, and go to state 14 T_REGISTER shift, and go to state 15 T_EXTERN shift, and go to state 16 T_TYPEDEF shift, and go to state 17 T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 T_VIRTUAL shift, and go to state 21 T_DOTDOTDOT shift, and go to state 192 ')' reduce using rule 339 (ac_parameter_type_list) id go to state 70 ac_declaration_specifiers go to state 193 ac_storage_class_specifier go to state 42 ac_type_specifier go to state 43 ac_type_qualifier go to state 44 ac_parameter_type_list go to state 233 ac_parameter_list go to state 195 ac_parameter_declaration go to state 196 state 173 305 ac_fn_declarator: ac_pointer '&' . ac_direct_fn_declarator T_ID shift, and go to state 6 T_OPERATOR shift, and go to state 87 id go to state 90 ac_direct_fn_declarator go to state 234 ac_qualifier go to state 93 ac_fn_declarator_id go to state 94 state 174 303 ac_fn_declarator: ac_pointer ac_direct_fn_declarator . $default reduce using rule 303 (ac_fn_declarator) state 175 284 ac_declaration_specifiers: ac_storage_class_specifier ac_type_qualifier ac_type_specifier . $default reduce using rule 284 (ac_declaration_specifiers) state 176 128 includedeclaration: T_INCLUDESTART includefiles_option @26 T_ENDOFINCLUDESTART . T_INCLUDEEND T_INCLUDEEND shift, and go to state 235 state 177 164 provideds: T_PROVIDED '(' @29 . Cexpression @30 ')' $default reduce using rule 52 (Cexpression) Cexpression go to state 236 state 178 251 defrviewnames: '(' id ')' . $default reduce using rule 251 (defrviewnames) state 179 257 defrviewnames: defrviewnames ',' error . $default reduce using rule 257 (defrviewnames) state 180 255 defrviewnames: defrviewnames ',' '(' . id ')' T_ID shift, and go to state 6 id go to state 237 state 181 254 defrviewnames: defrviewnames ',' id . $default reduce using rule 254 (defrviewnames) state 182 253 defrviewnames: defrviewnames '(' id . ')' ')' shift, and go to state 238 state 183 241 defuviewnames: '(' id ')' . $default reduce using rule 241 (defuviewnames) state 184 247 defuviewnames: defuviewnames ',' error . $default reduce using rule 247 (defuviewnames) state 185 245 defuviewnames: defuviewnames ',' '(' . id ')' T_ID shift, and go to state 6 id go to state 239 state 186 244 defuviewnames: defuviewnames ',' id . $default reduce using rule 244 (defuviewnames) state 187 243 defuviewnames: defuviewnames '(' id . ')' ')' shift, and go to state 240 state 188 264 defstorageclasses: defstorageclasses ',' error . $default reduce using rule 264 (defstorageclasses) state 189 262 defstorageclasses: defstorageclasses ',' id . $default reduce using rule 262 (defstorageclasses) state 190 378 deflanguagenames: deflanguagenames ',' error . $default reduce using rule 378 (deflanguagenames) state 191 376 deflanguagenames: deflanguagenames ',' id . $default reduce using rule 376 (deflanguagenames) state 192 340 ac_parameter_type_list: T_DOTDOTDOT . $default reduce using rule 340 (ac_parameter_type_list) state 193 346 ac_parameter_declaration: ac_declaration_specifiers . ac_declarator ac_default_arg_init 347 | ac_declaration_specifiers . ac_abstract_declarator ac_default_arg_init T_ID shift, and go to state 6 '(' shift, and go to state 241 '[' shift, and go to state 242 '&' shift, and go to state 243 '$' shift, and go to state 244 '*' shift, and go to state 89 id go to state 245 ac_declarator go to state 246 ac_direct_declarator go to state 247 ac_pointer go to state 248 ac_abstract_declarator go to state 249 ac_direct_abstract_declarator go to state 250 ac_identifier go to state 251 state 194 267 ac_function_definition: T_CONSTRUCTOR id '(' ac_parameter_type_list . ')' ac_opt_base_init_list ac_compound_statement ')' shift, and go to state 252 state 195 341 ac_parameter_type_list: ac_parameter_list . 342 | ac_parameter_list . T_DOTDOTDOT 343 | ac_parameter_list . ',' T_DOTDOTDOT 345 ac_parameter_list: ac_parameter_list . ',' ac_parameter_declaration T_DOTDOTDOT shift, and go to state 253 ',' shift, and go to state 254 $default reduce using rule 341 (ac_parameter_type_list) state 196 344 ac_parameter_list: ac_parameter_declaration . $default reduce using rule 344 (ac_parameter_list) state 197 268 ac_function_definition: T_DESTRUCTOR opt_virtual id '(' . ')' ac_compound_statement ')' shift, and go to state 255 state 198 312 ac_member_declarator: '&' ac_direct_member_declarator . $default reduce using rule 312 (ac_member_declarator) state 199 320 ac_direct_member_declarator: id T_COLONCOLON . id ac_constant_expression_list T_ID shift, and go to state 6 id go to state 256 state 200 280 ac_opt_member_init: '(' . ac_constant_expression ')' $default reduce using rule 357 (@39) ac_constant_expression go to state 257 @39 go to state 258 state 201 279 ac_opt_member_init: '=' . ac_constant_expression $default reduce using rule 357 (@39) ac_constant_expression go to state 259 @39 go to state 258 state 202 269 ac_function_definition: T_MEMBER ac_member_declaration_specifiers ac_member_declarator ac_opt_member_init . ';' ';' shift, and go to state 260 state 203 313 ac_member_declarator: ac_pointer '&' . ac_direct_member_declarator T_ID shift, and go to state 6 id go to state 130 ac_direct_member_declarator go to state 261 state 204 311 ac_member_declarator: ac_pointer ac_direct_member_declarator . $default reduce using rule 311 (ac_member_declarator) state 205 288 ac_member_declaration_specifiers: ac_member_storage_class_specifier ac_type_qualifier ac_type_specifier . $default reduce using rule 288 (ac_member_declaration_specifiers) state 206 270 ac_function_definition: T_ATTR ac_member_declaration_specifiers ac_member_declarator ac_opt_member_init . ';' ';' shift, and go to state 262 state 207 19 baseclass_list: id . $default reduce using rule 19 (baseclass_list) state 208 18 baseclassdeclaration: T_BASECLASS id ':' baseclass_list . ';' 20 baseclass_list: baseclass_list . ',' id ';' shift, and go to state 263 ',' shift, and go to state 264 state 209 266 ac_function_definition: id T_COLONCOLON T_OPERATOR id . '(' ')' ac_opt_const ac_compound_statement '(' shift, and go to state 265 state 210 27 storageoption: '{' '!' error . $default reduce using rule 27 (storageoption) state 211 25 storageoption: '{' '!' id . '}' '}' shift, and go to state 266 state 212 24 storageoption: '{' id '}' . $default reduce using rule 24 (storageoption) state 213 171 pattern: '"' @31 . CexpressionDQ '"' $default reduce using rule 71 (CexpressionDQ) CexpressionDQ go to state 267 state 214 166 pattern: id '(' . patternsoption ')' error shift, and go to state 143 T_ID shift, and go to state 6 T_INT shift, and go to state 144 T_DEFAULT shift, and go to state 145 '"' shift, and go to state 146 '*' shift, and go to state 147 ')' reduce using rule 173 (patternsoption) id go to state 148 integer go to state 149 pattern go to state 150 patternsoption go to state 268 patterns go to state 152 state 215 169 pattern: id '=' . pattern T_ID shift, and go to state 6 T_INT shift, and go to state 144 T_DEFAULT shift, and go to state 145 '"' shift, and go to state 146 '*' shift, and go to state 147 id go to state 148 integer go to state 149 pattern go to state 269 state 216 157 outmostpattern: id '(' patternsoption ')' . provideds T_PROVIDED shift, and go to state 50 $default reduce using rule 161 (provideds) provideds go to state 270 state 217 178 patterns: patterns error . 180 | patterns error . pattern T_ID shift, and go to state 6 T_INT shift, and go to state 144 T_DEFAULT shift, and go to state 145 '"' shift, and go to state 146 '*' shift, and go to state 147 $default reduce using rule 178 (patterns) id go to state 148 integer go to state 149 pattern go to state 271 state 218 176 patterns: patterns ',' . pattern 179 | patterns ',' . error error shift, and go to state 272 T_ID shift, and go to state 6 T_INT shift, and go to state 144 T_DEFAULT shift, and go to state 145 '"' shift, and go to state 146 '*' shift, and go to state 147 id go to state 148 integer go to state 149 pattern go to state 273 state 219 22 phylumdeclaration: id storageoption ':' @2 . productionblock Ccode_option ';' error shift, and go to state 274 T_ID shift, and go to state 6 T_LIST shift, and go to state 275 ';' reduce using rule 28 (productionblock) '{' reduce using rule 28 (productionblock) id go to state 276 productionblock go to state 277 alternatives go to state 278 alternative go to state 279 state 220 205 unparsedeclaration: outmostpatterns T_ARROW error ';' . $default reduce using rule 205 (unparsedeclaration) state 221 138 rwclause: '<' . useviewnames ':' term '>' $default reduce using rule 213 (useviewnames) useviewnames go to state 280 state 222 135 rwdeclaration: outmostpatterns T_ARROW @27 rwclauses . semi_or_error 137 rwclauses: rwclauses . rwclause error shift, and go to state 281 ';' shift, and go to state 282 '<' shift, and go to state 221 rwclause go to state 283 semi_or_error go to state 284 state 223 136 rwclauses: rwclause . $default reduce using rule 136 (rwclauses) state 224 208 unparseclause: '[' . useviewnames ':' unparseitems ']' 209 | '[' . useviewnames ':' error 210 | '[' . error ':' unparseitems ']' 211 | '[' . error ':' error 212 | '[' . error error shift, and go to state 285 T_ID reduce using rule 213 (useviewnames) ':' reduce using rule 213 (useviewnames) useviewnames go to state 286 state 225 204 unparsedeclaration: outmostpatterns T_ARROW @34 unparseclauses . ';' 207 unparseclauses: unparseclauses . unparseclause ';' shift, and go to state 287 '[' shift, and go to state 224 unparseclause go to state 288 state 226 206 unparseclauses: unparseclause . $default reduce using rule 206 (unparseclauses) state 227 338 ac_type_qualifier_list: ac_type_qualifier_list ac_type_qualifier . $default reduce using rule 338 (ac_type_qualifier_list) state 228 336 ac_pointer: '*' ac_type_qualifier_list ac_pointer . $default reduce using rule 336 (ac_pointer) state 229 363 ac_compound_statement: error ';' . @40 ac_compound_statement $default reduce using rule 362 (@40) @40 go to state 289 state 230 90 MainCbody: '{' @9 . MainCBodycontinuation @10 '}' error shift, and go to state 290 T_ID reduce using rule 145 (@28) T_CNEWLINES reduce using rule 100 (Ctext) T_CLINE reduce using rule 100 (Ctext) T_DOLLARVAR reduce using rule 100 (Ctext) T_WITH reduce using rule 100 (Ctext) T_FOREACH reduce using rule 100 (Ctext) T_DEFAULT reduce using rule 145 (@28) '{' reduce using rule 100 (Ctext) '}' reduce using rule 100 (Ctext) '(' reduce using rule 145 (@28) '\n' reduce using rule 100 (Ctext) '"' reduce using rule 100 (Ctext) ''' reduce using rule 100 (Ctext) '$' reduce using rule 145 (@28) '*' reduce using rule 145 (@28) MainCBodycontinuation go to state 291 Ctext go to state 292 patternchains go to state 293 patternchain go to state 294 patternchainitem_lineinfo go to state 295 @28 go to state 296 withcases go to state 297 withcase go to state 298 state 231 328 ac_qualifier: ac_qualifier T_COLONCOLON ac_fn_declarator_id . $default reduce using rule 328 (ac_qualifier) state 232 326 ac_direct_fn_declarator: ac_qualifier '(' error . ')' ac_opt_const ')' shift, and go to state 299 state 233 325 ac_direct_fn_declarator: ac_qualifier '(' ac_parameter_type_list . ')' ac_opt_const ')' shift, and go to state 300 state 234 305 ac_fn_declarator: ac_pointer '&' ac_direct_fn_declarator . $default reduce using rule 305 (ac_fn_declarator) state 235 128 includedeclaration: T_INCLUDESTART includefiles_option @26 T_ENDOFINCLUDESTART T_INCLUDEEND . $default reduce using rule 128 (includedeclaration) state 236 53 Cexpression: Cexpression . Cexpression_elem 164 provideds: T_PROVIDED '(' @29 Cexpression . @30 ')' T_CEXPRESSION shift, and go to state 301 T_DOLLARVAR shift, and go to state 302 '(' shift, and go to state 303 '\n' shift, and go to state 304 '"' shift, and go to state 305 ''' shift, and go to state 306 '[' shift, and go to state 307 $default reduce using rule 163 (@30) dollarvar go to state 308 Cexpression_elem go to state 309 @30 go to state 310 state 237 255 defrviewnames: defrviewnames ',' '(' id . ')' ')' shift, and go to state 311 state 238 253 defrviewnames: defrviewnames '(' id ')' . $default reduce using rule 253 (defrviewnames) state 239 245 defuviewnames: defuviewnames ',' '(' id . ')' ')' shift, and go to state 312 state 240 243 defuviewnames: defuviewnames '(' id ')' . $default reduce using rule 243 (defuviewnames) state 241 317 ac_direct_declarator: '(' . ac_pointer_declarator ')' 351 ac_direct_abstract_declarator: '(' . ac_abstract_declarator ')' 355 | '(' . ac_parameter_type_list ')' T_ID shift, and go to state 6 T_STATIC shift, and go to state 8 T_AUTO shift, and go to state 14 T_REGISTER shift, and go to state 15 T_EXTERN shift, and go to state 16 T_TYPEDEF shift, and go to state 17 T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 T_VIRTUAL shift, and go to state 21 T_DOTDOTDOT shift, and go to state 192 '(' shift, and go to state 313 '[' shift, and go to state 242 '*' shift, and go to state 89 $default reduce using rule 339 (ac_parameter_type_list) id go to state 70 ac_declaration_specifiers go to state 193 ac_storage_class_specifier go to state 42 ac_type_specifier go to state 43 ac_type_qualifier go to state 44 ac_pointer_declarator go to state 314 ac_pointer go to state 315 ac_parameter_type_list go to state 316 ac_parameter_list go to state 195 ac_parameter_declaration go to state 196 ac_abstract_declarator go to state 317 ac_direct_abstract_declarator go to state 250 state 242 353 ac_direct_abstract_declarator: '[' . ac_constant_expression_option ']' $default reduce using rule 357 (@39) ac_constant_expression_option go to state 318 ac_constant_expression go to state 319 @39 go to state 258 state 243 308 ac_declarator: '&' . ac_direct_declarator T_ID shift, and go to state 6 '(' shift, and go to state 320 '$' shift, and go to state 244 id go to state 245 ac_direct_declarator go to state 321 ac_identifier go to state 251 state 244 360 ac_identifier: '$' . id T_ID shift, and go to state 6 id go to state 322 state 245 359 ac_identifier: id . $default reduce using rule 359 (ac_identifier) state 246 346 ac_parameter_declaration: ac_declaration_specifiers ac_declarator . ac_default_arg_init '=' shift, and go to state 323 $default reduce using rule 276 (ac_default_arg_init) ac_default_arg_init go to state 324 state 247 306 ac_declarator: ac_direct_declarator . 318 ac_direct_declarator: ac_direct_declarator . '[' ac_constant_expression_option ']' 319 | ac_direct_declarator . '(' ac_parameter_type_list ')' '(' shift, and go to state 325 '[' shift, and go to state 326 $default reduce using rule 306 (ac_declarator) state 248 307 ac_declarator: ac_pointer . ac_direct_declarator 309 | ac_pointer . '&' ac_direct_declarator 348 ac_abstract_declarator: ac_pointer . 350 | ac_pointer . ac_direct_abstract_declarator T_ID shift, and go to state 6 '(' shift, and go to state 241 '[' shift, and go to state 242 '&' shift, and go to state 327 '$' shift, and go to state 244 $default reduce using rule 348 (ac_abstract_declarator) id go to state 245 ac_direct_declarator go to state 328 ac_direct_abstract_declarator go to state 329 ac_identifier go to state 251 state 249 347 ac_parameter_declaration: ac_declaration_specifiers ac_abstract_declarator . ac_default_arg_init '=' shift, and go to state 323 $default reduce using rule 276 (ac_default_arg_init) ac_default_arg_init go to state 330 state 250 349 ac_abstract_declarator: ac_direct_abstract_declarator . 352 ac_direct_abstract_declarator: ac_direct_abstract_declarator . '[' ac_constant_expression_option ']' 354 | ac_direct_abstract_declarator . '(' ac_parameter_type_list ')' '(' shift, and go to state 331 '[' shift, and go to state 332 $default reduce using rule 349 (ac_abstract_declarator) state 251 316 ac_direct_declarator: ac_identifier . $default reduce using rule 316 (ac_direct_declarator) state 252 267 ac_function_definition: T_CONSTRUCTOR id '(' ac_parameter_type_list ')' . ac_opt_base_init_list ac_compound_statement ':' shift, and go to state 333 $default reduce using rule 271 (ac_opt_base_init_list) ac_opt_base_init_list go to state 334 state 253 342 ac_parameter_type_list: ac_parameter_list T_DOTDOTDOT . $default reduce using rule 342 (ac_parameter_type_list) state 254 343 ac_parameter_type_list: ac_parameter_list ',' . T_DOTDOTDOT 345 ac_parameter_list: ac_parameter_list ',' . ac_parameter_declaration T_ID shift, and go to state 6 T_STATIC shift, and go to state 8 T_AUTO shift, and go to state 14 T_REGISTER shift, and go to state 15 T_EXTERN shift, and go to state 16 T_TYPEDEF shift, and go to state 17 T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 T_VIRTUAL shift, and go to state 21 T_DOTDOTDOT shift, and go to state 335 id go to state 70 ac_declaration_specifiers go to state 193 ac_storage_class_specifier go to state 42 ac_type_specifier go to state 43 ac_type_qualifier go to state 44 ac_parameter_declaration go to state 336 state 255 268 ac_function_definition: T_DESTRUCTOR opt_virtual id '(' ')' . ac_compound_statement error shift, and go to state 167 '{' shift, and go to state 168 MainCbody go to state 169 ac_compound_statement go to state 337 state 256 320 ac_direct_member_declarator: id T_COLONCOLON id . ac_constant_expression_list $default reduce using rule 321 (ac_constant_expression_list) ac_constant_expression_list go to state 338 state 257 280 ac_opt_member_init: '(' ac_constant_expression . ')' ')' shift, and go to state 339 state 258 358 ac_constant_expression: @39 . Cexpression $default reduce using rule 52 (Cexpression) Cexpression go to state 340 state 259 279 ac_opt_member_init: '=' ac_constant_expression . $default reduce using rule 279 (ac_opt_member_init) state 260 269 ac_function_definition: T_MEMBER ac_member_declaration_specifiers ac_member_declarator ac_opt_member_init ';' . $default reduce using rule 269 (ac_function_definition) state 261 313 ac_member_declarator: ac_pointer '&' ac_direct_member_declarator . $default reduce using rule 313 (ac_member_declarator) state 262 270 ac_function_definition: T_ATTR ac_member_declaration_specifiers ac_member_declarator ac_opt_member_init ';' . $default reduce using rule 270 (ac_function_definition) state 263 18 baseclassdeclaration: T_BASECLASS id ':' baseclass_list ';' . $default reduce using rule 18 (baseclassdeclaration) state 264 20 baseclass_list: baseclass_list ',' . id T_ID shift, and go to state 6 id go to state 341 state 265 266 ac_function_definition: id T_COLONCOLON T_OPERATOR id '(' . ')' ac_opt_const ac_compound_statement ')' shift, and go to state 342 state 266 25 storageoption: '{' '!' id '}' . $default reduce using rule 25 (storageoption) state 267 72 CexpressionDQ: CexpressionDQ . CexpressionDQ_elem 171 pattern: '"' @31 CexpressionDQ . '"' T_CEXPRESSION shift, and go to state 343 '\n' shift, and go to state 344 '"' shift, and go to state 345 CexpressionDQ_elem go to state 346 state 268 166 pattern: id '(' patternsoption . ')' ')' shift, and go to state 347 state 269 169 pattern: id '=' pattern . $default reduce using rule 169 (pattern) state 270 157 outmostpattern: id '(' patternsoption ')' provideds . $default reduce using rule 157 (outmostpattern) state 271 180 patterns: patterns error pattern . $default reduce using rule 180 (patterns) state 272 179 patterns: patterns ',' error . $default reduce using rule 179 (patterns) state 273 176 patterns: patterns ',' pattern . $default reduce using rule 176 (patterns) state 274 33 alternatives: error . $default reduce using rule 33 (alternatives) state 275 29 productionblock: T_LIST . id T_ID shift, and go to state 6 id go to state 348 state 276 38 alternative: id . '(' @3 arguments @4 ')' 39 | id . '(' error '(' shift, and go to state 349 state 277 22 phylumdeclaration: id storageoption ':' @2 productionblock . Ccode_option ';' '{' shift, and go to state 350 $default reduce using rule 43 (Ccode_option) Ccode_option go to state 351 state 278 30 productionblock: alternatives . 32 alternatives: alternatives . '|' alternative 34 | alternatives . '|' error 35 | alternatives . error alternative error shift, and go to state 352 '|' shift, and go to state 353 ';' reduce using rule 30 (productionblock) '{' reduce using rule 30 (productionblock) state 279 31 alternatives: alternative . $default reduce using rule 31 (alternatives) state 280 138 rwclause: '<' useviewnames . ':' term '>' 214 useviewnames: useviewnames . id T_ID shift, and go to state 6 ':' shift, and go to state 354 id go to state 355 state 281 140 semi_or_error: error . $default reduce using rule 140 (semi_or_error) state 282 139 semi_or_error: ';' . $default reduce using rule 139 (semi_or_error) state 283 137 rwclauses: rwclauses rwclause . $default reduce using rule 137 (rwclauses) state 284 135 rwdeclaration: outmostpatterns T_ARROW @27 rwclauses semi_or_error . $default reduce using rule 135 (rwdeclaration) state 285 210 unparseclause: '[' error . ':' unparseitems ']' 211 | '[' error . ':' error 212 | '[' error . ':' shift, and go to state 356 $default reduce using rule 212 (unparseclause) state 286 208 unparseclause: '[' useviewnames . ':' unparseitems ']' 209 | '[' useviewnames . ':' error 214 useviewnames: useviewnames . id T_ID shift, and go to state 6 ':' shift, and go to state 357 id go to state 355 state 287 204 unparsedeclaration: outmostpatterns T_ARROW @34 unparseclauses ';' . $default reduce using rule 204 (unparsedeclaration) state 288 207 unparseclauses: unparseclauses unparseclause . $default reduce using rule 207 (unparseclauses) state 289 363 ac_compound_statement: error ';' @40 . ac_compound_statement error shift, and go to state 167 '{' shift, and go to state 168 MainCbody go to state 169 ac_compound_statement go to state 358 state 290 96 MainCBodycontinuation: error . $default reduce using rule 96 (MainCBodycontinuation) state 291 90 MainCbody: '{' @9 MainCBodycontinuation . @10 '}' $default reduce using rule 89 (@10) @10 go to state 359 state 292 94 MainCBodycontinuation: Ctext . 102 Ctext: Ctext . @15 Ctext_elem '}' reduce using rule 94 (MainCBodycontinuation) $default reduce using rule 101 (@15) @15 go to state 360 state 293 142 patternchains: patternchains . ',' patternchain 202 withcase: patternchains . ':' Cbody ':' shift, and go to state 361 ',' shift, and go to state 362 state 294 141 patternchains: patternchain . 144 patternchain: patternchain . '&' patternchainitem_lineinfo '&' shift, and go to state 363 $default reduce using rule 141 (patternchains) state 295 143 patternchain: patternchainitem_lineinfo . $default reduce using rule 143 (patternchain) state 296 146 patternchainitem_lineinfo: @28 . patternchainitem T_ID shift, and go to state 6 T_DEFAULT shift, and go to state 9 '(' shift, and go to state 364 '$' shift, and go to state 365 '*' shift, and go to state 27 id go to state 153 patternchainitem go to state 366 outmostpattern go to state 367 state 297 95 MainCBodycontinuation: withcases . 201 withcases: withcases . withcase '}' reduce using rule 95 (MainCBodycontinuation) $default reduce using rule 145 (@28) patternchains go to state 293 patternchain go to state 294 patternchainitem_lineinfo go to state 295 @28 go to state 296 withcase go to state 368 state 298 200 withcases: withcase . $default reduce using rule 200 (withcases) state 299 326 ac_direct_fn_declarator: ac_qualifier '(' error ')' . ac_opt_const T_CONST shift, and go to state 369 $default reduce using rule 331 (ac_opt_const) ac_opt_const go to state 370 state 300 325 ac_direct_fn_declarator: ac_qualifier '(' ac_parameter_type_list ')' . ac_opt_const T_CONST shift, and go to state 369 $default reduce using rule 331 (ac_opt_const) ac_opt_const go to state 371 state 301 54 Cexpression_elem: T_CEXPRESSION . $default reduce using rule 54 (Cexpression_elem) state 302 1 dollarvar: T_DOLLARVAR . $default reduce using rule 1 (dollarvar) state 303 59 Cexpression_elem: '(' . Cexpression_inner ')' 63 | '(' . error error shift, and go to state 372 T_CEXPRESSION reduce using rule 65 (Cexpression_inner) T_DOLLARVAR reduce using rule 65 (Cexpression_inner) ',' reduce using rule 65 (Cexpression_inner) '(' reduce using rule 65 (Cexpression_inner) ')' reduce using rule 65 (Cexpression_inner) '\n' reduce using rule 65 (Cexpression_inner) '"' reduce using rule 65 (Cexpression_inner) ''' reduce using rule 65 (Cexpression_inner) '[' reduce using rule 65 (Cexpression_inner) Cexpression_inner go to state 373 state 304 56 Cexpression_elem: '\n' . $default reduce using rule 56 (Cexpression_elem) state 305 57 Cexpression_elem: '"' . CexpressionDQ '"' 61 | '"' . error error shift, and go to state 374 T_CEXPRESSION reduce using rule 71 (CexpressionDQ) '\n' reduce using rule 71 (CexpressionDQ) '"' reduce using rule 71 (CexpressionDQ) CexpressionDQ go to state 375 state 306 58 Cexpression_elem: ''' . CexpressionSQ ''' 62 | ''' . error error shift, and go to state 376 T_CEXPRESSION reduce using rule 75 (CexpressionSQ) '\n' reduce using rule 75 (CexpressionSQ) ''' reduce using rule 75 (CexpressionSQ) CexpressionSQ go to state 377 state 307 60 Cexpression_elem: '[' . Cexpression_inner ']' 64 | '[' . error error shift, and go to state 378 T_CEXPRESSION reduce using rule 65 (Cexpression_inner) T_DOLLARVAR reduce using rule 65 (Cexpression_inner) ',' reduce using rule 65 (Cexpression_inner) '(' reduce using rule 65 (Cexpression_inner) '\n' reduce using rule 65 (Cexpression_inner) '"' reduce using rule 65 (Cexpression_inner) ''' reduce using rule 65 (Cexpression_inner) '[' reduce using rule 65 (Cexpression_inner) ']' reduce using rule 65 (Cexpression_inner) Cexpression_inner go to state 379 state 308 55 Cexpression_elem: dollarvar . $default reduce using rule 55 (Cexpression_elem) state 309 53 Cexpression: Cexpression Cexpression_elem . $default reduce using rule 53 (Cexpression) state 310 164 provideds: T_PROVIDED '(' @29 Cexpression @30 . ')' ')' shift, and go to state 380 state 311 255 defrviewnames: defrviewnames ',' '(' id ')' . $default reduce using rule 255 (defrviewnames) state 312 245 defuviewnames: defuviewnames ',' '(' id ')' . $default reduce using rule 245 (defuviewnames) state 313 351 ac_direct_abstract_declarator: '(' . ac_abstract_declarator ')' 355 | '(' . ac_parameter_type_list ')' T_ID shift, and go to state 6 T_STATIC shift, and go to state 8 T_AUTO shift, and go to state 14 T_REGISTER shift, and go to state 15 T_EXTERN shift, and go to state 16 T_TYPEDEF shift, and go to state 17 T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 T_VIRTUAL shift, and go to state 21 T_DOTDOTDOT shift, and go to state 192 '(' shift, and go to state 313 '[' shift, and go to state 242 '*' shift, and go to state 89 $default reduce using rule 339 (ac_parameter_type_list) id go to state 70 ac_declaration_specifiers go to state 193 ac_storage_class_specifier go to state 42 ac_type_specifier go to state 43 ac_type_qualifier go to state 44 ac_pointer go to state 381 ac_parameter_type_list go to state 316 ac_parameter_list go to state 195 ac_parameter_declaration go to state 196 ac_abstract_declarator go to state 317 ac_direct_abstract_declarator go to state 250 state 314 317 ac_direct_declarator: '(' ac_pointer_declarator . ')' ')' shift, and go to state 382 state 315 314 ac_pointer_declarator: ac_pointer . ac_direct_declarator 315 | ac_pointer . '&' ac_direct_declarator 348 ac_abstract_declarator: ac_pointer . 350 | ac_pointer . ac_direct_abstract_declarator T_ID shift, and go to state 6 '(' shift, and go to state 241 '[' shift, and go to state 242 '&' shift, and go to state 383 '$' shift, and go to state 244 $default reduce using rule 348 (ac_abstract_declarator) id go to state 245 ac_direct_declarator go to state 384 ac_direct_abstract_declarator go to state 329 ac_identifier go to state 251 state 316 355 ac_direct_abstract_declarator: '(' ac_parameter_type_list . ')' ')' shift, and go to state 385 state 317 351 ac_direct_abstract_declarator: '(' ac_abstract_declarator . ')' ')' shift, and go to state 386 state 318 353 ac_direct_abstract_declarator: '[' ac_constant_expression_option . ']' ']' shift, and go to state 387 state 319 356 ac_constant_expression_option: ac_constant_expression . $default reduce using rule 356 (ac_constant_expression_option) state 320 317 ac_direct_declarator: '(' . ac_pointer_declarator ')' '*' shift, and go to state 89 ac_pointer_declarator go to state 314 ac_pointer go to state 388 state 321 308 ac_declarator: '&' ac_direct_declarator . 318 ac_direct_declarator: ac_direct_declarator . '[' ac_constant_expression_option ']' 319 | ac_direct_declarator . '(' ac_parameter_type_list ')' '(' shift, and go to state 325 '[' shift, and go to state 326 $default reduce using rule 308 (ac_declarator) state 322 360 ac_identifier: '$' id . $default reduce using rule 360 (ac_identifier) state 323 277 ac_default_arg_init: '=' . ac_constant_expression $default reduce using rule 357 (@39) ac_constant_expression go to state 389 @39 go to state 258 state 324 346 ac_parameter_declaration: ac_declaration_specifiers ac_declarator ac_default_arg_init . $default reduce using rule 346 (ac_parameter_declaration) state 325 319 ac_direct_declarator: ac_direct_declarator '(' . ac_parameter_type_list ')' T_ID shift, and go to state 6 T_STATIC shift, and go to state 8 T_AUTO shift, and go to state 14 T_REGISTER shift, and go to state 15 T_EXTERN shift, and go to state 16 T_TYPEDEF shift, and go to state 17 T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 T_VIRTUAL shift, and go to state 21 T_DOTDOTDOT shift, and go to state 192 $default reduce using rule 339 (ac_parameter_type_list) id go to state 70 ac_declaration_specifiers go to state 193 ac_storage_class_specifier go to state 42 ac_type_specifier go to state 43 ac_type_qualifier go to state 44 ac_parameter_type_list go to state 390 ac_parameter_list go to state 195 ac_parameter_declaration go to state 196 state 326 318 ac_direct_declarator: ac_direct_declarator '[' . ac_constant_expression_option ']' $default reduce using rule 357 (@39) ac_constant_expression_option go to state 391 ac_constant_expression go to state 319 @39 go to state 258 state 327 309 ac_declarator: ac_pointer '&' . ac_direct_declarator T_ID shift, and go to state 6 '(' shift, and go to state 320 '$' shift, and go to state 244 id go to state 245 ac_direct_declarator go to state 392 ac_identifier go to state 251 state 328 307 ac_declarator: ac_pointer ac_direct_declarator . 318 ac_direct_declarator: ac_direct_declarator . '[' ac_constant_expression_option ']' 319 | ac_direct_declarator . '(' ac_parameter_type_list ')' '(' shift, and go to state 325 '[' shift, and go to state 326 $default reduce using rule 307 (ac_declarator) state 329 350 ac_abstract_declarator: ac_pointer ac_direct_abstract_declarator . 352 ac_direct_abstract_declarator: ac_direct_abstract_declarator . '[' ac_constant_expression_option ']' 354 | ac_direct_abstract_declarator . '(' ac_parameter_type_list ')' '(' shift, and go to state 331 '[' shift, and go to state 332 $default reduce using rule 350 (ac_abstract_declarator) state 330 347 ac_parameter_declaration: ac_declaration_specifiers ac_abstract_declarator ac_default_arg_init . $default reduce using rule 347 (ac_parameter_declaration) state 331 354 ac_direct_abstract_declarator: ac_direct_abstract_declarator '(' . ac_parameter_type_list ')' T_ID shift, and go to state 6 T_STATIC shift, and go to state 8 T_AUTO shift, and go to state 14 T_REGISTER shift, and go to state 15 T_EXTERN shift, and go to state 16 T_TYPEDEF shift, and go to state 17 T_CONST shift, and go to state 18 T_VOLATILE shift, and go to state 19 T_UNSIGNED shift, and go to state 20 T_VIRTUAL shift, and go to state 21 T_DOTDOTDOT shift, and go to state 192 $default reduce using rule 339 (ac_parameter_type_list) id go to state 70 ac_declaration_specifiers go to state 193 ac_storage_class_specifier go to state 42 ac_type_specifier go to state 43 ac_type_qualifier go to state 44 ac_parameter_type_list go to state 393 ac_parameter_list go to state 195 ac_parameter_declaration go to state 196 state 332 352 ac_direct_abstract_declarator: ac_direct_abstract_declarator '[' . ac_constant_expression_option ']' $default reduce using rule 357 (@39) ac_constant_expression_option go to state 394 ac_constant_expression go to state 319 @39 go to state 258 state 333 272 ac_opt_base_init_list: ':' . ac_base_init_list T_ID shift, and go to state 6 id go to state 395 ac_base_init_list go to state 396 ac_base_init go to state 397 state 334 267 ac_function_definition: T_CONSTRUCTOR id '(' ac_parameter_type_list ')' ac_opt_base_init_list . ac_compound_statement error shift, and go to state 167 '{' shift, and go to state 168 MainCbody go to state 169 ac_compound_statement go to state 398 state 335 343 ac_parameter_type_list: ac_parameter_list ',' T_DOTDOTDOT . $default reduce using rule 343 (ac_parameter_type_list) state 336 345 ac_parameter_list: ac_parameter_list ',' ac_parameter_declaration . $default reduce using rule 345 (ac_parameter_list) state 337 268 ac_function_definition: T_DESTRUCTOR opt_virtual id '(' ')' ac_compound_statement . $default reduce using rule 268 (ac_function_definition) state 338 320 ac_direct_member_declarator: id T_COLONCOLON id ac_constant_expression_list . 322 ac_constant_expression_list: ac_constant_expression_list . '[' ac_constant_expression ']' '[' shift, and go to state 399 $default reduce using rule 320 (ac_direct_member_declarator) state 339 280 ac_opt_member_init: '(' ac_constant_expression ')' . $default reduce using rule 280 (ac_opt_member_init) state 340 53 Cexpression: Cexpression . Cexpression_elem 358 ac_constant_expression: @39 Cexpression . T_CEXPRESSION shift, and go to state 301 T_DOLLARVAR shift, and go to state 302 '(' shift, and go to state 303 '\n' shift, and go to state 304 '"' shift, and go to state 305 ''' shift, and go to state 306 '[' shift, and go to state 307 $default reduce using rule 358 (ac_constant_expression) dollarvar go to state 308 Cexpression_elem go to state 309 state 341 20 baseclass_list: baseclass_list ',' id . $default reduce using rule 20 (baseclass_list) state 342 266 ac_function_definition: id T_COLONCOLON T_OPERATOR id '(' ')' . ac_opt_const ac_compound_statement T_CONST shift, and go to state 369 $default reduce using rule 331 (ac_opt_const) ac_opt_const go to state 400 state 343 73 CexpressionDQ_elem: T_CEXPRESSION . $default reduce using rule 73 (CexpressionDQ_elem) state 344 74 CexpressionDQ_elem: '\n' . $default reduce using rule 74 (CexpressionDQ_elem) state 345 171 pattern: '"' @31 CexpressionDQ '"' . $default reduce using rule 171 (pattern) state 346 72 CexpressionDQ: CexpressionDQ CexpressionDQ_elem . $default reduce using rule 72 (CexpressionDQ) state 347 166 pattern: id '(' patternsoption ')' . $default reduce using rule 166 (pattern) state 348 29 productionblock: T_LIST id . $default reduce using rule 29 (productionblock) state 349 38 alternative: id '(' . @3 arguments @4 ')' 39 | id '(' . error error shift, and go to state 401 T_ID reduce using rule 36 (@3) ')' reduce using rule 36 (@3) @3 go to state 402 state 350 44 Ccode_option: '{' . attributes_option init_option '}' 45 | '{' . error error shift, and go to state 403 T_ID reduce using rule 46 (attributes_option) '{' reduce using rule 46 (attributes_option) '}' reduce using rule 46 (attributes_option) attributes_option go to state 404 state 351 22 phylumdeclaration: id storageoption ':' @2 productionblock Ccode_option . ';' ';' shift, and go to state 405 state 352 35 alternatives: alternatives error . alternative T_ID shift, and go to state 6 id go to state 276 alternative go to state 406 state 353 32 alternatives: alternatives '|' . alternative 34 | alternatives '|' . error error shift, and go to state 407 T_ID shift, and go to state 6 id go to state 276 alternative go to state 408 state 354 138 rwclause: '<' useviewnames ':' . term '>' T_ID shift, and go to state 6 T_INT shift, and go to state 144 '"' shift, and go to state 409 ''' shift, and go to state 410 id go to state 411 integer go to state 412 term go to state 413 state 355 214 useviewnames: useviewnames id . $default reduce using rule 214 (useviewnames) state 356 210 unparseclause: '[' error ':' . unparseitems ']' 211 | '[' error ':' . error error shift, and go to state 414 T_ID reduce using rule 215 (unparseitems) T_DOLLARVAR reduce using rule 215 (unparseitems) T_UNPBLOCKSTART reduce using rule 215 (unparseitems) T_PERCENTUVIEWVAR reduce using rule 215 (unparseitems) '{' reduce using rule 215 (unparseitems) '(' reduce using rule 215 (unparseitems) '"' reduce using rule 215 (unparseitems) ']' reduce using rule 215 (unparseitems) '<' reduce using rule 215 (unparseitems) unparseitems go to state 415 state 357 208 unparseclause: '[' useviewnames ':' . unparseitems ']' 209 | '[' useviewnames ':' . error error shift, and go to state 416 T_ID reduce using rule 215 (unparseitems) T_DOLLARVAR reduce using rule 215 (unparseitems) T_UNPBLOCKSTART reduce using rule 215 (unparseitems) T_PERCENTUVIEWVAR reduce using rule 215 (unparseitems) '{' reduce using rule 215 (unparseitems) '(' reduce using rule 215 (unparseitems) '"' reduce using rule 215 (unparseitems) ']' reduce using rule 215 (unparseitems) '<' reduce using rule 215 (unparseitems) unparseitems go to state 417 state 358 363 ac_compound_statement: error ';' @40 ac_compound_statement . $default reduce using rule 363 (ac_compound_statement) state 359 90 MainCbody: '{' @9 MainCBodycontinuation @10 . '}' '}' shift, and go to state 418 state 360 102 Ctext: Ctext @15 . Ctext_elem T_CNEWLINES shift, and go to state 419 T_CLINE shift, and go to state 420 T_DOLLARVAR shift, and go to state 302 T_WITH shift, and go to state 421 T_FOREACH shift, and go to state 422 '{' shift, and go to state 423 '\n' shift, and go to state 424 '"' shift, and go to state 425 ''' shift, and go to state 426 dollarvar go to state 427 Cbody go to state 428 Ctext_elem go to state 429 state 361 202 withcase: patternchains ':' . Cbody '{' shift, and go to state 423 Cbody go to state 430 state 362 142 patternchains: patternchains ',' . patternchain $default reduce using rule 145 (@28) patternchain go to state 431 patternchainitem_lineinfo go to state 295 @28 go to state 296 state 363 144 patternchain: patternchain '&' . patternchainitem_lineinfo $default reduce using rule 145 (@28) patternchainitem_lineinfo go to state 432 @28 go to state 296 state 364 148 patternchainitem: '(' . patternchains ')' $default reduce using rule 145 (@28) patternchains go to state 433 patternchain go to state 294 patternchainitem_lineinfo go to state 295 @28 go to state 296 state 365 149 patternchainitem: '$' . id T_ID shift, and go to state 6 id go to state 434 state 366 146 patternchainitem_lineinfo: @28 patternchainitem . $default reduce using rule 146 (patternchainitem_lineinfo) state 367 147 patternchainitem: outmostpattern . $default reduce using rule 147 (patternchainitem) state 368 201 withcases: withcases withcase . $default reduce using rule 201 (withcases) state 369 332 ac_opt_const: T_CONST . $default reduce using rule 332 (ac_opt_const) state 370 326 ac_direct_fn_declarator: ac_qualifier '(' error ')' ac_opt_const . $default reduce using rule 326 (ac_direct_fn_declarator) state 371 325 ac_direct_fn_declarator: ac_qualifier '(' ac_parameter_type_list ')' ac_opt_const . $default reduce using rule 325 (ac_direct_fn_declarator) state 372 63 Cexpression_elem: '(' error . $default reduce using rule 63 (Cexpression_elem) state 373 59 Cexpression_elem: '(' Cexpression_inner . ')' 66 Cexpression_inner: Cexpression_inner . Cexpression_elem_inner T_CEXPRESSION shift, and go to state 301 T_DOLLARVAR shift, and go to state 302 ',' shift, and go to state 435 '(' shift, and go to state 303 ')' shift, and go to state 436 '\n' shift, and go to state 304 '"' shift, and go to state 305 ''' shift, and go to state 306 '[' shift, and go to state 307 dollarvar go to state 308 Cexpression_elem go to state 437 Cexpression_elem_inner go to state 438 state 374 61 Cexpression_elem: '"' error . $default reduce using rule 61 (Cexpression_elem) state 375 57 Cexpression_elem: '"' CexpressionDQ . '"' 72 CexpressionDQ: CexpressionDQ . CexpressionDQ_elem T_CEXPRESSION shift, and go to state 343 '\n' shift, and go to state 344 '"' shift, and go to state 439 CexpressionDQ_elem go to state 346 state 376 62 Cexpression_elem: ''' error . $default reduce using rule 62 (Cexpression_elem) state 377 58 Cexpression_elem: ''' CexpressionSQ . ''' 76 CexpressionSQ: CexpressionSQ . CexpressionSQ_elem T_CEXPRESSION shift, and go to state 440 '\n' shift, and go to state 441 ''' shift, and go to state 442 CexpressionSQ_elem go to state 443 state 378 64 Cexpression_elem: '[' error . $default reduce using rule 64 (Cexpression_elem) state 379 60 Cexpression_elem: '[' Cexpression_inner . ']' 66 Cexpression_inner: Cexpression_inner . Cexpression_elem_inner T_CEXPRESSION shift, and go to state 301 T_DOLLARVAR shift, and go to state 302 ',' shift, and go to state 435 '(' shift, and go to state 303 '\n' shift, and go to state 304 '"' shift, and go to state 305 ''' shift, and go to state 306 '[' shift, and go to state 307 ']' shift, and go to state 444 dollarvar go to state 308 Cexpression_elem go to state 437 Cexpression_elem_inner go to state 438 state 380 164 provideds: T_PROVIDED '(' @29 Cexpression @30 ')' . $default reduce using rule 164 (provideds) state 381 348 ac_abstract_declarator: ac_pointer . 350 | ac_pointer . ac_direct_abstract_declarator '(' shift, and go to state 313 '[' shift, and go to state 242 $default reduce using rule 348 (ac_abstract_declarator) ac_direct_abstract_declarator go to state 329 state 382 317 ac_direct_declarator: '(' ac_pointer_declarator ')' . $default reduce using rule 317 (ac_direct_declarator) state 383 315 ac_pointer_declarator: ac_pointer '&' . ac_direct_declarator T_ID shift, and go to state 6 '(' shift, and go to state 320 '$' shift, and go to state 244 id go to state 245 ac_direct_declarator go to state 445 ac_identifier go to state 251 state 384 314 ac_pointer_declarator: ac_pointer ac_direct_declarator . 318 ac_direct_declarator: ac_direct_declarator . '[' ac_constant_expression_option ']' 319 | ac_direct_declarator . '(' ac_parameter_type_list ')' '(' shift, and go to state 325 '[' shift, and go to state 326 $default reduce using rule 314 (ac_pointer_declarator) state 385 355 ac_direct_abstract_declarator: '(' ac_parameter_type_list ')' . $default reduce using rule 355 (ac_direct_abstract_declarator) state 386 351 ac_direct_abstract_declarator: '(' ac_abstract_declarator ')' . $default reduce using rule 351 (ac_direct_abstract_declarator) state 387 353 ac_direct_abstract_declarator: '[' ac_constant_expression_option ']' . $default reduce using rule 353 (ac_direct_abstract_declarator) state 388 314 ac_pointer_declarator: ac_pointer . ac_direct_declarator 315 | ac_pointer . '&' ac_direct_declarator T_ID shift, and go to state 6 '(' shift, and go to state 320 '&' shift, and go to state 383 '$' shift, and go to state 244 id go to state 245 ac_direct_declarator go to state 384 ac_identifier go to state 251 state 389 277 ac_default_arg_init: '=' ac_constant_expression . $default reduce using rule 277 (ac_default_arg_init) state 390 319 ac_direct_declarator: ac_direct_declarator '(' ac_parameter_type_list . ')' ')' shift, and go to state 446 state 391 318 ac_direct_declarator: ac_direct_declarator '[' ac_constant_expression_option . ']' ']' shift, and go to state 447 state 392 309 ac_declarator: ac_pointer '&' ac_direct_declarator . 318 ac_direct_declarator: ac_direct_declarator . '[' ac_constant_expression_option ']' 319 | ac_direct_declarator . '(' ac_parameter_type_list ')' '(' shift, and go to state 325 '[' shift, and go to state 326 $default reduce using rule 309 (ac_declarator) state 393 354 ac_direct_abstract_declarator: ac_direct_abstract_declarator '(' ac_parameter_type_list . ')' ')' shift, and go to state 448 state 394 352 ac_direct_abstract_declarator: ac_direct_abstract_declarator '[' ac_constant_expression_option . ']' ']' shift, and go to state 449 state 395 275 ac_base_init: id . '(' ac_constant_expression_init_list ')' '(' shift, and go to state 450 state 396 272 ac_opt_base_init_list: ':' ac_base_init_list . 274 ac_base_init_list: ac_base_init_list . ',' ac_base_init ',' shift, and go to state 451 $default reduce using rule 272 (ac_opt_base_init_list) state 397 273 ac_base_init_list: ac_base_init . $default reduce using rule 273 (ac_base_init_list) state 398 267 ac_function_definition: T_CONSTRUCTOR id '(' ac_parameter_type_list ')' ac_opt_base_init_list ac_compound_statement . $default reduce using rule 267 (ac_function_definition) state 399 322 ac_constant_expression_list: ac_constant_expression_list '[' . ac_constant_expression ']' $default reduce using rule 357 (@39) ac_constant_expression go to state 452 @39 go to state 258 state 400 266 ac_function_definition: id T_COLONCOLON T_OPERATOR id '(' ')' ac_opt_const . ac_compound_statement error shift, and go to state 167 '{' shift, and go to state 168 MainCbody go to state 169 ac_compound_statement go to state 453 state 401 39 alternative: id '(' error . $default reduce using rule 39 (alternative) state 402 38 alternative: id '(' @3 . arguments @4 ')' $default reduce using rule 40 (arguments) arguments go to state 454 state 403 45 Ccode_option: '{' error . $default reduce using rule 45 (Ccode_option) state 404 44 Ccode_option: '{' attributes_option . init_option '}' 47 attributes_option: attributes_option . attribute T_ID shift, and go to state 6 '{' shift, and go to state 423 $default reduce using rule 125 (init_option) id go to state 455 attribute go to state 456 Cbody go to state 457 init_option go to state 458 state 405 22 phylumdeclaration: id storageoption ':' @2 productionblock Ccode_option ';' . $default reduce using rule 22 (phylumdeclaration) state 406 35 alternatives: alternatives error alternative . $default reduce using rule 35 (alternatives) state 407 34 alternatives: alternatives '|' error . $default reduce using rule 34 (alternatives) state 408 32 alternatives: alternatives '|' alternative . $default reduce using rule 32 (alternatives) state 409 190 term: '"' . @33 CexpressionDQ '"' $default reduce using rule 189 (@33) @33 go to state 459 state 410 188 term: ''' . @32 CexpressionSQ ''' $default reduce using rule 187 (@32) @32 go to state 460 state 411 181 term: id . 182 | id . '(' termsoption ')' '(' shift, and go to state 461 $default reduce using rule 181 (term) state 412 191 term: integer . $default reduce using rule 191 (term) state 413 138 rwclause: '<' useviewnames ':' term . '>' 183 term: term . T_ARROW id '(' termsoption ')' 184 | term . '.' id '(' termsoption ')' 185 | term . T_ARROW id 186 | term . '.' id T_ARROW shift, and go to state 462 '>' shift, and go to state 463 '.' shift, and go to state 464 state 414 211 unparseclause: '[' error ':' error . $default reduce using rule 211 (unparseclause) state 415 210 unparseclause: '[' error ':' unparseitems . ']' 216 unparseitems: unparseitems . unparseitem T_PERCENTUVIEWVAR shift, and go to state 465 ']' shift, and go to state 466 '<' shift, and go to state 467 $default reduce using rule 365 (languageoption) unparseitem go to state 468 languageoption go to state 469 state 416 209 unparseclause: '[' useviewnames ':' error . $default reduce using rule 209 (unparseclause) state 417 208 unparseclause: '[' useviewnames ':' unparseitems . ']' 216 unparseitems: unparseitems . unparseitem T_PERCENTUVIEWVAR shift, and go to state 465 ']' shift, and go to state 470 '<' shift, and go to state 467 $default reduce using rule 365 (languageoption) unparseitem go to state 468 languageoption go to state 469 state 418 90 MainCbody: '{' @9 MainCBodycontinuation @10 '}' . $default reduce using rule 90 (MainCbody) state 419 106 Ctext_elem: T_CNEWLINES . $default reduce using rule 106 (Ctext_elem) state 420 103 Ctext_elem: T_CLINE . $default reduce using rule 103 (Ctext_elem) state 421 117 Ctext_elem: T_WITH . @19 '(' @20 withCexpressions @21 ')' '{' withcases '}' $default reduce using rule 114 (@19) @19 go to state 471 state 422 113 Ctext_elem: T_FOREACH . @18 foreach_continuation $default reduce using rule 112 (@18) @18 go to state 472 state 423 99 Cbody: '{' . @13 Ctext @14 '}' $default reduce using rule 97 (@13) @13 go to state 473 state 424 105 Ctext_elem: '\n' . $default reduce using rule 105 (Ctext_elem) state 425 108 Ctext_elem: '"' . @16 CexpressionDQ '"' $default reduce using rule 107 (@16) @16 go to state 474 state 426 110 Ctext_elem: ''' . @17 CexpressionSQ ''' $default reduce using rule 109 (@17) @17 go to state 475 state 427 104 Ctext_elem: dollarvar . $default reduce using rule 104 (Ctext_elem) state 428 111 Ctext_elem: Cbody . $default reduce using rule 111 (Ctext_elem) state 429 102 Ctext: Ctext @15 Ctext_elem . $default reduce using rule 102 (Ctext) state 430 202 withcase: patternchains ':' Cbody . $default reduce using rule 202 (withcase) state 431 142 patternchains: patternchains ',' patternchain . 144 patternchain: patternchain . '&' patternchainitem_lineinfo '&' shift, and go to state 363 $default reduce using rule 142 (patternchains) state 432 144 patternchain: patternchain '&' patternchainitem_lineinfo . $default reduce using rule 144 (patternchain) state 433 142 patternchains: patternchains . ',' patternchain 148 patternchainitem: '(' patternchains . ')' ',' shift, and go to state 362 ')' shift, and go to state 476 state 434 149 patternchainitem: '$' id . $default reduce using rule 149 (patternchainitem) state 435 68 Cexpression_elem_inner: ',' . $default reduce using rule 68 (Cexpression_elem_inner) state 436 59 Cexpression_elem: '(' Cexpression_inner ')' . $default reduce using rule 59 (Cexpression_elem) state 437 67 Cexpression_elem_inner: Cexpression_elem . $default reduce using rule 67 (Cexpression_elem_inner) state 438 66 Cexpression_inner: Cexpression_inner Cexpression_elem_inner . $default reduce using rule 66 (Cexpression_inner) state 439 57 Cexpression_elem: '"' CexpressionDQ '"' . $default reduce using rule 57 (Cexpression_elem) state 440 77 CexpressionSQ_elem: T_CEXPRESSION . $default reduce using rule 77 (CexpressionSQ_elem) state 441 78 CexpressionSQ_elem: '\n' . $default reduce using rule 78 (CexpressionSQ_elem) state 442 58 Cexpression_elem: ''' CexpressionSQ ''' . $default reduce using rule 58 (Cexpression_elem) state 443 76 CexpressionSQ: CexpressionSQ CexpressionSQ_elem . $default reduce using rule 76 (CexpressionSQ) state 444 60 Cexpression_elem: '[' Cexpression_inner ']' . $default reduce using rule 60 (Cexpression_elem) state 445 315 ac_pointer_declarator: ac_pointer '&' ac_direct_declarator . 318 ac_direct_declarator: ac_direct_declarator . '[' ac_constant_expression_option ']' 319 | ac_direct_declarator . '(' ac_parameter_type_list ')' '(' shift, and go to state 325 '[' shift, and go to state 326 $default reduce using rule 315 (ac_pointer_declarator) state 446 319 ac_direct_declarator: ac_direct_declarator '(' ac_parameter_type_list ')' . $default reduce using rule 319 (ac_direct_declarator) state 447 318 ac_direct_declarator: ac_direct_declarator '[' ac_constant_expression_option ']' . $default reduce using rule 318 (ac_direct_declarator) state 448 354 ac_direct_abstract_declarator: ac_direct_abstract_declarator '(' ac_parameter_type_list ')' . $default reduce using rule 354 (ac_direct_abstract_declarator) state 449 352 ac_direct_abstract_declarator: ac_direct_abstract_declarator '[' ac_constant_expression_option ']' . $default reduce using rule 352 (ac_direct_abstract_declarator) state 450 275 ac_base_init: id '(' . ac_constant_expression_init_list ')' $default reduce using rule 357 (@39) ac_constant_expression_init_list go to state 477 ac_constant_expression go to state 478 @39 go to state 258 state 451 274 ac_base_init_list: ac_base_init_list ',' . ac_base_init T_ID shift, and go to state 6 id go to state 395 ac_base_init go to state 479 state 452 322 ac_constant_expression_list: ac_constant_expression_list '[' ac_constant_expression . ']' ']' shift, and go to state 480 state 453 266 ac_function_definition: id T_COLONCOLON T_OPERATOR id '(' ')' ac_opt_const ac_compound_statement . $default reduce using rule 266 (ac_function_definition) state 454 38 alternative: id '(' @3 arguments . @4 ')' 41 arguments: arguments . id 42 | arguments . T_ID ':' id T_ID shift, and go to state 481 $default reduce using rule 37 (@4) id go to state 482 @4 go to state 483 state 455 48 attribute: id . id attribute_init_option ';' T_ID shift, and go to state 6 id go to state 484 state 456 47 attributes_option: attributes_option attribute . $default reduce using rule 47 (attributes_option) state 457 126 init_option: Cbody . $default reduce using rule 126 (init_option) state 458 44 Ccode_option: '{' attributes_option init_option . '}' '}' shift, and go to state 485 state 459 190 term: '"' @33 . CexpressionDQ '"' $default reduce using rule 71 (CexpressionDQ) CexpressionDQ go to state 486 state 460 188 term: ''' @32 . CexpressionSQ ''' $default reduce using rule 75 (CexpressionSQ) CexpressionSQ go to state 487 state 461 182 term: id '(' . termsoption ')' error shift, and go to state 488 T_ID shift, and go to state 6 T_INT shift, and go to state 144 '"' shift, and go to state 409 ''' shift, and go to state 410 ')' reduce using rule 192 (termsoption) id go to state 411 integer go to state 412 term go to state 489 termsoption go to state 490 terms go to state 491 state 462 183 term: term T_ARROW . id '(' termsoption ')' 185 | term T_ARROW . id T_ID shift, and go to state 6 id go to state 492 state 463 138 rwclause: '<' useviewnames ':' term '>' . $default reduce using rule 138 (rwclause) state 464 184 term: term '.' . id '(' termsoption ')' 186 | term '.' . id T_ID shift, and go to state 6 id go to state 493 state 465 225 unparseitem: T_PERCENTUVIEWVAR . id id @37 Cexpression @38 ';' T_ID shift, and go to state 6 id go to state 494 state 466 210 unparseclause: '[' error ':' unparseitems ']' . $default reduce using rule 210 (unparseclause) state 467 364 languageoption: '<' . languageoptions '>' ':' error shift, and go to state 495 T_ID shift, and go to state 6 id go to state 496 languageoptions go to state 497 state 468 216 unparseitems: unparseitems unparseitem . $default reduce using rule 216 (unparseitems) state 469 219 unparseitem: languageoption . '"' @35 CexpressionDQ quote_or_error @36 viewnameoption 220 | languageoption . unpsubterm viewnameoption 221 | languageoption . Cbody 222 | languageoption . T_UNPBLOCKSTART unparseitems T_UNPBLOCKEND T_ID shift, and go to state 6 T_DOLLARVAR shift, and go to state 302 T_UNPBLOCKSTART shift, and go to state 498 '{' shift, and go to state 423 '(' shift, and go to state 499 '"' shift, and go to state 500 dollarvar go to state 501 id go to state 502 Cbody go to state 503 unpsubterm go to state 504 state 470 208 unparseclause: '[' useviewnames ':' unparseitems ']' . $default reduce using rule 208 (unparseclause) state 471 117 Ctext_elem: T_WITH @19 . '(' @20 withCexpressions @21 ')' '{' withcases '}' '(' shift, and go to state 505 state 472 113 Ctext_elem: T_FOREACH @18 . foreach_continuation '(' shift, and go to state 506 foreach_continuation go to state 507 state 473 99 Cbody: '{' @13 . Ctext @14 '}' $default reduce using rule 100 (Ctext) Ctext go to state 508 state 474 108 Ctext_elem: '"' @16 . CexpressionDQ '"' $default reduce using rule 71 (CexpressionDQ) CexpressionDQ go to state 509 state 475 110 Ctext_elem: ''' @17 . CexpressionSQ ''' $default reduce using rule 75 (CexpressionSQ) CexpressionSQ go to state 510 state 476 148 patternchainitem: '(' patternchains ')' . $default reduce using rule 148 (patternchainitem) state 477 275 ac_base_init: id '(' ac_constant_expression_init_list . ')' 324 ac_constant_expression_init_list: ac_constant_expression_init_list . ',' ac_constant_expression ',' shift, and go to state 511 ')' shift, and go to state 512 state 478 323 ac_constant_expression_init_list: ac_constant_expression . $default reduce using rule 323 (ac_constant_expression_init_list) state 479 274 ac_base_init_list: ac_base_init_list ',' ac_base_init . $default reduce using rule 274 (ac_base_init_list) state 480 322 ac_constant_expression_list: ac_constant_expression_list '[' ac_constant_expression ']' . $default reduce using rule 322 (ac_constant_expression_list) state 481 2 id: T_ID . 42 arguments: arguments T_ID . ':' id ':' shift, and go to state 513 $default reduce using rule 2 (id) state 482 41 arguments: arguments id . $default reduce using rule 41 (arguments) state 483 38 alternative: id '(' @3 arguments @4 . ')' ')' shift, and go to state 514 state 484 48 attribute: id id . attribute_init_option ';' '=' shift, and go to state 515 $default reduce using rule 49 (attribute_init_option) attribute_init_option go to state 516 state 485 44 Ccode_option: '{' attributes_option init_option '}' . $default reduce using rule 44 (Ccode_option) state 486 72 CexpressionDQ: CexpressionDQ . CexpressionDQ_elem 190 term: '"' @33 CexpressionDQ . '"' T_CEXPRESSION shift, and go to state 343 '\n' shift, and go to state 344 '"' shift, and go to state 517 CexpressionDQ_elem go to state 346 state 487 76 CexpressionSQ: CexpressionSQ . CexpressionSQ_elem 188 term: ''' @32 CexpressionSQ . ''' T_CEXPRESSION shift, and go to state 440 '\n' shift, and go to state 441 ''' shift, and go to state 518 CexpressionSQ_elem go to state 443 state 488 196 terms: error . $default reduce using rule 196 (terms) state 489 183 term: term . T_ARROW id '(' termsoption ')' 184 | term . '.' id '(' termsoption ')' 185 | term . T_ARROW id 186 | term . '.' id 194 terms: term . T_ARROW shift, and go to state 462 '.' shift, and go to state 464 $default reduce using rule 194 (terms) state 490 182 term: id '(' termsoption . ')' ')' shift, and go to state 519 state 491 193 termsoption: terms . 195 terms: terms . ',' term 197 | terms . error 198 | terms . ',' error 199 | terms . error term error shift, and go to state 520 ',' shift, and go to state 521 ')' reduce using rule 193 (termsoption) state 492 183 term: term T_ARROW id . '(' termsoption ')' 185 | term T_ARROW id . '(' shift, and go to state 522 $default reduce using rule 185 (term) state 493 184 term: term '.' id . '(' termsoption ')' 186 | term '.' id . '(' shift, and go to state 523 $default reduce using rule 186 (term) state 494 225 unparseitem: T_PERCENTUVIEWVAR id . id @37 Cexpression @38 ';' T_ID shift, and go to state 6 id go to state 524 state 495 368 languageoptions: error . $default reduce using rule 368 (languageoptions) state 496 366 languageoptions: id . $default reduce using rule 366 (languageoptions) state 497 364 languageoption: '<' languageoptions . '>' ':' 367 languageoptions: languageoptions . ',' id 369 | languageoptions . error 370 | languageoptions . ',' error 371 | languageoptions . error id error shift, and go to state 525 ',' shift, and go to state 526 '>' shift, and go to state 527 state 498 222 unparseitem: languageoption T_UNPBLOCKSTART . unparseitems T_UNPBLOCKEND $default reduce using rule 215 (unparseitems) unparseitems go to state 528 state 499 230 unpsubterm: '(' . id ')' id T_ID shift, and go to state 6 id go to state 529 state 500 219 unparseitem: languageoption '"' . @35 CexpressionDQ quote_or_error @36 viewnameoption $default reduce using rule 217 (@35) @35 go to state 530 state 501 227 unpsubterm: dollarvar . 229 | dollarvar . unpattributes T_ARROW shift, and go to state 531 $default reduce using rule 227 (unpsubterm) unpattributes go to state 532 unpattribute go to state 533 state 502 226 unpsubterm: id . 228 | id . unpattributes T_ARROW shift, and go to state 531 $default reduce using rule 226 (unpsubterm) unpattributes go to state 534 unpattribute go to state 533 state 503 221 unparseitem: languageoption Cbody . $default reduce using rule 221 (unparseitem) state 504 220 unparseitem: languageoption unpsubterm . viewnameoption ':' shift, and go to state 535 $default reduce using rule 235 (viewnameoption) viewnameoption go to state 536 state 505 117 Ctext_elem: T_WITH @19 '(' . @20 withCexpressions @21 ')' '{' withcases '}' $default reduce using rule 115 (@20) @20 go to state 537 state 506 120 foreach_continuation: '(' . patternchain ';' @22 idCexpressions ')' MainCbodyinC @23 foreach_end_continuation $default reduce using rule 145 (@28) patternchain go to state 538 patternchainitem_lineinfo go to state 295 @28 go to state 296 state 507 113 Ctext_elem: T_FOREACH @18 foreach_continuation . $default reduce using rule 113 (Ctext_elem) state 508 99 Cbody: '{' @13 Ctext . @14 '}' 102 Ctext: Ctext . @15 Ctext_elem '}' reduce using rule 98 (@14) $default reduce using rule 101 (@15) @14 go to state 539 @15 go to state 360 state 509 72 CexpressionDQ: CexpressionDQ . CexpressionDQ_elem 108 Ctext_elem: '"' @16 CexpressionDQ . '"' T_CEXPRESSION shift, and go to state 343 '\n' shift, and go to state 344 '"' shift, and go to state 540 CexpressionDQ_elem go to state 346 state 510 76 CexpressionSQ: CexpressionSQ . CexpressionSQ_elem 110 Ctext_elem: ''' @17 CexpressionSQ . ''' T_CEXPRESSION shift, and go to state 440 '\n' shift, and go to state 441 ''' shift, and go to state 541 CexpressionSQ_elem go to state 443 state 511 324 ac_constant_expression_init_list: ac_constant_expression_init_list ',' . ac_constant_expression $default reduce using rule 357 (@39) ac_constant_expression go to state 542 @39 go to state 258 state 512 275 ac_base_init: id '(' ac_constant_expression_init_list ')' . $default reduce using rule 275 (ac_base_init) state 513 42 arguments: arguments T_ID ':' . id T_ID shift, and go to state 6 id go to state 543 state 514 38 alternative: id '(' @3 arguments @4 ')' . $default reduce using rule 38 (alternative) state 515 51 attribute_init_option: '=' . @5 Cexpression $default reduce using rule 50 (@5) @5 go to state 544 state 516 48 attribute: id id attribute_init_option . ';' ';' shift, and go to state 545 state 517 190 term: '"' @33 CexpressionDQ '"' . $default reduce using rule 190 (term) state 518 188 term: ''' @32 CexpressionSQ ''' . $default reduce using rule 188 (term) state 519 182 term: id '(' termsoption ')' . $default reduce using rule 182 (term) state 520 197 terms: terms error . 199 | terms error . term T_ID shift, and go to state 6 T_INT shift, and go to state 144 '"' shift, and go to state 409 ''' shift, and go to state 410 $default reduce using rule 197 (terms) id go to state 411 integer go to state 412 term go to state 546 state 521 195 terms: terms ',' . term 198 | terms ',' . error error shift, and go to state 547 T_ID shift, and go to state 6 T_INT shift, and go to state 144 '"' shift, and go to state 409 ''' shift, and go to state 410 id go to state 411 integer go to state 412 term go to state 548 state 522 183 term: term T_ARROW id '(' . termsoption ')' error shift, and go to state 488 T_ID shift, and go to state 6 T_INT shift, and go to state 144 '"' shift, and go to state 409 ''' shift, and go to state 410 ')' reduce using rule 192 (termsoption) id go to state 411 integer go to state 412 term go to state 489 termsoption go to state 549 terms go to state 491 state 523 184 term: term '.' id '(' . termsoption ')' error shift, and go to state 488 T_ID shift, and go to state 6 T_INT shift, and go to state 144 '"' shift, and go to state 409 ''' shift, and go to state 410 ')' reduce using rule 192 (termsoption) id go to state 411 integer go to state 412 term go to state 489 termsoption go to state 550 terms go to state 491 state 524 225 unparseitem: T_PERCENTUVIEWVAR id id . @37 Cexpression @38 ';' $default reduce using rule 223 (@37) @37 go to state 551 state 525 369 languageoptions: languageoptions error . 371 | languageoptions error . id T_ID shift, and go to state 6 $default reduce using rule 369 (languageoptions) id go to state 552 state 526 367 languageoptions: languageoptions ',' . id 370 | languageoptions ',' . error error shift, and go to state 553 T_ID shift, and go to state 6 id go to state 554 state 527 364 languageoption: '<' languageoptions '>' . ':' ':' shift, and go to state 555 state 528 216 unparseitems: unparseitems . unparseitem 222 unparseitem: languageoption T_UNPBLOCKSTART unparseitems . T_UNPBLOCKEND T_UNPBLOCKEND shift, and go to state 556 T_PERCENTUVIEWVAR shift, and go to state 465 '<' shift, and go to state 467 $default reduce using rule 365 (languageoption) unparseitem go to state 468 languageoption go to state 469 state 529 230 unpsubterm: '(' id . ')' id ')' shift, and go to state 557 state 530 219 unparseitem: languageoption '"' @35 . CexpressionDQ quote_or_error @36 viewnameoption $default reduce using rule 71 (CexpressionDQ) CexpressionDQ go to state 558 state 531 233 unpattribute: T_ARROW . id 234 | T_ARROW . error error shift, and go to state 559 T_ID shift, and go to state 6 id go to state 560 state 532 229 unpsubterm: dollarvar unpattributes . 232 unpattributes: unpattributes . unpattribute T_ARROW shift, and go to state 531 $default reduce using rule 229 (unpsubterm) unpattribute go to state 561 state 533 231 unpattributes: unpattribute . $default reduce using rule 231 (unpattributes) state 534 228 unpsubterm: id unpattributes . 232 unpattributes: unpattributes . unpattribute T_ARROW shift, and go to state 531 $default reduce using rule 228 (unpsubterm) unpattribute go to state 561 state 535 236 viewnameoption: ':' . id 237 | ':' . error error shift, and go to state 562 T_ID shift, and go to state 6 id go to state 563 state 536 220 unparseitem: languageoption unpsubterm viewnameoption . $default reduce using rule 220 (unparseitem) state 537 117 Ctext_elem: T_WITH @19 '(' @20 . withCexpressions @21 ')' '{' withcases '}' $default reduce using rule 52 (Cexpression) Cexpression go to state 564 withCexpression go to state 565 withCexpressions go to state 566 state 538 120 foreach_continuation: '(' patternchain . ';' @22 idCexpressions ')' MainCbodyinC @23 foreach_end_continuation 144 patternchain: patternchain . '&' patternchainitem_lineinfo ';' shift, and go to state 567 '&' shift, and go to state 363 state 539 99 Cbody: '{' @13 Ctext @14 . '}' '}' shift, and go to state 568 state 540 108 Ctext_elem: '"' @16 CexpressionDQ '"' . $default reduce using rule 108 (Ctext_elem) state 541 110 Ctext_elem: ''' @17 CexpressionSQ ''' . $default reduce using rule 110 (Ctext_elem) state 542 324 ac_constant_expression_init_list: ac_constant_expression_init_list ',' ac_constant_expression . $default reduce using rule 324 (ac_constant_expression_init_list) state 543 42 arguments: arguments T_ID ':' id . $default reduce using rule 42 (arguments) state 544 51 attribute_init_option: '=' @5 . Cexpression $default reduce using rule 52 (Cexpression) Cexpression go to state 569 state 545 48 attribute: id id attribute_init_option ';' . $default reduce using rule 48 (attribute) state 546 183 term: term . T_ARROW id '(' termsoption ')' 184 | term . '.' id '(' termsoption ')' 185 | term . T_ARROW id 186 | term . '.' id 199 terms: terms error term . T_ARROW shift, and go to state 462 '.' shift, and go to state 464 $default reduce using rule 199 (terms) state 547 198 terms: terms ',' error . $default reduce using rule 198 (terms) state 548 183 term: term . T_ARROW id '(' termsoption ')' 184 | term . '.' id '(' termsoption ')' 185 | term . T_ARROW id 186 | term . '.' id 195 terms: terms ',' term . T_ARROW shift, and go to state 462 '.' shift, and go to state 464 $default reduce using rule 195 (terms) state 549 183 term: term T_ARROW id '(' termsoption . ')' ')' shift, and go to state 570 state 550 184 term: term '.' id '(' termsoption . ')' ')' shift, and go to state 571 state 551 225 unparseitem: T_PERCENTUVIEWVAR id id @37 . Cexpression @38 ';' $default reduce using rule 52 (Cexpression) Cexpression go to state 572 state 552 371 languageoptions: languageoptions error id . $default reduce using rule 371 (languageoptions) state 553 370 languageoptions: languageoptions ',' error . $default reduce using rule 370 (languageoptions) state 554 367 languageoptions: languageoptions ',' id . $default reduce using rule 367 (languageoptions) state 555 364 languageoption: '<' languageoptions '>' ':' . $default reduce using rule 364 (languageoption) state 556 222 unparseitem: languageoption T_UNPBLOCKSTART unparseitems T_UNPBLOCKEND . $default reduce using rule 222 (unparseitem) state 557 230 unpsubterm: '(' id ')' . id T_ID shift, and go to state 6 id go to state 573 state 558 72 CexpressionDQ: CexpressionDQ . CexpressionDQ_elem 219 unparseitem: languageoption '"' @35 CexpressionDQ . quote_or_error @36 viewnameoption error shift, and go to state 574 T_CEXPRESSION shift, and go to state 343 '\n' shift, and go to state 344 '"' shift, and go to state 575 quote_or_error go to state 576 CexpressionDQ_elem go to state 346 state 559 234 unpattribute: T_ARROW error . $default reduce using rule 234 (unpattribute) state 560 233 unpattribute: T_ARROW id . $default reduce using rule 233 (unpattribute) state 561 232 unpattributes: unpattributes unpattribute . $default reduce using rule 232 (unpattributes) state 562 237 viewnameoption: ':' error . $default reduce using rule 237 (viewnameoption) state 563 236 viewnameoption: ':' id . $default reduce using rule 236 (viewnameoption) state 564 53 Cexpression: Cexpression . Cexpression_elem 84 withCexpression: Cexpression . T_CEXPRESSION shift, and go to state 301 T_DOLLARVAR shift, and go to state 302 '(' shift, and go to state 303 '\n' shift, and go to state 304 '"' shift, and go to state 305 ''' shift, and go to state 306 '[' shift, and go to state 307 $default reduce using rule 84 (withCexpression) dollarvar go to state 308 Cexpression_elem go to state 309 state 565 85 withCexpressions: withCexpression . $default reduce using rule 85 (withCexpressions) state 566 87 withCexpressions: withCexpressions . ',' @8 withCexpression 117 Ctext_elem: T_WITH @19 '(' @20 withCexpressions . @21 ')' '{' withcases '}' ',' shift, and go to state 577 $default reduce using rule 116 (@21) @21 go to state 578 state 567 120 foreach_continuation: '(' patternchain ';' . @22 idCexpressions ')' MainCbodyinC @23 foreach_end_continuation $default reduce using rule 118 (@22) @22 go to state 579 state 568 99 Cbody: '{' @13 Ctext @14 '}' . $default reduce using rule 99 (Cbody) state 569 51 attribute_init_option: '=' @5 Cexpression . 53 Cexpression: Cexpression . Cexpression_elem T_CEXPRESSION shift, and go to state 301 T_DOLLARVAR shift, and go to state 302 '(' shift, and go to state 303 '\n' shift, and go to state 304 '"' shift, and go to state 305 ''' shift, and go to state 306 '[' shift, and go to state 307 $default reduce using rule 51 (attribute_init_option) dollarvar go to state 308 Cexpression_elem go to state 309 state 570 183 term: term T_ARROW id '(' termsoption ')' . $default reduce using rule 183 (term) state 571 184 term: term '.' id '(' termsoption ')' . $default reduce using rule 184 (term) state 572 53 Cexpression: Cexpression . Cexpression_elem 225 unparseitem: T_PERCENTUVIEWVAR id id @37 Cexpression . @38 ';' T_CEXPRESSION shift, and go to state 301 T_DOLLARVAR shift, and go to state 302 '(' shift, and go to state 303 '\n' shift, and go to state 304 '"' shift, and go to state 305 ''' shift, and go to state 306 '[' shift, and go to state 307 $default reduce using rule 224 (@38) dollarvar go to state 308 Cexpression_elem go to state 309 @38 go to state 580 state 573 230 unpsubterm: '(' id ')' id . $default reduce using rule 230 (unpsubterm) state 574 70 quote_or_error: error . $default reduce using rule 70 (quote_or_error) state 575 69 quote_or_error: '"' . $default reduce using rule 69 (quote_or_error) state 576 219 unparseitem: languageoption '"' @35 CexpressionDQ quote_or_error . @36 viewnameoption $default reduce using rule 218 (@36) @36 go to state 581 state 577 87 withCexpressions: withCexpressions ',' . @8 withCexpression $default reduce using rule 86 (@8) @8 go to state 582 state 578 117 Ctext_elem: T_WITH @19 '(' @20 withCexpressions @21 . ')' '{' withcases '}' ')' shift, and go to state 583 state 579 120 foreach_continuation: '(' patternchain ';' @22 . idCexpressions ')' MainCbodyinC @23 foreach_end_continuation T_ID shift, and go to state 6 id go to state 584 idCexpressions go to state 585 idCexpression go to state 586 state 580 225 unparseitem: T_PERCENTUVIEWVAR id id @37 Cexpression @38 . ';' ';' shift, and go to state 587 state 581 219 unparseitem: languageoption '"' @35 CexpressionDQ quote_or_error @36 . viewnameoption ':' shift, and go to state 535 $default reduce using rule 235 (viewnameoption) viewnameoption go to state 588 state 582 87 withCexpressions: withCexpressions ',' @8 . withCexpression $default reduce using rule 52 (Cexpression) Cexpression go to state 564 withCexpression go to state 589 state 583 117 Ctext_elem: T_WITH @19 '(' @20 withCexpressions @21 ')' . '{' withcases '}' '{' shift, and go to state 590 state 584 83 idCexpression: id . @6 Cexpression @7 $default reduce using rule 81 (@6) @6 go to state 591 state 585 80 idCexpressions: idCexpressions . ',' idCexpression 120 foreach_continuation: '(' patternchain ';' @22 idCexpressions . ')' MainCbodyinC @23 foreach_end_continuation ',' shift, and go to state 592 ')' shift, and go to state 593 state 586 79 idCexpressions: idCexpression . $default reduce using rule 79 (idCexpressions) state 587 225 unparseitem: T_PERCENTUVIEWVAR id id @37 Cexpression @38 ';' . $default reduce using rule 225 (unparseitem) state 588 219 unparseitem: languageoption '"' @35 CexpressionDQ quote_or_error @36 viewnameoption . $default reduce using rule 219 (unparseitem) state 589 87 withCexpressions: withCexpressions ',' @8 withCexpression . $default reduce using rule 87 (withCexpressions) state 590 117 Ctext_elem: T_WITH @19 '(' @20 withCexpressions @21 ')' '{' . withcases '}' $default reduce using rule 145 (@28) patternchains go to state 293 patternchain go to state 294 patternchainitem_lineinfo go to state 295 @28 go to state 296 withcases go to state 594 withcase go to state 298 state 591 83 idCexpression: id @6 . Cexpression @7 $default reduce using rule 52 (Cexpression) Cexpression go to state 595 state 592 80 idCexpressions: idCexpressions ',' . idCexpression T_ID shift, and go to state 6 id go to state 584 idCexpression go to state 596 state 593 120 foreach_continuation: '(' patternchain ';' @22 idCexpressions ')' . MainCbodyinC @23 foreach_end_continuation '{' shift, and go to state 597 MainCbodyinC go to state 598 state 594 117 Ctext_elem: T_WITH @19 '(' @20 withCexpressions @21 ')' '{' withcases . '}' 201 withcases: withcases . withcase '}' shift, and go to state 599 $default reduce using rule 145 (@28) patternchains go to state 293 patternchain go to state 294 patternchainitem_lineinfo go to state 295 @28 go to state 296 withcase go to state 368 state 595 53 Cexpression: Cexpression . Cexpression_elem 83 idCexpression: id @6 Cexpression . @7 T_CEXPRESSION shift, and go to state 301 T_DOLLARVAR shift, and go to state 302 '(' shift, and go to state 303 '\n' shift, and go to state 304 '"' shift, and go to state 305 ''' shift, and go to state 306 '[' shift, and go to state 307 $default reduce using rule 82 (@7) dollarvar go to state 308 Cexpression_elem go to state 309 @7 go to state 600 state 596 80 idCexpressions: idCexpressions ',' idCexpression . $default reduce using rule 80 (idCexpressions) state 597 93 MainCbodyinC: '{' . @11 MainCBodycontinuation @12 '}' $default reduce using rule 91 (@11) @11 go to state 601 state 598 120 foreach_continuation: '(' patternchain ';' @22 idCexpressions ')' MainCbodyinC . @23 foreach_end_continuation $default reduce using rule 119 (@23) @23 go to state 602 state 599 117 Ctext_elem: T_WITH @19 '(' @20 withCexpressions @21 ')' '{' withcases '}' . $default reduce using rule 117 (Ctext_elem) state 600 83 idCexpression: id @6 Cexpression @7 . $default reduce using rule 83 (idCexpression) state 601 93 MainCbodyinC: '{' @11 . MainCBodycontinuation @12 '}' error shift, and go to state 290 T_ID reduce using rule 145 (@28) T_CNEWLINES reduce using rule 100 (Ctext) T_CLINE reduce using rule 100 (Ctext) T_DOLLARVAR reduce using rule 100 (Ctext) T_WITH reduce using rule 100 (Ctext) T_FOREACH reduce using rule 100 (Ctext) T_DEFAULT reduce using rule 145 (@28) '{' reduce using rule 100 (Ctext) '}' reduce using rule 100 (Ctext) '(' reduce using rule 145 (@28) '\n' reduce using rule 100 (Ctext) '"' reduce using rule 100 (Ctext) ''' reduce using rule 100 (Ctext) '$' reduce using rule 145 (@28) '*' reduce using rule 145 (@28) MainCBodycontinuation go to state 603 Ctext go to state 292 patternchains go to state 293 patternchain go to state 294 patternchainitem_lineinfo go to state 295 @28 go to state 296 withcases go to state 297 withcase go to state 298 state 602 120 foreach_continuation: '(' patternchain ';' @22 idCexpressions ')' MainCbodyinC @23 . foreach_end_continuation T_FOREACH_AFTER shift, and go to state 604 $default reduce using rule 121 (foreach_end_continuation) foreach_end_continuation go to state 605 state 603 93 MainCbodyinC: '{' @11 MainCBodycontinuation . @12 '}' $default reduce using rule 92 (@12) @12 go to state 606 state 604 124 foreach_end_continuation: T_FOREACH_AFTER . @24 '(' patternchain @25 ')' MainCbodyinC $default reduce using rule 122 (@24) @24 go to state 607 state 605 120 foreach_continuation: '(' patternchain ';' @22 idCexpressions ')' MainCbodyinC @23 foreach_end_continuation . $default reduce using rule 120 (foreach_continuation) state 606 93 MainCbodyinC: '{' @11 MainCBodycontinuation @12 . '}' '}' shift, and go to state 608 state 607 124 foreach_end_continuation: T_FOREACH_AFTER @24 . '(' patternchain @25 ')' MainCbodyinC '(' shift, and go to state 609 state 608 93 MainCbodyinC: '{' @11 MainCBodycontinuation @12 '}' . $default reduce using rule 93 (MainCbodyinC) state 609 124 foreach_end_continuation: T_FOREACH_AFTER @24 '(' . patternchain @25 ')' MainCbodyinC $default reduce using rule 145 (@28) patternchain go to state 610 patternchainitem_lineinfo go to state 295 @28 go to state 296 state 610 124 foreach_end_continuation: T_FOREACH_AFTER @24 '(' patternchain . @25 ')' MainCbodyinC 144 patternchain: patternchain . '&' patternchainitem_lineinfo '&' shift, and go to state 363 $default reduce using rule 123 (@25) @25 go to state 611 state 611 124 foreach_end_continuation: T_FOREACH_AFTER @24 '(' patternchain @25 . ')' MainCbodyinC ')' shift, and go to state 612 state 612 124 foreach_end_continuation: T_FOREACH_AFTER @24 '(' patternchain @25 ')' . MainCbodyinC '{' shift, and go to state 597 MainCbodyinC go to state 613 state 613 124 foreach_end_continuation: T_FOREACH_AFTER @24 '(' patternchain @25 ')' MainCbodyinC . $default reduce using rule 124 (foreach_end_continuation) kimwitu++-2.3.13/src/Gen.boot/kimwy.h0000644000175000017500000000773511135163773015733 0ustar useruser/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { T_ID = 258, T_OPNAME = 259, T_INT = 260, T_CNEWLINES = 261, T_CLINE = 262, T_CEXPRESSION = 263, T_DOLLARVAR = 264, T_INCLUDEEND = 265, T_INCLUDESTART = 266, T_ENDOFINCLUDESTART = 267, T_LIST = 268, T_ARROW = 269, T_PROVIDED = 270, T_STATIC = 271, T_WITH = 272, T_FOREACH = 273, T_FOREACH_AFTER = 274, T_DEFAULT = 275, T_UNPBLOCKSTART = 276, T_UNPBLOCKEND = 277, T_PERCENTRVIEW = 278, T_PERCENTRVIEWVAR = 279, T_PERCENTUVIEW = 280, T_PERCENTUVIEWVAR = 281, T_PERCENTSTORAGECLASS = 282, T_PERCENTLANGUAGE = 283, T_AUTO = 284, T_REGISTER = 285, T_EXTERN = 286, T_TYPEDEF = 287, T_CONST = 288, T_VOLATILE = 289, T_UNSIGNED = 290, T_VIRTUAL = 291, T_DOTDOTDOT = 292, T_COLONCOLON = 293, T_OPERATOR = 294, T_CONSTRUCTOR = 295, T_DESTRUCTOR = 296, T_MEMBER = 297, T_ATTR = 298, T_BASECLASS = 299 }; #endif /* Tokens. */ #define T_ID 258 #define T_OPNAME 259 #define T_INT 260 #define T_CNEWLINES 261 #define T_CLINE 262 #define T_CEXPRESSION 263 #define T_DOLLARVAR 264 #define T_INCLUDEEND 265 #define T_INCLUDESTART 266 #define T_ENDOFINCLUDESTART 267 #define T_LIST 268 #define T_ARROW 269 #define T_PROVIDED 270 #define T_STATIC 271 #define T_WITH 272 #define T_FOREACH 273 #define T_FOREACH_AFTER 274 #define T_DEFAULT 275 #define T_UNPBLOCKSTART 276 #define T_UNPBLOCKEND 277 #define T_PERCENTRVIEW 278 #define T_PERCENTRVIEWVAR 279 #define T_PERCENTUVIEW 280 #define T_PERCENTUVIEWVAR 281 #define T_PERCENTSTORAGECLASS 282 #define T_PERCENTLANGUAGE 283 #define T_AUTO 284 #define T_REGISTER 285 #define T_EXTERN 286 #define T_TYPEDEF 287 #define T_CONST 288 #define T_VOLATILE 289 #define T_UNSIGNED 290 #define T_VIRTUAL 291 #define T_DOTDOTDOT 292 #define T_COLONCOLON 293 #define T_OPERATOR 294 #define T_CONSTRUCTOR 295 #define T_DESTRUCTOR 296 #define T_MEMBER 297 #define T_ATTR 298 #define T_BASECLASS 299 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif extern YYSTYPE yylval; kimwitu++-2.3.13/src/Gen.boot/rk.h0000644000175000017500000000415011135163773015173 0ustar useruser/* translation of file(s) "abs.k" "main.k" "parse.k" "error.k" "occur.k" "util.k" "gen.k" "gutil.k" "pat.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #ifndef KC_REWRITE_HEADER #define KC_REWRITE_HEADER namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // /* end included stuff */ namespace kc { typedef enum { base_rview_enum, last_rview } rview_enum; struct impl_rviews { const char *name; rview_class *view; }; extern struct impl_rviews rviews[]; class rview_class { protected: // only used in derivations rview_class(rview_enum v): m_view(v) { } rview_class(const rview_class&): m_view(base_rview_enum) { /* do not copy m_view */ } public: const char* name() const { return rviews[m_view].name; } operator rview_enum() const { return m_view; } bool operator==(const rview_class& other) const { return m_view == other.m_view; } private: rview_enum m_view; }; /* Use rviews instead extern char *kc_rview_names[]; */ struct base_rview_class: rview_class { base_rview_class():rview_class(base_rview_enum){} }; extern base_rview_class base_rview; } // namespace kc #endif // KC_REWRITE_HEADER kimwitu++-2.3.13/src/Gen.boot/parse.h0000644000175000017500000000674411135163773015704 0ustar useruser/* translation of file "parse.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #ifndef KC_FUNCTIONS_parse_HEADER #define KC_FUNCTIONS_parse_HEADER #include "k.h" // in case a user forgets namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // /* end included stuff */ namespace kc { phylumdeclarations mergephylumdeclarations (phylumdeclaration pd, phylumdeclarations pds); alternatives makeListAlternatives (ID listphylum, ID elementphylum); const char *f_strofID (ID id); phylumdeclaration f_lookupuserdecl (ID id); phylumdeclaration f_lookupdecl (ID id); argsnumbers insert_in_argsnumbers (int i, argsnumbers a); void set_includefiles (includefiles ifs, includedeclaration i); languagenames merge_languagenames (languagenames names, languagenames name_list); long get_text_nr (); void inc_text_nr (); long last_text_nr (); ID f_ID_of_declarator (ac_declarator d); ID f_ID_of_fn_declarator (ac_declarator d, fnclass fnc); int f_stars_of_declarator (ac_declarator d); fnclass f_fnclass_info (ac_declaration_specifiers ds, casestring fn, ac_declarator dec); fnclass f_member_class_info (ac_declaration_specifiers ds, casestring fn); bool f_static_in_ac_decl_specs (ac_declaration_specifiers ds); ID f_ID_of_ac_declaration_specifiers (ac_declaration_specifiers d); void check_no_patternchaingroup_in_patternchain (casestring f, int l, patternchain a_patternchain, const char *ctxt); void check_no_patternchaingroup_in_patternchains (casestring f, int l, patternchains a_patternchains, const char *ctxt); void check_no_patternchaingroup_or_pattern_in_patternchain (casestring f, int l, patternchain a_patternchain, const char *ctxt); void check_no_patternchaingroup_or_pattern_in_patternchains (casestring f, int l, patternchains a_patternchains, const char *ctxt); patternchains syn_patternchains_fileline (patternchains a_patternchains, casestring a_file, int a_line); patternchain syn_patternchain_fileline (patternchain a_patternchain, casestring a_file, int a_line); withexpressions pf_gen_foreachwith_vars (idCexpressions a_idCexpressions); withexpressions pf_gen_foreachwith_listvars (idCexpressions a_idCexpressions); withexpressions t_pf_gen_foreachwith_vars (idCexpressions a_idCexpressions, int occ, int nr, bool listvars); ac_class_qualifier_list f_check_build_qualifier_tail (ac_class_qualifier_help_list qh_list); ac_class_qualifier_list f_check_build_qualifier (ac_class_qualifier_help_list qh_list, ac_direct_declarator &decl); ID subst_name (ID n, casestring oldname, casestring newname); } // namespace kc #endif // ! KC_FUNCTIONS_parse_HEADER kimwitu++-2.3.13/src/Gen.boot/main.h0000644000175000017500000000251411135163773015505 0ustar useruser/* translation of file "main.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #ifndef KC_FUNCTIONS_main_HEADER #define KC_FUNCTIONS_main_HEADER #include "k.h" // in case a user forgets namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // /* end included stuff */ namespace kc { void leave (int status); } // namespace kc #endif // ! KC_FUNCTIONS_main_HEADER kimwitu++-2.3.13/src/Gen.boot/util.h0000644000175000017500000000663511135163773015546 0ustar useruser/* translation of file "util.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #ifndef KC_FUNCTIONS_util_HEADER #define KC_FUNCTIONS_util_HEADER #include "k.h" // in case a user forgets namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // /* end included stuff */ namespace kc { bool f_added (ID id); void v_add (ID id); void v_freeadded (); int f_getcount (ID id); void v_resetcount (); void v_freecount (); bool is_uview_var (ID id); bool f_DvIsDisallowed (dollarvarstatus dvs); ID f_listelementphylum (ID id); ID f_listelementconsoperator (ID id); ID f_emptyId (); bool f_operatorinphylum (ID oid, ID pid); bool f_isphylum (ID id); phylumdeclaration f_phylumdeclofid (ID id); bool f_ispredefinedphylum (ID id); alternative f_alternativeofoperator (ID oid); arguments f_argumentsofoperator (ID oid); ID f_phylumofoperator (ID oid); ID f_phylumofpatternID (ID vid); ID f_phylumofpatternvariable (ID vid); void v_syn_type_attribute_ID (ID id); bool f_Nilarguments (arguments a); ID f_hd_arguments (arguments a); arguments f_tl_arguments (arguments a); void v_check_dollarvar_attribute_in_operators (INT i, unpattributes a, operators o); ID f_check_unpattributes_in_phylum (unpattributes a, ID p); bool f_attribute_in_phylym (ID a, ID p); ID f_typeof_attribute_in_phylym (ID a, ID p); ID f_subphylumofoperator (ID o, INT i); ID f_subphylum (arguments a, INT i); argument f_argumentofoperator (ID o, INT i); argument f_argument (arguments a, INT i); ID f_phylumofoutmostpattern (outmostpattern p); ID f_operatorofphylum (ID p, int i); alternative f_alternative (alternatives a, int i); void v_reset_phylumdeclaration_marks (); void v_reset_variables_type (variables v); void v_add_to_uviewnames (ID v); void v_add_to_uviewnames_ext (ID v); void v_add_to_rviewnames (ID v); void v_add_to_rviewnames_ext (ID v); void v_add_to_storageclasses (ID v, ID p); void collect_strings (); void add_string_to_collection (unparseitem s); void unparse_string_collection (); phylumnames f_phylumnames_foreachwith_vars (idCexpressions a_idCexpressions); phylumnames t_f_phylumnames_foreachwith_vars (idCexpressions a_idCexpressions); phylumnames f_phylumnames_foreachwith_listvars (idCexpressions a_idCexpressions); phylumnames t_f_phylumnames_foreachwith_listvars (idCexpressions a_idCexpressions); void f_collect_members (fndeclarations fns); ID f_id_of_ctor_dtor_decl (ac_declarator decl); void prepare_base_classes (baseclass_declarations decls); } // namespace kc #endif // ! KC_FUNCTIONS_util_HEADER kimwitu++-2.3.13/src/Gen.boot/occur.cc0000644000175000017500000006616211135163773016043 0ustar useruser/* translation of file "occur.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #define KC_FUNCTIONS_occur #include #include "k.h" #include "occur.h" namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // static char occur_kAccesSid[] = "@(#)$Id: occur.k,v 1.10 2008/02/06 20:28:59 piefel Exp $"; inline static void NF(ID id, problem prob) { v_report(NonFatal( FileLine( id->file, id->line ), prob)); } /* end included stuff */ namespace kc { #ifndef KC_TRACE_PROVIDED #define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND #endif static void do_v_extendoccur (ID id, IDtype it, bool warn); static bool occurlanguagename (ID id); void v_defoccur(ID id, IDtype it) { uniqID uid; { ID kc_selvar_0_1 = phylum_cast( id ); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID _uid = phylum_cast(kc_selvar_0_1)->uniqID_1; uid = _uid; } else kc_no_default_in_with( "v_defoccur", __LINE__, __FILE__ ); } id->type = it; { IDtype kc_selvar_0_1 = phylum_cast( id->type); IDtype kc_selvar_0_2 = phylum_cast( uid->type ); if ((kc_selvar_0_1->prod_sel() == sel_ITUnknown)) { return; } else if ((kc_selvar_0_2->prod_sel() == sel_ITUnknown)) { uid->type = it; uid->line = id->line; uid->file = id->file; return; } else { } } { IDtype kc_selvar_0_1 = phylum_cast( id->type); IDtype kc_selvar_0_2 = phylum_cast( uid->type ); if ((kc_selvar_0_1->prod_sel() == sel_ITUserFunction) && (kc_selvar_0_2->prod_sel() == sel_ITUserFunction) && (phylum_cast(kc_selvar_0_2)->fnclass_1->prod_sel() == sel_DestructorFn)) { } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserFunction) && (kc_selvar_0_2->prod_sel() == sel_ITUserFunction) && (phylum_cast(kc_selvar_0_2)->fnclass_1->prod_sel() == sel_ConstructorFn)) { } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserFunction) && (kc_selvar_0_2->prod_sel() == sel_ITUserFunction) && (phylum_cast(kc_selvar_0_2)->fnclass_1->prod_sel() == sel_MemberFn)) { } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserFunction) && (kc_selvar_0_2->prod_sel() == sel_ITUserFunction) && (phylum_cast(kc_selvar_0_2)->fnclass_1->prod_sel() == sel_StaticFn)) { const fnclass it_fnc = phylum_cast(kc_selvar_0_1)->fnclass_1; { fnclass kc_selvar_1_1 = phylum_cast( it_fnc ); if ((kc_selvar_1_1->prod_sel() == sel_StaticFn)) { if (uid->file->eq(id->file )) NF(id, Problem1S1ID( "illegal redefinition of local function:", id )); } else if ((kc_selvar_1_1->prod_sel() == sel_GlobalFn)) { NF(id, Problem1S1ID( "illegal redefinition of local function:", id )); } else kc_no_default_in_with( "v_defoccur", __LINE__, __FILE__ ); } } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserFunction) && (kc_selvar_0_2->prod_sel() == sel_ITUserFunction) && (phylum_cast(kc_selvar_0_2)->fnclass_1->prod_sel() == sel_GlobalFn)) { const fnclass it_fnc = phylum_cast(kc_selvar_0_1)->fnclass_1; } else if ((kc_selvar_0_1->prod_sel() == sel_ITPatternVariable) && (kc_selvar_0_2->prod_sel() == sel_ITPatternVariable)) { const integer i_s = phylum_cast(kc_selvar_0_1)->integer_1; const integer id_s = phylum_cast(kc_selvar_0_2)->integer_1; if (i_s == id_s) NF(id, Problem1S1ID( "illegal redefinition of pattern variable:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserRView) && (kc_selvar_0_2->prod_sel() == sel_ITUserRView)) { NF(id, Problem1S1ID( "illegal redefinition of rewrite view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserRView) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedRView)) { NF(id, Problem1S1ID( "illegal redefinition of predefined rewrite view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedRView) && (kc_selvar_0_2->prod_sel() == sel_ITUserRView)) { NF(id, Problem1S1ID( "illegal predefinition of rewrite view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedRView) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedRView)) { NF(id, Problem1S1ID( "illegal predefinition of predefined rewrite view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserUView) && (kc_selvar_0_2->prod_sel() == sel_ITUserUView)) { NF(id, Problem1S1ID( "illegal redefinition of unparse view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserUView) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedUView)) { NF(id, Problem1S1ID( "illegal redefinition of predefined unparse view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedUView) && (kc_selvar_0_2->prod_sel() == sel_ITUserUView)) { NF(id, Problem1S1ID( "illegal predefinition of unparse view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedUView) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedUView)) { NF(id, Problem1S1ID( "illegal predefinition of predefined unparse view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITStorageClass) && (kc_selvar_0_2->prod_sel() == sel_ITStorageClass)) { NF(id, Problem1S1ID( "illegal redefinition of storage class:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITStorageClass) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedStorageClass)) { NF(id, Problem1S1ID( "illegal redefinition of predefined storage class:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedStorageClass) && (kc_selvar_0_2->prod_sel() == sel_ITStorageClass)) { NF(id, Problem1S1ID( "illegal predefinition of storage class:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedStorageClass) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedStorageClass)) { NF(id, Problem1S1ID( "illegal predefinition of predefined storage class:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserOperator) && (kc_selvar_0_2->prod_sel() == sel_ITUserOperator)) { NF(id, Problem1S1ID( "illegal redefinition of operator:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserOperator) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedOperator)) { NF(id, Problem1S1ID( "illegal redefinition of predefined operator:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedOperator) && (kc_selvar_0_2->prod_sel() == sel_ITUserOperator)) { NF(id, Problem1S1ID( "illegal predefinition of operator:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedOperator) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedOperator)) { NF(id, Problem1S1ID( "illegal predefinition of predefined operator:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserPhylum) && (kc_selvar_0_2->prod_sel() == sel_ITUserPhylum)) { NF(id, Problem1S1ID( "illegal redefinition of phylum:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserPhylum) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedPhylum)) { NF(id, Problem1S1ID( "illegal redefinition of predefined phylum:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedPhylum) && (kc_selvar_0_2->prod_sel() == sel_ITUserPhylum)) { NF(id, Problem1S1ID( "illegal predefinition of phylum:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedPhylum) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedPhylum)) { NF(id, Problem1S1ID( "illegal predefinition of predefined phylum:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPatternVariable)) { const integer i_s = phylum_cast(kc_selvar_0_1)->integer_1; NF(id, Problem1S1t1S1ID( "illegal redefinition of ", uid->type, "as pattern variable", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserRView)) { NF(id, Problem1S1t1S1ID( "illegal redefinition of ", uid->type, "as rewrite view", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedRView)) { NF(id, Problem1S1t1S1ID( "illegal predefinition of ", uid->type, "as rewrite view", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserUView)) { NF(id, Problem1S1t1S1ID( "illegal redefinition of ", uid->type, "as unparse view", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedUView)) { NF(id, Problem1S1t1S1ID( "illegal predefinition of ", uid->type, "as unparse view", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserFunction)) { NF(id, Problem1S1t1S1ID( "illegal redefinition of ", uid->type, "as function", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITStorageClass)) { NF(id, Problem1S1t1S1ID( "illegal redefinition of ", uid->type, "as storage class", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedStorageClass)) { NF(id, Problem1S1t1S1ID( "illegal predefinition of ", uid->type, "as storage class:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserOperator)) { NF(id, Problem1S1t1S1ID( "illegal redefinition of ", uid->type, "as operator:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedOperator)) { NF(id, Problem1S1t1S1ID( "illegal predefinition of ", uid->type, "as operator:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserPhylum)) { NF(id, Problem1S1t1S1ID( "illegal redefinition of ", uid->type, "as phylum:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedPhylum)) { NF(id, Problem1S1t1S1ID( "illegal predefinition of ", uid->type, "as phylum:", id )); } else kc_no_default_in_with( "v_defoccur", __LINE__, __FILE__ ); } } void v_extendoccur(ID id, IDtype it) { do_v_extendoccur( id, it, true); } void v_extendoccur_nowarning(ID id, IDtype it) { do_v_extendoccur( id, it, false); } static void do_v_extendoccur(ID id, IDtype it, bool warn) { uniqID uid; { ID kc_selvar_0_1 = phylum_cast( id ); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID _uid = phylum_cast(kc_selvar_0_1)->uniqID_1; uid = _uid; } else kc_no_default_in_with( "do_v_extendoccur", __LINE__, __FILE__ ); } id->type = it; { IDtype kc_selvar_0_1 = phylum_cast( id->type); IDtype kc_selvar_0_2 = phylum_cast( uid->type ); if ((kc_selvar_0_1->prod_sel() == sel_ITUnknown)) { return; } else if ((kc_selvar_0_2->prod_sel() == sel_ITUnknown)) { uid->type = it; uid->line = id->line; uid->file = id->file; return; } else { } } { IDtype kc_selvar_0_1 = phylum_cast( id->type); IDtype kc_selvar_0_2 = phylum_cast( uid->type ); if ((kc_selvar_0_1->prod_sel() == sel_ITPatternVariable) && (kc_selvar_0_2->prod_sel() == sel_ITPatternVariable)) { const ID id_id = phylum_cast(kc_selvar_0_1)->ID_1; const integer id_scope = phylum_cast(kc_selvar_0_1)->integer_1; const ID uid_id = phylum_cast(kc_selvar_0_2)->ID_1; const integer uid_scope = phylum_cast(kc_selvar_0_2)->integer_1; if (id_scope == uid_scope) { if (! id_id->eq( uid_id )) { NF(id, Problem1S1ID1S1ID1S1ID( "type mismatch in redefinition of pattern variable:", id, "old type", uid_id, "new type", id_id )); } } else { uid->scopeinfo = Consscopetypefilelinestack( ScopeTypeFileLine(id_scope, uid->type, uid->file, mkinteger(uid->line)), uid->scopeinfo ); uid->type = it; uid->line = id->line; uid->file = id->file; } } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserRView) && (kc_selvar_0_2->prod_sel() == sel_ITUserRView)) { if (warn) NF(id, Problem1S1ID( "superfluous redeclaration of rewrite view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserRView) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedRView)) { if (warn) NF(id, Problem1S1ID( "superfluous redeclaration of predefined rewrite view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedRView) && (kc_selvar_0_2->prod_sel() == sel_ITUserRView)) { NF(id, Problem1S1ID( "illegal extension of rewrite view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedRView) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedRView)) { NF(id, Problem1S1ID( "illegal extension of predefined rewrite view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserUView) && (kc_selvar_0_2->prod_sel() == sel_ITUserUView)) { if (warn) NF(id, Problem1S1ID( "superfluous redeclaration of unparse view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserUView) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedUView)) { if (warn) NF(id, Problem1S1ID( "superfluous redeclaration of predefined unparse view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedUView) && (kc_selvar_0_2->prod_sel() == sel_ITUserUView)) { NF(id, Problem1S1ID( "illegal extension of unparse view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedUView) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedUView)) { NF(id, Problem1S1ID( "illegal extension of predefined unparse view:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserFunction) && (kc_selvar_0_2->prod_sel() == sel_ITUserFunction)) { NF(id, Problem1S1ID( "illegal extension of function:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITStorageClass) && (kc_selvar_0_2->prod_sel() == sel_ITStorageClass)) { /* EMPTY */ } else if ((kc_selvar_0_1->prod_sel() == sel_ITStorageClass) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedStorageClass)) { /* EMPTY */ } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedStorageClass) && (kc_selvar_0_2->prod_sel() == sel_ITStorageClass)) { NF(id, Problem1S1ID( "illegal extension of storage class:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedStorageClass) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedStorageClass)) { NF(id, Problem1S1ID( "illegal extension of predefined storage class:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserOperator) && (kc_selvar_0_2->prod_sel() == sel_ITUserOperator)) { NF(id, Problem1S1ID( "illegal redefinition of operator:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserOperator) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedOperator)) { NF(id, Problem1S1ID( "illegal extension of predefined operator:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedOperator) && (kc_selvar_0_2->prod_sel() == sel_ITUserOperator)) { NF(id, Problem1S1ID( "illegal extension of operator:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedOperator) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedOperator)) { NF(id, Problem1S1ID( "illegal extension of predefined operator:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserPhylum) && (kc_selvar_0_2->prod_sel() == sel_ITUserPhylum)) { /* EMPTY */ } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserPhylum) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedPhylum)) { NF(id, Problem1S1ID( "illegal extension of predefined phylum:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedPhylum) && (kc_selvar_0_2->prod_sel() == sel_ITUserPhylum)) { NF(id, Problem1S1ID( "illegal extension of phylum:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedPhylum) && (kc_selvar_0_2->prod_sel() == sel_ITPredefinedPhylum)) { /* EMPTY */ } else if ((kc_selvar_0_1->prod_sel() == sel_ITPatternVariable)) { const ID t_id = phylum_cast(kc_selvar_0_1)->ID_1; const integer t_scope = phylum_cast(kc_selvar_0_1)->integer_1; NF(id, Problem1S1t1S1ID( "illegal extension of", uid->type, "as pattern variable:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserRView)) { NF(id, Problem1S1t1S1ID( "illegal extension of ", uid->type, "as rewrite view", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedRView)) { NF(id, Problem1S1t1S1ID( "illegal extension of ", uid->type, "as rewrite view", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserUView)) { NF(id, Problem1S1t1S1ID( "illegal extension of ", uid->type, "as unparse view", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedUView)) { NF(id, Problem1S1t1S1ID( "illegal extension of ", uid->type, "as unparse view", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserFunction)) { NF(id, Problem1S1t1S1ID( "illegal extension of", uid->type, "as function:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITStorageClass)) { NF(id, Problem1S1t1S1ID( "illegal extension of ", uid->type, "as storage class:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedStorageClass)) { NF(id, Problem1S1t1S1ID( "illegal extension of ", uid->type, "as storage class:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserOperator)) { NF(id, Problem1S1t1S1ID( "illegal extension of ", uid->type, "as operator:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedOperator)) { NF(id, Problem1S1t1S1ID( "illegal extension of ", uid->type, "as operator:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITUserPhylum)) { NF(id, Problem1S1t1S1ID( "illegal extension of ", uid->type, "as phylum:", id )); } else if ((kc_selvar_0_1->prod_sel() == sel_ITPredefinedPhylum)) { NF(id, Problem1S1t1S1ID( "illegal extension of ", uid->type, "as phylum", id )); } else kc_no_default_in_with( "do_v_extendoccur", __LINE__, __FILE__ ); } } bool f_useoccuroperator(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserOperator)) { return true; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedOperator)) { NF(id, Problem1S1ID( "undefined operator (it's predefined, you're not supposed to use those):", id )); return false; } else { NF(id, Problem1S1tID( "undefined operator", id )); return false; } } } else { kc_no_default_in_with( "f_useoccuroperator", __LINE__, __FILE__ ); return static_cast(0); } } } bool f_warnifnotvariable(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUnknown)) { return false; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPatternVariable)) { return false; } else { NF(id, Problem1S1tID( "variable expected:", id )); return true; } } } else { kc_no_default_in_with( "f_warnifnotvariable", __LINE__, __FILE__ ); return static_cast(0); } } } bool f_useoccurphylum(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserPhylum)) { return true; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedPhylum)) { return true; } else { NF(id, Problem1S1tID( "undefined phylum", id )); return false; } } } else { kc_no_default_in_with( "f_useoccurphylum", __LINE__, __FILE__ ); return static_cast(0); } } } bool f_useoccurlistphylum(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserPhylum)) { const phylumdeclaration pd = phylum_cast(kc_selvar_1_1)->phylumdeclaration_1; { phylumdeclaration kc_selvar_2_1 = phylum_cast( pd ); if ((kc_selvar_2_1->prod_sel() == sel_PhylumDeclaration) && (phylum_cast(kc_selvar_2_1)->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { NF(id, Problem1S1ID( "undefined list phylum (it's a predefined phylum):", id )); return false; } else if ((kc_selvar_2_1->prod_sel() == sel_PhylumDeclaration) && (phylum_cast(kc_selvar_2_1)->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { NF(id, Problem1S1ID( "undefined list phylum (it's a non-list phylum):", id )); return false; } else if ((kc_selvar_2_1->prod_sel() == sel_PhylumDeclaration) && (phylum_cast(kc_selvar_2_1)->productionblock_1->prod_sel() == sel_ListAlternatives)) { return true; } else if ((kc_selvar_2_1->prod_sel() == sel_PhylumDeclaration) && (phylum_cast(kc_selvar_2_1)->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { NF(id, Problem1S1ID( "undefined list phylum (the productionblock is empty):", id )); return false; } else { kc_no_default_in_with( "f_useoccurlistphylum", __LINE__, __FILE__ ); return static_cast(0); } } } else { NF(id, Problem1S1tID( "undefined list phylum", id )); return false; } } } else { kc_no_default_in_with( "f_useoccurlistphylum", __LINE__, __FILE__ ); return static_cast(0); } } } bool f_useoccuruviewname(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserUView)) { return true; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedUView)) { return true; } else { NF(id, Problem1S1tID( "undefined unparse view:", id )); return false; } } } else { kc_no_default_in_with( "f_useoccuruviewname", __LINE__, __FILE__ ); return static_cast(0); } } } bool f_useoccurrviewname(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserRView)) { return true; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedRView)) { return true; } else { NF(id, Problem1S1tID( "undefined rewrite view:", id )); return false; } } } else { kc_no_default_in_with( "f_useoccurrviewname", __LINE__, __FILE__ ); return static_cast(0); } } } bool f_useoccurstorageclass(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITStorageClass)) { return true; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedStorageClass)) { return true; } else { NF(id, Problem1S1tID( "undefined storage class:", id )); return false; } } } else { kc_no_default_in_with( "f_useoccurstorageclass", __LINE__, __FILE__ ); return static_cast(0); } } } static bool occurlanguagename(ID id) { { languagenames kc_fe_selvar_1 = Thelanguages; while( kc_fe_selvar_1->prod_sel() == sel_Conslanguagenames ) { ID kc_selvar_0_1 = kc_fe_selvar_1->ID_1; { { { const ID l_id = kc_selvar_0_1; if(id->eq(l_id)) { return true; } } } } kc_fe_selvar_1 = kc_fe_selvar_1->languagenames_1; } } v_report(Fatal( FileLine( id->file, id->line ), Problem1S1tID( "undefined language name:", id ))); return false; } bool f_useoccurlanguagename(languagenames names) {{ languagenames kc_selvar_0_1 = phylum_cast(names); if ((kc_selvar_0_1->prod_sel() == sel_Nillanguagenames)) { return true; } else if ((kc_selvar_0_1->prod_sel() == sel_Conslanguagenames)) { const ID id = (kc_selvar_0_1)->ID_1; const languagenames tail = (kc_selvar_0_1)->languagenames_1; bool res=f_useoccurlanguagename( tail ); return occurlanguagename( id ) && res; } else { kc_no_default_in_with( "f_useoccurlanguagename", __LINE__, __FILE__ ); return static_cast(0); } } } bool f_useoccurpatternvariable(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITPatternVariable)) { return true; } else { NF(id, Problem1S1tID( "undefined pattern variable:", id )); return false; } } } else { kc_no_default_in_with( "f_useoccurpatternvariable", __LINE__, __FILE__ ); return static_cast(0); } } } } // namespace kc kimwitu++-2.3.13/src/Gen.boot/kimwy.cc0000644000175000017500000045450211135163773016067 0ustar useruser/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Using locations. */ #define YYLSP_NEEDED 0 /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { T_ID = 258, T_OPNAME = 259, T_INT = 260, T_CNEWLINES = 261, T_CLINE = 262, T_CEXPRESSION = 263, T_DOLLARVAR = 264, T_INCLUDEEND = 265, T_INCLUDESTART = 266, T_ENDOFINCLUDESTART = 267, T_LIST = 268, T_ARROW = 269, T_PROVIDED = 270, T_STATIC = 271, T_WITH = 272, T_FOREACH = 273, T_FOREACH_AFTER = 274, T_DEFAULT = 275, T_UNPBLOCKSTART = 276, T_UNPBLOCKEND = 277, T_PERCENTRVIEW = 278, T_PERCENTRVIEWVAR = 279, T_PERCENTUVIEW = 280, T_PERCENTUVIEWVAR = 281, T_PERCENTSTORAGECLASS = 282, T_PERCENTLANGUAGE = 283, T_AUTO = 284, T_REGISTER = 285, T_EXTERN = 286, T_TYPEDEF = 287, T_CONST = 288, T_VOLATILE = 289, T_UNSIGNED = 290, T_VIRTUAL = 291, T_DOTDOTDOT = 292, T_COLONCOLON = 293, T_OPERATOR = 294, T_CONSTRUCTOR = 295, T_DESTRUCTOR = 296, T_MEMBER = 297, T_ATTR = 298, T_BASECLASS = 299 }; #endif /* Tokens. */ #define T_ID 258 #define T_OPNAME 259 #define T_INT 260 #define T_CNEWLINES 261 #define T_CLINE 262 #define T_CEXPRESSION 263 #define T_DOLLARVAR 264 #define T_INCLUDEEND 265 #define T_INCLUDESTART 266 #define T_ENDOFINCLUDESTART 267 #define T_LIST 268 #define T_ARROW 269 #define T_PROVIDED 270 #define T_STATIC 271 #define T_WITH 272 #define T_FOREACH 273 #define T_FOREACH_AFTER 274 #define T_DEFAULT 275 #define T_UNPBLOCKSTART 276 #define T_UNPBLOCKEND 277 #define T_PERCENTRVIEW 278 #define T_PERCENTRVIEWVAR 279 #define T_PERCENTUVIEW 280 #define T_PERCENTUVIEWVAR 281 #define T_PERCENTSTORAGECLASS 282 #define T_PERCENTLANGUAGE 283 #define T_AUTO 284 #define T_REGISTER 285 #define T_EXTERN 286 #define T_TYPEDEF 287 #define T_CONST 288 #define T_VOLATILE 289 #define T_UNSIGNED 290 #define T_VIRTUAL 291 #define T_DOTDOTDOT 292 #define T_COLONCOLON 293 #define T_OPERATOR 294 #define T_CONSTRUCTOR 295 #define T_DESTRUCTOR 296 #define T_MEMBER 297 #define T_ATTR 298 #define T_BASECLASS 299 /* Copy the first part of user declarations. */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // // // kimwy.y // static char kimwy_yAccesSid[] = "@(#)$Id: kimwy.y,v 1.53 2008/02/06 20:28:59 piefel Exp $"; void yyerror_1(const char *s, int state_no); #define yyerror(s) yyerror_1(s, yystate) #ifdef BISON_RECOVER /* Note that setting YYDEBUG is required even if you do not want to * set the yydebug variable because we use the symbol strings in * 'yytname' for initialising costs and also for error messages. */ #define YYDEBUG 1 #define yyinsertcost(token) (token[0]=='\''?1:strlen(token)) #define yydeletecost(token) (token[0]=='\''?1:strlen(token)) #endif /* BISON_RECOVER */ ///////////////////////////////////////////////////////////////////////////// // // Name conventions: tokens are in CAPITALS // nonterminals are in lowercase // operators are capitalized // // For windows (NT at least) we need to redefine alloca #if defined(_WIN32) && ! defined (__GNUC__) # define alloca _alloca # include #endif #include "k.h" #include "parse.h" #include "occur.h" #include "util.h" // for the v_add_to routines #include "rk.h" // for the patternchains::rewrite routine #include "yystype.h" // for YYSTYPE #include "error.h" #include #include #include namespace { // local kimwy.y vars static ID pl_phylum; static withexpressions pl_withvariables; static std::stack pl_withvariablesstack; static std::stack pl_idCexpressionsstack; static std::stack pl_filelinestack; static std::stack pl_nooperatorsstack; static int non_default_outmostpattern = 0; } #define dollar_mark_set() (!pl_withvariables->eq(Nilwithexpressions())) #define do_MainC() do { if ( dollar_mark_set() ) do_NORMAL(); else do_C(); } while(0) extern void do_NORMAL(); extern void do_CEXPR(); extern void do_CEXPRDQ(); extern void do_CEXPRSQ(); extern void do_C(); extern int yylex(); #define pf_setfileline(x) do { (x)->file = pg_filename; \ (x)->line = pg_lineno; \ } while(0) #define pf_pushfileline() pl_filelinestack.push(FileLine(pg_filename, pg_lineno)) #define pf_setstacktopfileline(x) do { (x)->file = pl_filelinestack.top()->file; \ (x)->line = pl_filelinestack.top()->line; \ } while(0) #define pf_topfileline() pl_filelinestack.top() #define pf_popfileline() pl_filelinestack.pop() #define pf_setwithvariable(x) pl_withvariables = Conswithexpressions(WEVariable(x), pl_withvariables) #define pf_resetwithvariable() pl_withvariables = Nilwithexpressions() #define pf_push_no_operators() pl_nooperatorsstack.push(non_default_outmostpattern) #define pf_pop_no_operators() do{non_default_outmostpattern = pl_nooperatorsstack.top();pl_nooperatorsstack.pop();}while(0) /* XXX - why is there no need to restore pl_withvariables on pop? MvL */ #define pf_pushwithvariable() pl_withvariablesstack.push(pl_withvariables) #define pf_topwithvariable() pl_withvariablesstack.top() #define pf_popwithvariable() pl_withvariablesstack.pop() #define pf_pushidCexpressions(x) pl_idCexpressionsstack.push(x) #define pf_topidCexpressions() pl_idCexpressionsstack.top() #define pf_popidCexpressions() pl_idCexpressionsstack.pop() /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif /* Copy the second part of user declarations. */ /* Line 216 of yacc.c. */ #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int i) #else static int YYID (i) int i; #endif { return i; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss; YYSTYPE yyvs; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 764 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 66 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 159 /* YYNRULES -- Number of rules. */ #define YYNRULES 379 /* YYNRULES -- Number of states. */ #define YYNSTATES 614 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 299 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 55, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 50, 56, 2, 63, 2, 62, 57, 52, 53, 64, 2, 47, 2, 65, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 45, 46, 60, 54, 61, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 58, 2, 59, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 48, 51, 49, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint16 yyprhs[] = { 0, 0, 3, 5, 7, 9, 10, 13, 14, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 43, 45, 49, 50, 58, 59, 63, 68, 71, 75, 76, 79, 81, 83, 87, 89, 93, 97, 98, 99, 106, 110, 111, 114, 119, 120, 125, 128, 129, 132, 137, 138, 139, 143, 144, 147, 149, 151, 153, 157, 161, 165, 169, 172, 175, 178, 181, 182, 185, 187, 189, 191, 193, 194, 197, 199, 201, 202, 205, 207, 209, 211, 215, 216, 217, 222, 224, 226, 227, 232, 233, 234, 240, 241, 242, 248, 250, 252, 254, 255, 256, 262, 263, 264, 268, 270, 272, 274, 276, 277, 282, 283, 288, 290, 291, 295, 296, 297, 298, 309, 310, 311, 321, 322, 323, 324, 332, 333, 335, 336, 342, 346, 347, 349, 351, 354, 355, 361, 363, 366, 372, 374, 376, 378, 382, 384, 388, 389, 392, 394, 398, 401, 403, 407, 409, 412, 416, 420, 423, 429, 433, 436, 439, 440, 441, 442, 449, 451, 456, 458, 460, 464, 465, 470, 472, 473, 475, 477, 481, 483, 486, 490, 494, 496, 501, 508, 515, 519, 523, 524, 529, 530, 535, 537, 538, 540, 542, 546, 548, 551, 555, 559, 561, 564, 568, 569, 575, 580, 582, 585, 591, 596, 602, 607, 610, 611, 614, 615, 618, 619, 620, 628, 632, 635, 640, 641, 642, 650, 652, 654, 657, 660, 665, 667, 670, 673, 676, 677, 680, 683, 687, 691, 693, 697, 700, 705, 709, 715, 718, 722, 726, 730, 732, 736, 739, 744, 748, 754, 757, 761, 765, 769, 771, 774, 778, 781, 785, 789, 798, 806, 813, 819, 825, 826, 829, 831, 835, 840, 841, 844, 845, 848, 852, 854, 857, 860, 864, 866, 869, 872, 876, 878, 880, 882, 884, 886, 888, 890, 891, 893, 895, 897, 899, 901, 903, 906, 909, 913, 915, 918, 921, 925, 927, 930, 933, 937, 940, 944, 946, 950, 955, 960, 965, 966, 971, 973, 977, 983, 989, 991, 995, 997, 1000, 1001, 1003, 1005, 1008, 1011, 1015, 1017, 1020, 1021, 1023, 1025, 1028, 1032, 1034, 1038, 1042, 1046, 1048, 1050, 1053, 1057, 1062, 1066, 1071, 1075, 1077, 1078, 1081, 1083, 1086, 1088, 1089, 1094, 1099, 1100, 1102, 1106, 1108, 1111, 1115, 1119, 1123, 1127, 1129, 1132, 1136, 1139 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { 70, 0, -1, 9, -1, 3, -1, 5, -1, -1, 71, 72, -1, -1, 72, 73, -1, 76, -1, 136, -1, 183, -1, 132, -1, 162, -1, 177, -1, 179, -1, 181, -1, 223, -1, 74, -1, 44, 68, 45, 75, 46, -1, 68, -1, 75, 47, 68, -1, -1, 68, 78, 45, 77, 79, 85, 46, -1, -1, 48, 68, 49, -1, 48, 50, 68, 49, -1, 48, 1, -1, 48, 50, 1, -1, -1, 13, 68, -1, 80, -1, 81, -1, 80, 51, 81, -1, 1, -1, 80, 51, 1, -1, 80, 1, 81, -1, -1, -1, 68, 52, 82, 84, 83, 53, -1, 68, 52, 1, -1, -1, 84, 68, -1, 84, 3, 45, 68, -1, -1, 48, 86, 131, 49, -1, 48, 1, -1, -1, 86, 87, -1, 68, 68, 88, 46, -1, -1, -1, 54, 89, 90, -1, -1, 90, 91, -1, 8, -1, 67, -1, 55, -1, 56, 95, 56, -1, 57, 97, 57, -1, 52, 92, 53, -1, 58, 92, 59, -1, 56, 1, -1, 57, 1, -1, 52, 1, -1, 58, 1, -1, -1, 92, 93, -1, 91, -1, 47, -1, 56, -1, 1, -1, -1, 95, 96, -1, 8, -1, 55, -1, -1, 97, 98, -1, 8, -1, 55, -1, 100, -1, 99, 47, 100, -1, -1, -1, 68, 101, 90, 102, -1, 90, -1, 103, -1, -1, 104, 47, 105, 103, -1, -1, -1, 48, 107, 112, 108, 49, -1, -1, -1, 48, 110, 112, 111, 49, -1, 116, -1, 160, -1, 1, -1, -1, -1, 48, 114, 116, 115, 49, -1, -1, -1, 116, 117, 118, -1, 7, -1, 67, -1, 55, -1, 6, -1, -1, 56, 119, 95, 56, -1, -1, 57, 120, 97, 57, -1, 113, -1, -1, 18, 121, 125, -1, -1, -1, -1, 17, 122, 52, 123, 104, 124, 53, 48, 160, 49, -1, -1, -1, 52, 142, 46, 126, 99, 53, 109, 127, 128, -1, -1, -1, -1, 19, 129, 52, 142, 130, 53, 109, -1, -1, 113, -1, -1, 11, 134, 133, 12, 10, -1, 11, 1, 10, -1, -1, 135, -1, 3, -1, 135, 3, -1, -1, 146, 14, 137, 138, 140, -1, 139, -1, 138, 139, -1, 60, 166, 45, 155, 61, -1, 46, -1, 1, -1, 142, -1, 141, 47, 142, -1, 143, -1, 142, 62, 143, -1, -1, 144, 145, -1, 147, -1, 52, 141, 53, -1, 63, 68, -1, 147, -1, 146, 47, 147, -1, 1, -1, 146, 1, -1, 146, 47, 1, -1, 146, 1, 147, -1, 68, 148, -1, 68, 52, 153, 53, 148, -1, 68, 54, 147, -1, 64, 148, -1, 20, 148, -1, -1, -1, -1, 15, 52, 149, 90, 150, 53, -1, 68, -1, 68, 52, 153, 53, -1, 64, -1, 20, -1, 68, 54, 151, -1, -1, 56, 152, 95, 56, -1, 69, -1, -1, 154, -1, 151, -1, 154, 47, 151, -1, 1, -1, 154, 1, -1, 154, 47, 1, -1, 154, 1, 151, -1, 68, -1, 68, 52, 158, 53, -1, 155, 14, 68, 52, 158, 53, -1, 155, 65, 68, 52, 158, 53, -1, 155, 14, 68, -1, 155, 65, 68, -1, -1, 57, 156, 97, 57, -1, -1, 56, 157, 95, 56, -1, 69, -1, -1, 159, -1, 155, -1, 159, 47, 155, -1, 1, -1, 159, 1, -1, 159, 47, 1, -1, 159, 1, 155, -1, 161, -1, 160, 161, -1, 141, 45, 113, -1, -1, 146, 14, 163, 164, 46, -1, 146, 14, 1, 46, -1, 165, -1, 164, 165, -1, 58, 166, 45, 167, 59, -1, 58, 166, 45, 1, -1, 58, 1, 45, 167, 59, -1, 58, 1, 45, 1, -1, 58, 1, -1, -1, 166, 68, -1, -1, 167, 168, -1, -1, -1, 221, 56, 169, 95, 94, 170, 176, -1, 221, 173, 176, -1, 221, 113, -1, 221, 21, 167, 22, -1, -1, -1, 26, 68, 68, 171, 90, 172, 46, -1, 68, -1, 67, -1, 68, 174, -1, 67, 174, -1, 52, 68, 53, 68, -1, 175, -1, 174, 175, -1, 14, 68, -1, 14, 1, -1, -1, 45, 68, -1, 45, 1, -1, 25, 178, 46, -1, 25, 1, 46, -1, 68, -1, 52, 68, 53, -1, 178, 68, -1, 178, 52, 68, 53, -1, 178, 47, 68, -1, 178, 47, 52, 68, 53, -1, 178, 1, -1, 178, 47, 1, -1, 23, 180, 46, -1, 23, 1, 46, -1, 68, -1, 52, 68, 53, -1, 180, 68, -1, 180, 52, 68, 53, -1, 180, 47, 68, -1, 180, 47, 52, 68, 53, -1, 180, 1, -1, 180, 47, 1, -1, 27, 182, 46, -1, 27, 1, 46, -1, 68, -1, 182, 68, -1, 182, 47, 68, -1, 182, 1, -1, 182, 47, 1, -1, 189, 196, 219, -1, 68, 38, 39, 68, 52, 53, 207, 219, -1, 40, 68, 52, 210, 53, 184, 219, -1, 41, 193, 68, 52, 53, 219, -1, 42, 190, 198, 188, 46, -1, 43, 190, 198, 188, 46, -1, -1, 45, 185, -1, 186, -1, 185, 47, 186, -1, 68, 52, 203, 53, -1, -1, 54, 216, -1, -1, 54, 216, -1, 52, 216, 53, -1, 194, -1, 191, 194, -1, 195, 194, -1, 191, 195, 194, -1, 194, -1, 192, 194, -1, 195, 194, -1, 192, 195, 194, -1, 29, -1, 30, -1, 16, -1, 31, -1, 32, -1, 36, -1, 16, -1, -1, 36, -1, 68, -1, 33, -1, 34, -1, 35, -1, 204, -1, 208, 204, -1, 62, 204, -1, 208, 62, 204, -1, 200, -1, 208, 200, -1, 62, 200, -1, 208, 62, 200, -1, 201, -1, 208, 201, -1, 62, 201, -1, 208, 62, 201, -1, 208, 200, -1, 208, 62, 200, -1, 218, -1, 52, 199, 53, -1, 200, 58, 215, 59, -1, 200, 52, 210, 53, -1, 68, 38, 68, 202, -1, -1, 202, 58, 216, 59, -1, 216, -1, 203, 47, 216, -1, 205, 52, 210, 53, 207, -1, 205, 52, 1, 53, 207, -1, 206, -1, 205, 38, 206, -1, 68, -1, 39, 4, -1, -1, 33, -1, 64, -1, 64, 209, -1, 64, 208, -1, 64, 209, 208, -1, 195, -1, 209, 195, -1, -1, 37, -1, 211, -1, 211, 37, -1, 211, 47, 37, -1, 212, -1, 211, 47, 212, -1, 189, 197, 187, -1, 189, 213, 187, -1, 208, -1, 214, -1, 208, 214, -1, 52, 213, 53, -1, 214, 58, 215, 59, -1, 58, 215, 59, -1, 214, 52, 210, 53, -1, 52, 210, 53, -1, 216, -1, -1, 217, 90, -1, 68, -1, 63, 68, -1, 106, -1, -1, 1, 46, 220, 219, -1, 60, 222, 61, 45, -1, -1, 68, -1, 222, 47, 68, -1, 1, -1, 222, 1, -1, 222, 47, 1, -1, 222, 1, 68, -1, 28, 224, 46, -1, 28, 1, 46, -1, 68, -1, 224, 68, -1, 224, 47, 68, -1, 224, 1, -1, 224, 47, 1, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 286, 286, 291, 296, 308, 308, 316, 318, 322, 324, 330, 332, 334, 336, 338, 340, 342, 344, 349, 354, 356, 362, 361, 369, 370, 372, 374, 376, 382, 383, 388, 393, 395, 397, 399, 401, 406, 406, 406, 409, 415, 416, 418, 425, 426, 428, 434, 435, 440, 446, 448, 447, 460, 461, 466, 468, 470, 472, 474, 476, 478, 480, 482, 484, 486, 492, 493, 498, 500, 505, 506, 511, 512, 517, 519, 525, 526, 531, 533, 538, 540, 546, 548, 545, 553, 558, 560, 560, 572, 574, 571, 581, 583, 580, 589, 591, 598, 604, 606, 603, 613, 615, 614, 621, 623, 625, 627, 630, 629, 635, 634, 640, 644, 643, 649, 651, 653, 648, 662, 664, 662, 696, 698, 699, 697, 730, 731, 736, 736, 742, 748, 751, 756, 765, 778, 777, 785, 787, 792, 804, 805, 809, 811, 816, 818, 823, 823, 829, 831, 833, 838, 840, 842, 844, 846, 848, 853, 856, 859, 862, 865, 872, 873, 873, 873, 878, 880, 882, 884, 886, 889, 888, 893, 899, 900, 905, 907, 909, 911, 913, 915, 920, 923, 927, 930, 933, 936, 940, 939, 946, 945, 951, 958, 959, 964, 966, 968, 970, 972, 974, 979, 981, 986, 992, 991, 996, 1001, 1003, 1008, 1018, 1020, 1022, 1024, 1030, 1031, 1037, 1038, 1044, 1046, 1043, 1053, 1055, 1057, 1060, 1060, 1059, 1066, 1068, 1070, 1072, 1077, 1082, 1084, 1089, 1091, 1097, 1098, 1100, 1105, 1107, 1112, 1116, 1120, 1124, 1128, 1132, 1136, 1138, 1143, 1145, 1150, 1154, 1158, 1162, 1166, 1170, 1174, 1176, 1181, 1183, 1188, 1192, 1196, 1200, 1202, 1207, 1217, 1237, 1257, 1277, 1284, 1295, 1296, 1301, 1303, 1308, 1314, 1316, 1322, 1324, 1327, 1338, 1342, 1348, 1354, 1366, 1370, 1376, 1382, 1394, 1396, 1398, 1400, 1402, 1404, 1409, 1415, 1416, 1425, 1430, 1432, 1434, 1439, 1441, 1443, 1445, 1450, 1452, 1454, 1456, 1461, 1463, 1465, 1467, 1472, 1474, 1479, 1481, 1483, 1485, 1490, 1496, 1497, 1502, 1504, 1509, 1515, 1525, 1527, 1532, 1534, 1544, 1545, 1550, 1552, 1554, 1556, 1561, 1563, 1569, 1570, 1572, 1574, 1576, 1581, 1583, 1588, 1590, 1595, 1597, 1599, 1604, 1606, 1608, 1610, 1612, 1620, 1624, 1624, 1631, 1633, 1638, 1640, 1640, 1644, 1647, 1651, 1653, 1655, 1657, 1659, 1661, 1666, 1668, 1673, 1675, 1677, 1679, 1681 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "T_ID", "T_OPNAME", "T_INT", "T_CNEWLINES", "T_CLINE", "T_CEXPRESSION", "T_DOLLARVAR", "T_INCLUDEEND", "T_INCLUDESTART", "T_ENDOFINCLUDESTART", "T_LIST", "T_ARROW", "T_PROVIDED", "T_STATIC", "T_WITH", "T_FOREACH", "T_FOREACH_AFTER", "T_DEFAULT", "T_UNPBLOCKSTART", "T_UNPBLOCKEND", "T_PERCENTRVIEW", "T_PERCENTRVIEWVAR", "T_PERCENTUVIEW", "T_PERCENTUVIEWVAR", "T_PERCENTSTORAGECLASS", "T_PERCENTLANGUAGE", "T_AUTO", "T_REGISTER", "T_EXTERN", "T_TYPEDEF", "T_CONST", "T_VOLATILE", "T_UNSIGNED", "T_VIRTUAL", "T_DOTDOTDOT", "T_COLONCOLON", "T_OPERATOR", "T_CONSTRUCTOR", "T_DESTRUCTOR", "T_MEMBER", "T_ATTR", "T_BASECLASS", "':'", "';'", "','", "'{'", "'}'", "'!'", "'|'", "'('", "')'", "'='", "'\\n'", "'\"'", "'''", "'['", "']'", "'<'", "'>'", "'&'", "'$'", "'*'", "'.'", "$accept", "dollarvar", "id", "integer", "specification", "@1", "declarations", "declaration", "baseclassdeclaration", "baseclass_list", "phylumdeclaration", "@2", "storageoption", "productionblock", "alternatives", "alternative", "@3", "@4", "arguments", "Ccode_option", "attributes_option", "attribute", "attribute_init_option", "@5", "Cexpression", "Cexpression_elem", "Cexpression_inner", "Cexpression_elem_inner", "quote_or_error", "CexpressionDQ", "CexpressionDQ_elem", "CexpressionSQ", "CexpressionSQ_elem", "idCexpressions", "idCexpression", "@6", "@7", "withCexpression", "withCexpressions", "@8", "MainCbody", "@9", "@10", "MainCbodyinC", "@11", "@12", "MainCBodycontinuation", "Cbody", "@13", "@14", "Ctext", "@15", "Ctext_elem", "@16", "@17", "@18", "@19", "@20", "@21", "foreach_continuation", "@22", "@23", "foreach_end_continuation", "@24", "@25", "init_option", "includedeclaration", "@26", "includefiles_option", "includefiles", "rwdeclaration", "@27", "rwclauses", "rwclause", "semi_or_error", "patternchains", "patternchain", "patternchainitem_lineinfo", "@28", "patternchainitem", "outmostpatterns", "outmostpattern", "provideds", "@29", "@30", "pattern", "@31", "patternsoption", "patterns", "term", "@32", "@33", "termsoption", "terms", "withcases", "withcase", "unparsedeclaration", "@34", "unparseclauses", "unparseclause", "useviewnames", "unparseitems", "unparseitem", "@35", "@36", "@37", "@38", "unpsubterm", "unpattributes", "unpattribute", "viewnameoption", "uviewdeclaration", "defuviewnames", "rviewdeclaration", "defrviewnames", "storageclassdeclaration", "defstorageclasses", "ac_function_definition", "ac_opt_base_init_list", "ac_base_init_list", "ac_base_init", "ac_default_arg_init", "ac_opt_member_init", "ac_declaration_specifiers", "ac_member_declaration_specifiers", "ac_storage_class_specifier", "ac_member_storage_class_specifier", "opt_virtual", "ac_type_specifier", "ac_type_qualifier", "ac_fn_declarator", "ac_declarator", "ac_member_declarator", "ac_pointer_declarator", "ac_direct_declarator", "ac_direct_member_declarator", "ac_constant_expression_list", "ac_constant_expression_init_list", "ac_direct_fn_declarator", "ac_qualifier", "ac_fn_declarator_id", "ac_opt_const", "ac_pointer", "ac_type_qualifier_list", "ac_parameter_type_list", "ac_parameter_list", "ac_parameter_declaration", "ac_abstract_declarator", "ac_direct_abstract_declarator", "ac_constant_expression_option", "ac_constant_expression", "@39", "ac_identifier", "ac_compound_statement", "@40", "languageoption", "languageoptions", "languagedeclaration", "deflanguagenames", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 58, 59, 44, 123, 125, 33, 124, 40, 41, 61, 10, 34, 39, 91, 93, 60, 62, 38, 36, 42, 46 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 66, 67, 68, 69, 71, 70, 72, 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 74, 75, 75, 77, 76, 78, 78, 78, 78, 78, 79, 79, 79, 80, 80, 80, 80, 80, 82, 83, 81, 81, 84, 84, 84, 85, 85, 85, 86, 86, 87, 88, 89, 88, 90, 90, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 92, 92, 93, 93, 94, 94, 95, 95, 96, 96, 97, 97, 98, 98, 99, 99, 101, 102, 100, 103, 104, 105, 104, 107, 108, 106, 110, 111, 109, 112, 112, 112, 114, 115, 113, 116, 117, 116, 118, 118, 118, 118, 119, 118, 120, 118, 118, 121, 118, 122, 123, 124, 118, 126, 127, 125, 128, 129, 130, 128, 131, 131, 133, 132, 132, 134, 134, 135, 135, 137, 136, 138, 138, 139, 140, 140, 141, 141, 142, 142, 144, 143, 145, 145, 145, 146, 146, 146, 146, 146, 146, 147, 147, 147, 147, 147, 148, 149, 150, 148, 151, 151, 151, 151, 151, 152, 151, 151, 153, 153, 154, 154, 154, 154, 154, 154, 155, 155, 155, 155, 155, 155, 156, 155, 157, 155, 155, 158, 158, 159, 159, 159, 159, 159, 159, 160, 160, 161, 163, 162, 162, 164, 164, 165, 165, 165, 165, 165, 166, 166, 167, 167, 169, 170, 168, 168, 168, 168, 171, 172, 168, 173, 173, 173, 173, 173, 174, 174, 175, 175, 176, 176, 176, 177, 177, 178, 178, 178, 178, 178, 178, 178, 178, 179, 179, 180, 180, 180, 180, 180, 180, 180, 180, 181, 181, 182, 182, 182, 182, 182, 183, 183, 183, 183, 183, 183, 184, 184, 185, 185, 186, 187, 187, 188, 188, 188, 189, 189, 189, 189, 190, 190, 190, 190, 191, 191, 191, 191, 191, 191, 192, 193, 193, 194, 195, 195, 195, 196, 196, 196, 196, 197, 197, 197, 197, 198, 198, 198, 198, 199, 199, 200, 200, 200, 200, 201, 202, 202, 203, 203, 204, 204, 205, 205, 206, 206, 207, 207, 208, 208, 208, 208, 209, 209, 210, 210, 210, 210, 210, 211, 211, 212, 212, 213, 213, 213, 214, 214, 214, 214, 214, 215, 217, 216, 218, 218, 219, 220, 219, 221, 221, 222, 222, 222, 222, 222, 222, 223, 223, 224, 224, 224, 224, 224 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 1, 1, 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 3, 0, 7, 0, 3, 4, 2, 3, 0, 2, 1, 1, 3, 1, 3, 3, 0, 0, 6, 3, 0, 2, 4, 0, 4, 2, 0, 2, 4, 0, 0, 3, 0, 2, 1, 1, 1, 3, 3, 3, 3, 2, 2, 2, 2, 0, 2, 1, 1, 1, 1, 0, 2, 1, 1, 0, 2, 1, 1, 1, 3, 0, 0, 4, 1, 1, 0, 4, 0, 0, 5, 0, 0, 5, 1, 1, 1, 0, 0, 5, 0, 0, 3, 1, 1, 1, 1, 0, 4, 0, 4, 1, 0, 3, 0, 0, 0, 10, 0, 0, 9, 0, 0, 0, 7, 0, 1, 0, 5, 3, 0, 1, 1, 2, 0, 5, 1, 2, 5, 1, 1, 1, 3, 1, 3, 0, 2, 1, 3, 2, 1, 3, 1, 2, 3, 3, 2, 5, 3, 2, 2, 0, 0, 0, 6, 1, 4, 1, 1, 3, 0, 4, 1, 0, 1, 1, 3, 1, 2, 3, 3, 1, 4, 6, 6, 3, 3, 0, 4, 0, 4, 1, 0, 1, 1, 3, 1, 2, 3, 3, 1, 2, 3, 0, 5, 4, 1, 2, 5, 4, 5, 4, 2, 0, 2, 0, 2, 0, 0, 7, 3, 2, 4, 0, 0, 7, 1, 1, 2, 2, 4, 1, 2, 2, 2, 0, 2, 2, 3, 3, 1, 3, 2, 4, 3, 5, 2, 3, 3, 3, 1, 3, 2, 4, 3, 5, 2, 3, 3, 3, 1, 2, 3, 2, 3, 3, 8, 7, 6, 5, 5, 0, 2, 1, 3, 4, 0, 2, 0, 2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 1, 3, 4, 4, 4, 0, 4, 1, 3, 5, 5, 1, 3, 1, 2, 0, 1, 1, 2, 2, 3, 1, 2, 0, 1, 1, 2, 3, 1, 3, 3, 3, 1, 1, 2, 3, 4, 3, 4, 3, 1, 0, 2, 1, 2, 1, 0, 4, 4, 0, 1, 3, 1, 2, 3, 3, 3, 3, 1, 2, 3, 2, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint16 yydefact[] = { 5, 0, 7, 1, 0, 153, 3, 0, 292, 162, 0, 0, 0, 0, 290, 291, 293, 294, 300, 301, 302, 295, 0, 297, 0, 0, 0, 162, 299, 8, 18, 9, 12, 10, 0, 151, 13, 14, 15, 16, 11, 0, 0, 282, 0, 17, 0, 133, 128, 132, 0, 161, 0, 0, 251, 0, 0, 0, 241, 0, 0, 261, 0, 0, 375, 0, 0, 298, 0, 296, 299, 0, 0, 286, 0, 0, 0, 160, 0, 0, 0, 0, 0, 157, 154, 0, 0, 0, 0, 334, 330, 0, 303, 0, 328, 0, 283, 0, 284, 130, 0, 134, 163, 250, 0, 257, 249, 0, 0, 253, 240, 0, 247, 239, 0, 0, 243, 260, 264, 259, 0, 262, 374, 378, 373, 0, 376, 340, 0, 0, 0, 279, 311, 0, 287, 0, 288, 279, 0, 0, 27, 0, 0, 178, 4, 169, 171, 168, 166, 173, 176, 0, 0, 162, 159, 22, 156, 0, 0, 0, 155, 152, 331, 305, 338, 336, 335, 0, 89, 362, 266, 0, 0, 0, 304, 285, 0, 53, 252, 258, 0, 255, 0, 242, 248, 0, 245, 0, 265, 263, 379, 377, 341, 0, 0, 342, 345, 0, 313, 0, 358, 358, 0, 0, 312, 289, 0, 20, 0, 0, 28, 0, 25, 72, 0, 0, 162, 179, 0, 0, 206, 214, 0, 137, 0, 0, 207, 339, 337, 363, 0, 329, 0, 0, 306, 129, 164, 0, 254, 0, 244, 340, 358, 0, 0, 360, 277, 307, 349, 277, 350, 317, 272, 343, 0, 0, 322, 0, 53, 280, 270, 314, 271, 19, 0, 0, 26, 0, 0, 170, 158, 181, 180, 177, 34, 0, 0, 44, 0, 32, 0, 141, 140, 138, 136, 213, 0, 205, 208, 0, 97, 90, 102, 0, 142, 144, 0, 146, 201, 332, 332, 55, 2, 0, 57, 0, 0, 0, 56, 54, 0, 256, 246, 340, 0, 349, 0, 0, 0, 357, 0, 309, 361, 358, 347, 340, 358, 0, 308, 351, 348, 340, 358, 0, 0, 344, 346, 269, 321, 281, 359, 21, 332, 74, 75, 172, 73, 167, 30, 0, 0, 0, 0, 0, 0, 215, 0, 0, 364, 0, 0, 0, 146, 146, 146, 0, 147, 148, 202, 333, 327, 326, 64, 0, 62, 0, 63, 0, 65, 0, 165, 349, 318, 0, 315, 356, 352, 354, 0, 278, 0, 0, 310, 0, 0, 0, 273, 274, 268, 358, 0, 40, 41, 46, 126, 23, 36, 35, 33, 190, 188, 182, 192, 0, 212, 366, 210, 366, 91, 107, 104, 115, 113, 98, 106, 108, 110, 105, 112, 103, 203, 143, 145, 0, 150, 69, 60, 68, 67, 58, 78, 79, 59, 77, 61, 316, 320, 319, 355, 353, 358, 0, 0, 267, 38, 0, 48, 127, 0, 72, 76, 0, 0, 139, 0, 0, 211, 0, 217, 0, 209, 0, 0, 101, 72, 76, 149, 0, 324, 275, 323, 3, 42, 0, 50, 45, 0, 0, 197, 195, 0, 0, 186, 187, 0, 369, 367, 0, 216, 0, 218, 228, 227, 222, 236, 116, 146, 114, 102, 0, 0, 358, 276, 0, 39, 51, 0, 191, 189, 183, 198, 0, 0, 0, 224, 370, 0, 0, 366, 0, 72, 0, 230, 232, 229, 0, 221, 53, 0, 0, 109, 111, 325, 43, 53, 49, 200, 199, 196, 0, 0, 53, 372, 371, 368, 365, 223, 0, 0, 235, 234, 233, 238, 237, 85, 86, 117, 119, 100, 52, 184, 185, 225, 231, 71, 70, 219, 87, 0, 0, 0, 236, 53, 0, 82, 0, 80, 226, 220, 88, 146, 53, 0, 0, 146, 83, 81, 92, 120, 118, 84, 0, 122, 93, 123, 121, 0, 0, 94, 146, 124, 0, 0, 125 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 308, 70, 412, 1, 2, 4, 29, 30, 208, 31, 219, 82, 277, 278, 279, 402, 483, 454, 351, 404, 456, 516, 544, 564, 309, 373, 438, 576, 267, 346, 377, 443, 585, 586, 591, 600, 565, 566, 582, 169, 230, 359, 598, 601, 606, 291, 428, 473, 539, 292, 360, 429, 474, 475, 472, 471, 537, 578, 507, 579, 602, 605, 607, 611, 458, 32, 100, 48, 49, 33, 158, 222, 223, 284, 293, 294, 295, 296, 366, 34, 35, 83, 177, 310, 150, 213, 151, 152, 489, 460, 459, 490, 491, 297, 298, 36, 159, 225, 226, 280, 415, 468, 530, 581, 551, 580, 504, 532, 533, 536, 37, 59, 38, 55, 39, 62, 40, 334, 396, 397, 324, 202, 193, 71, 42, 72, 68, 43, 44, 91, 246, 131, 314, 384, 132, 338, 477, 92, 93, 94, 370, 133, 166, 316, 195, 196, 317, 250, 318, 319, 258, 251, 170, 289, 469, 497, 45, 65 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -417 static const yytype_int16 yypact[] = { -417, 41, -417, -417, 362, -417, -417, 539, -417, 17, 253, 336, 412, 522, -417, -417, -417, -417, -417, -417, -417, -417, 47, 58, 568, 568, 47, 17, 491, -417, -417, -417, -417, -417, 463, -417, -417, -417, -417, -417, -417, 167, 500, -417, 47, -417, 140, -417, -417, 158, 136, -417, 188, 47, -417, 441, 192, 47, -417, 468, 209, -417, 371, 269, -417, 597, 280, -417, 47, -417, -417, 23, 500, -417, 47, 23, 341, -417, 415, 240, 42, 36, 439, -417, 36, 162, 32, 485, 168, 515, -417, 80, -417, 103, -417, 120, -417, 47, -417, -417, 482, -417, -417, -417, 458, -417, -417, 380, 47, -417, -417, 471, -417, -417, 407, 47, -417, -417, -417, -417, 566, -417, -417, -417, -417, 569, -417, 622, 480, 47, 499, 554, -417, 43, -417, 47, -417, 554, 47, 47, -417, 608, 495, -417, -417, -417, -417, -417, 579, -417, -417, 529, 216, 431, -417, -417, -417, 506, 523, 533, -417, -417, -417, -417, -417, -417, 515, 567, -417, -417, -417, 168, 525, 168, -417, -417, 595, -417, -417, -417, 47, -417, 573, -417, -417, 47, -417, 583, -417, -417, -417, -417, -417, 128, 588, 289, -417, 593, -417, 47, -417, -417, 603, 47, -417, -417, 604, -417, 107, 626, -417, 570, -417, -417, 42, 137, 17, 137, 87, 586, -417, -417, 98, -417, 330, 366, -417, -417, -417, -417, 261, -417, 607, 627, -417, -417, 572, 628, -417, 629, -417, 404, -417, 70, 47, -417, 625, 199, 57, 625, 249, -417, 638, -417, 632, 80, -417, 631, -417, -417, -417, -417, -417, -417, 47, 633, -417, 62, 634, -417, -417, -417, -417, -417, -417, 47, 636, 637, 363, -417, 213, -417, -417, -417, -417, 645, 230, -417, -417, 80, -417, -417, 640, 592, 630, -417, 145, 642, -417, 660, 660, -417, -417, 444, -417, 264, 229, 288, -417, -417, 641, -417, -417, 404, 643, 142, 646, 647, 648, -417, 649, 199, -417, -417, -417, 622, -417, 70, 199, 249, -417, 622, -417, 47, 80, -417, -417, -417, 650, -417, 572, -417, 660, -417, -417, -417, -417, -417, -417, 224, 427, 651, 47, 639, 193, -417, 282, 422, -417, 652, 559, 654, -417, -417, -417, 47, -417, -417, -417, -417, -417, -417, -417, 565, -417, 266, -417, 204, -417, 538, -417, 319, -417, 70, 199, -417, -417, -417, 184, -417, 653, 655, 199, 656, 657, 658, 664, -417, -417, -417, 80, -417, -417, -417, 124, -417, -417, -417, -417, -417, -417, 663, -417, 234, -417, 453, -417, 504, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, 630, -417, 402, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, 199, -417, -417, -417, -417, -417, 47, 659, -417, 692, 47, -417, -417, 668, -417, -417, 301, 47, -417, 47, 47, -417, 644, -417, 45, -417, 667, 671, -417, -417, -417, -417, 433, -417, -417, -417, 675, -417, 672, 674, -417, 304, 344, -417, 14, 676, 241, 678, 679, 47, -417, -417, 77, -417, 47, -417, 684, 684, -417, 677, -417, -417, -417, 683, 411, 372, -417, -417, 47, -417, -417, 666, -417, -417, -417, 193, 365, 301, 301, -417, 47, 669, 681, 206, 680, -417, 670, 684, -417, 684, 673, -417, -417, 305, 685, -417, -417, -417, -417, -417, -417, 14, -417, 14, 682, 686, -417, -417, -417, -417, -417, -417, 47, 272, -417, -417, -417, -417, -417, 572, -417, 689, -417, -417, 572, -417, -417, 572, -417, -417, -417, -417, -417, 687, 47, 691, 677, -417, 690, -417, 451, -417, -417, -417, -417, -417, -417, 47, 693, 694, 572, -417, -417, -417, -417, -417, 261, 702, -417, -417, -417, 695, 696, -417, -417, 630, 697, 693, -417 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -417, -333, -4, -40, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, 155, -417, -417, -417, -417, -417, -417, -417, -417, -175, 231, 396, -417, -417, -295, -417, -416, -417, -417, 112, -417, -417, 123, -417, -417, -417, -417, -417, 115, -417, -417, 141, -330, -417, -417, 251, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, 524, -417, 381, -357, 384, -417, -417, -417, -70, 3, -417, -417, 138, -417, 535, -417, -337, -417, -417, -50, -417, 161, -296, -417, -417, -417, 527, 530, -342, -417, -417, -417, -417, -417, -417, 254, 143, 172, -417, -417, -417, -417, -417, -417, -417, -417, -417, 306, 509, 618, 755, 735, -417, -417, -417, 88, 0, -417, -417, 688, -417, -180, -95, -417, -417, -59, -417, 590, -55, -20, -417, -107, -417, 508, 571, -229, 260, -197, -417, -417, -232, -417, -417, -417, -417, -417 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -341 static const yytype_int16 yytable[] = { 28, 368, 236, 257, 259, 431, 54, 58, 61, 64, 375, 154, 51, 247, 156, 417, 161, 413, 66, 329, 194, 95, 76, 337, 74, 74, 6, 427, 462, 163, 77, 430, 50, 160, 198, 6, 174, 90, 204, 6, 149, 3, 97, 143, 487, 6, 6, 144, 6, 104, 6, 109, 9, 111, 302, 116, 9, 358, 121, 510, 6, 126, 145, 321, 128, 233, 498, 130, 328, 165, 343, 130, 135, 6, 457, 142, 148, 153, 525, 464, 153, 167, 153, 340, 90, 129, 329, 89, 272, 164, 6, 90, 144, 423, 67, -174, 27, 499, 146, 281, 27, 500, 398, 181, 182, 203, 147, 145, 261, 241, 186, 187, 73, 73, 234, 242, 189, 344, 345, 327, 244, 191, 320, 6, 526, 130, 389, 6, 168, 130, 96, 6, 98, 244, 207, 209, 501, 211, 527, 503, 6, 171, 144, 146, 282, 6, 228, 392, 6, 538, 99, 147, 329, 263, 264, 172, 528, 145, 221, 87, 134, 101, 136, 157, 486, 9, 227, 90, 453, 90, 6, 6, 423, 248, 149, 149, 237, 149, 149, 509, 241, 239, 173, 546, 548, 175, 242, 6, 102, 245, 243, 244, 89, 146, 241, 256, 6, 364, 144, 130, 242, 147, 452, 445, 383, 244, 87, 87, 365, 27, 148, 148, 440, 148, 148, 276, 6, 217, 390, 270, -204, 315, -135, 205, 393, 401, 367, -37, 556, 88, 376, 89, 465, 6, 103, 558, 320, -76, 110, 245, 322, 140, 520, 6, 245, 371, 383, 244, 462, 409, 410, 325, 610, 478, 52, 117, 6, 326, 354, 441, 341, 442, 290, 218, -146, 374, 467, -101, -101, -175, -101, 348, -72, 574, 343, 357, 355, -37, -101, -101, 343, -146, 355, 414, -76, -216, -76, 400, 521, 378, 141, -216, 153, 381, -194, 463, -66, -66, 368, 464, 388, 331, 488, -216, 6, 53, 144, 332, -216, -101, -101, 245, 343, -146, 542, 122, -101, -101, -101, -72, -72, 344, 439, 245, -146, -146, 253, 344, 575, 395, -216, 285, 127, -214, -216, -66, 254, 56, -216, 6, -66, -216, -216, -66, -66, -66, -66, -66, 276, 276, 411, 567, 440, 269, -193, 271, 273, 409, 410, 344, 517, 434, -6, 5, 352, 6, 547, 363, 6, 569, 144, 313, 118, 7, 6, -214, 572, 242, 8, 245, 440, 179, 9, 6, 245, 10, 138, 11, 57, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 441, 455, 518, 22, 23, 24, 25, 26, 6, 184, -31, 6, -31, 287, 60, 353, 6, 595, 119, 120, 343, 8, 409, 410, 416, 224, -216, 27, 441, 403, 541, -47, -216, 180, 14, 15, 16, 17, 18, 19, 20, 21, 192, 105, -216, 6, 372, 50, 395, -216, 362, 482, 484, -66, -66, 139, 476, 313, 411, 492, 185, 493, 494, 242, 496, 84, 502, 344, 540, 89, 112, -216, 6, 549, 550, -216, -47, -47, 85, -216, 465, 511, -216, -216, 80, 155, 81, 512, 106, 107, 162, 524, -66, -162, 108, 176, 529, -66, -66, 592, -66, -66, -66, -66, 6, 593, -162, 50, 406, 408, 543, 86, 178, 466, 467, 113, 114, 411, 411, 411, 411, 115, 552, 554, 63, 183, 6, 232, 560, 6, 78, 465, 563, 197, 18, 19, 20, -24, 199, -162, 79, 46, 8, 47, 80, 212, 81, 301, 302, 18, 19, 20, -131, 220, 573, 14, 15, 16, 17, 18, 19, 20, 21, 192, 470, 467, 419, 420, 188, 302, 6, 190, 6, 6, 301, 302, 584, 421, 422, -340, 89, 301, 302, 216, 221, 69, 435, 391, 274, 584, 6, 303, 224, 394, 304, 305, 306, 307, 444, 123, 275, 6, 18, 19, 20, 437, 235, 200, 423, 201, 210, 437, 6, 435, 229, 424, 425, 426, 303, 436, 266, 304, 305, 306, 307, 303, 6, 238, 304, 305, 306, 307, 214, -29, 215, -29, 6, 240, 361, 8, 362, 407, 252, 6, 124, 125, 495, 255, 6, 8, 260, 262, 14, 15, 16, 17, 18, 19, 20, 21, 192, 299, 14, 15, 16, 17, 18, 19, 20, 21, 335, 553, 559, 6, 6, 562, 561, 6, 561, 265, 323, 300, 311, 312, 333, 339, 350, 342, 347, 349, -95, 356, -96, 363, 369, 380, 481, 382, 405, 531, 385, 386, 418, 423, 379, 596, 589, 446, 387, 399, 448, 450, 451, 545, 89, 447, 461, 449, 485, 480, 505, 513, 604, 535, 506, 508, 514, 555, 613, 515, 519, 522, 523, -99, 557, 568, 570, 577, 587, 590, 571, 583, 597, 603, 599, 608, 433, 283, 432, 609, 268, 612, 594, 288, 588, 286, 206, 534, 479, 330, 41, 75, 231, 336, 137, 249 }; static const yytype_uint16 yycheck[] = { 4, 297, 177, 200, 201, 362, 10, 11, 12, 13, 305, 81, 9, 193, 84, 357, 86, 354, 22, 248, 127, 41, 26, 255, 24, 25, 3, 360, 14, 88, 27, 361, 15, 1, 129, 3, 95, 41, 133, 3, 80, 0, 42, 1, 460, 3, 3, 5, 3, 53, 3, 55, 20, 57, 9, 59, 20, 289, 62, 475, 3, 65, 20, 243, 68, 172, 21, 71, 248, 89, 8, 75, 72, 3, 404, 79, 80, 81, 1, 65, 84, 1, 86, 258, 88, 62, 315, 64, 1, 89, 3, 95, 5, 48, 36, 53, 64, 52, 56, 1, 64, 56, 334, 107, 108, 62, 64, 20, 203, 52, 114, 115, 24, 25, 173, 58, 120, 55, 56, 62, 63, 125, 52, 3, 47, 129, 323, 3, 48, 133, 42, 3, 44, 63, 138, 139, 469, 141, 61, 469, 3, 38, 5, 56, 46, 3, 166, 327, 3, 506, 10, 64, 381, 46, 47, 52, 498, 20, 60, 39, 72, 3, 74, 1, 459, 20, 166, 171, 400, 173, 3, 3, 48, 193, 214, 215, 180, 217, 218, 474, 52, 185, 62, 520, 521, 97, 58, 3, 52, 193, 62, 63, 64, 56, 52, 199, 3, 52, 5, 203, 58, 64, 399, 383, 62, 63, 39, 39, 63, 64, 214, 215, 8, 217, 218, 219, 3, 1, 325, 216, 58, 241, 60, 135, 331, 1, 296, 3, 22, 62, 1, 64, 26, 3, 46, 530, 52, 8, 46, 243, 244, 1, 1, 3, 248, 300, 62, 63, 14, 56, 57, 52, 609, 450, 1, 46, 3, 58, 45, 55, 264, 57, 1, 47, 3, 1, 60, 6, 7, 53, 9, 275, 8, 1, 8, 45, 280, 53, 17, 18, 8, 20, 286, 1, 55, 3, 57, 342, 47, 1, 50, 9, 296, 313, 53, 61, 8, 9, 594, 65, 320, 52, 1, 21, 3, 52, 5, 58, 26, 48, 49, 315, 8, 52, 511, 46, 55, 56, 57, 55, 56, 55, 56, 327, 63, 64, 37, 55, 56, 333, 48, 1, 52, 3, 52, 47, 47, 1, 56, 3, 52, 59, 60, 55, 56, 57, 58, 59, 352, 353, 354, 46, 8, 215, 53, 217, 218, 56, 57, 55, 56, 365, 0, 1, 1, 3, 1, 62, 3, 544, 5, 52, 1, 11, 3, 45, 551, 58, 16, 383, 8, 1, 20, 3, 388, 23, 45, 25, 52, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 55, 404, 57, 40, 41, 42, 43, 44, 3, 1, 46, 3, 48, 46, 1, 51, 3, 591, 46, 47, 8, 16, 56, 57, 1, 58, 3, 64, 55, 1, 57, 3, 9, 52, 29, 30, 31, 32, 33, 34, 35, 36, 37, 1, 21, 3, 1, 15, 451, 26, 47, 454, 455, 8, 9, 39, 53, 52, 461, 462, 52, 464, 465, 58, 467, 1, 469, 55, 56, 64, 1, 48, 3, 522, 523, 52, 48, 49, 14, 56, 26, 47, 59, 60, 52, 45, 54, 53, 46, 47, 4, 494, 47, 1, 52, 12, 499, 52, 53, 47, 55, 56, 57, 58, 3, 53, 14, 15, 352, 353, 513, 47, 53, 59, 60, 46, 47, 520, 521, 522, 523, 52, 525, 526, 1, 53, 3, 1, 531, 3, 38, 26, 535, 52, 33, 34, 35, 45, 38, 47, 48, 1, 16, 3, 52, 49, 54, 8, 9, 33, 34, 35, 12, 46, 557, 29, 30, 31, 32, 33, 34, 35, 36, 37, 59, 60, 6, 7, 1, 9, 3, 1, 3, 3, 8, 9, 579, 17, 18, 53, 64, 8, 9, 53, 60, 16, 47, 326, 1, 592, 3, 52, 58, 332, 55, 56, 57, 58, 59, 1, 13, 3, 33, 34, 35, 373, 10, 52, 48, 54, 1, 379, 3, 47, 46, 55, 56, 57, 52, 53, 49, 55, 56, 57, 58, 52, 3, 53, 55, 56, 57, 58, 52, 46, 54, 48, 3, 53, 45, 16, 47, 1, 53, 3, 46, 47, 1, 53, 3, 16, 46, 46, 29, 30, 31, 32, 33, 34, 35, 36, 37, 53, 29, 30, 31, 32, 33, 34, 35, 36, 37, 1, 1, 3, 3, 1, 532, 3, 534, 52, 54, 53, 53, 53, 45, 53, 48, 53, 53, 52, 49, 45, 49, 62, 33, 53, 3, 53, 46, 14, 53, 53, 49, 48, 307, 592, 582, 53, 59, 58, 53, 52, 47, 46, 64, 59, 52, 59, 49, 59, 52, 45, 19, 45, 52, 473, 53, 45, 612, 54, 53, 52, 52, 49, 53, 49, 53, 47, 46, 48, 53, 53, 48, 601, 49, 49, 364, 222, 363, 52, 214, 53, 590, 225, 581, 224, 137, 502, 451, 249, 4, 25, 171, 254, 75, 193 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 70, 71, 0, 72, 1, 3, 11, 16, 20, 23, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 40, 41, 42, 43, 44, 64, 68, 73, 74, 76, 132, 136, 146, 147, 162, 177, 179, 181, 183, 189, 191, 194, 195, 223, 1, 3, 134, 135, 15, 148, 1, 52, 68, 180, 1, 52, 68, 178, 1, 68, 182, 1, 68, 224, 68, 36, 193, 16, 68, 190, 192, 194, 195, 190, 68, 148, 38, 48, 52, 54, 78, 148, 1, 14, 47, 39, 62, 64, 68, 196, 204, 205, 206, 208, 194, 195, 194, 10, 133, 3, 52, 46, 68, 1, 46, 47, 52, 68, 46, 68, 1, 46, 47, 52, 68, 46, 1, 46, 47, 68, 46, 1, 46, 47, 68, 52, 68, 62, 68, 198, 201, 208, 194, 195, 194, 198, 45, 39, 1, 50, 68, 1, 5, 20, 56, 64, 68, 69, 151, 153, 154, 68, 147, 45, 147, 1, 137, 163, 1, 147, 4, 204, 195, 208, 209, 1, 48, 106, 219, 38, 52, 62, 204, 194, 12, 149, 53, 1, 52, 68, 68, 53, 1, 52, 68, 68, 1, 68, 1, 68, 37, 189, 210, 211, 212, 52, 201, 38, 52, 54, 188, 62, 201, 194, 188, 68, 75, 68, 1, 68, 49, 152, 52, 54, 53, 1, 47, 77, 46, 60, 138, 139, 58, 164, 165, 195, 208, 46, 107, 206, 1, 210, 204, 10, 90, 68, 53, 68, 53, 52, 58, 62, 63, 68, 197, 200, 208, 213, 214, 218, 53, 37, 47, 53, 68, 216, 217, 216, 46, 201, 46, 46, 47, 52, 49, 95, 153, 151, 148, 151, 1, 151, 1, 13, 68, 79, 80, 81, 166, 1, 46, 139, 140, 1, 166, 46, 165, 220, 1, 112, 116, 141, 142, 143, 144, 160, 161, 53, 53, 8, 9, 52, 55, 56, 57, 58, 67, 91, 150, 53, 53, 52, 199, 208, 210, 213, 215, 216, 52, 200, 68, 54, 187, 52, 58, 62, 200, 214, 187, 52, 58, 45, 184, 37, 212, 219, 202, 53, 90, 68, 53, 8, 55, 56, 96, 53, 68, 52, 48, 85, 1, 51, 45, 68, 45, 45, 219, 108, 117, 45, 47, 62, 52, 63, 145, 147, 161, 33, 207, 207, 1, 92, 1, 95, 1, 97, 1, 92, 53, 208, 53, 62, 200, 53, 53, 59, 208, 216, 210, 215, 200, 210, 215, 68, 185, 186, 219, 58, 207, 1, 82, 1, 86, 46, 81, 1, 81, 56, 57, 68, 69, 155, 1, 167, 1, 167, 49, 6, 7, 17, 18, 48, 55, 56, 57, 67, 113, 118, 113, 142, 143, 141, 68, 47, 53, 91, 93, 56, 8, 55, 57, 98, 59, 200, 53, 59, 53, 59, 52, 47, 216, 219, 84, 68, 87, 113, 131, 157, 156, 52, 14, 61, 65, 26, 59, 60, 168, 221, 59, 122, 121, 114, 119, 120, 53, 203, 216, 186, 59, 3, 68, 83, 68, 49, 95, 97, 1, 155, 158, 159, 68, 68, 68, 1, 68, 222, 21, 52, 56, 67, 68, 113, 173, 52, 52, 125, 116, 95, 97, 47, 53, 45, 53, 54, 88, 56, 57, 53, 1, 47, 52, 52, 68, 1, 47, 61, 167, 68, 169, 14, 174, 175, 174, 45, 176, 123, 142, 115, 56, 57, 216, 68, 89, 46, 155, 1, 155, 158, 158, 171, 68, 1, 68, 45, 22, 53, 95, 1, 68, 175, 1, 68, 90, 103, 104, 46, 49, 90, 53, 53, 90, 68, 1, 56, 94, 47, 124, 126, 172, 170, 105, 53, 68, 99, 100, 46, 176, 103, 48, 101, 47, 53, 160, 90, 100, 48, 109, 49, 102, 110, 127, 112, 19, 128, 111, 129, 49, 52, 142, 130, 53, 109 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void yy_stack_print (bottom, top) yytype_int16 *bottom; yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); for (; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { fprintf (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); fprintf (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into YYRESULT an error message about the unexpected token YYCHAR while in state YYSTATE. Return the number of bytes copied, including the terminating null byte. If YYRESULT is null, do not copy anything; just return the number of bytes that would be copied. As a special case, return 0 if an ordinary "syntax error" message will do. Return YYSIZE_MAXIMUM if overflow occurs during size calculation. */ static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar) { int yyn = yypact[yystate]; if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) return 0; else { int yytype = YYTRANSLATE (yychar); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; int yysize_overflow = 0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; # if 0 /* This is so xgettext sees the translatable formats that are constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); # endif char *yyfmt; char const *yyf; static char const yyunexpected[] = "syntax error, unexpected %s"; static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected + sizeof yyexpecting - 1 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yycount = 1; yyarg[0] = yytname[yytype]; yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; yyformat[sizeof yyunexpected - 1] = '\0'; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; yyfmt = yystpcpy (yyfmt, yyprefix); yyprefix = yyor; } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; if (yysize_overflow) return YYSIZE_MAXIMUM; if (yyresult) { /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ char *yyp = yyresult; int yyi = 0; while ((*yyp = *yyf) != '\0') { if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyf += 2; } else { yyp++; yyf++; } } } return yysize; } } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /* The look-ahead symbol. */ int yychar; /* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif /* Three stacks and their tools: `yyss': related to states, `yyvs': related to semantic values, `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss = yyssa; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvsp; #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a look-ahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a look-ahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } if (yyn == YYFINAL) YYACCEPT; /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: { (yyval.yt_INT) = Int( (yyvsp[(1) - (1)].yt_integer) ); pf_setfileline( (yyval.yt_INT) ); ;} break; case 3: { (yyval.yt_ID) = Id( Str( (yyvsp[(1) - (1)].yt_casestring) )); pf_setfileline( (yyval.yt_ID) ); ;} break; case 4: { (yyval.yt_INT) = Int( (yyvsp[(1) - (1)].yt_integer) ); pf_setfileline( (yyval.yt_INT) ); ;} break; case 5: { /* initialize variables and scanner state */ pl_phylum = 0; pl_withvariables = Nilwithexpressions(); do_NORMAL(); ;} break; case 9: { Thephylumdeclarations = mergephylumdeclarations( (yyvsp[(1) - (1)].yt_phylumdeclaration), Thephylumdeclarations ); ;} break; case 10: { Therwdeclarations = Consrwdeclarations( (yyvsp[(1) - (1)].yt_rwdeclaration), Therwdeclarations ); ;} break; case 11: { Thefndeclarations = Consfndeclarations( (yyvsp[(1) - (1)].yt_fndeclaration), Thefndeclarations ); ;} break; case 12: { ;} break; case 13: { Theunparsedeclarations = Consunparsedeclarations( (yyvsp[(1) - (1)].yt_unparsedeclaration), Theunparsedeclarations ); ;} break; case 14: { ;} break; case 15: { ;} break; case 16: { ;} break; case 17: { Thelanguages = merge_languagenames( (yyvsp[(1) - (1)].yt_languagenames), Thelanguages ); ;} break; case 18: { Thebaseclasses = Consbaseclass_declarations( (yyvsp[(1) - (1)].yt_baseclass_decl), Thebaseclasses ); ;} break; case 19: { (yyval.yt_baseclass_decl)=BaseClassDecl( (yyvsp[(2) - (5)].yt_ID), (yyvsp[(4) - (5)].yt_baseclass_list) ); ;} break; case 20: { (yyval.yt_baseclass_list)=Consbaseclass_list((yyvsp[(1) - (1)].yt_ID),Nilbaseclass_list()); ;} break; case 21: { (yyval.yt_baseclass_list)=Consbaseclass_list((yyvsp[(3) - (3)].yt_ID),(yyvsp[(1) - (3)].yt_baseclass_list)); ;} break; case 22: { pl_phylum = (yyvsp[(1) - (3)].yt_ID); ;} break; case 23: { (yyval.yt_phylumdeclaration) = PhylumDeclaration( (yyvsp[(1) - (7)].yt_ID), (yyvsp[(2) - (7)].yt_storageoption), (yyvsp[(5) - (7)].yt_productionblock), (yyvsp[(6) - (7)].yt_Ccode_option) ); v_extendoccur( pl_phylum, ITUserPhylum( (yyval.yt_phylumdeclaration) ) ); ;} break; case 24: { (yyval.yt_storageoption) = NoStorageOption(); ;} break; case 25: { (yyval.yt_storageoption) = PositiveStorageOption( (yyvsp[(2) - (3)].yt_ID) ); v_extendoccur( (yyvsp[(2) - (3)].yt_ID), ITStorageClass() ); ;} break; case 26: { (yyval.yt_storageoption) = NegativeStorageOption( (yyvsp[(3) - (4)].yt_ID) ); v_extendoccur( (yyvsp[(3) - (4)].yt_ID), ITStorageClass() ); ;} break; case 27: { (yyval.yt_storageoption) = NoStorageOption(); ;} break; case 28: { (yyval.yt_storageoption) = NoStorageOption(); ;} break; case 29: { (yyval.yt_productionblock) = Emptyproductionblock(); ;} break; case 30: { (yyval.yt_productionblock) = ListAlternatives( makeListAlternatives( pl_phylum, (yyvsp[(2) - (2)].yt_ID) ), (yyvsp[(2) - (2)].yt_ID) ); Theargsnumbers = insert_in_argsnumbers(0, Theargsnumbers); Theargsnumbers = insert_in_argsnumbers(2, Theargsnumbers); ;} break; case 31: { (yyval.yt_productionblock) = NonlistAlternatives( (yyvsp[(1) - (1)].yt_alternatives) ); ;} break; case 32: { (yyval.yt_alternatives) = Consalternatives( (yyvsp[(1) - (1)].yt_alternative), Nilalternatives() ); ;} break; case 33: { yyerrok; (yyval.yt_alternatives) = Consalternatives( (yyvsp[(3) - (3)].yt_alternative), (yyvsp[(1) - (3)].yt_alternatives) ); ;} break; case 34: { (yyval.yt_alternatives) = Nilalternatives(); ;} break; case 35: { (yyval.yt_alternatives) = (yyvsp[(1) - (3)].yt_alternatives); ;} break; case 36: { yyerrok; (yyval.yt_alternatives)=Consalternatives( (yyvsp[(3) - (3)].yt_alternative), (yyvsp[(1) - (3)].yt_alternatives) ); ;} break; case 37: { pg_no_of_arguments = 0; ;} break; case 38: { Theargsnumbers = insert_in_argsnumbers(pg_no_of_arguments, Theargsnumbers); ;} break; case 39: { (yyval.yt_alternative) = Alternative( (yyvsp[(1) - (6)].yt_ID), (yyvsp[(4) - (6)].yt_arguments) ); v_extendoccur( (yyvsp[(1) - (6)].yt_ID), ITUserOperator( (yyval.yt_alternative), pl_phylum ) ); ;} break; case 40: { (yyval.yt_alternative) = Alternative( (yyvsp[(1) - (3)].yt_ID), Nilarguments()); ;} break; case 41: { (yyval.yt_arguments) = Nilarguments(); ;} break; case 42: { (yyval.yt_arguments) = Consarguments( (yyvsp[(2) - (2)].yt_ID), (yyvsp[(1) - (2)].yt_arguments) ); pg_no_of_arguments++; ;} break; case 43: { (yyvsp[(4) - (4)].yt_ID)->named_subphylum = (yyvsp[(2) - (4)].yt_casestring); (yyval.yt_arguments) = Consarguments( (yyvsp[(4) - (4)].yt_ID), (yyvsp[(1) - (4)].yt_arguments) ); pg_no_of_arguments++; ;} break; case 44: { (yyval.yt_Ccode_option) = CcodeOption( Nilattributes(), NilCtexts() ); ;} break; case 45: { (yyval.yt_Ccode_option) = CcodeOption( (yyvsp[(2) - (4)].yt_attributes), (yyvsp[(3) - (4)].yt_Ctexts) ); ;} break; case 46: { (yyval.yt_Ccode_option) = CcodeOption( Nilattributes(), NilCtexts() ); ;} break; case 47: { (yyval.yt_attributes) = Nilattributes(); ;} break; case 48: { (yyval.yt_attributes) = Consattributes( (yyvsp[(2) - (2)].yt_attribute), (yyvsp[(1) - (2)].yt_attributes) ); ;} break; case 49: { (yyval.yt_attribute) = Attribute( (yyvsp[(1) - (4)].yt_ID), (yyvsp[(2) - (4)].yt_ID), (yyvsp[(3) - (4)].yt_attribute_initialisation_option) ); ;} break; case 50: { (yyval.yt_attribute_initialisation_option) = Noattribute_initialisation(); ;} break; case 51: { do_CEXPR(); ;} break; case 52: { do_NORMAL(); (yyval.yt_attribute_initialisation_option) = Yesattribute_initialisation( (yyvsp[(3) - (3)].yt_Cexpression) ); ;} break; case 53: { (yyval.yt_Cexpression) = NilCexpression(); pf_setfileline( (yyval.yt_Cexpression) ); ;} break; case 54: { (yyval.yt_Cexpression) = ConsCexpression( (yyvsp[(2) - (2)].yt_Cexpression_elem), (yyvsp[(1) - (2)].yt_Cexpression) ); (yyval.yt_Cexpression)->file = (yyvsp[(1) - (2)].yt_Cexpression)->file; (yyval.yt_Cexpression)->line = (yyvsp[(1) - (2)].yt_Cexpression)->line; ;} break; case 55: { (yyval.yt_Cexpression_elem) = CExpressionPart( (yyvsp[(1) - (1)].yt_casestring) ); ;} break; case 56: { (yyval.yt_Cexpression_elem) = CExpressionDollarvar( (yyvsp[(1) - (1)].yt_INT) ); ;} break; case 57: { (yyval.yt_Cexpression_elem) = CExpressionNl(); ;} break; case 58: { (yyval.yt_Cexpression_elem) = CExpressionDQ( (yyvsp[(2) - (3)].yt_CexpressionDQ) ); ;} break; case 59: { (yyval.yt_Cexpression_elem) = CExpressionSQ( (yyvsp[(2) - (3)].yt_CexpressionSQ) ); ;} break; case 60: { (yyval.yt_Cexpression_elem) = CExpressionPack( (yyvsp[(2) - (3)].yt_Cexpression) ); ;} break; case 61: { (yyval.yt_Cexpression_elem) = CExpressionArray( (yyvsp[(2) - (3)].yt_Cexpression) ); ;} break; case 62: { (yyval.yt_Cexpression_elem) = CExpressionPart(mkcasestring("")); ;} break; case 63: { (yyval.yt_Cexpression_elem) = CExpressionPart(mkcasestring("")); ;} break; case 64: { (yyval.yt_Cexpression_elem) = CExpressionPart(mkcasestring("")); ;} break; case 65: { (yyval.yt_Cexpression_elem) = CExpressionArray( ConsCexpression( CExpressionPart(mkcasestring("")), NilCexpression())); ;} break; case 66: { (yyval.yt_Cexpression) = NilCexpression(); pf_setfileline( (yyval.yt_Cexpression) ); ;} break; case 67: { (yyval.yt_Cexpression) = ConsCexpression( (yyvsp[(2) - (2)].yt_Cexpression_elem), (yyvsp[(1) - (2)].yt_Cexpression) ); (yyval.yt_Cexpression)->file = (yyvsp[(1) - (2)].yt_Cexpression)->file; (yyval.yt_Cexpression)->line = (yyvsp[(1) - (2)].yt_Cexpression)->line; ;} break; case 68: { (yyval.yt_Cexpression_elem) = (yyvsp[(1) - (1)].yt_Cexpression_elem); ;} break; case 69: { (yyval.yt_Cexpression_elem) = CExpressionPart( mkcasestring(",") ); ;} break; case 72: { (yyval.yt_CexpressionDQ) = NilCexpressionDQ(); ;} break; case 73: { (yyval.yt_CexpressionDQ) = ConsCexpressionDQ( (yyvsp[(2) - (2)].yt_CexpressionDQ_elem), (yyvsp[(1) - (2)].yt_CexpressionDQ) ); ;} break; case 74: { (yyval.yt_CexpressionDQ_elem) = CExpressionDQPart( (yyvsp[(1) - (1)].yt_casestring) ); ;} break; case 75: { (yyval.yt_CexpressionDQ_elem) = CExpressionDQNl(); ;} break; case 76: { (yyval.yt_CexpressionSQ) = NilCexpressionSQ(); ;} break; case 77: { (yyval.yt_CexpressionSQ) = ConsCexpressionSQ( (yyvsp[(2) - (2)].yt_CexpressionSQ_elem), (yyvsp[(1) - (2)].yt_CexpressionSQ) ); ;} break; case 78: { (yyval.yt_CexpressionSQ_elem) = CExpressionSQPart( (yyvsp[(1) - (1)].yt_casestring) ); ;} break; case 79: { (yyval.yt_CexpressionSQ_elem) = CExpressionSQNl(); ;} break; case 80: { (yyval.yt_idCexpressions) = ConsidCexpressions( (yyvsp[(1) - (1)].yt_idCexpression), NilidCexpressions() ); ;} break; case 81: { (yyval.yt_idCexpressions) = ConsidCexpressions( (yyvsp[(3) - (3)].yt_idCexpression), (yyvsp[(1) - (3)].yt_idCexpressions) ); ;} break; case 82: { do_CEXPR(); ;} break; case 83: { do_NORMAL(); ;} break; case 84: { (yyval.yt_idCexpression) = IdCexpression( (yyvsp[(1) - (4)].yt_ID), (yyvsp[(3) - (4)].yt_Cexpression) ); ;} break; case 85: { (yyval.yt_withexpression) = WECexpression( (yyvsp[(1) - (1)].yt_Cexpression) ); pf_setstacktopfileline( (yyval.yt_withexpression) ); ;} break; case 86: { (yyval.yt_withexpressions) = Conswithexpressions( (yyvsp[(1) - (1)].yt_withexpression), Nilwithexpressions() ); ;} break; case 87: { pf_pushfileline(); ;} break; case 88: { (yyval.yt_withexpressions) = Conswithexpressions( (yyvsp[(4) - (4)].yt_withexpression), (yyvsp[(1) - (4)].yt_withexpressions) ); pf_popfileline(); ;} break; case 89: { do_MainC(); pf_pushfileline(); pf_pushwithvariable(); pf_resetwithvariable(); ;} break; case 90: { do_NORMAL(); ;} break; case 91: { yyerrok; (yyval.yt_Ctext) = (yyvsp[(3) - (5)].yt_Ctext); pf_setstacktopfileline( (yyval.yt_Ctext) ); pf_popfileline(); pf_popwithvariable(); ;} break; case 92: { do_MainC(); pf_pushfileline(); pf_pushwithvariable(); pf_resetwithvariable(); ;} break; case 93: { do_C(); ;} break; case 94: { yyerrok; (yyval.yt_Ctext) = (yyvsp[(3) - (5)].yt_Ctext); pf_setstacktopfileline( (yyval.yt_Ctext) ); pf_popfileline(); pf_popwithvariable(); ;} break; case 95: { (yyval.yt_Ctext) = (yyvsp[(1) - (1)].yt_Ctext); pf_setstacktopfileline( (yyval.yt_Ctext) ); ;} break; case 96: { Ctext_elem tmp = CTextWithexpression( pf_topwithvariable(), (yyvsp[(1) - (1)].yt_withcases), NotInForeachContext() ); pf_setstacktopfileline( tmp ); (yyval.yt_Ctext) = ConsCtext( tmp, NilCtext() ); pf_setstacktopfileline( (yyval.yt_Ctext) ); if (! non_default_outmostpattern ) v_report(NonFatal( NoFileLine(), Problem1S( "can not infer type from 'default' pattern(s)" ))); non_default_outmostpattern = 0; ;} break; case 97: { (yyval.yt_Ctext) = NilCtext(); ;} break; case 98: { do_C(); pf_pushfileline(); pf_push_no_operators(); ;} break; case 99: { do_NORMAL(); ;} break; case 100: { (yyval.yt_Ctext) = (yyvsp[(3) - (5)].yt_Ctext); pf_setstacktopfileline( (yyval.yt_Ctext) ); pf_popfileline(); pf_pop_no_operators(); ;} break; case 101: { (yyval.yt_Ctext) = NilCtext(); pf_setfileline( (yyval.yt_Ctext) ); ;} break; case 102: { pf_pushfileline(); ;} break; case 103: { (yyval.yt_Ctext) = ConsCtext( (yyvsp[(3) - (3)].yt_Ctext_elem), (yyvsp[(1) - (3)].yt_Ctext) ); pf_setstacktopfileline( (yyvsp[(3) - (3)].yt_Ctext_elem) ); pf_popfileline(); (yyval.yt_Ctext)->file = (yyvsp[(1) - (3)].yt_Ctext)->file; (yyval.yt_Ctext)->line = (yyvsp[(1) - (3)].yt_Ctext)->line; ;} break; case 104: { (yyval.yt_Ctext_elem) = CTextLine( (yyvsp[(1) - (1)].yt_casestring) ); ;} break; case 105: { (yyval.yt_Ctext_elem) = CTextDollarVar( (yyvsp[(1) - (1)].yt_INT) ); ;} break; case 106: { (yyval.yt_Ctext_elem) = CTextNl( mkinteger(1) ); ;} break; case 107: { (yyval.yt_Ctext_elem) = CTextNl( (yyvsp[(1) - (1)].yt_integer) ); ;} break; case 108: { do_CEXPRDQ(); ;} break; case 109: { do_C(); (yyval.yt_Ctext_elem) = CTextCexpressionDQ( (yyvsp[(3) - (4)].yt_CexpressionDQ) ); ;} break; case 110: { do_CEXPRSQ(); ;} break; case 111: { do_C(); (yyval.yt_Ctext_elem) = CTextCexpressionSQ( (yyvsp[(3) - (4)].yt_CexpressionSQ) ); ;} break; case 112: { do_C(); (yyval.yt_Ctext_elem) = CTextCbody( (yyvsp[(1) - (1)].yt_Ctext) ); ;} break; case 113: { do_NORMAL(); ;} break; case 114: { do_C(); (yyval.yt_Ctext_elem) = (yyvsp[(3) - (3)].yt_Ctext_elem); ;} break; case 115: { do_NORMAL(); ;} break; case 116: { do_CEXPR(); pf_pushfileline(); ;} break; case 117: { do_NORMAL(); pf_popfileline(); ;} break; case 118: { do_C(); (yyval.yt_Ctext_elem) = CTextWithexpression( (yyvsp[(5) - (10)].yt_withexpressions), (yyvsp[(9) - (10)].yt_withcases), NotInForeachContext() ); if (! non_default_outmostpattern ) v_report(NonFatal( NoFileLine(), Problem1S( "can not infer type from 'default' pattern(s)" ))); non_default_outmostpattern = 0; ;} break; case 119: { non_default_outmostpattern = 0; ;} break; case 120: { pf_pushidCexpressions((yyvsp[(5) - (7)].yt_idCexpressions)); ;} break; case 121: { patternchains pc_list = Conspatternchains((yyvsp[(2) - (9)].yt_patternchain), Nilpatternchains()); patternchains rewritten = pc_list->rewrite(base_rview); withexpressions wexpr = pf_gen_foreachwith_vars( (yyvsp[(5) - (9)].yt_idCexpressions) ); Ctext_elem ctwe = CTextWithexpression( wexpr, Conswithcases( Withcase( syn_patternchains_fileline( rewritten, pg_filename, pg_lineno ), (yyvsp[(7) - (9)].yt_Ctext) ), Nilwithcases() ), InForeachContext((yyvsp[(2) - (9)].yt_patternchain)) ); Ctext ctxts0 = NilCtext(); Ctext ctxts1 = ConsCtext( ctwe, ctxts0 ); pf_setstacktopfileline( ctwe ); pf_setstacktopfileline( ctxts0 ); pf_setstacktopfileline( ctxts1 ); check_no_patternchaingroup_in_patternchain( (yyvsp[(2) - (9)].yt_patternchain)->file, (yyvsp[(2) - (9)].yt_patternchain)->line, (yyvsp[(2) - (9)].yt_patternchain), "'foreach variable/pattern'" ); (yyval.yt_Ctext_elem) = CTextForeachexpression( (yyvsp[(2) - (9)].yt_patternchain), (yyvsp[(5) - (9)].yt_idCexpressions), wexpr, ctxts1, (yyvsp[(9) - (9)].yt_foreach_after)); pf_popidCexpressions(); ;} break; case 122: { (yyval.yt_foreach_after) = NoForeachAfter(); ;} break; case 123: { do_NORMAL(); pf_pushfileline(); ;} break; case 124: { non_default_outmostpattern = 0; ;} break; case 125: { patternchains pc_list = Conspatternchains((yyvsp[(4) - (7)].yt_patternchain), Nilpatternchains()); patternchains rewritten = pc_list->rewrite(base_rview); withexpressions wexpr = pf_gen_foreachwith_listvars( pf_topidCexpressions() ); Ctext_elem ctwe = CTextWithexpression( wexpr, Conswithcases( Withcase( syn_patternchains_fileline( rewritten, pg_filename, pg_lineno ), (yyvsp[(7) - (7)].yt_Ctext) ), Nilwithcases() ), InForeachContext((yyvsp[(4) - (7)].yt_patternchain)) ); Ctext ctxts0 = NilCtext(); Ctext ctxts1 = ConsCtext( ctwe, ctxts0 ); pf_setstacktopfileline( ctwe ); pf_setstacktopfileline( ctxts0 ); pf_setstacktopfileline( ctxts1 ); check_no_patternchaingroup_or_pattern_in_patternchain( (yyvsp[(4) - (7)].yt_patternchain)->file, (yyvsp[(4) - (7)].yt_patternchain)->line, (yyvsp[(4) - (7)].yt_patternchain), "'foreach variable/pattern'" ); (yyval.yt_foreach_after) = ForeachAfter( (yyvsp[(4) - (7)].yt_patternchain), pf_topidCexpressions(), wexpr, ctxts1 ); pf_setstacktopfileline( (yyval.yt_foreach_after) ); pf_popfileline(); ;} break; case 126: { (yyval.yt_Ctexts) = NilCtexts(); ;} break; case 127: { (yyval.yt_Ctexts) = ConsCtexts( (yyvsp[(1) - (1)].yt_Ctext), NilCtexts() ); ;} break; case 128: { pf_pushfileline(); ;} break; case 129: {{includedeclaration pl_includedeclaration = IncludeDeclaration( (yyvsp[(5) - (5)].yt_casestring) ); set_includefiles( (yyvsp[(2) - (5)].yt_includefiles), pl_includedeclaration ); pf_setstacktopfileline( pl_includedeclaration ); pf_popfileline(); };} break; case 130: { (yyval.yt_includedeclaration) =IncludeDeclaration(mkcasestring("")); ;} break; case 131: {{ includefile pl_includefile = IncludeFile( mkcasestring("CODE") ); (yyval.yt_includefiles) = Consincludefiles( pl_includefile, Nilincludefiles() ); };} break; case 132: { (yyval.yt_includefiles) = (yyvsp[(1) - (1)].yt_includefiles); ;} break; case 133: {{ includefile pl_includefile = IncludeFile( (yyvsp[(1) - (1)].yt_casestring) ); if ((pl_includefile->inc_type == include_file) || (pl_includefile->inc_type == include_header)) { (yyval.yt_includefiles) = Consincludefiles( pl_includefile, Nilincludefiles() ); } else { v_report(NonFatal( NoFileLine(), ProblemSC( "unknown include redirection keyword:", (yyvsp[(1) - (1)].yt_casestring) ))); (yyval.yt_includefiles) = Nilincludefiles(); } };} break; case 134: {{ includefile pl_includefile = IncludeFile( (yyvsp[(2) - (2)].yt_casestring) ); if ((pl_includefile->inc_type == include_file) || (pl_includefile->inc_type == include_header)) { (yyval.yt_includefiles) = Consincludefiles( pl_includefile, (yyvsp[(1) - (2)].yt_includefiles) ); } else { v_report(NonFatal( NoFileLine(), ProblemSC( "unknown include redirection keyword:", (yyvsp[(2) - (2)].yt_casestring) ))); (yyval.yt_includefiles) = (yyvsp[(1) - (2)].yt_includefiles); } };} break; case 135: { if (! non_default_outmostpattern ) v_report(NonFatal( NoFileLine(), Problem1S( "can not infer type from 'default' pattern(s)" ))); non_default_outmostpattern = 0; ;} break; case 136: { yyerrok; (yyval.yt_rwdeclaration) = RwDeclaration( (yyvsp[(1) - (5)].yt_outmostpatterns), (yyvsp[(4) - (5)].yt_rewriteclauses) ); ;} break; case 137: { (yyval.yt_rewriteclauses) = Consrewriteclauses( (yyvsp[(1) - (1)].yt_rewriteclause), Nilrewriteclauses() ); ;} break; case 138: { (yyval.yt_rewriteclauses) = Consrewriteclauses( (yyvsp[(2) - (2)].yt_rewriteclause), (yyvsp[(1) - (2)].yt_rewriteclauses) ); ;} break; case 139: { if ((yyvsp[(2) - (5)].yt_viewnames)->eq(Nilviewnames())) { (yyval.yt_rewriteclause) = RewriteClause( Consviewnames( Id( Str( mkcasestring( "base_rview" ))), (yyvsp[(2) - (5)].yt_viewnames) ), (yyvsp[(4) - (5)].yt_term) ); } else { (yyval.yt_rewriteclause) = RewriteClause( (yyvsp[(2) - (5)].yt_viewnames), (yyvsp[(4) - (5)].yt_term) ); } ;} break; case 142: { (yyval.yt_patternchains) = Conspatternchains( (yyvsp[(1) - (1)].yt_patternchain), Nilpatternchains() ); ;} break; case 143: { (yyval.yt_patternchains) = Conspatternchains( (yyvsp[(3) - (3)].yt_patternchain), (yyvsp[(1) - (3)].yt_patternchains) ); ;} break; case 144: { (yyval.yt_patternchain) = Conspatternchain( (yyvsp[(1) - (1)].yt_patternchainitem), Nilpatternchain() ); ;} break; case 145: { (yyval.yt_patternchain) = Conspatternchain( (yyvsp[(3) - (3)].yt_patternchainitem), (yyvsp[(1) - (3)].yt_patternchain) ); ;} break; case 146: { pf_pushfileline(); ;} break; case 147: { (yyval.yt_patternchainitem) = (yyvsp[(2) - (2)].yt_patternchainitem); pf_setstacktopfileline((yyval.yt_patternchainitem)); pf_popfileline(); ;} break; case 148: { (yyval.yt_patternchainitem) = PatternchainitemOutmost( (yyvsp[(1) - (1)].yt_outmostpattern) ); ;} break; case 149: { (yyval.yt_patternchainitem) = PatternchainitemGroup( (yyvsp[(2) - (3)].yt_patternchains) ); ;} break; case 150: { (yyval.yt_patternchainitem) = PatternchainitemDollarid( (yyvsp[(2) - (2)].yt_ID) ); pf_setwithvariable( (yyvsp[(2) - (2)].yt_ID) ); ;} break; case 151: { (yyval.yt_outmostpatterns) = Consoutmostpatterns( (yyvsp[(1) - (1)].yt_outmostpattern), Niloutmostpatterns() ); ;} break; case 152: { yyerrok; (yyval.yt_outmostpatterns) = Consoutmostpatterns( (yyvsp[(3) - (3)].yt_outmostpattern), (yyvsp[(1) - (3)].yt_outmostpatterns) ); ;} break; case 153: { (yyval.yt_outmostpatterns) = Niloutmostpatterns(); ;} break; case 154: { (yyval.yt_outmostpatterns)=(yyvsp[(1) - (2)].yt_outmostpatterns); ;} break; case 155: { (yyval.yt_outmostpatterns)=(yyvsp[(1) - (3)].yt_outmostpatterns); ;} break; case 156: { yyerrok; (yyval.yt_outmostpatterns) = Consoutmostpatterns( (yyvsp[(3) - (3)].yt_outmostpattern), (yyvsp[(1) - (3)].yt_outmostpatterns) ); ;} break; case 157: { (yyval.yt_outmostpattern) = OPOperatorWildcard( (yyvsp[(1) - (2)].yt_ID), (yyvsp[(2) - (2)].yt_Cexpression) ); non_default_outmostpattern = 1; (yyval.yt_outmostpattern)->file = pg_filename; (yyval.yt_outmostpattern)->line = pg_lineno; ;} break; case 158: { (yyval.yt_outmostpattern) = OPOperator( (yyvsp[(1) - (5)].yt_ID), (yyvsp[(3) - (5)].yt_patterns), (yyvsp[(5) - (5)].yt_Cexpression) ); non_default_outmostpattern = 1; (yyval.yt_outmostpattern)->file = pg_filename; (yyval.yt_outmostpattern)->line = pg_lineno; ;} break; case 159: { (yyval.yt_outmostpattern) = OPNonLeafVariable( (yyvsp[(1) - (3)].yt_ID), (yyvsp[(3) - (3)].yt_outmostpattern) ); non_default_outmostpattern = 1; (yyval.yt_outmostpattern)->file = pg_filename; (yyval.yt_outmostpattern)->line = pg_lineno; ;} break; case 160: { (yyval.yt_outmostpattern) = OPWildcard( (yyvsp[(2) - (2)].yt_Cexpression) ); (yyval.yt_outmostpattern)->file = pg_filename; (yyval.yt_outmostpattern)->line = pg_lineno; ;} break; case 161: { (yyval.yt_outmostpattern) = OPDefault( (yyvsp[(2) - (2)].yt_Cexpression) ); (yyval.yt_outmostpattern)->file = pg_filename; (yyval.yt_outmostpattern)->line = pg_lineno;;} break; case 162: { (yyval.yt_Cexpression) = NilCexpression(); ;} break; case 163: { do_CEXPR(); ;} break; case 164: { do_NORMAL(); ;} break; case 165: { (yyval.yt_Cexpression) = (yyvsp[(4) - (6)].yt_Cexpression); ;} break; case 166: { (yyval.yt_pattern) = PVariable( (yyvsp[(1) - (1)].yt_ID) ); ;} break; case 167: { (yyval.yt_pattern) = POperator( (yyvsp[(1) - (4)].yt_ID), (yyvsp[(3) - (4)].yt_patterns) ); ;} break; case 168: { (yyval.yt_pattern) = PWildcard(); ;} break; case 169: { (yyval.yt_pattern) = PWildcard(); ;} break; case 170: { (yyval.yt_pattern) = PNonLeafVariable( (yyvsp[(1) - (3)].yt_ID), (yyvsp[(3) - (3)].yt_pattern) ); ;} break; case 171: { do_CEXPRDQ(); ;} break; case 172: { do_NORMAL(); (yyval.yt_pattern) = PStringLiteral( (yyvsp[(3) - (4)].yt_CexpressionDQ) ); ;} break; case 173: { (yyval.yt_pattern) = PIntLiteral( (yyvsp[(1) - (1)].yt_INT) ); ;} break; case 174: { (yyval.yt_patterns) = Nilpatterns(); ;} break; case 175: { (yyval.yt_patterns) = (yyvsp[(1) - (1)].yt_patterns); ;} break; case 176: { (yyval.yt_patterns) = Conspatterns( (yyvsp[(1) - (1)].yt_pattern), Nilpatterns() ); ;} break; case 177: { yyerrok; (yyval.yt_patterns) = Conspatterns( (yyvsp[(3) - (3)].yt_pattern), (yyvsp[(1) - (3)].yt_patterns) ); ;} break; case 178: { (yyval.yt_patterns) = Nilpatterns(); ;} break; case 179: { (yyval.yt_patterns) = (yyvsp[(1) - (2)].yt_patterns); ;} break; case 180: { (yyval.yt_patterns) = (yyvsp[(1) - (3)].yt_patterns); ;} break; case 181: { yyerrok; (yyval.yt_patterns) = Conspatterns( (yyvsp[(3) - (3)].yt_pattern), (yyvsp[(1) - (3)].yt_patterns) ); ;} break; case 182: { (yyval.yt_term) = TVariable( (yyvsp[(1) - (1)].yt_ID) ); (yyval.yt_term)->file = pg_filename; (yyval.yt_term)->line = pg_lineno; ;} break; case 183: { (yyval.yt_term) = TOperator( (yyvsp[(1) - (4)].yt_ID), (yyvsp[(3) - (4)].yt_terms) ); (yyval.yt_term)->file = pg_filename; (yyval.yt_term)->line = pg_lineno; ;} break; case 184: { (yyval.yt_term) = TMethod( (yyvsp[(1) - (6)].yt_term), (yyvsp[(3) - (6)].yt_ID), (yyvsp[(5) - (6)].yt_terms) ); (yyval.yt_term)->file = pg_filename; (yyval.yt_term)->line = pg_lineno; ;} break; case 185: { (yyval.yt_term) = TMethodDot( (yyvsp[(1) - (6)].yt_term), (yyvsp[(3) - (6)].yt_ID), (yyvsp[(5) - (6)].yt_terms) ); (yyval.yt_term)->file = pg_filename; (yyval.yt_term)->line = pg_lineno; ;} break; case 186: { (yyval.yt_term) = TMemberVar( (yyvsp[(1) - (3)].yt_term), (yyvsp[(3) - (3)].yt_ID) ); (yyval.yt_term)->file = pg_filename; (yyval.yt_term)->line = pg_lineno; ;} break; case 187: { (yyval.yt_term) = TMemberVarDot( (yyvsp[(1) - (3)].yt_term), (yyvsp[(3) - (3)].yt_ID) ); (yyval.yt_term)->file = pg_filename; (yyval.yt_term)->line = pg_lineno; ;} break; case 188: { do_CEXPRSQ(); ;} break; case 189: { do_NORMAL(); (yyval.yt_term) = TCTerm( (yyvsp[(3) - (4)].yt_CexpressionSQ) ); (yyval.yt_term)->file = pg_filename; (yyval.yt_term)->line = pg_lineno; ;} break; case 190: { do_CEXPRDQ(); ;} break; case 191: { do_NORMAL(); (yyval.yt_term) = TStringLiteral( (yyvsp[(3) - (4)].yt_CexpressionDQ) ); (yyval.yt_term)->file = pg_filename; (yyval.yt_term)->line = pg_lineno; ;} break; case 192: { (yyval.yt_term) = TIntLiteral( (yyvsp[(1) - (1)].yt_INT) ); (yyval.yt_term)->file = pg_filename; (yyval.yt_term)->line = pg_lineno; ;} break; case 193: { (yyval.yt_terms) = Nilterms(); ;} break; case 194: { (yyval.yt_terms) = (yyvsp[(1) - (1)].yt_terms); ;} break; case 195: { (yyval.yt_terms) = Consterms( (yyvsp[(1) - (1)].yt_term), Nilterms() ); ;} break; case 196: { yyerrok; (yyval.yt_terms) = Consterms( (yyvsp[(3) - (3)].yt_term), (yyvsp[(1) - (3)].yt_terms) ); ;} break; case 197: { (yyval.yt_terms) = Nilterms(); ;} break; case 198: { (yyval.yt_terms) = (yyvsp[(1) - (2)].yt_terms); ;} break; case 199: { (yyval.yt_terms) = (yyvsp[(1) - (3)].yt_terms); ;} break; case 200: { yyerrok; (yyval.yt_terms) = Consterms( (yyvsp[(3) - (3)].yt_term), (yyvsp[(1) - (3)].yt_terms) ); ;} break; case 201: { (yyval.yt_withcases) = Conswithcases( (yyvsp[(1) - (1)].yt_withcase), Nilwithcases() ); ;} break; case 202: { (yyval.yt_withcases) = Conswithcases( (yyvsp[(2) - (2)].yt_withcase), (yyvsp[(1) - (2)].yt_withcases) ); ;} break; case 203: { (yyval.yt_withcase) = Withcase( syn_patternchains_fileline((yyvsp[(1) - (3)].yt_patternchains)->rewrite(base_rview), pg_filename, pg_lineno ), (yyvsp[(3) - (3)].yt_Ctext) ); ;} break; case 204: { if (! non_default_outmostpattern ) v_report(NonFatal( NoFileLine(), Problem1S( "can not infer type from 'default' pattern(s)" ))); non_default_outmostpattern = 0; ;} break; case 205: { (yyval.yt_unparsedeclaration) = UnparseDeclaration( (yyvsp[(1) - (5)].yt_outmostpatterns), (yyvsp[(4) - (5)].yt_unparseclauses) ); ;} break; case 206: { (yyval.yt_unparsedeclaration) = UnparseDeclaration( (yyvsp[(1) - (4)].yt_outmostpatterns), Nilunparseclauses()); ;} break; case 207: { (yyval.yt_unparseclauses) = Consunparseclauses( (yyvsp[(1) - (1)].yt_unparseclause), Nilunparseclauses() ); ;} break; case 208: { (yyval.yt_unparseclauses) = Consunparseclauses( (yyvsp[(2) - (2)].yt_unparseclause), (yyvsp[(1) - (2)].yt_unparseclauses) ); ;} break; case 209: { if ((yyvsp[(2) - (5)].yt_viewnames)->eq( Nilviewnames())) { (yyval.yt_unparseclause) = UnparseClause( Consviewnames( Id( Str( mkcasestring( "base_uview" ))), (yyvsp[(2) - (5)].yt_viewnames) ), (yyvsp[(4) - (5)].yt_unparseitems) ); } else { (yyval.yt_unparseclause) = UnparseClause( (yyvsp[(2) - (5)].yt_viewnames), (yyvsp[(4) - (5)].yt_unparseitems) ); } inc_text_nr(); yyerrok; ;} break; case 210: { (yyval.yt_unparseclause) = UnparseClause( (yyvsp[(2) - (4)].yt_viewnames), Nilunparseitems()); ;} break; case 211: { yyerrok; (yyval.yt_unparseclause) = UnparseClause( Nilviewnames(), (yyvsp[(4) - (5)].yt_unparseitems)); ;} break; case 212: { (yyval.yt_unparseclause) = UnparseClause( Nilviewnames(), Nilunparseitems()); ;} break; case 213: { (yyval.yt_unparseclause) = UnparseClause( Nilviewnames(), Nilunparseitems()); ;} break; case 214: { (yyval.yt_viewnames) = Nilviewnames(); ;} break; case 215: { (yyval.yt_viewnames) = Consviewnames( (yyvsp[(2) - (2)].yt_ID), (yyvsp[(1) - (2)].yt_viewnames) ); ;} break; case 216: { (yyval.yt_unparseitems) = Nilunparseitems(); ;} break; case 217: { (yyval.yt_unparseitems) = Consunparseitems( (yyvsp[(2) - (2)].yt_unparseitem), (yyvsp[(1) - (2)].yt_unparseitems) ); ;} break; case 218: { do_CEXPRDQ(); ;} break; case 219: { do_NORMAL(); ;} break; case 220: { (yyval.yt_unparseitem) = UnpStr( (yyvsp[(1) - (7)].yt_languageoption), (yyvsp[(4) - (7)].yt_CexpressionDQ), (yyvsp[(7) - (7)].yt_viewnameoption) ); (yyval.yt_unparseitem)->text_nr=get_text_nr(); if(!(yyvsp[(7) - (7)].yt_viewnameoption)->eq(NoViewname())) inc_text_nr(); ;} break; case 221: { (yyval.yt_unparseitem) = UnpSubexpr( (yyvsp[(1) - (3)].yt_languageoption), (yyvsp[(2) - (3)].yt_unpsubterm), (yyvsp[(3) - (3)].yt_viewnameoption) ); inc_text_nr(); ;} break; case 222: { (yyval.yt_unparseitem) = UnpCtext( (yyvsp[(1) - (2)].yt_languageoption), (yyvsp[(2) - (2)].yt_Ctext) ); inc_text_nr(); ;} break; case 223: { (yyval.yt_unparseitem) = UnpBody( (yyvsp[(1) - (4)].yt_languageoption), (yyvsp[(3) - (4)].yt_unparseitems) ); inc_text_nr(); ;} break; case 224: { do_CEXPR(); ;} break; case 225: { do_NORMAL(); ;} break; case 226: { (yyval.yt_unparseitem) = UViewVarDecl( (yyvsp[(2) - (7)].yt_ID), (yyvsp[(3) - (7)].yt_ID), (yyvsp[(5) - (7)].yt_Cexpression) ); ;} break; case 227: { (yyval.yt_unpsubterm) = UnpSubTerm( (yyvsp[(1) - (1)].yt_ID) ); ;} break; case 228: { (yyval.yt_unpsubterm) = UnpDollarvarTerm( (yyvsp[(1) - (1)].yt_INT) ); ;} break; case 229: { (yyval.yt_unpsubterm) = UnpSubAttr( (yyvsp[(1) - (2)].yt_ID), (yyvsp[(2) - (2)].yt_unpattributes) ); ;} break; case 230: { (yyval.yt_unpsubterm) = UnpDollarvarAttr( (yyvsp[(1) - (2)].yt_INT), (yyvsp[(2) - (2)].yt_unpattributes) ); ;} break; case 231: { (yyval.yt_unpsubterm) = UnpCastedVariable( (yyvsp[(2) - (4)].yt_ID), (yyvsp[(4) - (4)].yt_ID) ); ;} break; case 232: { (yyval.yt_unpattributes) = Consunpattributes( (yyvsp[(1) - (1)].yt_ID), Nilunpattributes() ); ;} break; case 233: { (yyval.yt_unpattributes) = Consunpattributes( (yyvsp[(2) - (2)].yt_ID), (yyvsp[(1) - (2)].yt_unpattributes) ); ;} break; case 234: { (yyval.yt_ID) = (yyvsp[(2) - (2)].yt_ID); ;} break; case 235: { (yyval.yt_ID) = Id(Str(mkcasestring("error"))); ;} break; case 236: { (yyval.yt_viewnameoption) = NoViewname(); ;} break; case 237: { (yyval.yt_viewnameoption) = YesViewname( (yyvsp[(2) - (2)].yt_ID) ); ;} break; case 238: { (yyval.yt_viewnameoption) = NoViewname(); ;} break; case 239: { yyerrok; (yyval.yt_viewnames) = (yyvsp[(2) - (3)].yt_viewnames); pg_uviewshavebeendefined = true; ;} break; case 240: { yyerrok; (yyval.yt_viewnames) = Nilviewnames(); ;} break; case 241: { (yyval.yt_viewnames) = Consviewnames( (yyvsp[(1) - (1)].yt_ID), Nilviewnames()); v_add_to_uviewnames( (yyvsp[(1) - (1)].yt_ID) ); v_extendoccur( (yyvsp[(1) - (1)].yt_ID), ITUserUView() ); ;} break; case 242: { (yyval.yt_viewnames) = Consviewnames( (yyvsp[(2) - (3)].yt_ID), Nilviewnames()); v_add_to_uviewnames_ext( (yyvsp[(2) - (3)].yt_ID) ); v_extendoccur( (yyvsp[(2) - (3)].yt_ID), ITUserUView() ); ;} break; case 243: { (yyval.yt_viewnames) = Consviewnames( (yyvsp[(2) - (2)].yt_ID), (yyvsp[(1) - (2)].yt_viewnames) ); v_add_to_uviewnames( (yyvsp[(2) - (2)].yt_ID) ); v_extendoccur( (yyvsp[(2) - (2)].yt_ID), ITUserUView() ); ;} break; case 244: { (yyval.yt_viewnames) = Consviewnames( (yyvsp[(3) - (4)].yt_ID), (yyvsp[(1) - (4)].yt_viewnames) ); v_add_to_uviewnames_ext( (yyvsp[(3) - (4)].yt_ID) ); v_extendoccur( (yyvsp[(3) - (4)].yt_ID), ITUserUView() ); ;} break; case 245: { (yyval.yt_viewnames) = Consviewnames( (yyvsp[(3) - (3)].yt_ID), (yyvsp[(1) - (3)].yt_viewnames) ); v_add_to_uviewnames( (yyvsp[(3) - (3)].yt_ID) ); v_extendoccur( (yyvsp[(3) - (3)].yt_ID), ITUserUView() ); ;} break; case 246: { (yyval.yt_viewnames) = Consviewnames( (yyvsp[(4) - (5)].yt_ID), (yyvsp[(1) - (5)].yt_viewnames) ); v_add_to_uviewnames_ext( (yyvsp[(4) - (5)].yt_ID) ); v_extendoccur( (yyvsp[(4) - (5)].yt_ID), ITUserUView() ); ;} break; case 247: { (yyval.yt_viewnames) = (yyvsp[(1) - (2)].yt_viewnames); ;} break; case 248: { (yyval.yt_viewnames) = (yyvsp[(1) - (3)].yt_viewnames); ;} break; case 249: { yyerrok; (yyval.yt_viewnames) = (yyvsp[(2) - (3)].yt_viewnames); pg_rviewshavebeendefined = true; ;} break; case 250: { yyerrok; (yyval.yt_viewnames) = Nilviewnames(); ;} break; case 251: { (yyval.yt_viewnames) = Consviewnames( (yyvsp[(1) - (1)].yt_ID), Nilviewnames()); v_add_to_rviewnames( (yyvsp[(1) - (1)].yt_ID) ); v_extendoccur( (yyvsp[(1) - (1)].yt_ID), ITUserRView() ); ;} break; case 252: { (yyval.yt_viewnames) = Consviewnames( (yyvsp[(2) - (3)].yt_ID), Nilviewnames()); v_add_to_rviewnames_ext( (yyvsp[(2) - (3)].yt_ID) ); v_extendoccur( (yyvsp[(2) - (3)].yt_ID), ITUserRView() ); ;} break; case 253: { (yyval.yt_viewnames) = Consviewnames( (yyvsp[(2) - (2)].yt_ID), (yyvsp[(1) - (2)].yt_viewnames) ); v_add_to_rviewnames( (yyvsp[(2) - (2)].yt_ID) ); v_extendoccur( (yyvsp[(2) - (2)].yt_ID), ITUserRView() ); ;} break; case 254: { (yyval.yt_viewnames) = Consviewnames( (yyvsp[(3) - (4)].yt_ID), (yyvsp[(1) - (4)].yt_viewnames) ); v_add_to_rviewnames_ext( (yyvsp[(3) - (4)].yt_ID) ); v_extendoccur( (yyvsp[(3) - (4)].yt_ID), ITUserRView() ); ;} break; case 255: { (yyval.yt_viewnames) = Consviewnames( (yyvsp[(3) - (3)].yt_ID), (yyvsp[(1) - (3)].yt_viewnames) ); v_add_to_rviewnames( (yyvsp[(3) - (3)].yt_ID) ); v_extendoccur( (yyvsp[(3) - (3)].yt_ID), ITUserRView() ); ;} break; case 256: { (yyval.yt_viewnames) = Consviewnames( (yyvsp[(4) - (5)].yt_ID), (yyvsp[(1) - (5)].yt_viewnames) ); v_add_to_rviewnames_ext( (yyvsp[(4) - (5)].yt_ID) ); v_extendoccur( (yyvsp[(4) - (5)].yt_ID), ITUserRView() ); ;} break; case 257: { (yyval.yt_viewnames) = (yyvsp[(1) - (2)].yt_viewnames); ;} break; case 258: { (yyval.yt_viewnames) = (yyvsp[(1) - (3)].yt_viewnames); ;} break; case 259: { yyerrok; (yyval.yt_storageclasses) = (yyvsp[(2) - (3)].yt_storageclasses); pg_storageclasseshavebeendefined = true; ;} break; case 260: { yyerrok; (yyval.yt_storageclasses) = Nilstorageclasses(); ;} break; case 261: { (yyval.yt_storageclasses) = Consstorageclasses( (yyvsp[(1) - (1)].yt_ID), Nilstorageclasses()); v_add_to_storageclasses( (yyvsp[(1) - (1)].yt_ID), f_emptyId() ); v_extendoccur( (yyvsp[(1) - (1)].yt_ID), ITStorageClass() ); ;} break; case 262: { (yyval.yt_storageclasses) = Consstorageclasses( (yyvsp[(2) - (2)].yt_ID), (yyvsp[(1) - (2)].yt_storageclasses) ); v_add_to_storageclasses( (yyvsp[(2) - (2)].yt_ID), f_emptyId() ); v_extendoccur( (yyvsp[(2) - (2)].yt_ID), ITStorageClass() ); ;} break; case 263: { (yyval.yt_storageclasses) = Consstorageclasses( (yyvsp[(3) - (3)].yt_ID), (yyvsp[(1) - (3)].yt_storageclasses) ); v_add_to_storageclasses( (yyvsp[(3) - (3)].yt_ID), f_emptyId() ); v_extendoccur( (yyvsp[(3) - (3)].yt_ID), ITStorageClass() ); ;} break; case 264: { (yyval.yt_storageclasses) = (yyvsp[(1) - (2)].yt_storageclasses); ;} break; case 265: { (yyval.yt_storageclasses) = (yyvsp[(1) - (3)].yt_storageclasses); ;} break; case 266: { fnclass tmp_type = f_fnclass_info((yyvsp[(1) - (3)].yt_ac_declaration_specifiers), pg_filename, (yyvsp[(2) - (3)].yt_ac_declarator) ); ID tmp_id = f_ID_of_fn_declarator((yyvsp[(2) - (3)].yt_ac_declarator), tmp_type); (yyval.yt_fndeclaration) = FnAcDeclaration( (yyvsp[(1) - (3)].yt_ac_declaration_specifiers), (yyvsp[(2) - (3)].yt_ac_declarator), Nilac_declaration_list(), AcNoBaseInit(), (yyvsp[(3) - (3)].yt_Ctext), tmp_id, tmp_type ); pf_resetwithvariable(); v_defoccur( tmp_id, ITUserFunction( tmp_type ) ); (yyval.yt_fndeclaration)->file = pg_filename; (yyval.yt_fndeclaration)->last_line = pg_lineno; ;} break; case 267: { fnclass tmp_type=ConvOperatorFn(); ac_declarator decl= AcDeclarator(Nopointer(),AcNoRef(), AcQualifiedDeclProto( Nilac_class_qualifier_list(), AcConvOperatorDecl((yyvsp[(1) - (8)].yt_ID), (yyvsp[(4) - (8)].yt_ID)), AcParList(Nilac_parameter_list()), (yyvsp[(7) - (8)].yt_ac_type_qualifier) ) ); ID tmp_id = (yyvsp[(4) - (8)].yt_ID); (yyval.yt_fndeclaration) = FnAcDeclaration( Nilac_declaration_specifiers(), decl, Nilac_declaration_list(), AcNoBaseInit(), (yyvsp[(8) - (8)].yt_Ctext), tmp_id, tmp_type ); pf_resetwithvariable(); v_defoccur( tmp_id, ITUserFunction( tmp_type ) ); (yyval.yt_fndeclaration)->file = pg_filename; (yyval.yt_fndeclaration)->last_line = pg_lineno; ;} break; case 268: { fnclass tmp_type=ConstructorFn(); ac_declarator decl= AcDeclarator(Nopointer(),AcNoRef(), AcQualifiedDeclProto( Nilac_class_qualifier_list(), AcDirectDeclId((yyvsp[(2) - (7)].yt_ID)), (yyvsp[(4) - (7)].yt_ac_parameter_type_list), AcNoQualifier() ) ); ID tmp_id = f_ID_of_fn_declarator(decl, tmp_type); (yyval.yt_fndeclaration) = FnAcDeclaration( Nilac_declaration_specifiers(), decl, Nilac_declaration_list(), (yyvsp[(6) - (7)].yt_ac_opt_base_init_list), (yyvsp[(7) - (7)].yt_Ctext), tmp_id, tmp_type ); pf_resetwithvariable(); v_defoccur( tmp_id, ITUserFunction( tmp_type ) ); (yyval.yt_fndeclaration)->file = pg_filename; (yyval.yt_fndeclaration)->last_line = pg_lineno; ;} break; case 269: { fnclass tmp_type=DestructorFn(); ac_declarator decl= AcDeclarator(Nopointer(),AcNoRef(), AcQualifiedDeclProto( Nilac_class_qualifier_list(), AcDirectDeclId((yyvsp[(3) - (6)].yt_ID)), AcParList( Nilac_parameter_list() ), AcNoQualifier() ) ); ID tmp_id = f_ID_of_fn_declarator(decl, tmp_type); (yyval.yt_fndeclaration) = FnAcDeclaration( (yyvsp[(2) - (6)].yt_ac_declaration_specifiers), decl, Nilac_declaration_list(), AcNoBaseInit(), (yyvsp[(6) - (6)].yt_Ctext), tmp_id, tmp_type ); pf_resetwithvariable(); v_defoccur( tmp_id, ITUserFunction( tmp_type ) ); (yyval.yt_fndeclaration)->file = pg_filename; (yyval.yt_fndeclaration)->last_line = pg_lineno; ;} break; case 270: { fnclass tmp_type = f_member_class_info((yyvsp[(2) - (5)].yt_ac_declaration_specifiers), pg_filename); (yyval.yt_fndeclaration)=AcMemberDeclaration((yyvsp[(2) - (5)].yt_ac_declaration_specifiers),(yyvsp[(3) - (5)].yt_ac_declarator),(yyvsp[(4) - (5)].yt_ac_constant_expression_option),tmp_type); (yyval.yt_fndeclaration)->is_attr=false; (yyval.yt_fndeclaration)->file = pg_filename; (yyval.yt_fndeclaration)->last_line = pg_lineno; ;} break; case 271: { fnclass tmp_type = f_member_class_info((yyvsp[(2) - (5)].yt_ac_declaration_specifiers), pg_filename); (yyval.yt_fndeclaration)=AcMemberDeclaration((yyvsp[(2) - (5)].yt_ac_declaration_specifiers),(yyvsp[(3) - (5)].yt_ac_declarator),(yyvsp[(4) - (5)].yt_ac_constant_expression_option),tmp_type); (yyval.yt_fndeclaration)->is_attr=true; (yyval.yt_fndeclaration)->file = pg_filename; (yyval.yt_fndeclaration)->last_line = pg_lineno; ;} break; case 272: { (yyval.yt_ac_opt_base_init_list) = AcNoBaseInit(); ;} break; case 273: { (yyval.yt_ac_opt_base_init_list) = AcYesBaseInit( (yyvsp[(2) - (2)].yt_ac_base_init_list) ); ;} break; case 274: { (yyval.yt_ac_base_init_list) = Consac_base_init_list( (yyvsp[(1) - (1)].yt_ac_base_init), Nilac_base_init_list() ); ;} break; case 275: { (yyval.yt_ac_base_init_list) = Consac_base_init_list( (yyvsp[(3) - (3)].yt_ac_base_init), (yyvsp[(1) - (3)].yt_ac_base_init_list) ); ;} break; case 276: { (yyval.yt_ac_base_init)= AcBaseInit( (yyvsp[(1) - (4)].yt_ID), (yyvsp[(3) - (4)].yt_ac_constant_expression_list) ); ;} break; case 277: { (yyval.yt_ac_constant_expression_option)=Noac_constant_expression(); ;} break; case 278: { (yyval.yt_ac_constant_expression_option)=Yesac_constant_expression((yyvsp[(2) - (2)].yt_ac_constant_expression)); ;} break; case 279: { (yyval.yt_ac_constant_expression_option)=Noac_constant_expression(); ;} break; case 280: { (yyval.yt_ac_constant_expression_option)=Yesac_constant_expression((yyvsp[(2) - (2)].yt_ac_constant_expression)); ;} break; case 281: { (yyval.yt_ac_constant_expression_option)=Yesac_constant_expression((yyvsp[(2) - (3)].yt_ac_constant_expression)); ;} break; case 282: { (yyval.yt_ac_declaration_specifiers) = Consac_declaration_specifiers( AcDeclSpecTypeSpec( (yyvsp[(1) - (1)].yt_ac_type_specifier) ), Nilac_declaration_specifiers() ); ;} break; case 283: { (yyval.yt_ac_declaration_specifiers) = Consac_declaration_specifiers( AcDeclSpecTypeSpec( (yyvsp[(2) - (2)].yt_ac_type_specifier) ), Consac_declaration_specifiers( AcDeclSpecStorageSpec( (yyvsp[(1) - (2)].yt_ac_storage_class_specifier) ), Nilac_declaration_specifiers() )); ;} break; case 284: { (yyval.yt_ac_declaration_specifiers) = Consac_declaration_specifiers( AcDeclSpecTypeSpec( (yyvsp[(2) - (2)].yt_ac_type_specifier) ), Consac_declaration_specifiers( AcDeclSpecTypeQual( (yyvsp[(1) - (2)].yt_ac_type_qualifier) ), Nilac_declaration_specifiers() )); ;} break; case 285: { (yyval.yt_ac_declaration_specifiers) = Consac_declaration_specifiers( AcDeclSpecTypeSpec( (yyvsp[(3) - (3)].yt_ac_type_specifier) ), Consac_declaration_specifiers( AcDeclSpecTypeQual( (yyvsp[(2) - (3)].yt_ac_type_qualifier) ), Consac_declaration_specifiers( AcDeclSpecStorageSpec( (yyvsp[(1) - (3)].yt_ac_storage_class_specifier) ), Nilac_declaration_specifiers() ))); ;} break; case 286: { (yyval.yt_ac_declaration_specifiers) = Consac_declaration_specifiers( AcDeclSpecTypeSpec( (yyvsp[(1) - (1)].yt_ac_type_specifier) ), Nilac_declaration_specifiers() ); ;} break; case 287: { (yyval.yt_ac_declaration_specifiers) = Consac_declaration_specifiers( AcDeclSpecTypeSpec( (yyvsp[(2) - (2)].yt_ac_type_specifier) ), Consac_declaration_specifiers( AcDeclSpecStorageSpec( (yyvsp[(1) - (2)].yt_ac_storage_class_specifier) ), Nilac_declaration_specifiers() )); ;} break; case 288: { (yyval.yt_ac_declaration_specifiers) = Consac_declaration_specifiers( AcDeclSpecTypeSpec( (yyvsp[(2) - (2)].yt_ac_type_specifier) ), Consac_declaration_specifiers( AcDeclSpecTypeQual( (yyvsp[(1) - (2)].yt_ac_type_qualifier) ), Nilac_declaration_specifiers() )); ;} break; case 289: { (yyval.yt_ac_declaration_specifiers) = Consac_declaration_specifiers( AcDeclSpecTypeSpec( (yyvsp[(3) - (3)].yt_ac_type_specifier) ), Consac_declaration_specifiers( AcDeclSpecTypeQual( (yyvsp[(2) - (3)].yt_ac_type_qualifier) ), Consac_declaration_specifiers( AcDeclSpecStorageSpec( (yyvsp[(1) - (3)].yt_ac_storage_class_specifier) ), Nilac_declaration_specifiers() ))); ;} break; case 290: { (yyval.yt_ac_storage_class_specifier) = AcAuto(); ;} break; case 291: { (yyval.yt_ac_storage_class_specifier) = AcRegister(); ;} break; case 292: { (yyval.yt_ac_storage_class_specifier) = AcStatic(); ;} break; case 293: { (yyval.yt_ac_storage_class_specifier) = AcExtern(); ;} break; case 294: { (yyval.yt_ac_storage_class_specifier) = AcTypedef(); ;} break; case 295: { (yyval.yt_ac_storage_class_specifier) = AcVirtual(); ;} break; case 296: { (yyval.yt_ac_storage_class_specifier) = AcStatic(); ;} break; case 297: { (yyval.yt_ac_declaration_specifiers) = Nilac_declaration_specifiers(); ;} break; case 298: { (yyval.yt_ac_declaration_specifiers) = Consac_declaration_specifiers( AcDeclSpecStorageSpec( AcVirtual() ), Nilac_declaration_specifiers() ); ;} break; case 299: { (yyval.yt_ac_type_specifier) = AcTypeSpec( (yyvsp[(1) - (1)].yt_ID) ); ;} break; case 300: { (yyval.yt_ac_type_qualifier) = AcConst(); ;} break; case 301: { (yyval.yt_ac_type_qualifier) = AcVolatile(); ;} break; case 302: { (yyval.yt_ac_type_qualifier) = AcUnsigned(); ;} break; case 303: { (yyval.yt_ac_declarator) = AcDeclarator( Nopointer(), AcNoRef(), (yyvsp[(1) - (1)].yt_ac_direct_declarator) ); ;} break; case 304: { (yyval.yt_ac_declarator) = AcDeclarator( Yespointer( (yyvsp[(1) - (2)].yt_ac_pointer) ), AcNoRef(), (yyvsp[(2) - (2)].yt_ac_direct_declarator) ); ;} break; case 305: { (yyval.yt_ac_declarator) = AcDeclarator( Nopointer(), AcRef(), (yyvsp[(2) - (2)].yt_ac_direct_declarator) ); ;} break; case 306: { (yyval.yt_ac_declarator) = AcDeclarator( Yespointer( (yyvsp[(1) - (3)].yt_ac_pointer) ), AcRef(), (yyvsp[(3) - (3)].yt_ac_direct_declarator) ); ;} break; case 307: { (yyval.yt_ac_declarator) = AcDeclarator(Nopointer(), AcNoRef(), (yyvsp[(1) - (1)].yt_ac_direct_declarator) ); ;} break; case 308: { (yyval.yt_ac_declarator) = AcDeclarator( Yespointer( (yyvsp[(1) - (2)].yt_ac_pointer) ), AcNoRef(), (yyvsp[(2) - (2)].yt_ac_direct_declarator) ); ;} break; case 309: { (yyval.yt_ac_declarator) = AcDeclarator(Nopointer(), AcRef(), (yyvsp[(2) - (2)].yt_ac_direct_declarator) ); ;} break; case 310: { (yyval.yt_ac_declarator) = AcDeclarator( Yespointer( (yyvsp[(1) - (3)].yt_ac_pointer) ), AcRef(), (yyvsp[(3) - (3)].yt_ac_direct_declarator) ); ;} break; case 311: { (yyval.yt_ac_declarator) = AcDeclarator( Nopointer(), AcNoRef(), (yyvsp[(1) - (1)].yt_ac_direct_declarator) ); ;} break; case 312: { (yyval.yt_ac_declarator) = AcDeclarator( Yespointer( (yyvsp[(1) - (2)].yt_ac_pointer) ), AcNoRef(), (yyvsp[(2) - (2)].yt_ac_direct_declarator) ); ;} break; case 313: { (yyval.yt_ac_declarator) = AcDeclarator( Nopointer(), AcRef(), (yyvsp[(2) - (2)].yt_ac_direct_declarator) ); ;} break; case 314: { (yyval.yt_ac_declarator) = AcDeclarator( Yespointer( (yyvsp[(1) - (3)].yt_ac_pointer) ), AcRef(), (yyvsp[(3) - (3)].yt_ac_direct_declarator) ); ;} break; case 315: { (yyval.yt_ac_declarator) = AcDeclarator( Yespointer( (yyvsp[(1) - (2)].yt_ac_pointer) ), AcNoRef(), (yyvsp[(2) - (2)].yt_ac_direct_declarator) ); ;} break; case 316: { (yyval.yt_ac_declarator) = AcDeclarator( Yespointer( (yyvsp[(1) - (3)].yt_ac_pointer) ), AcRef(), (yyvsp[(3) - (3)].yt_ac_direct_declarator) ); ;} break; case 317: { (yyval.yt_ac_direct_declarator) = AcDirectDeclId( (yyvsp[(1) - (1)].yt_ID) ); ;} break; case 318: { (yyval.yt_ac_direct_declarator) = AcDirectDeclPack( (yyvsp[(2) - (3)].yt_ac_declarator) ); ;} break; case 319: { (yyval.yt_ac_direct_declarator) = AcDirectDeclArray( (yyvsp[(1) - (4)].yt_ac_direct_declarator), (yyvsp[(3) - (4)].yt_ac_constant_expression_option) ); ;} break; case 320: { (yyval.yt_ac_direct_declarator) = AcDirectDeclProto( (yyvsp[(1) - (4)].yt_ac_direct_declarator), (yyvsp[(3) - (4)].yt_ac_parameter_type_list) ); ;} break; case 321: { (yyval.yt_ac_direct_declarator) = AcMemberDecl( (yyvsp[(1) - (4)].yt_ID), (yyvsp[(3) - (4)].yt_ID), (yyvsp[(4) - (4)].yt_ac_constant_expression_list) ); ;} break; case 322: { (yyval.yt_ac_constant_expression_list)=Nilac_constant_expression_list(); ;} break; case 323: { (yyval.yt_ac_constant_expression_list)=Consac_constant_expression_list((yyvsp[(3) - (4)].yt_ac_constant_expression),(yyvsp[(1) - (4)].yt_ac_constant_expression_list)); ;} break; case 324: { (yyval.yt_ac_constant_expression_list)=Consac_constant_expression_list((yyvsp[(1) - (1)].yt_ac_constant_expression), Nilac_constant_expression_list()); ;} break; case 325: { (yyval.yt_ac_constant_expression_list)=Consac_constant_expression_list((yyvsp[(3) - (3)].yt_ac_constant_expression),(yyvsp[(1) - (3)].yt_ac_constant_expression_list)); ;} break; case 326: { ac_direct_declarator decl=NULL; ac_class_qualifier_list q=f_check_build_qualifier((yyvsp[(1) - (5)].yt_ac_class_qualifier_help_list),decl); (yyval.yt_ac_direct_declarator) = AcQualifiedDeclProto( q, decl, (yyvsp[(3) - (5)].yt_ac_parameter_type_list) ,(yyvsp[(5) - (5)].yt_ac_type_qualifier) ); ;} break; case 327: { ac_direct_declarator decl=NULL; ac_class_qualifier_list q=f_check_build_qualifier((yyvsp[(1) - (5)].yt_ac_class_qualifier_help_list),decl); (yyval.yt_ac_direct_declarator) = AcQualifiedDeclProto( q, decl, AcParList( Nilac_parameter_list() ),(yyvsp[(5) - (5)].yt_ac_type_qualifier) ); yyerrok; ;} break; case 328: { (yyval.yt_ac_class_qualifier_help_list)=Consac_class_qualifier_help_list((yyvsp[(1) - (1)].yt_ac_direct_declarator),Nilac_class_qualifier_help_list()); ;} break; case 329: { (yyval.yt_ac_class_qualifier_help_list)=Consac_class_qualifier_help_list((yyvsp[(3) - (3)].yt_ac_direct_declarator),(yyvsp[(1) - (3)].yt_ac_class_qualifier_help_list)); ;} break; case 330: { (yyval.yt_ac_direct_declarator)=AcDirectDeclId((yyvsp[(1) - (1)].yt_ID)); ;} break; case 331: { ac_operator_name op_name=AcOperatorName((yyvsp[(2) - (2)].yt_casestring)); pf_setfileline( op_name ); (yyval.yt_ac_direct_declarator)=AcOperatorDeclId(op_name); ;} break; case 332: { (yyval.yt_ac_type_qualifier)=AcNoQualifier(); ;} break; case 333: { (yyval.yt_ac_type_qualifier)=AcConst(); ;} break; case 334: { (yyval.yt_ac_pointer) = AcPointerNil( Nilac_type_qualifier_list() ); ;} break; case 335: { (yyval.yt_ac_pointer) = AcPointerNil( (yyvsp[(2) - (2)].yt_ac_type_qualifier_list) ); ;} break; case 336: { (yyval.yt_ac_pointer) = AcPointerCons( Nilac_type_qualifier_list(), (yyvsp[(2) - (2)].yt_ac_pointer) ); ;} break; case 337: { (yyval.yt_ac_pointer) = AcPointerCons( (yyvsp[(2) - (3)].yt_ac_type_qualifier_list), (yyvsp[(3) - (3)].yt_ac_pointer) ); ;} break; case 338: { (yyval.yt_ac_type_qualifier_list) = Consac_type_qualifier_list( (yyvsp[(1) - (1)].yt_ac_type_qualifier), Nilac_type_qualifier_list() ); ;} break; case 339: { (yyval.yt_ac_type_qualifier_list) = Consac_type_qualifier_list( (yyvsp[(2) - (2)].yt_ac_type_qualifier), (yyvsp[(1) - (2)].yt_ac_type_qualifier_list) ); ;} break; case 340: { (yyval.yt_ac_parameter_type_list) = AcParList( Nilac_parameter_list() ); ;} break; case 341: { (yyval.yt_ac_parameter_type_list) = AcParList3Dot( Nilac_parameter_list() ); ;} break; case 342: { (yyval.yt_ac_parameter_type_list) = AcParList( (yyvsp[(1) - (1)].yt_ac_parameter_list) ); ;} break; case 343: { (yyval.yt_ac_parameter_type_list) = AcParList3Dot( (yyvsp[(1) - (2)].yt_ac_parameter_list) ); ;} break; case 344: { (yyval.yt_ac_parameter_type_list) = AcParList3Dot( (yyvsp[(1) - (3)].yt_ac_parameter_list) ); ;} break; case 345: { (yyval.yt_ac_parameter_list) = Consac_parameter_list( (yyvsp[(1) - (1)].yt_ac_parameter_declaration), Nilac_parameter_list() ); ;} break; case 346: { (yyval.yt_ac_parameter_list) = Consac_parameter_list( (yyvsp[(3) - (3)].yt_ac_parameter_declaration), (yyvsp[(1) - (3)].yt_ac_parameter_list) ); ;} break; case 347: { (yyval.yt_ac_parameter_declaration) = AcParDeclDecl( (yyvsp[(1) - (3)].yt_ac_declaration_specifiers), (yyvsp[(2) - (3)].yt_ac_declarator), (yyvsp[(3) - (3)].yt_ac_constant_expression_option) ); ;} break; case 348: { (yyval.yt_ac_parameter_declaration) = AcParDeclAbsdecl( (yyvsp[(1) - (3)].yt_ac_declaration_specifiers), (yyvsp[(2) - (3)].yt_ac_abstract_declarator), (yyvsp[(3) - (3)].yt_ac_constant_expression_option) ); ;} break; case 349: { (yyval.yt_ac_abstract_declarator) = AcAbsdeclPointer( (yyvsp[(1) - (1)].yt_ac_pointer) ); ;} break; case 350: { (yyval.yt_ac_abstract_declarator) = AcAbsdeclDirdecl( Nopointer(), (yyvsp[(1) - (1)].yt_ac_direct_abstract_declarator) ); ;} break; case 351: { (yyval.yt_ac_abstract_declarator) = AcAbsdeclDirdecl( Yespointer( (yyvsp[(1) - (2)].yt_ac_pointer) ), (yyvsp[(2) - (2)].yt_ac_direct_abstract_declarator) ); ;} break; case 352: { (yyval.yt_ac_direct_abstract_declarator) = AcDirAbsdeclPack( (yyvsp[(2) - (3)].yt_ac_abstract_declarator) ); ;} break; case 353: { (yyval.yt_ac_direct_abstract_declarator) = AcDirAbsdeclArray( Yesac_direct_abstract_declarator( (yyvsp[(1) - (4)].yt_ac_direct_abstract_declarator) ), (yyvsp[(3) - (4)].yt_ac_constant_expression_option) ); ;} break; case 354: { (yyval.yt_ac_direct_abstract_declarator) = AcDirAbsdeclArray( Noac_direct_abstract_declarator(), (yyvsp[(2) - (3)].yt_ac_constant_expression_option) ); ;} break; case 355: { (yyval.yt_ac_direct_abstract_declarator) = AcDirAbsdeclFn( Yesac_direct_abstract_declarator( (yyvsp[(1) - (4)].yt_ac_direct_abstract_declarator) ), (yyvsp[(3) - (4)].yt_ac_parameter_type_list) ); ;} break; case 356: { (yyval.yt_ac_direct_abstract_declarator) = AcDirAbsdeclFn( Noac_direct_abstract_declarator(), (yyvsp[(2) - (3)].yt_ac_parameter_type_list) ); ;} break; case 357: { (yyval.yt_ac_constant_expression_option) = Yesac_constant_expression( (yyvsp[(1) - (1)].yt_ac_constant_expression) ); ;} break; case 358: { do_CEXPR(); ;} break; case 359: { do_NORMAL(); (yyval.yt_ac_constant_expression) = AcConstExpr( (yyvsp[(2) - (2)].yt_Cexpression) ); ;} break; case 360: { (yyval.yt_ID) = (yyvsp[(1) - (1)].yt_ID); ;} break; case 361: { (yyval.yt_ID) = (yyvsp[(2) - (2)].yt_ID); pf_setwithvariable( (yyvsp[(2) - (2)].yt_ID) ); ;} break; case 362: { (yyval.yt_Ctext) = (yyvsp[(1) - (1)].yt_Ctext); ;} break; case 363: { yyerrok; ;} break; case 364: { (yyval.yt_Ctext) = (yyvsp[(4) - (4)].yt_Ctext); ;} break; case 365: { yyerrok; (yyval.yt_languageoption) = LanguageList((yyvsp[(2) - (4)].yt_languagenames)); ;} break; case 366: { yyerrok; (yyval.yt_languageoption) = NoLanguagename(); ;} break; case 367: { (yyval.yt_languagenames) = Conslanguagenames( (yyvsp[(1) - (1)].yt_ID), Nillanguagenames()); ;} break; case 368: { yyerrok; (yyval.yt_languagenames) = Conslanguagenames( (yyvsp[(3) - (3)].yt_ID), (yyvsp[(1) - (3)].yt_languagenames) ); ;} break; case 369: { (yyval.yt_languagenames) = Nillanguagenames(); ;} break; case 370: { (yyval.yt_languagenames) = (yyvsp[(1) - (2)].yt_languagenames); ;} break; case 371: { (yyval.yt_languagenames) = (yyvsp[(1) - (3)].yt_languagenames); ;} break; case 372: { yyerrok; (yyval.yt_languagenames) = Conslanguagenames( (yyvsp[(3) - (3)].yt_ID), (yyvsp[(1) - (3)].yt_languagenames) ); ;} break; case 373: { yyerrok; (yyval.yt_languagenames) = (yyvsp[(2) - (3)].yt_languagenames); pg_languageshavebeendefined = true; ;} break; case 374: { yyerrok; (yyval.yt_languagenames) = Nillanguagenames(); ;} break; case 375: { (yyval.yt_languagenames) = Conslanguagenames( (yyvsp[(1) - (1)].yt_ID), Nillanguagenames()); ;} break; case 376: { (yyval.yt_languagenames) = Conslanguagenames( (yyvsp[(2) - (2)].yt_ID), (yyvsp[(1) - (2)].yt_languagenames) ); ;} break; case 377: { (yyval.yt_languagenames) = Conslanguagenames( (yyvsp[(3) - (3)].yt_ID), (yyvsp[(1) - (3)].yt_languagenames) ); ;} break; case 378: { (yyval.yt_languagenames) = (yyvsp[(1) - (2)].yt_languagenames); ;} break; case 379: { (yyval.yt_languagenames) = (yyvsp[(1) - (3)].yt_languagenames); ;} break; /* Line 1267 of yacc.c. */ default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) { YYSIZE_T yyalloc = 2 * yysize; if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yyalloc = YYSTACK_ALLOC_MAXIMUM; if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yyalloc); if (yymsg) yymsg_alloc = yyalloc; else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } } #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } #include "errmsg.inc" void yyerror_1(const char *s, int state_no) { extern int yychar; extern char yytext[]; int rule_pos, i; v_report( NonFatal( PosNoFileLine(), Problem1S( s ))); for (rule_pos = error_state[state_no]; error_rules[rule_pos][0] != 0; rule_pos++) { int rule = error_rules[rule_pos][0]; int rhs = yyprhs[rule+1]; int pos = error_rules[rule_pos][1]; fprintf(stderr, "\t%s ->", yytname[yyr1[rule+1]]); for (i = 0; yyrhs[rhs+i] != -1; i++) { if (i == pos) fprintf(stderr, " ."); fprintf(stderr, " %s", yytname[yyrhs[rhs+i]]); } if (i == pos) fprintf(stderr, " ."); fprintf(stderr, "\n"); } if (strlen(yytext) > 0) fprintf(stderr, "\ttoken last read was: '%s'\n", yytext); throw 22; } // vim:sts=4:ts=8:cino=g0,t0,\:0 kimwitu++-2.3.13/src/Gen.boot/k.h0000644000175000017500000104764411135163773015031 0ustar useruser/* translation of file(s) "abs.k" "main.k" "parse.k" "error.k" "occur.k" "util.k" "gen.k" "gutil.k" "pat.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #ifndef KC_TYPES_HEADER #define KC_TYPES_HEADER #define KIMWITUVERSIONMAJOR 2 #define KIMWITUVERSIONMINOR 3 #define KIMWITUVERSIONMICRO 13 #include #include #include #include namespace kc { #ifndef INTEGER # define INTEGER int #endif #ifndef REAL # define REAL double #endif #ifdef KC_UNICODE #define kc_t(TEXT) L ## TEXT typedef wchar_t kc_char_t; typedef std::wstring kc_string_t; #if defined(_WIN32) && ! defined (__GNUC__) #define kc_strlen wcslen #define kc_strcmp wcscmp #define kc_strcasecmp _wcsicmp #define kc_strcpy wcscpy #define kc_strncpy wcsncpy #define kc_tolower towlower #define kc_print_integer(buf,number) swprintf(buf,kc_t("%d"),number) #define kc_print_real(buf,number) swprintf(buf,kc_t("%g"),number) // needed for printdot and csgio only inline std::string kc_to_cstring(const std::wstring& s) { USES_CONVERSION; return W2CA(s.c_str()); } // needed for csgio only inline std::wstring kc_to_wstring(const std::string& s) { USES_CONVERSION; return A2CW(s.c_str()); } #else // !defined(_WIN32) || defined(__GNUC__) // if you want to use UNICODE on other platforms you have to write // the following functions on your own int kc_strlen(const kc_char_t*); int kc_strcmp(const kc_char_t*,const kc_char_t*); int kc_strcasecmp(const kc_char_t*,const kc_char_t*); int kc_strcpy(kc_char_t*,const kc_char_t*); int kc_strncpy(kc_char_t*,const kc_char_t*, int); kc_char_t kc_tolower(kc_char_t); int kc_print_integer(kc_char_t* buffer, INTEGER number ); int kc_print_real(kc_char_t* buffer, REAL number); // needed for printdot and csgio only std::string kc_to_cstring(const std::wstring& ); // needed for csgio only std::wstring kc_to_wstring(const std::string& ); #endif #else // !KC_UNICODE #define kc_t(TEXT) TEXT typedef char kc_char_t; typedef std::string kc_string_t; #define kc_strlen strlen #define kc_strcmp strcmp #if defined(_WIN32) && ! defined (__GNUC__) #define kc_strcasecmp _stricmp #else #define kc_strcasecmp strcasecmp #endif #define kc_strcpy strcpy #define kc_strncpy strncpy #define kc_tolower tolower #define kc_print_integer(buf,number) sprintf(buf,kc_t("%d"),number) #define kc_print_real(buf,number) sprintf(buf,kc_t("%g"),number) #endif class uview_class; typedef uview_class& uview; typedef const uview_class& c_uview; typedef class printer_functor_class& printer_functor; typedef void (*printer_function)(const kc_char_t*, uview); class rview_class; typedef rview_class& rview; typedef const rview_class& c_rview; } // Some compilers know __attribute__. Right now we test for the GNU compiler // and Intel's icc (for ia32) and ecc (for ia64). #if !defined __GNUC__ && !defined __ICC && !defined __ECC # define __attribute__(x) #endif // Since all definitions are in namespace kc now, there is no need // give them a kc_ prefix. Old code may still rely on the prefix, so these // macros are generated for backwards compatibility #ifdef KC_DEPRECATED #define kc_PhylumInfo phylum_info #define kc_OperatorInfo operator_info #define kc_last_uview last_uview #define kc_uviews uviews #define kc_rviews rviews #define kc_ht_reuse ht_clear #define kc_ht_clear ht_clear #define kc_ht_assign ht_assign #define kc_ht_assigned ht_assigned #define kc_phylum_nocasestring phylum_nocasestring #define kc_tag_nocasestring_NoCaseStr impl_nocasestring_NoCaseStr #define kc_phylum_casestring phylum_casestring #define kc_tag_casestring__Str impl_casestring__Str #define kc_phylum_real phylum_real #define kc_tag_real__Real impl_real__Real #define kc_phylum_integer phylum_integer #define kc_tag_integer__Int impl_integer__Int #define kc_phylum_voidptr phylum_voidptr #define kc_tag_voidptr__VoidPtr impl_voidptr__VoidPtr #define kc_phylum_uniqID phylum_uniqID #define kc_tag_uniqID_Str impl_uniqID_Str #define kc_phylum_ID phylum_ID #define kc_tag_ID_Id impl_ID_Id #define kc_phylum_INT phylum_INT #define kc_tag_INT_Int impl_INT_Int #define kc_phylum_STRING phylum_STRING #define kc_tag_STRING_String impl_STRING_String #define kc_phylum_phylumdeclarationsroot phylum_phylumdeclarationsroot #define kc_tag_phylumdeclarationsroot_PhylumDeclarations impl_phylumdeclarationsroot_PhylumDeclarations #define kc_phylum_phylumdeclarations phylum_phylumdeclarations #define kc_tag_phylumdeclarations_Nilphylumdeclarations impl_phylumdeclarations_Nilphylumdeclarations #define kc_tag_phylumdeclarations_Consphylumdeclarations impl_phylumdeclarations_Consphylumdeclarations #define kc_phylum_phylumnames phylum_phylumnames #define kc_tag_phylumnames_Nilphylumnames impl_phylumnames_Nilphylumnames #define kc_tag_phylumnames_Consphylumnames impl_phylumnames_Consphylumnames #define kc_phylum_phylumdeclaration phylum_phylumdeclaration #define kc_tag_phylumdeclaration_PhylumDeclaration impl_phylumdeclaration_PhylumDeclaration #define kc_phylum_storageoption phylum_storageoption #define kc_tag_storageoption_NoStorageOption impl_storageoption_NoStorageOption #define kc_tag_storageoption_NegativeStorageOption impl_storageoption_NegativeStorageOption #define kc_tag_storageoption_PositiveStorageOption impl_storageoption_PositiveStorageOption #define kc_phylum_storageclasses phylum_storageclasses #define kc_tag_storageclasses_Nilstorageclasses impl_storageclasses_Nilstorageclasses #define kc_tag_storageclasses_Consstorageclasses impl_storageclasses_Consstorageclasses #define kc_phylum_productionblock phylum_productionblock #define kc_tag_productionblock_Emptyproductionblock impl_productionblock_Emptyproductionblock #define kc_tag_productionblock_ListAlternatives impl_productionblock_ListAlternatives #define kc_tag_productionblock_NonlistAlternatives impl_productionblock_NonlistAlternatives #define kc_tag_productionblock_PredefinedAlternatives impl_productionblock_PredefinedAlternatives #define kc_phylum_alternatives phylum_alternatives #define kc_tag_alternatives_Nilalternatives impl_alternatives_Nilalternatives #define kc_tag_alternatives_Consalternatives impl_alternatives_Consalternatives #define kc_phylum_alternative phylum_alternative #define kc_tag_alternative_Alternative impl_alternative_Alternative #define kc_phylum_arguments phylum_arguments #define kc_tag_arguments_Nilarguments impl_arguments_Nilarguments #define kc_tag_arguments_Consarguments impl_arguments_Consarguments #define kc_phylum_argument phylum_argument #define kc_tag_argument_Argument impl_argument_Argument #define kc_phylum_Ccode_option phylum_Ccode_option #define kc_tag_Ccode_option_CcodeOption impl_Ccode_option_CcodeOption #define kc_phylum_attributes phylum_attributes #define kc_tag_attributes_Nilattributes impl_attributes_Nilattributes #define kc_tag_attributes_Consattributes impl_attributes_Consattributes #define kc_phylum_attribute phylum_attribute #define kc_tag_attribute_Attribute impl_attribute_Attribute #define kc_phylum_attribute_initialisation_option phylum_attribute_initialisation_option #define kc_tag_attribute_initialisation_option_Noattribute_initialisation impl_attribute_initialisation_option_Noattribute_initialisation #define kc_tag_attribute_initialisation_option_Yesattribute_initialisation impl_attribute_initialisation_option_Yesattribute_initialisation #define kc_phylum_Cexpression phylum_Cexpression #define kc_tag_Cexpression_NilCexpression impl_Cexpression_NilCexpression #define kc_tag_Cexpression_ConsCexpression impl_Cexpression_ConsCexpression #define kc_phylum_Cexpression_elem phylum_Cexpression_elem #define kc_tag_Cexpression_elem_CExpressionPart impl_Cexpression_elem_CExpressionPart #define kc_tag_Cexpression_elem_CExpressionDollarvar impl_Cexpression_elem_CExpressionDollarvar #define kc_tag_Cexpression_elem_CExpressionNl impl_Cexpression_elem_CExpressionNl #define kc_tag_Cexpression_elem_CExpressionDQ impl_Cexpression_elem_CExpressionDQ #define kc_tag_Cexpression_elem_CExpressionSQ impl_Cexpression_elem_CExpressionSQ #define kc_tag_Cexpression_elem_CExpressionPack impl_Cexpression_elem_CExpressionPack #define kc_tag_Cexpression_elem_CExpressionArray impl_Cexpression_elem_CExpressionArray #define kc_phylum_CexpressionDQ phylum_CexpressionDQ #define kc_tag_CexpressionDQ_NilCexpressionDQ impl_CexpressionDQ_NilCexpressionDQ #define kc_tag_CexpressionDQ_ConsCexpressionDQ impl_CexpressionDQ_ConsCexpressionDQ #define kc_phylum_CexpressionDQ_elem phylum_CexpressionDQ_elem #define kc_tag_CexpressionDQ_elem_CExpressionDQPart impl_CexpressionDQ_elem_CExpressionDQPart #define kc_tag_CexpressionDQ_elem_CExpressionDQNl impl_CexpressionDQ_elem_CExpressionDQNl #define kc_phylum_CexpressionSQ phylum_CexpressionSQ #define kc_tag_CexpressionSQ_NilCexpressionSQ impl_CexpressionSQ_NilCexpressionSQ #define kc_tag_CexpressionSQ_ConsCexpressionSQ impl_CexpressionSQ_ConsCexpressionSQ #define kc_phylum_CexpressionSQ_elem phylum_CexpressionSQ_elem #define kc_tag_CexpressionSQ_elem_CExpressionSQPart impl_CexpressionSQ_elem_CExpressionSQPart #define kc_tag_CexpressionSQ_elem_CExpressionSQNl impl_CexpressionSQ_elem_CExpressionSQNl #define kc_phylum_idCexpressions phylum_idCexpressions #define kc_tag_idCexpressions_NilidCexpressions impl_idCexpressions_NilidCexpressions #define kc_tag_idCexpressions_ConsidCexpressions impl_idCexpressions_ConsidCexpressions #define kc_phylum_idCexpression phylum_idCexpression #define kc_tag_idCexpression_IdCexpression impl_idCexpression_IdCexpression #define kc_phylum_Ctexts phylum_Ctexts #define kc_tag_Ctexts_NilCtexts impl_Ctexts_NilCtexts #define kc_tag_Ctexts_ConsCtexts impl_Ctexts_ConsCtexts #define kc_phylum_includefiles phylum_includefiles #define kc_tag_includefiles_Nilincludefiles impl_includefiles_Nilincludefiles #define kc_tag_includefiles_Consincludefiles impl_includefiles_Consincludefiles #define kc_phylum_includefile phylum_includefile #define kc_tag_includefile_IncludeFile impl_includefile_IncludeFile #define kc_phylum_includedeclarations phylum_includedeclarations #define kc_tag_includedeclarations_Nilincludedeclarations impl_includedeclarations_Nilincludedeclarations #define kc_tag_includedeclarations_Consincludedeclarations impl_includedeclarations_Consincludedeclarations #define kc_phylum_includedeclaration phylum_includedeclaration #define kc_tag_includedeclaration_IncludeDeclaration impl_includedeclaration_IncludeDeclaration #define kc_phylum_rwdeclarations phylum_rwdeclarations #define kc_tag_rwdeclarations_Nilrwdeclarations impl_rwdeclarations_Nilrwdeclarations #define kc_tag_rwdeclarations_Consrwdeclarations impl_rwdeclarations_Consrwdeclarations #define kc_phylum_rwdeclaration phylum_rwdeclaration #define kc_tag_rwdeclaration_RwDeclaration impl_rwdeclaration_RwDeclaration #define kc_phylum_rewriteclauses phylum_rewriteclauses #define kc_tag_rewriteclauses_Nilrewriteclauses impl_rewriteclauses_Nilrewriteclauses #define kc_tag_rewriteclauses_Consrewriteclauses impl_rewriteclauses_Consrewriteclauses #define kc_phylum_rewriteclause phylum_rewriteclause #define kc_tag_rewriteclause_RewriteClause impl_rewriteclause_RewriteClause #define kc_phylum_patternchains phylum_patternchains #define kc_tag_patternchains_Nilpatternchains impl_patternchains_Nilpatternchains #define kc_tag_patternchains_Conspatternchains impl_patternchains_Conspatternchains #define kc_phylum_patternchain phylum_patternchain #define kc_tag_patternchain_Nilpatternchain impl_patternchain_Nilpatternchain #define kc_tag_patternchain_Conspatternchain impl_patternchain_Conspatternchain #define kc_phylum_outmostpatterns phylum_outmostpatterns #define kc_tag_outmostpatterns_Niloutmostpatterns impl_outmostpatterns_Niloutmostpatterns #define kc_tag_outmostpatterns_Consoutmostpatterns impl_outmostpatterns_Consoutmostpatterns #define kc_phylum_patternchainitem phylum_patternchainitem #define kc_tag_patternchainitem_PatternchainitemOutmost impl_patternchainitem_PatternchainitemOutmost #define kc_tag_patternchainitem_PatternchainitemGroup impl_patternchainitem_PatternchainitemGroup #define kc_tag_patternchainitem_PatternchainitemDollarid impl_patternchainitem_PatternchainitemDollarid #define kc_phylum_outmostpattern phylum_outmostpattern #define kc_tag_outmostpattern_OPOperatorWildcard impl_outmostpattern_OPOperatorWildcard #define kc_tag_outmostpattern_OPOperator impl_outmostpattern_OPOperator #define kc_tag_outmostpattern_OPNonLeafVariable impl_outmostpattern_OPNonLeafVariable #define kc_tag_outmostpattern_OPWildcard impl_outmostpattern_OPWildcard #define kc_tag_outmostpattern_OPDefault impl_outmostpattern_OPDefault #define kc_phylum_pattern phylum_pattern #define kc_tag_pattern_PVariable impl_pattern_PVariable #define kc_tag_pattern_POperator impl_pattern_POperator #define kc_tag_pattern_PNonLeafVariable impl_pattern_PNonLeafVariable #define kc_tag_pattern_PWildcard impl_pattern_PWildcard #define kc_tag_pattern_PStringLiteral impl_pattern_PStringLiteral #define kc_tag_pattern_PIntLiteral impl_pattern_PIntLiteral #define kc_phylum_patterns phylum_patterns #define kc_tag_patterns_Nilpatterns impl_patterns_Nilpatterns #define kc_tag_patterns_Conspatterns impl_patterns_Conspatterns #define kc_phylum_term phylum_term #define kc_tag_term_TVariable impl_term_TVariable #define kc_tag_term_TOperator impl_term_TOperator #define kc_tag_term_TMethod impl_term_TMethod #define kc_tag_term_TMethodDot impl_term_TMethodDot #define kc_tag_term_TMemberVar impl_term_TMemberVar #define kc_tag_term_TMemberVarDot impl_term_TMemberVarDot #define kc_tag_term_TCTerm impl_term_TCTerm #define kc_tag_term_TStringLiteral impl_term_TStringLiteral #define kc_tag_term_TIntLiteral impl_term_TIntLiteral #define kc_phylum_terms phylum_terms #define kc_tag_terms_Nilterms impl_terms_Nilterms #define kc_tag_terms_Consterms impl_terms_Consterms #define kc_phylum_fnfiles phylum_fnfiles #define kc_tag_fnfiles_Nilfnfiles impl_fnfiles_Nilfnfiles #define kc_tag_fnfiles_Consfnfiles impl_fnfiles_Consfnfiles #define kc_phylum_fnfile phylum_fnfile #define kc_tag_fnfile_FnFile impl_fnfile_FnFile #define kc_phylum_fndeclarations phylum_fndeclarations #define kc_tag_fndeclarations_Nilfndeclarations impl_fndeclarations_Nilfndeclarations #define kc_tag_fndeclarations_Consfndeclarations impl_fndeclarations_Consfndeclarations #define kc_phylum_fndeclaration phylum_fndeclaration #define kc_tag_fndeclaration_FnAcDeclaration impl_fndeclaration_FnAcDeclaration #define kc_tag_fndeclaration_AcMemberDeclaration impl_fndeclaration_AcMemberDeclaration #define kc_phylum_fnclass phylum_fnclass #define kc_tag_fnclass_GlobalFn impl_fnclass_GlobalFn #define kc_tag_fnclass_StaticFn impl_fnclass_StaticFn #define kc_tag_fnclass_MemberFn impl_fnclass_MemberFn #define kc_tag_fnclass_ConstructorFn impl_fnclass_ConstructorFn #define kc_tag_fnclass_DestructorFn impl_fnclass_DestructorFn #define kc_tag_fnclass_ConvOperatorFn impl_fnclass_ConvOperatorFn #define kc_phylum_Ctext phylum_Ctext #define kc_tag_Ctext_NilCtext impl_Ctext_NilCtext #define kc_tag_Ctext_ConsCtext impl_Ctext_ConsCtext #define kc_phylum_Ctext_elem phylum_Ctext_elem #define kc_tag_Ctext_elem_CTextLine impl_Ctext_elem_CTextLine #define kc_tag_Ctext_elem_CTextDollarVar impl_Ctext_elem_CTextDollarVar #define kc_tag_Ctext_elem_CTextNl impl_Ctext_elem_CTextNl #define kc_tag_Ctext_elem_CTextCexpressionDQ impl_Ctext_elem_CTextCexpressionDQ #define kc_tag_Ctext_elem_CTextCexpressionSQ impl_Ctext_elem_CTextCexpressionSQ #define kc_tag_Ctext_elem_CTextCbody impl_Ctext_elem_CTextCbody #define kc_tag_Ctext_elem_CTextForeachexpression impl_Ctext_elem_CTextForeachexpression #define kc_tag_Ctext_elem_CTextWithexpression impl_Ctext_elem_CTextWithexpression #define kc_phylum_foreach_after phylum_foreach_after #define kc_tag_foreach_after_NoForeachAfter impl_foreach_after_NoForeachAfter #define kc_tag_foreach_after_ForeachAfter impl_foreach_after_ForeachAfter #define kc_phylum_contextinfo phylum_contextinfo #define kc_tag_contextinfo_InForeachContext impl_contextinfo_InForeachContext #define kc_tag_contextinfo_NotInForeachContext impl_contextinfo_NotInForeachContext #define kc_phylum_withexpressions phylum_withexpressions #define kc_tag_withexpressions_Nilwithexpressions impl_withexpressions_Nilwithexpressions #define kc_tag_withexpressions_Conswithexpressions impl_withexpressions_Conswithexpressions #define kc_phylum_withexpression phylum_withexpression #define kc_tag_withexpression_WEVariable impl_withexpression_WEVariable #define kc_tag_withexpression_WECexpression impl_withexpression_WECexpression #define kc_phylum_withcases phylum_withcases #define kc_tag_withcases_Nilwithcases impl_withcases_Nilwithcases #define kc_tag_withcases_Conswithcases impl_withcases_Conswithcases #define kc_phylum_withcase phylum_withcase #define kc_tag_withcase_Withcase impl_withcase_Withcase #define kc_phylum_unparsedeclarations phylum_unparsedeclarations #define kc_tag_unparsedeclarations_Nilunparsedeclarations impl_unparsedeclarations_Nilunparsedeclarations #define kc_tag_unparsedeclarations_Consunparsedeclarations impl_unparsedeclarations_Consunparsedeclarations #define kc_phylum_unparsedeclaration phylum_unparsedeclaration #define kc_tag_unparsedeclaration_UnparseDeclaration impl_unparsedeclaration_UnparseDeclaration #define kc_phylum_unparseclauses phylum_unparseclauses #define kc_tag_unparseclauses_Nilunparseclauses impl_unparseclauses_Nilunparseclauses #define kc_tag_unparseclauses_Consunparseclauses impl_unparseclauses_Consunparseclauses #define kc_phylum_unparseclause phylum_unparseclause #define kc_tag_unparseclause_UnparseClause impl_unparseclause_UnparseClause #define kc_phylum_viewnames phylum_viewnames #define kc_tag_viewnames_Nilviewnames impl_viewnames_Nilviewnames #define kc_tag_viewnames_Consviewnames impl_viewnames_Consviewnames #define kc_phylum_unparseitems phylum_unparseitems #define kc_tag_unparseitems_Nilunparseitems impl_unparseitems_Nilunparseitems #define kc_tag_unparseitems_Consunparseitems impl_unparseitems_Consunparseitems #define kc_phylum_unparseitem phylum_unparseitem #define kc_tag_unparseitem_UnpStr impl_unparseitem_UnpStr #define kc_tag_unparseitem_UnpSubexpr impl_unparseitem_UnpSubexpr #define kc_tag_unparseitem_UnpCtext impl_unparseitem_UnpCtext #define kc_tag_unparseitem_UnpBody impl_unparseitem_UnpBody #define kc_tag_unparseitem_UViewVarDecl impl_unparseitem_UViewVarDecl #define kc_phylum_unpsubterm phylum_unpsubterm #define kc_tag_unpsubterm_UnpSubTerm impl_unpsubterm_UnpSubTerm #define kc_tag_unpsubterm_UnpDollarvarTerm impl_unpsubterm_UnpDollarvarTerm #define kc_tag_unpsubterm_UnpSubAttr impl_unpsubterm_UnpSubAttr #define kc_tag_unpsubterm_UnpDollarvarAttr impl_unpsubterm_UnpDollarvarAttr #define kc_tag_unpsubterm_UnpCastedVariable impl_unpsubterm_UnpCastedVariable #define kc_phylum_unpattributes phylum_unpattributes #define kc_tag_unpattributes_Nilunpattributes impl_unpattributes_Nilunpattributes #define kc_tag_unpattributes_Consunpattributes impl_unpattributes_Consunpattributes #define kc_phylum_viewnameoption phylum_viewnameoption #define kc_tag_viewnameoption_NoViewname impl_viewnameoption_NoViewname #define kc_tag_viewnameoption_YesViewname impl_viewnameoption_YesViewname #define kc_phylum_languageoption phylum_languageoption #define kc_tag_languageoption_NoLanguagename impl_languageoption_NoLanguagename #define kc_tag_languageoption_LanguageList impl_languageoption_LanguageList #define kc_phylum_languagenames phylum_languagenames #define kc_tag_languagenames_Nillanguagenames impl_languagenames_Nillanguagenames #define kc_tag_languagenames_Conslanguagenames impl_languagenames_Conslanguagenames #define kc_phylum_fileline phylum_fileline #define kc_tag_fileline_FileLine impl_fileline_FileLine #define kc_tag_fileline_NoFileLine impl_fileline_NoFileLine #define kc_tag_fileline_PosNoFileLine impl_fileline_PosNoFileLine #define kc_phylum_scopetypefilelinestack phylum_scopetypefilelinestack #define kc_tag_scopetypefilelinestack_Nilscopetypefilelinestack impl_scopetypefilelinestack_Nilscopetypefilelinestack #define kc_tag_scopetypefilelinestack_Consscopetypefilelinestack impl_scopetypefilelinestack_Consscopetypefilelinestack #define kc_phylum_scopetypefileline phylum_scopetypefileline #define kc_tag_scopetypefileline_ScopeTypeFileLine impl_scopetypefileline_ScopeTypeFileLine #define kc_phylum_IDtype phylum_IDtype #define kc_tag_IDtype_ITUnknown impl_IDtype_ITUnknown #define kc_tag_IDtype_ITPredefinedPhylum impl_IDtype_ITPredefinedPhylum #define kc_tag_IDtype_ITUserPhylum impl_IDtype_ITUserPhylum #define kc_tag_IDtype_ITPredefinedOperator impl_IDtype_ITPredefinedOperator #define kc_tag_IDtype_ITUserOperator impl_IDtype_ITUserOperator #define kc_tag_IDtype_ITPredefinedStorageClass impl_IDtype_ITPredefinedStorageClass #define kc_tag_IDtype_ITStorageClass impl_IDtype_ITStorageClass #define kc_tag_IDtype_ITPredefinedUView impl_IDtype_ITPredefinedUView #define kc_tag_IDtype_ITUserUView impl_IDtype_ITUserUView #define kc_tag_IDtype_ITUViewVar impl_IDtype_ITUViewVar #define kc_tag_IDtype_ITPredefinedRView impl_IDtype_ITPredefinedRView #define kc_tag_IDtype_ITUserRView impl_IDtype_ITUserRView #define kc_tag_IDtype_ITUserFunction impl_IDtype_ITUserFunction #define kc_tag_IDtype_ITPatternVariable impl_IDtype_ITPatternVariable #define kc_tag_IDtype_ITLanguageName impl_IDtype_ITLanguageName #define kc_phylum_operators phylum_operators #define kc_tag_operators_Niloperators impl_operators_Niloperators #define kc_tag_operators_Consoperators impl_operators_Consoperators #define kc_phylum_phyla phylum_phyla #define kc_tag_phyla_Nilphyla impl_phyla_Nilphyla #define kc_tag_phyla_Consphyla impl_phyla_Consphyla #define kc_phylum_variables phylum_variables #define kc_tag_variables_Nilvariables impl_variables_Nilvariables #define kc_tag_variables_Consvariables impl_variables_Consvariables #define kc_phylum_dollarvarstatus phylum_dollarvarstatus #define kc_tag_dollarvarstatus_DVAllowed impl_dollarvarstatus_DVAllowed #define kc_tag_dollarvarstatus_DVDisallowed impl_dollarvarstatus_DVDisallowed #define kc_phylum_tribool phylum_tribool #define kc_tag_tribool_Equal impl_tribool_Equal #define kc_tag_tribool_Smaller impl_tribool_Smaller #define kc_tag_tribool_Bigger impl_tribool_Bigger #define kc_phylum_patternrepresentations phylum_patternrepresentations #define kc_tag_patternrepresentations_Nilpatternrepresentations impl_patternrepresentations_Nilpatternrepresentations #define kc_tag_patternrepresentations_Conspatternrepresentations impl_patternrepresentations_Conspatternrepresentations #define kc_phylum_patternrepresentation phylum_patternrepresentation #define kc_tag_patternrepresentation_Nilpatternrepresentation impl_patternrepresentation_Nilpatternrepresentation #define kc_tag_patternrepresentation_Conspatternrepresentation impl_patternrepresentation_Conspatternrepresentation #define kc_phylum_elem_patternrepresentation phylum_elem_patternrepresentation #define kc_tag_elem_patternrepresentation_PRBinding impl_elem_patternrepresentation_PRBinding #define kc_tag_elem_patternrepresentation_PRVarPredicate impl_elem_patternrepresentation_PRVarPredicate #define kc_tag_elem_patternrepresentation_PROperPredicate impl_elem_patternrepresentation_PROperPredicate #define kc_tag_elem_patternrepresentation_PRUserPredicate impl_elem_patternrepresentation_PRUserPredicate #define kc_tag_elem_patternrepresentation_PRNonLeafBinding impl_elem_patternrepresentation_PRNonLeafBinding #define kc_tag_elem_patternrepresentation_PRWildcard impl_elem_patternrepresentation_PRWildcard #define kc_tag_elem_patternrepresentation_PRDefault impl_elem_patternrepresentation_PRDefault #define kc_tag_elem_patternrepresentation_PRStringLiteral impl_elem_patternrepresentation_PRStringLiteral #define kc_tag_elem_patternrepresentation_PRIntLiteral impl_elem_patternrepresentation_PRIntLiteral #define kc_phylum_path phylum_path #define kc_tag_path_Nilpath impl_path_Nilpath #define kc_tag_path_Conspath impl_path_Conspath #define kc_phylum_paths phylum_paths #define kc_tag_paths_Nilpaths impl_paths_Nilpaths #define kc_tag_paths_Conspaths impl_paths_Conspaths #define kc_phylum_argsnumbers phylum_argsnumbers #define kc_tag_argsnumbers_Nilargsnumbers impl_argsnumbers_Nilargsnumbers #define kc_tag_argsnumbers_Consargsnumbers impl_argsnumbers_Consargsnumbers #define kc_phylum_rewriterulesinfo phylum_rewriterulesinfo #define kc_tag_rewriterulesinfo_Nilrewriterulesinfo impl_rewriterulesinfo_Nilrewriterulesinfo #define kc_tag_rewriterulesinfo_Consrewriterulesinfo impl_rewriterulesinfo_Consrewriterulesinfo #define kc_phylum_rewriteruleinfo phylum_rewriteruleinfo #define kc_tag_rewriteruleinfo_Rewriteruleinfo impl_rewriteruleinfo_Rewriteruleinfo #define kc_phylum_withcasesinfo phylum_withcasesinfo #define kc_tag_withcasesinfo_Nilwithcasesinfo impl_withcasesinfo_Nilwithcasesinfo #define kc_tag_withcasesinfo_Conswithcasesinfo impl_withcasesinfo_Conswithcasesinfo #define kc_phylum_withcaseinfo phylum_withcaseinfo #define kc_tag_withcaseinfo_Withcaseinfo impl_withcaseinfo_Withcaseinfo #define kc_phylum_rewriteviewsinfo phylum_rewriteviewsinfo #define kc_tag_rewriteviewsinfo_Nilrewriteviewsinfo impl_rewriteviewsinfo_Nilrewriteviewsinfo #define kc_tag_rewriteviewsinfo_Consrewriteviewsinfo impl_rewriteviewsinfo_Consrewriteviewsinfo #define kc_phylum_rewriteviewinfo phylum_rewriteviewinfo #define kc_tag_rewriteviewinfo_Rewriteviewinfo impl_rewriteviewinfo_Rewriteviewinfo #define kc_phylum_unparseviewsinfo phylum_unparseviewsinfo #define kc_tag_unparseviewsinfo_Nilunparseviewsinfo impl_unparseviewsinfo_Nilunparseviewsinfo #define kc_tag_unparseviewsinfo_Consunparseviewsinfo impl_unparseviewsinfo_Consunparseviewsinfo #define kc_phylum_unparseviewinfo phylum_unparseviewinfo #define kc_tag_unparseviewinfo_Unparseviewinfo impl_unparseviewinfo_Unparseviewinfo #define kc_phylum_unparsedeclsinfo phylum_unparsedeclsinfo #define kc_tag_unparsedeclsinfo_Nilunparsedeclsinfo impl_unparsedeclsinfo_Nilunparsedeclsinfo #define kc_tag_unparsedeclsinfo_Consunparsedeclsinfo impl_unparsedeclsinfo_Consunparsedeclsinfo #define kc_phylum_unparsedeclinfo phylum_unparsedeclinfo #define kc_tag_unparsedeclinfo_Unparsedeclinfo impl_unparsedeclinfo_Unparsedeclinfo #define kc_phylum_ac_declaration phylum_ac_declaration #define kc_tag_ac_declaration_AcDeclaration impl_ac_declaration_AcDeclaration #define kc_phylum_ac_declaration_list phylum_ac_declaration_list #define kc_tag_ac_declaration_list_Nilac_declaration_list impl_ac_declaration_list_Nilac_declaration_list #define kc_tag_ac_declaration_list_Consac_declaration_list impl_ac_declaration_list_Consac_declaration_list #define kc_phylum_ac_declaration_specifiers phylum_ac_declaration_specifiers #define kc_tag_ac_declaration_specifiers_Nilac_declaration_specifiers impl_ac_declaration_specifiers_Nilac_declaration_specifiers #define kc_tag_ac_declaration_specifiers_Consac_declaration_specifiers impl_ac_declaration_specifiers_Consac_declaration_specifiers #define kc_phylum_ac_declaration_specifier phylum_ac_declaration_specifier #define kc_tag_ac_declaration_specifier_AcDeclSpecStorageSpec impl_ac_declaration_specifier_AcDeclSpecStorageSpec #define kc_tag_ac_declaration_specifier_AcDeclSpecTypeSpec impl_ac_declaration_specifier_AcDeclSpecTypeSpec #define kc_tag_ac_declaration_specifier_AcDeclSpecTypeQual impl_ac_declaration_specifier_AcDeclSpecTypeQual #define kc_phylum_ac_storage_class_specifier phylum_ac_storage_class_specifier #define kc_tag_ac_storage_class_specifier_AcAuto impl_ac_storage_class_specifier_AcAuto #define kc_tag_ac_storage_class_specifier_AcRegister impl_ac_storage_class_specifier_AcRegister #define kc_tag_ac_storage_class_specifier_AcStatic impl_ac_storage_class_specifier_AcStatic #define kc_tag_ac_storage_class_specifier_AcExtern impl_ac_storage_class_specifier_AcExtern #define kc_tag_ac_storage_class_specifier_AcTypedef impl_ac_storage_class_specifier_AcTypedef #define kc_tag_ac_storage_class_specifier_AcVirtual impl_ac_storage_class_specifier_AcVirtual #define kc_phylum_ac_type_specifier phylum_ac_type_specifier #define kc_tag_ac_type_specifier_AcTypeSpec impl_ac_type_specifier_AcTypeSpec #define kc_phylum_ac_type_qualifier phylum_ac_type_qualifier #define kc_tag_ac_type_qualifier_AcConst impl_ac_type_qualifier_AcConst #define kc_tag_ac_type_qualifier_AcVolatile impl_ac_type_qualifier_AcVolatile #define kc_tag_ac_type_qualifier_AcUnsigned impl_ac_type_qualifier_AcUnsigned #define kc_tag_ac_type_qualifier_AcNoQualifier impl_ac_type_qualifier_AcNoQualifier #define kc_phylum_ac_init_declarator_list phylum_ac_init_declarator_list #define kc_tag_ac_init_declarator_list_Nilac_init_declarator_list impl_ac_init_declarator_list_Nilac_init_declarator_list #define kc_tag_ac_init_declarator_list_Consac_init_declarator_list impl_ac_init_declarator_list_Consac_init_declarator_list #define kc_phylum_ac_init_declarator phylum_ac_init_declarator #define kc_tag_ac_init_declarator_AcInitDecl impl_ac_init_declarator_AcInitDecl #define kc_phylum_ac_declarator phylum_ac_declarator #define kc_tag_ac_declarator_AcDeclarator impl_ac_declarator_AcDeclarator #define kc_phylum_ac_direct_declarator phylum_ac_direct_declarator #define kc_tag_ac_direct_declarator_AcDirectDeclId impl_ac_direct_declarator_AcDirectDeclId #define kc_tag_ac_direct_declarator_AcDirectDeclPack impl_ac_direct_declarator_AcDirectDeclPack #define kc_tag_ac_direct_declarator_AcDirectDeclArray impl_ac_direct_declarator_AcDirectDeclArray #define kc_tag_ac_direct_declarator_AcDirectDeclProto impl_ac_direct_declarator_AcDirectDeclProto #define kc_tag_ac_direct_declarator_AcQualifiedDeclProto impl_ac_direct_declarator_AcQualifiedDeclProto #define kc_tag_ac_direct_declarator_AcMemberDecl impl_ac_direct_declarator_AcMemberDecl #define kc_tag_ac_direct_declarator_AcConvOperatorDecl impl_ac_direct_declarator_AcConvOperatorDecl #define kc_tag_ac_direct_declarator_AcOperatorDeclId impl_ac_direct_declarator_AcOperatorDeclId #define kc_phylum_ac_pointer_option phylum_ac_pointer_option #define kc_tag_ac_pointer_option_Nopointer impl_ac_pointer_option_Nopointer #define kc_tag_ac_pointer_option_Yespointer impl_ac_pointer_option_Yespointer #define kc_phylum_ac_pointer phylum_ac_pointer #define kc_tag_ac_pointer_AcPointerNil impl_ac_pointer_AcPointerNil #define kc_tag_ac_pointer_AcPointerCons impl_ac_pointer_AcPointerCons #define kc_phylum_ac_ref_option phylum_ac_ref_option #define kc_tag_ac_ref_option_AcNoRef impl_ac_ref_option_AcNoRef #define kc_tag_ac_ref_option_AcRef impl_ac_ref_option_AcRef #define kc_phylum_ac_operator_name phylum_ac_operator_name #define kc_tag_ac_operator_name_AcOperatorName impl_ac_operator_name_AcOperatorName #define kc_phylum_ac_class_qualifier_help_list phylum_ac_class_qualifier_help_list #define kc_tag_ac_class_qualifier_help_list_Nilac_class_qualifier_help_list impl_ac_class_qualifier_help_list_Nilac_class_qualifier_help_list #define kc_tag_ac_class_qualifier_help_list_Consac_class_qualifier_help_list impl_ac_class_qualifier_help_list_Consac_class_qualifier_help_list #define kc_phylum_ac_class_qualifier_list phylum_ac_class_qualifier_list #define kc_tag_ac_class_qualifier_list_Nilac_class_qualifier_list impl_ac_class_qualifier_list_Nilac_class_qualifier_list #define kc_tag_ac_class_qualifier_list_Consac_class_qualifier_list impl_ac_class_qualifier_list_Consac_class_qualifier_list #define kc_phylum_ac_type_qualifier_list phylum_ac_type_qualifier_list #define kc_tag_ac_type_qualifier_list_Nilac_type_qualifier_list impl_ac_type_qualifier_list_Nilac_type_qualifier_list #define kc_tag_ac_type_qualifier_list_Consac_type_qualifier_list impl_ac_type_qualifier_list_Consac_type_qualifier_list #define kc_phylum_ac_parameter_type_list phylum_ac_parameter_type_list #define kc_tag_ac_parameter_type_list_AcParList impl_ac_parameter_type_list_AcParList #define kc_tag_ac_parameter_type_list_AcParList3Dot impl_ac_parameter_type_list_AcParList3Dot #define kc_phylum_ac_parameter_list phylum_ac_parameter_list #define kc_tag_ac_parameter_list_Nilac_parameter_list impl_ac_parameter_list_Nilac_parameter_list #define kc_tag_ac_parameter_list_Consac_parameter_list impl_ac_parameter_list_Consac_parameter_list #define kc_phylum_ac_parameter_declaration phylum_ac_parameter_declaration #define kc_tag_ac_parameter_declaration_AcParDeclDecl impl_ac_parameter_declaration_AcParDeclDecl #define kc_tag_ac_parameter_declaration_AcParDeclAbsdecl impl_ac_parameter_declaration_AcParDeclAbsdecl #define kc_phylum_ac_identifier_list phylum_ac_identifier_list #define kc_tag_ac_identifier_list_Nilac_identifier_list impl_ac_identifier_list_Nilac_identifier_list #define kc_tag_ac_identifier_list_Consac_identifier_list impl_ac_identifier_list_Consac_identifier_list #define kc_phylum_ac_abstract_declarator phylum_ac_abstract_declarator #define kc_tag_ac_abstract_declarator_AcAbsdeclPointer impl_ac_abstract_declarator_AcAbsdeclPointer #define kc_tag_ac_abstract_declarator_AcAbsdeclDirdecl impl_ac_abstract_declarator_AcAbsdeclDirdecl #define kc_phylum_ac_direct_abstract_declarator_option phylum_ac_direct_abstract_declarator_option #define kc_tag_ac_direct_abstract_declarator_option_Noac_direct_abstract_declarator impl_ac_direct_abstract_declarator_option_Noac_direct_abstract_declarator #define kc_tag_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator #define kc_phylum_ac_direct_abstract_declarator phylum_ac_direct_abstract_declarator #define kc_tag_ac_direct_abstract_declarator_AcDirAbsdeclPack impl_ac_direct_abstract_declarator_AcDirAbsdeclPack #define kc_tag_ac_direct_abstract_declarator_AcDirAbsdeclArray impl_ac_direct_abstract_declarator_AcDirAbsdeclArray #define kc_tag_ac_direct_abstract_declarator_AcDirAbsdeclFn impl_ac_direct_abstract_declarator_AcDirAbsdeclFn #define kc_phylum_ac_constant_expression_option phylum_ac_constant_expression_option #define kc_tag_ac_constant_expression_option_Yesac_constant_expression impl_ac_constant_expression_option_Yesac_constant_expression #define kc_tag_ac_constant_expression_option_Noac_constant_expression impl_ac_constant_expression_option_Noac_constant_expression #define kc_phylum_ac_constant_expression phylum_ac_constant_expression #define kc_tag_ac_constant_expression_AcConstExpr impl_ac_constant_expression_AcConstExpr #define kc_phylum_ac_constant_expression_list phylum_ac_constant_expression_list #define kc_tag_ac_constant_expression_list_Nilac_constant_expression_list impl_ac_constant_expression_list_Nilac_constant_expression_list #define kc_tag_ac_constant_expression_list_Consac_constant_expression_list impl_ac_constant_expression_list_Consac_constant_expression_list #define kc_phylum_ac_opt_base_init_list phylum_ac_opt_base_init_list #define kc_tag_ac_opt_base_init_list_AcNoBaseInit impl_ac_opt_base_init_list_AcNoBaseInit #define kc_tag_ac_opt_base_init_list_AcYesBaseInit impl_ac_opt_base_init_list_AcYesBaseInit #define kc_phylum_ac_base_init_list phylum_ac_base_init_list #define kc_tag_ac_base_init_list_Nilac_base_init_list impl_ac_base_init_list_Nilac_base_init_list #define kc_tag_ac_base_init_list_Consac_base_init_list impl_ac_base_init_list_Consac_base_init_list #define kc_phylum_ac_base_init phylum_ac_base_init #define kc_tag_ac_base_init_AcBaseInit impl_ac_base_init_AcBaseInit #define kc_phylum_baseclass_declarations phylum_baseclass_declarations #define kc_tag_baseclass_declarations_Nilbaseclass_declarations impl_baseclass_declarations_Nilbaseclass_declarations #define kc_tag_baseclass_declarations_Consbaseclass_declarations impl_baseclass_declarations_Consbaseclass_declarations #define kc_phylum_baseclass_decl phylum_baseclass_decl #define kc_tag_baseclass_decl_BaseClassDecl impl_baseclass_decl_BaseClassDecl #define kc_phylum_baseclass_list phylum_baseclass_list #define kc_tag_baseclass_list_Nilbaseclass_list impl_baseclass_list_Nilbaseclass_list #define kc_tag_baseclass_list_Consbaseclass_list impl_baseclass_list_Consbaseclass_list #define kc_phylum_error phylum_error #define kc_tag_error_Fatal impl_error_Fatal #define kc_tag_error_NonFatal impl_error_NonFatal #define kc_tag_error_Warning impl_error_Warning #define kc_phylum_problem phylum_problem #define kc_tag_problem_Problem1 impl_problem_Problem1 #define kc_tag_problem_Problem1ID impl_problem_Problem1ID #define kc_tag_problem_Problem1tID impl_problem_Problem1tID #define kc_tag_problem_Problem1we impl_problem_Problem1we #define kc_tag_problem_Problem1ID1ID impl_problem_Problem1ID1ID #define kc_tag_problem_Problem1t1ID impl_problem_Problem1t1ID #define kc_tag_problem_Problem1INT impl_problem_Problem1INT #define kc_tag_problem_Problem1int1 impl_problem_Problem1int1 #define kc_tag_problem_Problem1INT1ID impl_problem_Problem1INT1ID #define kc_tag_problem_Problem1ID1ID1ID impl_problem_Problem1ID1ID1ID #define kc_tag_problem_Problem1INT1ID1ID impl_problem_Problem1INT1ID1ID #define kc_tag_problem_Problem1storageoption1ID impl_problem_Problem1storageoption1ID #define kc_tag_problem_Problem2 impl_problem_Problem2 #define kc_tag_problem_Problem3 impl_problem_Problem3 #define kc_tag_problem_Problem3int1 impl_problem_Problem3int1 #define kc_tag_problem_Problem4 impl_problem_Problem4 #define kc_tag_problem_Problem5 impl_problem_Problem5 #define kc_tag_problem_Problem6 impl_problem_Problem6 #define kc_phylum_addedphylumdeclarations phylum_addedphylumdeclarations #define kc_tag_addedphylumdeclarations_Niladdedphylumdeclarations impl_addedphylumdeclarations_Niladdedphylumdeclarations #define kc_tag_addedphylumdeclarations_Consaddedphylumdeclarations impl_addedphylumdeclarations_Consaddedphylumdeclarations #define kc_phylum_addedphylumdeclaration phylum_addedphylumdeclaration #define kc_tag_addedphylumdeclaration_AddedPhylumdeclaration impl_addedphylumdeclaration_AddedPhylumdeclaration #define kc_phylum_countedphylumdeclarations phylum_countedphylumdeclarations #define kc_tag_countedphylumdeclarations_Nilcountedphylumdeclarations impl_countedphylumdeclarations_Nilcountedphylumdeclarations #define kc_tag_countedphylumdeclarations_Conscountedphylumdeclarations impl_countedphylumdeclarations_Conscountedphylumdeclarations #define kc_phylum_countedphylumdeclaration phylum_countedphylumdeclaration #define kc_tag_countedphylumdeclaration_CountedPhylumdeclaration impl_countedphylumdeclaration_CountedPhylumdeclaration #define kc_phylum_charruns phylum_charruns #define kc_tag_charruns_Newlines impl_charruns_Newlines #define kc_tag_charruns_QuotedNewlines impl_charruns_QuotedNewlines #define kc_tag_charruns_Stars impl_charruns_Stars #define kc_phylum_bindingidmarks phylum_bindingidmarks #define kc_tag_bindingidmarks_Nilbindingidmarks impl_bindingidmarks_Nilbindingidmarks #define kc_tag_bindingidmarks_Consbindingidmarks impl_bindingidmarks_Consbindingidmarks #define kc_phylum_bindingidmark phylum_bindingidmark #define kc_tag_bindingidmark_BindingIdMark impl_bindingidmark_BindingIdMark #endif // KC_DEPRECATED // Some compilers are too stupid to detect that a function will always return // a proper value when it returns one in all branches of an if- or switch- // statement (with final else or default, of course). #if !defined __GNUC__ # define NORETURN throw 0; #else # define NORETURN #endif namespace kc { typedef enum { one_before_first_phylum = 0 , phylum_nocasestring = 1, phylum_casestring = 2, phylum_real = 3, phylum_integer = 4, phylum_voidptr = 5, phylum_uniqID = 6, phylum_ID = 7, phylum_INT = 8, phylum_STRING = 9, phylum_phylumdeclarationsroot = 10, phylum_phylumdeclarations = 11, phylum_phylumnames = 12, phylum_phylumdeclaration = 13, phylum_storageoption = 14, phylum_storageclasses = 15, phylum_productionblock = 16, phylum_alternatives = 17, phylum_alternative = 18, phylum_arguments = 19, phylum_argument = 20, phylum_Ccode_option = 21, phylum_attributes = 22, phylum_attribute = 23, phylum_attribute_initialisation_option = 24, phylum_Cexpression = 25, phylum_Cexpression_elem = 26, phylum_CexpressionDQ = 27, phylum_CexpressionDQ_elem = 28, phylum_CexpressionSQ = 29, phylum_CexpressionSQ_elem = 30, phylum_idCexpressions = 31, phylum_idCexpression = 32, phylum_Ctexts = 33, phylum_includefiles = 34, phylum_includefile = 35, phylum_includedeclarations = 36, phylum_includedeclaration = 37, phylum_rwdeclarations = 38, phylum_rwdeclaration = 39, phylum_rewriteclauses = 40, phylum_rewriteclause = 41, phylum_patternchains = 42, phylum_patternchain = 43, phylum_outmostpatterns = 44, phylum_patternchainitem = 45, phylum_outmostpattern = 46, phylum_pattern = 47, phylum_patterns = 48, phylum_term = 49, phylum_terms = 50, phylum_fnfiles = 51, phylum_fnfile = 52, phylum_fndeclarations = 53, phylum_fndeclaration = 54, phylum_fnclass = 55, phylum_Ctext = 56, phylum_Ctext_elem = 57, phylum_foreach_after = 58, phylum_contextinfo = 59, phylum_withexpressions = 60, phylum_withexpression = 61, phylum_withcases = 62, phylum_withcase = 63, phylum_unparsedeclarations = 64, phylum_unparsedeclaration = 65, phylum_unparseclauses = 66, phylum_unparseclause = 67, phylum_viewnames = 68, phylum_unparseitems = 69, phylum_unparseitem = 70, phylum_unpsubterm = 71, phylum_unpattributes = 72, phylum_viewnameoption = 73, phylum_languageoption = 74, phylum_languagenames = 75, phylum_fileline = 76, phylum_scopetypefilelinestack = 77, phylum_scopetypefileline = 78, phylum_IDtype = 79, phylum_operators = 80, phylum_phyla = 81, phylum_variables = 82, phylum_dollarvarstatus = 83, phylum_tribool = 84, phylum_patternrepresentations = 85, phylum_patternrepresentation = 86, phylum_elem_patternrepresentation = 87, phylum_path = 88, phylum_paths = 89, phylum_argsnumbers = 90, phylum_rewriterulesinfo = 91, phylum_rewriteruleinfo = 92, phylum_withcasesinfo = 93, phylum_withcaseinfo = 94, phylum_rewriteviewsinfo = 95, phylum_rewriteviewinfo = 96, phylum_unparseviewsinfo = 97, phylum_unparseviewinfo = 98, phylum_unparsedeclsinfo = 99, phylum_unparsedeclinfo = 100, phylum_ac_declaration = 101, phylum_ac_declaration_list = 102, phylum_ac_declaration_specifiers = 103, phylum_ac_declaration_specifier = 104, phylum_ac_storage_class_specifier = 105, phylum_ac_type_specifier = 106, phylum_ac_type_qualifier = 107, phylum_ac_init_declarator_list = 108, phylum_ac_init_declarator = 109, phylum_ac_declarator = 110, phylum_ac_direct_declarator = 111, phylum_ac_pointer_option = 112, phylum_ac_pointer = 113, phylum_ac_ref_option = 114, phylum_ac_operator_name = 115, phylum_ac_class_qualifier_help_list = 116, phylum_ac_class_qualifier_list = 117, phylum_ac_type_qualifier_list = 118, phylum_ac_parameter_type_list = 119, phylum_ac_parameter_list = 120, phylum_ac_parameter_declaration = 121, phylum_ac_identifier_list = 122, phylum_ac_abstract_declarator = 123, phylum_ac_direct_abstract_declarator_option = 124, phylum_ac_direct_abstract_declarator = 125, phylum_ac_constant_expression_option = 126, phylum_ac_constant_expression = 127, phylum_ac_constant_expression_list = 128, phylum_ac_opt_base_init_list = 129, phylum_ac_base_init_list = 130, phylum_ac_base_init = 131, phylum_baseclass_declarations = 132, phylum_baseclass_decl = 133, phylum_baseclass_list = 134, phylum_error = 135, phylum_problem = 136, phylum_addedphylumdeclarations = 137, phylum_addedphylumdeclaration = 138, phylum_countedphylumdeclarations = 139, phylum_countedphylumdeclaration = 140, phylum_charruns = 141, phylum_bindingidmarks = 142, phylum_bindingidmark = 143, last_phylum = 144 } enum_phyla; typedef enum { one_before_first_operator = 0 , sel_NoCaseStr = 1, sel__Str = 2, sel__Real = 3, sel__Int = 4, sel__VoidPtr = 5, sel_Str = 6, sel_Id = 7, sel_Int = 8, sel_String = 9, sel_PhylumDeclarations = 10, sel_Nilphylumdeclarations = 11, sel_Consphylumdeclarations = 12, sel_Nilphylumnames = 13, sel_Consphylumnames = 14, sel_PhylumDeclaration = 15, sel_NoStorageOption = 16, sel_NegativeStorageOption = 17, sel_PositiveStorageOption = 18, sel_Nilstorageclasses = 19, sel_Consstorageclasses = 20, sel_Emptyproductionblock = 21, sel_ListAlternatives = 22, sel_NonlistAlternatives = 23, sel_PredefinedAlternatives = 24, sel_Nilalternatives = 25, sel_Consalternatives = 26, sel_Alternative = 27, sel_Nilarguments = 28, sel_Consarguments = 29, sel_Argument = 30, sel_CcodeOption = 31, sel_Nilattributes = 32, sel_Consattributes = 33, sel_Attribute = 34, sel_Noattribute_initialisation = 35, sel_Yesattribute_initialisation = 36, sel_NilCexpression = 37, sel_ConsCexpression = 38, sel_CExpressionPart = 39, sel_CExpressionDollarvar = 40, sel_CExpressionNl = 41, sel_CExpressionDQ = 42, sel_CExpressionSQ = 43, sel_CExpressionPack = 44, sel_CExpressionArray = 45, sel_NilCexpressionDQ = 46, sel_ConsCexpressionDQ = 47, sel_CExpressionDQPart = 48, sel_CExpressionDQNl = 49, sel_NilCexpressionSQ = 50, sel_ConsCexpressionSQ = 51, sel_CExpressionSQPart = 52, sel_CExpressionSQNl = 53, sel_NilidCexpressions = 54, sel_ConsidCexpressions = 55, sel_IdCexpression = 56, sel_NilCtexts = 57, sel_ConsCtexts = 58, sel_Nilincludefiles = 59, sel_Consincludefiles = 60, sel_IncludeFile = 61, sel_Nilincludedeclarations = 62, sel_Consincludedeclarations = 63, sel_IncludeDeclaration = 64, sel_Nilrwdeclarations = 65, sel_Consrwdeclarations = 66, sel_RwDeclaration = 67, sel_Nilrewriteclauses = 68, sel_Consrewriteclauses = 69, sel_RewriteClause = 70, sel_Nilpatternchains = 71, sel_Conspatternchains = 72, sel_Nilpatternchain = 73, sel_Conspatternchain = 74, sel_Niloutmostpatterns = 75, sel_Consoutmostpatterns = 76, sel_PatternchainitemOutmost = 77, sel_PatternchainitemGroup = 78, sel_PatternchainitemDollarid = 79, sel_OPOperatorWildcard = 80, sel_OPOperator = 81, sel_OPNonLeafVariable = 82, sel_OPWildcard = 83, sel_OPDefault = 84, sel_PVariable = 85, sel_POperator = 86, sel_PNonLeafVariable = 87, sel_PWildcard = 88, sel_PStringLiteral = 89, sel_PIntLiteral = 90, sel_Nilpatterns = 91, sel_Conspatterns = 92, sel_TVariable = 93, sel_TOperator = 94, sel_TMethod = 95, sel_TMethodDot = 96, sel_TMemberVar = 97, sel_TMemberVarDot = 98, sel_TCTerm = 99, sel_TStringLiteral = 100, sel_TIntLiteral = 101, sel_Nilterms = 102, sel_Consterms = 103, sel_Nilfnfiles = 104, sel_Consfnfiles = 105, sel_FnFile = 106, sel_Nilfndeclarations = 107, sel_Consfndeclarations = 108, sel_FnAcDeclaration = 109, sel_AcMemberDeclaration = 110, sel_GlobalFn = 111, sel_StaticFn = 112, sel_MemberFn = 113, sel_ConstructorFn = 114, sel_DestructorFn = 115, sel_ConvOperatorFn = 116, sel_NilCtext = 117, sel_ConsCtext = 118, sel_CTextLine = 119, sel_CTextDollarVar = 120, sel_CTextNl = 121, sel_CTextCexpressionDQ = 122, sel_CTextCexpressionSQ = 123, sel_CTextCbody = 124, sel_CTextForeachexpression = 125, sel_CTextWithexpression = 126, sel_NoForeachAfter = 127, sel_ForeachAfter = 128, sel_InForeachContext = 129, sel_NotInForeachContext = 130, sel_Nilwithexpressions = 131, sel_Conswithexpressions = 132, sel_WEVariable = 133, sel_WECexpression = 134, sel_Nilwithcases = 135, sel_Conswithcases = 136, sel_Withcase = 137, sel_Nilunparsedeclarations = 138, sel_Consunparsedeclarations = 139, sel_UnparseDeclaration = 140, sel_Nilunparseclauses = 141, sel_Consunparseclauses = 142, sel_UnparseClause = 143, sel_Nilviewnames = 144, sel_Consviewnames = 145, sel_Nilunparseitems = 146, sel_Consunparseitems = 147, sel_UnpStr = 148, sel_UnpSubexpr = 149, sel_UnpCtext = 150, sel_UnpBody = 151, sel_UViewVarDecl = 152, sel_UnpSubTerm = 153, sel_UnpDollarvarTerm = 154, sel_UnpSubAttr = 155, sel_UnpDollarvarAttr = 156, sel_UnpCastedVariable = 157, sel_Nilunpattributes = 158, sel_Consunpattributes = 159, sel_NoViewname = 160, sel_YesViewname = 161, sel_NoLanguagename = 162, sel_LanguageList = 163, sel_Nillanguagenames = 164, sel_Conslanguagenames = 165, sel_FileLine = 166, sel_NoFileLine = 167, sel_PosNoFileLine = 168, sel_Nilscopetypefilelinestack = 169, sel_Consscopetypefilelinestack = 170, sel_ScopeTypeFileLine = 171, sel_ITUnknown = 172, sel_ITPredefinedPhylum = 173, sel_ITUserPhylum = 174, sel_ITPredefinedOperator = 175, sel_ITUserOperator = 176, sel_ITPredefinedStorageClass = 177, sel_ITStorageClass = 178, sel_ITPredefinedUView = 179, sel_ITUserUView = 180, sel_ITUViewVar = 181, sel_ITPredefinedRView = 182, sel_ITUserRView = 183, sel_ITUserFunction = 184, sel_ITPatternVariable = 185, sel_ITLanguageName = 186, sel_Niloperators = 187, sel_Consoperators = 188, sel_Nilphyla = 189, sel_Consphyla = 190, sel_Nilvariables = 191, sel_Consvariables = 192, sel_DVAllowed = 193, sel_DVDisallowed = 194, sel_Equal = 195, sel_Smaller = 196, sel_Bigger = 197, sel_Nilpatternrepresentations = 198, sel_Conspatternrepresentations = 199, sel_Nilpatternrepresentation = 200, sel_Conspatternrepresentation = 201, sel_PRBinding = 202, sel_PRVarPredicate = 203, sel_PROperPredicate = 204, sel_PRUserPredicate = 205, sel_PRNonLeafBinding = 206, sel_PRWildcard = 207, sel_PRDefault = 208, sel_PRStringLiteral = 209, sel_PRIntLiteral = 210, sel_Nilpath = 211, sel_Conspath = 212, sel_Nilpaths = 213, sel_Conspaths = 214, sel_Nilargsnumbers = 215, sel_Consargsnumbers = 216, sel_Nilrewriterulesinfo = 217, sel_Consrewriterulesinfo = 218, sel_Rewriteruleinfo = 219, sel_Nilwithcasesinfo = 220, sel_Conswithcasesinfo = 221, sel_Withcaseinfo = 222, sel_Nilrewriteviewsinfo = 223, sel_Consrewriteviewsinfo = 224, sel_Rewriteviewinfo = 225, sel_Nilunparseviewsinfo = 226, sel_Consunparseviewsinfo = 227, sel_Unparseviewinfo = 228, sel_Nilunparsedeclsinfo = 229, sel_Consunparsedeclsinfo = 230, sel_Unparsedeclinfo = 231, sel_AcDeclaration = 232, sel_Nilac_declaration_list = 233, sel_Consac_declaration_list = 234, sel_Nilac_declaration_specifiers = 235, sel_Consac_declaration_specifiers = 236, sel_AcDeclSpecStorageSpec = 237, sel_AcDeclSpecTypeSpec = 238, sel_AcDeclSpecTypeQual = 239, sel_AcAuto = 240, sel_AcRegister = 241, sel_AcStatic = 242, sel_AcExtern = 243, sel_AcTypedef = 244, sel_AcVirtual = 245, sel_AcTypeSpec = 246, sel_AcConst = 247, sel_AcVolatile = 248, sel_AcUnsigned = 249, sel_AcNoQualifier = 250, sel_Nilac_init_declarator_list = 251, sel_Consac_init_declarator_list = 252, sel_AcInitDecl = 253, sel_AcDeclarator = 254, sel_AcDirectDeclId = 255, sel_AcDirectDeclPack = 256, sel_AcDirectDeclArray = 257, sel_AcDirectDeclProto = 258, sel_AcQualifiedDeclProto = 259, sel_AcMemberDecl = 260, sel_AcConvOperatorDecl = 261, sel_AcOperatorDeclId = 262, sel_Nopointer = 263, sel_Yespointer = 264, sel_AcPointerNil = 265, sel_AcPointerCons = 266, sel_AcNoRef = 267, sel_AcRef = 268, sel_AcOperatorName = 269, sel_Nilac_class_qualifier_help_list = 270, sel_Consac_class_qualifier_help_list = 271, sel_Nilac_class_qualifier_list = 272, sel_Consac_class_qualifier_list = 273, sel_Nilac_type_qualifier_list = 274, sel_Consac_type_qualifier_list = 275, sel_AcParList = 276, sel_AcParList3Dot = 277, sel_Nilac_parameter_list = 278, sel_Consac_parameter_list = 279, sel_AcParDeclDecl = 280, sel_AcParDeclAbsdecl = 281, sel_Nilac_identifier_list = 282, sel_Consac_identifier_list = 283, sel_AcAbsdeclPointer = 284, sel_AcAbsdeclDirdecl = 285, sel_Noac_direct_abstract_declarator = 286, sel_Yesac_direct_abstract_declarator = 287, sel_AcDirAbsdeclPack = 288, sel_AcDirAbsdeclArray = 289, sel_AcDirAbsdeclFn = 290, sel_Yesac_constant_expression = 291, sel_Noac_constant_expression = 292, sel_AcConstExpr = 293, sel_Nilac_constant_expression_list = 294, sel_Consac_constant_expression_list = 295, sel_AcNoBaseInit = 296, sel_AcYesBaseInit = 297, sel_Nilac_base_init_list = 298, sel_Consac_base_init_list = 299, sel_AcBaseInit = 300, sel_Nilbaseclass_declarations = 301, sel_Consbaseclass_declarations = 302, sel_BaseClassDecl = 303, sel_Nilbaseclass_list = 304, sel_Consbaseclass_list = 305, sel_Fatal = 306, sel_NonFatal = 307, sel_Warning = 308, sel_Problem1 = 309, sel_Problem1ID = 310, sel_Problem1tID = 311, sel_Problem1we = 312, sel_Problem1ID1ID = 313, sel_Problem1t1ID = 314, sel_Problem1INT = 315, sel_Problem1int1 = 316, sel_Problem1INT1ID = 317, sel_Problem1ID1ID1ID = 318, sel_Problem1INT1ID1ID = 319, sel_Problem1storageoption1ID = 320, sel_Problem2 = 321, sel_Problem3 = 322, sel_Problem3int1 = 323, sel_Problem4 = 324, sel_Problem5 = 325, sel_Problem6 = 326, sel_Niladdedphylumdeclarations = 327, sel_Consaddedphylumdeclarations = 328, sel_AddedPhylumdeclaration = 329, sel_Nilcountedphylumdeclarations = 330, sel_Conscountedphylumdeclarations = 331, sel_CountedPhylumdeclaration = 332, sel_Newlines = 333, sel_QuotedNewlines = 334, sel_Stars = 335, sel_Nilbindingidmarks = 336, sel_Consbindingidmarks = 337, sel_BindingIdMark = 338, last_operator = 339 } enum_operators; class impl_abstract_phylum; typedef impl_abstract_phylum * abstract_phylum; typedef const impl_abstract_phylum * c_abstract_phylum; class impl_abstract_list; typedef impl_abstract_list * abstract_list; typedef const impl_abstract_list * c_abstract_list; template P phylum_cast(T* t) { return static_cast

(t); } template const P phylum_cast(const T* t) { return static_cast(t); } class impl_nocasestring_NoCaseStr; class impl_casestring__Str; class impl_real__Real; class impl_integer__Int; class impl_voidptr__VoidPtr; class impl_uniqID; class impl_ID; class impl_INT; class impl_STRING; class impl_phylumdeclarationsroot; class impl_phylumdeclarations; class impl_phylumnames; class impl_phylumdeclaration; class impl_storageoption; class impl_storageclasses; class impl_productionblock; class impl_alternatives; class impl_alternative; class impl_arguments; class impl_argument; class impl_Ccode_option; class impl_attributes; class impl_attribute; class impl_attribute_initialisation_option; class impl_Cexpression; class impl_Cexpression_elem; class impl_CexpressionDQ; class impl_CexpressionDQ_elem; class impl_CexpressionSQ; class impl_CexpressionSQ_elem; class impl_idCexpressions; class impl_idCexpression; class impl_Ctexts; class impl_includefiles; class impl_includefile; class impl_includedeclarations; class impl_includedeclaration; class impl_rwdeclarations; class impl_rwdeclaration; class impl_rewriteclauses; class impl_rewriteclause; class impl_patternchains; class impl_patternchain; class impl_outmostpatterns; class impl_patternchainitem; class impl_outmostpattern; class impl_pattern; class impl_patterns; class impl_term; class impl_terms; class impl_fnfiles; class impl_fnfile; class impl_fndeclarations; class impl_fndeclaration; class impl_fnclass; class impl_Ctext; class impl_Ctext_elem; class impl_foreach_after; class impl_contextinfo; class impl_withexpressions; class impl_withexpression; class impl_withcases; class impl_withcase; class impl_unparsedeclarations; class impl_unparsedeclaration; class impl_unparseclauses; class impl_unparseclause; class impl_viewnames; class impl_unparseitems; class impl_unparseitem; class impl_unpsubterm; class impl_unpattributes; class impl_viewnameoption; class impl_languageoption; class impl_languagenames; class impl_fileline; class impl_scopetypefilelinestack; class impl_scopetypefileline; class impl_IDtype; class impl_operators; class impl_phyla; class impl_variables; class impl_dollarvarstatus; class impl_tribool; class impl_patternrepresentations; class impl_patternrepresentation; class impl_elem_patternrepresentation; class impl_path; class impl_paths; class impl_argsnumbers; class impl_rewriterulesinfo; class impl_rewriteruleinfo; class impl_withcasesinfo; class impl_withcaseinfo; class impl_rewriteviewsinfo; class impl_rewriteviewinfo; class impl_unparseviewsinfo; class impl_unparseviewinfo; class impl_unparsedeclsinfo; class impl_unparsedeclinfo; class impl_ac_declaration; class impl_ac_declaration_list; class impl_ac_declaration_specifiers; class impl_ac_declaration_specifier; class impl_ac_storage_class_specifier; class impl_ac_type_specifier; class impl_ac_type_qualifier; class impl_ac_init_declarator_list; class impl_ac_init_declarator; class impl_ac_declarator; class impl_ac_direct_declarator; class impl_ac_pointer_option; class impl_ac_pointer; class impl_ac_ref_option; class impl_ac_operator_name; class impl_ac_class_qualifier_help_list; class impl_ac_class_qualifier_list; class impl_ac_type_qualifier_list; class impl_ac_parameter_type_list; class impl_ac_parameter_list; class impl_ac_parameter_declaration; class impl_ac_identifier_list; class impl_ac_abstract_declarator; class impl_ac_direct_abstract_declarator_option; class impl_ac_direct_abstract_declarator; class impl_ac_constant_expression_option; class impl_ac_constant_expression; class impl_ac_constant_expression_list; class impl_ac_opt_base_init_list; class impl_ac_base_init_list; class impl_ac_base_init; class impl_baseclass_declarations; class impl_baseclass_decl; class impl_baseclass_list; class impl_error; class impl_problem; class impl_addedphylumdeclarations; class impl_addedphylumdeclaration; class impl_countedphylumdeclarations; class impl_countedphylumdeclaration; class impl_charruns; class impl_bindingidmarks; class impl_bindingidmark; void kc_invalid_operator( const char *kc_func_prefix, enum_phyla kc_phy, int kc_line, const char *kc_file, enum_operators kc_oper ) __attribute__ ((noreturn)); typedef enum_phyla *enum_phyla_list; /* * make sure that the first 'real' storage class _always_ gets a value > 0 * and kc_not_uniq gets a value == 0 * (because then we can use it as a C boolean) */ enum kc_storageclass_t { kc_not_uniq, uniq, last_storageclass }; typedef struct { const char *name; // name of the phylum enum_operators first_operator; // index in operator_info[] enum_operators last_operator; // index in operator_info[] kc_storageclass_t uniq_stored; // storage class } KC_PHYLUM_INFO; typedef struct { const char *name; // name of the operator size_t no_sons; // number of sons bool atomicity; // atomic type or not enum_phyla phylum; // index in phylum_info[] enum_phyla_list subphylum; // indexes in phylum_info[] int no_attrs; // number of attributes enum_phyla_list attribute; // indexes in phylum_info[] size_t size; // size of operator (for statistics) } KC_OPERATOR_INFO; typedef enum_phyla_list KC_UNIQ_INFO; extern KC_OPERATOR_INFO operator_info[]; extern KC_PHYLUM_INFO phylum_info[]; extern KC_UNIQ_INFO kc_UniqInfo[]; #define KC_OP_NAME(op) (operator_info[op].name) #define KC_NO_SONS(prod) (operator_info[prod].no_sons) #define KC_ATOMICITY(prod) (operator_info[prod].atomicity) typedef impl_nocasestring_NoCaseStr *nocasestring; typedef const impl_nocasestring_NoCaseStr *c_nocasestring; typedef impl_casestring__Str *casestring; typedef const impl_casestring__Str *c_casestring; typedef impl_real__Real *real; typedef const impl_real__Real *c_real; typedef impl_integer__Int *integer; typedef const impl_integer__Int *c_integer; typedef impl_voidptr__VoidPtr *voidptr; typedef const impl_voidptr__VoidPtr *c_voidptr; typedef impl_uniqID *uniqID; typedef const impl_uniqID *c_uniqID; typedef impl_ID *ID; typedef const impl_ID *c_ID; typedef impl_INT *INT; typedef const impl_INT *c_INT; typedef impl_STRING *STRING; typedef const impl_STRING *c_STRING; typedef impl_phylumdeclarationsroot *phylumdeclarationsroot; typedef const impl_phylumdeclarationsroot *c_phylumdeclarationsroot; typedef impl_phylumdeclarations *phylumdeclarations; typedef const impl_phylumdeclarations *c_phylumdeclarations; typedef impl_phylumnames *phylumnames; typedef const impl_phylumnames *c_phylumnames; typedef impl_phylumdeclaration *phylumdeclaration; typedef const impl_phylumdeclaration *c_phylumdeclaration; typedef impl_storageoption *storageoption; typedef const impl_storageoption *c_storageoption; typedef impl_storageclasses *storageclasses; typedef const impl_storageclasses *c_storageclasses; typedef impl_productionblock *productionblock; typedef const impl_productionblock *c_productionblock; typedef impl_alternatives *alternatives; typedef const impl_alternatives *c_alternatives; typedef impl_alternative *alternative; typedef const impl_alternative *c_alternative; typedef impl_arguments *arguments; typedef const impl_arguments *c_arguments; typedef impl_argument *argument; typedef const impl_argument *c_argument; typedef impl_Ccode_option *Ccode_option; typedef const impl_Ccode_option *c_Ccode_option; typedef impl_attributes *attributes; typedef const impl_attributes *c_attributes; typedef impl_attribute *attribute; typedef const impl_attribute *c_attribute; typedef impl_attribute_initialisation_option *attribute_initialisation_option; typedef const impl_attribute_initialisation_option *c_attribute_initialisation_option; typedef impl_Cexpression *Cexpression; typedef const impl_Cexpression *c_Cexpression; typedef impl_Cexpression_elem *Cexpression_elem; typedef const impl_Cexpression_elem *c_Cexpression_elem; typedef impl_CexpressionDQ *CexpressionDQ; typedef const impl_CexpressionDQ *c_CexpressionDQ; typedef impl_CexpressionDQ_elem *CexpressionDQ_elem; typedef const impl_CexpressionDQ_elem *c_CexpressionDQ_elem; typedef impl_CexpressionSQ *CexpressionSQ; typedef const impl_CexpressionSQ *c_CexpressionSQ; typedef impl_CexpressionSQ_elem *CexpressionSQ_elem; typedef const impl_CexpressionSQ_elem *c_CexpressionSQ_elem; typedef impl_idCexpressions *idCexpressions; typedef const impl_idCexpressions *c_idCexpressions; typedef impl_idCexpression *idCexpression; typedef const impl_idCexpression *c_idCexpression; typedef impl_Ctexts *Ctexts; typedef const impl_Ctexts *c_Ctexts; typedef impl_includefiles *includefiles; typedef const impl_includefiles *c_includefiles; typedef impl_includefile *includefile; typedef const impl_includefile *c_includefile; typedef impl_includedeclarations *includedeclarations; typedef const impl_includedeclarations *c_includedeclarations; typedef impl_includedeclaration *includedeclaration; typedef const impl_includedeclaration *c_includedeclaration; typedef impl_rwdeclarations *rwdeclarations; typedef const impl_rwdeclarations *c_rwdeclarations; typedef impl_rwdeclaration *rwdeclaration; typedef const impl_rwdeclaration *c_rwdeclaration; typedef impl_rewriteclauses *rewriteclauses; typedef const impl_rewriteclauses *c_rewriteclauses; typedef impl_rewriteclause *rewriteclause; typedef const impl_rewriteclause *c_rewriteclause; typedef impl_patternchains *patternchains; typedef const impl_patternchains *c_patternchains; typedef impl_patternchain *patternchain; typedef const impl_patternchain *c_patternchain; typedef impl_outmostpatterns *outmostpatterns; typedef const impl_outmostpatterns *c_outmostpatterns; typedef impl_patternchainitem *patternchainitem; typedef const impl_patternchainitem *c_patternchainitem; typedef impl_outmostpattern *outmostpattern; typedef const impl_outmostpattern *c_outmostpattern; typedef impl_pattern *pattern; typedef const impl_pattern *c_pattern; typedef impl_patterns *patterns; typedef const impl_patterns *c_patterns; typedef impl_term *term; typedef const impl_term *c_term; typedef impl_terms *terms; typedef const impl_terms *c_terms; typedef impl_fnfiles *fnfiles; typedef const impl_fnfiles *c_fnfiles; typedef impl_fnfile *fnfile; typedef const impl_fnfile *c_fnfile; typedef impl_fndeclarations *fndeclarations; typedef const impl_fndeclarations *c_fndeclarations; typedef impl_fndeclaration *fndeclaration; typedef const impl_fndeclaration *c_fndeclaration; typedef impl_fnclass *fnclass; typedef const impl_fnclass *c_fnclass; typedef impl_Ctext *Ctext; typedef const impl_Ctext *c_Ctext; typedef impl_Ctext_elem *Ctext_elem; typedef const impl_Ctext_elem *c_Ctext_elem; typedef impl_foreach_after *foreach_after; typedef const impl_foreach_after *c_foreach_after; typedef impl_contextinfo *contextinfo; typedef const impl_contextinfo *c_contextinfo; typedef impl_withexpressions *withexpressions; typedef const impl_withexpressions *c_withexpressions; typedef impl_withexpression *withexpression; typedef const impl_withexpression *c_withexpression; typedef impl_withcases *withcases; typedef const impl_withcases *c_withcases; typedef impl_withcase *withcase; typedef const impl_withcase *c_withcase; typedef impl_unparsedeclarations *unparsedeclarations; typedef const impl_unparsedeclarations *c_unparsedeclarations; typedef impl_unparsedeclaration *unparsedeclaration; typedef const impl_unparsedeclaration *c_unparsedeclaration; typedef impl_unparseclauses *unparseclauses; typedef const impl_unparseclauses *c_unparseclauses; typedef impl_unparseclause *unparseclause; typedef const impl_unparseclause *c_unparseclause; typedef impl_viewnames *viewnames; typedef const impl_viewnames *c_viewnames; typedef impl_unparseitems *unparseitems; typedef const impl_unparseitems *c_unparseitems; typedef impl_unparseitem *unparseitem; typedef const impl_unparseitem *c_unparseitem; typedef impl_unpsubterm *unpsubterm; typedef const impl_unpsubterm *c_unpsubterm; typedef impl_unpattributes *unpattributes; typedef const impl_unpattributes *c_unpattributes; typedef impl_viewnameoption *viewnameoption; typedef const impl_viewnameoption *c_viewnameoption; typedef impl_languageoption *languageoption; typedef const impl_languageoption *c_languageoption; typedef impl_languagenames *languagenames; typedef const impl_languagenames *c_languagenames; typedef impl_fileline *fileline; typedef const impl_fileline *c_fileline; typedef impl_scopetypefilelinestack *scopetypefilelinestack; typedef const impl_scopetypefilelinestack *c_scopetypefilelinestack; typedef impl_scopetypefileline *scopetypefileline; typedef const impl_scopetypefileline *c_scopetypefileline; typedef impl_IDtype *IDtype; typedef const impl_IDtype *c_IDtype; typedef impl_operators *operators; typedef const impl_operators *c_operators; typedef impl_phyla *phyla; typedef const impl_phyla *c_phyla; typedef impl_variables *variables; typedef const impl_variables *c_variables; typedef impl_dollarvarstatus *dollarvarstatus; typedef const impl_dollarvarstatus *c_dollarvarstatus; typedef impl_tribool *tribool; typedef const impl_tribool *c_tribool; typedef impl_patternrepresentations *patternrepresentations; typedef const impl_patternrepresentations *c_patternrepresentations; typedef impl_patternrepresentation *patternrepresentation; typedef const impl_patternrepresentation *c_patternrepresentation; typedef impl_elem_patternrepresentation *elem_patternrepresentation; typedef const impl_elem_patternrepresentation *c_elem_patternrepresentation; typedef impl_path *path; typedef const impl_path *c_path; typedef impl_paths *paths; typedef const impl_paths *c_paths; typedef impl_argsnumbers *argsnumbers; typedef const impl_argsnumbers *c_argsnumbers; typedef impl_rewriterulesinfo *rewriterulesinfo; typedef const impl_rewriterulesinfo *c_rewriterulesinfo; typedef impl_rewriteruleinfo *rewriteruleinfo; typedef const impl_rewriteruleinfo *c_rewriteruleinfo; typedef impl_withcasesinfo *withcasesinfo; typedef const impl_withcasesinfo *c_withcasesinfo; typedef impl_withcaseinfo *withcaseinfo; typedef const impl_withcaseinfo *c_withcaseinfo; typedef impl_rewriteviewsinfo *rewriteviewsinfo; typedef const impl_rewriteviewsinfo *c_rewriteviewsinfo; typedef impl_rewriteviewinfo *rewriteviewinfo; typedef const impl_rewriteviewinfo *c_rewriteviewinfo; typedef impl_unparseviewsinfo *unparseviewsinfo; typedef const impl_unparseviewsinfo *c_unparseviewsinfo; typedef impl_unparseviewinfo *unparseviewinfo; typedef const impl_unparseviewinfo *c_unparseviewinfo; typedef impl_unparsedeclsinfo *unparsedeclsinfo; typedef const impl_unparsedeclsinfo *c_unparsedeclsinfo; typedef impl_unparsedeclinfo *unparsedeclinfo; typedef const impl_unparsedeclinfo *c_unparsedeclinfo; typedef impl_ac_declaration *ac_declaration; typedef const impl_ac_declaration *c_ac_declaration; typedef impl_ac_declaration_list *ac_declaration_list; typedef const impl_ac_declaration_list *c_ac_declaration_list; typedef impl_ac_declaration_specifiers *ac_declaration_specifiers; typedef const impl_ac_declaration_specifiers *c_ac_declaration_specifiers; typedef impl_ac_declaration_specifier *ac_declaration_specifier; typedef const impl_ac_declaration_specifier *c_ac_declaration_specifier; typedef impl_ac_storage_class_specifier *ac_storage_class_specifier; typedef const impl_ac_storage_class_specifier *c_ac_storage_class_specifier; typedef impl_ac_type_specifier *ac_type_specifier; typedef const impl_ac_type_specifier *c_ac_type_specifier; typedef impl_ac_type_qualifier *ac_type_qualifier; typedef const impl_ac_type_qualifier *c_ac_type_qualifier; typedef impl_ac_init_declarator_list *ac_init_declarator_list; typedef const impl_ac_init_declarator_list *c_ac_init_declarator_list; typedef impl_ac_init_declarator *ac_init_declarator; typedef const impl_ac_init_declarator *c_ac_init_declarator; typedef impl_ac_declarator *ac_declarator; typedef const impl_ac_declarator *c_ac_declarator; typedef impl_ac_direct_declarator *ac_direct_declarator; typedef const impl_ac_direct_declarator *c_ac_direct_declarator; typedef impl_ac_pointer_option *ac_pointer_option; typedef const impl_ac_pointer_option *c_ac_pointer_option; typedef impl_ac_pointer *ac_pointer; typedef const impl_ac_pointer *c_ac_pointer; typedef impl_ac_ref_option *ac_ref_option; typedef const impl_ac_ref_option *c_ac_ref_option; typedef impl_ac_operator_name *ac_operator_name; typedef const impl_ac_operator_name *c_ac_operator_name; typedef impl_ac_class_qualifier_help_list *ac_class_qualifier_help_list; typedef const impl_ac_class_qualifier_help_list *c_ac_class_qualifier_help_list; typedef impl_ac_class_qualifier_list *ac_class_qualifier_list; typedef const impl_ac_class_qualifier_list *c_ac_class_qualifier_list; typedef impl_ac_type_qualifier_list *ac_type_qualifier_list; typedef const impl_ac_type_qualifier_list *c_ac_type_qualifier_list; typedef impl_ac_parameter_type_list *ac_parameter_type_list; typedef const impl_ac_parameter_type_list *c_ac_parameter_type_list; typedef impl_ac_parameter_list *ac_parameter_list; typedef const impl_ac_parameter_list *c_ac_parameter_list; typedef impl_ac_parameter_declaration *ac_parameter_declaration; typedef const impl_ac_parameter_declaration *c_ac_parameter_declaration; typedef impl_ac_identifier_list *ac_identifier_list; typedef const impl_ac_identifier_list *c_ac_identifier_list; typedef impl_ac_abstract_declarator *ac_abstract_declarator; typedef const impl_ac_abstract_declarator *c_ac_abstract_declarator; typedef impl_ac_direct_abstract_declarator_option *ac_direct_abstract_declarator_option; typedef const impl_ac_direct_abstract_declarator_option *c_ac_direct_abstract_declarator_option; typedef impl_ac_direct_abstract_declarator *ac_direct_abstract_declarator; typedef const impl_ac_direct_abstract_declarator *c_ac_direct_abstract_declarator; typedef impl_ac_constant_expression_option *ac_constant_expression_option; typedef const impl_ac_constant_expression_option *c_ac_constant_expression_option; typedef impl_ac_constant_expression *ac_constant_expression; typedef const impl_ac_constant_expression *c_ac_constant_expression; typedef impl_ac_constant_expression_list *ac_constant_expression_list; typedef const impl_ac_constant_expression_list *c_ac_constant_expression_list; typedef impl_ac_opt_base_init_list *ac_opt_base_init_list; typedef const impl_ac_opt_base_init_list *c_ac_opt_base_init_list; typedef impl_ac_base_init_list *ac_base_init_list; typedef const impl_ac_base_init_list *c_ac_base_init_list; typedef impl_ac_base_init *ac_base_init; typedef const impl_ac_base_init *c_ac_base_init; typedef impl_baseclass_declarations *baseclass_declarations; typedef const impl_baseclass_declarations *c_baseclass_declarations; typedef impl_baseclass_decl *baseclass_decl; typedef const impl_baseclass_decl *c_baseclass_decl; typedef impl_baseclass_list *baseclass_list; typedef const impl_baseclass_list *c_baseclass_list; typedef impl_error *error; typedef const impl_error *c_error; typedef impl_problem *problem; typedef const impl_problem *c_problem; typedef impl_addedphylumdeclarations *addedphylumdeclarations; typedef const impl_addedphylumdeclarations *c_addedphylumdeclarations; typedef impl_addedphylumdeclaration *addedphylumdeclaration; typedef const impl_addedphylumdeclaration *c_addedphylumdeclaration; typedef impl_countedphylumdeclarations *countedphylumdeclarations; typedef const impl_countedphylumdeclarations *c_countedphylumdeclarations; typedef impl_countedphylumdeclaration *countedphylumdeclaration; typedef const impl_countedphylumdeclaration *c_countedphylumdeclaration; typedef impl_charruns *charruns; typedef const impl_charruns *c_charruns; typedef impl_bindingidmarks *bindingidmarks; typedef const impl_bindingidmarks *c_bindingidmarks; typedef impl_bindingidmark *bindingidmark; typedef const impl_bindingidmark *c_bindingidmark; #define KC_NO_OF_OPERATORS 339 } // namespace kc namespace kc { } using namespace kc; /* included stuff */ typedef enum {include_header =0, include_file =1, include_unknown, include_both} include_type; class twoIncludedeclarations { includedeclarations inc1, inc2; public: includedeclarations& operator[](int i) { return (i==0) ? inc1 : inc2; } }; // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // #include "config.h" extern char kimwitu_copyright[] ; // defined above extern casestring g_progname; extern const char* pg_line; struct cmdline_options { std::string hfilename; std::string ccfilename; bool quiet; bool verbose; bool no_csgio; bool no_unparse; bool no_rewrite; bool no_printdot; bool no_hashtables; bool operator_cast; bool smart_pointer; bool weak_pointer; char covariant; std::string for_bison; bool for_yxx; bool overwrite; bool linedirec; bool rw_loop; std::string stdafx; std::string dllexports; std::string prefix; std::string suffix; std::string filter; std::string msg_format; std::string dir_line; bool warn_drop_identical_patterns; // actually dropped from generated code (old test) bool warn_equivalent_patterns; // informational only (new test) bool warn_overlapping_patterns; cmdline_options(): hfilename(""), ccfilename(""), quiet(false), verbose(false), no_csgio(false), no_unparse(false), no_rewrite(false), no_printdot(false), no_hashtables(false), operator_cast(false), smart_pointer(false), weak_pointer(false), covariant('y'), for_bison(""), for_yxx(false), overwrite(false), linedirec(true), rw_loop(false), stdafx(""), dllexports(""), prefix(""), suffix("cc"), filter(""), msg_format(""), dir_line(""), warn_drop_identical_patterns(true), warn_equivalent_patterns(true), warn_overlapping_patterns(false) { } }; extern cmdline_options g_options; namespace kc { void leave(int); } extern int pg_lineno; /* global line # */ extern int pg_column; /* global column # */ extern int pg_charpos; /* global charpos # */ extern casestring pg_filename; /* global file name */ extern int pg_no_of_arguments; /* no_of_arguments */ extern phylumdeclarations Thephylumdeclarations; /* global phylumdecls */ extern rwdeclarations Therwdeclarations; /* global rw-decls */ extern fndeclarations Thefndeclarations; /* fn-decls for the file being parsed */ extern fnfiles Thefnfiles; /* global fn-decls */ extern includefiles Theincludefiles; /* global incl-decls */ extern unparsedeclarations Theunparsedeclarations; /* global unp-decls */ extern argsnumbers Theargsnumbers; /* global list of argsnumbers */ extern viewnames Theuviewnames; /* global list of u-viewnames */ extern viewnames Therviewnames; /* global list of r-viewnames */ extern storageclasses Thestorageclasses; /* global list of storageclasses */ extern languagenames Thelanguages; /* global list of used languages */ extern baseclass_declarations Thebaseclasses; /* global list of defined baseclasses */ extern bool pg_uviewshavebeendefined; /* global indication */ extern bool pg_rviewshavebeendefined; /* global indication */ extern bool pg_storageclasseshavebeendefined; /* global indication */ extern bool pg_languageshavebeendefined; /* global indication */ #include "error.h" extern viewnameoption ug_viewnameopt; #include "occur.h" extern addedphylumdeclarations pl_addedphylumdeclarations; extern countedphylumdeclarations pl_countedphylumdeclarations; namespace kc { ID f_emptyId(); } namespace kc { void collect_strings(void); } namespace kc { void unparse_string_collection(void); } extern bindingidmarks Thebindingidmarks; /* end included stuff */ namespace kc { #ifndef KC_NO_DEFAULT_IN_WITH # define KC_NO_DEFAULT_IN_WITH "Internal Error: no default action defined in function %s at %s:%d\n" #endif void kc_no_default_in_with (const char*, int, const char*); void kc_returnless_function (const char *, int, const char*); #ifndef NDEBUG # define assertCond(t) do {if (!(t)) kc_assertionFailed(__FILE__,__LINE__);}while(false) # define assertReason(t,s) do {if (!(t)) kc_assertionReasonFailed(__FILE__,__LINE__,s);}while(false) # define assertNonNull(p) do {if (p == 0) kc_assertionNonNullFailed(__FILE__,__LINE__,#p);}while(false) # define assertPhylum(ptr,phy) do { \ assertNonNull(ptr); \ if (ptr->phylum()!=phy) \ kc_assertionOperatorInPhylumFailed(ptr->prod_sel(),#ptr,"->prod_sel()","phy",__FILE__,__LINE__); \ } while(false) #else # define assertCond(t) # define assertReason(t,s) # define assertNonNull(ptr) # define assertPhylum(op,phy) #endif #define assertionFailed(s) kc_assertionReasonFailed(__FILE__,__LINE__,s) void kc_assertionFailed (const char*, int) __attribute__ ((noreturn)); void kc_assertionReasonFailed (const char*, int, const char*) __attribute__ ((noreturn)); void kc_assertionNonNullFailed (const char*, int, const char*) __attribute__ ((noreturn)); void kc_assertionOperatorInPhylumFailed (int, const char*, const char*, const char*, const char*, int) __attribute__ ((noreturn)); casestring mkcasestring( const kc_char_t *, int length = -1); nocasestring mknocasestring( const kc_char_t *, int length = -1); integer mkinteger( const INTEGER ); real mkreal( const REAL ); inline casestring _Str( const kc_char_t * cc) { return mkcasestring(cc); } inline nocasestring NoCaseStr( const kc_char_t * cc) { return mknocasestring(cc); } inline integer _Int( const INTEGER cc) { return mkinteger(cc); } inline real _Real( const REAL cc) { return mkreal(cc); } class impl_uniqID_Str* Str (casestring); class impl_ID_Id* Id (uniqID); class impl_INT_Int* Int (integer); class impl_STRING_String* String (casestring); class impl_phylumdeclarationsroot_PhylumDeclarations* PhylumDeclarations (phylumdeclarations); phylumdeclarations Nilphylumdeclarations(); phylumdeclarations Consphylumdeclarations(phylumdeclaration,phylumdeclarations); phylumnames Nilphylumnames(); phylumnames Consphylumnames(ID,phylumnames); class impl_phylumdeclaration_PhylumDeclaration* PhylumDeclaration (ID, storageoption, productionblock, Ccode_option); class impl_storageoption_NoStorageOption* NoStorageOption (); class impl_storageoption_NegativeStorageOption* NegativeStorageOption (ID); class impl_storageoption_PositiveStorageOption* PositiveStorageOption (ID); storageclasses Nilstorageclasses(); storageclasses Consstorageclasses(ID,storageclasses); class impl_productionblock_Emptyproductionblock* Emptyproductionblock (); class impl_productionblock_ListAlternatives* ListAlternatives (alternatives, ID); class impl_productionblock_NonlistAlternatives* NonlistAlternatives (alternatives); class impl_productionblock_PredefinedAlternatives* PredefinedAlternatives (alternatives); alternatives Nilalternatives(); alternatives Consalternatives(alternative,alternatives); class impl_alternative_Alternative* Alternative (ID, arguments); arguments Nilarguments(); arguments Consarguments(ID,arguments); class impl_argument_Argument* Argument (ID, integer); class impl_Ccode_option_CcodeOption* CcodeOption (attributes, Ctexts); attributes Nilattributes(); attributes Consattributes(attribute,attributes); class impl_attribute_Attribute* Attribute (ID, ID, attribute_initialisation_option); class impl_attribute_initialisation_option_Noattribute_initialisation* Noattribute_initialisation (); class impl_attribute_initialisation_option_Yesattribute_initialisation* Yesattribute_initialisation (Cexpression); Cexpression NilCexpression(); Cexpression ConsCexpression(Cexpression_elem,Cexpression); class impl_Cexpression_elem_CExpressionPart* CExpressionPart (casestring); class impl_Cexpression_elem_CExpressionDollarvar* CExpressionDollarvar (INT); class impl_Cexpression_elem_CExpressionNl* CExpressionNl (); class impl_Cexpression_elem_CExpressionDQ* CExpressionDQ (CexpressionDQ); class impl_Cexpression_elem_CExpressionSQ* CExpressionSQ (CexpressionSQ); class impl_Cexpression_elem_CExpressionPack* CExpressionPack (Cexpression); class impl_Cexpression_elem_CExpressionArray* CExpressionArray (Cexpression); CexpressionDQ NilCexpressionDQ(); CexpressionDQ ConsCexpressionDQ(CexpressionDQ_elem,CexpressionDQ); class impl_CexpressionDQ_elem_CExpressionDQPart* CExpressionDQPart (casestring); class impl_CexpressionDQ_elem_CExpressionDQNl* CExpressionDQNl (); CexpressionSQ NilCexpressionSQ(); CexpressionSQ ConsCexpressionSQ(CexpressionSQ_elem,CexpressionSQ); class impl_CexpressionSQ_elem_CExpressionSQPart* CExpressionSQPart (casestring); class impl_CexpressionSQ_elem_CExpressionSQNl* CExpressionSQNl (); idCexpressions NilidCexpressions(); idCexpressions ConsidCexpressions(idCexpression,idCexpressions); class impl_idCexpression_IdCexpression* IdCexpression (ID, Cexpression); Ctexts NilCtexts(); Ctexts ConsCtexts(Ctext,Ctexts); includefiles Nilincludefiles(); includefiles Consincludefiles(includefile,includefiles); class impl_includefile_IncludeFile* IncludeFile (casestring); includedeclarations Nilincludedeclarations(); includedeclarations Consincludedeclarations(includedeclaration,includedeclarations); class impl_includedeclaration_IncludeDeclaration* IncludeDeclaration (casestring); rwdeclarations Nilrwdeclarations(); rwdeclarations Consrwdeclarations(rwdeclaration,rwdeclarations); class impl_rwdeclaration_RwDeclaration* RwDeclaration (outmostpatterns, rewriteclauses); rewriteclauses Nilrewriteclauses(); rewriteclauses Consrewriteclauses(rewriteclause,rewriteclauses); class impl_rewriteclause_RewriteClause* RewriteClause (viewnames, term); patternchains Nilpatternchains(); patternchains Conspatternchains(patternchain,patternchains); patternchain Nilpatternchain(); patternchain Conspatternchain(patternchainitem,patternchain); outmostpatterns Niloutmostpatterns(); outmostpatterns Consoutmostpatterns(outmostpattern,outmostpatterns); class impl_patternchainitem_PatternchainitemOutmost* PatternchainitemOutmost (outmostpattern); class impl_patternchainitem_PatternchainitemGroup* PatternchainitemGroup (patternchains); class impl_patternchainitem_PatternchainitemDollarid* PatternchainitemDollarid (ID); class impl_outmostpattern_OPOperatorWildcard* OPOperatorWildcard (ID, Cexpression); class impl_outmostpattern_OPOperator* OPOperator (ID, patterns, Cexpression); class impl_outmostpattern_OPNonLeafVariable* OPNonLeafVariable (ID, outmostpattern); class impl_outmostpattern_OPWildcard* OPWildcard (Cexpression); class impl_outmostpattern_OPDefault* OPDefault (Cexpression); class impl_pattern_PVariable* PVariable (ID); class impl_pattern_POperator* POperator (ID, patterns); class impl_pattern_PNonLeafVariable* PNonLeafVariable (ID, pattern); class impl_pattern_PWildcard* PWildcard (); class impl_pattern_PStringLiteral* PStringLiteral (CexpressionDQ); class impl_pattern_PIntLiteral* PIntLiteral (INT); patterns Nilpatterns(); patterns Conspatterns(pattern,patterns); class impl_term_TVariable* TVariable (ID); class impl_term_TOperator* TOperator (ID, terms); class impl_term_TMethod* TMethod (term, ID, terms); class impl_term_TMethodDot* TMethodDot (term, ID, terms); class impl_term_TMemberVar* TMemberVar (term, ID); class impl_term_TMemberVarDot* TMemberVarDot (term, ID); class impl_term_TCTerm* TCTerm (CexpressionSQ); class impl_term_TStringLiteral* TStringLiteral (CexpressionDQ); class impl_term_TIntLiteral* TIntLiteral (INT); terms Nilterms(); terms Consterms(term,terms); fnfiles Nilfnfiles(); fnfiles Consfnfiles(fnfile,fnfiles); class impl_fnfile_FnFile* FnFile (casestring); fndeclarations Nilfndeclarations(); fndeclarations Consfndeclarations(fndeclaration,fndeclarations); class impl_fndeclaration_FnAcDeclaration* FnAcDeclaration (ac_declaration_specifiers, ac_declarator, ac_declaration_list, ac_opt_base_init_list, Ctext, ID, fnclass); class impl_fndeclaration_AcMemberDeclaration* AcMemberDeclaration (ac_declaration_specifiers, ac_declarator, ac_constant_expression_option, fnclass); class impl_fnclass_GlobalFn* GlobalFn (); class impl_fnclass_StaticFn* StaticFn (casestring); class impl_fnclass_MemberFn* MemberFn (); class impl_fnclass_ConstructorFn* ConstructorFn (); class impl_fnclass_DestructorFn* DestructorFn (); class impl_fnclass_ConvOperatorFn* ConvOperatorFn (); Ctext NilCtext(); Ctext ConsCtext(Ctext_elem,Ctext); class impl_Ctext_elem_CTextLine* CTextLine (casestring); class impl_Ctext_elem_CTextDollarVar* CTextDollarVar (INT); class impl_Ctext_elem_CTextNl* CTextNl (integer); class impl_Ctext_elem_CTextCexpressionDQ* CTextCexpressionDQ (CexpressionDQ); class impl_Ctext_elem_CTextCexpressionSQ* CTextCexpressionSQ (CexpressionSQ); class impl_Ctext_elem_CTextCbody* CTextCbody (Ctext); class impl_Ctext_elem_CTextForeachexpression* CTextForeachexpression (patternchain, idCexpressions, withexpressions, Ctext, foreach_after); class impl_Ctext_elem_CTextWithexpression* CTextWithexpression (withexpressions, withcases, contextinfo); class impl_foreach_after_NoForeachAfter* NoForeachAfter (); class impl_foreach_after_ForeachAfter* ForeachAfter (patternchain, idCexpressions, withexpressions, Ctext); class impl_contextinfo_InForeachContext* InForeachContext (patternchain); class impl_contextinfo_NotInForeachContext* NotInForeachContext (); withexpressions Nilwithexpressions(); withexpressions Conswithexpressions(withexpression,withexpressions); class impl_withexpression_WEVariable* WEVariable (ID); class impl_withexpression_WECexpression* WECexpression (Cexpression); withcases Nilwithcases(); withcases Conswithcases(withcase,withcases); class impl_withcase_Withcase* Withcase (patternchains, Ctext); unparsedeclarations Nilunparsedeclarations(); unparsedeclarations Consunparsedeclarations(unparsedeclaration,unparsedeclarations); class impl_unparsedeclaration_UnparseDeclaration* UnparseDeclaration (outmostpatterns, unparseclauses); unparseclauses Nilunparseclauses(); unparseclauses Consunparseclauses(unparseclause,unparseclauses); class impl_unparseclause_UnparseClause* UnparseClause (viewnames, unparseitems); viewnames Nilviewnames(); viewnames Consviewnames(ID,viewnames); unparseitems Nilunparseitems(); unparseitems Consunparseitems(unparseitem,unparseitems); class impl_unparseitem_UnpStr* UnpStr (languageoption, CexpressionDQ, viewnameoption); class impl_unparseitem_UnpSubexpr* UnpSubexpr (languageoption, unpsubterm, viewnameoption); class impl_unparseitem_UnpCtext* UnpCtext (languageoption, Ctext); class impl_unparseitem_UnpBody* UnpBody (languageoption, unparseitems); class impl_unparseitem_UViewVarDecl* UViewVarDecl (ID, ID, Cexpression); class impl_unpsubterm_UnpSubTerm* UnpSubTerm (ID); class impl_unpsubterm_UnpDollarvarTerm* UnpDollarvarTerm (INT); class impl_unpsubterm_UnpSubAttr* UnpSubAttr (ID, unpattributes); class impl_unpsubterm_UnpDollarvarAttr* UnpDollarvarAttr (INT, unpattributes); class impl_unpsubterm_UnpCastedVariable* UnpCastedVariable (ID, ID); unpattributes Nilunpattributes(); unpattributes Consunpattributes(ID,unpattributes); class impl_viewnameoption_NoViewname* NoViewname (); class impl_viewnameoption_YesViewname* YesViewname (ID); class impl_languageoption_NoLanguagename* NoLanguagename (); class impl_languageoption_LanguageList* LanguageList (languagenames); languagenames Nillanguagenames(); languagenames Conslanguagenames(ID,languagenames); class impl_fileline_FileLine* FileLine (casestring _file=0, int _line=0); class impl_fileline_NoFileLine* NoFileLine (); class impl_fileline_PosNoFileLine* PosNoFileLine (); scopetypefilelinestack Nilscopetypefilelinestack(); scopetypefilelinestack Consscopetypefilelinestack(scopetypefileline,scopetypefilelinestack); class impl_scopetypefileline_ScopeTypeFileLine* ScopeTypeFileLine (integer, IDtype, casestring, integer); class impl_IDtype_ITUnknown* ITUnknown (); class impl_IDtype_ITPredefinedPhylum* ITPredefinedPhylum (phylumdeclaration); class impl_IDtype_ITUserPhylum* ITUserPhylum (phylumdeclaration); class impl_IDtype_ITPredefinedOperator* ITPredefinedOperator (alternative, ID); class impl_IDtype_ITUserOperator* ITUserOperator (alternative, ID); class impl_IDtype_ITPredefinedStorageClass* ITPredefinedStorageClass (); class impl_IDtype_ITStorageClass* ITStorageClass (); class impl_IDtype_ITPredefinedUView* ITPredefinedUView (); class impl_IDtype_ITUserUView* ITUserUView (); class impl_IDtype_ITUViewVar* ITUViewVar (); class impl_IDtype_ITPredefinedRView* ITPredefinedRView (); class impl_IDtype_ITUserRView* ITUserRView (); class impl_IDtype_ITUserFunction* ITUserFunction (fnclass); class impl_IDtype_ITPatternVariable* ITPatternVariable (ID, integer); class impl_IDtype_ITLanguageName* ITLanguageName (integer); operators Niloperators(); operators Consoperators(ID,operators); phyla Nilphyla(); phyla Consphyla(ID,phyla); variables Nilvariables(); variables Consvariables(ID,variables); class impl_dollarvarstatus_DVAllowed* DVAllowed (); class impl_dollarvarstatus_DVDisallowed* DVDisallowed (); class impl_tribool_Equal* Equal (); class impl_tribool_Smaller* Smaller (); class impl_tribool_Bigger* Bigger (); patternrepresentations Nilpatternrepresentations(); patternrepresentations Conspatternrepresentations(patternrepresentation,patternrepresentations); patternrepresentation Nilpatternrepresentation(); patternrepresentation Conspatternrepresentation(elem_patternrepresentation,patternrepresentation); class impl_elem_patternrepresentation_PRBinding* PRBinding (path, ID); class impl_elem_patternrepresentation_PRVarPredicate* PRVarPredicate (paths, ID, patternrepresentation); class impl_elem_patternrepresentation_PROperPredicate* PROperPredicate (path, ID); class impl_elem_patternrepresentation_PRUserPredicate* PRUserPredicate (Cexpression); class impl_elem_patternrepresentation_PRNonLeafBinding* PRNonLeafBinding (path, ID, patternrepresentation); class impl_elem_patternrepresentation_PRWildcard* PRWildcard (path); class impl_elem_patternrepresentation_PRDefault* PRDefault (); class impl_elem_patternrepresentation_PRStringLiteral* PRStringLiteral (path, CexpressionDQ); class impl_elem_patternrepresentation_PRIntLiteral* PRIntLiteral (path, INT); path Nilpath(); path Conspath(integer,path); paths Nilpaths(); paths Conspaths(path,paths); argsnumbers Nilargsnumbers(); argsnumbers Consargsnumbers(integer,argsnumbers); rewriterulesinfo Nilrewriterulesinfo(); rewriterulesinfo Consrewriterulesinfo(rewriteruleinfo,rewriterulesinfo); class impl_rewriteruleinfo_Rewriteruleinfo* Rewriteruleinfo (patternrepresentation, patternrepresentation, rewriteclause); withcasesinfo Nilwithcasesinfo(); withcasesinfo Conswithcasesinfo(withcaseinfo,withcasesinfo); class impl_withcaseinfo_Withcaseinfo* Withcaseinfo (patternrepresentation, patternrepresentation, Ctext); rewriteviewsinfo Nilrewriteviewsinfo(); rewriteviewsinfo Consrewriteviewsinfo(rewriteviewinfo,rewriteviewsinfo); class impl_rewriteviewinfo_Rewriteviewinfo* Rewriteviewinfo (ID, rewriterulesinfo); unparseviewsinfo Nilunparseviewsinfo(); unparseviewsinfo Consunparseviewsinfo(unparseviewinfo,unparseviewsinfo); class impl_unparseviewinfo_Unparseviewinfo* Unparseviewinfo (ID, unparsedeclsinfo); unparsedeclsinfo Nilunparsedeclsinfo(); unparsedeclsinfo Consunparsedeclsinfo(unparsedeclinfo,unparsedeclsinfo); class impl_unparsedeclinfo_Unparsedeclinfo* Unparsedeclinfo (patternrepresentation, patternrepresentation, unparseclause); class impl_ac_declaration_AcDeclaration* AcDeclaration (ac_declaration_specifiers, ac_init_declarator_list); ac_declaration_list Nilac_declaration_list(); ac_declaration_list Consac_declaration_list(ac_declaration,ac_declaration_list); ac_declaration_specifiers Nilac_declaration_specifiers(); ac_declaration_specifiers Consac_declaration_specifiers(ac_declaration_specifier,ac_declaration_specifiers); class impl_ac_declaration_specifier_AcDeclSpecStorageSpec* AcDeclSpecStorageSpec (ac_storage_class_specifier); class impl_ac_declaration_specifier_AcDeclSpecTypeSpec* AcDeclSpecTypeSpec (ac_type_specifier); class impl_ac_declaration_specifier_AcDeclSpecTypeQual* AcDeclSpecTypeQual (ac_type_qualifier); class impl_ac_storage_class_specifier_AcAuto* AcAuto (); class impl_ac_storage_class_specifier_AcRegister* AcRegister (); class impl_ac_storage_class_specifier_AcStatic* AcStatic (); class impl_ac_storage_class_specifier_AcExtern* AcExtern (); class impl_ac_storage_class_specifier_AcTypedef* AcTypedef (); class impl_ac_storage_class_specifier_AcVirtual* AcVirtual (); class impl_ac_type_specifier_AcTypeSpec* AcTypeSpec (ID); class impl_ac_type_qualifier_AcConst* AcConst (); class impl_ac_type_qualifier_AcVolatile* AcVolatile (); class impl_ac_type_qualifier_AcUnsigned* AcUnsigned (); class impl_ac_type_qualifier_AcNoQualifier* AcNoQualifier (); ac_init_declarator_list Nilac_init_declarator_list(); ac_init_declarator_list Consac_init_declarator_list(ac_init_declarator,ac_init_declarator_list); class impl_ac_init_declarator_AcInitDecl* AcInitDecl (ac_declarator); class impl_ac_declarator_AcDeclarator* AcDeclarator (ac_pointer_option, ac_ref_option, ac_direct_declarator); class impl_ac_direct_declarator_AcDirectDeclId* AcDirectDeclId (ID); class impl_ac_direct_declarator_AcDirectDeclPack* AcDirectDeclPack (ac_declarator); class impl_ac_direct_declarator_AcDirectDeclArray* AcDirectDeclArray (ac_direct_declarator, ac_constant_expression_option); class impl_ac_direct_declarator_AcDirectDeclProto* AcDirectDeclProto (ac_direct_declarator, ac_parameter_type_list); class impl_ac_direct_declarator_AcQualifiedDeclProto* AcQualifiedDeclProto (ac_class_qualifier_list, ac_direct_declarator, ac_parameter_type_list, ac_type_qualifier); class impl_ac_direct_declarator_AcMemberDecl* AcMemberDecl (ID, ID, ac_constant_expression_list); class impl_ac_direct_declarator_AcConvOperatorDecl* AcConvOperatorDecl (ID, ID); class impl_ac_direct_declarator_AcOperatorDeclId* AcOperatorDeclId (ac_operator_name); class impl_ac_pointer_option_Nopointer* Nopointer (); class impl_ac_pointer_option_Yespointer* Yespointer (ac_pointer); class impl_ac_pointer_AcPointerNil* AcPointerNil (ac_type_qualifier_list); class impl_ac_pointer_AcPointerCons* AcPointerCons (ac_type_qualifier_list, ac_pointer); class impl_ac_ref_option_AcNoRef* AcNoRef (); class impl_ac_ref_option_AcRef* AcRef (); class impl_ac_operator_name_AcOperatorName* AcOperatorName (casestring); ac_class_qualifier_help_list Nilac_class_qualifier_help_list(); ac_class_qualifier_help_list Consac_class_qualifier_help_list(ac_direct_declarator,ac_class_qualifier_help_list); ac_class_qualifier_list Nilac_class_qualifier_list(); ac_class_qualifier_list Consac_class_qualifier_list(ID,ac_class_qualifier_list); ac_type_qualifier_list Nilac_type_qualifier_list(); ac_type_qualifier_list Consac_type_qualifier_list(ac_type_qualifier,ac_type_qualifier_list); class impl_ac_parameter_type_list_AcParList* AcParList (ac_parameter_list); class impl_ac_parameter_type_list_AcParList3Dot* AcParList3Dot (ac_parameter_list); ac_parameter_list Nilac_parameter_list(); ac_parameter_list Consac_parameter_list(ac_parameter_declaration,ac_parameter_list); class impl_ac_parameter_declaration_AcParDeclDecl* AcParDeclDecl (ac_declaration_specifiers, ac_declarator, ac_constant_expression_option); class impl_ac_parameter_declaration_AcParDeclAbsdecl* AcParDeclAbsdecl (ac_declaration_specifiers, ac_abstract_declarator, ac_constant_expression_option); ac_identifier_list Nilac_identifier_list(); ac_identifier_list Consac_identifier_list(ID,ac_identifier_list); class impl_ac_abstract_declarator_AcAbsdeclPointer* AcAbsdeclPointer (ac_pointer); class impl_ac_abstract_declarator_AcAbsdeclDirdecl* AcAbsdeclDirdecl (ac_pointer_option, ac_direct_abstract_declarator); class impl_ac_direct_abstract_declarator_option_Noac_direct_abstract_declarator* Noac_direct_abstract_declarator (); class impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator* Yesac_direct_abstract_declarator (ac_direct_abstract_declarator); class impl_ac_direct_abstract_declarator_AcDirAbsdeclPack* AcDirAbsdeclPack (ac_abstract_declarator); class impl_ac_direct_abstract_declarator_AcDirAbsdeclArray* AcDirAbsdeclArray (ac_direct_abstract_declarator_option, ac_constant_expression_option); class impl_ac_direct_abstract_declarator_AcDirAbsdeclFn* AcDirAbsdeclFn (ac_direct_abstract_declarator_option, ac_parameter_type_list); class impl_ac_constant_expression_option_Yesac_constant_expression* Yesac_constant_expression (ac_constant_expression); class impl_ac_constant_expression_option_Noac_constant_expression* Noac_constant_expression (); class impl_ac_constant_expression_AcConstExpr* AcConstExpr (Cexpression); ac_constant_expression_list Nilac_constant_expression_list(); ac_constant_expression_list Consac_constant_expression_list(ac_constant_expression,ac_constant_expression_list); class impl_ac_opt_base_init_list_AcNoBaseInit* AcNoBaseInit (); class impl_ac_opt_base_init_list_AcYesBaseInit* AcYesBaseInit (ac_base_init_list); ac_base_init_list Nilac_base_init_list(); ac_base_init_list Consac_base_init_list(ac_base_init,ac_base_init_list); class impl_ac_base_init_AcBaseInit* AcBaseInit (ID, ac_constant_expression_list); baseclass_declarations Nilbaseclass_declarations(); baseclass_declarations Consbaseclass_declarations(baseclass_decl,baseclass_declarations); class impl_baseclass_decl_BaseClassDecl* BaseClassDecl (ID, baseclass_list); baseclass_list Nilbaseclass_list(); baseclass_list Consbaseclass_list(ID,baseclass_list); class impl_error_Fatal* Fatal (fileline, problem); class impl_error_NonFatal* NonFatal (fileline, problem); class impl_error_Warning* Warning (fileline, problem); class impl_problem_Problem1* Problem1 (casestring); class impl_problem_Problem1ID* Problem1ID (casestring, ID); class impl_problem_Problem1tID* Problem1tID (casestring, ID); class impl_problem_Problem1we* Problem1we (casestring, withexpression); class impl_problem_Problem1ID1ID* Problem1ID1ID (casestring, ID, casestring, ID); class impl_problem_Problem1t1ID* Problem1t1ID (casestring, IDtype, casestring, ID); class impl_problem_Problem1INT* Problem1INT (casestring, INT); class impl_problem_Problem1int1* Problem1int1 (casestring, integer, casestring); class impl_problem_Problem1INT1ID* Problem1INT1ID (casestring, INT, casestring, ID); class impl_problem_Problem1ID1ID1ID* Problem1ID1ID1ID (casestring, ID, casestring, ID, casestring, ID); class impl_problem_Problem1INT1ID1ID* Problem1INT1ID1ID (casestring, INT, casestring, ID, casestring, ID); class impl_problem_Problem1storageoption1ID* Problem1storageoption1ID (casestring, storageoption, casestring, ID); class impl_problem_Problem2* Problem2 (casestring, casestring); class impl_problem_Problem3* Problem3 (casestring, casestring, casestring); class impl_problem_Problem3int1* Problem3int1 (casestring, casestring, casestring, integer, casestring); class impl_problem_Problem4* Problem4 (casestring, casestring, casestring, casestring); class impl_problem_Problem5* Problem5 (casestring, casestring, casestring, casestring, casestring); class impl_problem_Problem6* Problem6 (casestring, casestring, casestring, casestring, casestring, casestring); addedphylumdeclarations Niladdedphylumdeclarations(); addedphylumdeclarations Consaddedphylumdeclarations(addedphylumdeclaration,addedphylumdeclarations); class impl_addedphylumdeclaration_AddedPhylumdeclaration* AddedPhylumdeclaration (uniqID); countedphylumdeclarations Nilcountedphylumdeclarations(); countedphylumdeclarations Conscountedphylumdeclarations(countedphylumdeclaration,countedphylumdeclarations); class impl_countedphylumdeclaration_CountedPhylumdeclaration* CountedPhylumdeclaration (uniqID); class impl_charruns_Newlines* Newlines (); class impl_charruns_QuotedNewlines* QuotedNewlines (); class impl_charruns_Stars* Stars (); bindingidmarks Nilbindingidmarks(); bindingidmarks Consbindingidmarks(bindingidmark,bindingidmarks); class impl_bindingidmark_BindingIdMark* BindingIdMark (uniqID); //namespace Phylum { class impl_abstract_phylum { public: virtual enum_operators prod_sel() const =0; static const enum_phyla phylum_sel_; enum_phyla phylum() const; const char* phylum_name() const; const char* op_name() const; virtual abstract_phylum subphylum(int) const; virtual void set_subphylum(int, abstract_phylum); void free(bool recursive=true); bool eq(c_abstract_phylum) const; void print(); void fprint(FILE *); abstract_phylum copy(bool kc_copy_attributes) const; void unparse(printer_functor pf, uview uv) { do_unparse(pf, uv); } void unparse(printer_function opf, uview uv); virtual abstract_phylum rewrite(rview v) { return do_rewrite(v); } virtual abstract_phylum do_rewrite(rview) { return this;} // called if a subphylum of an op is rewritten and a new op is created by default rule virtual void rewrite_members(abstract_phylum from) {} virtual void post_create(){} virtual ~impl_abstract_phylum() { } private: virtual void do_unparse(printer_functor, uview) =0; protected: virtual void default_unparse(printer_functor, uview); }; class impl_abstract_list: public impl_abstract_phylum{ private: void fprint_list(FILE *); friend class impl_abstract_phylum; protected: abstract_phylum do_concat(c_abstract_phylum other, enum_operators) const; abstract_phylum do_reverse(c_abstract_phylum tail, enum_operators) const; abstract_phylum do_map(abstract_phylum (*kc_fp)(abstract_phylum), enum_operators); abstract_phylum do_filter(bool (*kc_fp)(abstract_phylum), enum_operators); abstract_list do_append(abstract_phylum, abstract_list); abstract_phylum do_merge(abstract_list,abstract_phylum (*kc_fp)(abstract_phylum,abstract_phylum), enum_operators); abstract_phylum do_reduce(abstract_phylum neutral, abstract_phylum (*kc_fp)(abstract_phylum,abstract_phylum)); public: virtual bool is_nil() const =0; virtual abstract_list reverse() const =0; int length() const; abstract_phylum last() const; // Non-virtual, non-existing... Type must be known exactly anyway because // of the function given as a parameter //virtual abstract_list map( abstract_phylum (*)( abstract_phylum )) =0; //virtual abstract_list filter(bool (*)(abstract_phylum)) =0; void freelist(); }; abstract_phylum kc_create(enum_operators createOp, abstract_phylum=0, abstract_phylum=0, abstract_phylum=0, abstract_phylum=0, abstract_phylum=0, abstract_phylum=0, abstract_phylum=0); abstract_phylum kc_create(enum_operators createOp, const std::vector& kc_ps); abstract_phylum& attributeOf(abstract_phylum kc_p, int no); class impl_nocasestring_NoCaseStr; typedef impl_nocasestring_NoCaseStr impl_nocasestring; class impl_nocasestring_NoCaseStr:public impl_abstract_phylum{ public: enum_operators prod_sel() const { return sel_NoCaseStr; } static const enum_phyla phylum_sel_; private: explicit impl_nocasestring_NoCaseStr(const kc_char_t*); void make_own(int length); friend nocasestring mknocasestring(const kc_char_t*, int); public: ~impl_nocasestring_NoCaseStr() { #if defined (_MSC_VER) && _MSC_VER<1300 delete [] (kc_char_t*)name; #else delete [] name; #endif } nocasestring rewrite( rview ) { return this; } kc_char_t const* name; private: void do_unparse(printer_functor, uview); }; class impl_casestring__Str; typedef impl_casestring__Str impl_casestring; class impl_casestring__Str:public impl_abstract_phylum{ public: enum_operators prod_sel() const { return sel__Str; } static const enum_phyla phylum_sel_; private: explicit impl_casestring__Str(const kc_char_t*); void make_own(int length); friend casestring mkcasestring(const kc_char_t*, int); public: ~impl_casestring__Str() { #if defined (_MSC_VER) && _MSC_VER<1300 delete [] (kc_char_t*)name; #else delete [] name; #endif } casestring rewrite( rview ) { return this; } kc_char_t const* name; private: void do_unparse(printer_functor, uview); }; class impl_real__Real; typedef impl_real__Real impl_real; class impl_real__Real:public impl_abstract_phylum{ public: enum_operators prod_sel() const { return sel__Real; } static const enum_phyla phylum_sel_; explicit impl_real__Real(REAL _value); real rewrite( rview ) { return this; } REAL value; private: void do_unparse(printer_functor, uview); }; class impl_integer__Int; typedef impl_integer__Int impl_integer; class impl_integer__Int:public impl_abstract_phylum{ public: enum_operators prod_sel() const { return sel__Int; } static const enum_phyla phylum_sel_; explicit impl_integer__Int(INTEGER _value); integer rewrite( rview ) { return this; } INTEGER value; private: void do_unparse(printer_functor, uview); }; class impl_voidptr__VoidPtr; typedef impl_voidptr__VoidPtr impl_voidptr; class impl_voidptr__VoidPtr:public impl_abstract_phylum{ public: enum_operators prod_sel() const { return sel__VoidPtr; } static const enum_phyla phylum_sel_; explicit impl_voidptr__VoidPtr(void* _pointer); voidptr rewrite( rview ) { return this; } void* pointer; private: void do_unparse(printer_functor, uview); }; class impl_uniqID: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; IDtype type; int line; casestring file; scopetypefilelinestack scopeinfo; uniqID rewrite(rview) =0; }; class impl_uniqID_Str:public impl_uniqID{ public: enum_operators prod_sel() const { return sel_Str; } explicit impl_uniqID_Str(casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); uniqID rewrite( rview ); impl_casestring* casestring_1; private: void do_unparse(printer_functor, uview); }; class impl_ID: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; IDtype type; casestring named_subphylum; int line; casestring file; ID rewrite(rview) =0; }; class impl_ID_Id:public impl_ID{ public: enum_operators prod_sel() const { return sel_Id; } explicit impl_ID_Id(uniqID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ID rewrite( rview ); impl_uniqID* uniqID_1; private: void do_unparse(printer_functor, uview); }; class impl_INT: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int line; casestring file; INT rewrite(rview) =0; }; class impl_INT_Int:public impl_INT{ public: enum_operators prod_sel() const { return sel_Int; } explicit impl_INT_Int(integer); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); INT rewrite( rview ); impl_integer* integer_1; private: void do_unparse(printer_functor, uview); }; class impl_STRING: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int line; casestring file; STRING rewrite(rview) =0; }; class impl_STRING_String:public impl_STRING{ public: enum_operators prod_sel() const { return sel_String; } explicit impl_STRING_String(casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); STRING rewrite( rview ); impl_casestring* casestring_1; private: void do_unparse(printer_functor, uview); }; class impl_phylumdeclarationsroot: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; phylumdeclarationsroot rewrite(rview) =0; }; class impl_phylumdeclarationsroot_PhylumDeclarations:public impl_phylumdeclarationsroot{ public: enum_operators prod_sel() const { return sel_PhylumDeclarations; } explicit impl_phylumdeclarationsroot_PhylumDeclarations(phylumdeclarations); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); phylumdeclarationsroot rewrite( rview ); impl_phylumdeclarations* phylumdeclarations_1; private: void do_unparse(printer_functor, uview); }; class impl_phylumdeclarations: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilphylumdeclarations: sel_Consphylumdeclarations; } explicit impl_phylumdeclarations(phylumdeclaration = 0, phylumdeclarations = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend phylumdeclarations concat(c_phylumdeclarations, c_phylumdeclarations); phylumdeclarations reverse() const; phylumdeclarations rewrite(rview); phylumdeclaration last() const; phylumdeclarations append(phylumdeclaration); phylumdeclarations map(phylumdeclaration (*)(phylumdeclaration)); phylumdeclarations filter( bool (*)(phylumdeclaration)); phylumdeclarations merge( phylumdeclarations, phylumdeclaration (*)(phylumdeclaration, phylumdeclaration)); phylumdeclaration reduce( phylumdeclaration, phylumdeclaration (*)(phylumdeclaration, phylumdeclaration)); bool is_nil() const; phylumdeclaration phylumdeclaration_1; phylumdeclarations phylumdeclarations_1; private: impl_phylumdeclarations* nil_rewrite(rview); impl_phylumdeclarations* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_phylumnames: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilphylumnames: sel_Consphylumnames; } explicit impl_phylumnames(ID = 0, phylumnames = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend phylumnames concat(c_phylumnames, c_phylumnames); phylumnames reverse() const; phylumnames rewrite(rview); ID last() const; phylumnames append(ID); phylumnames map(ID (*)(ID)); phylumnames filter( bool (*)(ID)); phylumnames merge( phylumnames, ID (*)(ID, ID)); ID reduce( ID, ID (*)(ID, ID)); bool is_nil() const; ID ID_1; phylumnames phylumnames_1; private: impl_phylumnames* nil_rewrite(rview); impl_phylumnames* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_phylumdeclaration: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int marked; fndeclarations additional_members; baseclass_list base_classes; phylumdeclaration rewrite(rview) =0; }; class impl_phylumdeclaration_PhylumDeclaration:public impl_phylumdeclaration{ public: enum_operators prod_sel() const { return sel_PhylumDeclaration; } explicit impl_phylumdeclaration_PhylumDeclaration(ID, storageoption, productionblock, Ccode_option); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); phylumdeclaration rewrite( rview ); impl_ID* ID_1; impl_storageoption* storageoption_1; impl_productionblock* productionblock_1; impl_Ccode_option* Ccode_option_1; private: void do_unparse(printer_functor, uview); }; class impl_storageoption: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; storageoption rewrite(rview) =0; }; class impl_storageoption_PositiveStorageOption:public impl_storageoption{ public: enum_operators prod_sel() const { return sel_PositiveStorageOption; } explicit impl_storageoption_PositiveStorageOption(ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); storageoption rewrite( rview ); impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_storageoption_NegativeStorageOption:public impl_storageoption{ public: enum_operators prod_sel() const { return sel_NegativeStorageOption; } explicit impl_storageoption_NegativeStorageOption(ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); storageoption rewrite( rview ); impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_storageoption_NoStorageOption:public impl_storageoption{ public: enum_operators prod_sel() const { return sel_NoStorageOption; } explicit impl_storageoption_NoStorageOption(); storageoption rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_storageclasses: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; phylumnames phyla; enum_operators prod_sel() const{ return is_nil() ? sel_Nilstorageclasses: sel_Consstorageclasses; } explicit impl_storageclasses(ID = 0, storageclasses = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend storageclasses concat(c_storageclasses, c_storageclasses); storageclasses reverse() const; storageclasses rewrite(rview); ID last() const; storageclasses append(ID); storageclasses map(ID (*)(ID)); storageclasses filter( bool (*)(ID)); storageclasses merge( storageclasses, ID (*)(ID, ID)); ID reduce( ID, ID (*)(ID, ID)); bool is_nil() const; ID ID_1; storageclasses storageclasses_1; private: impl_storageclasses* nil_rewrite(rview); impl_storageclasses* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_productionblock: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; productionblock rewrite(rview) =0; }; class impl_productionblock_PredefinedAlternatives:public impl_productionblock{ public: enum_operators prod_sel() const { return sel_PredefinedAlternatives; } explicit impl_productionblock_PredefinedAlternatives(alternatives); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); productionblock rewrite( rview ); impl_alternatives* alternatives_1; private: void do_unparse(printer_functor, uview); }; class impl_productionblock_NonlistAlternatives:public impl_productionblock{ public: enum_operators prod_sel() const { return sel_NonlistAlternatives; } explicit impl_productionblock_NonlistAlternatives(alternatives); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); productionblock rewrite( rview ); impl_alternatives* alternatives_1; private: void do_unparse(printer_functor, uview); }; class impl_productionblock_ListAlternatives:public impl_productionblock{ public: enum_operators prod_sel() const { return sel_ListAlternatives; } explicit impl_productionblock_ListAlternatives(alternatives, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); productionblock rewrite( rview ); impl_alternatives* alternatives_1; impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_productionblock_Emptyproductionblock:public impl_productionblock{ public: enum_operators prod_sel() const { return sel_Emptyproductionblock; } explicit impl_productionblock_Emptyproductionblock(); productionblock rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_alternatives: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilalternatives: sel_Consalternatives; } explicit impl_alternatives(alternative = 0, alternatives = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend alternatives concat(c_alternatives, c_alternatives); alternatives reverse() const; alternatives rewrite(rview); alternative last() const; alternatives append(alternative); alternatives map(alternative (*)(alternative)); alternatives filter( bool (*)(alternative)); alternatives merge( alternatives, alternative (*)(alternative, alternative)); alternative reduce( alternative, alternative (*)(alternative, alternative)); bool is_nil() const; alternative alternative_1; alternatives alternatives_1; private: impl_alternatives* nil_rewrite(rview); impl_alternatives* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_alternative: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; rewriterulesinfo rewriteinfo; unparsedeclsinfo unparseinfo; fndeclarations additional_members; baseclass_list base_classes; alternative rewrite(rview) =0; }; class impl_alternative_Alternative:public impl_alternative{ public: enum_operators prod_sel() const { return sel_Alternative; } explicit impl_alternative_Alternative(ID, arguments); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); alternative rewrite( rview ); impl_ID* ID_1; impl_arguments* arguments_1; private: void do_unparse(printer_functor, uview); }; class impl_arguments: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; int seqnr; enum_operators prod_sel() const{ return is_nil() ? sel_Nilarguments: sel_Consarguments; } explicit impl_arguments(ID = 0, arguments = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend arguments concat(c_arguments, c_arguments); arguments reverse() const; arguments rewrite(rview); ID last() const; arguments append(ID); arguments map(ID (*)(ID)); arguments filter( bool (*)(ID)); arguments merge( arguments, ID (*)(ID, ID)); ID reduce( ID, ID (*)(ID, ID)); bool is_nil() const; ID ID_1; arguments arguments_1; private: impl_arguments* nil_rewrite(rview); impl_arguments* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_argument: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; argument rewrite(rview) =0; }; class impl_argument_Argument:public impl_argument{ public: enum_operators prod_sel() const { return sel_Argument; } explicit impl_argument_Argument(ID, integer); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); argument rewrite( rview ); impl_ID* ID_1; impl_integer* integer_1; private: void do_unparse(printer_functor, uview); }; class impl_Ccode_option: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; Ccode_option rewrite(rview) =0; }; class impl_Ccode_option_CcodeOption:public impl_Ccode_option{ public: enum_operators prod_sel() const { return sel_CcodeOption; } explicit impl_Ccode_option_CcodeOption(attributes, Ctexts); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Ccode_option rewrite( rview ); impl_attributes* attributes_1; impl_Ctexts* Ctexts_1; private: void do_unparse(printer_functor, uview); }; class impl_attributes: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilattributes: sel_Consattributes; } explicit impl_attributes(attribute = 0, attributes = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend attributes concat(c_attributes, c_attributes); attributes reverse() const; attributes rewrite(rview); attribute last() const; attributes append(attribute); attributes map(attribute (*)(attribute)); attributes filter( bool (*)(attribute)); attributes merge( attributes, attribute (*)(attribute, attribute)); attribute reduce( attribute, attribute (*)(attribute, attribute)); bool is_nil() const; attribute attribute_1; attributes attributes_1; private: impl_attributes* nil_rewrite(rview); impl_attributes* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_attribute: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; attribute rewrite(rview) =0; }; class impl_attribute_Attribute:public impl_attribute{ public: enum_operators prod_sel() const { return sel_Attribute; } explicit impl_attribute_Attribute(ID, ID, attribute_initialisation_option); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); attribute rewrite( rview ); impl_ID* ID_1; impl_ID* ID_2; impl_attribute_initialisation_option* attribute_initialisation_option_1; private: void do_unparse(printer_functor, uview); }; class impl_attribute_initialisation_option: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; attribute_initialisation_option rewrite(rview) =0; }; class impl_attribute_initialisation_option_Yesattribute_initialisation:public impl_attribute_initialisation_option{ public: enum_operators prod_sel() const { return sel_Yesattribute_initialisation; } explicit impl_attribute_initialisation_option_Yesattribute_initialisation(Cexpression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); attribute_initialisation_option rewrite( rview ); impl_Cexpression* Cexpression_1; private: void do_unparse(printer_functor, uview); }; class impl_attribute_initialisation_option_Noattribute_initialisation:public impl_attribute_initialisation_option{ public: enum_operators prod_sel() const { return sel_Noattribute_initialisation; } explicit impl_attribute_initialisation_option_Noattribute_initialisation(); attribute_initialisation_option rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_Cexpression: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; int line; casestring file; enum_operators prod_sel() const{ return is_nil() ? sel_NilCexpression: sel_ConsCexpression; } explicit impl_Cexpression(Cexpression_elem = 0, Cexpression = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend Cexpression concat(c_Cexpression, c_Cexpression); Cexpression reverse() const; Cexpression rewrite(rview); Cexpression_elem last() const; Cexpression append(Cexpression_elem); Cexpression map(Cexpression_elem (*)(Cexpression_elem)); Cexpression filter( bool (*)(Cexpression_elem)); Cexpression merge( Cexpression, Cexpression_elem (*)(Cexpression_elem, Cexpression_elem)); Cexpression_elem reduce( Cexpression_elem, Cexpression_elem (*)(Cexpression_elem, Cexpression_elem)); bool is_nil() const; Cexpression_elem Cexpression_elem_1; Cexpression Cexpression_1; private: impl_Cexpression* nil_rewrite(rview); impl_Cexpression* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_Cexpression_elem: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; Cexpression_elem rewrite(rview) =0; }; class impl_Cexpression_elem_CExpressionArray:public impl_Cexpression_elem{ public: enum_operators prod_sel() const { return sel_CExpressionArray; } explicit impl_Cexpression_elem_CExpressionArray(Cexpression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Cexpression_elem rewrite( rview ); impl_Cexpression* Cexpression_1; private: void do_unparse(printer_functor, uview); }; class impl_Cexpression_elem_CExpressionPack:public impl_Cexpression_elem{ public: enum_operators prod_sel() const { return sel_CExpressionPack; } explicit impl_Cexpression_elem_CExpressionPack(Cexpression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Cexpression_elem rewrite( rview ); impl_Cexpression* Cexpression_1; private: void do_unparse(printer_functor, uview); }; class impl_Cexpression_elem_CExpressionSQ:public impl_Cexpression_elem{ public: enum_operators prod_sel() const { return sel_CExpressionSQ; } explicit impl_Cexpression_elem_CExpressionSQ(CexpressionSQ); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Cexpression_elem rewrite( rview ); impl_CexpressionSQ* CexpressionSQ_1; private: void do_unparse(printer_functor, uview); }; class impl_Cexpression_elem_CExpressionDQ:public impl_Cexpression_elem{ public: enum_operators prod_sel() const { return sel_CExpressionDQ; } explicit impl_Cexpression_elem_CExpressionDQ(CexpressionDQ); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Cexpression_elem rewrite( rview ); impl_CexpressionDQ* CexpressionDQ_1; private: void do_unparse(printer_functor, uview); }; class impl_Cexpression_elem_CExpressionNl:public impl_Cexpression_elem{ public: enum_operators prod_sel() const { return sel_CExpressionNl; } explicit impl_Cexpression_elem_CExpressionNl(); Cexpression_elem rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_Cexpression_elem_CExpressionDollarvar:public impl_Cexpression_elem{ public: enum_operators prod_sel() const { return sel_CExpressionDollarvar; } explicit impl_Cexpression_elem_CExpressionDollarvar(INT); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Cexpression_elem rewrite( rview ); impl_INT* INT_1; private: void do_unparse(printer_functor, uview); }; class impl_Cexpression_elem_CExpressionPart:public impl_Cexpression_elem{ public: enum_operators prod_sel() const { return sel_CExpressionPart; } explicit impl_Cexpression_elem_CExpressionPart(casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Cexpression_elem rewrite( rview ); impl_casestring* casestring_1; private: void do_unparse(printer_functor, uview); }; class impl_CexpressionDQ: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_NilCexpressionDQ: sel_ConsCexpressionDQ; } explicit impl_CexpressionDQ(CexpressionDQ_elem = 0, CexpressionDQ = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend CexpressionDQ concat(c_CexpressionDQ, c_CexpressionDQ); CexpressionDQ reverse() const; CexpressionDQ rewrite(rview); CexpressionDQ_elem last() const; CexpressionDQ append(CexpressionDQ_elem); CexpressionDQ map(CexpressionDQ_elem (*)(CexpressionDQ_elem)); CexpressionDQ filter( bool (*)(CexpressionDQ_elem)); CexpressionDQ merge( CexpressionDQ, CexpressionDQ_elem (*)(CexpressionDQ_elem, CexpressionDQ_elem)); CexpressionDQ_elem reduce( CexpressionDQ_elem, CexpressionDQ_elem (*)(CexpressionDQ_elem, CexpressionDQ_elem)); bool is_nil() const; CexpressionDQ_elem CexpressionDQ_elem_1; CexpressionDQ CexpressionDQ_1; private: impl_CexpressionDQ* nil_rewrite(rview); impl_CexpressionDQ* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_CexpressionDQ_elem: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; CexpressionDQ_elem rewrite(rview) =0; }; class impl_CexpressionDQ_elem_CExpressionDQNl:public impl_CexpressionDQ_elem{ public: enum_operators prod_sel() const { return sel_CExpressionDQNl; } explicit impl_CexpressionDQ_elem_CExpressionDQNl(); CexpressionDQ_elem rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_CexpressionDQ_elem_CExpressionDQPart:public impl_CexpressionDQ_elem{ public: enum_operators prod_sel() const { return sel_CExpressionDQPart; } explicit impl_CexpressionDQ_elem_CExpressionDQPart(casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); CexpressionDQ_elem rewrite( rview ); impl_casestring* casestring_1; private: void do_unparse(printer_functor, uview); }; class impl_CexpressionSQ: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_NilCexpressionSQ: sel_ConsCexpressionSQ; } explicit impl_CexpressionSQ(CexpressionSQ_elem = 0, CexpressionSQ = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend CexpressionSQ concat(c_CexpressionSQ, c_CexpressionSQ); CexpressionSQ reverse() const; CexpressionSQ rewrite(rview); CexpressionSQ_elem last() const; CexpressionSQ append(CexpressionSQ_elem); CexpressionSQ map(CexpressionSQ_elem (*)(CexpressionSQ_elem)); CexpressionSQ filter( bool (*)(CexpressionSQ_elem)); CexpressionSQ merge( CexpressionSQ, CexpressionSQ_elem (*)(CexpressionSQ_elem, CexpressionSQ_elem)); CexpressionSQ_elem reduce( CexpressionSQ_elem, CexpressionSQ_elem (*)(CexpressionSQ_elem, CexpressionSQ_elem)); bool is_nil() const; CexpressionSQ_elem CexpressionSQ_elem_1; CexpressionSQ CexpressionSQ_1; private: impl_CexpressionSQ* nil_rewrite(rview); impl_CexpressionSQ* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_CexpressionSQ_elem: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; CexpressionSQ_elem rewrite(rview) =0; }; class impl_CexpressionSQ_elem_CExpressionSQNl:public impl_CexpressionSQ_elem{ public: enum_operators prod_sel() const { return sel_CExpressionSQNl; } explicit impl_CexpressionSQ_elem_CExpressionSQNl(); CexpressionSQ_elem rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_CexpressionSQ_elem_CExpressionSQPart:public impl_CexpressionSQ_elem{ public: enum_operators prod_sel() const { return sel_CExpressionSQPart; } explicit impl_CexpressionSQ_elem_CExpressionSQPart(casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); CexpressionSQ_elem rewrite( rview ); impl_casestring* casestring_1; private: void do_unparse(printer_functor, uview); }; class impl_idCexpressions: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_NilidCexpressions: sel_ConsidCexpressions; } explicit impl_idCexpressions(idCexpression = 0, idCexpressions = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend idCexpressions concat(c_idCexpressions, c_idCexpressions); idCexpressions reverse() const; idCexpressions rewrite(rview); idCexpression last() const; idCexpressions append(idCexpression); idCexpressions map(idCexpression (*)(idCexpression)); idCexpressions filter( bool (*)(idCexpression)); idCexpressions merge( idCexpressions, idCexpression (*)(idCexpression, idCexpression)); idCexpression reduce( idCexpression, idCexpression (*)(idCexpression, idCexpression)); bool is_nil() const; idCexpression idCexpression_1; idCexpressions idCexpressions_1; private: impl_idCexpressions* nil_rewrite(rview); impl_idCexpressions* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_idCexpression: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ID id; idCexpression rewrite(rview) =0; }; class impl_idCexpression_IdCexpression:public impl_idCexpression{ public: enum_operators prod_sel() const { return sel_IdCexpression; } explicit impl_idCexpression_IdCexpression(ID, Cexpression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); idCexpression rewrite( rview ); impl_ID* ID_1; impl_Cexpression* Cexpression_1; private: void do_unparse(printer_functor, uview); }; class impl_Ctexts: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_NilCtexts: sel_ConsCtexts; } explicit impl_Ctexts(Ctext = 0, Ctexts = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend Ctexts concat(c_Ctexts, c_Ctexts); Ctexts reverse() const; Ctexts rewrite(rview); Ctext last() const; Ctexts append(Ctext); Ctexts map(Ctext (*)(Ctext)); Ctexts filter( bool (*)(Ctext)); Ctexts merge( Ctexts, Ctext (*)(Ctext, Ctext)); Ctext reduce( Ctext, Ctext (*)(Ctext, Ctext)); bool is_nil() const; Ctext Ctext_1; Ctexts Ctexts_1; private: impl_Ctexts* nil_rewrite(rview); impl_Ctexts* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_includefiles: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilincludefiles: sel_Consincludefiles; } explicit impl_includefiles(includefile = 0, includefiles = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend includefiles concat(c_includefiles, c_includefiles); includefiles reverse() const; includefiles rewrite(rview); includefile last() const; includefiles append(includefile); includefiles map(includefile (*)(includefile)); includefiles filter( bool (*)(includefile)); includefiles merge( includefiles, includefile (*)(includefile, includefile)); includefile reduce( includefile, includefile (*)(includefile, includefile)); bool is_nil() const; includefile includefile_1; includefiles includefiles_1; private: impl_includefiles* nil_rewrite(rview); impl_includefiles* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_includefile: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; include_type inc_type; twoIncludedeclarations inc; includefile rewrite(rview) =0; }; class impl_includefile_IncludeFile:public impl_includefile{ public: enum_operators prod_sel() const { return sel_IncludeFile; } explicit impl_includefile_IncludeFile(casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); includefile rewrite( rview ); impl_casestring* casestring_1; private: void do_unparse(printer_functor, uview); }; class impl_includedeclarations: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilincludedeclarations: sel_Consincludedeclarations; } explicit impl_includedeclarations(includedeclaration = 0, includedeclarations = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend includedeclarations concat(c_includedeclarations, c_includedeclarations); includedeclarations reverse() const; includedeclarations rewrite(rview); includedeclaration last() const; includedeclarations append(includedeclaration); includedeclarations map(includedeclaration (*)(includedeclaration)); includedeclarations filter( bool (*)(includedeclaration)); includedeclarations merge( includedeclarations, includedeclaration (*)(includedeclaration, includedeclaration)); includedeclaration reduce( includedeclaration, includedeclaration (*)(includedeclaration, includedeclaration)); bool is_nil() const; includedeclaration includedeclaration_1; includedeclarations includedeclarations_1; private: impl_includedeclarations* nil_rewrite(rview); impl_includedeclarations* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_includedeclaration: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int line; casestring file; includedeclaration rewrite(rview) =0; }; class impl_includedeclaration_IncludeDeclaration:public impl_includedeclaration{ public: enum_operators prod_sel() const { return sel_IncludeDeclaration; } explicit impl_includedeclaration_IncludeDeclaration(casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); includedeclaration rewrite( rview ); impl_casestring* casestring_1; private: void do_unparse(printer_functor, uview); }; class impl_rwdeclarations: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilrwdeclarations: sel_Consrwdeclarations; } explicit impl_rwdeclarations(rwdeclaration = 0, rwdeclarations = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend rwdeclarations concat(c_rwdeclarations, c_rwdeclarations); rwdeclarations reverse() const; rwdeclarations rewrite(rview); rwdeclaration last() const; rwdeclarations append(rwdeclaration); rwdeclarations map(rwdeclaration (*)(rwdeclaration)); rwdeclarations filter( bool (*)(rwdeclaration)); rwdeclarations merge( rwdeclarations, rwdeclaration (*)(rwdeclaration, rwdeclaration)); rwdeclaration reduce( rwdeclaration, rwdeclaration (*)(rwdeclaration, rwdeclaration)); bool is_nil() const; rwdeclaration rwdeclaration_1; rwdeclarations rwdeclarations_1; private: impl_rwdeclarations* nil_rewrite(rview); impl_rwdeclarations* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_rwdeclaration: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; rwdeclaration rewrite(rview) =0; }; class impl_rwdeclaration_RwDeclaration:public impl_rwdeclaration{ public: enum_operators prod_sel() const { return sel_RwDeclaration; } explicit impl_rwdeclaration_RwDeclaration(outmostpatterns, rewriteclauses); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); rwdeclaration rewrite( rview ); impl_outmostpatterns* outmostpatterns_1; impl_rewriteclauses* rewriteclauses_1; private: void do_unparse(printer_functor, uview); }; class impl_rewriteclauses: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilrewriteclauses: sel_Consrewriteclauses; } explicit impl_rewriteclauses(rewriteclause = 0, rewriteclauses = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend rewriteclauses concat(c_rewriteclauses, c_rewriteclauses); rewriteclauses reverse() const; rewriteclauses rewrite(rview); rewriteclause last() const; rewriteclauses append(rewriteclause); rewriteclauses map(rewriteclause (*)(rewriteclause)); rewriteclauses filter( bool (*)(rewriteclause)); rewriteclauses merge( rewriteclauses, rewriteclause (*)(rewriteclause, rewriteclause)); rewriteclause reduce( rewriteclause, rewriteclause (*)(rewriteclause, rewriteclause)); bool is_nil() const; rewriteclause rewriteclause_1; rewriteclauses rewriteclauses_1; private: impl_rewriteclauses* nil_rewrite(rview); impl_rewriteclauses* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_rewriteclause: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; rewriteclause rewrite(rview) =0; }; class impl_rewriteclause_RewriteClause:public impl_rewriteclause{ public: enum_operators prod_sel() const { return sel_RewriteClause; } explicit impl_rewriteclause_RewriteClause(viewnames, term); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); rewriteclause rewrite( rview ); impl_viewnames* viewnames_1; impl_term* term_1; private: void do_unparse(printer_functor, uview); }; class impl_patternchains: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; int line; casestring file; enum_operators prod_sel() const{ return is_nil() ? sel_Nilpatternchains: sel_Conspatternchains; } explicit impl_patternchains(patternchain = 0, patternchains = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend patternchains concat(c_patternchains, c_patternchains); patternchains reverse() const; patternchains rewrite(rview); patternchain last() const; patternchains append(patternchain); patternchains map(patternchain (*)(patternchain)); patternchains filter( bool (*)(patternchain)); patternchains merge( patternchains, patternchain (*)(patternchain, patternchain)); patternchain reduce( patternchain, patternchain (*)(patternchain, patternchain)); bool is_nil() const; patternchain patternchain_1; patternchains patternchains_1; private: impl_patternchains* nil_rewrite(rview); impl_patternchains* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_patternchain: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; int line; casestring file; enum_operators prod_sel() const{ return is_nil() ? sel_Nilpatternchain: sel_Conspatternchain; } explicit impl_patternchain(patternchainitem = 0, patternchain = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend patternchain concat(c_patternchain, c_patternchain); patternchain reverse() const; patternchain rewrite(rview); patternchainitem last() const; patternchain append(patternchainitem); patternchain map(patternchainitem (*)(patternchainitem)); patternchain filter( bool (*)(patternchainitem)); patternchain merge( patternchain, patternchainitem (*)(patternchainitem, patternchainitem)); patternchainitem reduce( patternchainitem, patternchainitem (*)(patternchainitem, patternchainitem)); bool is_nil() const; patternchainitem patternchainitem_1; patternchain patternchain_1; private: impl_patternchain* nil_rewrite(rview); impl_patternchain* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_outmostpatterns: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Niloutmostpatterns: sel_Consoutmostpatterns; } explicit impl_outmostpatterns(outmostpattern = 0, outmostpatterns = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend outmostpatterns concat(c_outmostpatterns, c_outmostpatterns); outmostpatterns reverse() const; outmostpatterns rewrite(rview); outmostpattern last() const; outmostpatterns append(outmostpattern); outmostpatterns map(outmostpattern (*)(outmostpattern)); outmostpatterns filter( bool (*)(outmostpattern)); outmostpatterns merge( outmostpatterns, outmostpattern (*)(outmostpattern, outmostpattern)); outmostpattern reduce( outmostpattern, outmostpattern (*)(outmostpattern, outmostpattern)); bool is_nil() const; outmostpattern outmostpattern_1; outmostpatterns outmostpatterns_1; private: impl_outmostpatterns* nil_rewrite(rview); impl_outmostpatterns* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_patternchainitem: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int line; casestring file; ID type; patternchainitem rewrite(rview) =0; }; class impl_patternchainitem_PatternchainitemDollarid:public impl_patternchainitem{ public: enum_operators prod_sel() const { return sel_PatternchainitemDollarid; } explicit impl_patternchainitem_PatternchainitemDollarid(ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); patternchainitem rewrite( rview ); impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_patternchainitem_PatternchainitemGroup:public impl_patternchainitem{ public: enum_operators prod_sel() const { return sel_PatternchainitemGroup; } explicit impl_patternchainitem_PatternchainitemGroup(patternchains); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); patternchainitem rewrite( rview ); impl_patternchains* patternchains_1; private: void do_unparse(printer_functor, uview); }; class impl_patternchainitem_PatternchainitemOutmost:public impl_patternchainitem{ public: enum_operators prod_sel() const { return sel_PatternchainitemOutmost; } explicit impl_patternchainitem_PatternchainitemOutmost(outmostpattern); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); patternchainitem rewrite( rview ); impl_outmostpattern* outmostpattern_1; private: void do_unparse(printer_functor, uview); }; class impl_outmostpattern: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int line; casestring file; ID type; outmostpattern rewrite(rview) =0; }; class impl_outmostpattern_OPDefault:public impl_outmostpattern{ public: enum_operators prod_sel() const { return sel_OPDefault; } explicit impl_outmostpattern_OPDefault(Cexpression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); outmostpattern rewrite( rview ); impl_Cexpression* Cexpression_1; private: void do_unparse(printer_functor, uview); }; class impl_outmostpattern_OPWildcard:public impl_outmostpattern{ public: enum_operators prod_sel() const { return sel_OPWildcard; } explicit impl_outmostpattern_OPWildcard(Cexpression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); outmostpattern rewrite( rview ); impl_Cexpression* Cexpression_1; private: void do_unparse(printer_functor, uview); }; class impl_outmostpattern_OPNonLeafVariable:public impl_outmostpattern{ public: enum_operators prod_sel() const { return sel_OPNonLeafVariable; } explicit impl_outmostpattern_OPNonLeafVariable(ID, outmostpattern); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); outmostpattern rewrite( rview ); impl_ID* ID_1; impl_outmostpattern* outmostpattern_1; private: void do_unparse(printer_functor, uview); }; class impl_outmostpattern_OPOperator:public impl_outmostpattern{ public: enum_operators prod_sel() const { return sel_OPOperator; } explicit impl_outmostpattern_OPOperator(ID, patterns, Cexpression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); outmostpattern rewrite( rview ); impl_ID* ID_1; impl_patterns* patterns_1; impl_Cexpression* Cexpression_1; private: void do_unparse(printer_functor, uview); }; class impl_outmostpattern_OPOperatorWildcard:public impl_outmostpattern{ public: enum_operators prod_sel() const { return sel_OPOperatorWildcard; } explicit impl_outmostpattern_OPOperatorWildcard(ID, Cexpression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); outmostpattern rewrite( rview ); impl_ID* ID_1; impl_Cexpression* Cexpression_1; private: void do_unparse(printer_functor, uview); }; class impl_pattern: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; pattern rewrite(rview) =0; }; class impl_pattern_PIntLiteral:public impl_pattern{ public: enum_operators prod_sel() const { return sel_PIntLiteral; } explicit impl_pattern_PIntLiteral(INT); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); pattern rewrite( rview ); impl_INT* INT_1; private: void do_unparse(printer_functor, uview); }; class impl_pattern_PStringLiteral:public impl_pattern{ public: enum_operators prod_sel() const { return sel_PStringLiteral; } explicit impl_pattern_PStringLiteral(CexpressionDQ); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); pattern rewrite( rview ); impl_CexpressionDQ* CexpressionDQ_1; private: void do_unparse(printer_functor, uview); }; class impl_pattern_PWildcard:public impl_pattern{ public: enum_operators prod_sel() const { return sel_PWildcard; } explicit impl_pattern_PWildcard(); pattern rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_pattern_PNonLeafVariable:public impl_pattern{ public: enum_operators prod_sel() const { return sel_PNonLeafVariable; } explicit impl_pattern_PNonLeafVariable(ID, pattern); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); pattern rewrite( rview ); impl_ID* ID_1; impl_pattern* pattern_1; private: void do_unparse(printer_functor, uview); }; class impl_pattern_POperator:public impl_pattern{ public: enum_operators prod_sel() const { return sel_POperator; } explicit impl_pattern_POperator(ID, patterns); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); pattern rewrite( rview ); impl_ID* ID_1; impl_patterns* patterns_1; private: void do_unparse(printer_functor, uview); }; class impl_pattern_PVariable:public impl_pattern{ public: enum_operators prod_sel() const { return sel_PVariable; } explicit impl_pattern_PVariable(ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); pattern rewrite( rview ); impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_patterns: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilpatterns: sel_Conspatterns; } explicit impl_patterns(pattern = 0, patterns = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend patterns concat(c_patterns, c_patterns); patterns reverse() const; patterns rewrite(rview); pattern last() const; patterns append(pattern); patterns map(pattern (*)(pattern)); patterns filter( bool (*)(pattern)); patterns merge( patterns, pattern (*)(pattern, pattern)); pattern reduce( pattern, pattern (*)(pattern, pattern)); bool is_nil() const; pattern pattern_1; patterns patterns_1; private: impl_patterns* nil_rewrite(rview); impl_patterns* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_term: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int line; casestring file; term rewrite(rview) =0; }; class impl_term_TIntLiteral:public impl_term{ public: enum_operators prod_sel() const { return sel_TIntLiteral; } explicit impl_term_TIntLiteral(INT); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); term rewrite( rview ); impl_INT* INT_1; private: void do_unparse(printer_functor, uview); }; class impl_term_TStringLiteral:public impl_term{ public: enum_operators prod_sel() const { return sel_TStringLiteral; } explicit impl_term_TStringLiteral(CexpressionDQ); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); term rewrite( rview ); impl_CexpressionDQ* CexpressionDQ_1; private: void do_unparse(printer_functor, uview); }; class impl_term_TCTerm:public impl_term{ public: enum_operators prod_sel() const { return sel_TCTerm; } explicit impl_term_TCTerm(CexpressionSQ); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); term rewrite( rview ); impl_CexpressionSQ* CexpressionSQ_1; private: void do_unparse(printer_functor, uview); }; class impl_term_TMemberVarDot:public impl_term{ public: enum_operators prod_sel() const { return sel_TMemberVarDot; } explicit impl_term_TMemberVarDot(term, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); term rewrite( rview ); impl_term* term_1; impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_term_TMemberVar:public impl_term{ public: enum_operators prod_sel() const { return sel_TMemberVar; } explicit impl_term_TMemberVar(term, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); term rewrite( rview ); impl_term* term_1; impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_term_TMethodDot:public impl_term{ public: enum_operators prod_sel() const { return sel_TMethodDot; } explicit impl_term_TMethodDot(term, ID, terms); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); term rewrite( rview ); impl_term* term_1; impl_ID* ID_1; impl_terms* terms_1; private: void do_unparse(printer_functor, uview); }; class impl_term_TMethod:public impl_term{ public: enum_operators prod_sel() const { return sel_TMethod; } explicit impl_term_TMethod(term, ID, terms); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); term rewrite( rview ); impl_term* term_1; impl_ID* ID_1; impl_terms* terms_1; private: void do_unparse(printer_functor, uview); }; class impl_term_TOperator:public impl_term{ public: enum_operators prod_sel() const { return sel_TOperator; } explicit impl_term_TOperator(ID, terms); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); term rewrite( rview ); impl_ID* ID_1; impl_terms* terms_1; private: void do_unparse(printer_functor, uview); }; class impl_term_TVariable:public impl_term{ public: enum_operators prod_sel() const { return sel_TVariable; } explicit impl_term_TVariable(ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); term rewrite( rview ); impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_terms: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilterms: sel_Consterms; } explicit impl_terms(term = 0, terms = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend terms concat(c_terms, c_terms); terms reverse() const; terms rewrite(rview); term last() const; terms append(term); terms map(term (*)(term)); terms filter( bool (*)(term)); terms merge( terms, term (*)(term, term)); term reduce( term, term (*)(term, term)); bool is_nil() const; term term_1; terms terms_1; private: impl_terms* nil_rewrite(rview); impl_terms* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_fnfiles: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilfnfiles: sel_Consfnfiles; } explicit impl_fnfiles(fnfile = 0, fnfiles = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend fnfiles concat(c_fnfiles, c_fnfiles); fnfiles reverse() const; fnfiles rewrite(rview); fnfile last() const; fnfiles append(fnfile); fnfiles map(fnfile (*)(fnfile)); fnfiles filter( bool (*)(fnfile)); fnfiles merge( fnfiles, fnfile (*)(fnfile, fnfile)); fnfile reduce( fnfile, fnfile (*)(fnfile, fnfile)); bool is_nil() const; fnfile fnfile_1; fnfiles fnfiles_1; private: impl_fnfiles* nil_rewrite(rview); impl_fnfiles* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_fnfile: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; fndeclarations fns; fnfile rewrite(rview) =0; }; class impl_fnfile_FnFile:public impl_fnfile{ public: enum_operators prod_sel() const { return sel_FnFile; } explicit impl_fnfile_FnFile(casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); fnfile rewrite( rview ); impl_casestring* casestring_1; private: void do_unparse(printer_functor, uview); }; class impl_fndeclarations: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilfndeclarations: sel_Consfndeclarations; } explicit impl_fndeclarations(fndeclaration = 0, fndeclarations = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend fndeclarations concat(c_fndeclarations, c_fndeclarations); fndeclarations reverse() const; fndeclarations rewrite(rview); fndeclaration last() const; fndeclarations append(fndeclaration); fndeclarations map(fndeclaration (*)(fndeclaration)); fndeclarations filter( bool (*)(fndeclaration)); fndeclarations merge( fndeclarations, fndeclaration (*)(fndeclaration, fndeclaration)); fndeclaration reduce( fndeclaration, fndeclaration (*)(fndeclaration, fndeclaration)); bool is_nil() const; fndeclaration fndeclaration_1; fndeclarations fndeclarations_1; private: impl_fndeclarations* nil_rewrite(rview); impl_fndeclarations* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_fndeclaration: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_parameter_type_list sorted; int last_line; casestring file; bool is_attr; fndeclaration rewrite(rview) =0; }; class impl_fndeclaration_AcMemberDeclaration:public impl_fndeclaration{ public: enum_operators prod_sel() const { return sel_AcMemberDeclaration; } explicit impl_fndeclaration_AcMemberDeclaration(ac_declaration_specifiers, ac_declarator, ac_constant_expression_option, fnclass); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); fndeclaration rewrite( rview ); impl_ac_declaration_specifiers* ac_declaration_specifiers_1; impl_ac_declarator* ac_declarator_1; impl_ac_constant_expression_option* ac_constant_expression_option_1; impl_fnclass* fnclass_1; private: void do_unparse(printer_functor, uview); }; class impl_fndeclaration_FnAcDeclaration:public impl_fndeclaration{ public: enum_operators prod_sel() const { return sel_FnAcDeclaration; } explicit impl_fndeclaration_FnAcDeclaration(ac_declaration_specifiers, ac_declarator, ac_declaration_list, ac_opt_base_init_list, Ctext, ID, fnclass); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); fndeclaration rewrite( rview ); impl_ac_declaration_specifiers* ac_declaration_specifiers_1; impl_ac_declarator* ac_declarator_1; impl_ac_declaration_list* ac_declaration_list_1; impl_ac_opt_base_init_list* ac_opt_base_init_list_1; impl_Ctext* Ctext_1; impl_ID* ID_1; impl_fnclass* fnclass_1; private: void do_unparse(printer_functor, uview); }; class impl_fnclass: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; fnclass rewrite(rview) =0; }; class impl_fnclass_ConvOperatorFn:public impl_fnclass{ public: enum_operators prod_sel() const { return sel_ConvOperatorFn; } explicit impl_fnclass_ConvOperatorFn(); fnclass rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_fnclass_DestructorFn:public impl_fnclass{ public: enum_operators prod_sel() const { return sel_DestructorFn; } explicit impl_fnclass_DestructorFn(); fnclass rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_fnclass_ConstructorFn:public impl_fnclass{ public: enum_operators prod_sel() const { return sel_ConstructorFn; } explicit impl_fnclass_ConstructorFn(); fnclass rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_fnclass_MemberFn:public impl_fnclass{ public: enum_operators prod_sel() const { return sel_MemberFn; } explicit impl_fnclass_MemberFn(); fnclass rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_fnclass_StaticFn:public impl_fnclass{ public: enum_operators prod_sel() const { return sel_StaticFn; } explicit impl_fnclass_StaticFn(casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); fnclass rewrite( rview ); impl_casestring* casestring_1; private: void do_unparse(printer_functor, uview); }; class impl_fnclass_GlobalFn:public impl_fnclass{ public: enum_operators prod_sel() const { return sel_GlobalFn; } explicit impl_fnclass_GlobalFn(); fnclass rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_Ctext: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; int line; casestring file; enum_operators prod_sel() const{ return is_nil() ? sel_NilCtext: sel_ConsCtext; } explicit impl_Ctext(Ctext_elem = 0, Ctext = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend Ctext concat(c_Ctext, c_Ctext); Ctext reverse() const; Ctext rewrite(rview); Ctext_elem last() const; Ctext append(Ctext_elem); Ctext map(Ctext_elem (*)(Ctext_elem)); Ctext filter( bool (*)(Ctext_elem)); Ctext merge( Ctext, Ctext_elem (*)(Ctext_elem, Ctext_elem)); Ctext_elem reduce( Ctext_elem, Ctext_elem (*)(Ctext_elem, Ctext_elem)); bool is_nil() const; Ctext_elem Ctext_elem_1; Ctext Ctext_1; private: impl_Ctext* nil_rewrite(rview); impl_Ctext* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_Ctext_elem: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int line; casestring file; Ctext_elem rewrite(rview) =0; }; class impl_Ctext_elem_CTextWithexpression:public impl_Ctext_elem{ public: enum_operators prod_sel() const { return sel_CTextWithexpression; } explicit impl_Ctext_elem_CTextWithexpression(withexpressions, withcases, contextinfo); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Ctext_elem rewrite( rview ); impl_withexpressions* withexpressions_1; impl_withcases* withcases_1; impl_contextinfo* contextinfo_1; private: void do_unparse(printer_functor, uview); }; class impl_Ctext_elem_CTextForeachexpression:public impl_Ctext_elem{ public: enum_operators prod_sel() const { return sel_CTextForeachexpression; } explicit impl_Ctext_elem_CTextForeachexpression(patternchain, idCexpressions, withexpressions, Ctext, foreach_after); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Ctext_elem rewrite( rview ); impl_patternchain* patternchain_1; impl_idCexpressions* idCexpressions_1; impl_withexpressions* withexpressions_1; impl_Ctext* Ctext_1; impl_foreach_after* foreach_after_1; private: void do_unparse(printer_functor, uview); }; class impl_Ctext_elem_CTextCbody:public impl_Ctext_elem{ public: enum_operators prod_sel() const { return sel_CTextCbody; } explicit impl_Ctext_elem_CTextCbody(Ctext); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Ctext_elem rewrite( rview ); impl_Ctext* Ctext_1; private: void do_unparse(printer_functor, uview); }; class impl_Ctext_elem_CTextCexpressionSQ:public impl_Ctext_elem{ public: enum_operators prod_sel() const { return sel_CTextCexpressionSQ; } explicit impl_Ctext_elem_CTextCexpressionSQ(CexpressionSQ); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Ctext_elem rewrite( rview ); impl_CexpressionSQ* CexpressionSQ_1; private: void do_unparse(printer_functor, uview); }; class impl_Ctext_elem_CTextCexpressionDQ:public impl_Ctext_elem{ public: enum_operators prod_sel() const { return sel_CTextCexpressionDQ; } explicit impl_Ctext_elem_CTextCexpressionDQ(CexpressionDQ); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Ctext_elem rewrite( rview ); impl_CexpressionDQ* CexpressionDQ_1; private: void do_unparse(printer_functor, uview); }; class impl_Ctext_elem_CTextNl:public impl_Ctext_elem{ public: enum_operators prod_sel() const { return sel_CTextNl; } explicit impl_Ctext_elem_CTextNl(integer); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Ctext_elem rewrite( rview ); impl_integer* integer_1; private: void do_unparse(printer_functor, uview); }; class impl_Ctext_elem_CTextDollarVar:public impl_Ctext_elem{ public: enum_operators prod_sel() const { return sel_CTextDollarVar; } explicit impl_Ctext_elem_CTextDollarVar(INT); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Ctext_elem rewrite( rview ); impl_INT* INT_1; private: void do_unparse(printer_functor, uview); }; class impl_Ctext_elem_CTextLine:public impl_Ctext_elem{ public: enum_operators prod_sel() const { return sel_CTextLine; } explicit impl_Ctext_elem_CTextLine(casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); Ctext_elem rewrite( rview ); impl_casestring* casestring_1; private: void do_unparse(printer_functor, uview); }; class impl_foreach_after: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int line; casestring file; foreach_after rewrite(rview) =0; }; class impl_foreach_after_ForeachAfter:public impl_foreach_after{ public: enum_operators prod_sel() const { return sel_ForeachAfter; } explicit impl_foreach_after_ForeachAfter(patternchain, idCexpressions, withexpressions, Ctext); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); foreach_after rewrite( rview ); impl_patternchain* patternchain_1; impl_idCexpressions* idCexpressions_1; impl_withexpressions* withexpressions_1; impl_Ctext* Ctext_1; private: void do_unparse(printer_functor, uview); }; class impl_foreach_after_NoForeachAfter:public impl_foreach_after{ public: enum_operators prod_sel() const { return sel_NoForeachAfter; } explicit impl_foreach_after_NoForeachAfter(); foreach_after rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_contextinfo: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; contextinfo rewrite(rview) =0; }; class impl_contextinfo_NotInForeachContext:public impl_contextinfo{ public: enum_operators prod_sel() const { return sel_NotInForeachContext; } explicit impl_contextinfo_NotInForeachContext(); contextinfo rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_contextinfo_InForeachContext:public impl_contextinfo{ public: enum_operators prod_sel() const { return sel_InForeachContext; } explicit impl_contextinfo_InForeachContext(patternchain); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); contextinfo rewrite( rview ); impl_patternchain* patternchain_1; private: void do_unparse(printer_functor, uview); }; class impl_withexpressions: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; phylumnames type; int line; casestring file; enum_operators prod_sel() const{ return is_nil() ? sel_Nilwithexpressions: sel_Conswithexpressions; } explicit impl_withexpressions(withexpression = 0, withexpressions = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend withexpressions concat(c_withexpressions, c_withexpressions); withexpressions reverse() const; withexpressions rewrite(rview); withexpression last() const; withexpressions append(withexpression); withexpressions map(withexpression (*)(withexpression)); withexpressions filter( bool (*)(withexpression)); withexpressions merge( withexpressions, withexpression (*)(withexpression, withexpression)); withexpression reduce( withexpression, withexpression (*)(withexpression, withexpression)); bool is_nil() const; withexpression withexpression_1; withexpressions withexpressions_1; private: impl_withexpressions* nil_rewrite(rview); impl_withexpressions* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_withexpression: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ID type; int line; casestring file; withexpression rewrite(rview) =0; }; class impl_withexpression_WECexpression:public impl_withexpression{ public: enum_operators prod_sel() const { return sel_WECexpression; } explicit impl_withexpression_WECexpression(Cexpression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); withexpression rewrite( rview ); impl_Cexpression* Cexpression_1; private: void do_unparse(printer_functor, uview); }; class impl_withexpression_WEVariable:public impl_withexpression{ public: enum_operators prod_sel() const { return sel_WEVariable; } explicit impl_withexpression_WEVariable(ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); withexpression rewrite( rview ); impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_withcases: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; withcasesinfo wcinfo; enum_operators prod_sel() const{ return is_nil() ? sel_Nilwithcases: sel_Conswithcases; } explicit impl_withcases(withcase = 0, withcases = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend withcases concat(c_withcases, c_withcases); withcases reverse() const; withcases rewrite(rview); withcase last() const; withcases append(withcase); withcases map(withcase (*)(withcase)); withcases filter( bool (*)(withcase)); withcases merge( withcases, withcase (*)(withcase, withcase)); withcase reduce( withcase, withcase (*)(withcase, withcase)); bool is_nil() const; withcase withcase_1; withcases withcases_1; private: impl_withcases* nil_rewrite(rview); impl_withcases* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_withcase: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; withcasesinfo wcinfo; withcase rewrite(rview) =0; }; class impl_withcase_Withcase:public impl_withcase{ public: enum_operators prod_sel() const { return sel_Withcase; } explicit impl_withcase_Withcase(patternchains, Ctext); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); withcase rewrite( rview ); impl_patternchains* patternchains_1; impl_Ctext* Ctext_1; private: void do_unparse(printer_functor, uview); }; class impl_unparsedeclarations: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilunparsedeclarations: sel_Consunparsedeclarations; } explicit impl_unparsedeclarations(unparsedeclaration = 0, unparsedeclarations = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend unparsedeclarations concat(c_unparsedeclarations, c_unparsedeclarations); unparsedeclarations reverse() const; unparsedeclarations rewrite(rview); unparsedeclaration last() const; unparsedeclarations append(unparsedeclaration); unparsedeclarations map(unparsedeclaration (*)(unparsedeclaration)); unparsedeclarations filter( bool (*)(unparsedeclaration)); unparsedeclarations merge( unparsedeclarations, unparsedeclaration (*)(unparsedeclaration, unparsedeclaration)); unparsedeclaration reduce( unparsedeclaration, unparsedeclaration (*)(unparsedeclaration, unparsedeclaration)); bool is_nil() const; unparsedeclaration unparsedeclaration_1; unparsedeclarations unparsedeclarations_1; private: impl_unparsedeclarations* nil_rewrite(rview); impl_unparsedeclarations* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_unparsedeclaration: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; patternrepresentations patternreps; unparsedeclaration rewrite(rview) =0; }; class impl_unparsedeclaration_UnparseDeclaration:public impl_unparsedeclaration{ public: enum_operators prod_sel() const { return sel_UnparseDeclaration; } explicit impl_unparsedeclaration_UnparseDeclaration(outmostpatterns, unparseclauses); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unparsedeclaration rewrite( rview ); impl_outmostpatterns* outmostpatterns_1; impl_unparseclauses* unparseclauses_1; private: void do_unparse(printer_functor, uview); }; class impl_unparseclauses: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilunparseclauses: sel_Consunparseclauses; } explicit impl_unparseclauses(unparseclause = 0, unparseclauses = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend unparseclauses concat(c_unparseclauses, c_unparseclauses); unparseclauses reverse() const; unparseclauses rewrite(rview); unparseclause last() const; unparseclauses append(unparseclause); unparseclauses map(unparseclause (*)(unparseclause)); unparseclauses filter( bool (*)(unparseclause)); unparseclauses merge( unparseclauses, unparseclause (*)(unparseclause, unparseclause)); unparseclause reduce( unparseclause, unparseclause (*)(unparseclause, unparseclause)); bool is_nil() const; unparseclause unparseclause_1; unparseclauses unparseclauses_1; private: impl_unparseclauses* nil_rewrite(rview); impl_unparseclauses* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_unparseclause: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; unparseclause rewrite(rview) =0; }; class impl_unparseclause_UnparseClause:public impl_unparseclause{ public: enum_operators prod_sel() const { return sel_UnparseClause; } explicit impl_unparseclause_UnparseClause(viewnames, unparseitems); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unparseclause rewrite( rview ); impl_viewnames* viewnames_1; impl_unparseitems* unparseitems_1; private: void do_unparse(printer_functor, uview); }; class impl_viewnames: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; bool is_extern; enum_operators prod_sel() const{ return is_nil() ? sel_Nilviewnames: sel_Consviewnames; } explicit impl_viewnames(ID = 0, viewnames = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend viewnames concat(c_viewnames, c_viewnames); viewnames reverse() const; viewnames rewrite(rview); ID last() const; viewnames append(ID); viewnames map(ID (*)(ID)); viewnames filter( bool (*)(ID)); viewnames merge( viewnames, ID (*)(ID, ID)); ID reduce( ID, ID (*)(ID, ID)); bool is_nil() const; ID ID_1; viewnames viewnames_1; private: impl_viewnames* nil_rewrite(rview); impl_viewnames* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_unparseitems: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilunparseitems: sel_Consunparseitems; } explicit impl_unparseitems(unparseitem = 0, unparseitems = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend unparseitems concat(c_unparseitems, c_unparseitems); unparseitems reverse() const; unparseitems rewrite(rview); unparseitem last() const; unparseitems append(unparseitem); unparseitems map(unparseitem (*)(unparseitem)); unparseitems filter( bool (*)(unparseitem)); unparseitems merge( unparseitems, unparseitem (*)(unparseitem, unparseitem)); unparseitem reduce( unparseitem, unparseitem (*)(unparseitem, unparseitem)); bool is_nil() const; unparseitem unparseitem_1; unparseitems unparseitems_1; private: impl_unparseitems* nil_rewrite(rview); impl_unparseitems* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_unparseitem: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int text_nr; unparseitem rewrite(rview) =0; }; class impl_unparseitem_UViewVarDecl:public impl_unparseitem{ public: enum_operators prod_sel() const { return sel_UViewVarDecl; } explicit impl_unparseitem_UViewVarDecl(ID, ID, Cexpression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unparseitem rewrite( rview ); impl_ID* ID_1; impl_ID* ID_2; impl_Cexpression* Cexpression_1; private: void do_unparse(printer_functor, uview); }; class impl_unparseitem_UnpBody:public impl_unparseitem{ public: enum_operators prod_sel() const { return sel_UnpBody; } explicit impl_unparseitem_UnpBody(languageoption, unparseitems); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unparseitem rewrite( rview ); impl_languageoption* languageoption_1; impl_unparseitems* unparseitems_1; private: void do_unparse(printer_functor, uview); }; class impl_unparseitem_UnpCtext:public impl_unparseitem{ public: enum_operators prod_sel() const { return sel_UnpCtext; } explicit impl_unparseitem_UnpCtext(languageoption, Ctext); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unparseitem rewrite( rview ); impl_languageoption* languageoption_1; impl_Ctext* Ctext_1; private: void do_unparse(printer_functor, uview); }; class impl_unparseitem_UnpSubexpr:public impl_unparseitem{ public: enum_operators prod_sel() const { return sel_UnpSubexpr; } explicit impl_unparseitem_UnpSubexpr(languageoption, unpsubterm, viewnameoption); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unparseitem rewrite( rview ); impl_languageoption* languageoption_1; impl_unpsubterm* unpsubterm_1; impl_viewnameoption* viewnameoption_1; private: void do_unparse(printer_functor, uview); }; class impl_unparseitem_UnpStr:public impl_unparseitem{ public: enum_operators prod_sel() const { return sel_UnpStr; } explicit impl_unparseitem_UnpStr(languageoption, CexpressionDQ, viewnameoption); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unparseitem rewrite( rview ); impl_languageoption* languageoption_1; impl_CexpressionDQ* CexpressionDQ_1; impl_viewnameoption* viewnameoption_1; private: void do_unparse(printer_functor, uview); }; class impl_unpsubterm: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; unpsubterm rewrite(rview) =0; }; class impl_unpsubterm_UnpCastedVariable:public impl_unpsubterm{ public: enum_operators prod_sel() const { return sel_UnpCastedVariable; } explicit impl_unpsubterm_UnpCastedVariable(ID, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unpsubterm rewrite( rview ); impl_ID* ID_1; impl_ID* ID_2; private: void do_unparse(printer_functor, uview); }; class impl_unpsubterm_UnpDollarvarAttr:public impl_unpsubterm{ public: enum_operators prod_sel() const { return sel_UnpDollarvarAttr; } explicit impl_unpsubterm_UnpDollarvarAttr(INT, unpattributes); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unpsubterm rewrite( rview ); impl_INT* INT_1; impl_unpattributes* unpattributes_1; private: void do_unparse(printer_functor, uview); }; class impl_unpsubterm_UnpSubAttr:public impl_unpsubterm{ public: enum_operators prod_sel() const { return sel_UnpSubAttr; } explicit impl_unpsubterm_UnpSubAttr(ID, unpattributes); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unpsubterm rewrite( rview ); impl_ID* ID_1; impl_unpattributes* unpattributes_1; private: void do_unparse(printer_functor, uview); }; class impl_unpsubterm_UnpDollarvarTerm:public impl_unpsubterm{ public: enum_operators prod_sel() const { return sel_UnpDollarvarTerm; } explicit impl_unpsubterm_UnpDollarvarTerm(INT); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unpsubterm rewrite( rview ); impl_INT* INT_1; private: void do_unparse(printer_functor, uview); }; class impl_unpsubterm_UnpSubTerm:public impl_unpsubterm{ public: enum_operators prod_sel() const { return sel_UnpSubTerm; } explicit impl_unpsubterm_UnpSubTerm(ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unpsubterm rewrite( rview ); impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_unpattributes: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilunpattributes: sel_Consunpattributes; } explicit impl_unpattributes(ID = 0, unpattributes = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend unpattributes concat(c_unpattributes, c_unpattributes); unpattributes reverse() const; unpattributes rewrite(rview); ID last() const; unpattributes append(ID); unpattributes map(ID (*)(ID)); unpattributes filter( bool (*)(ID)); unpattributes merge( unpattributes, ID (*)(ID, ID)); ID reduce( ID, ID (*)(ID, ID)); bool is_nil() const; ID ID_1; unpattributes unpattributes_1; private: impl_unpattributes* nil_rewrite(rview); impl_unpattributes* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_viewnameoption: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; viewnameoption rewrite(rview) =0; }; class impl_viewnameoption_YesViewname:public impl_viewnameoption{ public: enum_operators prod_sel() const { return sel_YesViewname; } explicit impl_viewnameoption_YesViewname(ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); viewnameoption rewrite( rview ); impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_viewnameoption_NoViewname:public impl_viewnameoption{ public: enum_operators prod_sel() const { return sel_NoViewname; } explicit impl_viewnameoption_NoViewname(); viewnameoption rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_languageoption: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; languageoption rewrite(rview) =0; }; class impl_languageoption_LanguageList:public impl_languageoption{ public: enum_operators prod_sel() const { return sel_LanguageList; } explicit impl_languageoption_LanguageList(languagenames); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); languageoption rewrite( rview ); impl_languagenames* languagenames_1; private: void do_unparse(printer_functor, uview); }; class impl_languageoption_NoLanguagename:public impl_languageoption{ public: enum_operators prod_sel() const { return sel_NoLanguagename; } explicit impl_languageoption_NoLanguagename(); languageoption rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_languagenames: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nillanguagenames: sel_Conslanguagenames; } explicit impl_languagenames(ID = 0, languagenames = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend languagenames concat(c_languagenames, c_languagenames); languagenames reverse() const; languagenames rewrite(rview); ID last() const; languagenames append(ID); languagenames map(ID (*)(ID)); languagenames filter( bool (*)(ID)); languagenames merge( languagenames, ID (*)(ID, ID)); ID reduce( ID, ID (*)(ID, ID)); bool is_nil() const; ID ID_1; languagenames languagenames_1; private: impl_languagenames* nil_rewrite(rview); impl_languagenames* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_fileline: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; casestring file; int line; fileline rewrite(rview) =0; }; class impl_fileline_PosNoFileLine:public impl_fileline{ public: enum_operators prod_sel() const { return sel_PosNoFileLine; } explicit impl_fileline_PosNoFileLine(); fileline rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_fileline_NoFileLine:public impl_fileline{ public: enum_operators prod_sel() const { return sel_NoFileLine; } explicit impl_fileline_NoFileLine(); fileline rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_fileline_FileLine:public impl_fileline{ public: enum_operators prod_sel() const { return sel_FileLine; } fileline rewrite( rview ); impl_fileline_FileLine(casestring _file=0, int _line=0); private: void do_unparse(printer_functor, uview); }; class impl_scopetypefilelinestack: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilscopetypefilelinestack: sel_Consscopetypefilelinestack; } explicit impl_scopetypefilelinestack(scopetypefileline = 0, scopetypefilelinestack = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend scopetypefilelinestack concat(c_scopetypefilelinestack, c_scopetypefilelinestack); scopetypefilelinestack reverse() const; scopetypefilelinestack rewrite(rview); scopetypefileline last() const; scopetypefilelinestack append(scopetypefileline); scopetypefilelinestack map(scopetypefileline (*)(scopetypefileline)); scopetypefilelinestack filter( bool (*)(scopetypefileline)); scopetypefilelinestack merge( scopetypefilelinestack, scopetypefileline (*)(scopetypefileline, scopetypefileline)); scopetypefileline reduce( scopetypefileline, scopetypefileline (*)(scopetypefileline, scopetypefileline)); bool is_nil() const; scopetypefileline scopetypefileline_1; scopetypefilelinestack scopetypefilelinestack_1; private: impl_scopetypefilelinestack* nil_rewrite(rview); impl_scopetypefilelinestack* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_scopetypefileline: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; scopetypefileline rewrite(rview) =0; }; class impl_scopetypefileline_ScopeTypeFileLine:public impl_scopetypefileline{ public: enum_operators prod_sel() const { return sel_ScopeTypeFileLine; } explicit impl_scopetypefileline_ScopeTypeFileLine(integer, IDtype, casestring, integer); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); scopetypefileline rewrite( rview ); impl_integer* integer_1; impl_IDtype* IDtype_1; impl_casestring* casestring_1; impl_integer* integer_2; private: void do_unparse(printer_functor, uview); }; class impl_IDtype: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; IDtype rewrite(rview) =0; }; class impl_IDtype_ITLanguageName:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITLanguageName; } explicit impl_IDtype_ITLanguageName(integer); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); IDtype rewrite( rview ); impl_integer* integer_1; private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITPatternVariable:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITPatternVariable; } explicit impl_IDtype_ITPatternVariable(ID, integer); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); IDtype rewrite( rview ); impl_ID* ID_1; impl_integer* integer_1; private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITUserFunction:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITUserFunction; } explicit impl_IDtype_ITUserFunction(fnclass); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); IDtype rewrite( rview ); impl_fnclass* fnclass_1; private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITUserRView:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITUserRView; } explicit impl_IDtype_ITUserRView(); IDtype rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITPredefinedRView:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITPredefinedRView; } explicit impl_IDtype_ITPredefinedRView(); IDtype rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITUViewVar:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITUViewVar; } explicit impl_IDtype_ITUViewVar(); IDtype rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITUserUView:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITUserUView; } explicit impl_IDtype_ITUserUView(); IDtype rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITPredefinedUView:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITPredefinedUView; } explicit impl_IDtype_ITPredefinedUView(); IDtype rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITStorageClass:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITStorageClass; } explicit impl_IDtype_ITStorageClass(); IDtype rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITPredefinedStorageClass:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITPredefinedStorageClass; } explicit impl_IDtype_ITPredefinedStorageClass(); IDtype rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITUserOperator:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITUserOperator; } explicit impl_IDtype_ITUserOperator(alternative, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); IDtype rewrite( rview ); impl_alternative* alternative_1; impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITPredefinedOperator:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITPredefinedOperator; } explicit impl_IDtype_ITPredefinedOperator(alternative, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); IDtype rewrite( rview ); impl_alternative* alternative_1; impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITUserPhylum:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITUserPhylum; } explicit impl_IDtype_ITUserPhylum(phylumdeclaration); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); IDtype rewrite( rview ); impl_phylumdeclaration* phylumdeclaration_1; private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITPredefinedPhylum:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITPredefinedPhylum; } explicit impl_IDtype_ITPredefinedPhylum(phylumdeclaration); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); IDtype rewrite( rview ); impl_phylumdeclaration* phylumdeclaration_1; private: void do_unparse(printer_functor, uview); }; class impl_IDtype_ITUnknown:public impl_IDtype{ public: enum_operators prod_sel() const { return sel_ITUnknown; } explicit impl_IDtype_ITUnknown(); IDtype rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_operators: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Niloperators: sel_Consoperators; } explicit impl_operators(ID = 0, operators = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend operators concat(c_operators, c_operators); operators reverse() const; operators rewrite(rview); ID last() const; operators append(ID); operators map(ID (*)(ID)); operators filter( bool (*)(ID)); operators merge( operators, ID (*)(ID, ID)); ID reduce( ID, ID (*)(ID, ID)); bool is_nil() const; ID ID_1; operators operators_1; private: impl_operators* nil_rewrite(rview); impl_operators* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_phyla: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilphyla: sel_Consphyla; } explicit impl_phyla(ID = 0, phyla = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend phyla concat(c_phyla, c_phyla); phyla reverse() const; phyla rewrite(rview); ID last() const; phyla append(ID); phyla map(ID (*)(ID)); phyla filter( bool (*)(ID)); phyla merge( phyla, ID (*)(ID, ID)); ID reduce( ID, ID (*)(ID, ID)); bool is_nil() const; ID ID_1; phyla phyla_1; private: impl_phyla* nil_rewrite(rview); impl_phyla* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_variables: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilvariables: sel_Consvariables; } explicit impl_variables(ID = 0, variables = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend variables concat(c_variables, c_variables); variables reverse() const; variables rewrite(rview); ID last() const; variables append(ID); variables map(ID (*)(ID)); variables filter( bool (*)(ID)); variables merge( variables, ID (*)(ID, ID)); ID reduce( ID, ID (*)(ID, ID)); bool is_nil() const; ID ID_1; variables variables_1; private: impl_variables* nil_rewrite(rview); impl_variables* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_dollarvarstatus: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; dollarvarstatus rewrite(rview) =0; }; class impl_dollarvarstatus_DVDisallowed:public impl_dollarvarstatus{ public: enum_operators prod_sel() const { return sel_DVDisallowed; } explicit impl_dollarvarstatus_DVDisallowed(); dollarvarstatus rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_dollarvarstatus_DVAllowed:public impl_dollarvarstatus{ public: enum_operators prod_sel() const { return sel_DVAllowed; } explicit impl_dollarvarstatus_DVAllowed(); dollarvarstatus rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_tribool: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; tribool rewrite(rview) =0; }; class impl_tribool_Bigger:public impl_tribool{ public: enum_operators prod_sel() const { return sel_Bigger; } explicit impl_tribool_Bigger(); tribool rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_tribool_Smaller:public impl_tribool{ public: enum_operators prod_sel() const { return sel_Smaller; } explicit impl_tribool_Smaller(); tribool rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_tribool_Equal:public impl_tribool{ public: enum_operators prod_sel() const { return sel_Equal; } explicit impl_tribool_Equal(); tribool rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_patternrepresentations: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilpatternrepresentations: sel_Conspatternrepresentations; } explicit impl_patternrepresentations(patternrepresentation = 0, patternrepresentations = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend patternrepresentations concat(c_patternrepresentations, c_patternrepresentations); patternrepresentations reverse() const; patternrepresentations rewrite(rview); patternrepresentation last() const; patternrepresentations append(patternrepresentation); patternrepresentations map(patternrepresentation (*)(patternrepresentation)); patternrepresentations filter( bool (*)(patternrepresentation)); patternrepresentations merge( patternrepresentations, patternrepresentation (*)(patternrepresentation, patternrepresentation)); patternrepresentation reduce( patternrepresentation, patternrepresentation (*)(patternrepresentation, patternrepresentation)); bool is_nil() const; patternrepresentation patternrepresentation_1; patternrepresentations patternrepresentations_1; private: impl_patternrepresentations* nil_rewrite(rview); impl_patternrepresentations* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_patternrepresentation: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilpatternrepresentation: sel_Conspatternrepresentation; } explicit impl_patternrepresentation(elem_patternrepresentation = 0, patternrepresentation = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend patternrepresentation concat(c_patternrepresentation, c_patternrepresentation); patternrepresentation reverse() const; patternrepresentation rewrite(rview); elem_patternrepresentation last() const; patternrepresentation append(elem_patternrepresentation); patternrepresentation map(elem_patternrepresentation (*)(elem_patternrepresentation)); patternrepresentation filter( bool (*)(elem_patternrepresentation)); patternrepresentation merge( patternrepresentation, elem_patternrepresentation (*)(elem_patternrepresentation, elem_patternrepresentation)); elem_patternrepresentation reduce( elem_patternrepresentation, elem_patternrepresentation (*)(elem_patternrepresentation, elem_patternrepresentation)); bool is_nil() const; elem_patternrepresentation elem_patternrepresentation_1; patternrepresentation patternrepresentation_1; private: impl_patternrepresentation* nil_rewrite(rview); impl_patternrepresentation* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_elem_patternrepresentation: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int line; casestring file; ID type; elem_patternrepresentation rewrite(rview) =0; }; class impl_elem_patternrepresentation_PRIntLiteral:public impl_elem_patternrepresentation{ public: enum_operators prod_sel() const { return sel_PRIntLiteral; } explicit impl_elem_patternrepresentation_PRIntLiteral(path, INT); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); elem_patternrepresentation rewrite( rview ); impl_path* path_1; impl_INT* INT_1; private: void do_unparse(printer_functor, uview); }; class impl_elem_patternrepresentation_PRStringLiteral:public impl_elem_patternrepresentation{ public: enum_operators prod_sel() const { return sel_PRStringLiteral; } explicit impl_elem_patternrepresentation_PRStringLiteral(path, CexpressionDQ); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); elem_patternrepresentation rewrite( rview ); impl_path* path_1; impl_CexpressionDQ* CexpressionDQ_1; private: void do_unparse(printer_functor, uview); }; class impl_elem_patternrepresentation_PRDefault:public impl_elem_patternrepresentation{ public: enum_operators prod_sel() const { return sel_PRDefault; } explicit impl_elem_patternrepresentation_PRDefault(); elem_patternrepresentation rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_elem_patternrepresentation_PRWildcard:public impl_elem_patternrepresentation{ public: enum_operators prod_sel() const { return sel_PRWildcard; } explicit impl_elem_patternrepresentation_PRWildcard(path); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); elem_patternrepresentation rewrite( rview ); impl_path* path_1; private: void do_unparse(printer_functor, uview); }; class impl_elem_patternrepresentation_PRNonLeafBinding:public impl_elem_patternrepresentation{ public: enum_operators prod_sel() const { return sel_PRNonLeafBinding; } explicit impl_elem_patternrepresentation_PRNonLeafBinding(path, ID, patternrepresentation); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); elem_patternrepresentation rewrite( rview ); impl_path* path_1; impl_ID* ID_1; impl_patternrepresentation* patternrepresentation_1; private: void do_unparse(printer_functor, uview); }; class impl_elem_patternrepresentation_PRUserPredicate:public impl_elem_patternrepresentation{ public: enum_operators prod_sel() const { return sel_PRUserPredicate; } explicit impl_elem_patternrepresentation_PRUserPredicate(Cexpression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); elem_patternrepresentation rewrite( rview ); impl_Cexpression* Cexpression_1; private: void do_unparse(printer_functor, uview); }; class impl_elem_patternrepresentation_PROperPredicate:public impl_elem_patternrepresentation{ public: enum_operators prod_sel() const { return sel_PROperPredicate; } explicit impl_elem_patternrepresentation_PROperPredicate(path, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); elem_patternrepresentation rewrite( rview ); impl_path* path_1; impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_elem_patternrepresentation_PRVarPredicate:public impl_elem_patternrepresentation{ public: enum_operators prod_sel() const { return sel_PRVarPredicate; } explicit impl_elem_patternrepresentation_PRVarPredicate(paths, ID, patternrepresentation); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); elem_patternrepresentation rewrite( rview ); impl_paths* paths_1; impl_ID* ID_1; impl_patternrepresentation* patternrepresentation_1; private: void do_unparse(printer_functor, uview); }; class impl_elem_patternrepresentation_PRBinding:public impl_elem_patternrepresentation{ public: enum_operators prod_sel() const { return sel_PRBinding; } explicit impl_elem_patternrepresentation_PRBinding(path, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); elem_patternrepresentation rewrite( rview ); impl_path* path_1; impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_path: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; ID op; ID id; enum_operators prod_sel() const{ return is_nil() ? sel_Nilpath: sel_Conspath; } explicit impl_path(integer = 0, path = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend path concat(c_path, c_path); path reverse() const; path rewrite(rview); integer last() const; path append(integer); path map(integer (*)(integer)); path filter( bool (*)(integer)); path merge( path, integer (*)(integer, integer)); integer reduce( integer, integer (*)(integer, integer)); bool is_nil() const; integer integer_1; path path_1; private: impl_path* nil_rewrite(rview); impl_path* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_paths: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilpaths: sel_Conspaths; } explicit impl_paths(path = 0, paths = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend paths concat(c_paths, c_paths); paths reverse() const; paths rewrite(rview); path last() const; paths append(path); paths map(path (*)(path)); paths filter( bool (*)(path)); paths merge( paths, path (*)(path, path)); path reduce( path, path (*)(path, path)); bool is_nil() const; path path_1; paths paths_1; private: impl_paths* nil_rewrite(rview); impl_paths* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_argsnumbers: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilargsnumbers: sel_Consargsnumbers; } explicit impl_argsnumbers(integer = 0, argsnumbers = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend argsnumbers concat(c_argsnumbers, c_argsnumbers); argsnumbers reverse() const; argsnumbers rewrite(rview); integer last() const; argsnumbers append(integer); argsnumbers map(integer (*)(integer)); argsnumbers filter( bool (*)(integer)); argsnumbers merge( argsnumbers, integer (*)(integer, integer)); integer reduce( integer, integer (*)(integer, integer)); bool is_nil() const; integer integer_1; argsnumbers argsnumbers_1; private: impl_argsnumbers* nil_rewrite(rview); impl_argsnumbers* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_rewriterulesinfo: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilrewriterulesinfo: sel_Consrewriterulesinfo; } explicit impl_rewriterulesinfo(rewriteruleinfo = 0, rewriterulesinfo = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend rewriterulesinfo concat(c_rewriterulesinfo, c_rewriterulesinfo); rewriterulesinfo reverse() const; rewriterulesinfo rewrite(rview); rewriteruleinfo last() const; rewriterulesinfo append(rewriteruleinfo); rewriterulesinfo map(rewriteruleinfo (*)(rewriteruleinfo)); rewriterulesinfo filter( bool (*)(rewriteruleinfo)); rewriterulesinfo merge( rewriterulesinfo, rewriteruleinfo (*)(rewriteruleinfo, rewriteruleinfo)); rewriteruleinfo reduce( rewriteruleinfo, rewriteruleinfo (*)(rewriteruleinfo, rewriteruleinfo)); bool is_nil() const; rewriteruleinfo rewriteruleinfo_1; rewriterulesinfo rewriterulesinfo_1; private: impl_rewriterulesinfo* nil_rewrite(rview); impl_rewriterulesinfo* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_rewriteruleinfo: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; rewriteruleinfo rewrite(rview) =0; }; class impl_rewriteruleinfo_Rewriteruleinfo:public impl_rewriteruleinfo{ public: enum_operators prod_sel() const { return sel_Rewriteruleinfo; } explicit impl_rewriteruleinfo_Rewriteruleinfo(patternrepresentation, patternrepresentation, rewriteclause); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); rewriteruleinfo rewrite( rview ); impl_patternrepresentation* patternrepresentation_1; impl_patternrepresentation* patternrepresentation_2; impl_rewriteclause* rewriteclause_1; private: void do_unparse(printer_functor, uview); }; class impl_withcasesinfo: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilwithcasesinfo: sel_Conswithcasesinfo; } explicit impl_withcasesinfo(withcaseinfo = 0, withcasesinfo = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend withcasesinfo concat(c_withcasesinfo, c_withcasesinfo); withcasesinfo reverse() const; withcasesinfo rewrite(rview); withcaseinfo last() const; withcasesinfo append(withcaseinfo); withcasesinfo map(withcaseinfo (*)(withcaseinfo)); withcasesinfo filter( bool (*)(withcaseinfo)); withcasesinfo merge( withcasesinfo, withcaseinfo (*)(withcaseinfo, withcaseinfo)); withcaseinfo reduce( withcaseinfo, withcaseinfo (*)(withcaseinfo, withcaseinfo)); bool is_nil() const; withcaseinfo withcaseinfo_1; withcasesinfo withcasesinfo_1; private: impl_withcasesinfo* nil_rewrite(rview); impl_withcasesinfo* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_withcaseinfo: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; withcaseinfo rewrite(rview) =0; }; class impl_withcaseinfo_Withcaseinfo:public impl_withcaseinfo{ public: enum_operators prod_sel() const { return sel_Withcaseinfo; } explicit impl_withcaseinfo_Withcaseinfo(patternrepresentation, patternrepresentation, Ctext); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); withcaseinfo rewrite( rview ); impl_patternrepresentation* patternrepresentation_1; impl_patternrepresentation* patternrepresentation_2; impl_Ctext* Ctext_1; private: void do_unparse(printer_functor, uview); }; class impl_rewriteviewsinfo: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilrewriteviewsinfo: sel_Consrewriteviewsinfo; } explicit impl_rewriteviewsinfo(rewriteviewinfo = 0, rewriteviewsinfo = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend rewriteviewsinfo concat(c_rewriteviewsinfo, c_rewriteviewsinfo); rewriteviewsinfo reverse() const; rewriteviewsinfo rewrite(rview); rewriteviewinfo last() const; rewriteviewsinfo append(rewriteviewinfo); rewriteviewsinfo map(rewriteviewinfo (*)(rewriteviewinfo)); rewriteviewsinfo filter( bool (*)(rewriteviewinfo)); rewriteviewsinfo merge( rewriteviewsinfo, rewriteviewinfo (*)(rewriteviewinfo, rewriteviewinfo)); rewriteviewinfo reduce( rewriteviewinfo, rewriteviewinfo (*)(rewriteviewinfo, rewriteviewinfo)); bool is_nil() const; rewriteviewinfo rewriteviewinfo_1; rewriteviewsinfo rewriteviewsinfo_1; private: impl_rewriteviewsinfo* nil_rewrite(rview); impl_rewriteviewsinfo* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_rewriteviewinfo: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; rewriteviewinfo rewrite(rview) =0; }; class impl_rewriteviewinfo_Rewriteviewinfo:public impl_rewriteviewinfo{ public: enum_operators prod_sel() const { return sel_Rewriteviewinfo; } explicit impl_rewriteviewinfo_Rewriteviewinfo(ID, rewriterulesinfo); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); rewriteviewinfo rewrite( rview ); impl_ID* ID_1; impl_rewriterulesinfo* rewriterulesinfo_1; private: void do_unparse(printer_functor, uview); }; class impl_unparseviewsinfo: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilunparseviewsinfo: sel_Consunparseviewsinfo; } explicit impl_unparseviewsinfo(unparseviewinfo = 0, unparseviewsinfo = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend unparseviewsinfo concat(c_unparseviewsinfo, c_unparseviewsinfo); unparseviewsinfo reverse() const; unparseviewsinfo rewrite(rview); unparseviewinfo last() const; unparseviewsinfo append(unparseviewinfo); unparseviewsinfo map(unparseviewinfo (*)(unparseviewinfo)); unparseviewsinfo filter( bool (*)(unparseviewinfo)); unparseviewsinfo merge( unparseviewsinfo, unparseviewinfo (*)(unparseviewinfo, unparseviewinfo)); unparseviewinfo reduce( unparseviewinfo, unparseviewinfo (*)(unparseviewinfo, unparseviewinfo)); bool is_nil() const; unparseviewinfo unparseviewinfo_1; unparseviewsinfo unparseviewsinfo_1; private: impl_unparseviewsinfo* nil_rewrite(rview); impl_unparseviewsinfo* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_unparseviewinfo: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; unparseviewinfo rewrite(rview) =0; }; class impl_unparseviewinfo_Unparseviewinfo:public impl_unparseviewinfo{ public: enum_operators prod_sel() const { return sel_Unparseviewinfo; } explicit impl_unparseviewinfo_Unparseviewinfo(ID, unparsedeclsinfo); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unparseviewinfo rewrite( rview ); impl_ID* ID_1; impl_unparsedeclsinfo* unparsedeclsinfo_1; private: void do_unparse(printer_functor, uview); }; class impl_unparsedeclsinfo: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilunparsedeclsinfo: sel_Consunparsedeclsinfo; } explicit impl_unparsedeclsinfo(unparsedeclinfo = 0, unparsedeclsinfo = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend unparsedeclsinfo concat(c_unparsedeclsinfo, c_unparsedeclsinfo); unparsedeclsinfo reverse() const; unparsedeclsinfo rewrite(rview); unparsedeclinfo last() const; unparsedeclsinfo append(unparsedeclinfo); unparsedeclsinfo map(unparsedeclinfo (*)(unparsedeclinfo)); unparsedeclsinfo filter( bool (*)(unparsedeclinfo)); unparsedeclsinfo merge( unparsedeclsinfo, unparsedeclinfo (*)(unparsedeclinfo, unparsedeclinfo)); unparsedeclinfo reduce( unparsedeclinfo, unparsedeclinfo (*)(unparsedeclinfo, unparsedeclinfo)); bool is_nil() const; unparsedeclinfo unparsedeclinfo_1; unparsedeclsinfo unparsedeclsinfo_1; private: impl_unparsedeclsinfo* nil_rewrite(rview); impl_unparsedeclsinfo* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_unparsedeclinfo: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; unparsedeclinfo rewrite(rview) =0; }; class impl_unparsedeclinfo_Unparsedeclinfo:public impl_unparsedeclinfo{ public: enum_operators prod_sel() const { return sel_Unparsedeclinfo; } explicit impl_unparsedeclinfo_Unparsedeclinfo(patternrepresentation, patternrepresentation, unparseclause); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); unparsedeclinfo rewrite( rview ); impl_patternrepresentation* patternrepresentation_1; impl_patternrepresentation* patternrepresentation_2; impl_unparseclause* unparseclause_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_declaration: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_declaration rewrite(rview) =0; }; class impl_ac_declaration_AcDeclaration:public impl_ac_declaration{ public: enum_operators prod_sel() const { return sel_AcDeclaration; } explicit impl_ac_declaration_AcDeclaration(ac_declaration_specifiers, ac_init_declarator_list); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_declaration rewrite( rview ); impl_ac_declaration_specifiers* ac_declaration_specifiers_1; impl_ac_init_declarator_list* ac_init_declarator_list_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_declaration_list: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilac_declaration_list: sel_Consac_declaration_list; } explicit impl_ac_declaration_list(ac_declaration = 0, ac_declaration_list = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend ac_declaration_list concat(c_ac_declaration_list, c_ac_declaration_list); ac_declaration_list reverse() const; ac_declaration_list rewrite(rview); ac_declaration last() const; ac_declaration_list append(ac_declaration); ac_declaration_list map(ac_declaration (*)(ac_declaration)); ac_declaration_list filter( bool (*)(ac_declaration)); ac_declaration_list merge( ac_declaration_list, ac_declaration (*)(ac_declaration, ac_declaration)); ac_declaration reduce( ac_declaration, ac_declaration (*)(ac_declaration, ac_declaration)); bool is_nil() const; ac_declaration ac_declaration_1; ac_declaration_list ac_declaration_list_1; private: impl_ac_declaration_list* nil_rewrite(rview); impl_ac_declaration_list* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_ac_declaration_specifiers: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilac_declaration_specifiers: sel_Consac_declaration_specifiers; } explicit impl_ac_declaration_specifiers(ac_declaration_specifier = 0, ac_declaration_specifiers = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend ac_declaration_specifiers concat(c_ac_declaration_specifiers, c_ac_declaration_specifiers); ac_declaration_specifiers reverse() const; ac_declaration_specifiers rewrite(rview); ac_declaration_specifier last() const; ac_declaration_specifiers append(ac_declaration_specifier); ac_declaration_specifiers map(ac_declaration_specifier (*)(ac_declaration_specifier)); ac_declaration_specifiers filter( bool (*)(ac_declaration_specifier)); ac_declaration_specifiers merge( ac_declaration_specifiers, ac_declaration_specifier (*)(ac_declaration_specifier, ac_declaration_specifier)); ac_declaration_specifier reduce( ac_declaration_specifier, ac_declaration_specifier (*)(ac_declaration_specifier, ac_declaration_specifier)); bool is_nil() const; ac_declaration_specifier ac_declaration_specifier_1; ac_declaration_specifiers ac_declaration_specifiers_1; private: impl_ac_declaration_specifiers* nil_rewrite(rview); impl_ac_declaration_specifiers* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_ac_declaration_specifier: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_declaration_specifier rewrite(rview) =0; }; class impl_ac_declaration_specifier_AcDeclSpecTypeQual:public impl_ac_declaration_specifier{ public: enum_operators prod_sel() const { return sel_AcDeclSpecTypeQual; } explicit impl_ac_declaration_specifier_AcDeclSpecTypeQual(ac_type_qualifier); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_declaration_specifier rewrite( rview ); impl_ac_type_qualifier* ac_type_qualifier_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_declaration_specifier_AcDeclSpecTypeSpec:public impl_ac_declaration_specifier{ public: enum_operators prod_sel() const { return sel_AcDeclSpecTypeSpec; } explicit impl_ac_declaration_specifier_AcDeclSpecTypeSpec(ac_type_specifier); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_declaration_specifier rewrite( rview ); impl_ac_type_specifier* ac_type_specifier_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_declaration_specifier_AcDeclSpecStorageSpec:public impl_ac_declaration_specifier{ public: enum_operators prod_sel() const { return sel_AcDeclSpecStorageSpec; } explicit impl_ac_declaration_specifier_AcDeclSpecStorageSpec(ac_storage_class_specifier); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_declaration_specifier rewrite( rview ); impl_ac_storage_class_specifier* ac_storage_class_specifier_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_storage_class_specifier: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_storage_class_specifier rewrite(rview) =0; }; class impl_ac_storage_class_specifier_AcVirtual:public impl_ac_storage_class_specifier{ public: enum_operators prod_sel() const { return sel_AcVirtual; } explicit impl_ac_storage_class_specifier_AcVirtual(); ac_storage_class_specifier rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_storage_class_specifier_AcTypedef:public impl_ac_storage_class_specifier{ public: enum_operators prod_sel() const { return sel_AcTypedef; } explicit impl_ac_storage_class_specifier_AcTypedef(); ac_storage_class_specifier rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_storage_class_specifier_AcExtern:public impl_ac_storage_class_specifier{ public: enum_operators prod_sel() const { return sel_AcExtern; } explicit impl_ac_storage_class_specifier_AcExtern(); ac_storage_class_specifier rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_storage_class_specifier_AcStatic:public impl_ac_storage_class_specifier{ public: enum_operators prod_sel() const { return sel_AcStatic; } explicit impl_ac_storage_class_specifier_AcStatic(); ac_storage_class_specifier rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_storage_class_specifier_AcRegister:public impl_ac_storage_class_specifier{ public: enum_operators prod_sel() const { return sel_AcRegister; } explicit impl_ac_storage_class_specifier_AcRegister(); ac_storage_class_specifier rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_storage_class_specifier_AcAuto:public impl_ac_storage_class_specifier{ public: enum_operators prod_sel() const { return sel_AcAuto; } explicit impl_ac_storage_class_specifier_AcAuto(); ac_storage_class_specifier rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_type_specifier: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_type_specifier rewrite(rview) =0; }; class impl_ac_type_specifier_AcTypeSpec:public impl_ac_type_specifier{ public: enum_operators prod_sel() const { return sel_AcTypeSpec; } explicit impl_ac_type_specifier_AcTypeSpec(ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_type_specifier rewrite( rview ); impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_type_qualifier: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_type_qualifier rewrite(rview) =0; }; class impl_ac_type_qualifier_AcNoQualifier:public impl_ac_type_qualifier{ public: enum_operators prod_sel() const { return sel_AcNoQualifier; } explicit impl_ac_type_qualifier_AcNoQualifier(); ac_type_qualifier rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_type_qualifier_AcUnsigned:public impl_ac_type_qualifier{ public: enum_operators prod_sel() const { return sel_AcUnsigned; } explicit impl_ac_type_qualifier_AcUnsigned(); ac_type_qualifier rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_type_qualifier_AcVolatile:public impl_ac_type_qualifier{ public: enum_operators prod_sel() const { return sel_AcVolatile; } explicit impl_ac_type_qualifier_AcVolatile(); ac_type_qualifier rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_type_qualifier_AcConst:public impl_ac_type_qualifier{ public: enum_operators prod_sel() const { return sel_AcConst; } explicit impl_ac_type_qualifier_AcConst(); ac_type_qualifier rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_init_declarator_list: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilac_init_declarator_list: sel_Consac_init_declarator_list; } explicit impl_ac_init_declarator_list(ac_init_declarator = 0, ac_init_declarator_list = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend ac_init_declarator_list concat(c_ac_init_declarator_list, c_ac_init_declarator_list); ac_init_declarator_list reverse() const; ac_init_declarator_list rewrite(rview); ac_init_declarator last() const; ac_init_declarator_list append(ac_init_declarator); ac_init_declarator_list map(ac_init_declarator (*)(ac_init_declarator)); ac_init_declarator_list filter( bool (*)(ac_init_declarator)); ac_init_declarator_list merge( ac_init_declarator_list, ac_init_declarator (*)(ac_init_declarator, ac_init_declarator)); ac_init_declarator reduce( ac_init_declarator, ac_init_declarator (*)(ac_init_declarator, ac_init_declarator)); bool is_nil() const; ac_init_declarator ac_init_declarator_1; ac_init_declarator_list ac_init_declarator_list_1; private: impl_ac_init_declarator_list* nil_rewrite(rview); impl_ac_init_declarator_list* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_ac_init_declarator: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_init_declarator rewrite(rview) =0; }; class impl_ac_init_declarator_AcInitDecl:public impl_ac_init_declarator{ public: enum_operators prod_sel() const { return sel_AcInitDecl; } explicit impl_ac_init_declarator_AcInitDecl(ac_declarator); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_init_declarator rewrite( rview ); impl_ac_declarator* ac_declarator_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_declarator: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_declarator rewrite(rview) =0; }; class impl_ac_declarator_AcDeclarator:public impl_ac_declarator{ public: enum_operators prod_sel() const { return sel_AcDeclarator; } explicit impl_ac_declarator_AcDeclarator(ac_pointer_option, ac_ref_option, ac_direct_declarator); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_declarator rewrite( rview ); impl_ac_pointer_option* ac_pointer_option_1; impl_ac_ref_option* ac_ref_option_1; impl_ac_direct_declarator* ac_direct_declarator_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_direct_declarator: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_direct_declarator rewrite(rview) =0; }; class impl_ac_direct_declarator_AcOperatorDeclId:public impl_ac_direct_declarator{ public: enum_operators prod_sel() const { return sel_AcOperatorDeclId; } explicit impl_ac_direct_declarator_AcOperatorDeclId(ac_operator_name); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_direct_declarator rewrite( rview ); impl_ac_operator_name* ac_operator_name_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_direct_declarator_AcConvOperatorDecl:public impl_ac_direct_declarator{ public: enum_operators prod_sel() const { return sel_AcConvOperatorDecl; } explicit impl_ac_direct_declarator_AcConvOperatorDecl(ID, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_direct_declarator rewrite( rview ); impl_ID* ID_1; impl_ID* ID_2; private: void do_unparse(printer_functor, uview); }; class impl_ac_direct_declarator_AcMemberDecl:public impl_ac_direct_declarator{ public: enum_operators prod_sel() const { return sel_AcMemberDecl; } explicit impl_ac_direct_declarator_AcMemberDecl(ID, ID, ac_constant_expression_list); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_direct_declarator rewrite( rview ); impl_ID* ID_1; impl_ID* ID_2; impl_ac_constant_expression_list* ac_constant_expression_list_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_direct_declarator_AcQualifiedDeclProto:public impl_ac_direct_declarator{ public: enum_operators prod_sel() const { return sel_AcQualifiedDeclProto; } explicit impl_ac_direct_declarator_AcQualifiedDeclProto(ac_class_qualifier_list, ac_direct_declarator, ac_parameter_type_list, ac_type_qualifier); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_direct_declarator rewrite( rview ); impl_ac_class_qualifier_list* ac_class_qualifier_list_1; impl_ac_direct_declarator* ac_direct_declarator_1; impl_ac_parameter_type_list* ac_parameter_type_list_1; impl_ac_type_qualifier* ac_type_qualifier_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_direct_declarator_AcDirectDeclProto:public impl_ac_direct_declarator{ public: enum_operators prod_sel() const { return sel_AcDirectDeclProto; } explicit impl_ac_direct_declarator_AcDirectDeclProto(ac_direct_declarator, ac_parameter_type_list); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_direct_declarator rewrite( rview ); impl_ac_direct_declarator* ac_direct_declarator_1; impl_ac_parameter_type_list* ac_parameter_type_list_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_direct_declarator_AcDirectDeclArray:public impl_ac_direct_declarator{ public: enum_operators prod_sel() const { return sel_AcDirectDeclArray; } explicit impl_ac_direct_declarator_AcDirectDeclArray(ac_direct_declarator, ac_constant_expression_option); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_direct_declarator rewrite( rview ); impl_ac_direct_declarator* ac_direct_declarator_1; impl_ac_constant_expression_option* ac_constant_expression_option_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_direct_declarator_AcDirectDeclPack:public impl_ac_direct_declarator{ public: enum_operators prod_sel() const { return sel_AcDirectDeclPack; } explicit impl_ac_direct_declarator_AcDirectDeclPack(ac_declarator); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_direct_declarator rewrite( rview ); impl_ac_declarator* ac_declarator_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_direct_declarator_AcDirectDeclId:public impl_ac_direct_declarator{ public: enum_operators prod_sel() const { return sel_AcDirectDeclId; } explicit impl_ac_direct_declarator_AcDirectDeclId(ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_direct_declarator rewrite( rview ); impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_pointer_option: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_pointer_option rewrite(rview) =0; }; class impl_ac_pointer_option_Yespointer:public impl_ac_pointer_option{ public: enum_operators prod_sel() const { return sel_Yespointer; } explicit impl_ac_pointer_option_Yespointer(ac_pointer); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_pointer_option rewrite( rview ); impl_ac_pointer* ac_pointer_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_pointer_option_Nopointer:public impl_ac_pointer_option{ public: enum_operators prod_sel() const { return sel_Nopointer; } explicit impl_ac_pointer_option_Nopointer(); ac_pointer_option rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_pointer: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_pointer rewrite(rview) =0; }; class impl_ac_pointer_AcPointerCons:public impl_ac_pointer{ public: enum_operators prod_sel() const { return sel_AcPointerCons; } explicit impl_ac_pointer_AcPointerCons(ac_type_qualifier_list, ac_pointer); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_pointer rewrite( rview ); impl_ac_type_qualifier_list* ac_type_qualifier_list_1; impl_ac_pointer* ac_pointer_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_pointer_AcPointerNil:public impl_ac_pointer{ public: enum_operators prod_sel() const { return sel_AcPointerNil; } explicit impl_ac_pointer_AcPointerNil(ac_type_qualifier_list); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_pointer rewrite( rview ); impl_ac_type_qualifier_list* ac_type_qualifier_list_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_ref_option: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_ref_option rewrite(rview) =0; }; class impl_ac_ref_option_AcRef:public impl_ac_ref_option{ public: enum_operators prod_sel() const { return sel_AcRef; } explicit impl_ac_ref_option_AcRef(); ac_ref_option rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_ref_option_AcNoRef:public impl_ac_ref_option{ public: enum_operators prod_sel() const { return sel_AcNoRef; } explicit impl_ac_ref_option_AcNoRef(); ac_ref_option rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_operator_name: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int line; casestring file; ac_operator_name rewrite(rview) =0; }; class impl_ac_operator_name_AcOperatorName:public impl_ac_operator_name{ public: enum_operators prod_sel() const { return sel_AcOperatorName; } explicit impl_ac_operator_name_AcOperatorName(casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_operator_name rewrite( rview ); impl_casestring* casestring_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_class_qualifier_help_list: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilac_class_qualifier_help_list: sel_Consac_class_qualifier_help_list; } explicit impl_ac_class_qualifier_help_list(ac_direct_declarator = 0, ac_class_qualifier_help_list = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend ac_class_qualifier_help_list concat(c_ac_class_qualifier_help_list, c_ac_class_qualifier_help_list); ac_class_qualifier_help_list reverse() const; ac_class_qualifier_help_list rewrite(rview); ac_direct_declarator last() const; ac_class_qualifier_help_list append(ac_direct_declarator); ac_class_qualifier_help_list map(ac_direct_declarator (*)(ac_direct_declarator)); ac_class_qualifier_help_list filter( bool (*)(ac_direct_declarator)); ac_class_qualifier_help_list merge( ac_class_qualifier_help_list, ac_direct_declarator (*)(ac_direct_declarator, ac_direct_declarator)); ac_direct_declarator reduce( ac_direct_declarator, ac_direct_declarator (*)(ac_direct_declarator, ac_direct_declarator)); bool is_nil() const; ac_direct_declarator ac_direct_declarator_1; ac_class_qualifier_help_list ac_class_qualifier_help_list_1; private: impl_ac_class_qualifier_help_list* nil_rewrite(rview); impl_ac_class_qualifier_help_list* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_ac_class_qualifier_list: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilac_class_qualifier_list: sel_Consac_class_qualifier_list; } explicit impl_ac_class_qualifier_list(ID = 0, ac_class_qualifier_list = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend ac_class_qualifier_list concat(c_ac_class_qualifier_list, c_ac_class_qualifier_list); ac_class_qualifier_list reverse() const; ac_class_qualifier_list rewrite(rview); ID last() const; ac_class_qualifier_list append(ID); ac_class_qualifier_list map(ID (*)(ID)); ac_class_qualifier_list filter( bool (*)(ID)); ac_class_qualifier_list merge( ac_class_qualifier_list, ID (*)(ID, ID)); ID reduce( ID, ID (*)(ID, ID)); bool is_nil() const; ID ID_1; ac_class_qualifier_list ac_class_qualifier_list_1; private: impl_ac_class_qualifier_list* nil_rewrite(rview); impl_ac_class_qualifier_list* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_ac_type_qualifier_list: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilac_type_qualifier_list: sel_Consac_type_qualifier_list; } explicit impl_ac_type_qualifier_list(ac_type_qualifier = 0, ac_type_qualifier_list = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend ac_type_qualifier_list concat(c_ac_type_qualifier_list, c_ac_type_qualifier_list); ac_type_qualifier_list reverse() const; ac_type_qualifier_list rewrite(rview); ac_type_qualifier last() const; ac_type_qualifier_list append(ac_type_qualifier); ac_type_qualifier_list map(ac_type_qualifier (*)(ac_type_qualifier)); ac_type_qualifier_list filter( bool (*)(ac_type_qualifier)); ac_type_qualifier_list merge( ac_type_qualifier_list, ac_type_qualifier (*)(ac_type_qualifier, ac_type_qualifier)); ac_type_qualifier reduce( ac_type_qualifier, ac_type_qualifier (*)(ac_type_qualifier, ac_type_qualifier)); bool is_nil() const; ac_type_qualifier ac_type_qualifier_1; ac_type_qualifier_list ac_type_qualifier_list_1; private: impl_ac_type_qualifier_list* nil_rewrite(rview); impl_ac_type_qualifier_list* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_ac_parameter_type_list: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_parameter_type_list rewrite(rview) =0; }; class impl_ac_parameter_type_list_AcParList3Dot:public impl_ac_parameter_type_list{ public: enum_operators prod_sel() const { return sel_AcParList3Dot; } explicit impl_ac_parameter_type_list_AcParList3Dot(ac_parameter_list); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_parameter_type_list rewrite( rview ); impl_ac_parameter_list* ac_parameter_list_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_parameter_type_list_AcParList:public impl_ac_parameter_type_list{ public: enum_operators prod_sel() const { return sel_AcParList; } explicit impl_ac_parameter_type_list_AcParList(ac_parameter_list); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_parameter_type_list rewrite( rview ); impl_ac_parameter_list* ac_parameter_list_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_parameter_list: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilac_parameter_list: sel_Consac_parameter_list; } explicit impl_ac_parameter_list(ac_parameter_declaration = 0, ac_parameter_list = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend ac_parameter_list concat(c_ac_parameter_list, c_ac_parameter_list); ac_parameter_list reverse() const; ac_parameter_list rewrite(rview); ac_parameter_declaration last() const; ac_parameter_list append(ac_parameter_declaration); ac_parameter_list map(ac_parameter_declaration (*)(ac_parameter_declaration)); ac_parameter_list filter( bool (*)(ac_parameter_declaration)); ac_parameter_list merge( ac_parameter_list, ac_parameter_declaration (*)(ac_parameter_declaration, ac_parameter_declaration)); ac_parameter_declaration reduce( ac_parameter_declaration, ac_parameter_declaration (*)(ac_parameter_declaration, ac_parameter_declaration)); bool is_nil() const; ac_parameter_declaration ac_parameter_declaration_1; ac_parameter_list ac_parameter_list_1; private: impl_ac_parameter_list* nil_rewrite(rview); impl_ac_parameter_list* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_ac_parameter_declaration: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_parameter_declaration rewrite(rview) =0; }; class impl_ac_parameter_declaration_AcParDeclAbsdecl:public impl_ac_parameter_declaration{ public: enum_operators prod_sel() const { return sel_AcParDeclAbsdecl; } explicit impl_ac_parameter_declaration_AcParDeclAbsdecl(ac_declaration_specifiers, ac_abstract_declarator, ac_constant_expression_option); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_parameter_declaration rewrite( rview ); impl_ac_declaration_specifiers* ac_declaration_specifiers_1; impl_ac_abstract_declarator* ac_abstract_declarator_1; impl_ac_constant_expression_option* ac_constant_expression_option_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_parameter_declaration_AcParDeclDecl:public impl_ac_parameter_declaration{ public: enum_operators prod_sel() const { return sel_AcParDeclDecl; } explicit impl_ac_parameter_declaration_AcParDeclDecl(ac_declaration_specifiers, ac_declarator, ac_constant_expression_option); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_parameter_declaration rewrite( rview ); impl_ac_declaration_specifiers* ac_declaration_specifiers_1; impl_ac_declarator* ac_declarator_1; impl_ac_constant_expression_option* ac_constant_expression_option_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_identifier_list: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilac_identifier_list: sel_Consac_identifier_list; } explicit impl_ac_identifier_list(ID = 0, ac_identifier_list = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend ac_identifier_list concat(c_ac_identifier_list, c_ac_identifier_list); ac_identifier_list reverse() const; ac_identifier_list rewrite(rview); ID last() const; ac_identifier_list append(ID); ac_identifier_list map(ID (*)(ID)); ac_identifier_list filter( bool (*)(ID)); ac_identifier_list merge( ac_identifier_list, ID (*)(ID, ID)); ID reduce( ID, ID (*)(ID, ID)); bool is_nil() const; ID ID_1; ac_identifier_list ac_identifier_list_1; private: impl_ac_identifier_list* nil_rewrite(rview); impl_ac_identifier_list* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_ac_abstract_declarator: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_abstract_declarator rewrite(rview) =0; }; class impl_ac_abstract_declarator_AcAbsdeclDirdecl:public impl_ac_abstract_declarator{ public: enum_operators prod_sel() const { return sel_AcAbsdeclDirdecl; } explicit impl_ac_abstract_declarator_AcAbsdeclDirdecl(ac_pointer_option, ac_direct_abstract_declarator); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_abstract_declarator rewrite( rview ); impl_ac_pointer_option* ac_pointer_option_1; impl_ac_direct_abstract_declarator* ac_direct_abstract_declarator_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_abstract_declarator_AcAbsdeclPointer:public impl_ac_abstract_declarator{ public: enum_operators prod_sel() const { return sel_AcAbsdeclPointer; } explicit impl_ac_abstract_declarator_AcAbsdeclPointer(ac_pointer); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_abstract_declarator rewrite( rview ); impl_ac_pointer* ac_pointer_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_direct_abstract_declarator_option: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_direct_abstract_declarator_option rewrite(rview) =0; }; class impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator:public impl_ac_direct_abstract_declarator_option{ public: enum_operators prod_sel() const { return sel_Yesac_direct_abstract_declarator; } explicit impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator(ac_direct_abstract_declarator); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_direct_abstract_declarator_option rewrite( rview ); impl_ac_direct_abstract_declarator* ac_direct_abstract_declarator_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_direct_abstract_declarator_option_Noac_direct_abstract_declarator:public impl_ac_direct_abstract_declarator_option{ public: enum_operators prod_sel() const { return sel_Noac_direct_abstract_declarator; } explicit impl_ac_direct_abstract_declarator_option_Noac_direct_abstract_declarator(); ac_direct_abstract_declarator_option rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_direct_abstract_declarator: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_direct_abstract_declarator rewrite(rview) =0; }; class impl_ac_direct_abstract_declarator_AcDirAbsdeclFn:public impl_ac_direct_abstract_declarator{ public: enum_operators prod_sel() const { return sel_AcDirAbsdeclFn; } explicit impl_ac_direct_abstract_declarator_AcDirAbsdeclFn(ac_direct_abstract_declarator_option, ac_parameter_type_list); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_direct_abstract_declarator rewrite( rview ); impl_ac_direct_abstract_declarator_option* ac_direct_abstract_declarator_option_1; impl_ac_parameter_type_list* ac_parameter_type_list_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_direct_abstract_declarator_AcDirAbsdeclArray:public impl_ac_direct_abstract_declarator{ public: enum_operators prod_sel() const { return sel_AcDirAbsdeclArray; } explicit impl_ac_direct_abstract_declarator_AcDirAbsdeclArray(ac_direct_abstract_declarator_option, ac_constant_expression_option); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_direct_abstract_declarator rewrite( rview ); impl_ac_direct_abstract_declarator_option* ac_direct_abstract_declarator_option_1; impl_ac_constant_expression_option* ac_constant_expression_option_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_direct_abstract_declarator_AcDirAbsdeclPack:public impl_ac_direct_abstract_declarator{ public: enum_operators prod_sel() const { return sel_AcDirAbsdeclPack; } explicit impl_ac_direct_abstract_declarator_AcDirAbsdeclPack(ac_abstract_declarator); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_direct_abstract_declarator rewrite( rview ); impl_ac_abstract_declarator* ac_abstract_declarator_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_constant_expression_option: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_constant_expression_option rewrite(rview) =0; }; class impl_ac_constant_expression_option_Noac_constant_expression:public impl_ac_constant_expression_option{ public: enum_operators prod_sel() const { return sel_Noac_constant_expression; } explicit impl_ac_constant_expression_option_Noac_constant_expression(); ac_constant_expression_option rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_constant_expression_option_Yesac_constant_expression:public impl_ac_constant_expression_option{ public: enum_operators prod_sel() const { return sel_Yesac_constant_expression; } explicit impl_ac_constant_expression_option_Yesac_constant_expression(ac_constant_expression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_constant_expression_option rewrite( rview ); impl_ac_constant_expression* ac_constant_expression_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_constant_expression: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_constant_expression rewrite(rview) =0; }; class impl_ac_constant_expression_AcConstExpr:public impl_ac_constant_expression{ public: enum_operators prod_sel() const { return sel_AcConstExpr; } explicit impl_ac_constant_expression_AcConstExpr(Cexpression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_constant_expression rewrite( rview ); impl_Cexpression* Cexpression_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_constant_expression_list: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilac_constant_expression_list: sel_Consac_constant_expression_list; } explicit impl_ac_constant_expression_list(ac_constant_expression = 0, ac_constant_expression_list = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend ac_constant_expression_list concat(c_ac_constant_expression_list, c_ac_constant_expression_list); ac_constant_expression_list reverse() const; ac_constant_expression_list rewrite(rview); ac_constant_expression last() const; ac_constant_expression_list append(ac_constant_expression); ac_constant_expression_list map(ac_constant_expression (*)(ac_constant_expression)); ac_constant_expression_list filter( bool (*)(ac_constant_expression)); ac_constant_expression_list merge( ac_constant_expression_list, ac_constant_expression (*)(ac_constant_expression, ac_constant_expression)); ac_constant_expression reduce( ac_constant_expression, ac_constant_expression (*)(ac_constant_expression, ac_constant_expression)); bool is_nil() const; ac_constant_expression ac_constant_expression_1; ac_constant_expression_list ac_constant_expression_list_1; private: impl_ac_constant_expression_list* nil_rewrite(rview); impl_ac_constant_expression_list* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_ac_opt_base_init_list: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_opt_base_init_list rewrite(rview) =0; }; class impl_ac_opt_base_init_list_AcYesBaseInit:public impl_ac_opt_base_init_list{ public: enum_operators prod_sel() const { return sel_AcYesBaseInit; } explicit impl_ac_opt_base_init_list_AcYesBaseInit(ac_base_init_list); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_opt_base_init_list rewrite( rview ); impl_ac_base_init_list* ac_base_init_list_1; private: void do_unparse(printer_functor, uview); }; class impl_ac_opt_base_init_list_AcNoBaseInit:public impl_ac_opt_base_init_list{ public: enum_operators prod_sel() const { return sel_AcNoBaseInit; } explicit impl_ac_opt_base_init_list_AcNoBaseInit(); ac_opt_base_init_list rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_ac_base_init_list: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilac_base_init_list: sel_Consac_base_init_list; } explicit impl_ac_base_init_list(ac_base_init = 0, ac_base_init_list = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend ac_base_init_list concat(c_ac_base_init_list, c_ac_base_init_list); ac_base_init_list reverse() const; ac_base_init_list rewrite(rview); ac_base_init last() const; ac_base_init_list append(ac_base_init); ac_base_init_list map(ac_base_init (*)(ac_base_init)); ac_base_init_list filter( bool (*)(ac_base_init)); ac_base_init_list merge( ac_base_init_list, ac_base_init (*)(ac_base_init, ac_base_init)); ac_base_init reduce( ac_base_init, ac_base_init (*)(ac_base_init, ac_base_init)); bool is_nil() const; ac_base_init ac_base_init_1; ac_base_init_list ac_base_init_list_1; private: impl_ac_base_init_list* nil_rewrite(rview); impl_ac_base_init_list* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_ac_base_init: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; ac_base_init rewrite(rview) =0; }; class impl_ac_base_init_AcBaseInit:public impl_ac_base_init{ public: enum_operators prod_sel() const { return sel_AcBaseInit; } explicit impl_ac_base_init_AcBaseInit(ID, ac_constant_expression_list); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); ac_base_init rewrite( rview ); impl_ID* ID_1; impl_ac_constant_expression_list* ac_constant_expression_list_1; private: void do_unparse(printer_functor, uview); }; class impl_baseclass_declarations: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilbaseclass_declarations: sel_Consbaseclass_declarations; } explicit impl_baseclass_declarations(baseclass_decl = 0, baseclass_declarations = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend baseclass_declarations concat(c_baseclass_declarations, c_baseclass_declarations); baseclass_declarations reverse() const; baseclass_declarations rewrite(rview); baseclass_decl last() const; baseclass_declarations append(baseclass_decl); baseclass_declarations map(baseclass_decl (*)(baseclass_decl)); baseclass_declarations filter( bool (*)(baseclass_decl)); baseclass_declarations merge( baseclass_declarations, baseclass_decl (*)(baseclass_decl, baseclass_decl)); baseclass_decl reduce( baseclass_decl, baseclass_decl (*)(baseclass_decl, baseclass_decl)); bool is_nil() const; baseclass_decl baseclass_decl_1; baseclass_declarations baseclass_declarations_1; private: impl_baseclass_declarations* nil_rewrite(rview); impl_baseclass_declarations* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_baseclass_decl: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; baseclass_decl rewrite(rview) =0; }; class impl_baseclass_decl_BaseClassDecl:public impl_baseclass_decl{ public: enum_operators prod_sel() const { return sel_BaseClassDecl; } explicit impl_baseclass_decl_BaseClassDecl(ID, baseclass_list); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); baseclass_decl rewrite( rview ); impl_ID* ID_1; impl_baseclass_list* baseclass_list_1; private: void do_unparse(printer_functor, uview); }; class impl_baseclass_list: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilbaseclass_list: sel_Consbaseclass_list; } explicit impl_baseclass_list(ID = 0, baseclass_list = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend baseclass_list concat(c_baseclass_list, c_baseclass_list); baseclass_list reverse() const; baseclass_list rewrite(rview); ID last() const; baseclass_list append(ID); baseclass_list map(ID (*)(ID)); baseclass_list filter( bool (*)(ID)); baseclass_list merge( baseclass_list, ID (*)(ID, ID)); ID reduce( ID, ID (*)(ID, ID)); bool is_nil() const; ID ID_1; baseclass_list baseclass_list_1; private: impl_baseclass_list* nil_rewrite(rview); impl_baseclass_list* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_error: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; error rewrite(rview) =0; }; class impl_error_Warning:public impl_error{ public: enum_operators prod_sel() const { return sel_Warning; } explicit impl_error_Warning(fileline, problem); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); error rewrite( rview ); impl_fileline* fileline_1; impl_problem* problem_1; private: void do_unparse(printer_functor, uview); }; class impl_error_NonFatal:public impl_error{ public: enum_operators prod_sel() const { return sel_NonFatal; } explicit impl_error_NonFatal(fileline, problem); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); error rewrite( rview ); impl_fileline* fileline_1; impl_problem* problem_1; private: void do_unparse(printer_functor, uview); }; class impl_error_Fatal:public impl_error{ public: enum_operators prod_sel() const { return sel_Fatal; } explicit impl_error_Fatal(fileline, problem); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); error rewrite( rview ); impl_fileline* fileline_1; impl_problem* problem_1; private: void do_unparse(printer_functor, uview); }; class impl_problem: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; problem rewrite(rview) =0; }; class impl_problem_Problem6:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem6; } explicit impl_problem_Problem6(casestring, casestring, casestring, casestring, casestring, casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_casestring* casestring_2; impl_casestring* casestring_3; impl_casestring* casestring_4; impl_casestring* casestring_5; impl_casestring* casestring_6; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem5:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem5; } explicit impl_problem_Problem5(casestring, casestring, casestring, casestring, casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_casestring* casestring_2; impl_casestring* casestring_3; impl_casestring* casestring_4; impl_casestring* casestring_5; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem4:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem4; } explicit impl_problem_Problem4(casestring, casestring, casestring, casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_casestring* casestring_2; impl_casestring* casestring_3; impl_casestring* casestring_4; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem3int1:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem3int1; } explicit impl_problem_Problem3int1(casestring, casestring, casestring, integer, casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_casestring* casestring_2; impl_casestring* casestring_3; impl_integer* integer_1; impl_casestring* casestring_4; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem3:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem3; } explicit impl_problem_Problem3(casestring, casestring, casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_casestring* casestring_2; impl_casestring* casestring_3; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem2:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem2; } explicit impl_problem_Problem2(casestring, casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_casestring* casestring_2; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem1storageoption1ID:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem1storageoption1ID; } explicit impl_problem_Problem1storageoption1ID(casestring, storageoption, casestring, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_storageoption* storageoption_1; impl_casestring* casestring_2; impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem1INT1ID1ID:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem1INT1ID1ID; } explicit impl_problem_Problem1INT1ID1ID(casestring, INT, casestring, ID, casestring, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_INT* INT_1; impl_casestring* casestring_2; impl_ID* ID_1; impl_casestring* casestring_3; impl_ID* ID_2; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem1ID1ID1ID:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem1ID1ID1ID; } explicit impl_problem_Problem1ID1ID1ID(casestring, ID, casestring, ID, casestring, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_ID* ID_1; impl_casestring* casestring_2; impl_ID* ID_2; impl_casestring* casestring_3; impl_ID* ID_3; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem1INT1ID:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem1INT1ID; } explicit impl_problem_Problem1INT1ID(casestring, INT, casestring, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_INT* INT_1; impl_casestring* casestring_2; impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem1int1:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem1int1; } explicit impl_problem_Problem1int1(casestring, integer, casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_integer* integer_1; impl_casestring* casestring_2; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem1INT:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem1INT; } explicit impl_problem_Problem1INT(casestring, INT); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_INT* INT_1; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem1t1ID:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem1t1ID; } explicit impl_problem_Problem1t1ID(casestring, IDtype, casestring, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_IDtype* IDtype_1; impl_casestring* casestring_2; impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem1ID1ID:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem1ID1ID; } explicit impl_problem_Problem1ID1ID(casestring, ID, casestring, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_ID* ID_1; impl_casestring* casestring_2; impl_ID* ID_2; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem1we:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem1we; } explicit impl_problem_Problem1we(casestring, withexpression); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_withexpression* withexpression_1; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem1tID:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem1tID; } explicit impl_problem_Problem1tID(casestring, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem1ID:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem1ID; } explicit impl_problem_Problem1ID(casestring, ID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; impl_ID* ID_1; private: void do_unparse(printer_functor, uview); }; class impl_problem_Problem1:public impl_problem{ public: enum_operators prod_sel() const { return sel_Problem1; } explicit impl_problem_Problem1(casestring); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); problem rewrite( rview ); impl_casestring* casestring_1; private: void do_unparse(printer_functor, uview); }; class impl_addedphylumdeclarations: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Niladdedphylumdeclarations: sel_Consaddedphylumdeclarations; } explicit impl_addedphylumdeclarations(addedphylumdeclaration = 0, addedphylumdeclarations = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend addedphylumdeclarations concat(c_addedphylumdeclarations, c_addedphylumdeclarations); addedphylumdeclarations reverse() const; addedphylumdeclarations rewrite(rview); addedphylumdeclaration last() const; addedphylumdeclarations append(addedphylumdeclaration); addedphylumdeclarations map(addedphylumdeclaration (*)(addedphylumdeclaration)); addedphylumdeclarations filter( bool (*)(addedphylumdeclaration)); addedphylumdeclarations merge( addedphylumdeclarations, addedphylumdeclaration (*)(addedphylumdeclaration, addedphylumdeclaration)); addedphylumdeclaration reduce( addedphylumdeclaration, addedphylumdeclaration (*)(addedphylumdeclaration, addedphylumdeclaration)); bool is_nil() const; addedphylumdeclaration addedphylumdeclaration_1; addedphylumdeclarations addedphylumdeclarations_1; private: impl_addedphylumdeclarations* nil_rewrite(rview); impl_addedphylumdeclarations* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_addedphylumdeclaration: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; bool added; addedphylumdeclaration rewrite(rview) =0; }; class impl_addedphylumdeclaration_AddedPhylumdeclaration:public impl_addedphylumdeclaration{ public: enum_operators prod_sel() const { return sel_AddedPhylumdeclaration; } explicit impl_addedphylumdeclaration_AddedPhylumdeclaration(uniqID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); addedphylumdeclaration rewrite( rview ); impl_uniqID* uniqID_1; private: void do_unparse(printer_functor, uview); }; class impl_countedphylumdeclarations: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilcountedphylumdeclarations: sel_Conscountedphylumdeclarations; } explicit impl_countedphylumdeclarations(countedphylumdeclaration = 0, countedphylumdeclarations = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend countedphylumdeclarations concat(c_countedphylumdeclarations, c_countedphylumdeclarations); countedphylumdeclarations reverse() const; countedphylumdeclarations rewrite(rview); countedphylumdeclaration last() const; countedphylumdeclarations append(countedphylumdeclaration); countedphylumdeclarations map(countedphylumdeclaration (*)(countedphylumdeclaration)); countedphylumdeclarations filter( bool (*)(countedphylumdeclaration)); countedphylumdeclarations merge( countedphylumdeclarations, countedphylumdeclaration (*)(countedphylumdeclaration, countedphylumdeclaration)); countedphylumdeclaration reduce( countedphylumdeclaration, countedphylumdeclaration (*)(countedphylumdeclaration, countedphylumdeclaration)); bool is_nil() const; countedphylumdeclaration countedphylumdeclaration_1; countedphylumdeclarations countedphylumdeclarations_1; private: impl_countedphylumdeclarations* nil_rewrite(rview); impl_countedphylumdeclarations* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_countedphylumdeclaration: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int count; countedphylumdeclaration rewrite(rview) =0; }; class impl_countedphylumdeclaration_CountedPhylumdeclaration:public impl_countedphylumdeclaration{ public: enum_operators prod_sel() const { return sel_CountedPhylumdeclaration; } explicit impl_countedphylumdeclaration_CountedPhylumdeclaration(uniqID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); countedphylumdeclaration rewrite( rview ); impl_uniqID* uniqID_1; private: void do_unparse(printer_functor, uview); }; class impl_charruns: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; int number; charruns set(int _n= 0); charruns rewrite(rview) =0; }; class impl_charruns_Stars:public impl_charruns{ public: enum_operators prod_sel() const { return sel_Stars; } explicit impl_charruns_Stars(); charruns rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_charruns_QuotedNewlines:public impl_charruns{ public: enum_operators prod_sel() const { return sel_QuotedNewlines; } explicit impl_charruns_QuotedNewlines(); charruns rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_charruns_Newlines:public impl_charruns{ public: enum_operators prod_sel() const { return sel_Newlines; } explicit impl_charruns_Newlines(); charruns rewrite( rview ); private: void do_unparse(printer_functor, uview); }; class impl_bindingidmarks: public impl_abstract_list{ public: static const enum_phyla phylum_sel_; enum_operators prod_sel() const{ return is_nil() ? sel_Nilbindingidmarks: sel_Consbindingidmarks; } explicit impl_bindingidmarks(bindingidmark = 0, bindingidmarks = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend bindingidmarks concat(c_bindingidmarks, c_bindingidmarks); bindingidmarks reverse() const; bindingidmarks rewrite(rview); bindingidmark last() const; bindingidmarks append(bindingidmark); bindingidmarks map(bindingidmark (*)(bindingidmark)); bindingidmarks filter( bool (*)(bindingidmark)); bindingidmarks merge( bindingidmarks, bindingidmark (*)(bindingidmark, bindingidmark)); bindingidmark reduce( bindingidmark, bindingidmark (*)(bindingidmark, bindingidmark)); bool is_nil() const; bindingidmark bindingidmark_1; bindingidmarks bindingidmarks_1; private: impl_bindingidmarks* nil_rewrite(rview); impl_bindingidmarks* cons_rewrite(rview); void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); }; class impl_bindingidmark: public impl_abstract_phylum{ public: static const enum_phyla phylum_sel_; bool marked; bindingidmark rewrite(rview) =0; }; class impl_bindingidmark_BindingIdMark:public impl_bindingidmark{ public: enum_operators prod_sel() const { return sel_BindingIdMark; } explicit impl_bindingidmark_BindingIdMark(uniqID); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); bindingidmark rewrite( rview ); impl_uniqID* uniqID_1; private: void do_unparse(printer_functor, uview); }; //} // namespace Phylum extern bool kc_storageclass_still_uniq[]; typedef struct { int created; int existing_not_found; int free_called[2]; int freed[2]; } KC_OPERATOR_STATISTICS; #ifdef KC_STATISTICS # define print_operator_statistics(kc_f) do_print_operator_statistics(kc_f) void do_print_operator_statistics(FILE*); #else # define print_operator_statistics(kc_f) #endif typedef class hashtable_struct_t* hashtable_t; const char *phylumname_or_error ( enum_phyla ); const char *kc_operatorname_or_error ( enum_operators ); } // namespace kc #endif // KC_TYPES_HEADER kimwitu++-2.3.13/src/Gen.boot/pat.cc0000644000175000017500000020175411135163773015512 0ustar useruser/* translation of file "pat.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #define KC_FUNCTIONS_pat #include #include "k.h" #include "pat.h" namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // static char pat_kAccesSid[] = "@(#)$Id: pat.k,v 1.36 2008/02/08 20:37:46 piefel Exp $"; #include "util.h" #include "gutil.h" /* for f_operatorofpatternrepresentation() */ bindingidmarks Thebindingidmarks = 0; /* end included stuff */ namespace kc { #ifndef KC_TRACE_PROVIDED #define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND #endif static patternrepresentation t_syn_patternchain (patternchain a_patternchain, path a_path, int branch); static patternrepresentation syn_outmostpattern (outmostpattern a_outmostpattern, path a_path); static patternrepresentation syn_pattern (pattern a_pattern, path a_path); static patternrepresentation syn_patterns (patterns a_patterns, path a_path); static patternrepresentation t_syn_patterns (patterns a_patterns, path a_path, int branch); static patternrepresentation add_predicates (patternrepresentation a_patternrep); static patternrepresentation add_predicate (elem_patternrepresentation a_patternrep_elem, patternrepresentation a_patternrep); static patternrepresentation t_make_predicates (ID a_id, paths a_paths, patternrepresentation a_subpattern, patternrepresentation a_patternrep, bool left_linear); static patternrepresentation make_predicates (elem_patternrepresentation a_patternrep_elem, patternrepresentation a_patternrep); static bool test_matching_subpatterns (patternrepresentation newp, patternrepresentation oldp); static patternrepresentation f_get_predicates (patternrepresentation a_patternrep); static patternrepresentation f_get_bindings (patternrepresentation a_patternrep); static patternrepresentation f_do_get_bindings (patternrepresentation a_patternrep); static rewriterulesinfo insertin_rewriterulesinfo (rewriteruleinfo new_rule, rewriterulesinfo old_rules); static bool lt_rewriteruleinfo (rewriteruleinfo a_rwruleinfo1, rewriteruleinfo a_rwruleinfo2); static unparsedeclsinfo insertin_unparsedeclsinfo (unparsedeclinfo new_decl, unparsedeclsinfo old_decls); static bool lt_unparsedeclinfo (unparsedeclinfo a_unparsedeclinfo1, unparsedeclinfo a_unparsedeclinfo2); static bool lt_patternrepresentation (patternrepresentation pr1, patternrepresentation pr2); static tribool equal_elem_patternrepresentation (elem_patternrepresentation a_patternrep_elem1, elem_patternrepresentation a_patternrep_elem2); static tribool equal_path (path a_path1, path a_path2); static tribool equal_paths (paths a_paths1, paths a_paths2); patternrepresentations syn_patternchains(patternchains a_patternchains) {{ patternchains kc_selvar_0_1 = phylum_cast(a_patternchains); if ((kc_selvar_0_1->prod_sel() == sel_Conspatternchains)) { const patternchain a_patternchain = (kc_selvar_0_1)->patternchain_1; const patternchains r_patternchains = (kc_selvar_0_1)->patternchains_1; return Conspatternrepresentations( syn_patternchain( a_patternchain, Nilpath() ), syn_patternchains( r_patternchains ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternchains)) { return Nilpatternrepresentations(); } else { kc_no_default_in_with( "syn_patternchains", __LINE__, __FILE__ ); return static_cast(0); } } } patternrepresentation syn_patternchain(patternchain a_patternchain, path a_path) {{ patternchain kc_selvar_0_1 = phylum_cast(a_patternchain); if ((kc_selvar_0_1->prod_sel() == sel_Conspatternchain)) { return t_syn_patternchain( a_patternchain, a_path, a_patternchain->length()); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternchain)) { return Nilpatternrepresentation(); } else { kc_no_default_in_with( "syn_patternchain", __LINE__, __FILE__ ); return static_cast(0); } } } static patternrepresentation t_syn_patternchain(patternchain a_patternchain, path a_path, int branch) {{ patternchain kc_selvar_0_1 = phylum_cast(a_patternchain); if ((kc_selvar_0_1->prod_sel() == sel_Conspatternchain)) { const patternchainitem a_patternchainitem = (kc_selvar_0_1)->patternchainitem_1; const patternchain r_patternchain = (kc_selvar_0_1)->patternchain_1; return concat( t_syn_patternchain( r_patternchain, a_path , branch-1 ), syn_patternchainitem( a_patternchainitem, Conspath( mkinteger(branch), a_path ) ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternchain)) { return Nilpatternrepresentation(); } else { kc_no_default_in_with( "t_syn_patternchain", __LINE__, __FILE__ ); return static_cast(0); } } } patternrepresentation syn_patternchainitem(patternchainitem a_patternchainitem, path a_path) {{ patternchainitem kc_selvar_0_1 = phylum_cast(a_patternchainitem); if ((kc_selvar_0_1->prod_sel() == sel_PatternchainitemDollarid)) { const ID id = phylum_cast(kc_selvar_0_1)->ID_1; elem_patternrepresentation tmp = PRBinding( a_path, id ); tmp->type = a_patternchainitem->type; return Conspatternrepresentation( tmp, Nilpatternrepresentation() ); } else if ((kc_selvar_0_1->prod_sel() == sel_PatternchainitemGroup)) { v_report( NonFatal( FileLine( a_patternchainitem->file, a_patternchainitem->line ), Problem1S( "Internal Error: PatternchainitemGroup was not handled correctly" ))); return Nilpatternrepresentation(); } else if ((kc_selvar_0_1->prod_sel() == sel_PatternchainitemOutmost)) { const outmostpattern a_outmostpattern = phylum_cast(kc_selvar_0_1)->outmostpattern_1; return syn_outmostpattern( a_outmostpattern, a_path ); } else { kc_no_default_in_with( "syn_patternchainitem", __LINE__, __FILE__ ); return static_cast(0); } } } patternrepresentations syn_outmostpatterns(outmostpatterns a_outmostpatterns) {{ outmostpatterns kc_selvar_0_1 = phylum_cast(a_outmostpatterns); if ((kc_selvar_0_1->prod_sel() == sel_Consoutmostpatterns)) { const outmostpattern a_outmostpattern = (kc_selvar_0_1)->outmostpattern_1; const outmostpatterns r_outmostpatterns = (kc_selvar_0_1)->outmostpatterns_1; return Conspatternrepresentations( syn_outmostpattern( a_outmostpattern, Nilpath() ), syn_outmostpatterns( r_outmostpatterns ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_Niloutmostpatterns)) { return Nilpatternrepresentations(); } else { kc_no_default_in_with( "syn_outmostpatterns", __LINE__, __FILE__ ); return static_cast(0); } } } void clone_TypeFileLine(elem_patternrepresentation tmp1, outmostpattern a_outmostpattern) { tmp1->type = a_outmostpattern->type; tmp1->file = a_outmostpattern->file; tmp1->line = a_outmostpattern->line; } static patternrepresentation syn_outmostpattern(outmostpattern a_outmostpattern, path a_path) { patternrepresentation result; Cexpression condition; { outmostpattern kc_selvar_0_1 = phylum_cast(a_outmostpattern); if ((kc_selvar_0_1->prod_sel() == sel_OPWildcard)) { const Cexpression cond = phylum_cast(kc_selvar_0_1)->Cexpression_1; condition = cond; elem_patternrepresentation tmp1 = PRWildcard( a_path ); clone_TypeFileLine(tmp1, a_outmostpattern); result = Conspatternrepresentation( tmp1, Nilpatternrepresentation() ); } else if ((kc_selvar_0_1->prod_sel() == sel_OPDefault)) { const Cexpression cond = phylum_cast(kc_selvar_0_1)->Cexpression_1; condition = cond; elem_patternrepresentation tmp1 = PRDefault(); clone_TypeFileLine(tmp1, a_outmostpattern); result = Conspatternrepresentation( tmp1, Nilpatternrepresentation() ); } else if ((kc_selvar_0_1->prod_sel() == sel_OPNonLeafVariable)) { const ID id = phylum_cast(kc_selvar_0_1)->ID_1; const outmostpattern r_pattern = phylum_cast(kc_selvar_0_1)->outmostpattern_1; condition = NilCexpression(); elem_patternrepresentation tmp1 = PRNonLeafBinding( a_path, id, syn_outmostpattern( r_pattern, Nilpath()) ); a_path->id = f_phylumofpatternID(id); clone_TypeFileLine(tmp1, a_outmostpattern); result = Conspatternrepresentation( tmp1, syn_outmostpattern( r_pattern, a_path ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_OPOperator)) { const ID id = phylum_cast(kc_selvar_0_1)->ID_1; const patterns r_patterns = phylum_cast(kc_selvar_0_1)->patterns_1; const Cexpression cond = phylum_cast(kc_selvar_0_1)->Cexpression_1; condition = cond; elem_patternrepresentation tmp1 = PROperPredicate( Conspath( mkinteger(0), a_path ), id ); clone_TypeFileLine(tmp1, a_outmostpattern); a_path->op = id; result = Conspatternrepresentation( tmp1, syn_patterns( r_patterns, a_path ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_OPOperatorWildcard)) { const ID id = phylum_cast(kc_selvar_0_1)->ID_1; const Cexpression cond = phylum_cast(kc_selvar_0_1)->Cexpression_1; condition = cond; { ID kc_selvar_1_1 = phylum_cast( id ); if ((kc_selvar_1_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_1_1)->uniqID_1; { IDtype kc_selvar_2_1 = phylum_cast( uid->type ); if ((kc_selvar_2_1->prod_sel() == sel_ITUnknown)) { elem_patternrepresentation tmp1 = PRBinding( a_path, id ); clone_TypeFileLine(tmp1, a_outmostpattern); result = Conspatternrepresentation( tmp1, Nilpatternrepresentation() ); } else if ((kc_selvar_2_1->prod_sel() == sel_ITPatternVariable)) { elem_patternrepresentation tmp1 = PRBinding( a_path, id ); clone_TypeFileLine(tmp1, a_outmostpattern); result = Conspatternrepresentation( tmp1, Nilpatternrepresentation() ); } else { elem_patternrepresentation tmp1 = PROperPredicate( Conspath( mkinteger(0), a_path ), id ); clone_TypeFileLine(tmp1, a_outmostpattern); a_path->op = id; result = Conspatternrepresentation( tmp1, Nilpatternrepresentation() ); } } } else { kc_no_default_in_with( "syn_outmostpattern", __LINE__, __FILE__ ); return static_cast(0); } } } else { kc_no_default_in_with( "syn_outmostpattern", __LINE__, __FILE__ ); return static_cast(0); } } if (!condition->is_nil()) result->append(PRUserPredicate(condition)); return result; } static patternrepresentation syn_pattern(pattern a_pattern, path a_path) {{ pattern kc_selvar_0_1 = phylum_cast(a_pattern); if ((kc_selvar_0_1->prod_sel() == sel_PIntLiteral)) { const INT i = phylum_cast(kc_selvar_0_1)->INT_1; return Conspatternrepresentation( PRIntLiteral( a_path, i ), Nilpatternrepresentation() ); } else if ((kc_selvar_0_1->prod_sel() == sel_PStringLiteral)) { const CexpressionDQ cexprdq = phylum_cast(kc_selvar_0_1)->CexpressionDQ_1; return Conspatternrepresentation( PRStringLiteral( a_path, cexprdq ), Nilpatternrepresentation() ); } else if ((kc_selvar_0_1->prod_sel() == sel_PWildcard)) { return Nilpatternrepresentation(); } else if ((kc_selvar_0_1->prod_sel() == sel_PNonLeafVariable)) { const ID id = phylum_cast(kc_selvar_0_1)->ID_1; const pattern r_pattern = phylum_cast(kc_selvar_0_1)->pattern_1; return Conspatternrepresentation( PRNonLeafBinding( a_path, id, syn_pattern( r_pattern, Nilpath()) ), syn_pattern( r_pattern, a_path ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_POperator)) { const ID id = phylum_cast(kc_selvar_0_1)->ID_1; const patterns r_patterns = phylum_cast(kc_selvar_0_1)->patterns_1; a_path->op = id; return Conspatternrepresentation( PROperPredicate( Conspath( mkinteger(0), a_path ), id ), syn_patterns( r_patterns, a_path ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_PVariable)) { const ID id = phylum_cast(kc_selvar_0_1)->ID_1; return Conspatternrepresentation( PRBinding( a_path, id ), Nilpatternrepresentation() ); } else { kc_no_default_in_with( "syn_pattern", __LINE__, __FILE__ ); return static_cast(0); } } } static patternrepresentation syn_patterns(patterns a_patterns, path a_path) {{ patterns kc_selvar_0_1 = phylum_cast(a_patterns); if ((kc_selvar_0_1->prod_sel() == sel_Conspatterns)) { return t_syn_patterns( a_patterns, a_path , a_patterns->length( ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpatterns)) { return Nilpatternrepresentation(); } else { kc_no_default_in_with( "syn_patterns", __LINE__, __FILE__ ); return static_cast(0); } } } static patternrepresentation t_syn_patterns(patterns a_patterns, path a_path, int branch) {{ patterns kc_selvar_0_1 = phylum_cast(a_patterns); if ((kc_selvar_0_1->prod_sel() == sel_Conspatterns)) { const pattern a_pattern = (kc_selvar_0_1)->pattern_1; const patterns r_patterns = (kc_selvar_0_1)->patterns_1; return concat( t_syn_patterns( r_patterns, a_path , branch-1 ), syn_pattern( a_pattern, Conspath( mkinteger(branch), a_path ) ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpatterns)) { return Nilpatternrepresentation(); } else { kc_no_default_in_with( "t_syn_patterns", __LINE__, __FILE__ ); return static_cast(0); } } } bool f_bindingidmarked(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; return BindingIdMark( uid )->marked; } else { kc_no_default_in_with( "f_bindingidmarked", __LINE__, __FILE__ ); return static_cast(0); } } } void v_markbindingid(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; BindingIdMark( uid )->marked = true; } else kc_no_default_in_with( "v_markbindingid", __LINE__, __FILE__ ); } } void v_resetbindingidmarks() { if (Thebindingidmarks) { { bindingidmarks kc_fe_selvar_1 = Thebindingidmarks ; while( kc_fe_selvar_1->prod_sel() == sel_Consbindingidmarks ) { bindingidmark kc_selvar_0_1 = kc_fe_selvar_1->bindingidmark_1; { { { const bindingidmark m = kc_selvar_0_1; m->marked = false; } } } kc_fe_selvar_1 = kc_fe_selvar_1->bindingidmarks_1; } } } } patternrepresentations add_predicates_to_patternrepresentations(patternrepresentations a_patternreps) {{ patternrepresentations kc_selvar_0_1 = phylum_cast(a_patternreps); if ((kc_selvar_0_1->prod_sel() == sel_Conspatternrepresentations)) { const patternrepresentation a_patternrep = (kc_selvar_0_1)->patternrepresentation_1; const patternrepresentations r_patternreps = (kc_selvar_0_1)->patternrepresentations_1; patternrepresentation tmp; v_resetbindingidmarks(); tmp = add_predicates( a_patternrep ); return Conspatternrepresentations( concat( a_patternrep, tmp ), add_predicates_to_patternrepresentations( r_patternreps ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternrepresentations)) { return Nilpatternrepresentations(); } else { kc_no_default_in_with( "add_predicates_to_patternrepresentations", __LINE__, __FILE__ ); return static_cast(0); } } } static patternrepresentation add_predicates(patternrepresentation a_patternrep) {{ patternrepresentation kc_selvar_0_1 = phylum_cast(a_patternrep); if ((kc_selvar_0_1->prod_sel() == sel_Conspatternrepresentation)) { const elem_patternrepresentation a_pattern_rep_elem = (kc_selvar_0_1)->elem_patternrepresentation_1; const patternrepresentation r_patternrep = (kc_selvar_0_1)->patternrepresentation_1; patternrepresentation tmp_for_elem, tmp_for_rest; tmp_for_elem = add_predicate( a_pattern_rep_elem, r_patternrep ); tmp_for_rest = add_predicates( r_patternrep ); return concat( tmp_for_elem, tmp_for_rest ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternrepresentation)) { return Nilpatternrepresentation(); } else { kc_no_default_in_with( "add_predicates", __LINE__, __FILE__ ); return static_cast(0); } } } static patternrepresentation add_predicate(elem_patternrepresentation a_patternrep_elem, patternrepresentation a_patternrep) {{ elem_patternrepresentation kc_selvar_0_1 = phylum_cast(a_patternrep_elem); if ((kc_selvar_0_1->prod_sel() == sel_PRNonLeafBinding)) { const ID id = phylum_cast(kc_selvar_0_1)->ID_1; if (! f_bindingidmarked( id )) { v_markbindingid( id ); return make_predicates( a_patternrep_elem, a_patternrep ); } else { return Nilpatternrepresentation(); } } else if ((kc_selvar_0_1->prod_sel() == sel_PRBinding)) { const ID id = phylum_cast(kc_selvar_0_1)->ID_1; if (! f_bindingidmarked( id )) { v_markbindingid( id ); return make_predicates( a_patternrep_elem, a_patternrep ); } else { return Nilpatternrepresentation(); } } else { return Nilpatternrepresentation(); } } } static patternrepresentation t_make_predicates(ID a_id, paths a_paths, patternrepresentation a_subpattern, patternrepresentation a_patternrep, bool left_linear) {{ patternrepresentation kc_selvar_0_1 = phylum_cast(a_patternrep); if ((kc_selvar_0_1->prod_sel() == sel_Conspatternrepresentation)) { const elem_patternrepresentation aps_patternrep_elem = (kc_selvar_0_1)->elem_patternrepresentation_1; const patternrepresentation r_apatternrep = (kc_selvar_0_1)->patternrepresentation_1; { elem_patternrepresentation kc_selvar_1_1 = phylum_cast( aps_patternrep_elem ); if ((kc_selvar_1_1->prod_sel() == sel_PRNonLeafBinding)) { const path aps_path = phylum_cast(kc_selvar_1_1)->path_1; const ID aps_id = phylum_cast(kc_selvar_1_1)->ID_1; const patternrepresentation aps_subpattern = phylum_cast(kc_selvar_1_1)->patternrepresentation_1; if ( a_id->eq( aps_id )) { if ( test_matching_subpatterns( aps_subpattern, a_subpattern ) ) { return t_make_predicates( a_id, Conspaths( aps_path, a_paths ), concat( aps_subpattern, a_subpattern ), r_apatternrep, false ); } else { return t_make_predicates( a_id, a_paths, a_subpattern, r_apatternrep, false ); } } else { return t_make_predicates( a_id, a_paths, a_subpattern, r_apatternrep, left_linear ); } } else if ((kc_selvar_1_1->prod_sel() == sel_PRBinding)) { const path aps_path = phylum_cast(kc_selvar_1_1)->path_1; const ID aps_id = phylum_cast(kc_selvar_1_1)->ID_1; if ( a_id->eq( aps_id )) { return t_make_predicates( a_id, Conspaths( aps_path, a_paths ), a_subpattern, r_apatternrep, false ); } else { return t_make_predicates( a_id, a_paths, a_subpattern, r_apatternrep, left_linear ); } } else { return t_make_predicates( a_id, a_paths, a_subpattern, r_apatternrep, left_linear ); } } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternrepresentation)) { if (left_linear) { return Nilpatternrepresentation(); } else { elem_patternrepresentation pred = PRVarPredicate(a_paths, a_id, a_subpattern); pred->file = a_id->file, pred->line = a_id->line; return Conspatternrepresentation( pred, Nilpatternrepresentation() ); } } else { kc_no_default_in_with( "t_make_predicates", __LINE__, __FILE__ ); return static_cast(0); } } } static patternrepresentation make_predicates(elem_patternrepresentation a_patternrep_elem, patternrepresentation a_patternrep) {{ elem_patternrepresentation kc_selvar_0_1 = phylum_cast(a_patternrep_elem); if ((kc_selvar_0_1->prod_sel() == sel_PRNonLeafBinding)) { const path a_path = phylum_cast(kc_selvar_0_1)->path_1; const ID a_id = phylum_cast(kc_selvar_0_1)->ID_1; const patternrepresentation a_subpattern = phylum_cast(kc_selvar_0_1)->patternrepresentation_1; return t_make_predicates( a_id, Conspaths( a_path, Nilpaths()), a_subpattern, a_patternrep, true ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRBinding)) { const path a_path = phylum_cast(kc_selvar_0_1)->path_1; const ID a_id = phylum_cast(kc_selvar_0_1)->ID_1; return t_make_predicates( a_id, Conspaths( a_path, Nilpaths()), Nilpatternrepresentation(), a_patternrep, true ); } else { kc_no_default_in_with( "make_predicates", __LINE__, __FILE__ ); return static_cast(0); } } } static bool test_matching_subpatterns(patternrepresentation newp, patternrepresentation oldp) { return true; } void v_add_rewriterulesinfo_to_operator(patternrepresentations a_patternreps, rewriteclauses rc) { { patternrepresentations kc_fe_selvar_1 = a_patternreps ; while( kc_fe_selvar_1->prod_sel() == sel_Conspatternrepresentations ) { patternrepresentation kc_selvar_0_1 = kc_fe_selvar_1->patternrepresentation_1; { { { const patternrepresentation a_patternrep = kc_selvar_0_1; ID op = f_operatorofpatternrepresentation( a_patternrep ); if (! op->eq( f_emptyId() )) { alternative a = f_alternativeofoperator(op); if (a) { { rewriteclauses kc_fe_selvar_1 = rc ; while( kc_fe_selvar_1->prod_sel() == sel_Consrewriteclauses ) { rewriteclause kc_selvar_1_1 = kc_fe_selvar_1->rewriteclause_1; { { { const rewriteclause r = kc_selvar_1_1; a->rewriteinfo = insertin_rewriterulesinfo( Rewriteruleinfo( f_get_predicates( a_patternrep ), f_get_bindings( a_patternrep ), r ), a->rewriteinfo ); } } } kc_fe_selvar_1 = kc_fe_selvar_1->rewriteclauses_1; } } } } } } } kc_fe_selvar_1 = kc_fe_selvar_1->patternrepresentations_1; } } } withcasesinfo f_withcasesinfo(patternrepresentations a_patternreps, Ctext ct) { withcasesinfo tmp = Nilwithcasesinfo(); { patternrepresentations kc_fe_selvar_1 = a_patternreps ; while( kc_fe_selvar_1->prod_sel() == sel_Conspatternrepresentations ) { patternrepresentation kc_selvar_0_1 = kc_fe_selvar_1->patternrepresentation_1; { { { const patternrepresentation a_patternrep = kc_selvar_0_1; { patternrepresentation kc_selvar_1_1 = phylum_cast( a_patternrep ); if ((kc_selvar_1_1->prod_sel() == sel_Conspatternrepresentation)) { tmp = insertin_withcasesinfo( Withcaseinfo( f_get_predicates( a_patternrep ), f_get_bindings( a_patternrep ), ct ), tmp ); } else if ((kc_selvar_1_1->prod_sel() == sel_Nilpatternrepresentation)) { /*EMPTY*/ } else { kc_no_default_in_with( "f_withcasesinfo", __LINE__, __FILE__ ); return static_cast(0); } } } } } kc_fe_selvar_1 = kc_fe_selvar_1->patternrepresentations_1; } } return tmp; } void v_add_unparsedeclsinfo_to_operator(patternrepresentations a_patternreps, unparseclauses uc) { { patternrepresentations kc_fe_selvar_1 = a_patternreps ; while( kc_fe_selvar_1->prod_sel() == sel_Conspatternrepresentations ) { patternrepresentation kc_selvar_0_1 = kc_fe_selvar_1->patternrepresentation_1; { { { const patternrepresentation a_patternrep = kc_selvar_0_1; ID op = f_operatorofpatternrepresentation( a_patternrep ); if (! op->eq( f_emptyId() )) { alternative a = f_alternativeofoperator(op); if (a) { { unparseclauses kc_fe_selvar_1 = uc ; while( kc_fe_selvar_1->prod_sel() == sel_Consunparseclauses ) { unparseclause kc_selvar_1_1 = kc_fe_selvar_1->unparseclause_1; { { { const unparseclause u = kc_selvar_1_1; a->unparseinfo = insertin_unparsedeclsinfo( Unparsedeclinfo( f_get_predicates( a_patternrep ), f_get_bindings( a_patternrep ), u ), a->unparseinfo ); } } } kc_fe_selvar_1 = kc_fe_selvar_1->unparseclauses_1; } } } } } } } kc_fe_selvar_1 = kc_fe_selvar_1->patternrepresentations_1; } } } static patternrepresentation f_get_predicates(patternrepresentation a_patternrep) {{ patternrepresentation kc_selvar_0_1 = phylum_cast(a_patternrep); if ((kc_selvar_0_1->prod_sel() == sel_Conspatternrepresentation)) { const elem_patternrepresentation a_patternrep_elem = (kc_selvar_0_1)->elem_patternrepresentation_1; const patternrepresentation r_patternrep = (kc_selvar_0_1)->patternrepresentation_1; { elem_patternrepresentation kc_selvar_1_1 = phylum_cast( a_patternrep_elem ); if ((kc_selvar_1_1->prod_sel() == sel_PRNonLeafBinding)) { return f_get_predicates( r_patternrep ); } else if ((kc_selvar_1_1->prod_sel() == sel_PRBinding)) { return f_get_predicates( r_patternrep ); } else { return Conspatternrepresentation( a_patternrep_elem, f_get_predicates( r_patternrep ) ); } } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternrepresentation)) { return Nilpatternrepresentation(); } else { kc_no_default_in_with( "f_get_predicates", __LINE__, __FILE__ ); return static_cast(0); } } } static patternrepresentation f_get_bindings(patternrepresentation a_patternrep) { patternrepresentation p; v_resetbindingidmarks(); p = f_do_get_bindings( a_patternrep ); v_resetbindingidmarks(); return p; } static patternrepresentation f_do_get_bindings(patternrepresentation a_patternrep) {{ patternrepresentation kc_selvar_0_1 = phylum_cast(a_patternrep); if ((kc_selvar_0_1->prod_sel() == sel_Conspatternrepresentation)) { const elem_patternrepresentation a_patternrep_elem = (kc_selvar_0_1)->elem_patternrepresentation_1; const patternrepresentation r_patternrep = (kc_selvar_0_1)->patternrepresentation_1; { elem_patternrepresentation kc_selvar_1_1 = phylum_cast( a_patternrep_elem ); if ((kc_selvar_1_1->prod_sel() == sel_PRNonLeafBinding)) { const ID id = phylum_cast(kc_selvar_1_1)->ID_1; if (! f_bindingidmarked( id )) { v_markbindingid( id ); return Conspatternrepresentation( a_patternrep_elem, f_do_get_bindings( r_patternrep ) ); } else { return f_do_get_bindings( r_patternrep ); } } else if ((kc_selvar_1_1->prod_sel() == sel_PRBinding)) { const ID id = phylum_cast(kc_selvar_1_1)->ID_1; if (! f_bindingidmarked( id )) { v_markbindingid( id ); return Conspatternrepresentation( a_patternrep_elem, f_do_get_bindings( r_patternrep ) ); } else { return f_do_get_bindings( r_patternrep ); } } else { return f_do_get_bindings( r_patternrep ); } } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternrepresentation)) { return Nilpatternrepresentation(); } else { kc_no_default_in_with( "f_do_get_bindings", __LINE__, __FILE__ ); return static_cast(0); } } } static rewriterulesinfo insertin_rewriterulesinfo(rewriteruleinfo new_rule, rewriterulesinfo old_rules) {{ rewriterulesinfo kc_selvar_0_1 = phylum_cast(old_rules); if ((kc_selvar_0_1->prod_sel() == sel_Consrewriterulesinfo)) { const rewriteruleinfo head_rule = (kc_selvar_0_1)->rewriteruleinfo_1; const rewriterulesinfo rest_rules = (kc_selvar_0_1)->rewriterulesinfo_1; if (lt_rewriteruleinfo( head_rule, new_rule )) { return Consrewriterulesinfo( head_rule, insertin_rewriterulesinfo( new_rule, rest_rules )); } else { return Consrewriterulesinfo( new_rule, old_rules ); } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilrewriterulesinfo)) { return Consrewriterulesinfo( new_rule, old_rules ); } else { kc_no_default_in_with( "insertin_rewriterulesinfo", __LINE__, __FILE__ ); return static_cast(0); } } } static bool lt_rewriteruleinfo(rewriteruleinfo a_rwruleinfo1, rewriteruleinfo a_rwruleinfo2) {{ rewriteruleinfo kc_selvar_0_1 = phylum_cast(a_rwruleinfo1); rewriteruleinfo kc_selvar_0_2 = phylum_cast(a_rwruleinfo2); if ((kc_selvar_0_1->prod_sel() == sel_Rewriteruleinfo) && (kc_selvar_0_2->prod_sel() == sel_Rewriteruleinfo)) { const patternrepresentation a_patternrep1 = phylum_cast(kc_selvar_0_1)->patternrepresentation_1; const patternrepresentation a_patternrep2 = phylum_cast(kc_selvar_0_2)->patternrepresentation_1; return lt_patternrepresentation( a_patternrep1, a_patternrep2 ); } else { kc_no_default_in_with( "lt_rewriteruleinfo", __LINE__, __FILE__ ); return static_cast(0); } } } withcasesinfo insertin_withcasesinfo(withcaseinfo new_case, withcasesinfo old_cases) {{ withcasesinfo kc_selvar_0_1 = phylum_cast(old_cases); if ((kc_selvar_0_1->prod_sel() == sel_Conswithcasesinfo)) { const withcaseinfo head_case = (kc_selvar_0_1)->withcaseinfo_1; const withcasesinfo rest_cases = (kc_selvar_0_1)->withcasesinfo_1; if (lt_withcaseinfo( head_case, new_case )) { return Conswithcasesinfo( head_case, insertin_withcasesinfo( new_case, rest_cases )); } else { return Conswithcasesinfo( new_case, old_cases ); } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilwithcasesinfo)) { return Conswithcasesinfo( new_case, old_cases ); } else { kc_no_default_in_with( "insertin_withcasesinfo", __LINE__, __FILE__ ); return static_cast(0); } } } bool lt_withcaseinfo(withcaseinfo a_withcaseinfo1, withcaseinfo a_withcaseinfo2) {{ withcaseinfo kc_selvar_0_1 = phylum_cast(a_withcaseinfo1); withcaseinfo kc_selvar_0_2 = phylum_cast(a_withcaseinfo2); if ((kc_selvar_0_1->prod_sel() == sel_Withcaseinfo) && (kc_selvar_0_2->prod_sel() == sel_Withcaseinfo)) { const patternrepresentation a_patternrep1 = phylum_cast(kc_selvar_0_1)->patternrepresentation_1; const patternrepresentation a_patternrep2 = phylum_cast(kc_selvar_0_2)->patternrepresentation_1; return lt_patternrepresentation( a_patternrep1, a_patternrep2 ); } else { kc_no_default_in_with( "lt_withcaseinfo", __LINE__, __FILE__ ); return static_cast(0); } } } static unparsedeclsinfo insertin_unparsedeclsinfo(unparsedeclinfo new_decl, unparsedeclsinfo old_decls) {{ unparsedeclsinfo kc_selvar_0_1 = phylum_cast(old_decls); if ((kc_selvar_0_1->prod_sel() == sel_Consunparsedeclsinfo)) { const unparsedeclinfo head_decl = (kc_selvar_0_1)->unparsedeclinfo_1; const unparsedeclsinfo rest_decls = (kc_selvar_0_1)->unparsedeclsinfo_1; if (lt_unparsedeclinfo( head_decl, new_decl )) { return Consunparsedeclsinfo( head_decl, insertin_unparsedeclsinfo( new_decl, rest_decls )); } else { return Consunparsedeclsinfo( new_decl, old_decls ); } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilunparsedeclsinfo)) { return Consunparsedeclsinfo( new_decl, old_decls ); } else { kc_no_default_in_with( "insertin_unparsedeclsinfo", __LINE__, __FILE__ ); return static_cast(0); } } } static bool lt_unparsedeclinfo(unparsedeclinfo a_unparsedeclinfo1, unparsedeclinfo a_unparsedeclinfo2) {{ unparsedeclinfo kc_selvar_0_1 = phylum_cast(a_unparsedeclinfo1); unparsedeclinfo kc_selvar_0_2 = phylum_cast(a_unparsedeclinfo2); if ((kc_selvar_0_1->prod_sel() == sel_Unparsedeclinfo) && (kc_selvar_0_2->prod_sel() == sel_Unparsedeclinfo)) { const patternrepresentation a_patternrep1 = phylum_cast(kc_selvar_0_1)->patternrepresentation_1; const patternrepresentation a_patternrep2 = phylum_cast(kc_selvar_0_2)->patternrepresentation_1; return lt_patternrepresentation( a_patternrep1, a_patternrep2 ); } else { kc_no_default_in_with( "lt_unparsedeclinfo", __LINE__, __FILE__ ); return static_cast(0); } } } void warn_drop_identical_pattern(rewriteruleinfo rri) {{ rewriteruleinfo kc_selvar_0_1 = phylum_cast(rri); if ((kc_selvar_0_1->prod_sel() == sel_Rewriteruleinfo)) { const patternrepresentation pr = phylum_cast(kc_selvar_0_1)->patternrepresentation_1; warn_drop_identical_pattern(pr); } else kc_no_default_in_with( "warn_drop_identical_pattern", __LINE__, __FILE__ ); } } void warn_drop_identical_pattern(withcaseinfo wci) {{ withcaseinfo kc_selvar_0_1 = phylum_cast(wci); if ((kc_selvar_0_1->prod_sel() == sel_Withcaseinfo)) { const patternrepresentation pr = phylum_cast(kc_selvar_0_1)->patternrepresentation_1; warn_drop_identical_pattern(pr); } else kc_no_default_in_with( "warn_drop_identical_pattern", __LINE__, __FILE__ ); } } void warn_drop_identical_pattern(unparsedeclinfo udi) {{ unparsedeclinfo kc_selvar_0_1 = phylum_cast(udi); if ((kc_selvar_0_1->prod_sel() == sel_Unparsedeclinfo)) { const patternrepresentation pr = phylum_cast(kc_selvar_0_1)->patternrepresentation_1; warn_drop_identical_pattern(pr); } else kc_no_default_in_with( "warn_drop_identical_pattern", __LINE__, __FILE__ ); } } void warn_drop_identical_pattern(patternrepresentation pr) {{ patternrepresentation kc_selvar_0_1 = phylum_cast(pr); if ((kc_selvar_0_1->prod_sel() == sel_Conspatternrepresentation)) { const elem_patternrepresentation epr = (kc_selvar_0_1)->elem_patternrepresentation_1; v_report(Warning(FileLine( epr->file, epr->line ), Problem1S("Warning: dropped pattern"))); } else { assertionFailed("Dropping empty pattern"); } } } static bool lt_patternrepresentation(patternrepresentation pr1, patternrepresentation pr2) { { patternrepresentation kc_fe_selvar_1 = pr1; patternrepresentation kc_fe_selvar_2 = pr2; while( kc_fe_selvar_1->prod_sel() == sel_Conspatternrepresentation && kc_fe_selvar_2->prod_sel() == sel_Conspatternrepresentation ) { elem_patternrepresentation kc_selvar_0_1 = kc_fe_selvar_1->elem_patternrepresentation_1; elem_patternrepresentation kc_selvar_0_2 = kc_fe_selvar_2->elem_patternrepresentation_1; { { { const elem_patternrepresentation p1 = kc_selvar_0_1; const elem_patternrepresentation p2 = kc_selvar_0_2; { tribool kc_selvar_1_1 = phylum_cast( equal_elem_patternrepresentation(p1, p2) ); if ((kc_selvar_1_1->prod_sel() == sel_Bigger)) { return false; } else if ((kc_selvar_1_1->prod_sel() == sel_Smaller)) { return true; } else { } } } } } kc_fe_selvar_1 = kc_fe_selvar_1->patternrepresentation_1; kc_fe_selvar_2 = kc_fe_selvar_2->patternrepresentation_1; } { { { const patternrepresentation re1 = kc_fe_selvar_1; const patternrepresentation re2 = kc_fe_selvar_2; { patternrepresentation kc_selvar_1_1 = phylum_cast(re1); patternrepresentation kc_selvar_1_2 = phylum_cast(re2); if ((kc_selvar_1_1->prod_sel() == sel_Nilpatternrepresentation) && (kc_selvar_1_2->prod_sel() == sel_Nilpatternrepresentation)) { return false; } else if ((kc_selvar_1_1->prod_sel() == sel_Nilpatternrepresentation)) { return false; } else if ((kc_selvar_1_2->prod_sel() == sel_Nilpatternrepresentation)) { return true; } else { kc_no_default_in_with( "lt_patternrepresentation", __LINE__, __FILE__ ); return static_cast(0); } } } } } } } static tribool equal_elem_patternrepresentation(elem_patternrepresentation a_patternrep_elem1, elem_patternrepresentation a_patternrep_elem2) {{ elem_patternrepresentation kc_selvar_0_1 = phylum_cast(a_patternrep_elem1); elem_patternrepresentation kc_selvar_0_2 = phylum_cast(a_patternrep_elem2); if ((kc_selvar_0_1->prod_sel() == sel_PRDefault) && (kc_selvar_0_2->prod_sel() == sel_PRWildcard)) { return Bigger(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRWildcard) && (kc_selvar_0_2->prod_sel() == sel_PRDefault)) { return Smaller(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRVarPredicate) && (kc_selvar_0_2->prod_sel() == sel_PROperPredicate)) { return Bigger(); } else if ((kc_selvar_0_1->prod_sel() == sel_PROperPredicate) && (kc_selvar_0_2->prod_sel() == sel_PRVarPredicate)) { return Smaller(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRVarPredicate) && (kc_selvar_0_2->prod_sel() == sel_PRIntLiteral)) { return Bigger(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRIntLiteral) && (kc_selvar_0_2->prod_sel() == sel_PRVarPredicate)) { return Smaller(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRVarPredicate) && (kc_selvar_0_2->prod_sel() == sel_PRStringLiteral)) { return Bigger(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRStringLiteral) && (kc_selvar_0_2->prod_sel() == sel_PRVarPredicate)) { return Smaller(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRIntLiteral) && (kc_selvar_0_2->prod_sel() == sel_PRStringLiteral)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; return equal_path( a_path1, a_path2 ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRStringLiteral) && (kc_selvar_0_2->prod_sel() == sel_PRIntLiteral)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; return equal_path( a_path1, a_path2 ); } else if ((kc_selvar_0_1->prod_sel() == sel_PROperPredicate) && (kc_selvar_0_2->prod_sel() == sel_PRIntLiteral)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; return equal_path( a_path1, a_path2 ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRIntLiteral) && (kc_selvar_0_2->prod_sel() == sel_PROperPredicate)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; return equal_path( a_path1, a_path2 ); } else if ((kc_selvar_0_1->prod_sel() == sel_PROperPredicate) && (kc_selvar_0_2->prod_sel() == sel_PRStringLiteral)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; return equal_path( a_path1, a_path2 ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRStringLiteral) && (kc_selvar_0_2->prod_sel() == sel_PROperPredicate)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; return equal_path( a_path1, a_path2 ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRIntLiteral) && (kc_selvar_0_2->prod_sel() == sel_PRIntLiteral)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; return equal_path( a_path1, a_path2 ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRStringLiteral) && (kc_selvar_0_2->prod_sel() == sel_PRStringLiteral)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; return equal_path( a_path1, a_path2 ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRNonLeafBinding) && (kc_selvar_0_2->prod_sel() == sel_PRNonLeafBinding)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; return equal_path( a_path1, a_path2 ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRBinding) && (kc_selvar_0_2->prod_sel() == sel_PRBinding)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; return equal_path( a_path1, a_path2 ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRWildcard) && (kc_selvar_0_2->prod_sel() == sel_PRWildcard)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; return equal_path( a_path1, a_path2 ); } else if ((kc_selvar_0_1->prod_sel() == sel_PROperPredicate) && (kc_selvar_0_2->prod_sel() == sel_PROperPredicate)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; return equal_path( a_path1, a_path2 ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRVarPredicate) && (kc_selvar_0_2->prod_sel() == sel_PRVarPredicate)) { const paths a_paths1 = phylum_cast(kc_selvar_0_1)->paths_1; const paths a_paths2 = phylum_cast(kc_selvar_0_2)->paths_1; return equal_paths( a_paths1, a_paths2 ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRUserPredicate) && (kc_selvar_0_2->prod_sel() == sel_PRUserPredicate)) { return Equal(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRDefault) && (kc_selvar_0_2->prod_sel() == sel_PRDefault)) { return Equal(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRUserPredicate)) { return Bigger(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRNonLeafBinding)) { return Bigger(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRBinding)) { return Bigger(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRWildcard)) { return Bigger(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRDefault)) { return Bigger(); } else if ((kc_selvar_0_2->prod_sel() == sel_PRUserPredicate)) { return Smaller(); } else if ((kc_selvar_0_2->prod_sel() == sel_PRNonLeafBinding)) { return Smaller(); } else if ((kc_selvar_0_2->prod_sel() == sel_PRBinding)) { return Smaller(); } else if ((kc_selvar_0_2->prod_sel() == sel_PRWildcard)) { return Smaller(); } else if ((kc_selvar_0_2->prod_sel() == sel_PRDefault)) { return Smaller(); } else { kc_no_default_in_with( "equal_elem_patternrepresentation", __LINE__, __FILE__ ); return static_cast(0); } } } static tribool equal_path(path a_path1, path a_path2) { path r_a_path1=a_path1->reverse(), r_a_path2=a_path2->reverse(); tribool ret; bool breakforeach = false; { path kc_fe_selvar_1 = r_a_path1; path kc_fe_selvar_2 = r_a_path2; while( kc_fe_selvar_1->prod_sel() == sel_Conspath && kc_fe_selvar_2->prod_sel() == sel_Conspath ) { integer kc_selvar_0_1 = kc_fe_selvar_1->integer_1; integer kc_selvar_0_2 = kc_fe_selvar_2->integer_1; { { { const integer i1 = kc_selvar_0_1; const integer i2 = kc_selvar_0_2; if (!breakforeach) { if ( i1->value < i2->value ) ret = Smaller(), breakforeach = true; else if (i1->value > i2->value ) ret = Bigger(), breakforeach = true; } } } } kc_fe_selvar_1 = kc_fe_selvar_1->path_1; kc_fe_selvar_2 = kc_fe_selvar_2->path_1; } { { { const path re1 = kc_fe_selvar_1; const path re2 = kc_fe_selvar_2; { path kc_selvar_1_1 = phylum_cast(re1); path kc_selvar_1_2 = phylum_cast(re2); if ((kc_selvar_1_1->prod_sel() == sel_Nilpath) && (kc_selvar_1_2->prod_sel() == sel_Conspath)) { ret = breakforeach ? ret : Bigger(); } else if ((kc_selvar_1_1->prod_sel() == sel_Conspath) && (kc_selvar_1_2->prod_sel() == sel_Nilpath)) { ret = breakforeach ? ret : Smaller(); } else if ((kc_selvar_1_1->prod_sel() == sel_Nilpath) && (kc_selvar_1_2->prod_sel() == sel_Nilpath)) { ret = breakforeach ? ret : Equal(); } else { kc_no_default_in_with( "equal_path", __LINE__, __FILE__ ); return static_cast(0); } } } } } } r_a_path1->freelist(); r_a_path2->freelist(); return ret; } static tribool equal_paths(paths a_paths1, paths a_paths2) { { paths kc_fe_selvar_1 = a_paths1; paths kc_fe_selvar_2 = a_paths2; while( kc_fe_selvar_1->prod_sel() == sel_Conspaths && kc_fe_selvar_2->prod_sel() == sel_Conspaths ) { path kc_selvar_0_1 = kc_fe_selvar_1->path_1; path kc_selvar_0_2 = kc_fe_selvar_2->path_1; { { { const path path1 = kc_selvar_0_1; const path path2 = kc_selvar_0_2; { tribool kc_selvar_1_1 = phylum_cast( equal_path( path1, path2 ) ); if ((kc_selvar_1_1->prod_sel() == sel_Bigger)) { return Bigger(); } else if ((kc_selvar_1_1->prod_sel() == sel_Smaller)) { return Smaller(); } else { } } } } } kc_fe_selvar_1 = kc_fe_selvar_1->paths_1; kc_fe_selvar_2 = kc_fe_selvar_2->paths_1; } { { { const paths re1 = kc_fe_selvar_1; const paths re2 = kc_fe_selvar_2; { paths kc_selvar_1_1 = phylum_cast(re1); paths kc_selvar_1_2 = phylum_cast(re2); if ((kc_selvar_1_1->prod_sel() == sel_Nilpaths) && (kc_selvar_1_2->prod_sel() == sel_Conspaths)) { return Bigger(); } else if ((kc_selvar_1_1->prod_sel() == sel_Conspaths) && (kc_selvar_1_2->prod_sel() == sel_Nilpaths)) { return Smaller(); } else if ((kc_selvar_1_1->prod_sel() == sel_Nilpaths) && (kc_selvar_1_2->prod_sel() == sel_Nilpaths)) { return Equal(); } else { kc_no_default_in_with( "equal_paths", __LINE__, __FILE__ ); return static_cast(0); } } } } } } } void check_rewrite_patterns(rewriterulesinfo rri) { elem_patternrepresentation outmost_nl = f_outmost_nl_preds_in_rewriterulesinfo(rri); if (outmost_nl) v_report(Warning(FileLine( outmost_nl->file, outmost_nl->line ), Problem1S("Cannot handle outmost non-leaf predicates"))); patternrepresentations prs = Nilpatternrepresentations(); { rewriterulesinfo kc_fe_selvar_1 = rri; while( kc_fe_selvar_1->prod_sel() == sel_Consrewriterulesinfo ) { rewriteruleinfo kc_selvar_0_1 = kc_fe_selvar_1->rewriteruleinfo_1; { { if ((kc_selvar_0_1->prod_sel() == sel_Rewriteruleinfo)) { const patternrepresentation pr = phylum_cast(kc_selvar_0_1)->patternrepresentation_1; prs = Conspatternrepresentations(pr, prs); } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->rewriterulesinfo_1; } } check_patterns(prs); prs->freelist(); } void check_with_patterns(withcasesinfo wcs) { patternrepresentations prs = Nilpatternrepresentations(), prs_rev; { withcasesinfo kc_fe_selvar_1 = wcs; while( kc_fe_selvar_1->prod_sel() == sel_Conswithcasesinfo ) { withcaseinfo kc_selvar_0_1 = kc_fe_selvar_1->withcaseinfo_1; { { if ((kc_selvar_0_1->prod_sel() == sel_Withcaseinfo)) { const patternrepresentation pr = phylum_cast(kc_selvar_0_1)->patternrepresentation_1; prs = Conspatternrepresentations(pr, prs); } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->withcasesinfo_1; } } prs_rev=prs->reverse(); check_patterns(prs_rev); prs->freelist(); prs_rev->freelist(); } void check_unparse_patterns(unparsedeclsinfo udi) { elem_patternrepresentation outmost_nl = f_outmost_nl_preds_in_unparsedeclsinfo(udi); if (outmost_nl) v_report(Warning(FileLine( outmost_nl->file, outmost_nl->line ), Problem1S("Cannot handle outmost non-leaf predicates"))); patternrepresentations prs = Nilpatternrepresentations(); { unparsedeclsinfo kc_fe_selvar_1 = udi; while( kc_fe_selvar_1->prod_sel() == sel_Consunparsedeclsinfo ) { unparsedeclinfo kc_selvar_0_1 = kc_fe_selvar_1->unparsedeclinfo_1; { { if ((kc_selvar_0_1->prod_sel() == sel_Unparsedeclinfo)) { const patternrepresentation pr = phylum_cast(kc_selvar_0_1)->patternrepresentation_1; prs = Conspatternrepresentations(pr, prs); } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->unparsedeclsinfo_1; } } check_patterns(prs); prs->freelist(); } void check_patterns(patternrepresentations prs) { if (prs->is_nil() || prs->patternrepresentations_1->is_nil()) return; patternrepresentations iterate = prs; while (!prs->patternrepresentations_1->is_nil()) { { patternrepresentations kc_fe_selvar_1 = prs->patternrepresentations_1; while( kc_fe_selvar_1->prod_sel() == sel_Conspatternrepresentations ) { patternrepresentation kc_selvar_0_1 = kc_fe_selvar_1->patternrepresentation_1; { { { const patternrepresentation pr2 = kc_selvar_0_1; compare_patterns(prs->patternrepresentation_1, pr2, prs); } } } kc_fe_selvar_1 = kc_fe_selvar_1->patternrepresentations_1; } } prs=prs->patternrepresentations_1; } } patternrepresentation next(patternrepresentation p) { return p->patternrepresentation_1; } elem_patternrepresentation elem(patternrepresentation p) { return p->elem_patternrepresentation_1; } void compare_patterns(patternrepresentation pr1, patternrepresentation pr2, patternrepresentations other_patterns) { bool pr1_isMoreSpecific = false, pr2_isMoreSpecific = false; elem_patternrepresentation epr1 = elem(pr1), epr2 = elem(pr2); patternrepresentation i1 = pr1, i2 = pr2, intersection = Nilpatternrepresentation(); while(!(i1->is_nil() || i2->is_nil())) { if (elem(i1)->eq(elem(i2))) { intersection->append(elem(i1)); i1=next(i1); i2=next(i2); } else { { elem_patternrepresentation kc_selvar_0_1 = phylum_cast(elem(i1)); elem_patternrepresentation kc_selvar_0_2 = phylum_cast( elem(i2)); if ((kc_selvar_0_1->prod_sel() == sel_PRWildcard) && (kc_selvar_0_2->prod_sel() == sel_PRWildcard)) { if(g_options.verbose) { printf("Don't know how to compare these yet:\n"); printf("%s:%d ", epr1->file->name, epr1->line); elem(i1)->print(); printf("%s:%d ", epr2->file->name, epr2->line); elem(i2)->print(); } return; } else if ((kc_selvar_0_1->prod_sel() == sel_PRDefault) && (kc_selvar_0_2->prod_sel() == sel_PRDefault)) { if(g_options.verbose) { printf("Don't know how to compare these yet:\n"); printf("%s:%d ", epr1->file->name, epr1->line); elem(i1)->print(); printf("%s:%d ", epr2->file->name, epr2->line); elem(i2)->print(); } return; } else if ((kc_selvar_0_1->prod_sel() == sel_PRIntLiteral) && (kc_selvar_0_2->prod_sel() == sel_PRStringLiteral)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; { tribool kc_selvar_1_1 = phylum_cast(equal_path( a_path1, a_path2 )); if ((kc_selvar_1_1->prod_sel() == sel_Bigger)) { pr2_isMoreSpecific=true; intersection->append(elem(i2)); i2=next(i2); } else if ((kc_selvar_1_1->prod_sel() == sel_Smaller)) { pr1_isMoreSpecific=true; intersection->append(elem(i1)); i1=next(i1); } else if ((kc_selvar_1_1->prod_sel() == sel_Equal)) { return; } else kc_no_default_in_with( "compare_patterns", __LINE__, __FILE__ ); } } else if ((kc_selvar_0_1->prod_sel() == sel_PRStringLiteral) && (kc_selvar_0_2->prod_sel() == sel_PRIntLiteral)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; { tribool kc_selvar_1_1 = phylum_cast(equal_path( a_path1, a_path2 )); if ((kc_selvar_1_1->prod_sel() == sel_Bigger)) { pr2_isMoreSpecific=true; intersection->append(elem(i2)); i2=next(i2); } else if ((kc_selvar_1_1->prod_sel() == sel_Smaller)) { pr1_isMoreSpecific=true; intersection->append(elem(i1)); i1=next(i1); } else if ((kc_selvar_1_1->prod_sel() == sel_Equal)) { return; } else kc_no_default_in_with( "compare_patterns", __LINE__, __FILE__ ); } } else if ((kc_selvar_0_1->prod_sel() == sel_PROperPredicate) && (kc_selvar_0_2->prod_sel() == sel_PRIntLiteral)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; { tribool kc_selvar_1_1 = phylum_cast(equal_path( a_path1, a_path2 )); if ((kc_selvar_1_1->prod_sel() == sel_Bigger)) { pr2_isMoreSpecific=true; intersection->append(elem(i2)); i2=next(i2); } else if ((kc_selvar_1_1->prod_sel() == sel_Smaller)) { pr1_isMoreSpecific=true; intersection->append(elem(i1)); i1=next(i1); } else if ((kc_selvar_1_1->prod_sel() == sel_Equal)) { return; } else kc_no_default_in_with( "compare_patterns", __LINE__, __FILE__ ); } } else if ((kc_selvar_0_1->prod_sel() == sel_PRIntLiteral) && (kc_selvar_0_2->prod_sel() == sel_PROperPredicate)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; { tribool kc_selvar_1_1 = phylum_cast(equal_path( a_path1, a_path2 )); if ((kc_selvar_1_1->prod_sel() == sel_Bigger)) { pr2_isMoreSpecific=true; intersection->append(elem(i2)); i2=next(i2); } else if ((kc_selvar_1_1->prod_sel() == sel_Smaller)) { pr1_isMoreSpecific=true; intersection->append(elem(i1)); i1=next(i1); } else if ((kc_selvar_1_1->prod_sel() == sel_Equal)) { return; } else kc_no_default_in_with( "compare_patterns", __LINE__, __FILE__ ); } } else if ((kc_selvar_0_1->prod_sel() == sel_PROperPredicate) && (kc_selvar_0_2->prod_sel() == sel_PRStringLiteral)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; { tribool kc_selvar_1_1 = phylum_cast(equal_path( a_path1, a_path2 )); if ((kc_selvar_1_1->prod_sel() == sel_Bigger)) { pr2_isMoreSpecific=true; intersection->append(elem(i2)); i2=next(i2); } else if ((kc_selvar_1_1->prod_sel() == sel_Smaller)) { pr1_isMoreSpecific=true; intersection->append(elem(i1)); i1=next(i1); } else if ((kc_selvar_1_1->prod_sel() == sel_Equal)) { return; } else kc_no_default_in_with( "compare_patterns", __LINE__, __FILE__ ); } } else if ((kc_selvar_0_1->prod_sel() == sel_PRStringLiteral) && (kc_selvar_0_2->prod_sel() == sel_PROperPredicate)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; { tribool kc_selvar_1_1 = phylum_cast(equal_path( a_path1, a_path2 )); if ((kc_selvar_1_1->prod_sel() == sel_Bigger)) { pr2_isMoreSpecific=true; intersection->append(elem(i2)); i2=next(i2); } else if ((kc_selvar_1_1->prod_sel() == sel_Smaller)) { pr1_isMoreSpecific=true; intersection->append(elem(i1)); i1=next(i1); } else if ((kc_selvar_1_1->prod_sel() == sel_Equal)) { return; } else kc_no_default_in_with( "compare_patterns", __LINE__, __FILE__ ); } } else if ((kc_selvar_0_1->prod_sel() == sel_PRIntLiteral) && (kc_selvar_0_2->prod_sel() == sel_PRIntLiteral)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; { tribool kc_selvar_1_1 = phylum_cast(equal_path( a_path1, a_path2 )); if ((kc_selvar_1_1->prod_sel() == sel_Bigger)) { pr2_isMoreSpecific=true; intersection->append(elem(i2)); i2=next(i2); } else if ((kc_selvar_1_1->prod_sel() == sel_Smaller)) { pr1_isMoreSpecific=true; intersection->append(elem(i1)); i1=next(i1); } else if ((kc_selvar_1_1->prod_sel() == sel_Equal)) { return; } else kc_no_default_in_with( "compare_patterns", __LINE__, __FILE__ ); } } else if ((kc_selvar_0_1->prod_sel() == sel_PRStringLiteral) && (kc_selvar_0_2->prod_sel() == sel_PRStringLiteral)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; { tribool kc_selvar_1_1 = phylum_cast(equal_path( a_path1, a_path2 )); if ((kc_selvar_1_1->prod_sel() == sel_Bigger)) { pr2_isMoreSpecific=true; intersection->append(elem(i2)); i2=next(i2); } else if ((kc_selvar_1_1->prod_sel() == sel_Smaller)) { pr1_isMoreSpecific=true; intersection->append(elem(i1)); i1=next(i1); } else if ((kc_selvar_1_1->prod_sel() == sel_Equal)) { return; } else kc_no_default_in_with( "compare_patterns", __LINE__, __FILE__ ); } } else if ((kc_selvar_0_1->prod_sel() == sel_PROperPredicate) && (kc_selvar_0_2->prod_sel() == sel_PROperPredicate)) { const path a_path1 = phylum_cast(kc_selvar_0_1)->path_1; const path a_path2 = phylum_cast(kc_selvar_0_2)->path_1; { tribool kc_selvar_1_1 = phylum_cast(equal_path( a_path1, a_path2 )); if ((kc_selvar_1_1->prod_sel() == sel_Bigger)) { pr2_isMoreSpecific=true; intersection->append(elem(i2)); i2=next(i2); } else if ((kc_selvar_1_1->prod_sel() == sel_Smaller)) { pr1_isMoreSpecific=true; intersection->append(elem(i1)); i1=next(i1); } else if ((kc_selvar_1_1->prod_sel() == sel_Equal)) { return; } else kc_no_default_in_with( "compare_patterns", __LINE__, __FILE__ ); } } else if ((kc_selvar_0_1->prod_sel() == sel_PRWildcard)) { return; } else if ((kc_selvar_0_1->prod_sel() == sel_PRDefault)) { return; } else if ((kc_selvar_0_2->prod_sel() == sel_PRWildcard)) { return; } else if ((kc_selvar_0_2->prod_sel() == sel_PRDefault)) { return; } else { if(g_options.verbose) { printf("Don't know how to compare these yet:\n"); printf("%s:%d ", epr1->file->name, epr1->line); elem(i1)->print(); printf("%s:%d ", epr2->file->name, epr2->line); elem(i2)->print(); } return; } } } } if (!(i1->is_nil() && i2->is_nil())) { patternrepresentation new_intersect; if (i1->is_nil()) { new_intersect = concat(intersection, i2); pr2_isMoreSpecific = true; } else { new_intersect = concat(intersection, i1); pr1_isMoreSpecific = true; } intersection->freelist(); intersection=new_intersect; } if (!pr1_isMoreSpecific && !pr2_isMoreSpecific) { if (g_options.warn_equivalent_patterns) v_report(Warning(FileLine( epr1->file, epr1->line ), Problem3S1int1S("pattern equivalent to", epr2->file->name, "line", epr2->line, "(will never match)") )); } else if (!pr1_isMoreSpecific || !pr2_isMoreSpecific) { return; } else { bool I_had_better = false; { patternrepresentations kc_fe_selvar_1 = other_patterns; while( kc_fe_selvar_1->prod_sel() == sel_Conspatternrepresentations ) { patternrepresentation kc_selvar_0_1 = kc_fe_selvar_1->patternrepresentation_1; { { { const patternrepresentation pr = kc_selvar_0_1; if (pr->eq(intersection)) I_had_better = true; } } } kc_fe_selvar_1 = kc_fe_selvar_1->patternrepresentations_1; } } if (!I_had_better && g_options.warn_overlapping_patterns) v_report(Warning(FileLine( epr1->file, epr1->line ), Problem3S1int1S("pattern overlaps", epr2->file->name, "line", epr2->line, "(which will match?)") )); } } } // namespace kc kimwitu++-2.3.13/src/Gen.boot/defs.h0000644000175000017500000000101511135163773015475 0ustar useruser/* this file is automatically generated by 'make'; do not edit! */ #ifndef DEFS_H # define RCSMAKEID "@(#)$Id: Makefile.in,v 1.43 2008/02/06 20:28:58 piefel Exp $" # define KIMWITUCOPYRIGHT "@(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $" # define KC_USE_STAT # define KIMWITURELEASE "@(#)RELEASE VERSION 2.3.13" # define KIMWITUVERSIONSTRING "2.3.13" # define METAKIMWITUVERSIONMAJOR 2 # define METAKIMWITUVERSIONMINOR 3 # define METAKIMWITUVERSIONMICRO 13 #endif /* DEFS_H */ kimwitu++-2.3.13/src/Gen.boot/unpk.cc0000644000175000017500000300145411135163773015701 0ustar useruser/* translation of file(s) "abs.k" "main.k" "parse.k" "error.k" "occur.k" "util.k" "gen.k" "gutil.k" "pat.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #define KC_UNPARSE #include #include #include #include "k.h" #include "unpk.h" namespace kc { base_uview_class base_uview; view_filename_class view_filename; view_error_class view_error; view_error_tID_class view_error_tID; view_check_class view_check; view_check_count_class view_check_count; view_check_count1_class view_check_count1; view_check_outmostopers_in_phylum_class view_check_outmostopers_in_phylum; view_set_type_class view_set_type; view_check_is_var_class view_check_is_var; view_gen_initializephyla_c_class view_gen_initializephyla_c; view_check_u_class view_check_u; view_check_r_class view_check_r; view_check_viewnames_class view_check_viewnames; view_check_uniq_class view_check_uniq; view_check_uniq1_class view_check_uniq1; view_check_uniq2_class view_check_uniq2; view_make_patternreps_class view_make_patternreps; view_printer_outputfileline_class view_printer_outputfileline; view_printer_reset_class view_printer_reset; view_no_of_printed_string_chars_reset_class view_no_of_printed_string_chars_reset; view_open_namespace_class view_open_namespace; view_close_namespace_class view_close_namespace; view_gen_k_h_class view_gen_k_h; view_gen_end_k_h_class view_gen_end_k_h; view_gen_k_c_class view_gen_k_c; view_gen_alloc_h_class view_gen_alloc_h; view_gen_alloc_c_class view_gen_alloc_c; view_gen_deprecated_class view_gen_deprecated; view_gen_enumphyla_h_class view_gen_enumphyla_h; view_gen_enumoperators_h_class view_gen_enumoperators_h; view_gen_operatormap_type_h_class view_gen_operatormap_type_h; view_gen_phylummap_c_class view_gen_phylummap_c; view_gen_operatormap_c_class view_gen_operatormap_c; view_count_args_class view_count_args; view_count_attrs_class view_count_attrs; view_count_nonstaticmembers_class view_count_nonstaticmembers; view_gen_operatormap_subphyla_class view_gen_operatormap_subphyla; view_gen_operatormap_attributes_class view_gen_operatormap_attributes; view_gen_uniqmap_c_class view_gen_uniqmap_c; view_gen_uniqmap_c_1_class view_gen_uniqmap_c_1; view_gen_uniqmap_c_2_class view_gen_uniqmap_c_2; view_gen_nodetypedefs_h_class view_gen_nodetypedefs_h; view_gen_nodetypes_h_class view_gen_nodetypes_h; view_gen_yaccstacktype_h_class view_gen_yaccstacktype_h; view_gen_noofoperators_h_class view_gen_noofoperators_h; view_gen_assertmacros_h_class view_gen_assertmacros_h; view_gen_assertmacros_c_class view_gen_assertmacros_c; view_gen_operatordecls_h_class view_gen_operatordecls_h; view_gen_operatorcast_h_class view_gen_operatorcast_h; view_gen_operatordefs_c_class view_gen_operatordefs_c; view_gen_operatordefs_c_0_class view_gen_operatordefs_c_0; view_gen_operatordefs_c_1_class view_gen_operatordefs_c_1; view_gen_operatordefs_c_2_class view_gen_operatordefs_c_2; view_gen_initializephyla_whiletest_c_class view_gen_initializephyla_whiletest_c; view_gen_initializephyla_init_el_c_class view_gen_initializephyla_init_el_c; view_gen_initializephyla_update_loop_c_class view_gen_initializephyla_update_loop_c; view_gen_operatordefs_nonhash_c_class view_gen_operatordefs_nonhash_c; view_gen_operatordefs_hash_c_class view_gen_operatordefs_hash_c; view_gen_access_functions_class view_gen_access_functions; view_gen_create_function_class view_gen_create_function; view_gen_attributeOf_function_class view_gen_attributeOf_function; view_gen_argseqnr_class view_gen_argseqnr; view_gen_fnarg_asserts_class view_gen_fnarg_asserts; view_gen_fnarg_and_decls_class view_gen_fnarg_and_decls; view_gen_fnarg_and_decls_predef_class view_gen_fnarg_and_decls_predef; view_gen_assignments_class view_gen_assignments; view_gen_assignment_inis_class view_gen_assignment_inis; view_gen_user_assignment_inis_class view_gen_user_assignment_inis; view_gen_assignments_predef_class view_gen_assignments_predef; view_gen_assignments_predef_ini_class view_gen_assignments_predef_ini; view_gen_test_class view_gen_test; view_gen_error_decls_h_class view_gen_error_decls_h; view_gen_error_defs_c_class view_gen_error_defs_c; view_gen_printdotdecls_h_class view_gen_printdotdecls_h; view_gen_printdotdefs_c_class view_gen_printdotdefs_c; view_gen_printdotedges_c_class view_gen_printdotedges_c; view_gen_listdecls_h_class view_gen_listdecls_h; view_gen_listdefs_c_class view_gen_listdefs_c; view_gen_includes_class view_gen_includes; view_do_gen_includes_class view_do_gen_includes; view_gen_csgio_start_h_class view_gen_csgio_start_h; view_gen_csgio_end_h_class view_gen_csgio_end_h; view_gen_csgio_h_class view_gen_csgio_h; view_gen_csgio_start_c_class view_gen_csgio_start_c; view_gen_csgio_c_class view_gen_csgio_c; view_gen_copy_attributes_c_class view_gen_copy_attributes_c; view_gen_copydefs_c_class view_gen_copydefs_c; view_gen_rewritek_h_class view_gen_rewritek_h; view_gen_end_rewritek_h_class view_gen_end_rewritek_h; view_gen_rewritek_c_class view_gen_rewritek_c; view_gen_rewritedefs_c_class view_gen_rewritedefs_c; view_gen_rewritedefs_default_c_class view_gen_rewritedefs_default_c; view_gen_rewritedefs_other_c_class view_gen_rewritedefs_other_c; view_gen_rewritedefs_rewritearg_c_class view_gen_rewritedefs_rewritearg_c; view_gen_rewritedefs_nl_arg_c_class view_gen_rewritedefs_nl_arg_c; view_gen_rewritedefs_testarg_c_class view_gen_rewritedefs_testarg_c; view_gen_rewritedefs_dotestarg_c_class view_gen_rewritedefs_dotestarg_c; view_gen_rewritedefs_args_c_class view_gen_rewritedefs_args_c; view_gen_rewritedefs_body_c_class view_gen_rewritedefs_body_c; view_gen_withcases_and_default_class view_gen_withcases_and_default; view_rw_predicates_class view_rw_predicates; view_wc_predicates_class view_wc_predicates; view_unp_predicates_class view_unp_predicates; view_wc_bindings_class view_wc_bindings; view_unp_bindings_class view_unp_bindings; view_rw_bindings_class view_rw_bindings; view_gen_fnk_h_class view_gen_fnk_h; view_gen_fnkdecls_c_class view_gen_fnkdecls_c; view_gen_fnk_c_class view_gen_fnk_c; view_gen_fn_pointer_name_class view_gen_fn_pointer_name; view_gen_fnkargs_class view_gen_fnkargs; view_gen_fnkdecls_class view_gen_fnkdecls; view_gen_fns_start_h_class view_gen_fns_start_h; view_gen_fns_end_h_class view_gen_fns_end_h; view_gen_fns_start_c_class view_gen_fns_start_c; view_gen_fns_owninclude_c_class view_gen_fns_owninclude_c; view_gen_unpk_h_class view_gen_unpk_h; view_gen_unparsedecls_h_class view_gen_unparsedecls_h; view_gen_rewritedecls_h_class view_gen_rewritedecls_h; view_uview_def_class view_uview_def; view_gen_end_unpk_h_class view_gen_end_unpk_h; view_gen_unpk_c_class view_gen_unpk_c; view_gen_default_types_unpk_c_class view_gen_default_types_unpk_c; view_gen_unparsedefs_c_class view_gen_unparsedefs_c; view_gen_unparsedefs_other_c_class view_gen_unparsedefs_other_c; view_gen_unpstr_c_class view_gen_unpstr_c; view_gen_user_predicates_class view_gen_user_predicates; view_predicate_bindings_class view_predicate_bindings; view_checklanguagenames_class view_checklanguagenames; view_output_collection_class view_output_collection; view_gen_classdecls1_h_class view_gen_classdecls1_h; view_gen_classdecls2_h_class view_gen_classdecls2_h; view_gen_classdefs_c_class view_gen_classdefs_c; view_gen_subphylumdefs_c_class view_gen_subphylumdefs_c; view_gen_cast_class view_gen_cast; view_gen_hashtables_h_class view_gen_hashtables_h; view_gen_hashtables_c_class view_gen_hashtables_c; view_gen_yxx_union_h_class view_gen_yxx_union_h; view_gen_member_dcl_h_class view_gen_member_dcl_h; view_gen_set_subphylumdefs_c_class view_gen_set_subphylumdefs_c; view_gen_viewvars_c_class view_gen_viewvars_c; view_gen_argseqnr_rec_class view_gen_argseqnr_rec; view_gen_opt_const_class view_gen_opt_const; view_uview_class_decl_class view_uview_class_decl; view_uview_class_def_class view_uview_class_def; view_rview_class_decl_class view_rview_class_decl; view_rview_class_def_class view_rview_class_def; view_collect_strings_class view_collect_strings; view_class_of_op_class view_class_of_op; view_class_of_phy_class view_class_of_phy; view_gen_base_init_expression_list_class view_gen_base_init_expression_list; impl_uviews uviews[] = { {"base_uview",&base_uview}, {"view_error_format", 0}, {"view_filename",&view_filename}, {"view_error",&view_error}, {"view_error_tID",&view_error_tID}, {"view_check",&view_check}, {"view_check_count",&view_check_count}, {"view_check_count1",&view_check_count1}, {"view_check_outmostopers_in_phylum",&view_check_outmostopers_in_phylum}, {"view_set_type",&view_set_type}, {"view_check_is_var",&view_check_is_var}, {"view_gen_initializephyla_c",&view_gen_initializephyla_c}, {"view_check_u",&view_check_u}, {"view_check_r",&view_check_r}, {"view_check_viewnames",&view_check_viewnames}, {"view_check_uniq",&view_check_uniq}, {"view_check_uniq1",&view_check_uniq1}, {"view_check_uniq2",&view_check_uniq2}, {"view_make_patternreps",&view_make_patternreps}, {"view_printer_outputfileline",&view_printer_outputfileline}, {"view_printer_reset",&view_printer_reset}, {"view_no_of_printed_string_chars_reset",&view_no_of_printed_string_chars_reset}, {"view_open_namespace",&view_open_namespace}, {"view_close_namespace",&view_close_namespace}, {"view_gen_k_h",&view_gen_k_h}, {"view_gen_end_k_h",&view_gen_end_k_h}, {"view_gen_k_c",&view_gen_k_c}, {"view_gen_alloc_h",&view_gen_alloc_h}, {"view_gen_alloc_c",&view_gen_alloc_c}, {"view_gen_deprecated",&view_gen_deprecated}, {"view_gen_enumphyla_h",&view_gen_enumphyla_h}, {"view_gen_enumoperators_h",&view_gen_enumoperators_h}, {"view_gen_operatormap_type_h",&view_gen_operatormap_type_h}, {"view_gen_phylummap_c",&view_gen_phylummap_c}, {"view_gen_operatormap_c",&view_gen_operatormap_c}, {"view_count_args",&view_count_args}, {"view_count_attrs",&view_count_attrs}, {"view_count_nonstaticmembers",&view_count_nonstaticmembers}, {"view_gen_operatormap_subphyla",&view_gen_operatormap_subphyla}, {"view_gen_operatormap_attributes",&view_gen_operatormap_attributes}, {"view_gen_uniqmap_c",&view_gen_uniqmap_c}, {"view_gen_uniqmap_c_1",&view_gen_uniqmap_c_1}, {"view_gen_uniqmap_c_2",&view_gen_uniqmap_c_2}, {"view_gen_nodetypedefs_h",&view_gen_nodetypedefs_h}, {"view_gen_nodetypes_h",&view_gen_nodetypes_h}, {"view_gen_yaccstacktype_h",&view_gen_yaccstacktype_h}, {"view_gen_noofoperators_h",&view_gen_noofoperators_h}, {"view_gen_assertmacros_h",&view_gen_assertmacros_h}, {"view_gen_assertmacros_c",&view_gen_assertmacros_c}, {"view_gen_operatordecls_h",&view_gen_operatordecls_h}, {"view_gen_operatorcast_h",&view_gen_operatorcast_h}, {"view_gen_operatordefs_c",&view_gen_operatordefs_c}, {"view_gen_operatordefs_c_0",&view_gen_operatordefs_c_0}, {"view_gen_operatordefs_c_1",&view_gen_operatordefs_c_1}, {"view_gen_operatordefs_c_2",&view_gen_operatordefs_c_2}, {"view_gen_initializephyla_whiletest_c",&view_gen_initializephyla_whiletest_c}, {"view_gen_initializephyla_init_el_c",&view_gen_initializephyla_init_el_c}, {"view_gen_initializephyla_update_loop_c",&view_gen_initializephyla_update_loop_c}, {"view_gen_operatordefs_nonhash_c",&view_gen_operatordefs_nonhash_c}, {"view_gen_operatordefs_hash_c",&view_gen_operatordefs_hash_c}, {"view_gen_access_functions",&view_gen_access_functions}, {"view_gen_create_function",&view_gen_create_function}, {"view_gen_attributeOf_function",&view_gen_attributeOf_function}, {"view_gen_argseqnr",&view_gen_argseqnr}, {"view_gen_fnarg_asserts",&view_gen_fnarg_asserts}, {"view_gen_fnarg_and_decls",&view_gen_fnarg_and_decls}, {"view_gen_fnarg_and_decls_predef",&view_gen_fnarg_and_decls_predef}, {"view_gen_assignments",&view_gen_assignments}, {"view_gen_assignment_inis",&view_gen_assignment_inis}, {"view_gen_user_assignment_inis",&view_gen_user_assignment_inis}, {"view_gen_assignments_predef",&view_gen_assignments_predef}, {"view_gen_assignments_predef_ini",&view_gen_assignments_predef_ini}, {"view_gen_test",&view_gen_test}, {"view_gen_error_decls_h",&view_gen_error_decls_h}, {"view_gen_error_defs_c",&view_gen_error_defs_c}, {"view_gen_printdotdecls_h",&view_gen_printdotdecls_h}, {"view_gen_printdotdefs_c",&view_gen_printdotdefs_c}, {"view_gen_printdotedges_c",&view_gen_printdotedges_c}, {"view_gen_listdecls_h",&view_gen_listdecls_h}, {"view_gen_listdefs_c",&view_gen_listdefs_c}, {"view_gen_includes",&view_gen_includes}, {"view_do_gen_includes",&view_do_gen_includes}, {"view_gen_csgio_start_h",&view_gen_csgio_start_h}, {"view_gen_csgio_end_h",&view_gen_csgio_end_h}, {"view_gen_csgio_h",&view_gen_csgio_h}, {"view_gen_csgio_start_c",&view_gen_csgio_start_c}, {"view_gen_csgio_c",&view_gen_csgio_c}, {"view_gen_copy_attributes_c",&view_gen_copy_attributes_c}, {"view_gen_copydefs_c",&view_gen_copydefs_c}, {"view_gen_rewritek_h",&view_gen_rewritek_h}, {"view_gen_end_rewritek_h",&view_gen_end_rewritek_h}, {"view_gen_rewritek_c",&view_gen_rewritek_c}, {"view_gen_rewritedefs_c",&view_gen_rewritedefs_c}, {"view_gen_rewritedefs_default_c",&view_gen_rewritedefs_default_c}, {"view_gen_rewritedefs_other_c",&view_gen_rewritedefs_other_c}, {"view_gen_rewritedefs_rewritearg_c",&view_gen_rewritedefs_rewritearg_c}, {"view_gen_rewritedefs_nl_arg_c",&view_gen_rewritedefs_nl_arg_c}, {"view_gen_rewritedefs_testarg_c",&view_gen_rewritedefs_testarg_c}, {"view_gen_rewritedefs_dotestarg_c",&view_gen_rewritedefs_dotestarg_c}, {"view_gen_rewritedefs_args_c",&view_gen_rewritedefs_args_c}, {"view_gen_rewritedefs_body_c",&view_gen_rewritedefs_body_c}, {"view_gen_withcases_and_default",&view_gen_withcases_and_default}, {"view_rw_predicates",&view_rw_predicates}, {"view_wc_predicates",&view_wc_predicates}, {"view_unp_predicates",&view_unp_predicates}, {"view_wc_bindings",&view_wc_bindings}, {"view_unp_bindings",&view_unp_bindings}, {"view_rw_bindings",&view_rw_bindings}, {"view_gen_fnk_h",&view_gen_fnk_h}, {"view_gen_fnkdecls_c",&view_gen_fnkdecls_c}, {"view_gen_fnk_c",&view_gen_fnk_c}, {"view_gen_fn_pointer_name",&view_gen_fn_pointer_name}, {"view_gen_fnkargs",&view_gen_fnkargs}, {"view_gen_fnkdecls",&view_gen_fnkdecls}, {"view_gen_fns_start_h",&view_gen_fns_start_h}, {"view_gen_fns_end_h",&view_gen_fns_end_h}, {"view_gen_fns_start_c",&view_gen_fns_start_c}, {"view_gen_fns_owninclude_c",&view_gen_fns_owninclude_c}, {"view_gen_unpk_h",&view_gen_unpk_h}, {"view_gen_unparsedecls_h",&view_gen_unparsedecls_h}, {"view_gen_rewritedecls_h",&view_gen_rewritedecls_h}, {"view_uview_def",&view_uview_def}, {"view_gen_end_unpk_h",&view_gen_end_unpk_h}, {"view_gen_unpk_c",&view_gen_unpk_c}, {"view_gen_default_types_unpk_c",&view_gen_default_types_unpk_c}, {"view_gen_unparsedefs_c",&view_gen_unparsedefs_c}, {"view_gen_unparsedefs_default_c", 0}, {"view_gen_unparsedefs_other_c",&view_gen_unparsedefs_other_c}, {"view_gen_unpstr_c",&view_gen_unpstr_c}, {"view_gen_user_predicates",&view_gen_user_predicates}, {"view_predicate_bindings",&view_predicate_bindings}, {"view_checklanguagenames",&view_checklanguagenames}, {"view_output_collection",&view_output_collection}, {"view_gen_classdecls1_h",&view_gen_classdecls1_h}, {"view_gen_classdecls2_h",&view_gen_classdecls2_h}, {"view_gen_classdefs_c",&view_gen_classdefs_c}, {"view_gen_subphylumdefs_c",&view_gen_subphylumdefs_c}, {"view_gen_cast",&view_gen_cast}, {"view_gen_hashtables_h",&view_gen_hashtables_h}, {"view_gen_hashtables_c",&view_gen_hashtables_c}, {"view_gen_yxx_union_h",&view_gen_yxx_union_h}, {"view_gen_member_dcl_h",&view_gen_member_dcl_h}, {"view_gen_set_subphylumdefs_c",&view_gen_set_subphylumdefs_c}, {"view_gen_viewvars_c",&view_gen_viewvars_c}, {"view_gen_argseqnr_rec",&view_gen_argseqnr_rec}, {"view_gen_opt_const",&view_gen_opt_const}, {"view_uview_class_decl",&view_uview_class_decl}, {"view_uview_class_def",&view_uview_class_def}, {"view_rview_class_decl",&view_rview_class_decl}, {"view_rview_class_def",&view_rview_class_def}, {"view_collect_strings",&view_collect_strings}, {"view_class_of_op",&view_class_of_op}, {"view_class_of_phy",&view_class_of_phy}, {"view_gen_base_init_expression_list",&view_gen_base_init_expression_list}, {0,0} }; } // namespace kc namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // #include "util.h" #include "occur.h" static int cl_scope = 0; #include static std::stack outmostoperators; static std::stack dollarvarsallowed; static std::stack inforeachcontext; static std::stack argumentsstack; static std::stack phylumstack; static std::stack phylumnamesstack; static std::stack withexpressionsstack; static std::stack operatorstack; static std::stack variablesstack; #include "parse.h" static ID cl_uniqueID = 0; static ID cl_storageID = 0; #include "pat.h" /* for syn_outmostpatterns and v_resetbindingidmarks */ extern unparseitems The_current_unparseitems; #include "defs.h" #define FMOP 38 #define FMSZ 3 #define FMNCR 8 #define FMNCRD 8 #define FMEXIST 8 #define FMFRNC 8 #define FMFRRC 8 #define FMFREED 8 #define FMREM 8 #define FMTOT 9 const char* preDefTypeAndName[][2] = { {"", ""}, {"kc_char_t const*", "name"}, {"kc_char_t const*", "name"}, {"REAL", "value"}, {"INTEGER", "value"}, {"void*", "pointer"}}; #include "gen.h" // Definition of the view class for view_gen_unparsedefs_default_c; // it contains an additional var to indicate whether we are unparsing a list pylum // and another to show whether the user has supplied rules for the base view struct view_gen_unparsedefs_default_c_class :view_gen_unparsedefs_default_c_baseclass { bool isList; bool isOnlyDefault; view_gen_unparsedefs_default_c_class(bool LonL, bool oD): isList(LonL), isOnlyDefault(oD) { } }; view_gen_unparsedefs_default_c_class view_gen_unparsedefs_default_c(false, false); // To avoid covariant return types for broken compilers, we want to have three choices: // Use them, don't use them, generate both and decide with preprocessor macros // extended version: typename also in function name void covariant_choice(ID yest, const char* yess1, const char* yess2, const char *no1, const char *no2, printer_functor kc_printer, uview kc_current_view) { kc_printer("\n", kc_current_view); if (g_options.covariant == 'p') kc_printer("#ifndef NO_COVARIANT_RETURN\n", kc_current_view); if (g_options.covariant != 'n') { yest->unparse(kc_printer, kc_current_view); kc_printer(yess1, kc_current_view); if (yess2!=0) { yest->unparse(kc_printer, kc_current_view); kc_printer(yess2, kc_current_view); } } if (g_options.covariant == 'p') kc_printer("\n#else\n", kc_current_view); if (g_options.covariant != 'y') { kc_printer(no1, kc_current_view); if (no2!=0) { yest->unparse(kc_printer, kc_current_view); kc_printer(no2, kc_current_view); } } if (g_options.covariant == 'p') kc_printer("\n#endif // NO_COVARIANT_RETURN\n", kc_current_view); } // short version: typename exactly once inline void covariant_choice(ID yest, const char* yess, const char *no, printer_functor kc_printer, uview kc_current_view) { covariant_choice(yest, yess, 0, no, 0, kc_printer, kc_current_view); } // This printer functor doesn't print, but instead counts each of // its invocations. Handy to find out whether a future unparsing // will produce any output at all. class count_printer: public printer_functor_class { int count; public: count_printer(): count(0) { } virtual void operator()(const char* s, uview v) { count++;} int operator()() { return count;} }; #include "gutil.h" #include #include #include namespace { // everything here is local to unpk.cc int g_no_of_phyla; int g_no_of_operators; int gl_no_of_args; int gl_generic_counter; bool gl_isnotlist; std::map gl_bindings; const int PHYLUMNUMBEROFFSET=0; /* should be >= 0; == the index of the last dummy element */ const int OPERATORNUMBEROFFSET=0; /* should be >= 0; == the index of the last dummy element */ std::stack selvarstack; #define cf_pushselvar(o) do { selvarstack.push(o); \ g_ctext_level++; \ } while(0) #define cf_topselvar() selvarstack.top() #define cf_popselvar() do { selvarstack.pop();\ g_ctext_level--; \ } while(0) std::stack dollarvarstack; std::stack dollarvarextstack; ID gl_phylum = 0; phylumdeclaration gl_phydecl = 0; ID gl_view = 0; ID gl_operator = 0; alternative gl_alternative = 0; Ccode_option gl_cco = 0; storageoption gl_storageoption = 0; bool gl_atomicity; arguments gl_args = 0; ac_identifier_list gl_idents = 0; fndeclarations gl_members = 0; rewriterulesinfo gl_rewrite_rewriteinfo = 0; const char *g_emptystring = ""; int g_ctext_level = 0; int g_withexpr_nr = 0; int g_fe_selvar_nr = 0; const char *gl_return_type = ""; ID gl_return_ID = 0; int gl_star_count = 0; const char *gl_function = ""; ID gl_sto = 0; bool gl_rewrite_goto_used = false; bool gl_unparse_goto_used = false; ID gl_type = 0; int gl_j = 0; bool gl_print_line_directive = false; uview_enum gl_outer_view; } /* end included stuff */ namespace kc { #ifndef KC_TRACE_PROVIDED #define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND #endif void impl_abstract_phylum::unparse(printer_function opf, uview uv) { printer_functor_function_wrapper pf(opf); do_unparse(pf, uv); } // Everything given as a pointer is expected to have an unparse-method (we // believe it's a phylum), unless there's a specialisation for it void unparse(abstract_phylum kc_p, printer_functor kc_printer, uview kc_current_view) { kc_p->unparse(kc_printer, kc_current_view); } void unparse(void *kc_p, printer_functor kc_printer, uview kc_current_view) { // MPi: 20020628 there shouldn't be any left assertionFailed("Unparse called for untyped pointer"); // MPi: cast should be unnecessary, but there are still void* reinterpret_cast(kc_p)->unparse(kc_printer, kc_current_view); } void unparse(int kc_v, printer_functor kc_printer, uview kc_current_view) { kc_char_t kc_string[200]; kc_print_integer(kc_string, kc_v); kc_printer(kc_string, kc_current_view); } void unparse(double kc_v, printer_functor kc_printer, uview kc_current_view) { kc_char_t kc_string[200]; kc_print_real(kc_string, kc_v); kc_printer(kc_string, kc_current_view); } void unparse(kc_char_t *kc_v, printer_functor kc_printer, uview kc_current_view) { kc_printer(kc_v, kc_current_view); } void unparse(kc_string_t kc_v, printer_functor kc_printer, uview kc_current_view) { kc_printer(kc_v.c_str(), kc_current_view); } void impl_abstract_phylum::default_unparse(printer_functor kc_printer, uview kc_current_view) { register int no_sons = operator_info[prod_sel()].no_sons; for (int i=0; i < no_sons; i++) subphylum(i)->unparse(kc_printer, kc_current_view); } void impl_casestring__Str::do_unparse(printer_functor kc_printer, uview kc_current_view) { kc::unparse(name, kc_printer, kc_current_view); } void impl_nocasestring_NoCaseStr::do_unparse(printer_functor kc_printer, uview kc_current_view) { kc::unparse(name, kc_printer, kc_current_view); } void impl_integer__Int::do_unparse(printer_functor kc_printer, uview kc_current_view) { kc::unparse(value, kc_printer, kc_current_view); } void impl_real__Real::do_unparse(printer_functor kc_printer, uview kc_current_view) { kc::unparse(value, kc_printer, kc_current_view); } void impl_voidptr__VoidPtr::do_unparse(printer_functor kc_printer, uview kc_current_view) { kc::unparse(pointer, kc_printer, kc_current_view); } void impl_uniqID_Str::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring cs = this->casestring_1; kc::unparse(cs, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_ID_Id::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_class_of_phy_enum: { view_class_of_phy_class& kc_current_view=static_cast(kc_current_view_base); { const uniqID pid = this->uniqID_1; { kc_printer(kc_t("impl_"), kc_current_view); } kc::unparse(pid, kc_printer, kc_current_view); } break; } case view_class_of_op_enum: { view_class_of_op_class& kc_current_view=static_cast(kc_current_view_base); { const uniqID oid = this->uniqID_1; ID pid=f_phylumofoperator(this); if (f_listelementphylum(pid)->eq(f_emptyId())) { kc::unparse(pid, kc_printer, view_class_of_phy); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); } else { kc::unparse(pid, kc_printer, view_class_of_phy); } } break; } case view_output_collection_enum: { view_output_collection_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this/**/; { kc_printer(kc_t("char* kc_language_"), kc_current_view); } kc::unparse(id, kc_printer, base_uview); { kc_printer(kc_t(" [] = {\n"), kc_current_view); } } break; } case view_gen_fn_pointer_name_enum: { view_gen_fn_pointer_name_class& kc_current_view=static_cast(kc_current_view_base); if ((this->uniqID_1->prod_sel() == sel_Str)) { const ID id = this/**/; const uniqID uniqId = this->uniqID_1; const casestring s = phylum_cast(this->uniqID_1)->casestring_1; if(f_ispredefinedphylum(id) && strncmp(s->name, "abstract_", 9)!=0) { { kc_printer(kc_t("impl_"), kc_current_view); } kc::unparse(uniqId, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } UNPARSE(f_operatorofphylum(id, 1)); } else if(f_isphylum(id)) { { kc_printer(kc_t("impl_"), kc_current_view); } kc::unparse(uniqId, kc_printer, kc_current_view); } else if(f_alternativeofoperator(id)) { UNPARSE(f_phylumofoperator(id)); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(uniqId, kc_printer, kc_current_view); } else { kc::unparse(uniqId, kc_printer, kc_current_view); } } else goto kc_unparsing_default; break; } case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { const uniqID uid = this->uniqID_1; kc::unparse(uid->type, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(uid, kc_printer, kc_current_view); if (uid->line != 0) { { kc_printer(kc_t(" (introduced at "), kc_current_view); } kc::unparse(uid->file, kc_printer, kc_current_view); { kc_printer(kc_t(":"), kc_current_view); } kc::unparse(uid->line, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const uniqID uid = this->uniqID_1; kc::unparse(uid, kc_printer, kc_current_view); if (uid->line != 0) { { kc_printer(kc_t(" (introduced at "), kc_current_view); } kc::unparse(uid->file, kc_printer, kc_current_view); { kc_printer(kc_t(":"), kc_current_view); } kc::unparse(uid->line, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_INT_Int::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const integer i = this->integer_1; kc::unparse(i, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_STRING_String::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_phylumdeclarationsroot_PhylumDeclarations::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_rview_class_decl_enum: { view_rview_class_decl_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\ \ntypedef enum {\ \n"), kc_current_view); } kc::unparse(Therviewnames, kc_printer, view_gen_rewritek_h); { kc_printer(kc_t("last_rview\ \n} rview_enum;\ \n\ \nstruct impl_rviews {\ \n const char *name;\ \n rview_class *view;\ \n};\ \nextern struct impl_rviews rviews[];\ \nclass "), kc_current_view); } if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } { kc_printer(kc_t("rview_class {\ \n\rprotected:\v\ \n // only used in derivations\ \n rview_class(rview_enum v): m_view(v) { }\ \n rview_class(const rview_class&): m_view(base_rview_enum)\ \n \v{ /* do not copy"), kc_current_view ); kc_printer(kc_t(" m_view */ }\r\ \n\rpublic:\v\ \n const char* name() const\ \n \v{ return rviews[m_view].name; }\r\ \n operator rview_enum() const\ \n \v{ return m_view; }\r\ \n bool operator==(const rview_cl"), kc_current_view ); kc_printer(kc_t("ass& other) const\ \n \v{ return m_view == other.m_view; }\r\ \n"), kc_current_view); } if(g_options.rw_loop) { { kc_printer(kc_t(" // Called when the rewrite_loop enters a node (just before the call\ \n // to do_rewrite and before entering its sons).\ \n // The result of this function is used instead of current in the "), kc_current_view ); kc_printer(kc_t("rewrite process.\ \n // If skip_current is set to true (default is false), the result is not rewritten\ \n // any further (neither do_rewrite() nor post_rewrite() are called).\ \n virtual ab"), kc_current_view ); kc_printer(kc_t("stract_phylum pre_rewrite(abstract_phylum current, bool& /* skip_current */)\ \n \v{ return current; }\r\ \n // Called when the rewrite_loop leaves current node (after the call to do_rewrite).\ \n "), kc_current_view ); kc_printer(kc_t(" // Current is the finally rewritten node.\ \n // The result is used instead of the argument to build the final tree.\ \n // If again is set to true (default is false) the result node is rewritt"), kc_current_view ); kc_printer(kc_t("en again.\ \n virtual abstract_phylum post_rewrite(abstract_phylum current, bool& /* again */)\ \n \v{ return current; }\r\ \n"), kc_current_view); } } { kc_printer(kc_t("\rprivate:\v\ \n rview_enum m_view;\ \n};\ \n"), kc_current_view); } } break; } case view_uview_class_decl_enum: { view_uview_class_decl_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\ \ntypedef enum {\ \n"), kc_current_view); } kc::unparse(Theuviewnames, kc_printer, view_uview_def); { kc_printer(kc_t(" last_uview\ \n} uview_enum;\ \n\ \nstruct impl_uviews {\ \n const char *name;\ \n uview_class *view;\ \n};\ \nextern impl_uviews uviews[];\ \nclass "), kc_current_view); } if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } { kc_printer(kc_t("uview_class {\ \n\rprotected:\v\ \n // only used in derivations\ \n uview_class(uview_enum v): m_view(v) { }\ \n uview_class(c_uview): m_view(base_uview_enum)\ \n \v{ /* do not copy m_view */ "), kc_current_view ); kc_printer(kc_t("}\r\ \n\rpublic:\v\ \n const char* name() const\ \n \v{ return uviews[m_view].name; }\r\ \n operator uview_enum() const\ \n \v{ return m_view; }\r\ \n bool operator==(const uview_class& other)"), kc_current_view ); kc_printer(kc_t(" const\ \n \v{ return m_view == other.m_view; }\r\ \n\rprivate:\v\ \n uview_enum m_view;\ \n};\ \n\ \nclass "), kc_current_view); } if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } { kc_printer(kc_t("printer_functor_class {\ \n\rpublic:\v\ \n virtual void operator()(const kc_char_t*, uview) { }\ \n virtual ~printer_functor_class() { }\ \n};\ \n\ \nclass "), kc_current_view); } if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } { kc_printer(kc_t("printer_functor_function_wrapper : public printer_functor_class {\ \n\rpublic:\v\ \n printer_functor_function_wrapper(const printer_function opf =0): m_old_printer(opf) { }\ \n virtual ~printer_f"), kc_current_view ); kc_printer(kc_t("unctor_function_wrapper() { }\ \n virtual void operator()(const kc_char_t* s, uview v)\ \n \v{ if(m_old_printer) m_old_printer(s, v); }\r\ \n\rprivate:\v\ \n printer_function m_old_printer;\ \n};"), kc_current_view ); kc_printer(kc_t("\ \n"), kc_current_view); } } break; } case view_gen_yxx_union_h_enum: { view_gen_yxx_union_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations d = this->phylumdeclarations_1; { kc_printer(kc_t("union {\ \n"), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); { kc_printer(kc_t("};\ \n"), kc_current_view); } } break; } case view_gen_hashtables_c_enum: { view_gen_hashtables_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\ \nextern const char* kc_storageclassnames[];\ \n\ \n#ifdef KC_STATISTICS\ \nvoid do_print_operator_statistics(FILE * kc_f)\ \n{\ \n unsigned int kc_i;\ \n assertNonNull( kc_f );\ \n fprintf("), kc_current_view ); kc_printer(kc_t("kc_f, \"%-*s| %-*s| %-*s| %-*s| %-*s| %-*s| %-*s| %-*s| %-*s| %-*s\\n\", 38 , \"Operator\", 3, \"Sz\", 8, \"#oper\", 8, \"#new\", 8, \"#exist\", 8, \"#frnrec\", 8, \"#frrec\", 8, \"#freed\", 8, \"#rem\""), kc_current_view ); kc_printer(kc_t(", 9, \"total (bytes)\");\ \n fprintf(kc_f, \"%-*s|%*s |%*d |%*d |%*d |%*d |%*d |%*d |%*d |%*d\\n\", 38, \"case sensitive strings\", 3, \"-\", 8, operator_statistics[sel__Str].created, 8, operator_st"), kc_current_view ); kc_printer(kc_t("atistics[sel__Str].existing_not_found, 8, operator_statistics[sel__Str].created-operator_statistics[sel__Str].existing_not_found, 8, 0, 8, 0, 8, 0, 8, 0, 9, kc_casestring_strlen);\ \n fprintf(kc_f, "), kc_current_view ); kc_printer(kc_t("\"%-*s|%*s |%*d |%*d |%*d |%*d |%*d |%*d |%*d |%*d\\n\", 38, \"case insensitive strings\", 3, \"-\", 8, operator_statistics[sel_NoCaseStr].created, 8, operator_statistics[sel_NoCaseStr].existing_not_fo"), kc_current_view ); kc_printer(kc_t("und, 8, operator_statistics[sel_NoCaseStr].created-operator_statistics[sel_NoCaseStr].existing_not_found, 8, 0, 8, 0, 8, 0, 8, 0, 9, kc_nocasestring_strlen);\ \n for (kc_i = one_before_first_operato"), kc_current_view ); kc_printer(kc_t("r+1; kc_i < last_operator; kc_i++) {\ \n fprintf(kc_f, \"%-*s|%*d |%*d |%*d |%*d |%*d |%*d |%*d |%*d |%*d\\n\", 38, operator_info[kc_i].name, 3, operator_info[kc_i].size, 8, operator_statistics[kc_i].c"), kc_current_view ); kc_printer(kc_t("reated, 8, operator_statistics[kc_i].existing_not_found, 8, operator_statistics[kc_i].created-operator_statistics[kc_i].existing_not_found, 8, operator_statistics[kc_i].free_called[false], 8, operator_"), kc_current_view ); kc_printer(kc_t("statistics[kc_i].free_called[true], 8, operator_statistics[kc_i].freed[false]+operator_statistics[kc_i].freed[true], 8, operator_statistics[kc_i].existing_not_found-(operator_statistics[kc_i].freed[fal"), kc_current_view ); kc_printer(kc_t("se]+operator_statistics[kc_i].freed[true]), 9, operator_info[kc_i].size*(operator_statistics[kc_i].existing_not_found-(operator_statistics[kc_i].freed[false]+operator_statistics[kc_i].freed[true])));\ \n"), kc_current_view ); kc_printer(kc_t(" }\ \n}\ \n#endif // KC_STATISTICS\ \n\ \n"), kc_current_view); } if(!g_options.no_hashtables) { { kc_printer(kc_t("\ \nvoid\ \nht_static(kc_storageclass_t kc_a_storageclass_t)\ \n{\ \n hashtables[kc_a_storageclass_t]->ht_static();\ \n}\ \n\ \nvoid\ \nht_dynamic(kc_storageclass_t kc_a_storageclass_t)\ \n{\ \n "), kc_current_view ); kc_printer(kc_t("hashtables[kc_a_storageclass_t]->ht_dynamic();\ \n}\ \n\ \nvoid\ \nht_inc_level(kc_storageclass_t kc_a_storageclass_t)\ \n{\ \n hashtables[kc_a_storageclass_t]->ht_inc_level();\ \n}\ \n\ \nvoid\ \nh"), kc_current_view ); kc_printer(kc_t("t_dec_level(kc_storageclass_t kc_a_storageclass_t)\ \n{\ \n hashtables[kc_a_storageclass_t]->ht_dec_level();\ \n}\ \n\ \nvoid\ \nht_free_level(kc_storageclass_t kc_a_storageclass_t)\ \n{\ \n hash"), kc_current_view ); kc_printer(kc_t("tables[kc_a_storageclass_t]->ht_free_level();\ \n}\ \n\ \nhashtable_t\ \nht_create_simple()\ \n{\ \n hashtable_t kc_ht=new hashtable_struct_t;\ \n kc_ht->set_to_be_freed();\ \n return kc_ht;\ \n"), kc_current_view ); kc_printer(kc_t("}\ \n\ \nhashtable_t\ \nht_assign(hashtable_t kc_a_hashtable_t, kc_storageclass_t kc_a_storageclass_t, bool still_unique)\ \n{\ \n hashtable_t kc_tmp = hashtables[kc_a_storageclass_t];\ \n hashta"), kc_current_view ); kc_printer(kc_t("bles[kc_a_storageclass_t] = kc_a_hashtable_t;\ \n kc_storageclass_still_uniq[kc_a_storageclass_t] = still_unique;\ \n return kc_tmp;\ \n}\ \n\ \nhashtable_t\ \nht_assigned(kc_storageclass_t kc_a_"), kc_current_view ); kc_printer(kc_t("storageclass_t)\ \n{\ \n return hashtables[kc_a_storageclass_t];\ \n}\ \n\ \nvoid\ \nht_clear(hashtable_t kc_a_hashtable_t)\ \n{\ \n kc_a_hashtable_t->ht_clear();\ \n}\ \n\ \nvoid\ \nht_delete(ha"), kc_current_view ); kc_printer(kc_t("shtable_t kc_a_hashtable_t)\ \n{\ \n if(kc_a_hashtable_t->to_be_freed())\ \n delete kc_a_hashtable_t;\ \n}\ \n"), kc_current_view); } } } break; } case view_gen_hashtables_h_enum: { view_gen_hashtables_h_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\ \ntypedef struct {\ \n int created;\ \n int existing_not_found;\ \n int free_called[2];\ \n int freed[2];\ \n} KC_OPERATOR_STATISTICS;\ \n\ \n#ifdef KC_STATISTICS\ \n# define print_operat"), kc_current_view ); kc_printer(kc_t("or_statistics(kc_f) do_print_operator_statistics(kc_f)\ \n void do_print_operator_statistics(FILE*);\ \n#else\ \n# define print_operator_statistics(kc_f)\ \n#endif\ \n\ \ntypedef class hashtable_struc"), kc_current_view ); kc_printer(kc_t("t_t* hashtable_t;\ \n"), kc_current_view); } if(!g_options.no_hashtables) { { kc_printer(kc_t("void ht_static (kc_storageclass_t);\ \nvoid ht_dynamic (kc_storageclass_t);\ \nvoid ht_inc_level (kc_storageclass_t);\ \nvoid ht_dec_level (kc_storageclass_t);\ \nvoid ht_free_level (kc_storageclass_t)"), kc_current_view ); kc_printer(kc_t(";\ \nhashtable_t ht_create_simple ();\ \nhashtable_t ht_assign (hashtable_t, kc_storageclass_t, bool still_unique=false);\ \nhashtable_t ht_assigned (kc_storageclass_t);\ \nvoid ht_clear (hashtable_t);"), kc_current_view ); kc_printer(kc_t("\ \nvoid ht_delete (hashtable_t);\ \n"), kc_current_view); } } } break; } case view_gen_classdecls2_h_enum: { view_gen_classdecls2_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; { kc_printer(kc_t("\ \n//namespace Phylum {\r\ \n"), kc_current_view); } { kc_printer(kc_t("\ \nclass "), kc_current_view); } if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } { kc_printer(kc_t("impl_abstract_phylum"), kc_current_view); } { baseclass_list kc_selvar_0_1 = phylum_cast(The_abstract_phylum_decl->base_classes); if ((kc_selvar_0_1->prod_sel() == sel_Consbaseclass_list)) { PRINT("\b :\b "); UNPARSE(The_abstract_phylum_decl->base_classes); } else { } } { kc_printer(kc_t(" {\ \n\rpublic:\v\ \n virtual enum_operators prod_sel() const =0;\ \n static const enum_phyla phylum_sel_;\ \n enum_phyla phylum() const;\ \n const char* phylum_name() const;\ \n const c"), kc_current_view ); kc_printer(kc_t("har* op_name() const;\ \n virtual abstract_phylum subphylum(int) const;\ \n virtual void set_subphylum(int, abstract_phylum);\ \n void free(bool recursive=true);\ \n bool eq(c_abstract_phyl"), kc_current_view ); kc_printer(kc_t("um) const;\ \n void print();\ \n void fprint(FILE *);\ \n abstract_phylum copy(bool kc_copy_attributes) const;\n"), kc_current_view); } if(!g_options.no_unparse) { { kc_printer(kc_t(" void unparse(printer_functor pf, uview uv)\ \n \v{ do_unparse(pf, uv); }\r\ \n void unparse(printer_function opf, uview uv);\n"), kc_current_view); } } if(!g_options.no_printdot) { { kc_printer(kc_t("\ \n void printdot_add_edge (c_abstract_phylum, int, int*, kc_dotedgenode_t*, const char*) const;\ \n void do_printdot_id (FILE*, bool, c_abstract_phylum, int) const;\ \n void do_printdot (FILE*, bool,"), kc_current_view ); kc_printer(kc_t(" int*, kc_dotedgenode_t*, const char*, bool, bool, c_abstract_phylum, int) const;\ \n\ \n virtual void fprintdot(FILE *,\ \n const char *root_label_prefix, const char *edge_label_prefix, const char *ed"), kc_current_view ); kc_printer(kc_t("ge_attributes,\ \n bool print_node_labels, bool use_context_when_sharing_leaves, bool print_prologue_and_epilogue) const =0;\ \n"), kc_current_view); } } if(!g_options.no_csgio) { { kc_printer(kc_t(" void CSGIOwrite(FILE *) const;\ \n"), kc_current_view); } } if(!g_options.no_rewrite) { if(!g_options.rw_loop) { { kc_printer(kc_t(" virtual abstract_phylum rewrite(rview v) { return do_rewrite(v); }\ \n"), kc_current_view); } } else { { kc_printer(kc_t(" abstract_phylum rewrite(rview v) {\ \n return rewrite_loop(v); }\ \n abstract_phylum rewrite_loop(rview v);\ \n"), kc_current_view); } } { kc_printer(kc_t(" virtual abstract_phylum do_rewrite(rview) { return this;}\ \n // called if a subphylum of an op is rewritten and a new op is created by default rule\ \n virtual void rewrite_members(abstract_phylum fr"), kc_current_view ); kc_printer(kc_t("om) {} \ \n"), kc_current_view); } } if(!f_post_create_in_phylumdecl(The_abstract_phylum_decl)) { { kc_printer(kc_t(" virtual void post_create(){}\ \n"), kc_current_view); } } fndeclarations tapam = The_abstract_phylum_decl->additional_members; kc::unparse(tapam, kc_printer, view_gen_member_dcl_h); kc::unparse(tapam, kc_printer, view_count_nonstaticmembers); if(g_options.smart_pointer) { if(!f_constructors_in_phylumdecl(The_abstract_phylum_decl)) { { kc_printer(kc_t(" impl_abstract_phylum()"), kc_current_view); } if(gl_no_of_args!=0) { { kc_printer(kc_t(": "), kc_current_view); } kc::unparse(gl_members, kc_printer, view_gen_user_assignment_inis); } { kc_printer(kc_t("\v\ \n { _ref=0; }\r\ \n "), kc_current_view); } } if(!f_destructors_in_phylumdecl(The_abstract_phylum_decl)) { { kc_printer(kc_t(" virtual ~impl_abstract_phylum() {\ \n if(_ref)\ \n _ref->reset_phylum();\ \n }\ \n"), kc_current_view); } } { kc_printer(kc_t(" impl_abstract_phylum(const impl_abstract_phylum&) {\ \n _ref=0;\ \n }\ \n abstract_phylum_ref* get_ref() const {\ \n return _ref;\ \n }\ \n abstract_phylum_ref* add_ref() {\ \n if(!_ref)\ \n"), kc_current_view ); kc_printer(kc_t(" _ref=new_phylum_ref();\ \n return _ref;\ \n }\ \n void set_ref(abstract_phylum_ref* r) {\ \n _ref=r;\ \n }\ \n virtual abstract_phylum_ref* new_phylum_ref()=0;\ \n abstract_phylum return_ptr("), kc_current_view ); kc_printer(kc_t(") { if(get_ref()) get_ref()->lock(); return this; }\ \n\rprivate:\v\ \n abstract_phylum_ref*_ref;\ \n"), kc_current_view); } } else { if (!f_constructors_in_phylumdecl(The_abstract_phylum_decl) && gl_no_of_args!=0) { { kc_printer(kc_t("explicit impl_abstract_phylum()\v\n: "), kc_current_view); } kc::unparse(gl_members, kc_printer, view_gen_user_assignment_inis); { kc_printer(kc_t(" { }\r\n"), kc_current_view); } } if(!f_destructors_in_phylumdecl(The_abstract_phylum_decl)) { { kc_printer(kc_t(" virtual ~impl_abstract_phylum() { }\ \n"), kc_current_view); } } } if(!g_options.no_unparse) { { kc_printer(kc_t("\rprivate:\v\ \n virtual void do_unparse(printer_functor, uview) =0;\ \n\rprotected:\v\ \n virtual void default_unparse(printer_functor, uview);\n"), kc_current_view); } } { kc_printer(kc_t("};\n\n"), kc_current_view); } if(g_options.smart_pointer) { { kc_printer(kc_t("template <>\ \nclass phylum_ptr {\ \n\rpublic:\v\ \n"), kc_current_view); } if(g_options.weak_pointer) { { kc_printer(kc_t(" phylum_ptr(bool weak=false) { _ref=0; _weak=weak; }\ \n phylum_ptr(impl_abstract_phylum* t,bool weak=false) {\ \n _ref=0; _weak=weak;\ \n if(t) set_ref(t->add_ref());\ \n }\ \n phylum_ptr(c"), kc_current_view ); kc_printer(kc_t("onst phylum_ptr& p, bool weak=false) {\ \n _ref=0; _weak=weak;\ \n set_ref(p.get_ref());\ \n }\ \n"), kc_current_view); } } else { { kc_printer(kc_t(" phylum_ptr() { _ref=0; }\ \n phylum_ptr(impl_abstract_phylum* t) {\ \n _ref=0;\ \n if(t) set_ref(t->add_ref());\ \n }\ \n phylum_ptr(const phylum_ptr& p) {\ \n _ref=0;"), kc_current_view ); kc_printer(kc_t("\ \n set_ref(p.get_ref());\ \n }\ \n"), kc_current_view); } } { kc_printer(kc_t("\ \n ~phylum_ptr() { set_ref(0); }\ \n\ \n template \ \n phylum_ptr& operator=(T* t) {\ \n if(t)\ \n set_ref(t->add_ref());\ \n else\ \n set_ref(0);\ \n"), kc_current_view ); kc_printer(kc_t(" return *this;\ \n }\ \n\ \n template \ \n phylum_ptr& operator=(const phylum_ptr& p) {\ \n set_ref(p.get_ref());\ \n return *this;\ \n }\ \n\ \n imp"), kc_current_view ); kc_printer(kc_t("l_abstract_phylum* get_phylum() const {\ \n return _ref?_ref->get_abstract_phylum():0;\ \n }\ \n\ \n operator impl_abstract_phylum*() const { return get_phylum(); }\ \n impl_abstract_phylum* o"), kc_current_view ); kc_printer(kc_t("perator()() const { return get_phylum(); }\ \n impl_abstract_phylum* operator->() const { return get_phylum(); }\ \n operator bool() const { return get_phylum()!=0; }\ \n bool operator!() cons"), kc_current_view ); kc_printer(kc_t("t { return get_phylum()==0; }\ \n\ \n abstract_phylum return_ptr() { if(_ref) _ref->lock(); return get_phylum(); }\ \n\ \n bool operator==(int null) const { return null?false:(get_phylum()==0); }"), kc_current_view ); kc_printer(kc_t("\ \n template \ \n bool operator==(const T* t) const { return get_phylum()==t; }\ \n template \ \n bool operator==(const phylum_ptr& t) const { return get_phylum("), kc_current_view ); kc_printer(kc_t(")==t.get_phylum(); }\ \n\ \n bool operator!=(int null) const { return null?true:(get_phylum()!=0); }\ \n template \ \n bool operator!=(const T* t) const { return get_phylum()!=t; }"), kc_current_view ); kc_printer(kc_t("\ \n template \ \n bool operator!=(const phylum_ptr& t) const { return get_phylum()!=t.get_phylum(); }\ \n\ \n abstract_phylum_ref* get_ref() const { return _ref; }\ \n\ \n\rpro"), kc_current_view ); kc_printer(kc_t("tected:\v\ \n"), kc_current_view); } if(g_options.weak_pointer) { { kc_printer(kc_t(" void set_ref(abstract_phylum_ref* r) {\ \n if(_ref!=r) {\ \n if(_weak) {\ \n if(r) r->weak_ref();\ \n if(_ref) _ref->weak_unref();\ \n }\ \n else {\ \n if(r) r->ref();\ \n if(_ref) _"), kc_current_view ); kc_printer(kc_t("ref->unref();\ \n }\ \n _ref=r;\ \n }\ \n }\ \n"), kc_current_view); } } else { { kc_printer(kc_t(" void set_ref(abstract_phylum_ref* r) {\ \n if(_ref!=r) {\ \n if(r) r->ref();\ \n if(_ref) _ref->unref();\ \n _ref=r;\ \n }\ \n }\ \n"), kc_current_view); } } { kc_printer(kc_t("\ \n\rprivate:\v\ \n abstract_phylum_ref* _ref;\ \n"), kc_current_view); } if(g_options.weak_pointer) { { kc_printer(kc_t(" bool _weak;\n"), kc_current_view); } } { kc_printer(kc_t("};\n"), kc_current_view); } } { kc_printer(kc_t("\ \nclass "), kc_current_view); } if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } { kc_printer(kc_t("impl_abstract_list: "), kc_current_view); } { baseclass_list kc_selvar_0_1 = phylum_cast(The_abstract_list_decl->base_classes); if ((kc_selvar_0_1->prod_sel() == sel_Consbaseclass_list)) { UNPARSE(The_abstract_list_decl->base_classes); } else { PRINT("public impl_abstract_phylum"); } } { kc_printer(kc_t("{\ \n\rprivate:\v\ \n void fprint_list(FILE *);\ \n friend class impl_abstract_phylum;\ \n\rprotected:\v\ \n abstract_phylum do_concat(c_abstract_phylum other, enum_operators) const;\ \n ab"), kc_current_view ); kc_printer(kc_t("stract_phylum do_reverse(c_abstract_phylum tail, enum_operators) const;\ \n abstract_phylum do_map(abstract_phylum (*kc_fp)(abstract_phylum), enum_operators);\ \n abstract_phylum do_filter(bool ("), kc_current_view ); kc_printer(kc_t("*kc_fp)(abstract_phylum), enum_operators);\ \n abstract_list do_append(abstract_phylum, abstract_list);\ \n abstract_phylum do_merge(abstract_list,abstract_phylum (*kc_fp)(abstract_phylum,abstr"), kc_current_view ); kc_printer(kc_t("act_phylum), enum_operators);\ \n abstract_phylum do_reduce(abstract_phylum neutral, abstract_phylum (*kc_fp)(abstract_phylum,abstract_phylum));\ \n\rpublic:\v\n"), kc_current_view); } tapam = The_abstract_list_decl->additional_members; kc::unparse(tapam, kc_printer, view_count_nonstaticmembers); if (!f_constructors_in_phylumdecl(The_abstract_list_decl) && gl_no_of_args!=0) { { kc_printer(kc_t("explicit impl_abstract_list()\v\n: "), kc_current_view); } kc::unparse(gl_members, kc_printer, view_gen_user_assignment_inis); { kc_printer(kc_t(" { }\r\n"), kc_current_view); } } { kc_printer(kc_t(" virtual bool is_nil() const =0;\ \n virtual abstract_list reverse() const =0;\ \n int length() const;\ \n abstract_phylum last() const;\ \n // Non-virtual, non-existing... Type must be "), kc_current_view ); kc_printer(kc_t("known exactly anyway because\ \n // of the function given as a parameter\ \n //virtual abstract_list map( abstract_phylum (*)( abstract_phylum )) =0;\ \n //virtual abstract_list filter(bool (*"), kc_current_view ); kc_printer(kc_t(")(abstract_phylum)) =0;\ \n void freelist();\ \n"), kc_current_view); } if(g_options.smart_pointer) { { kc_printer(kc_t(" impl_abstract_list* return_ptr() { if(get_ref()) get_ref()->lock(); return this; }\n"), kc_current_view); } } The_abstract_list_decl->additional_members->unparse( kc_printer,view_gen_member_dcl_h); { kc_printer(kc_t("};\ \n"), kc_current_view); } kc::unparse(pds, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n//} // namespace Phylum\ \n\ \n"), kc_current_view); } } break; } case view_gen_classdecls1_h_enum: { view_gen_classdecls1_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; { kc_printer(kc_t("\ \nclass impl_abstract_phylum;\ \ntypedef impl_abstract_phylum * abstract_phylum;\ \ntypedef const impl_abstract_phylum * c_abstract_phylum;\ \nclass impl_abstract_list;\ \ntypedef impl_abstract_list "), kc_current_view ); kc_printer(kc_t("* abstract_list;\ \ntypedef const impl_abstract_list * c_abstract_list;\ \n"), kc_current_view); } if(g_options.smart_pointer) { { kc_printer(kc_t("\ \n// Reference to a phylum (abstract base class)\ \nclass abstract_phylum_ref {\ \n\rprotected:\v\ \n abstract_phylum_ref() {\ \n _locked=false;\ \n _ref_count=0;\ \n"), kc_current_view); } if(g_options.weak_pointer) { { kc_printer(kc_t(" _weak_ref_count=0;\ \n"), kc_current_view); } } { kc_printer(kc_t(" }\ \n\ \n\rpublic:\v\ \n void lock() {\ \n _locked=true;\ \n }\ \n void unlock() {\ \n if(_locked) {\ \n _locked=false;\ \n if(_ref_count==0 "), kc_current_view); } if(g_options.weak_pointer) { { kc_printer(kc_t("&& _weak_ref_count==0"), kc_current_view); } } { kc_printer(kc_t(") {\ \n reset_ref();\ \n reset_phylum();\ \n delete this;\ \n }\ \n }\ \n }\ \n int get_ref_count() const {\ \n return _ref_count;\ \n }\ \n void ref() {\ \n _locked=false;\ \n ++_re"), kc_current_view ); kc_printer(kc_t("f_count;\ \n }\ \n void unref() {\ \n if(_ref_count)\ \n --_ref_count;\ \n if(_ref_count==0 && !_locked) {\ \n clear();\ \n"), kc_current_view); } if(g_options.weak_pointer) { { kc_printer(kc_t(" if(_weak_ref_count==0)\ \n"), kc_current_view); } } { kc_printer(kc_t(" delete this;\ \n }\ \n }\ \n"), kc_current_view); } if(g_options.weak_pointer) { { kc_printer(kc_t(" int get_weak_ref_count() const {\ \n return _weak_ref_count;\ \n }\ \n void weak_ref() {\ \n _locked=false;\ \n ++_weak_ref_count;\ \n }\ \n void weak_unref() {\ \n if(_weak_ref_count)\ \n"), kc_current_view ); kc_printer(kc_t(" --_weak_ref_count;\ \n if(_weak_ref_count==0 && _ref_count==0 && !_locked) {\ \n reset_ref();\ \n delete this;\ \n }\ \n }\ \n"), kc_current_view); } } { kc_printer(kc_t("\ \n virtual impl_abstract_phylum* get_abstract_phylum() const=0;\ \n virtual void reset_phylum()=0;\ \n"), kc_current_view); } The_abstract_phylum_ref_decl->additional_members->unparse( kc_printer,view_gen_member_dcl_h); { kc_printer(kc_t("\rprotected:\v\ \n virtual void clear()=0;\ \n virtual void reset_ref()=0;\ \n\rprivate:\v\ \n int _ref_count;\ \n"), kc_current_view); } if(g_options.weak_pointer) { { kc_printer(kc_t(" int _weak_ref_count;\ \n"), kc_current_view); } } { kc_printer(kc_t(" bool _locked;\ \n};\n"), kc_current_view); } { kc_printer(kc_t("// Template reference for each phylum\ \ntemplate \ \nclass phylum_ref: public abstract_phylum_ref {\ \n\rpublic:\v\ \n phylum_ref(T* t) { _phylum=t; }\ \n\ \n T* get_phylum() const {"), kc_current_view ); kc_printer(kc_t(" return _phylum; }\ \n impl_abstract_phylum* get_abstract_phylum() const { return _phylum; }\ \n\ \n phylum_ref& operator=(const T& t) {\ \n abstract_phylum_ref* ref=t.get_ref();\ \n if(ref)\ \n"), kc_current_view ); kc_printer(kc_t(" set_phylum(static_cast(t.copy(true)));\ \n else\ \n set_phylum(const_cast(&t));\ \n return *this;\ \n }\ \n phylum_ref& operator=(const phylum_ref& r) {\ \n T* t=r.get_phyl"), kc_current_view ); kc_printer(kc_t("um();\ \n if(t) return operator=(*t);\ \n set_phylum(0);\ \n return *this;\ \n }\ \n\ \n void reset_phylum() { _phylum=0; }\ \n void set_phylum(T* t) {\ \n if(_phylum!=t) {\ \n _phylum->se"), kc_current_view ); kc_printer(kc_t("t_ref(0);\ \n _phylum->free();\ \n _phylum=t;\ \n if(_phylum)\ \n _phylum->set_ref(this);\ \n }\ \n }\ \n\rprotected:\v\ \n void clear() { if(_phylum) { reset_ref(); _phylum->free();"), kc_current_view ); kc_printer(kc_t(" _phylum=0; } }\ \n void reset_ref() { if(_phylum) _phylum->set_ref(0); }\ \n\rprivate:\v\ \n T* _phylum;\ \n};\n"), kc_current_view); } { kc_printer(kc_t("// Smart pointer containing a reference\ \ntemplate \ \nclass phylum_ptr {\ \n\rpublic:\v\ \n"), kc_current_view); } if(g_options.weak_pointer) { { kc_printer(kc_t(" phylum_ptr(bool weak=false) { _ref=0; _weak=weak; }\ \n phylum_ptr(T* t,bool weak=false) {\ \n _ref=0; _weak=weak;\ \n if(t) set_ref(static_cast*>(t->add_ref()));\ \n }\ \n ph"), kc_current_view ); kc_printer(kc_t("ylum_ptr(const phylum_ptr& p, bool weak=false) {\ \n _ref=0; _weak=weak;\ \n set_ref(p.get_ref());\ \n }\ \n"), kc_current_view); } } else { { kc_printer(kc_t(" phylum_ptr() { _ref=0; }\ \n phylum_ptr(T* t) {\ \n _ref=0;\ \n if(t) set_ref(static_cast*>(t->add_ref()));\ \n }\ \n phylum_ptr(const phylum_ptr& p) {\ \n _ref=0;\ \n set_"), kc_current_view ); kc_printer(kc_t("ref(p.get_ref());\ \n }\ \n"), kc_current_view); } } { kc_printer(kc_t(" ~phylum_ptr() { set_ref(0); }\ \n\ \n phylum_ptr& operator=(T* t) {\ \n if(t)\ \n set_ref(static_cast*>(t->add_ref()));\ \n else\ \n set_ref(0);\ \n return *this;\ \n "), kc_current_view ); kc_printer(kc_t("}\ \n\ \n phylum_ptr& operator=(const phylum_ptr& p) {\ \n set_ref(p.get_ref());\ \n return *this;\ \n }\ \n\ \n T* get_phylum() const { return _ref?_ref->get_phylum():0; }\ \n\ \n op"), kc_current_view ); kc_printer(kc_t("erator T*() const { return get_phylum(); }\ \n T* operator()() const { return get_phylum(); }\ \n T* operator->() const { return get_phylum(); }\ \n operator bool() const { return get_phylum()"), kc_current_view ); kc_printer(kc_t("!=0; }\ \n bool operator!() const { return get_phylum()==0; }\ \n\ \n T* return_ptr() const { if(_ref) _ref->lock(); return get_phylum(); }\ \n\ \n bool operator==(int null) const { return nul"), kc_current_view ); kc_printer(kc_t("l?false:(get_phylum()==0); }\ \n bool operator==(const T* t) const { return get_phylum()==t; }\ \n bool operator==(const phylum_ptr& t) const { return get_phylum()==t.get_phylum(); }\ \n bo"), kc_current_view ); kc_printer(kc_t("ol operator!=(int null) const { return null?true:(get_phylum()!=0); }\ \n bool operator!=(const T* t) const { return get_phylum()!=t; }\ \n bool operator!=(const phylum_ptr& t) const { return "), kc_current_view ); kc_printer(kc_t("get_phylum()!=t.get_phylum(); }\ \n\ \n phylum_ref& operator*(){ return *add_ref(); }\ \n const phylum_ref& operator*() const {\ \n return *const_cast*>(this)->add_ref();\ \n "), kc_current_view ); kc_printer(kc_t(" }\ \n\ \n phylum_ref* get_ref() const { return _ref; }\ \n\ \n phylum_ref* add_ref() {\ \n if(!_ref) set_ref(new phylum_ref(0));\ \n return _ref;\ \n }\ \n\rprotected:\v\ \n"), kc_current_view); } if(g_options.weak_pointer) { { kc_printer(kc_t(" void set_ref(phylum_ref* r) {\ \n if(_ref!=r) {\ \n if(_weak) {\ \n if(r) r->weak_ref();\ \n if(_ref) _ref->weak_unref();\ \n }\ \n else {\ \n if(r) r->ref();\ \n if(_ref) _ref->u"), kc_current_view ); kc_printer(kc_t("nref();\ \n }\ \n _ref=r;\ \n }\ \n }\ \n"), kc_current_view); } } else { { kc_printer(kc_t(" void set_ref(phylum_ref* r) {\ \n if(_ref!=r) {\ \n if(r) r->ref();\ \n if(_ref) _ref->unref();\ \n _ref=r;\ \n }\ \n }\ \n"), kc_current_view); } } { kc_printer(kc_t("\ \n\rprivate:\v\ \n phylum_ref* _ref;\ \n"), kc_current_view); } if(g_options.weak_pointer) { { kc_printer(kc_t(" bool _weak;\ \n"), kc_current_view); } } { kc_printer(kc_t("};\ \ntypedef phylum_ptr abstract_phylum_ptr;\ \n"), kc_current_view); } if(g_options.weak_pointer) { { kc_printer(kc_t("\ \ntemplate \ \nclass weak_phylum_ptr: public phylum_ptr {\ \n\rpublic:\v\ \n weak_phylum_ptr(): phylum_ptr(true){}\ \n weak_phylum_ptr(T* t):phylum_ptr(t,true){}\ \n wea"), kc_current_view ); kc_printer(kc_t("k_phylum_ptr(const weak_phylum_ptr& p):phylum_ptr(p,true){}\ \n weak_phylum_ptr(const phylum_ptr& p):phylum_ptr(p,true){}\ \n\ \n weak_phylum_ptr& operator=(T* t) {\ \n if(t)\ \n "), kc_current_view ); kc_printer(kc_t(" set_ref(static_cast*>(t->add_ref()));\ \n else\ \n set_ref(0);\ \n return *this;\ \n }\ \n\ \n weak_phylum_ptr& operator=(const phylum_ptr& p) {\ \n set_ref(p.get_ref()"), kc_current_view ); kc_printer(kc_t(");\ \n return *this;\ \n }\ \n};\ \ntypedef weak_phylum_ptr weak_abstract_phylum_ptr;\ \n"), kc_current_view); } } { kc_printer(kc_t("\ \ntemplate \ \nP phylum_cast(phylum_ptr& t) {\ \n return static_cast

(t());\ \n}\ \ntemplate \ \nconst P phylum_cast(const phylum_ptr& t) {\ \n"), kc_current_view ); kc_printer(kc_t(" return static_cast(t());\ \n}\ \n"), kc_current_view); } } { kc_printer(kc_t("\ \ntemplate \ \nP phylum_cast(T* t) {\ \n return static_cast

(t);\ \n}\ \ntemplate \ \nconst P phylum_cast(const T* t) {\ \n return static_cast<"), kc_current_view ); kc_printer(kc_t("const P>(t);\ \n}\ \n"), kc_current_view); } kc::unparse(pds, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n\ \nvoid kc_invalid_operator( const char *kc_func_prefix, enum_phyla kc_phy, int kc_line,\ \n const char *kc_file, enum_operators kc_oper ) __attribute__ ((noreturn));\ \n\ \ntypedef enum_phyla *en"), kc_current_view ); kc_printer(kc_t("um_phyla_list;\ \n\ \n/*\ \n * make sure that the first 'real' storage class _always_ gets a value > 0\ \n * and kc_not_uniq gets a value == 0\ \n * (because then we can use it as a C boolean)\ \n */\ \n"), kc_current_view ); kc_printer(kc_t("enum kc_storageclass_t {\ \n "), kc_current_view); } kc::unparse(Thestorageclasses, kc_printer, view_gen_operatormap_type_h); { kc_printer(kc_t(",\ \nlast_storageclass\ \n};\ \n\ \ntypedef struct {\ \n const char *name; // name of the phylum\ \n enum_operators first_operator; // index in operator_info[]\ \n enum_operators last_operat"), kc_current_view ); kc_printer(kc_t("or; // index in operator_info[]\ \n kc_storageclass_t uniq_stored; // storage class\ \n} KC_PHYLUM_INFO;\ \n\ \ntypedef struct {\ \n const char *name; // name of the operator\ \n size_t no_s"), kc_current_view ); kc_printer(kc_t("ons; // number of sons\ \n bool atomicity; // atomic type or not\ \n enum_phyla phylum; // index in phylum_info[]\ \n enum_phyla_list subphylum; // indexes in phylum_info[]\ \n int n"), kc_current_view ); kc_printer(kc_t("o_attrs; // number of attributes\ \n enum_phyla_list attribute; // indexes in phylum_info[]\ \n size_t size; // size of operator (for statistics)\ \n} KC_OPERATOR_INFO;\ \n\ \ntypedef enum_p"), kc_current_view ); kc_printer(kc_t("hyla_list KC_UNIQ_INFO;\ \n\ \nextern KC_OPERATOR_INFO operator_info[];\ \nextern KC_PHYLUM_INFO phylum_info[];\ \nextern KC_UNIQ_INFO kc_UniqInfo[];\ \n\ \n#define KC_OP_NAME(op) (operator_info[op].na"), kc_current_view ); kc_printer(kc_t("me)\ \n#define KC_NO_SONS(prod) (operator_info[prod].no_sons)\ \n#define KC_ATOMICITY(prod) (operator_info[prod].atomicity)\ \n\ \n"), kc_current_view); } } break; } case view_gen_unparsedefs_c_enum: { view_gen_unparsedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; kc::unparse(pds, kc_printer, kc_current_view); } break; } case view_gen_default_types_unpk_c_enum: { view_gen_default_types_unpk_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\ \n#ifndef KC_TRACE_PROVIDED\ \n#define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND\ \n#endif\ \n\ \nvoid\ \nimpl_abstract_phylum::unparse(printer_function opf, uview uv)\ \n{\ \n printer_functor_f"), kc_current_view ); kc_printer(kc_t("unction_wrapper pf(opf);\ \n do_unparse(pf, uv);\ \n}\ \n\ \n// Everything given as a pointer is expected to have an unparse-method (we\ \n// believe it's a phylum), unless there's a specialisation "), kc_current_view ); kc_printer(kc_t("for it\ \n\ \nvoid\ \nunparse(abstract_phylum kc_p, printer_functor kc_printer, uview kc_current_view)\ \n{\ \n kc_p->unparse(kc_printer, kc_current_view);\ \n}\ \n\ \nvoid\ \nunparse(void *kc_p, pr"), kc_current_view ); kc_printer(kc_t("inter_functor kc_printer, uview kc_current_view)\ \n{\ \n // MPi: 20020628 there shouldn't be any left\ \n assertionFailed(\"Unparse called for untyped pointer\");\ \n // MPi: cast should be u"), kc_current_view ); kc_printer(kc_t("nnecessary, but there are still void*\ \n reinterpret_cast(kc_p)->unparse(kc_printer, kc_current_view);\ \n}\ \n\ \nvoid\ \nunparse(int kc_v, printer_functor kc_printer, uview"), kc_current_view ); kc_printer(kc_t(" kc_current_view)\ \n{\ \n kc_char_t kc_string[200];\ \n kc_print_integer(kc_string, kc_v);\ \n kc_printer(kc_string, kc_current_view);\ \n}\ \n\ \nvoid\ \nunparse(double kc_v, printer_functor"), kc_current_view ); kc_printer(kc_t(" kc_printer, uview kc_current_view)\ \n{\ \n kc_char_t kc_string[200];\ \n kc_print_real(kc_string, kc_v);\ \n kc_printer(kc_string, kc_current_view);\ \n}\ \n\ \nvoid\ \nunparse(kc_char_t *kc"), kc_current_view ); kc_printer(kc_t("_v, printer_functor kc_printer, uview kc_current_view)\ \n{\ \n kc_printer(kc_v, kc_current_view);\ \n}\ \n\ \nvoid\ \nunparse(kc_string_t kc_v, printer_functor kc_printer, uview kc_current_view)\ \n"), kc_current_view ); kc_printer(kc_t("{\ \n kc_printer(kc_v.c_str(), kc_current_view);\ \n}\ \n"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); assertReason(!g_options.no_unparse, "shouldn't create unpk.cc when not even generating unparse stuff"); if (!g_options.no_unparse) { { kc_printer(kc_t("void\ \nimpl_abstract_phylum::default_unparse(printer_functor kc_printer, uview kc_current_view)\ \n{\ \n register int no_sons = operator_info[prod_sel()].no_sons;\ \n for (int i=0; i < no_sons; "), kc_current_view ); kc_printer(kc_t("i++)\ \n subphylum(i)->unparse(kc_printer, kc_current_view);\ \n}\ \n\ \nvoid\ \nimpl_casestring__Str::do_unparse(printer_functor kc_printer, uview kc_current_view)\ \n{\ \n kc::unparse(name, kc_pri"), kc_current_view ); kc_printer(kc_t("nter, kc_current_view);\ \n}\ \n\ \nvoid\ \nimpl_nocasestring_NoCaseStr::do_unparse(printer_functor kc_printer, uview kc_current_view)\ \n{\ \n kc::unparse(name, kc_printer, kc_current_view);\ \n}\ \n"), kc_current_view ); kc_printer(kc_t("\ \nvoid\ \nimpl_integer__Int::do_unparse(printer_functor kc_printer, uview kc_current_view)\ \n{\ \n kc::unparse(value, kc_printer, kc_current_view);\ \n}\ \n\ \nvoid\ \nimpl_real__Real::do_unparse"), kc_current_view ); kc_printer(kc_t("(printer_functor kc_printer, uview kc_current_view)\ \n{\ \n kc::unparse(value, kc_printer, kc_current_view);\ \n}\ \n\ \nvoid\ \nimpl_voidptr__VoidPtr::do_unparse(printer_functor kc_printer, uview "), kc_current_view ); kc_printer(kc_t("kc_current_view)\ \n{\ \n kc::unparse(pointer, kc_printer, kc_current_view);\ \n}\ \n\ \n"), kc_current_view); } } } break; } case view_gen_unpk_c_enum: { view_gen_unpk_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("/* translation of file(s)\n"), kc_current_view); } kc::unparse(Thefnfiles, kc_printer, kc_current_view); { kc_printer(kc_t(" */\ \n/* generated by:\ \n * "), kc_current_view); } kc::unparse(kimwitu_copyright, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n */\ \n#define KC_UNPARSE\ \n"), kc_current_view); } if(g_options.stdafx!="") { PRINT("#include \""); PRINT(g_options.stdafx.c_str()); PRINT("\"\n"); } { kc_printer(kc_t("\ \n#include \ \n#include \ \n#include \ \n#include \""), kc_current_view); } PRINT(g_options.prefix.c_str()); { kc_printer(kc_t("k.h\"\ \n#include \""), kc_current_view); } PRINT(g_options.prefix.c_str()); { kc_printer(kc_t("unpk.h\"\ \n\ \n"), kc_current_view); } kc::unparse(this, kc_printer, view_open_namespace); kc::unparse(Theuviewnames, kc_printer, view_gen_viewvars_c); { kc_printer(kc_t("\ \nimpl_uviews uviews[] = {\ \n"), kc_current_view); } kc::unparse(Theuviewnames, kc_printer, kc_current_view); { kc_printer(kc_t(" {0,0}\ \n};\ \n"), kc_current_view); } if(pg_languageshavebeendefined) { { kc_printer(kc_t("\n"), kc_current_view); } { kc_printer(kc_t("#ifndef LANG_TEXT\n"), kc_current_view); } { kc_printer(kc_t("#define LANG_TEXT(i) kc_language[i]\n"), kc_current_view); } { kc_printer(kc_t("#endif\n\n"), kc_current_view); } } } break; } case view_gen_end_unpk_h_enum: { view_gen_end_unpk_h_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("#endif // KC_UNPARSE_HEADER\ \n"), kc_current_view); } } break; } case view_gen_rewritedecls_h_enum: { view_gen_rewritedecls_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; { kc_printer(kc_t("\ \n/* Use rviews instead\ \nextern char *kc_rview_names[];\ \n*/\ \n"), kc_current_view); } kc::unparse(Therviewnames, kc_printer, view_rview_class_def); } break; } case view_gen_unparsedecls_h_enum: { view_gen_unparsedecls_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; if(pg_languageshavebeendefined) { { kc_printer(kc_t("\n"), kc_current_view); } { kc_printer(kc_t("#ifndef is_language\n"), kc_current_view); } { kc_printer(kc_t("#define is_language(L) kc_language==kc_language_##L\n"), kc_current_view); } { kc_printer(kc_t("#endif\n\n"), kc_current_view); } { kc_printer(kc_t("#ifndef set_language\n"), kc_current_view); } { kc_printer(kc_t("#define set_language(L) kc_language=kc_language_##L\n"), kc_current_view); } { kc_printer(kc_t("#endif\n\n"), kc_current_view); } { kc_printer(kc_t("extern char** kc_language;\n"), kc_current_view); } kc::unparse(Thelanguages, kc_printer, kc_current_view); } { kc_printer(kc_t("\ \n/* Use uviews instead\ \nextern char *kc_view_names[];\ \n*/\ \n"), kc_current_view); } kc::unparse(Theuviewnames, kc_printer, view_uview_class_def); { kc_printer(kc_t("\ \nvoid unparse(abstract_phylum kc_p, printer_functor kc_printer, uview kc_current_view);\ \nvoid unparse(void *kc_p, printer_functor kc_printer, uview kc_current_view);\ \nvoid unparse(int kc_v, prin"), kc_current_view ); kc_printer(kc_t("ter_functor kc_printer, uview kc_current_view);\ \nvoid unparse(double kc_v, printer_functor kc_printer, uview kc_current_view);\ \nvoid unparse(kc_char_t *kc_v, printer_functor kc_printer, uview kc_cu"), kc_current_view ); kc_printer(kc_t("rrent_view);\ \nvoid unparse(kc_string_t kc_v, printer_functor kc_printer, uview kc_current_view);\ \n#define PRINT(string) kc_printer(string,kc_current_view)\ \n#define UNPARSE(node) node->unparse(kc_"), kc_current_view ); kc_printer(kc_t("printer,kc_current_view)\ \n"), kc_current_view); } } break; } case view_gen_unpk_h_enum: { view_gen_unpk_h_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("/* translation of file(s)\n"), kc_current_view); } kc::unparse(Thefnfiles, kc_printer, kc_current_view); { kc_printer(kc_t(" */\ \n/* generated by:\ \n * "), kc_current_view); } kc::unparse(kimwitu_copyright, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n */\ \n#ifndef KC_UNPARSE_HEADER\ \n#define KC_UNPARSE_HEADER\ \n\ \n"), kc_current_view); } } break; } case view_gen_fns_owninclude_c_enum: { view_gen_fns_owninclude_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("#include \""), kc_current_view); } PRINT(g_options.hfilename.c_str()); { kc_printer(kc_t("\"\ \n"), kc_current_view); } } break; } case view_gen_fns_start_c_enum: { view_gen_fns_start_c_class& kc_current_view=static_cast(kc_current_view_base); { string printablefilename = f_make_identifier_basename( g_options.ccfilename ); { kc_printer(kc_t("/* translation of file \""), kc_current_view); } kc::unparse(pg_filename, kc_printer, kc_current_view); { kc_printer(kc_t("\" */\ \n/* generated by:\ \n * "), kc_current_view); } kc::unparse(kimwitu_copyright, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n */\ \n#define KC_FUNCTIONS_"), kc_current_view); } kc::unparse(printablefilename, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n"), kc_current_view); } if(g_options.stdafx!="") { PRINT("#include \""); PRINT(g_options.stdafx.c_str()); PRINT("\"\n"); } { kc_printer(kc_t("\ \n#include \ \n#include \""), kc_current_view); } PRINT(g_options.prefix.c_str()); { kc_printer(kc_t("k.h\"\ \n"), kc_current_view); } } break; } case view_gen_fns_end_h_enum: { view_gen_fns_end_h_class& kc_current_view=static_cast(kc_current_view_base); { string printablefilename = f_make_identifier_basename( g_options.hfilename ); { kc_printer(kc_t("\ \n#endif // ! KC_FUNCTIONS_"), kc_current_view); } kc::unparse(printablefilename, kc_printer, kc_current_view); { kc_printer(kc_t("_HEADER\ \n\ \n"), kc_current_view); } } break; } case view_gen_fns_start_h_enum: { view_gen_fns_start_h_class& kc_current_view=static_cast(kc_current_view_base); { string printablefilename = f_make_identifier_basename( g_options.hfilename ); { kc_printer(kc_t("/* translation of file \""), kc_current_view); } kc::unparse(pg_filename, kc_printer, kc_current_view); { kc_printer(kc_t("\" */\ \n/* generated by:\ \n * "), kc_current_view); } kc::unparse(kimwitu_copyright, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n */\ \n#ifndef KC_FUNCTIONS_"), kc_current_view); } kc::unparse(printablefilename, kc_printer, kc_current_view); { kc_printer(kc_t("_HEADER\ \n#define KC_FUNCTIONS_"), kc_current_view); } kc::unparse(printablefilename, kc_printer, kc_current_view); { kc_printer(kc_t("_HEADER\ \n#include \""), kc_current_view); } PRINT(g_options.prefix.c_str()); { kc_printer(kc_t("k.h\" // in case a user forgets\ \n\ \n"), kc_current_view); } } break; } case view_gen_rewritedefs_c_enum: { view_gen_rewritedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; { kc_printer(kc_t("\ \n#ifndef KC_TRACE_PROVIDED\ \n#define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND\ \n#endif\ \n#ifndef KC_TRACE_REWRITE_MATCH\ \n#define KC_TRACE_REWRITE_MATCH(VIEW,FILE,LINE,NODE)\ \n#endif\ \n#ifn"), kc_current_view ); kc_printer(kc_t("def KC_TRACE_REWRITE_RESULT\ \n#define KC_TRACE_REWRITE_RESULT(VIEW,FILE,LINE,NODE)\ \n#endif\ \n "), kc_current_view); } kc::unparse(pds, kc_printer, kc_current_view); } break; } case view_gen_rewritek_c_enum: { view_gen_rewritek_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("/* translation of file(s)\n"), kc_current_view); } kc::unparse(Thefnfiles, kc_printer, kc_current_view); { kc_printer(kc_t(" */\ \n/* generated by:\ \n * "), kc_current_view); } kc::unparse(kimwitu_copyright, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n */\ \n#define KC_REWRITE\ \n"), kc_current_view); } if(g_options.stdafx!="") { PRINT("#include \""); PRINT(g_options.stdafx.c_str()); PRINT("\"\n"); } { kc_printer(kc_t("\ \n#include \ \n#include \ \n#include \ \n#include \""), kc_current_view); } PRINT(g_options.prefix.c_str()); { kc_printer(kc_t("k.h\"\ \n#include \""), kc_current_view); } PRINT(g_options.prefix.c_str()); { kc_printer(kc_t("rk.h\"\ \n\ \n"), kc_current_view); } if(g_options.rw_loop) { { kc_printer(kc_t("#include \ \n#include \ \n#include \ \n"), kc_current_view); } } kc::unparse(this, kc_printer, view_open_namespace); kc::unparse(Therviewnames, kc_printer, view_gen_viewvars_c); { kc_printer(kc_t("\ \nimpl_rviews rviews[] = {\ \n"), kc_current_view); } kc::unparse(Therviewnames, kc_printer, kc_current_view); { kc_printer(kc_t(" {0,0}\ \n};\ \n"), kc_current_view); } if(g_options.rw_loop) { string how_smart = ""; if(g_options.smart_pointer) how_smart="_ptr"; { kc_printer(kc_t("\ \n\ \nstatic inline int\ \nkc_sons(abstract_phylum ph) {\ \n return KC_NO_SONS(ph->prod_sel());\ \n}\ \n\ \nstatic abstract_phylum\ \nkc_create_op(enum_operators kc_op, std::vector& sons, size_t no_of_sons) {\ \n size_t son_offset = sons.size()-no_of_sons;\ \n switch(no_of_sons) {\n"), kc_current_view); } kc::unparse(Theargsnumbers, kc_printer, kc_current_view); { kc_printer(kc_t(" default:\v\ \n assertionFailed(\"unexpected number of sub-phyla\");\r\ \n }\r\ \n}\ \n\ \nstatic void\ \ninitialize_sons_stack(abstract_phylum"), kc_current_view); } kc::unparse(how_smart, kc_printer, kc_current_view); { kc_printer(kc_t("& kc_p, bool& skip,\ \n std::stack& node_stack, std::stack& sons_todo,\ \n rview kc_current_view_base)\ \n{\ \n // Initialize stack for depth first rewrite\ \n assertCond(kc_p);\ \n size_t no_of_sons=kc_sons(kc_p);\ \n "), kc_current_view ); kc_printer(kc_t(" while(!skip && (no_of_sons>0)) {\ \n sons_todo.push(no_of_sons);\ \n abstract_phylum parent = kc_p;\ \n for(int i = no_of_sons-1; i>=0; --i) {\ \n node_stack.push(kc_p);\ \n kc_p = parent->s"), kc_current_view ); kc_printer(kc_t("ubphylum(i);\ \n }\ \n kc_p = kc_current_view_base.pre_rewrite(kc_p, skip);\ \n assertCond(kc_p);\ \n no_of_sons = kc_sons(kc_p);\ \n }\ \n // The deepest first son is now in kc_p.\ \n // On t"), kc_current_view ); kc_printer(kc_t("he node_stack are the siblings and then the parent.\ \n}\ \n\ \nstatic bool\ \nsons_changed(abstract_phylum"), kc_current_view); } kc::unparse(how_smart, kc_printer, kc_current_view); { kc_printer(kc_t(" current_son, const std::vector& sons_done, size_t no_of_sons)\ \n{\ \n bool changed = false;\ \n for(int i=no_of_sons-1; i>=0; --i) {\ \n if(sons_done[sons_done.size()-no_of_sons+i] != current_son->subphylum(i)) {\ \n ch"), kc_current_view ); kc_printer(kc_t("anged=true;\ \n break;\ \n }\ \n }\ \n return changed;\ \n}\ \n\ \nabstract_phylum impl_abstract_phylum::rewrite_loop(rview kc_current_view_base) {\ \n std::stack node_stack;\ \n std::stack sons_todo;\ \n std::vector sons_done;\ \n\ \n abstract_phylum"), kc_current_view); } kc::unparse(how_smart, kc_printer, kc_current_view); { kc_printer(kc_t(" current_son=this;\ \n\ \n do {\ \n bool skip=false;\ \n current_son = kc_current_view_base.pre_rewrite(current_son, skip);\ \n initialize_sons_stack(current_son, skip, node_stack, sons_todo, kc_cur"), kc_current_view ); kc_printer(kc_t("rent_view_base);\ \n \ \n bool changed=true;\ \n do {\ \n assertCond(current_son);\ \n\ \n abstract_phylum"), kc_current_view); } kc::unparse(how_smart, kc_printer, kc_current_view); { kc_printer(kc_t(" res=current_son;\ \n if(!skip)\ \n res=current_son->do_rewrite(kc_current_view_base);\ \n\ \n assertCond(res);\ \n changed=true;\ \n\ \n if(res==current_son) { // nothing has been cha"), kc_current_view ); kc_printer(kc_t("nged, current_son is completely rewritten\ \n if(!skip) { // call post_rewrite if this node is not skipped\ \n bool again=false;\ \n current_son=kc_current_view_base.post_rewrite(current_son"), kc_current_view ); kc_printer(kc_t(", again);\ \n assertCond(current_son);\ \n if(again)\ \n \vbreak;\r // starts the whole rewrite_loop for the post_rewritten node again\ \n }\ \n else\ \n skip=false;\ \n\ \n sons_do"), kc_current_view ); kc_printer(kc_t("ne.push_back(current_son); // move this son to sons_done\ \n\ \n if(!node_stack.empty()) { // else all is done\ \n assertCond(!sons_todo.empty());\ \n assertCond(sons_todo.top()>0);\ \n "), kc_current_view ); kc_printer(kc_t(" --sons_todo.top(); // one less to todo\ \n\ \n if(sons_todo.top()==0) { // all sons done\ \n sons_todo.pop(); // forget it\ \n\ \n current_son=node_stack.top(); // the parent of the original "), kc_current_view ); kc_printer(kc_t("last done sons\ \n node_stack.pop();\ \n // the last (rewritten) son of this parent is\ \n // on top of sons_done (sons_done[sons_done.size()-1])\ \n\ \n size_t no_of_sons=kc_sons(current_son);"), kc_current_view ); kc_printer(kc_t("\ \n assertCond(sons_done.size() >= no_of_sons);\ \n changed = sons_changed(current_son, sons_done, no_of_sons);\ \n if(changed) { // some sons are different ->\ \n \v\v// create a new operat"), kc_current_view ); kc_printer(kc_t("or and make it the current\ \n \r\rabstract_phylum"), kc_current_view); } kc::unparse(how_smart, kc_printer, kc_current_view); { kc_printer(kc_t(" new_son =\ \n \vkc_create_op(current_son->prod_sel(), sons_done, no_of_sons);\r\ \n new_son->rewrite_members(current_son);\ \n current_son = new_son;\ \n // the sons do not need t"), kc_current_view ); kc_printer(kc_t("o be rewritten again\ \n changed=false;\ \n }\ \n // The current node must still be rewritten,\ \n // but not its sons anymore (changed == false).\ \n // Those sons are in the current nod"), kc_current_view ); kc_printer(kc_t("e, so no-one needs\ \n // them anymore and they are popped off the stack.\ \n sons_done.resize(sons_done.size() - no_of_sons);\ \n }\ \n else { // make the complete loop with the next son"), kc_current_view ); kc_printer(kc_t(" (changed == true)\ \n current_son = node_stack.top();\ \n node_stack.pop();\ \n }\ \n }\ \n else {\ \n current_son = 0; // terminates the loop\ \n }\ \n }\ \n else // somethin"), kc_current_view ); kc_printer(kc_t("g has been changed -> start rewrite with the changed node again\ \n current_son=res;\ \n } while(!changed);\ \n } while(current_son);\ \n\ \n assertCond(sons_todo.size()==0);\ \n assertCond(s"), kc_current_view ); kc_printer(kc_t("ons_done.size()==1);\ \n return sons_done[0]"), kc_current_view); } if(g_options.smart_pointer) { { kc_printer(kc_t(".return_ptr()"), kc_current_view); } } { kc_printer(kc_t("; // done.top()\ \n}\ \n"), kc_current_view); } } } break; } case view_gen_end_rewritek_h_enum: { view_gen_end_rewritek_h_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("#endif // KC_REWRITE_HEADER\n"), kc_current_view); } } break; } case view_gen_rewritek_h_enum: { view_gen_rewritek_h_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("/* translation of file(s)\n"), kc_current_view); } kc::unparse(Thefnfiles, kc_printer, kc_current_view); { kc_printer(kc_t(" */\ \n/* generated by:\ \n * "), kc_current_view); } kc::unparse(kimwitu_copyright, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n */\ \n#ifndef KC_REWRITE_HEADER\ \n#define KC_REWRITE_HEADER\ \n\ \n"), kc_current_view); } } break; } case view_gen_copydefs_c_enum: { view_gen_copydefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; { kc_printer(kc_t("abstract_phylum\ \nimpl_abstract_phylum::copy(bool kc_copy_attributes) const\ \n{\ \n enum_phyla kc_phy = phylum(); // XXX - implement special cases in subclasses - MvL\ \n KC_OPERATOR_INFO *kc_o"), kc_current_view ); kc_printer(kc_t("p_info = &operator_info[prod_sel()];\ \n kc_storageclass_t kc_st = phylum_info[kc_op_info->phylum].uniq_stored;\ \n if (kc_st && kc_storageclass_still_uniq[kc_st])\ \n return const_cast(this);\ \n abstract_phylum kc_answer=0;\ \n if (kc_phy == phylum_casestring) {\ \n kc_answer=mkcasestring((dynamic_cast(this))->name);\ \n } else if (kc_phy == phylum_noc"), kc_current_view ); kc_printer(kc_t("asestring) {\ \n kc_answer=mknocasestring((dynamic_cast(this))->name);\ \n } else if (kc_phy == phylum_voidptr) {\ \n kc_answer=mkvoidptr((dynamic_cast(this))->pointer);\ \n"), kc_current_view ); kc_printer(kc_t(" } else if (kc_phy == phylum_integer) {\ \n kc_answer=mkinteger((dynamic_cast(this))->value);\ \n } else if (kc_phy == phylum_real) {\ \n kc_answer=mkreal((dynamic_cast(this))-"), kc_current_view ); kc_printer(kc_t(">value);\ \n } else {\ \n abstract_phylum kc_subtmp["), kc_current_view); } int i = Theargsnumbers->last()->value; if (i<=0) i = 1; kc::unparse(i, kc_printer, kc_current_view); { kc_printer(kc_t("], child;\ \n for (int kc_i = 0; (child = subphylum(kc_i)); kc_i++) {\ \n kc_subtmp[kc_i] = child->copy(kc_copy_attributes);\ \n }\ \n switch(kc_op_info->no_sons) {\ \n"), kc_current_view); } kc::unparse(Theargsnumbers, kc_printer, kc_current_view); { kc_printer(kc_t(" default: assertionFailed(\"unexpected number of sub-phyla\");\ \n }\ \n }\ \n if (kc_copy_attributes)\ \n copy_attributes(kc_phy, this, kc_answer);\ \n return kc_answer;\ \n}\ \n\ \n"), kc_current_view); } } break; } case view_gen_copy_attributes_c_enum: { view_gen_copy_attributes_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; { kc_printer(kc_t("\ \nvoid\ \ncopy_attributes(enum_phyla copyPhy, c_abstract_phylum kc_p1, abstract_phylum kc_p2)\ \n{\ \n switch(copyPhy) {\r\ \n"), kc_current_view); } kc::unparse(pds, kc_printer, kc_current_view); { kc_printer(kc_t(" case one_before_first_phylum: // just to avoid a warning about missing case if empty\ \n default:\ \n \vbreak; // it's alright, no attributes to copy\r\ \n }\ \n enum_operators copyOp=kc_p1"), kc_current_view ); kc_printer(kc_t("->prod_sel();\ \n for (int i=operator_info[copyOp].no_attrs-1; i>=0; --i)\v\ \n attributeOf(kc_p2, i)=attributeOf(const_cast(kc_p1), i);\r\ \n}\ \n\ \n"), kc_current_view); } } break; } case view_gen_csgio_c_enum: { view_gen_csgio_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; { kc_printer(kc_t("\ \n\ \nnamespace { // all local to this file\ \n\r\ \n/* macro that does the string concatenation */\ \n#define kc_str_conc2(a,b) strcat(strcpy(new char[strlen(a) + strlen(b) +1], a), b)\ \n\ \n/* fun"), kc_current_view ); kc_printer(kc_t("ction that reads the integers */\ \ninline void\ \nkc_do_get_int(int &c, int c_init, int &i, FILE *f)\ \n{\ \n c = c_init;\ \n i = 0;\ \n while (isdigit(c)){\ \n i = (i*10) + (c-'0');\ \n c = "), kc_current_view ); kc_printer(kc_t("getc(f);\ \n }\ \n}\ \n\ \nchar *kc_malloc_area = 0;\ \nsize_t kc_sizeof_malloc_area = 0;\ \nint kc_node_count;\ \nint kc_node_count_base;\ \n\ \nchar*\ \nkc_grow_malloc_area(size_t kc_s)\ \n{\ \n "), kc_current_view ); kc_printer(kc_t(" delete kc_malloc_area;\ \n kc_malloc_area = new char[kc_s];\ \n kc_sizeof_malloc_area = kc_s;\ \n return kc_malloc_area;\ \n}\ \n\ \ninline char*\ \nKC_GETMALLOCAREA(size_t kc_s)\ \n{\ \n "), kc_current_view ); kc_printer(kc_t(" return kc_s > kc_sizeof_malloc_area ?\ \n kc_grow_malloc_area(kc_s) : kc_malloc_area;\ \n}\ \n\ \n/* global variables */\ \nint kc_no_external_ops;\ \nconst int KC_NOT_FOUND_OPERATOR = -1;\ \nint kc_f"), kc_current_view ); kc_printer(kc_t("ile_offset_base;\ \nint kc_file_offset;\ \n\ \n/* Magic File descriptor(s) */\ \n/* Magic descriptors of length up to KC_MAGIC_LENGTH-1 are supported. When changing\ \n * KC_MAGIC_LENGTH. change const"), kc_current_view ); kc_printer(kc_t("ant in MAGIC_READ_FORMAT to be one less than\ \n * KC_MAGIC_LENGTH. */\ \n/* Every file is assumed to start with the magic file descriptor for asc_csg_v3 */\ \n\ \nchar kc_ascii_prefix_magic_v3[] = \"A"), kc_current_view ); kc_printer(kc_t("#S#C#S#S#L#V#3\";\ \nchar kc_ascii_prefix_magic_hu[] = \"A#S#C#S#S#L#HUB\";\ \nconst int KC_MAGIC_LENGTH = 25;\ \nconst char *KC_MAGIC_READ_FORMAT = \"%24s\\n\";\ \n\ \n/* Operators with names of lengt"), kc_current_view ); kc_printer(kc_t("h upto OP_LENGTH-1 are supported. */\ \n/* When changing OP_LENGTH, change constant in OP_READ_FOMAT to be one less */\ \nconst int KC_OP_LENGTH = 256;\ \nconst char *KC_OP_READ_FORMAT = \"%255s\\n\";\ \n"), kc_current_view ); kc_printer(kc_t("\ \n//**********************\ \n// Error-string Routine\ \nconst char*\ \nkc_CSGIOerrorstring(KC_IO_STATUS kc_io_status)\ \n{\ \n switch( kc_io_status ) {\ \n case KC_CSGIOSTATUS_NO_ERR: return( \"N"), kc_current_view ); kc_printer(kc_t("o errors\" );\ \n case KC_CSGIOSTATUS_SCAN_ERR_1: return( \"Scan error(1)\" );\ \n case KC_CSGIOSTATUS_SCAN_ERR_2: return( \"Scan error(2)\" );\ \n case KC_CSGIOSTATUS_SCAN_ERR_3: return( \"Scan error("), kc_current_view ); kc_printer(kc_t("3)\" );\ \n case KC_CSGIOSTATUS_SCAN_ERR_4: return( \"Scan error(4)\" );\ \n case KC_CSGIOSTATUS_SCAN_ERR_5: return( \"Scan error(5)\" );\ \n case KC_CSGIOSTATUS_GRAM_INCONSISTENT: return( \"Grammar is"), kc_current_view ); kc_printer(kc_t(" inconsistent\" );\ \n case KC_CSGIOSTATUS_ROK: return( \"Read OK structure file\" );\ \n case KC_CSGIOSTATUS_ILLEGAL_OPTION: return( \"Illegal option in write command\" );\ \n case KC_CSGIOSTATUS_TOO_"), kc_current_view ); kc_printer(kc_t("MANY_OPERATORS: return( \"Too many operators for binary format\" );\ \n case KC_CSGIOSTATUS_WOK: return( \"Written OK\" );\ \n case KC_CSGIOSTATUS_TXT_FILE_INPUT: return( \"Read OK Text-file\" );\ \n c"), kc_current_view ); kc_printer(kc_t("ase KC_CSGIOSTATUS_SYNTAX_ERROR: return( \"Syntax error\" );\ \n case KC_CSGIOSTATUS_ILLEGAL_CONTEXT: return( \"Illegal context for operator\" );\ \n case KC_CSGIOSTATUS_PREMATURE_EOF: return( \"Premat"), kc_current_view ); kc_printer(kc_t("ure eof in file\" );\ \n case KC_CSGIOSTATUS_UNEXP_FATHER_MARK: return( \"Unexpected FATHER MARKER\" );\ \n default: return( \"Unknown error code\" );\ \n }\ \n}\ \n\ \nstruct csgio_info {\ \n int "), kc_current_view ); kc_printer(kc_t("number; // number of node, or -1 if no number\ \n bool created; // whether the node is already written\ \n csgio_info():number(-1),created(false){}\ \n};\ \ntypedef std::map csgio_map;\ \ncsgio_map kc_CSGIOhashtable;\ \n\ \n/* Maps */\ \ntypedef struct {\ \n int left;\ \n int right;\ \n} kc_OpToOpMap_tuple_t;\ \n\ \nkc_OpToOpMap_tuple_t kc_OpToOpMap[KC_NO_OF_O"), kc_current_view ); kc_printer(kc_t("PERATORS];\ \nconst int KC_NOT_USED = -1;\ \n\ \nint\ \nkc_op_search(char *kc_s)\ \n{\ \n int kc_i;\ \n for ( kc_i=0; kc_i < KC_NO_OF_OPERATORS; kc_i++ ) {\ \n if ( strcmp( kc_s, operator_info[kc"), kc_current_view ); kc_printer(kc_t("_i].name ) == 0 ) return( kc_i );\ \n }\ \n return( KC_NOT_FOUND_OPERATOR );\ \n}\ \n\ \nvoid\ \nkc_initializeOpToOpMap(int kc_v)\ \n{\ \n int kc_i;\ \n for ( kc_i=0; kc_i < KC_NO_OF_OPERAT"), kc_current_view ); kc_printer(kc_t("ORS; kc_i++ ) {\ \n kc_OpToOpMap[kc_i].left = kc_i;\ \n kc_OpToOpMap[kc_i].right = kc_v;\ \n} }\ \n\ \nbool\ \nOpToOpMap_cmp_right(kc_OpToOpMap_tuple_t t1, kc_OpToOpMap_tuple_t t2)\ \n{\ \n // sor"), kc_current_view ); kc_printer(kc_t("t in DECREASING order\ \n return t1.right > t2.right;\ \n}\ \n\ \nbool\ \nOpToOpMap_cmp_left(kc_OpToOpMap_tuple_t t1, kc_OpToOpMap_tuple_t t2)\ \n{\ \n // sort in INCREASING order\ \n return t"), kc_current_view ); kc_printer(kc_t("1.left < t2.left;\ \n}\ \n\ \nvoid\ \nkc_renumberOpToOpMap()\ \n{\ \n int kc_i, kc_j = 0;\ \n for ( kc_i=0; kc_i < KC_NO_OF_OPERATORS; kc_i++ ) {\ \n if (kc_OpToOpMap[kc_i].right > 0) {\ \n k"), kc_current_view ); kc_printer(kc_t("c_OpToOpMap[kc_i].right = kc_j++;\ \n } else {\ \n kc_OpToOpMap[kc_i].right = KC_NOT_USED;\ \n} } }\ \n\ \n\ \n#define KC_MAKE_NEW_MAPPING(ext_op,int_op) kc_OpToOpMap[ext_op].right = int_op\ \n#d"), kc_current_view ); kc_printer(kc_t("efine KC_MAKE_NEW_SCAN_MAPPING(ext_op) kc_OpToOpMap[ext_op].right++\ \n#define KC_MAP(op) (kc_OpToOpMap[op].right)\ \n#define KC_IS_MAPPED(op) (kc_OpToOpMap[op].right != KC_NOT_USED)\ \n\ \nvoid\ \nkc_"), kc_current_view ); kc_printer(kc_t("error_operator_not_in_phylum(int kc_op, int kc_phy)\ \n{\ \n const char *kc_error_message1 = \"operator not defined in phylum \";\ \n const char *kc_error_message2 = \": \";\ \n if ((kc_op <= "), kc_current_view ); kc_printer(kc_t("one_before_first_operator) || (kc_op >= last_operator)) {\ \n char kc_value[30];\ \n sprintf(kc_value, \"%d\",kc_op);\ \n kc_csgio_err_reason = kc_str_conc2(\"unknown operator number: \", kc_value);\ \n"), kc_current_view ); kc_printer(kc_t(" } else {\ \n kc_csgio_err_reason = (char*)strcat(strcat(strcat(strcpy(new char[(size_t)(strlen(kc_error_message1)+strlen(phylum_info[kc_phy].name)+strlen(kc_error_message2)+strlen(operator_info[kc_"), kc_current_view ); kc_printer(kc_t("op].name)+1)], kc_error_message1), phylum_info[kc_phy].name), kc_error_message2), operator_info[kc_op].name);\ \n }\ \n throw IO_exception(KC_CSGIOSTATUS_ILLEGAL_CONTEXT); /*NOTREACHED*/\ \n}\ \n"), kc_current_view ); kc_printer(kc_t("\ \n} // anonymous namespace\ \n\ \nchar*\ \nIO_exception2char(IO_exception kc_p)\ \n{\ \n char *kc_err_ret = 0;\ \n const char *kc_err_sep = \": \";\ \n if (kc_p.io_status != KC_CSGIOSTATUS_R"), kc_current_view ); kc_printer(kc_t("OK && kc_p.io_status != KC_CSGIOSTATUS_WOK) {\ \n const char *kc_io_err = kc_CSGIOerrorstring(kc_p.io_status);\ \n kc_err_ret = new char[strlen(kc_io_err)+strlen(kc_err_sep)+strlen(kc_p.err_reason)+1];"), kc_current_view ); kc_printer(kc_t("\ \n strcpy(kc_err_ret, kc_io_err);\ \n strcat(kc_err_ret, kc_err_sep);\ \n strcat(kc_err_ret, kc_p.err_reason);\ \n }\ \n return kc_err_ret;\ \n}\ \n\ \nconst char *kc_csgio_err_reason = \"\";\ \n"), kc_current_view ); kc_printer(kc_t("\ \n#ifndef KC_NO_CSGIO_READ\ \nnamespace { // all local to this file\ \n\r\ \n/* Base 64 numbers are written with the digits:\ \n : ; < = > ? @ A-Z [ \\ ] ^ _ ` a-y\ \n Base 10 numbers are written"), kc_current_view ); kc_printer(kc_t(" with the ordinary digits 0-9.\ \n Other characters are used in special circumstances:\ \n ! Indicates switch between reading attribute and unattributed nodes.\ \n # Indicates that the father i"), kc_current_view ); kc_printer(kc_t("s the next PROD_INSTANCE in the file.\ \n + Indicates that the following bytes are not a base 64 number\ \n * Indicates a line containing a (decimal) count of attributes.\ \n*/\ \nconst char KC_B"), kc_current_view ); kc_printer(kc_t("64_ZERO_CHAR = ':';\ \nconst char KC_ASCII_ZERO = '0';\ \nconst char KC_SWITCH_ATTR = '!';\ \nconst char KC_FATHER_MARKER = '#';\ \nconst char KC_NON_B64_CHAR = '+';\ \nconst char KC_ATTR_COUNT = '*';\ \n"), kc_current_view ); kc_printer(kc_t("const char KC_NULL_POINTER = '.';\ \n\ \ninline bool\ \nKC_IS_B64(int c)\ \n{\ \n return c>=KC_B64_ZERO_CHAR && c=0"), kc_current_view ); kc_printer(kc_t(" && off<=kc_node_count, \"base 64 offset out of range\");\ \n kc_valptr = kc_offset_to_address_map[off];\ \n return(KC_READ_EARLIER);\ \n } else {\ \n ungetc(kc_first_char, kc_stream);\ \n return(KC"), kc_current_view ); kc_printer(kc_t("_NOT_READ_YET);\ \n }\ \n}\ \n\ \nKC_READ_STATUS\ \nkc_read_sharing_find_base(FILE *kc_stream, char const* &kc_valptr)\ \n{\ \n char kc_first_char;\ \n unsigned kc_offset;\ \n\ \n kc_first_"), kc_current_view ); kc_printer(kc_t("char = getc(kc_stream);\ \n if (KC_IS_B64(kc_first_char)) {\ \n kc_offset = get_rest_of_b64(kc_stream, kc_first_char, '\\n');\ \n int off=kc_file_offset_base - kc_offset;\ \n assertReason(off>=0 && "), kc_current_view ); kc_printer(kc_t("off<=kc_node_count_base, \"base 64 offset out of range\");\ \n kc_valptr = kc_offset_to_address_map_base[off];\ \n return(KC_READ_EARLIER);\ \n } else {\ \n return(KC_NOT_READ_YET);\ \n }\ \n}\ \n"), kc_current_view ); kc_printer(kc_t("\ \n#define kc_read_sharing_store(kc_ptr, kc_loc) \\\ \n kc_offset_to_address_map[kc_loc] = kc_ptr\ \n#define kc_read_sharing_store_base(kc_ptr) \\\ \n kc_offset_to_address_map_base[kc_file_offse"), kc_current_view ); kc_printer(kc_t("t_base++] = kc_ptr\ \n\ \n\ \nvoid\ \nkc_end_read_sharing()\ \n{\ \n delete kc_offset_to_address_map;\ \n delete kc_offset_to_address_map_base;\ \n}\ \n\ \nvoid\ \nkc_CSGIOdo_read_atom_denotation(FIL"), kc_current_view ); kc_printer(kc_t("E *kc_stream, char *kc_sbase, int kc_len)\ \n{\ \n char * kc_sptr = kc_sbase;\ \n register int kc_ch, kc_ch1;\ \n register char kc_test;\ \n register int kc_i;\ \n\ \n for (kc_i=0; kc_i<"), kc_current_view ); kc_printer(kc_t("kc_len; kc_i++, kc_sptr++) {\ \n kc_ch = getc(kc_stream);\ \n if (kc_ch == '\\n') {\ \n ungetc(kc_ch, kc_stream);\ \n break;\ \n }\ \n *kc_sptr = (char) kc_ch;\ \n if ( kc_ch == '\\\\' ) {\ \n "), kc_current_view ); kc_printer(kc_t(" if ( ( kc_test = getc( kc_stream ) ) != '\\\\' ) { /* Must be escaped hex */\ \n if (isdigit(kc_test)) kc_ch1 = kc_test - '0'; else kc_ch1 =kc_test + 10 - 'a';\ \n kc_ch1 = 16 * kc_ch1;\ \n kc_t"), kc_current_view ); kc_printer(kc_t("est = getc(kc_stream);\ \n if (isdigit(kc_test)) kc_test= kc_test - '0'; else kc_test=kc_test + 10 - 'a';\ \n kc_ch1 = kc_ch1 + kc_test;\ \n *kc_sptr = (char)kc_ch1; /* cast is for explicit narrowin"), kc_current_view ); kc_printer(kc_t("g from int to char */\ \n }\ \n }\ \n }\ \n\ \n kc_ch = getc(kc_stream);\ \n if ( kc_ch == EOF ) throw IO_exception(KC_CSGIOSTATUS_PREMATURE_EOF);\ \n else if (kc_ch != '\\n') throw IO_"), kc_current_view ); kc_printer(kc_t("exception(KC_CSGIOSTATUS_SCAN_ERR_1);\ \n\ \n *kc_sptr = '\\0';\ \n}\ \n\ \nabstract_phylum\ \nCSGIOread2dft(FILE *kc_stream, enum_phyla kc_phy)\ \n{\ \n char *kc_sbase;\ \n char const* c_kc_s"), kc_current_view ); kc_printer(kc_t("base;\ \n int kc_len;\ \n int kc_delim;\ \n abstract_phylum kc_answer;\ \n int kc_location;\ \n bool kc_not_read_yet = false;\ \n\ \n/* get operator */\ \n int kc_ext_op;\ \n int k"), kc_current_view ); kc_printer(kc_t("c_testing;\ \n\ \n /* XXX MPi: misleading comment? scan for optional unparsing version number */\ \n if (kc_read_sharing_find( kc_stream, kc_answer ) == KC_READ_EARLIER ) {\ \n // MPi: I believe "), kc_current_view ); kc_printer(kc_t("this is unnecessary or wrong - sharing is only done\ \n // when phyla are the _same_, so they should remain the same.\ \n // kc_answer = kc_answer->copy(false);\ \n return kc_answer;\ \n }\ \n"), kc_current_view ); kc_printer(kc_t(" kc_do_get_int(kc_testing,getc(kc_stream),kc_ext_op,kc_stream);\ \n if ( kc_testing == EOF )\ \n throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1);\ \n if ( kc_testing == KC_NULL_POINTER )\ \n "), kc_current_view ); kc_printer(kc_t("{\ \n kc_do_get_int(kc_testing,getc(kc_stream),kc_ext_op,kc_stream);\ \n if ( kc_testing != '\\n' )\ \n throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1);\ \n return 0;\ \n }\ \n if ( kc_testing "), kc_current_view ); kc_printer(kc_t("== KC_FATHER_MARKER )\ \n throw IO_exception(KC_CSGIOSTATUS_UNEXP_FATHER_MARK);\ \n if ( kc_testing != '\\n' )\ \n throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1);\ \n enum_operators kc_op(static_c"), kc_current_view ); kc_printer(kc_t("ast(KC_MAP( kc_ext_op )));\ \n/* end get operator */\ \n\ \n if (kc_opphylum_info[kc_phy].last_operator)\ \n kc_error_operator_not_in"), kc_current_view ); kc_printer(kc_t("_phylum(kc_op,kc_phy);\ \n\ \n kc_location = kc_file_offset++;\ \n switch( kc_op ) {\r\ \n case sel__VoidPtr:\v\ \n // FATAL ERROR\ \n kc_do_get_int(kc_delim,getc(kc_stream),kc_len,kc_stream);"), kc_current_view ); kc_printer(kc_t("\ \n if ( kc_delim == EOF )\ \n throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1);\ \n kc_sbase = KC_GETMALLOCAREA(kc_len + 1); // +1 for '\\0'\ \n kc_CSGIOdo_read_atom_denotation(kc_stream, kc_sbase, "), kc_current_view ); kc_printer(kc_t("kc_len);\ \n kc_answer = 0;\ \n break;\r\ \n case sel__Int:\v\ \n kc_do_get_int(kc_delim,getc(kc_stream),kc_len,kc_stream);\ \n if ( kc_delim == EOF )\ \n throw IO_exception(KC_CSGIOSTATUS_SCAN_"), kc_current_view ); kc_printer(kc_t("ERR_1);\ \n kc_sbase = KC_GETMALLOCAREA(kc_len + 1); // +1 for '\\0'\ \n kc_CSGIOdo_read_atom_denotation(kc_stream, kc_sbase, kc_len);\ \n kc_answer = mkinteger(::atoi(kc_sbase));\ \n break;\r\ \n c"), kc_current_view ); kc_printer(kc_t("ase sel__Real:\v\ \n kc_do_get_int(kc_delim,getc(kc_stream),kc_len,kc_stream);\ \n if ( kc_delim == EOF )\ \n throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1);\ \n kc_sbase = KC_GETMALLOCAREA(kc_len +"), kc_current_view ); kc_printer(kc_t(" 1); // +1 for '\\0'\ \n kc_CSGIOdo_read_atom_denotation(kc_stream, kc_sbase, kc_len);\ \n kc_answer = mkreal(::atof(kc_sbase));\ \n break;\r\ \n case sel__Str:\v\ \n if (kc_read_sharing_find_base( "), kc_current_view ); kc_printer(kc_t("kc_stream, c_kc_sbase ) == KC_NOT_READ_YET) {\ \n kc_not_read_yet = true;\ \n kc_do_get_int(kc_delim,getc(kc_stream),kc_len,kc_stream);\ \n if ( kc_delim == EOF )\ \n throw IO_exception(KC"), kc_current_view ); kc_printer(kc_t("_CSGIOSTATUS_SCAN_ERR_1);\ \n kc_sbase = KC_GETMALLOCAREA(kc_len + 1); /* +1 for '\\0' */\ \n kc_CSGIOdo_read_atom_denotation(kc_stream, kc_sbase, kc_len);\ \n c_kc_sbase=kc_sbase;\ \n }\ \n"), kc_current_view ); kc_printer(kc_t(" kc_answer = mkcasestring( c_kc_sbase );\ \n if (kc_not_read_yet) {\ \n kc_read_sharing_store_base( phylum_cast(kc_answer)->name );\ \n }\ \n break;\r\ \n case sel_NoCaseStr:\v\ \n i"), kc_current_view ); kc_printer(kc_t("f (kc_read_sharing_find_base( kc_stream, c_kc_sbase ) == KC_NOT_READ_YET) {\ \n kc_not_read_yet = true;\ \n kc_do_get_int(kc_delim,getc(kc_stream),kc_len,kc_stream);\ \n if ( kc_delim == EO"), kc_current_view ); kc_printer(kc_t("F )\ \n throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1);\ \n kc_sbase = KC_GETMALLOCAREA(kc_len + 1); /* +1 for '\\0' */\ \n kc_CSGIOdo_read_atom_denotation(kc_stream, kc_sbase, kc_len);\ \n "), kc_current_view ); kc_printer(kc_t(" c_kc_sbase=kc_sbase;\ \n }\ \n kc_answer = mknocasestring( c_kc_sbase );\ \n if (kc_not_read_yet) {\ \n kc_read_sharing_store_base( phylum_cast(kc_answer)->name );\ \n }\ \n break;\ \n"), kc_current_view ); kc_printer(kc_t(" default:\v\ \n abstract_phylum kc_subtmp["), kc_current_view); } int i = Theargsnumbers->last()->value; if (i<=0) i = 1; kc::unparse(i, kc_printer, kc_current_view); { kc_printer(kc_t("];\ \n for (int kc_i = 0; kc_i < operator_info[kc_op].no_sons; ++kc_i) {\ \n kc_subtmp[kc_i] = CSGIOread2dft(kc_stream, operator_info[kc_op].subphylum[kc_i] );\ \n assertReason(kc_subtmp[kc_i]!"), kc_current_view ); kc_printer(kc_t("=0, \"shared phylum is not contained in file (reference is wrong)\");\ \n }\ \n"), kc_current_view); } { kc_printer(kc_t(" switch(operator_info[kc_op].no_sons) {\ \n"), kc_current_view); } kc::unparse(Theargsnumbers, kc_printer, kc_current_view); { kc_printer(kc_t(" default:\v\ \n assertionFailed(\"unexpected number of sub-phyla\"); break;\r\ \n }\r\ \n // Read attributes\ \n for (int kc_i=0; kc_i>= 6;\ \n }\ \n if (kc_value < 0) {\ \n putc('-', kc_f);\ \n }\ \n }\ \n putc('\\n', kc_f);\ \n}\ \n\ \n// realize sharing of strings in ouput file\ \nvoid\ \n"), kc_current_view ); kc_printer(kc_t("kc_CSGIOscan(c_abstract_phylum kc_p)\ \n{\ \n if (kc_p==0) return;\ \n enum_operators kc_op = kc_p->prod_sel();\ \n if (kc_CSGIOhashtable[kc_p].number == -1) {\ \n kc_CSGIOhashtable[kc_p].numb"), kc_current_view ); kc_printer(kc_t("er = kc_node_count++;\ \n KC_MAKE_NEW_SCAN_MAPPING( kc_op );\ \n switch(kc_op) {\ \n case sel__Str:\ \n case sel_NoCaseStr: {\ \n char const* s = static_cast(kc_p)->name;\ \n if ("), kc_current_view ); kc_printer(kc_t("kc_CSGIOhashtable[s].number == -1)\v\ \n kc_CSGIOhashtable[s].number = kc_node_count_base++;\r\ \n break;\ \n }\ \n default: {\ \n abstract_phylum child;\ \n for (int i=0; (c"), kc_current_view ); kc_printer(kc_t("hild = kc_p->subphylum(i)); ++i)\v\ \n kc_CSGIOscan(child);\r\ \n }\ \n }\ \n for (int i=0; i(kc_p), "), kc_current_view ); kc_printer(kc_t("i));\r\ \n }\ \n}\ \n\ \nvoid\ \nkc_CSGIOwrite2structure(FILE *kc_stream, c_abstract_phylum kc_p)\ \n{\ \n if (kc_p==0) {\ \n fprintf( kc_stream, \"%c\\n\", KC_NULL_POINTER );\ \n return;\ \n "), kc_current_view ); kc_printer(kc_t("}\ \n char _kc_value[30];\ \n char *kc_value = _kc_value;\ \n enum_operators kc_op = kc_p->prod_sel();\ \n csgio_info &kc_hn = kc_CSGIOhashtable[kc_p];\ \n if (kc_hn.created) {\ \n kc_pr"), kc_current_view ); kc_printer(kc_t("int_b64_to_file( kc_stream, kc_file_offset - kc_hn.number );\ \n } else {\ \n kc_hn.created = true;\ \n fprintf( kc_stream, \"%d\\n\", KC_MAP( kc_op ) );\ \n kc_file_offset++;\ \n switch(kc_op) {\r\ \n"), kc_current_view ); kc_printer(kc_t(" case sel__VoidPtr:\v\ \n /* FATAL ERROR */\ \n sprintf( kc_value, \"%p\", static_cast(kc_p)->pointer);\ \n kc_print_to_file( kc_stream, kc_value );\ \n kc_file_offset_base++"), kc_current_view ); kc_printer(kc_t(";\ \n break;\r\ \n case sel__Str:\ \n case sel_NoCaseStr:\v\ \n fprintf( kc_stream, \"%c\", KC_NON_B64_CHAR );\ \n kc_print_to_file( kc_stream, static_cast(kc_p)->name);\ \n "), kc_current_view ); kc_printer(kc_t(" kc_file_offset_base++;\ \n break;\r\ \n case sel__Int:\v\ \n sprintf( kc_value, \"%d\", static_cast(kc_p)->value);\ \n kc_print_to_file( kc_stream, kc_value );\ \n kc_file"), kc_current_view ); kc_printer(kc_t("_offset_base++;\ \n break;\r\ \n case sel__Real:\v\ \n sprintf( kc_value, \"%.20f\", static_cast(kc_p)->value);\ \n kc_print_to_file( kc_stream, kc_value );\ \n kc_file_offset_b"), kc_current_view ); kc_printer(kc_t("ase++;\ \n break;\r\ \n default:\ \n abstract_phylum child;\ \n for (int kc_i=0; (child = kc_p->subphylum(kc_i)); ++kc_i)\v\ \n kc_CSGIOwrite2structure(kc_stream, child);\r\ \n"), kc_current_view ); kc_printer(kc_t(" // Write attributes\ \n for (int kc_i=0; kc_i(kc_p), kc_i));\r\ \n }\ \n"), kc_current_view ); kc_printer(kc_t(" }\ \n}\ \n\ \nvoid\ \nCSGIOwrite(FILE *kc_stream, c_abstract_phylum kc_p)\ \n{\ \n int kc_i;\ \n kc_csgio_err_reason = \"\";\ \n\ \n /* write out the magic string and $operators string */\ \n"), kc_current_view ); kc_printer(kc_t(" fprintf( kc_stream, \"%s\\n$operators \\n\", kc_ascii_prefix_magic_hu );\ \n\ \n /* Initialize map from internal operators to external operators, */\ \n /* initially empty */\ \n kc_no_ext"), kc_current_view ); kc_printer(kc_t("ernal_ops = 0;\ \n kc_node_count = 0;\ \n kc_node_count_base = 0;\ \n kc_initializeOpToOpMap(0); /* initialize to 0, not any other value */\ \n\ \n // realize sharing\ \n kc_CSGIOscan(kc"), kc_current_view ); kc_printer(kc_t("_p);\ \n /* sort the optoopmap on decreasing operator usage */\ \n std::sort(&kc_OpToOpMap[0], &kc_OpToOpMap[KC_NO_OF_OPERATORS], OpToOpMap_cmp_right);\ \n kc_renumberOpToOpMap();\ \n\ \n /"), kc_current_view ); kc_printer(kc_t("* write out the _sorted_ operator table */\ \n for(kc_i = 0; kc_i < KC_NO_OF_OPERATORS; kc_i++) {\ \n if (kc_OpToOpMap[kc_i].right != KC_NOT_USED) {\ \n fprintf( kc_stream, \"%s %d %d %d\\n\", K"), kc_current_view ); kc_printer(kc_t("C_OP_NAME( kc_OpToOpMap[kc_i].left), KC_NO_SONS( kc_OpToOpMap[kc_i].left ), 0, KC_ATOMICITY( kc_OpToOpMap[kc_i].left ) );\ \n } }\ \n\ \n /* sort the optoopmap increasing on the operator number *"), kc_current_view ); kc_printer(kc_t("/\ \n std::sort(&kc_OpToOpMap[0], &kc_OpToOpMap[KC_NO_OF_OPERATORS], OpToOpMap_cmp_left);\ \n\ \n /* write out the grammar terminator string and the number of nodes */\ \n fprintf( kc_stream, "), kc_current_view ); kc_printer(kc_t("\"$object \\n%d %d\\n\", kc_node_count, kc_node_count_base );\ \n\ \n /* write out the tree */\ \n kc_file_offset = 0;\ \n kc_file_offset_base = 0;\ \n kc_CSGIOwrite2structure( kc_stream, k"), kc_current_view ); kc_printer(kc_t("c_p);\ \n kc_CSGIOhashtable.clear();\ \n}\ \n\ \n} // anonymous namespace\ \n\ \nvoid\ \nimpl_abstract_phylum::CSGIOwrite(FILE *kc_stream) const\ \n{\ \n kc::CSGIOwrite(kc_stream, this);\ \n}\ \n"), kc_current_view ); kc_printer(kc_t("\ \n#endif // ! KC_NO_CSGIO_WRITE\ \n\ \n"), kc_current_view); } } break; } case view_gen_csgio_start_c_enum: { view_gen_csgio_start_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("/* translation of file(s)\n"), kc_current_view); } kc::unparse(Thefnfiles, kc_printer, kc_current_view); { kc_printer(kc_t(" */\ \n/* generated by:\ \n * "), kc_current_view); } kc::unparse(kimwitu_copyright, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n */\ \n#define KC_CSGIO\ \n"), kc_current_view); } if(g_options.stdafx!="") { PRINT("#include \""); PRINT(g_options.stdafx.c_str()); PRINT("\"\n"); } { kc_printer(kc_t("\ \n#include \ \n#include \ \n#include \ \n#include \ \n#include \ \n#include \ \n#include \""), kc_current_view); } PRINT(g_options.prefix.c_str()); { kc_printer(kc_t("k.h\"\ \n#include \""), kc_current_view); } PRINT(g_options.prefix.c_str()); { kc_printer(kc_t("csgiok.h\"\ \n\ \n"), kc_current_view); } } break; } case view_gen_csgio_h_enum: { view_gen_csgio_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; { kc_printer(kc_t("\ \nextern const char *kc_csgio_err_reason;\ \n\ \ntypedef enum {\ \n KC_CSGIOSTATUS_NO_ERR = 0,\ \n KC_CSGIOSTATUS_SCAN_ERR_1, KC_CSGIOSTATUS_SCAN_ERR_2, KC_CSGIOSTATUS_SCAN_ERR_3,\ \n KC_CSG"), kc_current_view ); kc_printer(kc_t("IOSTATUS_SCAN_ERR_4, KC_CSGIOSTATUS_SCAN_ERR_5, KC_CSGIOSTATUS_GRAM_INCONSISTENT,\ \n KC_CSGIOSTATUS_ROK, KC_CSGIOSTATUS_ILLEGAL_OPTION, KC_CSGIOSTATUS_TOO_MANY_OPERATORS,\ \n KC_CSGIOSTATUS_WOK,"), kc_current_view ); kc_printer(kc_t(" KC_CSGIOSTATUS_TXT_FILE_INPUT, KC_CSGIOSTATUS_SYNTAX_ERROR,\ \n KC_CSGIOSTATUS_ILLEGAL_CONTEXT, KC_CSGIOSTATUS_PREMATURE_EOF,\ \n KC_CSGIOSTATUS_UNEXP_FATHER_MARK\ \n} KC_IO_STATUS;\ \n\ \n// XX"), kc_current_view ); kc_printer(kc_t("X Needs to be extended\ \nstruct IO_exception {\ \n IO_exception(KC_IO_STATUS _io_status, const char* _err_reason=kc_csgio_err_reason, int _line=0)\ \n : io_status(_io_status), err_reason(_err_reaso"), kc_current_view ); kc_printer(kc_t("n), line(_line) { }\ \n KC_IO_STATUS io_status;\ \n const char *err_reason;\ \n int line;\ \n};\ \n\ \nchar* IO_exception2char(IO_exception);\ \n\ \n#if defined(__GNUC__) && __GNUC__<3\ \n "), kc_current_view ); kc_printer(kc_t("extern void CSGIOreadphylum(FILE*, abstract_phylum&, enum_phyla);\ \n#endif\ \n\ \ntemplate void\ \nCSGIOread(FILE* kc_stream, P &kc_p)\ \n{\ \n abstract_phylum kc_value;\ \n#if !(define"), kc_current_view ); kc_printer(kc_t("d(__GNUC__) && __GNUC__<3)\ \n extern void CSGIOreadphylum(FILE*, abstract_phylum&, enum_phyla);\ \n#endif\ \n CSGIOreadphylum( kc_stream, kc_value, kc_p->phylum_sel_ );\ \n // Cast _could_ be"), kc_current_view ); kc_printer(kc_t(" static, but just to be completely sure\ \n if (dynamic_cast

(kc_value)==0)\ \n throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_5, \"Internal problem: Wrong phylum type created.\");\ \n kc_p = dynam"), kc_current_view ); kc_printer(kc_t("ic_cast

(kc_value);\ \n}\ \n\ \n"), kc_current_view); } } break; } case view_gen_csgio_end_h_enum: { view_gen_csgio_end_h_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t(" #endif // KC_CSGIO_HEADER\ \n\ \n"), kc_current_view); } } break; } case view_gen_csgio_start_h_enum: { view_gen_csgio_start_h_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("/* translation of file(s)\n"), kc_current_view); } kc::unparse(Thefnfiles, kc_printer, kc_current_view); { kc_printer(kc_t(" */\ \n/* generated by:\ \n * "), kc_current_view); } kc::unparse(kimwitu_copyright, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n */\ \n#ifndef KC_CSGIO_HEADER\ \n#define KC_CSGIO_HEADER\ \n#include \""), kc_current_view); } PRINT(g_options.prefix.c_str()); { kc_printer(kc_t("k.h\" // in case a user forgets\ \n\ \n"), kc_current_view); } } break; } case view_gen_listdefs_c_enum: { view_gen_listdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; kc::unparse(pds, kc_printer, kc_current_view); } break; } case view_gen_printdotdefs_c_enum: { view_gen_printdotdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; { kc_printer(kc_t("\ \n#ifndef KC_PRINTDOT_LABELSIZE\ \n# define KC_PRINTDOT_LABELSIZE 1023\ \n#endif\ \n\ \nclass impl_kc_dotedgenode_t\ \n{\ \npublic:\ \n impl_kc_dotedgenode_t(c_abstract_phylum from,c_abstract_phyl"), kc_current_view ); kc_printer(kc_t("um to, int _son_nr):\ \n ptr_from(from), ptr_to(to), son_nr(_son_nr), label(0), lsize(0), next(0) { }\ \n c_abstract_phylum ptr_from;\ \n c_abstract_phylum ptr_to;\ \n int son_nr;\ \n char "), kc_current_view ); kc_printer(kc_t("*label;\ \n int lsize;\ \n kc_dotedgenode_t next;\ \n};\ \n\ \nstatic kc_dotedgenode_t\ \nkc_mkdotedgenode(struct kc_dotedge_ht*, c_abstract_phylum, c_abstract_phylum, int);\ \nstatic void kc_do_"), kc_current_view ); kc_printer(kc_t("printdot_do_add_edge (c_abstract_phylum, c_abstract_phylum, int, int*, kc_dotedgenode_t*, const char*);\ \nstatic void kc_do_printdot_subgraph_prologue (FILE*, c_abstract_phylum, const char*, const cha"), kc_current_view ); kc_printer(kc_t("r*, bool, bool);\ \nstatic void kc_do_printdot_subgraph_epilogue (FILE*);\ \nstatic void kc_do_printdot_genfields (FILE*, int, bool);\ \nstatic void kc_do_printdot_edges (FILE*, kc_dotedgenode_t, const"), kc_current_view ); kc_printer(kc_t(" char*, bool);\ \n\ \nstatic bool\ \nkc_dotedge_less(kc_dotedgenode_t p1, kc_dotedgenode_t p2)\ \n{\ \n if(p2==0)\ \n return false;\ \n if(p1==0)\ \n return true;\ \n if(p1->ptr_fromptr_f"), kc_current_view ); kc_printer(kc_t("rom)\ \n return true;\ \n if(p1->ptr_from>p2->ptr_from)\ \n return false;\ \n if(p1->ptr_toptr_to)\ \n return true;\ \n if(p1->ptr_to>p2->ptr_to)\ \n return false;\ \n if(p1->son_nrson_nr)\ \n return true;\ \n // OPERATORHASH((unsigned) kc_phy_from);\ \n // OPERATORHASH((unsigned) kc_phy_to);\ \n return false;\ \n}\ \n\ \ntemplate\ \nstruct dotedge_less : s"), kc_current_view ); kc_printer(kc_t("td::binary_function {\ \n bool operator()(const T& X, const T& Y) const { return kc_dotedge_less(X,Y); }\ \n};\ \n\ \nstruct kc_dotedge_ht: public std::set > {\ \n ~kc_dotedge_ht() {\ \n for(iterator i=begin();i!=end();++i)\ \n delete const_cast(*i);\ \n clear();\ \n }\ \n kc_dotedgenode_t check_insert(kc_dotedg"), kc_current_view ); kc_printer(kc_t("enode_t t) {\ \n std::pair res=insert(t);\ \n return *res.first;\ \n }\ \n};\ \n\ \nstatic kc_dotedge_ht* fprintdot_hashtable;\ \n"), kc_current_view); } kc::unparse(pds, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n\ \nkc_dotedgenode_t\ \nkc_mkdotedgenode(kc_dotedge_ht* kc_a_ht, c_abstract_phylum kc_s_from, c_abstract_phylum kc_s_to, int kc_son_nr)\ \n{\ \n kc_dotedgenode_t kc_x = new impl_kc_dotedgenode_t"), kc_current_view ); kc_printer(kc_t("(kc_s_from,kc_s_to,kc_son_nr);\ \n kc_dotedgenode_t unique_kc_x=kc_a_ht->check_insert(kc_x);\ \n if(unique_kc_x!=kc_x) {\ \n delete kc_x;\ \n kc_x=unique_kc_x;\ \n }\ \n return kc_x;\ \n}\ \n\ \n"), kc_current_view ); kc_printer(kc_t("void kc_do_printdot_subgraph_prologue(FILE *kc_f, c_abstract_phylum kc_p, const char *root_label_prefix, const char *edge_attributes, bool print_node_labels, bool use_context_when_sharing_leaves)\ \n{\ \n"), kc_current_view ); kc_printer(kc_t(" if (!kc_f) kc_f = stdout;\ \n fprintf(kc_f, \"/*subgraph*/ {\\n\");\ \n if (root_label_prefix) {\ \n fprintf(kc_f, \"\\\"%s\\\" [shape=ellipse\", root_label_prefix);\ \n if (edge_attributes &"), kc_current_view ); kc_printer(kc_t("& (strlen(edge_attributes) > 0)) {\ \n fprintf(kc_f, \", %s\", edge_attributes);\ \n }\ \n if (print_node_labels) {\ \n fprintf(kc_f, \", label=\\\"%s\\\\n%s\\\"\", root_label_prefix, phylum_in"), kc_current_view ); kc_printer(kc_t("fo[kc_p->phylum()].name);\ \n }\ \n fprintf(kc_f, \"];\\n\");\ \n fprintf(kc_f, \"\\\"%s\\\" ->\", root_label_prefix);\ \n kc_p->do_printdot_id(kc_f, use_context_when_sharing_leaves, 0, 0);\ \n if (edg"), kc_current_view ); kc_printer(kc_t("e_attributes && (strlen(edge_attributes) > 0)) {\ \n fprintf(kc_f, \"[%s]\", edge_attributes);\ \n }\ \n fprintf(kc_f, \";\\n\");\ \n }\ \n}\ \n\ \nvoid kc_do_printdot_subgraph_epilogue(FILE *kc"), kc_current_view ); kc_printer(kc_t("_f)\ \n{\ \n if (!kc_f) kc_f = stdout;\ \n fprintf(kc_f, \"}\\n\");\ \n}\ \n\ \nvoid fprintdotprologue(FILE *kc_f)\ \n{\ \n if (!kc_f) kc_f = stdout;\ \n fprintf(kc_f, \"digraph kc_output{\\n"), kc_current_view ); kc_printer(kc_t("\");\ \n fprintf(kc_f, \"node [shape=record, height=.1, fontname=Helvetica];\\n\");\ \n}\ \n\ \nvoid fprintdotepilogue(FILE *kc_f)\ \n{\ \n if (!kc_f) kc_f = stdout;\ \n fprintf(kc_f, \"}\\n\""), kc_current_view ); kc_printer(kc_t(");\ \n}\ \n\ \nvoid kc_do_printdot_genfields(FILE *kc_f, int kc_prodsel, bool print_node_labels)\ \n{\ \n int kc_i = 1;\ \n KC_OPERATOR_INFO *kc_op_info = &operator_info[kc_prodsel];\ \n if (kc_op_i"), kc_current_view ); kc_printer(kc_t("nfo->no_sons <= 0) return;\ \n if (!kc_f) kc_f = stdout;\ \n while(kc_i < kc_op_info->no_sons) {\ \n fprintf(kc_f, \"\", kc_i);\ \n if (print_node_labels) {\ \n fprintf(kc_f, \"%s\", "), kc_current_view ); kc_printer(kc_t("phylum_info[kc_op_info->subphylum[kc_i-1]].name);\ \n }\ \n fprintf(kc_f, \"|\");\ \n kc_i++;\ \n }\ \n fprintf(kc_f, \"\", kc_i);\ \n if (print_node_labels) {\ \n fprintf(kc_f, \"%"), kc_current_view ); kc_printer(kc_t("s\", phylum_info[kc_op_info->subphylum[kc_i-1]].name);\ \n }\ \n}\ \n\ \nvoid impl_abstract_phylum::do_printdot_id(FILE *kc_f, bool use_context_when_sharing_leaves, c_abstract_phylum kc_ctxt, int kc_s"), kc_current_view ); kc_printer(kc_t("on_nr) const\ \n{\ \n // The casts only make unique ids, so reinterpret_cast is alright\ \n if (!kc_f) kc_f = stdout;\ \n enum_phyla kc_phy = phylum();\ \n if (kc_phy == phylum_voidptr) {\ \n"), kc_current_view ); kc_printer(kc_t(" fprintf(kc_f, \"kcidp%x\", reinterpret_cast(this));\ \n if (use_context_when_sharing_leaves) {\ \n fprintf(kc_f, \"_%x_%d\", reinterpret_cast(kc_ctxt), kc_son_nr);\ \n }\ \n } else if"), kc_current_view ); kc_printer(kc_t(" ((kc_phy == phylum_casestring) || (kc_phy == phylum_nocasestring)) {\ \n fprintf(kc_f, \"kcids%x\", reinterpret_cast(this));\ \n if (use_context_when_sharing_leaves) {\ \n fprintf(kc_f, \"_%x"), kc_current_view ); kc_printer(kc_t("_%d\", reinterpret_cast(kc_ctxt), kc_son_nr);\ \n }\ \n } else if (kc_phy == phylum_integer) {\ \n fprintf(kc_f, \"kcidi%x\", reinterpret_cast(this));\ \n if (use_context_when_sharing_leav"), kc_current_view ); kc_printer(kc_t("es) {\ \n fprintf(kc_f, \"_%x_%d\", reinterpret_cast(kc_ctxt), kc_son_nr);\ \n }\ \n } else if (kc_phy == phylum_real) {\ \n fprintf(kc_f, \"kcidf%x\", reinterpret_cast(this));\ \n if "), kc_current_view ); kc_printer(kc_t("(use_context_when_sharing_leaves) {\ \n fprintf(kc_f, \"_%x_%d\", reinterpret_cast(kc_ctxt), kc_son_nr);\ \n }\ \n } else {\ \n fprintf(kc_f, \"kcidx%x\", reinterpret_cast(this));\ \n}"), kc_current_view ); kc_printer(kc_t(" }\ \n\ \nvoid kc_do_printdot_do_add_edge(c_abstract_phylum kc_p, c_abstract_phylum kc_sub_p, int kc_son_nr, int *kc_edge_nr, kc_dotedgenode_t *kc_edges, const char *edge_label_prefix)\ \n{\ \n kc"), kc_current_view ); kc_printer(kc_t("_dotedgenode_t kc_hn;\ \n char kc_buf[30];\ \n kc_hn = kc_mkdotedgenode(fprintdot_hashtable, kc_p, kc_sub_p, kc_son_nr);\ \n if (! kc_hn->label) {\ \n kc_hn->label = new char[(size_t)(KC_PRIN"), kc_current_view ); kc_printer(kc_t("TDOT_LABELSIZE+1)];\ \n kc_hn->lsize = KC_PRINTDOT_LABELSIZE;\ \n strcpy(kc_hn->label, \"\");\ \n kc_hn->next = *kc_edges;\ \n *kc_edges = kc_hn;\ \n } else {\ \n char kc_buf2[30];\ \n sprintf(kc_bu"), kc_current_view ); kc_printer(kc_t("f2, \", \");\ \n strncat(kc_hn->label, kc_buf2, kc_hn->lsize - strlen(kc_hn->label));\ \n }\ \n if (edge_label_prefix) {\ \n strncat(kc_hn->label, edge_label_prefix, kc_hn->lsize - strlen(kc_hn->"), kc_current_view ); kc_printer(kc_t("label));\ \n }\ \n sprintf(kc_buf, \"%d\", *kc_edge_nr);\ \n strncat(kc_hn->label, kc_buf, kc_hn->lsize - strlen(kc_hn->label));\ \n (*kc_edge_nr)++;\ \n}\ \n\ \nvoid impl_abstract_phylum::"), kc_current_view ); kc_printer(kc_t("printdot_add_edge(c_abstract_phylum kc_sub_p, int kc_son_nr, int *kc_edge_nr, kc_dotedgenode_t *kc_edges, const char *edge_label_prefix) const\ \n{\ \n kc_do_printdot_do_add_edge(this, kc_sub_p, kc_so"), kc_current_view ); kc_printer(kc_t("n_nr, kc_edge_nr, kc_edges, edge_label_prefix);\ \n}\ \n\ \nvoid kc_do_printdot_edges(FILE *kc_f, kc_dotedgenode_t kc_edges, const char *edge_attributes, bool use_context_when_sharing_leaves)\ \n{\ \n "), kc_current_view ); kc_printer(kc_t(" kc_dotedgenode_t kc_p = kc_edges;\ \n if (!kc_f) kc_f = stdout;\ \n while(kc_p) {\ \n kc_p->ptr_from->do_printdot_id(kc_f, use_context_when_sharing_leaves, 0, 0);\ \n fprintf(kc_f, \":f%d -> \""), kc_current_view ); kc_printer(kc_t(", kc_p->son_nr);\ \n kc_p->ptr_to->do_printdot_id(kc_f, use_context_when_sharing_leaves, kc_p->ptr_from, kc_p->son_nr);\ \n fprintf(kc_f, \" [label=\\\"%s\\\"\", kc_p->label);\ \n if (edge_attributes &"), kc_current_view ); kc_printer(kc_t("& (strlen(edge_attributes) > 0)) {\ \n fprintf(kc_f, \", %s\", edge_attributes);\ \n }\ \n fprintf(kc_f, \"];\\n\");\ \n kc_p = kc_p->next;\ \n} }\ \n\ \nvoid impl_abstract_phylum::do_printdot(FI"), kc_current_view ); kc_printer(kc_t("LE *kc_f, bool kc_outmost, int *kc_edge_nr, kc_dotedgenode_t *kc_edges, const char *edge_label_prefix, bool print_node_labels, bool use_context_when_sharing_leaves, c_abstract_phylum kc_ctxt, int kc_so"), kc_current_view ); kc_printer(kc_t("n_nr) const\ \n{\ \n int kc_i;\ \n\ \n if (!kc_f) kc_f = stdout;\ \n switch(phylum()) {\ \n case phylum_voidptr:\ \n do_printdot_id(kc_f, use_context_when_sharing_leaves, kc_ctxt, kc_son_n"), kc_current_view ); kc_printer(kc_t("r);\ \n fprintf(kc_f, \" [label=\\\"%p\\\", shape=ellipse];\\n\", dynamic_cast(this)->pointer);\ \n break;\ \n case phylum_casestring:\ \n case phylum_nocasestring:\ \n do_printd"), kc_current_view ); kc_printer(kc_t("ot_id(kc_f, use_context_when_sharing_leaves, kc_ctxt, kc_son_nr);\ \n#ifdef KC_UNICODE\ \n fprintf(kc_f, \" [label=\\\"%s\\\", shape=ellipse];\\n\", kc_to_cstring(static_cast(this)->n"), kc_current_view ); kc_printer(kc_t("ame).c_str());\ \n#else\ \n fprintf(kc_f, \" [label=\\\"%s\\\", shape=ellipse];\\n\", static_cast(this)->name);\ \n#endif\ \n break;\ \n case phylum_integer:\ \n do_printdot_i"), kc_current_view ); kc_printer(kc_t("d(kc_f, use_context_when_sharing_leaves, kc_ctxt, kc_son_nr);\ \n fprintf(kc_f, \" [label=\\\"%i\\\", shape=ellipse];\\n\", ((integer)this)->value);\ \n break;\ \n case phylum_real:\ \n do_"), kc_current_view ); kc_printer(kc_t("printdot_id(kc_f, use_context_when_sharing_leaves, kc_ctxt, kc_son_nr);\ \n fprintf(kc_f, \" [label=\\\"%f\\\", shape=ellipse];\\n\", ((real)this)->value);\ \n break;\ \n default:\ \n if (!"), kc_current_view ); kc_printer(kc_t("subphylum(0)) {\ \n do_printdot_id(kc_f, use_context_when_sharing_leaves, kc_ctxt, kc_son_nr);\ \n fprintf(kc_f, \" [label=\\\"%s\\\"];\\n\", op_name());\ \n } else {\ \n do_printdot_id(kc_f"), kc_current_view ); kc_printer(kc_t(", use_context_when_sharing_leaves, kc_ctxt, kc_son_nr);\ \n fprintf(kc_f, \" [label=\\\"{%s|{\", op_name());\ \n kc_do_printdot_genfields(kc_f, prod_sel(), print_node_labels);\ \n fprintf(kc_f,"), kc_current_view ); kc_printer(kc_t(" \"}}\\\"];\\n\");\ \n abstract_phylum child;\ \n for (kc_i=0; (child = subphylum(kc_i)); kc_i++) {\ \n printdot_add_edge(child, kc_i+1, kc_edge_nr, kc_edges, edge_label_prefix );\ \n"), kc_current_view ); kc_printer(kc_t(" child->do_printdot( kc_f, false, kc_edge_nr, kc_edges, edge_label_prefix, print_node_labels, use_context_when_sharing_leaves, this, kc_i+1 );\ \n }\ \n }\ \n }\ \n}\ \n"), kc_current_view); } } break; } case view_gen_printdotdecls_h_enum: { view_gen_printdotdecls_h_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\ \nvoid fprintdotprologue ( FILE* );\ \nvoid fprintdotepilogue ( FILE* );\ \n"), kc_current_view); } } break; } case view_gen_error_defs_c_enum: { view_gen_error_defs_c_class& kc_current_view=static_cast(kc_current_view_base); { const char *strof_phylum_error="Internal Error: unknown phylum number: "; int strlen_strof_phylum_error = static_cast(strlen(strof_phylum_error)+30); casestring cstrof_phylum_error = mkcasestring(strof_phylum_error); const char *strof_operator_error="Internal Error: unknown operator number: "; int strlen_strof_operator_error = static_cast(strlen(strof_operator_error)+30); casestring cstrof_operator_error = mkcasestring(strof_operator_error); { kc_printer(kc_t("const char*\ \nphylumname_or_error(enum_phyla kc_phy)\ \n{\ \n if ((kc_phy <= one_before_first_phylum) || (kc_phy >= last_phylum)) {\ \n char *kc_strof_error;\ \n sprintf((kc_strof_error=new char["), kc_current_view); } kc::unparse(strlen_strof_phylum_error, kc_printer, kc_current_view); { kc_printer(kc_t("]), \""), kc_current_view); } kc::unparse(cstrof_phylum_error, kc_printer, kc_current_view); { kc_printer(kc_t("%d\", kc_phy);\ \n return kc_strof_error;\ \n } else {\ \n return phylum_info[kc_phy].name;\ \n} }\ \n\ \n\ \nconst char*\ \nkc_operatorname_or_error(enum_operators kc_operator)\ \n{\ \n if ((k"), kc_current_view ); kc_printer(kc_t("c_operator <= one_before_first_operator) || (kc_operator >= last_operator)) {\ \n char *kc_strof_error;\ \n sprintf((kc_strof_error=new char["), kc_current_view); } kc::unparse(strlen_strof_operator_error, kc_printer, kc_current_view); { kc_printer(kc_t("]), \""), kc_current_view); } kc::unparse(cstrof_operator_error, kc_printer, kc_current_view); { kc_printer(kc_t("%d\", kc_operator);\ \n return kc_strof_error;\ \n } else {\ \n return operator_info[kc_operator].name;\ \n} }\ \n\ \n"), kc_current_view); } } break; } case view_gen_error_decls_h_enum: { view_gen_error_decls_h_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("const char *phylumname_or_error ( enum_phyla );\ \nconst char *kc_operatorname_or_error ( enum_operators );\ \n\ \n"), kc_current_view); } } break; } case view_gen_access_functions_enum: { view_gen_access_functions_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations d = this->phylumdeclarations_1; { kc_printer(kc_t("\ \nabstract_phylum\ \nkc_create(enum_operators createOp"), kc_current_view); } int j=Theargsnumbers->last()->value; if (j<2) j=2; for (int i = 1; i<=j; ++i) { { kc_printer(kc_t(", abstract_phylum"), kc_current_view); } { kc_printer(kc_t(" kc_p"), kc_current_view); } kc::unparse(i, kc_printer, kc_current_view); } { kc_printer(kc_t(")\ \n{\ \n switch(createOp) {\r\ \n case sel__VoidPtr:\ \n case sel__Int:\ \n case sel__Real:\ \n case sel__Str:\ \n case sel_NoCaseStr:\v\ \n assertionFailed(\"Cannot create this kin"), kc_current_view ); kc_printer(kc_t("d of phylum - predefined phyla must be handled seperately\");break;\ \n"), kc_current_view); } kc::unparse(d, kc_printer, view_gen_create_function); { kc_printer(kc_t(" \rdefault:\v\ \n assertionFailed(\"Cannot create this kind of phylum - unkown operator id\");\ \n }\ \n NORETURN\ \n}\ \n\ \nabstract_phylum\ \nkc_create(enum_operators createOp, const std::ve"), kc_current_view ); kc_printer(kc_t("ctor& kc_ps)\ \n{\ \n if (kc_ps.size() < "), kc_current_view); } kc::unparse(j, kc_printer, kc_current_view); { kc_printer(kc_t(") {\ \n assertionFailed(\"Need vector of size of maximum subphylum count (which is "), kc_current_view); } kc::unparse(j, kc_printer, kc_current_view); { kc_printer(kc_t(")!\");\ \n }\ \n return kc_create(createOp"), kc_current_view); } for (int i = 0; i < j; ++i) { { kc_printer(kc_t(", kc_ps["), kc_current_view); } kc::unparse(i, kc_printer, kc_current_view); { kc_printer(kc_t("]"), kc_current_view); } } { kc_printer(kc_t(");\ \n}\ \n\ \nabstract_phylum&\ \nattributeOf(abstract_phylum kc_p, int no)\ \n{\ \n"), kc_current_view); } count_printer counter; d->unparse(counter, view_gen_attributeOf_function); if (counter()==0) { { kc_printer(kc_t("assertionFailed(\"Cannot select attribute for this kind of phylum - has no attributes\");\ \n"), kc_current_view); } } else { { kc_printer(kc_t(" enum_operators kc_op = kc_p->prod_sel();\ \n switch (kc_op) {\r\ \n"), kc_current_view); } kc::unparse(d, kc_printer, view_gen_attributeOf_function); { kc_printer(kc_t(" default:\v\ \n assertionFailed(\"Cannot select attribute for this kind of phylum - unkown operator id or no attributes\");\ \n }\ \n assertionFailed(\"Cannot select attribute for this kind of "), kc_current_view ); kc_printer(kc_t("phylum - attribute number out of range\");\ \n"), kc_current_view); } } { kc_printer(kc_t(" NORETURN\ \n}\ \n"), kc_current_view); } } break; } case view_gen_operatordefs_c_enum: { view_gen_operatordefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations d = this->phylumdeclarations_1; kc::unparse(Thestorageclasses, kc_printer, view_gen_operatordefs_c_0); { kc_printer(kc_t("\ \nbool kc_storageclass_still_uniq[] = {\ \n"), kc_current_view); } kc::unparse(Thestorageclasses, kc_printer, view_gen_operatordefs_c_1); { kc_printer(kc_t(" };\ \n\ \nhashtable_t hashtables[] = {\ \n"), kc_current_view); } kc::unparse(Thestorageclasses, kc_printer, view_gen_operatordefs_c_2); { kc_printer(kc_t("};\ \n\ \nconst char* kc_storageclassnames[] = { "), kc_current_view); } kc::unparse(Thestorageclasses, kc_printer, kc_current_view); { kc_printer(kc_t(" };\ \n\ \nnamespace { // all local to k.cc\ \n\r\ \n"), kc_current_view); } kc::unparse(d, kc_printer, view_gen_initializephyla_c); { kc_printer(kc_t("\ \n} // namespace\ \n\ \nenum_phyla\ \nimpl_abstract_phylum::phylum() const {\ \n return operator_info[prod_sel()].phylum;\ \n}\ \n\ \nconst char*\ \nimpl_abstract_phylum::phylum_name() const {\ \n re"), kc_current_view ); kc_printer(kc_t("turn phylum_info[phylum()].name;\ \n}\ \n\ \nconst char*\ \nimpl_abstract_phylum::op_name() const {\ \n return operator_info[prod_sel()].name;\ \n}\ \n\ \ncasestring\ \nmkcasestring(const kc_char_t *kc"), kc_current_view ); kc_printer(kc_t("_s, int length)\ \n{\ \n KC_COLLECT_STATS0(KC_CREATE_STATS(sel__Str));\ \n\ \n casestring"), kc_current_view); } if(g_options.smart_pointer) { { kc_printer(kc_t("_ptr"), kc_current_view); } } { kc_printer(kc_t(" kc_x=new impl_casestring__Str(kc_s);\ \n if(length>=0) \ \n kc_x->make_own(length);\ \n \ \n casestring unique_kc_x=hashtables[uniq]->ht_check_insert((casestring)kc_x);\ \n if(unique_kc_x!=k"), kc_current_view ); kc_printer(kc_t("c_x) {\ \n if(length<0) \ \n kc_x->name=0;\ \n\ \n"), kc_current_view); } if(!g_options.smart_pointer) { { kc_printer(kc_t(" delete kc_x;\ \n"), kc_current_view); } } { kc_printer(kc_t(" kc_x=unique_kc_x;\ \n } else {\ \n KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel__Str));\ \n if(length<0) \ \n kc_x->make_own(static_cast(kc_strlen(kc_s)));\ \n\ \n kc_x->post_create();\ \n"), kc_current_view ); kc_printer(kc_t(" }\ \n return kc_x;\ \n}\ \n\ \nnocasestring\ \nmknocasestring(const kc_char_t *kc_s, int length)\ \n{\ \n KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NoCaseStr));\ \n\ \n nocasestring"), kc_current_view); } if(g_options.smart_pointer) { { kc_printer(kc_t("_ptr"), kc_current_view); } } { kc_printer(kc_t(" kc_x=new impl_nocasestring_NoCaseStr(kc_s);\ \n if(length>=0)\ \n kc_x->make_own(length);\ \n nocasestring unique_kc_x=hashtables[uniq]->ht_check_insert((nocasestring)kc_x);\ \n if(unique_kc_x!"), kc_current_view ); kc_printer(kc_t("=kc_x) {\ \n if(length<0)\ \n kc_x->name=0;\ \n"), kc_current_view); } if(!g_options.smart_pointer) { { kc_printer(kc_t(" delete kc_x;\ \n"), kc_current_view); } } { kc_printer(kc_t(" kc_x=unique_kc_x;\ \n } else {\ \n KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NoCaseStr));\ \n if(length<0)\ \n kc_x->make_own(static_cast(kc_strlen(kc_s)));\ \n kc_x->post_create();\ \n"), kc_current_view ); kc_printer(kc_t(" }\ \n\ \n return kc_x;\ \n}\ \n\ \ninteger\ \nmkinteger(const INTEGER kc_i)\ \n{\ \n KC_COLLECT_STATS0(KC_CREATE_STATS(sel__Int));\ \n\ \n integer kc_x =new impl_integer__Int(kc_i);\ \n "), kc_current_view ); kc_printer(kc_t(" integer unique_kc_x=hashtables[uniq]->ht_check_insert(kc_x);\ \n if(unique_kc_x!=kc_x) {\ \n"), kc_current_view); } if(!g_options.smart_pointer) { { kc_printer(kc_t(" delete kc_x;\ \n"), kc_current_view); } } { kc_printer(kc_t(" kc_x=unique_kc_x;\ \n } else {\ \n KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel__Int));\ \n kc_x->post_create();\ \n }\ \n\ \n return kc_x;\ \n}\ \n\ \nreal\ \nmkreal(const REAL kc_r)\ \n{"), kc_current_view ); kc_printer(kc_t("\ \n KC_COLLECT_STATS0(KC_CREATE_STATS(sel__Real));\ \n\ \n real kc_x=new impl_real__Real(kc_r);\ \n real unique_kc_x=hashtables[uniq]->ht_check_insert(kc_x);\ \n if(unique_kc_x!=kc_x) {\ \n"), kc_current_view); } if(!g_options.smart_pointer) { { kc_printer(kc_t(" delete kc_x;\ \n"), kc_current_view); } } { kc_printer(kc_t(" kc_x=unique_kc_x;\ \n } else {\ \n KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel__Real));\ \n kc_x->post_create();\ \n }\ \n\ \n return kc_x;\ \n}\ \n\ \nvoidptr\ \nmkvoidptr(void *kc_p)\ "), kc_current_view ); kc_printer(kc_t("\n{\ \n KC_COLLECT_STATS0(KC_CREATE_STATS(sel__VoidPtr));\ \n voidptr kc_x=new impl_voidptr__VoidPtr(kc_p);\ \n voidptr unique_kc_x=hashtables[uniq]->ht_check_insert(kc_x);\ \n if(unique_kc"), kc_current_view ); kc_printer(kc_t("_x!=kc_x) {\ \n"), kc_current_view); } if(!g_options.smart_pointer) { { kc_printer(kc_t(" delete kc_x;\ \n"), kc_current_view); } } { kc_printer(kc_t(" kc_x=unique_kc_x;\ \n } else {\ \n KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel__VoidPtr));\ \n kc_x->post_create();\ \n }\ \n return kc_x;\ \n}\ \n\ \n"), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); kc::unparse(this, kc_printer, view_gen_access_functions); { kc_printer(kc_t("\ \nabstract_phylum\ \nimpl_abstract_phylum::subphylum(int) const\ \n{\ \n return 0;\ \n}\ \n\ \nvoid\ \nimpl_abstract_phylum::set_subphylum(int,abstract_phylum)\ \n{\ \n}\ \n\ \nvoid\ \nimpl_abstract"), kc_current_view ); kc_printer(kc_t("_phylum::free(bool kc_rec)\ \n{\ \n KC_COLLECT_STATS0(KC_FREE_CALLED_STATS(prod_sel(), kc_rec));\ \n"), kc_current_view); } if(g_options.smart_pointer) { { kc_printer(kc_t(" if(get_ref())\ \n get_ref()->unlock();\ \n"), kc_current_view); } } { kc_printer(kc_t(" if (!"), kc_current_view); } if(g_options.smart_pointer) { { kc_printer(kc_t("get_ref()"), kc_current_view); } } else { { kc_printer(kc_t("phylum_info[phylum()].uniq_stored"), kc_current_view); } } { kc_printer(kc_t(") {\ \n"), kc_current_view); } if(!g_options.smart_pointer) { { kc_printer(kc_t(" if (kc_rec) {\ \n abstract_phylum son;\ \n for (int kc_i=0; (son = subphylum(kc_i)); kc_i++)\ \n {\ \n if (son!=0) son->free(kc_rec);\ \n son=0;\ \n }\ \n }\ \n"), kc_current_view); } } { kc_printer(kc_t(" KC_COLLECT_STATS0(KC_FREED_STATS(prod_sel(), kc_rec));\ \n delete this;\ \n }\ \n}\ \n\ \nbool\ \nimpl_abstract_phylum::eq(c_abstract_phylum kc_p2) const\ \n{\ \n if (this == kc_p2)\ \n return tru"), kc_current_view ); kc_printer(kc_t("e;\ \n if (prod_sel() != kc_p2->prod_sel())\ \n return false;\ \n\ \n int kc_st = phylum_info[phylum()].uniq_stored;\ \n if (kc_st && kc_storageclass_still_uniq[kc_st])\ \n return false;\ \n"), kc_current_view ); kc_printer(kc_t("\ \n c_abstract_phylum son1;\ \n for (int kc_i=0; (son1 = subphylum(kc_i)); kc_i++) {\ \n if (!son1->eq(kc_p2->subphylum(kc_i)))\ \n return false;\ \n }\ \n\ \n return true;\ \n}\ \n\ \n"), kc_current_view ); kc_printer(kc_t("static string kc_indentation = \"\";\ \nstatic const char *kc_printformat_not_nullary_open = \"%s%s(\\n\";\ \nstatic const char *kc_printformat_list_open = \"%s%s\\n\";\ \n\ \nstatic const char *kc_pri"), kc_current_view ); kc_printer(kc_t("ntformat_not_nullary_close = \"%s)\\n\";\ \nstatic const char *kc_printformat_nullary = \"%s%s()\\n\";\ \n\ \nvoid\ \nimpl_abstract_phylum::fprint(FILE*kc_f)\ \n{\ \n int kc_i;\ \n\ \n if (!kc_f)"), kc_current_view ); kc_printer(kc_t(" kc_f = stdout;\ \n abstract_list al = dynamic_cast(this);\ \n if (al != 0 && !al->is_nil()) {\ \n fprintf(kc_f, kc_printformat_list_open, kc_indentation.c_str(), op_name());\ \n k"), kc_current_view ); kc_printer(kc_t("c_indentation+=\"| \";\ \n subphylum(0)->fprint(kc_f);\ \n kc_indentation=kc_indentation.substr(0, kc_indentation.length()-2);\ \n phylum_cast(subphylum(1))->fprint_list(kc_f);\ \n kc_in"), kc_current_view ); kc_printer(kc_t("dentation=kc_indentation.substr(0, kc_indentation.length()-2);\ \n } else // not list\ \n switch(phylum()) {\ \n case phylum_voidptr:\ \n \vfprintf(kc_f, \"%s%p\\n\", kc_indentation.c_str(), "), kc_current_view ); kc_printer(kc_t("static_cast(this)->pointer);\ \n break;\r\ \n case phylum_casestring:\ \n case phylum_nocasestring:\ \n \vfprintf(kc_f, \"%s%s\\n\", kc_indentation.c_str(), static_cast(thi"), kc_current_view ); kc_printer(kc_t("s)->name);\ \n break;\r\ \n case phylum_integer:\ \n \vfprintf(kc_f, \"%s%i\\n\", kc_indentation.c_str(), static_cast(this)->value);\ \n break;\r\ \n case phylum_real:\ \n \vfp"), kc_current_view ); kc_printer(kc_t("rintf(kc_f, \"%s%f\\n\", kc_indentation.c_str(), static_cast(this)->value);\ \n break;\r\ \n default:\ \n \vif (!subphylum(0)) {\ \n fprintf(kc_f, kc_printformat_nullary, kc_indentation."), kc_current_view ); kc_printer(kc_t("c_str(), op_name());\ \n } else {\ \n fprintf(kc_f, kc_printformat_not_nullary_open, kc_indentation.c_str(), op_name());\ \n kc_indentation+=\" \";\ \n abstract_phylum son;\ \n for (kc_i=0; (s"), kc_current_view ); kc_printer(kc_t("on = subphylum(kc_i)); kc_i++) {\ \n son->fprint(kc_f);\ \n }\ \n kc_indentation=kc_indentation.substr(0, kc_indentation.length()-2);\ \n fprintf(kc_f, kc_printformat_not_nullary_close, kc_inde"), kc_current_view ); kc_printer(kc_t("ntation.c_str());\ \n }\r\ \n }\ \n}\ \n\ \nvoid \ \nimpl_abstract_phylum::print()\ \n{\ \n fprint(stdout);\ \n}\ \n\ \nvoid \ \nimpl_abstract_list::fprint_list(FILE*kc_f)\ \n{\ \n if (!kc_f"), kc_current_view ); kc_printer(kc_t(")\ \n kc_f = stdout;\ \n if (this->is_nil()) {\ \n kc_indentation+=\"`-\";\ \n fprintf(kc_f, kc_printformat_nullary, kc_indentation.c_str(), op_name());\ \n } else {\ \n kc_indentation+=\"|-\";\ \n"), kc_current_view ); kc_printer(kc_t(" fprintf(kc_f, kc_printformat_list_open, kc_indentation.c_str(), op_name());\ \n kc_indentation=kc_indentation.substr(0, kc_indentation.length()-2);\ \n kc_indentation+=\"| \";\ \n subphylum(0)->fprint"), kc_current_view ); kc_printer(kc_t("(kc_f);\ \n kc_indentation=kc_indentation.substr(0, kc_indentation.length()-2);\ \n phylum_cast(subphylum(1))->fprint_list(kc_f);\ \n }\ \n}\ \n\ \nint\ \nimpl_abstract_list::length()"), kc_current_view ); kc_printer(kc_t(" const\ \n{\ \n int kc_length = 0;\ \n c_abstract_phylum kc_p = this;\ \n while((kc_p = kc_p->subphylum(1)))\ \n kc_length++;\ \n return kc_length;\ \n}\ \n"), kc_current_view); } if(g_options.smart_pointer) { { kc_printer(kc_t("void impl_abstract_list::freelist() { }\n"), kc_current_view); } } else { { kc_printer(kc_t("void impl_abstract_list::freelist()\ \n{\ \n abstract_phylum kc_p = this, kc_tmp_p;\ \n do {\ \n kc_tmp_p=kc_p->subphylum(1);\ \n kc_p->free(false);\ \n kc_p=kc_tmp_p;\ \n } while(kc_p);\ \n}\ \n"), kc_current_view); } } { kc_printer(kc_t("abstract_phylum\ \nimpl_abstract_list::do_concat(c_abstract_phylum kc_p2, enum_operators mk) const\ \n{\ \n abstract_phylum next = subphylum(1);\ \n if(!next)\ \n return const_cast(kc_p2);\ \n return kc_create(mk, subphylum(0), static_cast(next)->do_concat(kc_p2, mk));\ \n}\ \n\ \nabstract_phylum\ \nimpl_abstract_list::do_reverse(c_abstract_phylum tail, enum"), kc_current_view ); kc_printer(kc_t("_operators mk) const\ \n{\ \n for (impl_abstract_list const* iterator_ = this; iterator_->subphylum(1) != 0;\ \n iterator_ = static_cast(iterator_->subphylum(1)) )\ \n"), kc_current_view ); kc_printer(kc_t(" tail = kc_create(mk, iterator_->subphylum(0), const_cast(tail));\ \n return const_cast(tail);\ \n}\ \n\ \nabstract_phylum\ \nimpl_abstract_list::last() const\ \n{\ \n"), kc_current_view ); kc_printer(kc_t(" c_abstract_phylum kc_p = this, next = subphylum(1), nextnext;\ \n#ifdef _AFX\ \n ASSERT(next);\ \n if(!next)\ \n return NULL;\ \n#else\ \n if(!next){\ \n fflush(stdout);\ \n fprintf(stderr"), kc_current_view ); kc_printer(kc_t(", \"Internal Error: list::last was called with argument Nil%s\\n\", phylum_name());\ \n exit(1);\ \n }\ \n#endif\ \n while ((nextnext = next->subphylum(1))) {\ \n kc_p = next;\ \n next = nextnext"), kc_current_view ); kc_printer(kc_t(";\ \n }\ \n return const_cast(kc_p->subphylum(0));/* XXX remove cast */\ \n}\ \n\ \nabstract_phylum\ \nimpl_abstract_list::do_map(abstract_phylum (*kc_fp)(abstract_phylum), enum_"), kc_current_view ); kc_printer(kc_t("operators mk)\ \n{\ \n abstract_phylum el = subphylum(0);\ \n if (!el)\ \n return this;\ \n abstract_list next = static_cast(subphylum(1));\ \n return kc_create(mk, kc_fp(el)"), kc_current_view ); kc_printer(kc_t(", next->do_map(kc_fp, mk));\ \n}\ \n\ \nabstract_phylum\ \nimpl_abstract_list::do_filter(bool (*kc_fp)(abstract_phylum), enum_operators mk)\ \n{\ \n abstract_phylum el = subphylum(0);\ \n if (!el"), kc_current_view ); kc_printer(kc_t(")\ \n return this;\ \n abstract_list next = static_cast(subphylum(1));\ \n if ((*kc_fp)(el)) {\ \n return kc_create(mk, el, next->do_filter(kc_fp, mk));\ \n } else {\ \n return "), kc_current_view ); kc_printer(kc_t("next->do_filter(kc_fp, mk);\ \n }\ \n}\ \n\ \nabstract_list\ \nimpl_abstract_list::do_append(abstract_phylum new_last, abstract_list eol)\ \n{\ \n abstract_list next = this;\ \n while (!next->"), kc_current_view ); kc_printer(kc_t("is_nil())\ \n next = phylum_cast(next->subphylum(1));\ \n next->set_subphylum(0, new_last);\ \n next->set_subphylum(1, eol);\ \n return next;\ \n}\ \n\ \nabstract_phylum\ \nimpl"), kc_current_view ); kc_printer(kc_t("_abstract_list::do_merge(abstract_list second,abstract_phylum(*kc_fp)(abstract_phylum,abstract_phylum), enum_operators mk)\ \n{\ \n abstract_phylum el = subphylum(0);\ \n if (!el)\ \n return this"), kc_current_view ); kc_printer(kc_t(";\ \n abstract_phylum el2 = second->subphylum(0);\ \n if (!el2)\ \n return el2;\ \n abstract_list next = static_cast(subphylum(1));\ \n abstract_list next2 = static_cast(second->subphylum(1));\ \n return kc_create(mk, kc_fp(el,el2), next->do_merge(next2, kc_fp, mk));\ \n}\ \n\ \nabstract_phylum\ \nimpl_abstract_list::do_reduce(abstract_phylum neutral, abs"), kc_current_view ); kc_printer(kc_t("tract_phylum(*kc_fp)(abstract_phylum,abstract_phylum)) {\ \n abstract_phylum el = subphylum(0);\ \n if (!el)\ \n return neutral;\ \n abstract_list next = static_cast(subphylum(1"), kc_current_view ); kc_printer(kc_t("));\ \n return kc_fp(el,next->do_reduce(neutral,kc_fp));\ \n}\ \n\ \n"), kc_current_view); } } break; } case view_gen_operatorcast_h_enum: { view_gen_operatorcast_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations d = this->phylumdeclarations_1; { kc_printer(kc_t("/* translation of file(s)\n"), kc_current_view); } kc::unparse(Thefnfiles, kc_printer, kc_current_view); { kc_printer(kc_t(" */\ \n/* generated by:\ \n * "), kc_current_view); } kc::unparse(kimwitu_copyright, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n */\ \n#ifndef KC_OPERATOR_CAST_HEADER\ \n#define KC_OPERATOR_CAST_HEADER\ \n#include \""), kc_current_view); } PRINT(g_options.prefix.c_str()); { kc_printer(kc_t("k.h\" // in case a user forgets\ \n#include // for bad_cast\ \n\ \n"), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); { kc_printer(kc_t("#endif // KC_OPERATOR_CAST_HEADER\n\n"), kc_current_view); } } break; } case view_gen_operatordecls_h_enum: { view_gen_operatordecls_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations d = this->phylumdeclarations_1; { kc_printer(kc_t("\ \ncasestring mkcasestring( const kc_char_t *, int length = -1);\ \nnocasestring mknocasestring( const kc_char_t *, int length = -1);\ \ninteger mkinteger( const INTEGER );\ \nreal mkreal( const REAL "), kc_current_view ); kc_printer(kc_t(");\ \ninline casestring _Str( const kc_char_t * cc) { return mkcasestring(cc); }\ \ninline nocasestring NoCaseStr( const kc_char_t * cc) { return mknocasestring(cc); }\ \ninline integer _Int( const INT"), kc_current_view ); kc_printer(kc_t("EGER cc) { return mkinteger(cc); }\ \ninline real _Real( const REAL cc) { return mkreal(cc); }\ \n"), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); } break; } case view_gen_assertmacros_c_enum: { view_gen_assertmacros_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\ \nvoid\ \nkc_no_default_in_with( const char *kc_func, int kc_line, const char *kc_file )\ \n{\ \n fflush(stdout);\ \n#ifdef _AFX\ \n USES_CONVERSION;\ \n const _TCHAR* format=A2CT(KC_NO_DEFAULT_IN"), kc_current_view ); kc_printer(kc_t("_WITH);\ \n const _TCHAR* tkc_func=A2CT(kc_func);\ \n const _TCHAR* tkc_file=A2CT(kc_file);\ \n TRACE( format, tkc_func, tkc_file, kc_line );\ \n#ifdef _DEBUG\ \n if (AfxAssertFailedLine(kc_file, kc"), kc_current_view ); kc_printer(kc_t("_line))\ \n#endif\ \n AfxDebugBreak();\ \n#else\ \n fprintf( stderr, KC_NO_DEFAULT_IN_WITH, kc_func, kc_file, kc_line );\ \n#ifndef KC_NODEFAULT_NO_ABORT\ \n abort();\ \n#else\ \n exit( 1 );\ \n"), kc_current_view ); kc_printer(kc_t("#endif\ \n#endif\ \n}\ \n\ \nvoid\ \nkc_returnless_function( const char *kc_func, int kc_line, const char *kc_file )\ \n{\ \n fflush(stdout);\ \n#ifdef _AFX\ \n USES_CONVERSION;\ \n const _TCHAR* fo"), kc_current_view ); kc_printer(kc_t("rmat=_T(\"Internal Error: function %s does not return a value, at %s:%d\");\ \n const _TCHAR* tkc_func=A2CT(kc_func);\ \n const _TCHAR* tkc_file=A2CT(kc_file);\ \n TRACE( format, tkc_func, tkc_file, kc"), kc_current_view ); kc_printer(kc_t("_line );\ \n#ifdef _DEBUG\ \n if (AfxAssertFailedLine(kc_file, kc_line))\ \n#endif\ \n AfxDebugBreak();\ \n#else\ \n fprintf( stderr, \"Internal Error: function %s does not return a value, at %s:"), kc_current_view ); kc_printer(kc_t("%d\", kc_func, kc_file, kc_line );\ \n#ifndef KC_NODEFAULT_NO_ABORT\ \n abort();\ \n#else\ \n exit( 1 );\ \n#endif\ \n#endif\ \n}\ \n\ \nvoid\ \nkc_assertionFailed(const char *kc_fn, int kc_l)\ \n"), kc_current_view ); kc_printer(kc_t("{\ \n fflush(stdout);\ \n#ifdef _AFX\ \n USES_CONVERSION;\ \n const _TCHAR* format=_T(\"Internal Error: Assertion failed at %s:%d\\n\");\ \n const _TCHAR* tkc_func=A2CT(kc_fn);\ \n TRACE( format, tk"), kc_current_view ); kc_printer(kc_t("c_func, kc_l );\ \n#ifdef _DEBUG\ \n if (AfxAssertFailedLine(kc_fn, kc_l))\ \n#endif\ \n AfxDebugBreak();\ \n#else\ \n fprintf( stderr, \"Internal Error: Assertion failed at %s:%d\\n\", kc_fn, kc"), kc_current_view ); kc_printer(kc_t("_l );\ \n#ifndef KC_ASSERT_NO_ABORT\ \n abort();\ \n#else\ \n exit( 1 );\ \n#endif\ \n#endif\ \n}\ \n\ \nvoid\ \nkc_assertionReasonFailed(const char *kc_fn, int kc_l, const char *kc_s)\ \n{\ \n "), kc_current_view ); kc_printer(kc_t(" fflush(stdout);\ \n#ifdef _AFX\ \n USES_CONVERSION;\ \n const _TCHAR* format=_T(\"Internal Error: Assertion failed at file %s:%d: %s\\n\");\ \n const _TCHAR* tkc_func=A2CT(kc_fn);\ \n const _TCHAR* t"), kc_current_view ); kc_printer(kc_t("kc_s=A2CT(kc_s);\ \n TRACE( format, tkc_func, kc_l, tkc_s );\ \n#ifdef _DEBUG\ \n if (AfxAssertFailedLine(kc_fn, kc_l))\ \n#endif\ \n AfxDebugBreak();\ \n#else\ \n fprintf( stderr, \"Internal Err"), kc_current_view ); kc_printer(kc_t("or: Assertion failed at file %s:%d: %s\\n\", kc_fn, kc_l, kc_s );\ \n#ifndef KC_ASSERT_NO_ABORT\ \n abort();\ \n#else\ \n exit( 1 );\ \n#endif\ \n#endif\ \n}\ \n\ \nvoid\ \nkc_assertionNonNullFai"), kc_current_view ); kc_printer(kc_t("led(const char *kc_fn, int kc_l, const char *kc_str)\ \n{\ \n fflush(stdout);\ \n#ifdef _AFX\ \n USES_CONVERSION;\ \n const _TCHAR* format=_T(\"Internal Error: Assertion failed at %s:%d: pointer %s "), kc_current_view ); kc_printer(kc_t("is NULL\\n\");\ \n const _TCHAR* tkc_func=A2CT(kc_fn);\ \n const _TCHAR* tkc_s=A2CT(kc_str);\ \n TRACE( format , tkc_func, kc_l, tkc_s);\ \n#ifdef _DEBUG\ \n if (AfxAssertFailedLine(kc_fn, kc_l))\ \n"), kc_current_view ); kc_printer(kc_t("#endif\ \n AfxDebugBreak();\ \n#else\ \n fprintf( stderr, \"Internal Error: Assertion failed at %s:%d: pointer %s is NULL\\n\", kc_fn, kc_l, kc_str );\ \n#ifndef KC_ASSERT_NO_ABORT\ \n abort();\ \n"), kc_current_view ); kc_printer(kc_t("#else\ \n exit( 1 );\ \n#endif\ \n#endif\ \n}\ \n\ \nvoid\ \nkc_assertionOperatorInPhylumFailed(int kc_op, const char *kc_str1, const char *kc_str2, const char *kc_phy, const char *kc_fn, int kc_l)\ \n"), kc_current_view ); kc_printer(kc_t("{\ \n fflush(stdout);\ \n#ifdef _AFX\ \n USES_CONVERSION;\ \n const _TCHAR* format=_T(\"Internal Error: Assertion failed at %s:%d: illegal value for (%s) %s%s: %d not a valid operator\\n\");\ \n"), kc_current_view ); kc_printer(kc_t(" const _TCHAR* tkc_func=A2CT(kc_fn);\ \n const _TCHAR* tkc_s1=A2CT(kc_str1);\ \n const _TCHAR* tkc_s2=A2CT(kc_str2);\ \n const _TCHAR* tname=A2CT(kc_phy);\ \n if ((kc_op <= one_before_fi"), kc_current_view ); kc_printer(kc_t("rst_operator) || (kc_op >= last_operator)) {\ \n TRACE (format, tkc_func, kc_l, tname, tkc_s1, tkc_s2, kc_op );\ \n } else {\ \n format=_T(\"Internal Error: Assertion failed at %s:%d: illegal value "), kc_current_view ); kc_printer(kc_t("for (%s) %s%s: %s (%d) is a value of %s\\n\");\ \n const _TCHAR* tname2=A2CT(operator_info[kc_op].name);\ \n const _TCHAR* tname3=A2CT(phylum_info[operator_info[kc_op].phylum].name);\ \n TRACE(format,t"), kc_current_view ); kc_printer(kc_t("kc_func, kc_l, tname, tkc_s1, tkc_s2, tname2, kc_op, tname3 );\ \n }\ \n#ifdef _DEBUG\ \n if (AfxAssertFailedLine(kc_fn, kc_l))\ \n#endif\ \n AfxDebugBreak();\ \n#else\ \n if ((kc_op <= one_befo"), kc_current_view ); kc_printer(kc_t("re_first_operator) || (kc_op >= last_operator)) {\ \n fprintf( stderr, \"Internal Error: Assertion failed at %s:%d: illegal value for (%s) %s%s: %d not a valid operator\\n\",\ \n kc_fn, kc_l, kc_phy, "), kc_current_view ); kc_printer(kc_t("kc_str1, kc_str2, kc_op );\ \n } else {\ \n fprintf( stderr, \"Internal Error: Assertion failed at %s:%d: illegal value for (%s) %s%s: %s (%d) is a value of %s\\n\",\ \n kc_fn, kc_l, kc_phy, kc_str"), kc_current_view ); kc_printer(kc_t("1, kc_str2, operator_info[kc_op].name, kc_op, phylum_info[operator_info[kc_op].phylum].name );\ \n }\ \n#ifndef KC_ASSERT_NO_ABORT\ \n abort();\ \n#else\ \n exit( 1 );\ \n#endif\ \n#endif\ \n}"), kc_current_view ); kc_printer(kc_t("\ \n\ \nvoid kc_invalid_operator( const char *kc_func_prefix, enum_phyla kc_phy, int kc_line, const char *kc_file, enum_operators kc_oper )\ \n{\ \n fflush(stdout);\ \n#ifdef _AFX\ \n USES_CONVER"), kc_current_view ); kc_printer(kc_t("SION;\ \n const _TCHAR* format=_T(\"Internal Error: invalid operator code in %s%s at %s:%d: %s\\n\");\ \n const _TCHAR* tkc_func=A2CT(kc_func_prefix);\ \n const _TCHAR* tkc_file=A2CT(kc_file);"), kc_current_view ); kc_printer(kc_t("\ \n const _TCHAR* ts1=A2CT(phylumname_or_error( kc_phy ));\ \n const _TCHAR* ts2=A2CT(kc_operatorname_or_error( kc_oper ));\ \n TRACE( format, tkc_func, ts1, tkc_file, kc_line, ts2);\ \n#ifde"), kc_current_view ); kc_printer(kc_t("f _DEBUG\ \n if (AfxAssertFailedLine(kc_file, kc_line))\ \n#endif\ \n AfxDebugBreak();\ \n#else\ \n fprintf( stderr, \"Internal Error: invalid operator code in %s%s at %s:%d: %s\\n\", kc_func_pre"), kc_current_view ); kc_printer(kc_t("fix, phylumname_or_error( kc_phy ), kc_file, kc_line, kc_operatorname_or_error( kc_oper ));\ \n#ifndef KC_INVALID_OPERATOR_NO_ABORT\ \n abort();\ \n#else\ \n exit( 1 );\ \n#endif\ \n#endif\ \n}\ \n"), kc_current_view); } } break; } case view_gen_assertmacros_h_enum: { view_gen_assertmacros_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations d = this->phylumdeclarations_1; { kc_printer(kc_t("\ \n#ifndef KC_NO_DEFAULT_IN_WITH\ \n# define KC_NO_DEFAULT_IN_WITH \"Internal Error: no default action defined in function %s at %s:%d\\n\"\ \n#endif\ \nvoid kc_no_default_in_with (const char*, int, "), kc_current_view ); kc_printer(kc_t("const char*);\ \nvoid kc_returnless_function (const char *, int, const char*);\ \n\ \n#ifndef NDEBUG\ \n# define assertCond(t) do {if (!(t)) kc_assertionFailed(__FILE__,__LINE__);}while(false)\ \n# def"), kc_current_view ); kc_printer(kc_t("ine assertReason(t,s) do {if (!(t)) kc_assertionReasonFailed(__FILE__,__LINE__,s);}while(false)\ \n# define assertNonNull(p) do {if (p == 0) kc_assertionNonNullFailed(__FILE__,__LINE__,#p);}while(false"), kc_current_view ); kc_printer(kc_t(")\ \n# define assertPhylum(ptr,phy) do { \\\ \n assertNonNull(ptr); \\\ \n if (ptr->phylum()!=phy) \\\ \n kc_assertionOperatorInPhylumFailed(ptr->prod_sel(),#ptr,\"->prod_sel()\",\"phy\",__FILE__"), kc_current_view ); kc_printer(kc_t(",__LINE__); \\\ \n } while(false)\ \n#else\ \n# define assertCond(t)\ \n# define assertReason(t,s)\ \n# define assertNonNull(ptr)\ \n# define assertPhylum(op,phy)\ \n#endif\ \n#define assertionFaile"), kc_current_view ); kc_printer(kc_t("d(s) kc_assertionReasonFailed(__FILE__,__LINE__,s)\ \n\r\ \nvoid kc_assertionFailed (const char*, int) __attribute__ ((noreturn));\ \nvoid kc_assertionReasonFailed (const char*, int, const char*) __att"), kc_current_view ); kc_printer(kc_t("ribute__ ((noreturn));\ \nvoid kc_assertionNonNullFailed (const char*, int, const char*) __attribute__ ((noreturn));\ \nvoid kc_assertionOperatorInPhylumFailed (int, const char*, const char*, const cha"), kc_current_view ); kc_printer(kc_t("r*, const char*, int) __attribute__ ((noreturn));\ \n"), kc_current_view); } } break; } case view_gen_noofoperators_h_enum: { view_gen_noofoperators_h_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("#define KC_NO_OF_OPERATORS "), kc_current_view); } kc::unparse(g_no_of_operators, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n\ \n"), kc_current_view); } } break; } case view_gen_yaccstacktype_h_enum: { view_gen_yaccstacktype_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations d = this->phylumdeclarations_1; { kc_printer(kc_t("#ifndef YYSTYPE_HEADER\ \n#define YYSTYPE_HEADER\ \nunion KC_YYSTYPE {\ \n"), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); { kc_printer(kc_t("};\ \n#define YYSTYPE KC_YYSTYPE\ \n#endif // YYSTYPE_HEADER\ \n"), kc_current_view); } } break; } case view_gen_nodetypes_h_enum: { view_gen_nodetypes_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations d = this->phylumdeclarations_1; } break; } case view_gen_nodetypedefs_h_enum: { view_gen_nodetypedefs_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations d = this->phylumdeclarations_1; if(!g_options.no_printdot) { { kc_printer(kc_t("typedef class impl_kc_dotedgenode_t *kc_dotedgenode_t;\ \n"), kc_current_view); } } { kc_printer(kc_t("\ \n"), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n"), kc_current_view); } } break; } case view_gen_operatormap_c_enum: { view_gen_operatormap_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations d = this->phylumdeclarations_1; kc::unparse(d, kc_printer, view_gen_operatormap_subphyla); kc::unparse(d, kc_printer, view_gen_operatormap_attributes); { kc_printer(kc_t("\ \n\ \nKC_OPERATOR_INFO operator_info[] = {\ \n"), kc_current_view); } { int i = OPERATORNUMBEROFFSET; do { { kc_printer(kc_t(" { \"\", 0, 0, one_before_first_phylum, 0, 0, 0, 0 }, /* dummy element */\ \n"), kc_current_view); } i--; } while (i >= 0); } kc::unparse(d, kc_printer, kc_current_view); { kc_printer(kc_t(" { \"\", 0, 0, one_before_first_phylum, 0, 0, 0, 0 } /* last element */\ \n};\ \n\ \n"), kc_current_view); } } break; } case view_gen_phylummap_c_enum: { view_gen_phylummap_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations d = this->phylumdeclarations_1; { kc_printer(kc_t("KC_PHYLUM_INFO phylum_info[] = {\ \n"), kc_current_view); } { int i = PHYLUMNUMBEROFFSET; do { { kc_printer(kc_t(" { \"\", one_before_first_operator, one_before_first_operator, (kc_storageclass_t)0 }, /* dummy element */\ \n"), kc_current_view); } i--; } while (i >= 0); } kc::unparse(d, kc_printer, kc_current_view); { kc_printer(kc_t(" { \"\", one_before_first_operator, one_before_first_operator, (kc_storageclass_t)0 } /* last element */\ \n};\ \n\ \n"), kc_current_view); } } break; } case view_gen_operatormap_type_h_enum: { view_gen_operatormap_type_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_enumoperators_h_enum: { view_gen_enumoperators_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; g_no_of_operators = OPERATORNUMBEROFFSET; { kc_printer(kc_t("typedef enum { one_before_first_operator = "), kc_current_view); } kc::unparse(g_no_of_operators, kc_printer, kc_current_view); { kc_printer(kc_t(" ,\ \n"), kc_current_view); } g_no_of_operators++; kc::unparse(pds, kc_printer, kc_current_view); { kc_printer(kc_t(" last_operator = "), kc_current_view); } kc::unparse(g_no_of_operators, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n} enum_operators;\ \n"), kc_current_view); } } break; } case view_gen_enumphyla_h_enum: { view_gen_enumphyla_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations pds = this->phylumdeclarations_1; g_no_of_phyla = PHYLUMNUMBEROFFSET; { kc_printer(kc_t("typedef enum { one_before_first_phylum = "), kc_current_view); } kc::unparse(g_no_of_phyla, kc_printer, kc_current_view); { kc_printer(kc_t(" ,\ \n"), kc_current_view); } g_no_of_phyla++; kc::unparse(pds, kc_printer, kc_current_view); { kc_printer(kc_t(" last_phylum = "), kc_current_view); } kc::unparse(g_no_of_phyla, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n} enum_phyla;\ \n\ \n"), kc_current_view); } } break; } case view_gen_alloc_c_enum: { view_gen_alloc_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\ \n#ifdef KC_STATISTICS\ \nKC_OPERATOR_STATISTICS operator_statistics[KC_NO_OF_OPERATORS];\ \nstatic int kc_casestring_strlen =0;\ \nstatic int kc_nocasestring_strlen =0;\ \n# define KC_COLLECT_STATS"), kc_current_view ); kc_printer(kc_t("0(v) v\ \n#else\ \n# define KC_COLLECT_STATS0(v)\ \n#endif\ \n\ \n#ifndef KC_CREATE_STATS\ \n# define KC_CREATE_STATS(oper) operator_statistics[oper].created++;\ \n#endif\ \n#ifndef KC_EXISTINGNOTFOU"), kc_current_view ); kc_printer(kc_t("ND_STATS\ \n# define KC_EXISTINGNOTFOUND_STATS(oper) operator_statistics[oper].existing_not_found++;\ \n#endif\ \n\ \n#ifndef KC_FREE_CALLED_STATS\ \n# define KC_FREE_CALLED_STATS(oper,rec) operator_"), kc_current_view ); kc_printer(kc_t("statistics[oper].free_called[(rec?true:false)]++;\ \n#endif\ \n\ \n#ifndef KC_FREED_STATS\ \n# define KC_FREED_STATS(oper,rec) operator_statistics[oper].freed[(rec?true:false)]++;\ \n#endif\ \n"), kc_current_view); } } break; } case view_gen_alloc_h_enum: { view_gen_alloc_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclarations d = this->phylumdeclarations_1; { kc_printer(kc_t("\ \nextern bool kc_storageclass_still_uniq[];\ \n"), kc_current_view); } } break; } case view_gen_k_c_enum: { view_gen_k_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("/* translation of file(s)\n"), kc_current_view); } kc::unparse(Thefnfiles, kc_printer, kc_current_view); { kc_printer(kc_t(" */\ \n/* generated by:\ \n * "), kc_current_view); } kc::unparse(kimwitu_copyright, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n */\ \n#define KC_TYPES\ \n"), kc_current_view); } if(g_options.stdafx!="") { PRINT("#include \""); PRINT(g_options.stdafx.c_str()); PRINT("\"\n"); } { kc_printer(kc_t("\ \n#include \""), kc_current_view); } PRINT(g_options.prefix.c_str()); { kc_printer(kc_t("k.h\"\ \n#include \ \n#include \ \n#include \ \n#include \ \n#include \ \n\ \n#ifdef _MSC_VER\ \n#pragma warning( disable : 4786 )\ \n#endif\ \n#include"), kc_current_view ); kc_printer(kc_t(" \ \n#include \ \n#include \ \n#include \ \n\ \n#if !defined(USE_HASHSET) && (defined(__GNUC__) || defined(__ICC) || defined(__ECC)) \\\ \n && !defined(DONT_USE_HASHSET)\ \n#"), kc_current_view ); kc_printer(kc_t(" define USE_HASHSET\ \n#endif\ \n#ifdef USE_HASHSET\ \n# if defined(__GNUC__) && __GNUC__>2\ \n# include \ \n# else\ \n# include \ \n# endif\ \n#endif\ \n\ \nusing nam"), kc_current_view ); kc_printer(kc_t("espace std;\ \n"), kc_current_view); } kc::unparse(this, kc_printer, view_open_namespace); { kc_printer(kc_t("\ \ninline bool\ \nht_less(casestring p1, casestring p2){\ \n return kc_strcmp(p1->name, p2->name)<0;\ \n}\ \n\ \ninline bool\ \nht_less(nocasestring p1, nocasestring p2){\ \n return kc_strcasecm"), kc_current_view ); kc_printer(kc_t("p(p1->name, p2->name)<0;\ \n}\ \n\ \ninline bool\ \nht_less(real p1, real p2){\ \n return p1->value < p2->value;\ \n}\ \n\ \ninline bool\ \nht_less(integer p1, integer p2){\ \n return p1->value <"), kc_current_view ); kc_printer(kc_t(" p2->value;\ \n}\ \n\ \ninline bool\ \nht_less(voidptr p1, voidptr p2){\ \n return p1->pointer < p2->pointer;\ \n}\ \n\ \nbool\ \nht_less(abstract_phylum p1, abstract_phylum p2)\ \n{\ \n enum_ope"), kc_current_view ); kc_printer(kc_t("rators prod_sel=p1->prod_sel();\ \n enum_operators prod_sel2=p2->prod_sel();\ \n if(prod_selprod_sel2)\ \n return false;\ \n switch(prod_sel) {\ \n"), kc_current_view ); kc_printer(kc_t(" case sel_NoCaseStr:\ \n \vreturn ht_less(static_cast(p1),static_cast(p2));\r\ \n case sel__Str:\ \n \vreturn ht_less(static_cast(p1),static_cast(p2));\r\ \n case sel__Real:\ \n \vreturn ht_less(static_cast(p1),static_cast(p2));\r\ \n case sel__Int:\ \n \vreturn ht_less(static_cast(p1),static_cast(p2));"), kc_current_view ); kc_printer(kc_t("\r\ \n case sel__VoidPtr:\ \n \vreturn ht_less(static_cast(p1),static_cast(p2));\r\ \n default: {\ \n int i=0;\ \n bool still_unique = kc_storageclass_still_uniq[phylum_in"), kc_current_view ); kc_printer(kc_t("fo[p1->phylum()].uniq_stored];\ \n abstract_phylum sub1=0;\ \n do {\ \n sub1=p1->subphylum(i);\ \n abstract_phylum sub2=p2->subphylum(i);\ \n if(still_unique) {\ \n if(sub1\ \nclass phylum_less : std::binary_function\ \n{\ \npublic:\ \n bool operator()(const T& X, const "), kc_current_view ); kc_printer(kc_t("T& Y) const\ \n \v{ return ht_less(X,Y); }\r\ \n};\ \n\ \ninline void deletefun(c_abstract_phylum t){\ \n delete const_cast(t);\ \n}\ \n\ \n"), kc_current_view); } string how_smart = ""; if(g_options.smart_pointer) how_smart="_ptr"; { kc_printer(kc_t("\ \n#ifdef USE_HASHSET\ \nstruct hashitem {\ \n size_t hashvalue;\ \n casestring"), kc_current_view); } kc::unparse(how_smart, kc_printer, kc_current_view); { kc_printer(kc_t(" contents;\ \n hashitem(casestring"), kc_current_view); } kc::unparse(how_smart, kc_printer, kc_current_view); { kc_printer(kc_t(" cs): contents(cs) {\ \n unsigned long h = 0;\ \n kc_char_t const *s = cs->name;\ \n for ( ; *s; ++s)\ \n \vh = 5*h + *s;\r\ \n hashvalue=(size_t)h;\ \n }\ \n};\ \n\ \ninline void deletefunhashi"), kc_current_view ); kc_printer(kc_t("tem(hashitem t) {\ \n delete t.contents;\ \n}\ \n\ \n# ifdef __GNUC__\ \nstruct eq_hashitem { bool operator()(hashitem hi1, hashitem hi2) const {\ \n return kc_strcmp(hi1.contents->name, hi2.con"), kc_current_view ); kc_printer(kc_t("tents->name) == 0; } };\ \n\ \nstruct hash_hashitem { size_t operator()(hashitem hi) const {\ \n return hi.hashvalue; } };\ \n\ \n# else\ \nstruct comp_hashitem {\ \n enum { bucket_size = 4, min"), kc_current_view ); kc_printer(kc_t("_buckets = 8 };\ \n // bucket_size and min_buckets are just guesses\ \n size_t operator()(const hashitem hi) const {\ \n return hi.hashvalue; }\ \n bool operator()(const hashitem hi1, const ha"), kc_current_view ); kc_printer(kc_t("shitem hi2) const {\ \n return kc_strcmp(hi1.contents->name, hi2.contents->name) < 0; }\ \n};\ \n# endif // Whether gcc or icc\ \n#endif // Whether hash or not\ \n\ \nstruct hashtable_level\ \n{\ \n h"), kc_current_view ); kc_printer(kc_t("ashtable_level(bool cod = true): clean_on_destruction(cod) { }\ \n"), kc_current_view); } if(!g_options.smart_pointer) { { kc_printer(kc_t(" void clear(bool free_entries=true) {\ \n if(free_entries)\ \n clear_entries();\ \n _casestring.clear();\ \n _nocasestring.clear();\ \n _integer.clear();\ \n _real.clear();\ \n "), kc_current_view ); kc_printer(kc_t(" _voidptr.clear();\ \n _abstract_phylum.clear();\ \n }\ \n void clear_entries() {\ \n#ifdef USE_HASHSET\ \n std::for_each(_casestring.begin(),_casestring.end(),deletefunhashitem);\ \n#else\ \n st"), kc_current_view ); kc_printer(kc_t("d::for_each(_casestring.begin(),_casestring.end(),deletefun);\ \n#endif\ \n std::for_each(_nocasestring.begin(),_nocasestring.end(),deletefun);\ \n std::for_each(_integer.begin(),_integer.end(),delet"), kc_current_view ); kc_printer(kc_t("efun);\ \n std::for_each(_real.begin(),_real.end(),deletefun);\ \n std::for_each(_voidptr.begin(),_voidptr.end(),deletefun);\ \n std::for_each(_abstract_phylum.begin(),_abstract_phylum.end(),deletef"), kc_current_view ); kc_printer(kc_t("un);\ \n }\ \n ~hashtable_level() {\ \n clear(clean_on_destruction);\ \n }\ \n abstract_phylum check_insert(abstract_phylum t) {\ \n return *_abstract_phylum.insert(t).first;\ \n }\ \n case"), kc_current_view ); kc_printer(kc_t("string check_insert(casestring t) {\ \n#ifdef USE_HASHSET\ \n return (*_casestring.insert(hashitem(t)).first).contents;\ \n#else\ \n return *_casestring.insert(t).first;\ \n#endif\ \n }\ \n noc"), kc_current_view ); kc_printer(kc_t("asestring check_insert(nocasestring t) {\ \n return *_nocasestring.insert(t).first;\ \n }\ \n integer check_insert(integer t) {\ \n return *_integer.insert(t).first;\ \n }\ \n real check_insert"), kc_current_view ); kc_printer(kc_t("(real t) {\ \n return *_real.insert(t).first;\ \n }\ \n voidptr check_insert(voidptr t) {\ \n return *_voidptr.insert(t).first;\ \n }\ \n"), kc_current_view); } } else { { kc_printer(kc_t(" void clear() {\ \n _casestring.clear();\ \n _nocasestring.clear();\ \n _integer.clear();\ \n _real.clear();\ \n _voidptr.clear();\ \n _abstract_phylum.clear();\ \n }\ \n abstra"), kc_current_view ); kc_printer(kc_t("ct_phylum check_insert(abstract_phylum t) {\ \n return *_abstract_phylum.insert(abstract_phylum_ptr(t)).first;\ \n }\ \n casestring check_insert(casestring t) {\ \n return *_casestring.insert(c"), kc_current_view ); kc_printer(kc_t("asestring_ptr(t)).first;\ \n }\ \n nocasestring check_insert(nocasestring t) {\ \n return *_nocasestring.insert(nocasestring_ptr(t)).first;\ \n }\ \n integer check_insert(integer t) {\ \n retur"), kc_current_view ); kc_printer(kc_t("n *_integer.insert(integer_ptr(t)).first;\ \n }\ \n real check_insert(real t) {\ \n return *_real.insert(real_ptr(t)).first;\ \n }\ \n voidptr check_insert(voidptr t) {\ \n return *_voidptr.ins"), kc_current_view ); kc_printer(kc_t("ert(voidptr_ptr(t)).first;\ \n }\ \n"), kc_current_view); } } { kc_printer(kc_t("\rprivate:\v\ \n bool clean_on_destruction;\ \n#ifdef USE_HASHSET\ \n# ifdef __GNUC__\ \n# if __GNUC__==2 || (__GNUC__==3 && __GNUC_MINOR__==0)\ \n std::hash_set _casestring;\ \n# else\ \n __gnu_cxx::hash_set _casestring;\ \n# endif\ \n# else\ \n std::hash_set _casestring;\ \n# endif\ \n#"), kc_current_view ); kc_printer(kc_t("else\ \n std::set > _casestring;\ \n#endif\ \n std::set > _nocasestring;\ \n std::set > _integer;\ \n std::set > _real;\ \n std::set > _voidptr;\ \n std::set > _abstract_phylum;\ \n};\ \n\ \nclass hashtable_stack: public std::list {\ \n\rpublic:\v\ \n hashtable_stack(): _pos(begin()) { }\ \n\ \n void inc_level() { _pos=insert(_pos, "), kc_current_view ); kc_printer(kc_t("hashtable_level()); }\ \n void dec_level() { if(valid() && _pos!=end()) ++_pos; }\ \n void free_level() { if(_pos!=begin()) { erase(begin(),_pos);_pos=begin(); } }\ \n\ \n bool valid() const {"), kc_current_view ); kc_printer(kc_t(" return !empty(); }\ \n hashtable_level& get_level() { return *_pos; }\ \n\ \n template\ \n T check_insert(T t) {\ \n return dynamic_cast((*_pos).check_insert(t));\ \n }\ \n\r"), kc_current_view ); kc_printer(kc_t("private:\v\ \n iterator _pos;\ \n};\ \n\ \nclass hashtable_struct_t {\ \n\rpublic:\v\ \n // don't clean _static_level on destruction (program ends)\ \n hashtable_struct_t(): _static_level(fals"), kc_current_view ); kc_printer(kc_t("e), _to_be_freed(false), _dynamic(false) { }\ \n\ \n template \ \n T ht_check_insert(T t) {\ \n if(_dynamic && _dynamic_level.valid())\ \n return _dynamic_level.check_insert(t);\ \n"), kc_current_view ); kc_printer(kc_t(" else\ \n return dynamic_cast(_static_level.check_insert(t));\ \n }\ \n void ht_static() {_dynamic=false; }\ \n void ht_dynamic() {\ \n _dynamic=true;\ \n if(!_dynamic_level.valid())\ \n"), kc_current_view ); kc_printer(kc_t(" _dynamic_level.inc_level();\ \n }\ \n void ht_inc_level() { _dynamic_level.inc_level(); }\ \n void ht_dec_level() { _dynamic_level.dec_level(); }\ \n void ht_free_level() { _dynamic_le"), kc_current_view ); kc_printer(kc_t("vel.free_level(); }\ \n void ht_clear() { _static_level.clear(); _dynamic_level.clear(); _dynamic=false; }\ \n\ \n bool to_be_freed() { return _to_be_freed; }\ \n void set_to_be_freed(bool b=t"), kc_current_view ); kc_printer(kc_t("rue) { _to_be_freed=b; }\ \n\rprivate:\v\ \n hashtable_level _static_level;\ \n hashtable_stack _dynamic_level;\ \n bool _to_be_freed; /* should be true for dynamic, false for statically alloc"), kc_current_view ); kc_printer(kc_t("ated structures */\ \n bool _dynamic;\ \n};\ \n\ \nimpl_nocasestring_NoCaseStr::impl_nocasestring_NoCaseStr(const kc_char_t* _name) : name(_name) { }\ \nvoid impl_nocasestring_NoCaseStr::make_own(in"), kc_current_view ); kc_printer(kc_t("t length) {\ \n kc_char_t *newname=new kc_char_t[length+1];\ \n for (int i=0; i < length && name[i]; ++i)\ \n newname[i] = kc_tolower(name[i]);\ \n newname[length]=0;\ \n name=newname;\ \n}"), kc_current_view ); kc_printer(kc_t("\ \n\ \nimpl_casestring__Str::impl_casestring__Str(const kc_char_t* _name) : name(_name) { }\ \nvoid impl_casestring__Str::make_own(int length) {\ \n kc_char_t *newname=kc_strncpy(new kc_char_t[leng"), kc_current_view ); kc_printer(kc_t("th+1],name,length);\ \n newname[length]=0;\ \n name=newname;\ \n}\ \n"), kc_current_view); } } break; } case view_gen_end_k_h_enum: { view_gen_end_k_h_class& kc_current_view=static_cast(kc_current_view_base); { kc::unparse(this, kc_printer, view_close_namespace); { kc_printer(kc_t("#endif // KC_TYPES_HEADER\ \n"), kc_current_view); } } break; } case view_gen_k_h_enum: { view_gen_k_h_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("/* translation of file(s)\n"), kc_current_view); } kc::unparse(Thefnfiles, kc_printer, kc_current_view); { kc_printer(kc_t(" */\ \n/* generated by:\ \n * "), kc_current_view); } kc::unparse(kimwitu_copyright, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n */\ \n#ifndef KC_TYPES_HEADER\ \n#define KC_TYPES_HEADER\ \n\ \n#define KIMWITUVERSIONMAJOR "), kc_current_view); } kc::unparse(METAKIMWITUVERSIONMAJOR, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n#define KIMWITUVERSIONMINOR "), kc_current_view); } kc::unparse(METAKIMWITUVERSIONMINOR, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n#define KIMWITUVERSIONMICRO "), kc_current_view); } kc::unparse(METAKIMWITUVERSIONMICRO, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n\ \n#include \ \n#include \ \n#include \ \n#include \ \n\ \nnamespace kc {\r\ \n\ \n#ifndef INTEGER\ \n# define INTEGER int\ \n#endif\ \n#ifndef REAL\ \n# define "), kc_current_view ); kc_printer(kc_t("REAL double\ \n#endif\ \n\ \n#ifdef KC_UNICODE\ \n\ \n#define kc_t(TEXT) L ## TEXT\ \ntypedef wchar_t kc_char_t;\ \ntypedef std::wstring kc_string_t;\ \n\ \n#if defined(_WIN32) && ! defined (__GNUC__)\ \n"), kc_current_view ); kc_printer(kc_t("#define kc_strlen wcslen\ \n#define kc_strcmp wcscmp\ \n#define kc_strcasecmp _wcsicmp\ \n#define kc_strcpy wcscpy\ \n#define kc_strncpy wcsncpy\ \n#define kc_tolower towlower\ \n#define kc_print_integ"), kc_current_view ); kc_printer(kc_t("er(buf,number) swprintf(buf,kc_t(\"%d\"),number)\ \n#define kc_print_real(buf,number) swprintf(buf,kc_t(\"%g\"),number)\ \n\ \n// needed for printdot and csgio only\ \ninline\ \nstd::string kc_to_cstri"), kc_current_view ); kc_printer(kc_t("ng(const std::wstring& s) {\ \n USES_CONVERSION;\ \n return W2CA(s.c_str());\ \n}\ \n\ \n// needed for csgio only\ \ninline\ \nstd::wstring kc_to_wstring(const std::string& s) {\ \n USES_CONVE"), kc_current_view ); kc_printer(kc_t("RSION;\ \n return A2CW(s.c_str());\ \n}\ \n\ \n#else // !defined(_WIN32) || defined(__GNUC__)\ \n// if you want to use UNICODE on other platforms you have to write\ \n// the following functions on y"), kc_current_view ); kc_printer(kc_t("our own\ \nint kc_strlen(const kc_char_t*);\ \nint kc_strcmp(const kc_char_t*,const kc_char_t*);\ \nint kc_strcasecmp(const kc_char_t*,const kc_char_t*);\ \nint kc_strcpy(kc_char_t*,const kc_char_t*);\ \n"), kc_current_view ); kc_printer(kc_t("int kc_strncpy(kc_char_t*,const kc_char_t*, int);\ \nkc_char_t kc_tolower(kc_char_t);\ \nint kc_print_integer(kc_char_t* buffer, INTEGER number );\ \nint kc_print_real(kc_char_t* buffer, REAL number);\ \n"), kc_current_view ); kc_printer(kc_t("\ \n// needed for printdot and csgio only\ \nstd::string kc_to_cstring(const std::wstring& );\ \n// needed for csgio only\ \nstd::wstring kc_to_wstring(const std::string& );\ \n\ \n#endif\ \n\ \n#else "), kc_current_view ); kc_printer(kc_t("// !KC_UNICODE\ \n \ \n#define kc_t(TEXT) TEXT \ \ntypedef char kc_char_t;\ \ntypedef std::string kc_string_t;\ \n\ \n#define kc_strlen strlen\ \n#define kc_strcmp strcmp\ \n#if defined(_WIN32) && ! "), kc_current_view ); kc_printer(kc_t("defined (__GNUC__)\ \n#define kc_strcasecmp _stricmp\ \n#else\ \n#define kc_strcasecmp strcasecmp\ \n#endif\ \n#define kc_strcpy strcpy\ \n#define kc_strncpy strncpy\ \n#define kc_tolower tolower \ \n"), kc_current_view ); kc_printer(kc_t("#define kc_print_integer(buf,number) sprintf(buf,kc_t(\"%d\"),number)\ \n#define kc_print_real(buf,number) sprintf(buf,kc_t(\"%g\"),number)\ \n#endif\ \n"), kc_current_view); } if(!g_options.no_unparse) { { kc_printer(kc_t("class uview_class;\ \ntypedef uview_class& uview;\ \ntypedef const uview_class& c_uview;\ \n\ \ntypedef class printer_functor_class& printer_functor;\ \ntypedef void (*printer_function)(const kc_char_t"), kc_current_view ); kc_printer(kc_t("*, uview);\ \n"), kc_current_view); } } if(!g_options.no_rewrite) { { kc_printer(kc_t("\ \nclass rview_class;\ \ntypedef rview_class& rview;\ \ntypedef const rview_class& c_rview;\ \n"), kc_current_view); } } { kc_printer(kc_t("\ \n\v}\ \n\ \n// Some compilers know __attribute__. Right now we test for the GNU compiler\ \n// and Intel's icc (for ia32) and ecc (for ia64).\ \n#if !defined __GNUC__ && !defined __ICC && !defined _"), kc_current_view ); kc_printer(kc_t("_ECC\ \n# define __attribute__(x)\ \n#endif\ \n\ \n// Since all definitions are in namespace kc now, there is no need\ \n// give them a kc_ prefix. Old code may still rely on the prefix, so these\ \n//"), kc_current_view ); kc_printer(kc_t(" macros are generated for backwards compatibility\ \n#ifdef KC_DEPRECATED\ \n#define kc_PhylumInfo phylum_info\ \n#define kc_OperatorInfo operator_info\ \n#define kc_last_uview "), kc_current_view ); kc_printer(kc_t(" last_uview\ \n#define kc_uviews uviews\ \n#define kc_rviews rviews\ \n#define kc_ht_reuse ht_clear\ \n#define kc_ht_clear ht_clear\ \n#define kc_"), kc_current_view ); kc_printer(kc_t("ht_assign ht_assign\ \n#define kc_ht_assigned ht_assigned\ \n"), kc_current_view); } kc::unparse(this, kc_printer, view_gen_deprecated); { kc_printer(kc_t("\ \n#endif // KC_DEPRECATED\ \n\ \n// Some compilers are too stupid to detect that a function will always return\ \n// a proper value when it returns one in all branches of an if- or switch-\ \n// stat"), kc_current_view ); kc_printer(kc_t("ement (with final else or default, of course).\ \n#if !defined __GNUC__\ \n# define NORETURN throw 0;\ \n#else\ \n# define NORETURN\ \n#endif\ \n"), kc_current_view); } kc::unparse(this, kc_printer, view_open_namespace); { kc_printer(kc_t("\ \n\ \n"), kc_current_view); } } break; } case view_close_namespace_enum: { view_close_namespace_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\ \n} // namespace kc\ \n"), kc_current_view); } } break; } case view_open_namespace_enum: { view_open_namespace_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\ \nnamespace kc {\r\ \n"), kc_current_view); } } break; } case view_no_of_printed_string_chars_reset_enum: { view_no_of_printed_string_chars_reset_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_printer_reset_enum: { view_printer_reset_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_printer_outputfileline_enum: { view_printer_outputfileline_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_phylumdeclarations::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_yxx_union_h_enum: { view_gen_yxx_union_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_classdefs_c_enum: { view_gen_classdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_classdecls2_h_enum: { view_gen_classdecls2_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_classdecls1_h_enum: { view_gen_classdecls1_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_unparsedefs_c_enum: { view_gen_unparsedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_rewritedefs_c_enum: { view_gen_rewritedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_copy_attributes_c_enum: { view_gen_copy_attributes_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_listdefs_c_enum: { view_gen_listdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_printdotdefs_c_enum: { view_gen_printdotdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_attributeOf_function_enum: { view_gen_attributeOf_function_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_operatordefs_c_enum: { view_gen_operatordefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_operatorcast_h_enum: { view_gen_operatorcast_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_operatordecls_h_enum: { view_gen_operatordecls_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_yaccstacktype_h_enum: { view_gen_yaccstacktype_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_nodetypedefs_h_enum: { view_gen_nodetypedefs_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_operatormap_attributes_enum: { view_gen_operatormap_attributes_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_operatormap_subphyla_enum: { view_gen_operatormap_subphyla_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_operatormap_c_enum: { view_gen_operatormap_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_phylummap_c_enum: { view_gen_phylummap_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_enumoperators_h_enum: { view_gen_enumoperators_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_enumphyla_h_enum: { view_gen_enumphyla_h_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_gen_deprecated_enum: { view_gen_deprecated_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_check_uniq_enum: { view_check_uniq_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration d = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(d, kc_printer, kc_current_view); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_check_count1_enum: { view_check_count1_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations rpds = this->phylumdeclarations_1; kc::unparse(rpds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } case view_check_count_enum: { view_check_count_class& kc_current_view=static_cast(kc_current_view_base); { kc::unparse(this, kc_printer, view_check_count1); v_freecount(); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const phylumdeclaration pd = this->phylumdeclaration_1; const phylumdeclarations pds = this->phylumdeclarations_1; kc::unparse(pds, kc_printer, kc_current_view); kc::unparse(pd, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (phylumdeclarations iterator_ = this; iterator_->phylumdeclarations_1 != 0; iterator_ = iterator_->phylumdeclarations_1) iterator_->phylumdeclaration_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_phylumdeclarations::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_yxx_union_h_enum: { view_gen_yxx_union_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_classdefs_c_enum: { view_gen_classdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_classdecls2_h_enum: { view_gen_classdecls2_h_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\ \nabstract_phylum kc_create(enum_operators createOp"), kc_current_view); } int j=Theargsnumbers->last()->value; if (j<2) j=2; for (int i = 1; i<=j; ++i) { { kc_printer(kc_t(", abstract_phylum=0"), kc_current_view); } } { kc_printer(kc_t(");\ \nabstract_phylum kc_create(enum_operators createOp, const std::vector& kc_ps);\ \nabstract_phylum& attributeOf(abstract_phylum kc_p, int no);\ \n\n"), kc_current_view); } } break; } case view_gen_classdecls1_h_enum: { view_gen_classdecls1_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_unparsedefs_c_enum: { view_gen_unparsedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_rewritedefs_c_enum: { view_gen_rewritedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_copy_attributes_c_enum: { view_gen_copy_attributes_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_listdefs_c_enum: { view_gen_listdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_printdotdefs_c_enum: { view_gen_printdotdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_attributeOf_function_enum: { view_gen_attributeOf_function_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatordefs_c_enum: { view_gen_operatordefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatorcast_h_enum: { view_gen_operatorcast_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatordecls_h_enum: { view_gen_operatordecls_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_yaccstacktype_h_enum: { view_gen_yaccstacktype_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_nodetypedefs_h_enum: { view_gen_nodetypedefs_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatormap_attributes_enum: { view_gen_operatormap_attributes_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatormap_subphyla_enum: { view_gen_operatormap_subphyla_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatormap_c_enum: { view_gen_operatormap_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_phylummap_c_enum: { view_gen_phylummap_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_enumoperators_h_enum: { view_gen_enumoperators_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_enumphyla_h_enum: { view_gen_enumphyla_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_deprecated_enum: { view_gen_deprecated_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_uniq_enum: { view_check_uniq_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { fndeclarations apfd=The_abstract_phylum_decl->additional_members, alfd=The_abstract_list_decl->additional_members; kc::unparse(apfd, kc_printer, view_count_attrs); if (gl_no_of_args) { { kc_printer(kc_t("void kc_initialize_abstract_phylum(abstract_phylum kc_x)\ \n {\n"), kc_current_view); } { kc_printer(kc_t("}\n"), kc_current_view); } } kc::unparse(alfd, kc_printer, view_count_attrs); if (gl_no_of_args) { { kc_printer(kc_t("void kc_initialize_abstract_list(abstract_list kc_x)\ \n {\n"), kc_current_view); } { kc_printer(kc_t("}\n"), kc_current_view); } } } break; } case view_check_count1_enum: { view_check_count1_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_phylumnames::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_uniqmap_c_1_enum: { view_gen_uniqmap_c_1_class& kc_current_view=static_cast(kc_current_view_base); { const ID pn = this->ID_1; const phylumnames r_pn = this->phylumnames_1; kc::unparse(r_pn, kc_printer, kc_current_view); { kc_printer(kc_t("phylum_"), kc_current_view); } kc::unparse(pn, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (phylumnames iterator_ = this; iterator_->phylumnames_1 != 0; iterator_ = iterator_->phylumnames_1) iterator_->ID_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_phylumnames::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_uniqmap_c_1_enum: { view_gen_uniqmap_c_1_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_phylumdeclaration_PhylumDeclaration::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_set_subphylumdefs_c_enum: { view_gen_set_subphylumdefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { } else if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const ID el = phylum_cast(this->productionblock_1)->ID_1; { kc_printer(kc_t("void impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("::set_subphylum(int no, abstract_phylum val)\ \n{\ \n abstract_phylum newval=0;\ \n switch(no) {\ \n case 0: newval = "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("_1 = dynamic_cast<"), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(">(val);break;\ \n case 1: newval = "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_1 = dynamic_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(val);break;\ \n }\ \n assertNonNull(newval);\ \n}\ \n"), kc_current_view); } } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const ID id = this->ID_1; const alternatives alt = phylum_cast(this->productionblock_1)->alternatives_1; kc::unparse(alt, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_yxx_union_h_enum: { view_gen_yxx_union_h_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; { kc_printer(kc_t(" kc::"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" as_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } break; } case view_gen_subphylumdefs_c_enum: { view_gen_subphylumdefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { } else if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const ID el = phylum_cast(this->productionblock_1)->ID_1; { kc_printer(kc_t("abstract_phylum impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("::subphylum(int no) const\ \n{\ \n switch(no){\ \n case 0: return "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("_1;\ \n case 1: return "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_1;\ \n }\ \n return 0;\ \n}\ \n"), kc_current_view); } } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const ID id = this->ID_1; const alternatives alt = phylum_cast(this->productionblock_1)->alternatives_1; kc::unparse(alt, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_classdefs_c_enum: { view_gen_classdefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const ID el = phylum_cast(this->productionblock_1)->ID_1; { kc_printer(kc_t("const enum_phyla "), kc_current_view); } kc::unparse(id, kc_printer, view_class_of_phy); { kc_printer(kc_t("::phylum_sel_ = phylum_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(";\n"), kc_current_view); } kc::unparse(id, kc_printer, view_class_of_phy); { kc_printer(kc_t("::"), kc_current_view); } kc::unparse(id, kc_printer, view_class_of_phy); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" p1 , "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" p2)\ \n \v: "), kc_current_view); } kc::unparse(additional_members, kc_printer, view_count_nonstaticmembers); if (gl_no_of_args) { kc::unparse(gl_members, kc_printer, view_gen_user_assignment_inis); { kc_printer(kc_t(", "), kc_current_view); } } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("_1(p1), "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_1(p2) { }\r\ \n"), kc_current_view); } } else { const ID id = this->ID_1; const productionblock alts = this->productionblock_1; { kc_printer(kc_t("const enum_phyla "), kc_current_view); } kc::unparse(id, kc_printer, view_class_of_phy); { kc_printer(kc_t("::phylum_sel_ = phylum_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(";\n"), kc_current_view); } gl_phylum=id; kc::unparse(alts, kc_printer, kc_current_view); } break; } case view_gen_classdecls2_h_enum: { view_gen_classdecls2_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives) && (phylum_cast(this->productionblock_1)->alternatives_1->prod_sel() == sel_Consalternatives) && ((phylum_cast(this->productionblock_1)->alternatives_1)->alternative_1->prod_sel() == sel_Alternative)) { const ID id = this->ID_1; const alternatives alts = phylum_cast(this->productionblock_1)->alternatives_1; const ID oid = phylum_cast((phylum_cast(this->productionblock_1)->alternatives_1)->alternative_1)->ID_1; const Ccode_option cco = this->Ccode_option_1; { kc_printer(kc_t("class impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \ntypedef impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(" impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } kc::unparse(alts, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else { const phylumdeclaration ph_decl = this/**/; const ID id = this->ID_1; const productionblock alt = this->productionblock_1; const Ccode_option cco = this->Ccode_option_1; { kc_printer(kc_t("class "), kc_current_view); } if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } { kc_printer(kc_t("impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { baseclass_list kc_selvar_0_1 = phylum_cast(ph_decl->base_classes); if ((kc_selvar_0_1->prod_sel() == sel_Consbaseclass_list)) { PRINT("\b :\b "); UNPARSE(ph_decl->base_classes); } else { { productionblock kc_selvar_1_1 = phylum_cast(alt); if ((kc_selvar_1_1->prod_sel() == sel_ListAlternatives)) { PRINT(": public impl_abstract_list"); } else { PRINT(": public impl_abstract_phylum"); } } } } { kc_printer(kc_t("{\ \n\rpublic:\v\n"), kc_current_view); } kc::unparse(additional_members, kc_printer, view_count_nonstaticmembers); if (f_listelementphylum(id)->eq(f_emptyId()) && !f_constructors_in_phylumdecl(this) && gl_no_of_args!=0) { { kc_printer(kc_t("explicit impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("()\v\n: "), kc_current_view); } kc::unparse(gl_members, kc_printer, view_gen_user_assignment_inis); { kc_printer(kc_t(" { }\r\n"), kc_current_view); } } { kc_printer(kc_t(" static const enum_phyla phylum_sel_;\n"), kc_current_view); } if(!g_options.no_printdot) { { kc_printer(kc_t(" void fprintdot( FILE*, const char*, const char*, const char*, bool, bool, bool ) const;\ \n"), kc_current_view); } } if(!g_options.no_rewrite && g_options.rw_loop) { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" rewrite(rview v) { return phylum_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(impl_abstract_phylum::rewrite(v)); }\ \n"), kc_current_view); } } if(g_options.smart_pointer) { { kc_printer(kc_t(" abstract_phylum_ref* new_phylum_ref() {\ \n return new phylum_ref(this);\ \n }\ \n impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("& operator=(const impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("& p) {\ \n phylum_ref* my_ref=static_cast*>(get_ref());\ \n "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" self=this;\ \n if(my_ref) {\ \n abstract_phylum_ref* ref=p.get_ref();\ \n self=const_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(&p);\ \n if(ref)\ \n self=phylum_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(self->copy(true));\ \n my_ref->set_phylum(self);\ \n }\ \n return *self;\ \n }\ \n impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("& operator=(const phylum_ref& r) {\ \n phylum_ref* my_ref=static_cast*>(get_ref());\ \n "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" self=this;\ \n if(my_ref) {\ \n self=phylum_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(r.get_phylum()?r.get_phylum()->copy(true):0);\ \n my_ref->set_phylum(self);\ \n }\ \n return *self;\ \n }\ \n\ \n impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("* return_ptr() { if(get_ref()) get_ref()->lock(); return this; }\ \n"), kc_current_view); } } kc::unparse(cco, kc_printer, view_gen_nodetypes_h); kc::unparse(additional_members, kc_printer, view_gen_member_dcl_h); kc::unparse(this, kc_printer, view_gen_listdecls_h); { kc_printer(kc_t("};\ \n"), kc_current_view); } kc::unparse(alt, kc_printer, kc_current_view); } break; } case view_gen_classdecls1_h_enum: { view_gen_classdecls1_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives) && (phylum_cast(this->productionblock_1)->alternatives_1->prod_sel() == sel_Consalternatives) && ((phylum_cast(this->productionblock_1)->alternatives_1)->alternative_1->prod_sel() == sel_Alternative)) { const ID id = this->ID_1; const ID oid = phylum_cast((phylum_cast(this->productionblock_1)->alternatives_1)->alternative_1)->ID_1; { kc_printer(kc_t("class impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } if(g_options.smart_pointer) { { kc_printer(kc_t("typedef phylum_ptr "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_ptr;\ \n"), kc_current_view); } } if(g_options.weak_pointer) { { kc_printer(kc_t("typedef weak_phylum_ptr weak_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_ptr;\ \n"), kc_current_view); } } } else if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else { const ID id = this->ID_1; { kc_printer(kc_t("class impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } if(g_options.smart_pointer) { { kc_printer(kc_t("typedef phylum_ptr "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_ptr;\ \n"), kc_current_view); } } if(g_options.weak_pointer) { { kc_printer(kc_t("typedef weak_phylum_ptr weak_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_ptr;\ \n"), kc_current_view); } } } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { } else if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { alternative a = f_alternativeofoperator(gl_operator); view_gen_unparsedefs_default_c_class vgudcL(/* is list ? */ true, kc_current_view.isOnlyDefault); kc::unparse(a, kc_printer, vgudcL); } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { alternative a = f_alternativeofoperator(gl_operator); kc::unparse(a, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_unparsedefs_c_enum: { view_gen_unparsedefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { } else if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else { const ID id = this->ID_1; const productionblock pb = this->productionblock_1; ID selvar = Id(Str(mkcasestring("this"))); dollarvarstack.push( selvar ); dollarvarextstack.push( f_emptyId() ); gl_phylum = id; kc::unparse(pb, kc_printer, kc_current_view); gl_phylum = 0; dollarvarstack.pop(); dollarvarextstack.pop(); } break; } case view_gen_rewritedefs_c_enum: { view_gen_rewritedefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { const ID id = this->ID_1; } else { const ID id = this->ID_1; const productionblock pb = this->productionblock_1; gl_phydecl = f_lookupdecl( id ); gl_phylum = id; if ( gl_phydecl == 0 ) { v_report(NonFatal( FileLine( gl_phylum->file, gl_phylum->line ), Problem1S1ID( "internal error: could not find declaration of phylum:", gl_phylum ))); } kc::unparse(pb, kc_printer, kc_current_view); gl_phydecl = 0; gl_phylum = 0; } break; } case view_gen_copy_attributes_c_enum: { view_gen_copy_attributes_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->Ccode_option_1->prod_sel() == sel_CcodeOption) && (phylum_cast(this->Ccode_option_1)->attributes_1->prod_sel() == sel_Consattributes) && ((phylum_cast(this->Ccode_option_1)->attributes_1)->attribute_1->prod_sel() == sel_Attribute) && ((phylum_cast(this->Ccode_option_1)->attributes_1)->attributes_1->prod_sel() == sel_Nilattributes)) { const ID id = this->ID_1; const ID aid = phylum_cast((phylum_cast(this->Ccode_option_1)->attributes_1)->attribute_1)->ID_2; { kc_printer(kc_t(" case phylum_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(":\v\ \n dynamic_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(kc_p2)->"), kc_current_view); } kc::unparse(aid, kc_printer, kc_current_view); { kc_printer(kc_t(" = dynamic_cast(kc_p1)->"), kc_current_view); } kc::unparse(aid, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n break;\r\n"), kc_current_view); } } else if ((this->Ccode_option_1->prod_sel() == sel_CcodeOption) && (phylum_cast(this->Ccode_option_1)->attributes_1->prod_sel() == sel_Nilattributes)) { const ID id = this->ID_1; } else if ((this->Ccode_option_1->prod_sel() == sel_CcodeOption)) { const ID id = this->ID_1; const attributes a = phylum_cast(this->Ccode_option_1)->attributes_1; { kc_printer(kc_t(" case phylum_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(": {\ \n c_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" p1 = dynamic_cast(kc_p1);\ \n"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" p2 = dynamic_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(kc_p2);\ \n"), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t(" break;\ \n }\n"), kc_current_view); } } else goto kc_unparsing_default; break; } case view_gen_listdefs_c_enum: { view_gen_listdefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const ID el = phylum_cast(this->productionblock_1)->ID_1; kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("\ \nconcat(c_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_p1, c_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_p2)\ \n{ return dynamic_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(kc_p1->do_concat(kc_p2, sel_Cons"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(")); }\ \n"), kc_current_view); } covariant_choice(id, "\nimpl_", "::reverse() const", "abstract_list\nimpl_", "::reverse() const", kc_printer, kc_current_view); { kc_printer(kc_t("\n{ return dynamic_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(do_reverse(Nil"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("(), sel_Cons"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(")); }\ \n\ \n"), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("\ \nimpl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("::last() const\ \n{ return dynamic_cast<"), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(">(impl_abstract_list::last()); }\ \n\ \nbool\ \nimpl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("::is_nil() const\ \n{\ \n return "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("_1==0 && "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_1==0;\ \n}\ \n\ \n"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("\ \nimpl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("::map("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" (*kc_fp)("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("))\ \n{ return dynamic_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Cons"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(")); }\ \n"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("\ \nimpl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("::filter(bool (*kc_fp)("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("))\ \n{ return dynamic_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Cons"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(")); }\ \n\ \n"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("\ \nimpl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("::append("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" new_last)\ \n{\ \n return dynamic_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(do_append(new_last, Nil"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("()));\ \n}\ \n"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("\ \nimpl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("::merge( "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" second, "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" (*kc_fp)("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("))\ \n{\ \n return dynamic_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Cons"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("));\ \n}\ \n"), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("\ \nimpl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("::reduce( "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" neutral, "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" (*kc_fp)("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("))\ \n{\ \n return dynamic_cast<"), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(">(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp));\ \n}\ \n\ \n"), kc_current_view); } } else { } break; } case view_gen_listdecls_h_enum: { view_gen_listdecls_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const ID el = phylum_cast(this->productionblock_1)->ID_1; { kc_printer(kc_t(" enum_operators prod_sel() const{\ \n return is_nil() ? sel_Nil"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(": sel_Cons"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n }\ \n explicit impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" = 0, "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" = 0);\ \n abstract_phylum subphylum(int) const;\ \n void set_subphylum(int, abstract_phylum);\ \n friend "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" concat(c_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(", c_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(");\n"), kc_current_view); } if (g_options.covariant=='p') { { kc_printer(kc_t("#ifndef NO_COVARIANT_RETURN\n"), kc_current_view); } } if (g_options.covariant!='n') { kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" reverse() const;\n"), kc_current_view); } if(!g_options.no_rewrite && !g_options.rw_loop) { kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" rewrite(rview);\ \n"), kc_current_view); } } } if (g_options.covariant=='p') { { kc_printer(kc_t("#else\n"), kc_current_view); } } if (g_options.covariant!='y') { { kc_printer(kc_t(" abstract_list reverse() const;\ \n"), kc_current_view); } if(!g_options.no_rewrite && !g_options.rw_loop) { { kc_printer(kc_t(" abstract_phylum rewrite(rview);\ \n"), kc_current_view); } } } if (g_options.covariant=='p') { { kc_printer(kc_t("#endif // NO_COVARIANT_RETURN\n"), kc_current_view); } } if(!g_options.no_rewrite && g_options.rw_loop) { { kc_printer(kc_t(" abstract_phylum do_rewrite(rview);\ \n"), kc_current_view); } } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" last() const;\ \n "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" append("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(");\ \n "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" map("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" (*)("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("));\ \n "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" filter( bool (*)("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("));\ \n "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" merge( "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" (*)("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("));\ \n "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" reduce( "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" (*)("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("));\ \n bool is_nil() const;\ \n"), kc_current_view); } if(g_options.smart_pointer) { kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("_ptr "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("_1;\ \n "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_ptr "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_1;\ \n"), kc_current_view); } } else { kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("_1;\ \n "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_1;\ \n"), kc_current_view); } } { kc_printer(kc_t("\rprivate:\v\n"), kc_current_view); } if(!g_options.no_rewrite && !g_options.rw_loop) { if (g_options.covariant=='p') { { kc_printer(kc_t("#ifndef NO_COVARIANT_RETURN\n"), kc_current_view); } } if (g_options.covariant!='n') { { kc_printer(kc_t(" impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("* nil_rewrite(rview);\ \n impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("* cons_rewrite(rview);\ \n"), kc_current_view); } } if (g_options.covariant=='p') { { kc_printer(kc_t("#else\n"), kc_current_view); } } if (g_options.covariant!='y') { { kc_printer(kc_t(" impl_abstract_phylum* nil_rewrite(rview);\ \n impl_abstract_phylum* cons_rewrite(rview);\ \n"), kc_current_view); } } if (g_options.covariant=='p') { { kc_printer(kc_t("#endif // NO_COVARIANT_RETURN\n"), kc_current_view); } } } if (!g_options.no_unparse) { { kc_printer(kc_t(" void nil_do_unparse(printer_functor, uview);\ \n void do_unparse(printer_functor, uview);\ \n"), kc_current_view); } } } else { const ID id = this->ID_1; if (g_options.covariant!='n') { if (g_options.covariant=='p') { { kc_printer(kc_t("#ifndef NO_COVARIANT_RETURN\n"), kc_current_view); } } if(!g_options.no_rewrite && !g_options.rw_loop) { kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" rewrite(rview) =0;\n"), kc_current_view); } } if (g_options.covariant=='p') { { kc_printer(kc_t("#endif // NO_COVARIANT_RETURN\n"), kc_current_view); } } } } break; } case view_gen_printdotdefs_c_enum: { view_gen_printdotdefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { const ID id = this->ID_1; { kc_printer(kc_t("void impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("::fprintdot(FILE *f, const char *root_label_prefix, const char *edge_label_prefix, const char *edge_attributes, bool print_node_labels, bool use_context_when_sharing_leaves, bool print_prologue_and_epi"), kc_current_view ); kc_printer(kc_t("logue) const\ \n{\ \n int kc_edge_nr = 1;\ \n kc_dotedgenode_t kc_edges = 0;\ \n if (print_prologue_and_epilogue) fprintdotprologue(f);\ \n /*if (kc_outmost)*/ kc_do_printdot_subgraph_prolo"), kc_current_view ); kc_printer(kc_t("gue(f, this, root_label_prefix, edge_attributes, print_node_labels, use_context_when_sharing_leaves);\ \n fprintdot_hashtable = new kc_dotedge_ht;\ \n do_printdot(f, true, &kc_edge_nr, &kc_edges,"), kc_current_view ); kc_printer(kc_t(" edge_label_prefix, print_node_labels, use_context_when_sharing_leaves, 0, 0);\ \n kc_do_printdot_edges(f, kc_edges, edge_attributes, use_context_when_sharing_leaves);\ \n delete fprintdot_hashta"), kc_current_view ); kc_printer(kc_t("ble;\ \n fprintdot_hashtable=0;\ \n /*if (kc_outmost)*/ kc_do_printdot_subgraph_epilogue(f);\ \n if (print_prologue_and_epilogue) fprintdotepilogue(f);\ \n}\ \n"), kc_current_view); } } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; { kc_printer(kc_t("void impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("::fprintdot(FILE *f, const char *root_label_prefix, const char *edge_label_prefix, const char *edge_attributes, bool print_node_labels, bool use_context_when_sharing_leaves, bool print_prologue_and_epi"), kc_current_view ); kc_printer(kc_t("logue) const\ \n{\ \n int kc_edge_nr = 1;\ \n kc_dotedgenode_t kc_edges = 0;\ \n if (print_prologue_and_epilogue) fprintdotprologue(f);\ \n /*if (kc_outmost)*/ kc_do_printdot_subgraph_prolo"), kc_current_view ); kc_printer(kc_t("gue(f, this, root_label_prefix, edge_attributes, print_node_labels, use_context_when_sharing_leaves);\ \n fprintdot_hashtable = new kc_dotedge_ht;\ \n do_printdot(f, true, &kc_edge_nr, &kc_edges,"), kc_current_view ); kc_printer(kc_t(" edge_label_prefix, print_node_labels, use_context_when_sharing_leaves, 0, 0);\ \n kc_do_printdot_edges(f, kc_edges, edge_attributes, use_context_when_sharing_leaves);\ \n delete fprintdot_hashta"), kc_current_view ); kc_printer(kc_t("ble;\ \n fprintdot_hashtable=0;\ \n /*if (kc_outmost)*/ kc_do_printdot_subgraph_epilogue(f);\ \n if (print_prologue_and_epilogue) fprintdotepilogue(f);\ \n}\ \n"), kc_current_view); } } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const ID id = this->ID_1; { kc_printer(kc_t("void impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("::fprintdot(FILE *f, const char *root_label_prefix, const char *edge_label_prefix, const char *edge_attributes, bool print_node_labels, bool use_context_when_sharing_leaves, bool print_prologue_and_epi"), kc_current_view ); kc_printer(kc_t("logue) const\ \n{\ \n int kc_edge_nr = 1;\ \n kc_dotedgenode_t kc_edges = 0;\ \n if (print_prologue_and_epilogue) fprintdotprologue(f);\ \n /*if (kc_outmost)*/ kc_do_printdot_subgraph_prolo"), kc_current_view ); kc_printer(kc_t("gue(f, this, root_label_prefix, edge_attributes, print_node_labels, use_context_when_sharing_leaves);\ \n fprintdot_hashtable = new kc_dotedge_ht;\ \n do_printdot(f, true, &kc_edge_nr, &kc_edges,"), kc_current_view ); kc_printer(kc_t(" edge_label_prefix, print_node_labels, use_context_when_sharing_leaves, 0, 0);\ \n kc_do_printdot_edges(f, kc_edges, edge_attributes, use_context_when_sharing_leaves);\ \n delete fprintdot_hashta"), kc_current_view ); kc_printer(kc_t("ble;\ \n fprintdot_hashtable=0;\ \n /*if (kc_outmost)*/ kc_do_printdot_subgraph_epilogue(f);\ \n if (print_prologue_and_epilogue) fprintdotepilogue(f);\ \n}\ \n"), kc_current_view); } } else goto kc_unparsing_default; break; } case view_gen_attributeOf_function_enum: { view_gen_attributeOf_function_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; The_abstract_phylum_decl->additional_members->unparse(kc_printer, view_count_attrs); int attrcount = gl_no_of_args; arguments attrs = gl_args; ac_identifier_list idents = gl_idents; kc::unparse(additional_members, kc_printer, view_count_attrs); gl_no_of_args += attrcount; gl_args = concat(gl_args, attrs); gl_idents = concat(gl_idents, idents); kc::unparse(a, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const ID id = this->ID_1; const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; The_abstract_phylum_decl->additional_members->unparse(kc_printer, view_count_attrs); int attrcount = gl_no_of_args; arguments attrs = gl_args; ac_identifier_list idents = gl_idents; kc::unparse(additional_members, kc_printer, view_count_attrs); gl_no_of_args += attrcount; gl_args = concat(gl_args, attrs); gl_idents = concat(gl_idents, idents); kc::unparse(a, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { const ID id = this->ID_1; const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; The_abstract_phylum_decl->additional_members->unparse(kc_printer, view_count_attrs); int attrcount = gl_no_of_args; arguments attrs = gl_args; ac_identifier_list idents = gl_idents; kc::unparse(additional_members, kc_printer, view_count_attrs); gl_no_of_args += attrcount; gl_args = concat(gl_args, attrs); gl_idents = concat(gl_idents, idents); kc::unparse(a, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_create_function_enum: { view_gen_create_function_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const alternatives alts = phylum_cast(this->productionblock_1)->alternatives_1; kc::unparse(alts, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const alternatives alts = phylum_cast(this->productionblock_1)->alternatives_1; kc::unparse(alts, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { } else goto kc_unparsing_default; break; } case view_gen_operatordefs_c_enum: { view_gen_operatordefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->storageoption_1->prod_sel() == sel_NoStorageOption) && (this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const alternatives alts = phylum_cast(this->productionblock_1)->alternatives_1; const Ccode_option cco = this->Ccode_option_1; gl_phylum = id; gl_cco = cco; kc::unparse(alts, kc_printer, view_gen_operatordefs_nonhash_c); gl_phylum = 0; gl_cco = (Ccode_option)0; } else if ((this->storageoption_1->prod_sel() == sel_NegativeStorageOption) && (this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const alternatives alts = phylum_cast(this->productionblock_1)->alternatives_1; const Ccode_option cco = this->Ccode_option_1; gl_phylum = id; gl_cco = cco; kc::unparse(alts, kc_printer, view_gen_operatordefs_nonhash_c); gl_phylum = 0; gl_cco = (Ccode_option)0; } else if ((this->storageoption_1->prod_sel() == sel_NoStorageOption) && (this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const ID id = this->ID_1; const alternatives alts = phylum_cast(this->productionblock_1)->alternatives_1; const Ccode_option cco = this->Ccode_option_1; gl_phylum = id; gl_cco = cco; kc::unparse(alts, kc_printer, view_gen_operatordefs_nonhash_c); gl_phylum = 0; gl_cco = (Ccode_option)0; } else if ((this->storageoption_1->prod_sel() == sel_NegativeStorageOption) && (this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const ID id = this->ID_1; const alternatives alts = phylum_cast(this->productionblock_1)->alternatives_1; const Ccode_option cco = this->Ccode_option_1; gl_phylum = id; gl_cco = cco; kc::unparse(alts, kc_printer, view_gen_operatordefs_nonhash_c); gl_phylum = 0; gl_cco = (Ccode_option)0; } else if ((this->storageoption_1->prod_sel() == sel_PositiveStorageOption) && (this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const ID sto = phylum_cast(this->storageoption_1)->ID_1; const alternatives alts = phylum_cast(this->productionblock_1)->alternatives_1; const Ccode_option cco = this->Ccode_option_1; gl_phylum = id; gl_cco = cco; gl_sto = sto; kc::unparse(alts, kc_printer, view_gen_operatordefs_hash_c); gl_phylum = 0; gl_cco = (Ccode_option)0; gl_sto = 0; } else if ((this->storageoption_1->prod_sel() == sel_PositiveStorageOption) && (this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const ID id = this->ID_1; const ID sto = phylum_cast(this->storageoption_1)->ID_1; const alternatives alts = phylum_cast(this->productionblock_1)->alternatives_1; const Ccode_option cco = this->Ccode_option_1; gl_phylum = id; gl_cco = cco; gl_sto = sto; kc::unparse(alts, kc_printer, view_gen_operatordefs_hash_c); gl_phylum = 0; gl_cco = (Ccode_option)0; gl_sto = 0; } else if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { } else goto kc_unparsing_default; break; } case view_gen_operatorcast_h_enum: { view_gen_operatorcast_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const ID el = phylum_cast(this->productionblock_1)->ID_1; { kc_printer(kc_t("//"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" Nil"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("();\ \n //"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" Cons"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(","), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(");\ \n"), kc_current_view); } } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { } else goto kc_unparsing_default; break; } case view_gen_operatordecls_h_enum: { view_gen_operatordecls_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const ID el = phylum_cast(this->productionblock_1)->ID_1; kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" Nil"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("();\ \n "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" Cons"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(","), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(");\ \n"), kc_current_view); } } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { } else goto kc_unparsing_default; break; } case view_gen_yaccstacktype_h_enum: { view_gen_yaccstacktype_h_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; { kc_printer(kc_t(" kc::"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" yt_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } break; } case view_gen_nodetypedefs_h_enum: { view_gen_nodetypedefs_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives) && (phylum_cast(this->productionblock_1)->alternatives_1->prod_sel() == sel_Consalternatives) && ((phylum_cast(this->productionblock_1)->alternatives_1)->alternative_1->prod_sel() == sel_Alternative)) { const ID id = this->ID_1; const ID oid = phylum_cast((phylum_cast(this->productionblock_1)->alternatives_1)->alternative_1)->ID_1; { kc_printer(kc_t("typedef impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(" *"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \ntypedef const impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(" *c_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } else if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else { const ID id = this->ID_1; { kc_printer(kc_t("typedef impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" *"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \ntypedef const impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" *c_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } break; } case view_gen_operatormap_attributes_enum: { view_gen_operatormap_attributes_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; The_abstract_phylum_decl->additional_members->unparse(kc_printer, view_count_attrs); int attrcount = gl_no_of_args; arguments attrs = gl_args; ac_identifier_list idents = gl_idents; kc::unparse(additional_members, kc_printer, view_count_attrs); gl_no_of_args += attrcount; gl_args = concat(gl_args, attrs); gl_idents = concat(gl_idents, idents); kc::unparse(a, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const ID id = this->ID_1; const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; The_abstract_phylum_decl->additional_members->unparse(kc_printer, view_count_attrs); int attrcount = gl_no_of_args; arguments attrs = gl_args; ac_identifier_list idents = gl_idents; kc::unparse(additional_members, kc_printer, view_count_attrs); gl_no_of_args += attrcount; gl_args = concat(gl_args, attrs); gl_idents = concat(gl_idents, idents); kc::unparse(a, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { const ID id = this->ID_1; const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; The_abstract_phylum_decl->additional_members->unparse(kc_printer, view_count_attrs); int attrcount = gl_no_of_args; arguments attrs = gl_args; ac_identifier_list idents = gl_idents; kc::unparse(additional_members, kc_printer, view_count_attrs); gl_no_of_args += attrcount; gl_args = concat(gl_args, attrs); gl_idents = concat(gl_idents, idents); kc::unparse(a, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_operatormap_subphyla_enum: { view_gen_operatormap_subphyla_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_operatormap_c_enum: { view_gen_operatormap_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const storageoption st_opt = this->storageoption_1; const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; const Ccode_option cco = this->Ccode_option_1; gl_phylum = id; gl_storageoption = st_opt; gl_atomicity = false; kc::unparse(a, kc_printer, kc_current_view); gl_phylum = 0; gl_storageoption = 0; } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const ID id = this->ID_1; const storageoption st_opt = this->storageoption_1; const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; const Ccode_option cco = this->Ccode_option_1; gl_phylum = id; gl_storageoption = st_opt; gl_atomicity = false; kc::unparse(a, kc_printer, kc_current_view); gl_phylum = 0; gl_storageoption = 0; } else if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { const ID id = this->ID_1; const storageoption st_opt = this->storageoption_1; const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; const Ccode_option cco = this->Ccode_option_1; gl_phylum = id; gl_storageoption = st_opt; gl_atomicity = true; kc::unparse(a, kc_printer, kc_current_view); gl_phylum = 0; gl_storageoption = 0; } else goto kc_unparsing_default; break; } case view_gen_phylummap_c_enum: { view_gen_phylummap_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const storageoption st_opt = this->storageoption_1; const productionblock pb = this->productionblock_1; const Ccode_option cco = this->Ccode_option_1; gl_phylum = id; { kc_printer(kc_t(" { \""), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("\", "), kc_current_view); } kc::unparse(pb, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(st_opt, kc_printer, kc_current_view); { kc_printer(kc_t(" },\ \n"), kc_current_view); } gl_phylum = 0; } else { const ID id = this->ID_1; const storageoption st_opt = this->storageoption_1; const productionblock pb = this->productionblock_1; const Ccode_option cco = this->Ccode_option_1; gl_phylum = id; { kc_printer(kc_t(" { \""), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("\", "), kc_current_view); } kc::unparse(pb, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(st_opt, kc_printer, kc_current_view); { kc_printer(kc_t(" },\ \n"), kc_current_view); } gl_phylum = 0; } break; } case view_gen_enumoperators_h_enum: { view_gen_enumoperators_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { const alternatives a = phylum_cast(this->productionblock_1)->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_enumphyla_h_enum: { view_gen_enumphyla_h_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; const productionblock productions = this->productionblock_1; { kc_printer(kc_t(" phylum_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" = "), kc_current_view); } kc::unparse(g_no_of_phyla, kc_printer, kc_current_view); { kc_printer(kc_t(",\ \n"), kc_current_view); } g_no_of_phyla++; } break; } case view_gen_deprecated_enum: { view_gen_deprecated_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; const productionblock productions = this->productionblock_1; { kc_printer(kc_t("#define kc_phylum_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" phylum_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n"), kc_current_view); } gl_phylum = id; kc::unparse(productions, kc_printer, kc_current_view); } break; } case view_check_uniq2_enum: { view_check_uniq2_class& kc_current_view=static_cast(kc_current_view_base); if ((this->storageoption_1->prod_sel() == sel_PositiveStorageOption) && (this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->storageoption_1->prod_sel() == sel_PositiveStorageOption) && (this->productionblock_1->prod_sel() == sel_ListAlternatives)) { } else if ((this->storageoption_1->prod_sel() == sel_PositiveStorageOption) && (this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { } else if ((this->storageoption_1->prod_sel() == sel_PositiveStorageOption) && (this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { } else if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; if (! this->marked) { v_report(NonFatal( FileLine( cl_storageID->file, cl_storageID->line ), Problem1S1ID1S1ID( "'uniq' declared phylum:", cl_uniqueID, "has non 'uniq' (transitive) subterm:", id) )); (this)->marked = 1; kc::unparse(this, kc_printer, view_check_uniq1); } } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const ID id = this->ID_1; if (! this->marked) { v_report(NonFatal( FileLine( cl_storageID->file, cl_storageID->line ), Problem1S1ID1S1ID( "'uniq' declared phylum:", cl_uniqueID, "has non 'uniq' (transitive) subterm:", id) )); (this)->marked = 1; kc::unparse(this, kc_printer, view_check_uniq1); } } else if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { } else goto kc_unparsing_default; break; } case view_check_uniq1_enum: { view_check_uniq1_class& kc_current_view=static_cast(kc_current_view_base); { const productionblock pb = this->productionblock_1; kc::unparse(pb, kc_printer, kc_current_view); } break; } case view_check_uniq_enum: { view_check_uniq_class& kc_current_view=static_cast(kc_current_view_base); if ((this->storageoption_1->prod_sel() == sel_NoStorageOption)) { const productionblock pb = this->productionblock_1; kc::unparse(pb, kc_printer, kc_current_view); } else if ((this->storageoption_1->prod_sel() == sel_NegativeStorageOption)) { } else if ((this->storageoption_1->prod_sel() == sel_PositiveStorageOption)) { const ID id = this->ID_1; const ID s_id = phylum_cast(this->storageoption_1)->ID_1; const productionblock pb = this->productionblock_1; this->marked = 1; cl_uniqueID = id; cl_storageID = s_id; kc::unparse(pb, kc_printer, view_check_uniq1); v_reset_phylumdeclaration_marks(); cl_uniqueID = 0; cl_storageID = 0; } else goto kc_unparsing_default; break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { } else if ((this->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { } else if ((this->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID id = this->ID_1; const productionblock a = this->productionblock_1; const Ccode_option cco = this->Ccode_option_1; if (f_something_to_initialize( cco )) { kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_initialize_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_x)\ \n{\ \n"), kc_current_view); } kc::unparse(cco, kc_printer, kc_current_view); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" return kc_x;\ \n}\ \n\ \n"), kc_current_view); } } kc::unparse(a, kc_printer, kc_current_view); } else if ((this->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const ID id = this->ID_1; const productionblock a = this->productionblock_1; const Ccode_option cco = this->Ccode_option_1; if (f_something_to_initialize( cco )) { kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_initialize_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_x)\ \n{\ \n"), kc_current_view); } kc::unparse(cco, kc_printer, kc_current_view); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" return kc_x;\ \n}\ \n\ \n"), kc_current_view); } } kc::unparse(a, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_check_count1_enum: { view_check_count1_class& kc_current_view=static_cast(kc_current_view_base); if ((this->productionblock_1->prod_sel() == sel_Emptyproductionblock)) { const ID id = this->ID_1; const storageoption stopt = this->storageoption_1; gl_phylum = id; kc::unparse(stopt, kc_printer, kc_current_view); gl_phylum = 0; v_report(NonFatal( NoFileLine(), Problem1S1ID( "no operators defined for phylum", id ))); } else { const ID id = this->ID_1; const storageoption stopt = this->storageoption_1; const productionblock pb = this->productionblock_1; gl_phylum = id; kc::unparse(stopt, kc_printer, kc_current_view); gl_phylum = 0; kc::unparse(pb, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const ID i = this->ID_1; const Ccode_option cco = this->Ccode_option_1; outmostoperators.push( Niloperators() ); dollarvarsallowed.push( DVAllowed() ); phylumstack.push( i ); kc::unparse(cco, kc_printer, kc_current_view); outmostoperators.top()->freelist(); outmostoperators.pop(); dollarvarsallowed.pop(); phylumstack.pop(); } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_storageoption_PositiveStorageOption::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_phylummap_c_enum: { view_gen_phylummap_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID sc = this->ID_1; kc::unparse(sc, kc_printer, kc_current_view); } break; } case view_check_count1_enum: { view_check_count1_class& kc_current_view=static_cast(kc_current_view_base); { const ID sc = this->ID_1; if (pg_storageclasseshavebeendefined) f_useoccurstorageclass( sc ); else v_extendoccur( sc, ITStorageClass() ); v_add_to_storageclasses( sc, gl_phylum ); } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; { kc_printer(kc_t("{ "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" } at "), kc_current_view); } kc::unparse(id->file, kc_printer, kc_current_view); { kc_printer(kc_t(":"), kc_current_view); } kc::unparse(id->line, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_storageoption_NegativeStorageOption::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_phylummap_c_enum: { view_gen_phylummap_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("kc_not_uniq"), kc_current_view); } } break; } case view_check_count1_enum: { view_check_count1_class& kc_current_view=static_cast(kc_current_view_base); { const ID sc = this->ID_1; if (pg_storageclasseshavebeendefined) f_useoccurstorageclass( sc ); else v_extendoccur( sc, ITStorageClass() ); v_add_to_storageclasses( sc, gl_phylum ); } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; { kc_printer(kc_t("{! "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" } at "), kc_current_view); } kc::unparse(id->file, kc_printer, kc_current_view); { kc_printer(kc_t(":"), kc_current_view); } kc::unparse(id->line, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_storageoption_NoStorageOption::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_phylummap_c_enum: { view_gen_phylummap_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("kc_not_uniq"), kc_current_view); } } break; } case view_check_count1_enum: { view_check_count1_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_storageclasses::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_operatordefs_c_2_enum: { view_gen_operatordefs_c_2_class& kc_current_view=static_cast(kc_current_view_base); { const ID sc = this->ID_1; const storageclasses r_sc = this->storageclasses_1; kc::unparse(r_sc, kc_printer, kc_current_view); { kc_printer(kc_t("&"), kc_current_view); } kc::unparse(sc, kc_printer, kc_current_view); { kc_printer(kc_t("_static_hashtable,\ \n"), kc_current_view); } } break; } case view_gen_operatordefs_c_1_enum: { view_gen_operatordefs_c_1_class& kc_current_view=static_cast(kc_current_view_base); if ((this->storageclasses_1->prod_sel() == sel_Nilstorageclasses)) { { kc_printer(kc_t("true"), kc_current_view); } } else { const storageclasses r_sc = this->storageclasses_1; kc::unparse(r_sc, kc_printer, kc_current_view); { kc_printer(kc_t(", true"), kc_current_view); } } break; } case view_gen_operatordefs_c_0_enum: { view_gen_operatordefs_c_0_class& kc_current_view=static_cast(kc_current_view_base); { const ID sc = this->ID_1; const storageclasses r_sc = this->storageclasses_1; kc::unparse(r_sc, kc_printer, kc_current_view); { kc_printer(kc_t("static hashtable_struct_t "), kc_current_view); } kc::unparse(sc, kc_printer, kc_current_view); { kc_printer(kc_t("_static_hashtable;\ \n"), kc_current_view); } } break; } case view_gen_operatordefs_c_enum: { view_gen_operatordefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->storageclasses_1->prod_sel() == sel_Nilstorageclasses)) { const ID sc = this->ID_1; { kc_printer(kc_t("\""), kc_current_view); } kc::unparse(sc, kc_printer, kc_current_view); { kc_printer(kc_t("\""), kc_current_view); } } else { const ID sc = this->ID_1; const storageclasses r_sc = this->storageclasses_1; kc::unparse(r_sc, kc_printer, kc_current_view); { kc_printer(kc_t(", \""), kc_current_view); } kc::unparse(sc, kc_printer, kc_current_view); { kc_printer(kc_t("\""), kc_current_view); } } break; } case view_gen_uniqmap_c_2_enum: { view_gen_uniqmap_c_2_class& kc_current_view=static_cast(kc_current_view_base); if ((this->storageclasses_1->prod_sel() == sel_Nilstorageclasses)) { const ID sc = this->ID_1; if (this->phyla->length() > 0) { { kc_printer(kc_t(" phylumstorageclass_"), kc_current_view); } kc::unparse(sc, kc_printer, kc_current_view); } else { { kc_printer(kc_t(" (KC_UNIQ_INFO)0"), kc_current_view); } } } else { const ID sc = this->ID_1; const storageclasses r_sc = this->storageclasses_1; kc::unparse(r_sc, kc_printer, kc_current_view); if (this->phyla->length() > 0) { { kc_printer(kc_t(",\ \n phylumstorageclass_"), kc_current_view); } kc::unparse(sc, kc_printer, kc_current_view); } else { { kc_printer(kc_t(",\ \n (KC_UNIQ_INFO)0"), kc_current_view); } } } break; } case view_gen_uniqmap_c_1_enum: { view_gen_uniqmap_c_1_class& kc_current_view=static_cast(kc_current_view_base); { const ID sc = this->ID_1; const storageclasses r_sc = this->storageclasses_1; kc::unparse(r_sc, kc_printer, kc_current_view); if (this->phyla->length() > 0) { { kc_printer(kc_t("static enum_phyla phylumstorageclass_"), kc_current_view); } kc::unparse(sc, kc_printer, kc_current_view); { kc_printer(kc_t("[] = { one_before_first_phylum, "), kc_current_view); } kc::unparse(this->phyla, kc_printer, kc_current_view); { kc_printer(kc_t("last_phylum };\ \n"), kc_current_view); } } } break; } case view_gen_uniqmap_c_enum: { view_gen_uniqmap_c_class& kc_current_view=static_cast(kc_current_view_base); { kc::unparse(this, kc_printer, view_gen_uniqmap_c_1); { kc_printer(kc_t("\ \nKC_UNIQ_INFO kc_UniqInfo[] = {\ \n"), kc_current_view); } kc::unparse(this, kc_printer, view_gen_uniqmap_c_2); { kc_printer(kc_t("\ \n};\ \n"), kc_current_view); } } break; } case view_gen_operatormap_type_h_enum: { view_gen_operatormap_type_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->storageclasses_1->prod_sel() == sel_Nilstorageclasses)) { const ID sc = this->ID_1; kc::unparse(sc, kc_printer, kc_current_view); } else { const ID sc = this->ID_1; const storageclasses r_sc = this->storageclasses_1; kc::unparse(r_sc, kc_printer, kc_current_view); { kc_printer(kc_t(",\ \n "), kc_current_view); } kc::unparse(sc, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (storageclasses iterator_ = this; iterator_->storageclasses_1 != 0; iterator_ = iterator_->storageclasses_1) iterator_->ID_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_storageclasses::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_operatordefs_c_2_enum: { view_gen_operatordefs_c_2_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatordefs_c_1_enum: { view_gen_operatordefs_c_1_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatordefs_c_0_enum: { view_gen_operatordefs_c_0_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatordefs_c_enum: { view_gen_operatordefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_uniqmap_c_2_enum: { view_gen_uniqmap_c_2_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_uniqmap_c_1_enum: { view_gen_uniqmap_c_1_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_uniqmap_c_enum: { view_gen_uniqmap_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatormap_type_h_enum: { view_gen_operatormap_type_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_productionblock_PredefinedAlternatives::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_c_enum: { view_gen_unparsedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_phylummap_c_enum: { view_gen_phylummap_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternatives_1->prod_sel() == sel_Consalternatives) && ((this->alternatives_1)->alternative_1->prod_sel() == sel_Alternative) && ((this->alternatives_1)->alternatives_1->prod_sel() == sel_Nilalternatives)) { const ID oid = phylum_cast((this->alternatives_1)->alternative_1)->ID_1; { kc_printer(kc_t("sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(", sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); } else if ((this->alternatives_1->prod_sel() == sel_Consalternatives) && ((this->alternatives_1)->alternative_1->prod_sel() == sel_Alternative)) { const ID oid = phylum_cast((this->alternatives_1)->alternative_1)->ID_1; const alternatives ra = (this->alternatives_1)->alternatives_1; { kc_printer(kc_t("sel_"), kc_current_view); } kc::unparse(ra, kc_printer, kc_current_view); { kc_printer(kc_t(", sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_deprecated_enum: { view_gen_deprecated_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives a = this->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } break; } case view_check_uniq1_enum: { view_check_uniq1_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives alt = this->alternatives_1; kc::unparse(alt, kc_printer, kc_current_view); } break; } case view_check_count1_enum: { view_check_count1_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_productionblock_NonlistAlternatives::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_classdefs_c_enum: { view_gen_classdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives alts = this->alternatives_1; kc::unparse(alts, kc_printer, kc_current_view); } break; } case view_gen_classdecls2_h_enum: { view_gen_classdecls2_h_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives alts = this->alternatives_1; kc::unparse(alts, kc_printer, kc_current_view); } break; } case view_gen_unparsedefs_c_enum: { view_gen_unparsedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives a = this->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } break; } case view_gen_rewritedefs_c_enum: { view_gen_rewritedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives a = this->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } break; } case view_gen_phylummap_c_enum: { view_gen_phylummap_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternatives_1->prod_sel() == sel_Consalternatives) && ((this->alternatives_1)->alternative_1->prod_sel() == sel_Alternative) && ((this->alternatives_1)->alternatives_1->prod_sel() == sel_Nilalternatives)) { const ID oid = phylum_cast((this->alternatives_1)->alternative_1)->ID_1; { kc_printer(kc_t("sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(", sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); } else if ((this->alternatives_1->prod_sel() == sel_Consalternatives) && ((this->alternatives_1)->alternative_1->prod_sel() == sel_Alternative)) { const ID oid = phylum_cast((this->alternatives_1)->alternative_1)->ID_1; const alternatives ra = (this->alternatives_1)->alternatives_1; { kc_printer(kc_t("sel_"), kc_current_view); } kc::unparse(ra, kc_printer, kc_current_view); { kc_printer(kc_t(", sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_deprecated_enum: { view_gen_deprecated_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives a = this->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } break; } case view_check_uniq1_enum: { view_check_uniq1_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives alt = this->alternatives_1; kc::unparse(alt, kc_printer, kc_current_view); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives a = this->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } break; } case view_check_count1_enum: { view_check_count1_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives alt = this->alternatives_1; kc::unparse(alt, kc_printer, kc_current_view); } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_productionblock_ListAlternatives::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_classdefs_c_enum: { view_gen_classdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_classdecls2_h_enum: { view_gen_classdecls2_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_unparsedefs_c_enum: { view_gen_unparsedefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternatives_1->prod_sel() == sel_Consalternatives) && ((this->alternatives_1)->alternative_1->prod_sel() == sel_Alternative) && ((this->alternatives_1)->alternatives_1->prod_sel() == sel_Consalternatives) && (((this->alternatives_1)->alternatives_1)->alternative_1->prod_sel() == sel_Alternative)) { const alternative consa = (this->alternatives_1)->alternative_1; const ID consid = phylum_cast((this->alternatives_1)->alternative_1)->ID_1; const alternative nila = ((this->alternatives_1)->alternatives_1)->alternative_1; const ID nilid = phylum_cast(((this->alternatives_1)->alternatives_1)->alternative_1)->ID_1; { kc_printer(kc_t("void\ \nimpl_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t("::do_unparse(printer_functor kc_printer, uview kc_current_view_base)\ \n{\ \n if(is_nil())\ \n nil_do_unparse(kc_printer, kc_current_view_base);\ \n else\ \n switch(kc_current_view_base) {\ \n"), kc_current_view); } unparseviewsinfo a_unparseviewsinfo = f_unparseviewsinfo_of_alternative( consa, Theuviewnames ); gl_operator = consid; kc::unparse(a_unparseviewsinfo, kc_printer, view_gen_unparsedefs_c); { kc_printer(kc_t(" }\ \n}\ \n\ \nvoid\ \nimpl_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t("::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base)\ \n{\ \n switch(kc_current_view_base) {\ \n"), kc_current_view); } freespineandelements(a_unparseviewsinfo); a_unparseviewsinfo = f_unparseviewsinfo_of_alternative( nila, Theuviewnames ); gl_operator = nilid; kc::unparse(a_unparseviewsinfo, kc_printer, view_gen_unparsedefs_c); { kc_printer(kc_t(" }\ \n}\ \n\ \n"), kc_current_view); } freespineandelements(a_unparseviewsinfo); } else goto kc_unparsing_default; break; } case view_gen_rewritedefs_c_enum: { view_gen_rewritedefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternatives_1->prod_sel() == sel_Consalternatives) && ((this->alternatives_1)->alternative_1->prod_sel() == sel_Alternative) && ((this->alternatives_1)->alternatives_1->prod_sel() == sel_Consalternatives)) { const alternative consa = (this->alternatives_1)->alternative_1; const ID oid = phylum_cast((this->alternatives_1)->alternative_1)->ID_1; const alternative nila = ((this->alternatives_1)->alternatives_1)->alternative_1; gl_phylum = f_phylumofoperator(oid); if(!g_options.rw_loop) { covariant_choice(gl_phylum, "", "abstract_phylum", kc_printer, kc_current_view); } else { { kc_printer(kc_t("abstract_phylum"), kc_current_view); } } { kc_printer(kc_t(" impl_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t("::"), kc_current_view); } if(f_rewrite_in_operatordecl(consa) || g_options.rw_loop) { { kc_printer(kc_t("do_"), kc_current_view); } } { kc_printer(kc_t("rewrite(rview kc_current_view_base)\ \n{\ \n if (is_nil()) {\ \n"), kc_current_view); } kc::unparse(nila, kc_printer, view_gen_rewritedefs_body_c); { kc_printer(kc_t(" } else { // not Nil, Cons\ \n"), kc_current_view); } kc::unparse(consa, kc_printer, view_gen_rewritedefs_body_c); { kc_printer(kc_t(" }\ \n}\ \n"), kc_current_view); } gl_phylum = 0; } else goto kc_unparsing_default; break; } case view_gen_phylummap_c_enum: { view_gen_phylummap_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternatives_1->prod_sel() == sel_Consalternatives) && ((this->alternatives_1)->alternative_1->prod_sel() == sel_Alternative) && ((this->alternatives_1)->alternatives_1->prod_sel() == sel_Nilalternatives)) { const ID oid = phylum_cast((this->alternatives_1)->alternative_1)->ID_1; { kc_printer(kc_t("sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(", sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); } else if ((this->alternatives_1->prod_sel() == sel_Consalternatives) && ((this->alternatives_1)->alternative_1->prod_sel() == sel_Alternative)) { const ID oid = phylum_cast((this->alternatives_1)->alternative_1)->ID_1; const alternatives ra = (this->alternatives_1)->alternatives_1; { kc_printer(kc_t("sel_"), kc_current_view); } kc::unparse(ra, kc_printer, kc_current_view); { kc_printer(kc_t(", sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_deprecated_enum: { view_gen_deprecated_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives a = this->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } break; } case view_check_uniq1_enum: { view_check_uniq1_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives alt = this->alternatives_1; kc::unparse(alt, kc_printer, kc_current_view); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives a = this->alternatives_1; kc::unparse(a, kc_printer, kc_current_view); } break; } case view_check_count1_enum: { view_check_count1_class& kc_current_view=static_cast(kc_current_view_base); { const alternatives alt = this->alternatives_1; kc::unparse(alt, kc_printer, kc_current_view); } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_productionblock_Emptyproductionblock::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_phylummap_c_enum: { view_gen_phylummap_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_uniq1_enum: { view_check_uniq1_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_alternatives::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_set_subphylumdefs_c_enum: { view_gen_set_subphylumdefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative) && (phylum_cast(this->alternative_1)->arguments_1->prod_sel() == sel_Nilarguments)) { const alternatives ra = this->alternatives_1; kc::unparse(ra, kc_printer, kc_current_view); } else if ((this->alternative_1->prod_sel() == sel_Alternative)) { const ID oid = phylum_cast(this->alternative_1)->ID_1; const arguments args = phylum_cast(this->alternative_1)->arguments_1; const alternatives ra = this->alternatives_1; ID id = f_phylumofoperator(oid); { kc_printer(kc_t("void impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("::set_subphylum(int no, abstract_phylum val)\ \n{\ \n abstract_phylum newval=0;\ \n switch(no) {\ \n"), kc_current_view); } gl_no_of_args = 0; kc::unparse(args, kc_printer, kc_current_view); { kc_printer(kc_t(" }\ \n assertNonNull(newval);\ \n}\ \n"), kc_current_view); } kc::unparse(ra, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_subphylumdefs_c_enum: { view_gen_subphylumdefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative) && (phylum_cast(this->alternative_1)->arguments_1->prod_sel() == sel_Nilarguments)) { const alternatives ra = this->alternatives_1; kc::unparse(ra, kc_printer, kc_current_view); } else if ((this->alternative_1->prod_sel() == sel_Alternative)) { const ID oid = phylum_cast(this->alternative_1)->ID_1; const arguments args = phylum_cast(this->alternative_1)->arguments_1; const alternatives ra = this->alternatives_1; ID id = f_phylumofoperator(oid); { kc_printer(kc_t("abstract_phylum impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("::subphylum(int no) const\ \n{\ \n switch(no){\ \n"), kc_current_view); } gl_no_of_args = 0; kc::unparse(args, kc_printer, kc_current_view); { kc_printer(kc_t(" }\ \n return 0;\ \n}\ \n"), kc_current_view); } kc::unparse(ra, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_classdefs_c_enum: { view_gen_classdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const alternative alt = this->alternative_1; const alternatives ra = this->alternatives_1; kc::unparse(alt, kc_printer, kc_current_view); kc::unparse(ra, kc_printer, kc_current_view); } break; } case view_gen_classdecls2_h_enum: { view_gen_classdecls2_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative)) { const alternative alt = this->alternative_1; const ID oid = phylum_cast(this->alternative_1)->ID_1; const alternatives ra = this->alternatives_1; kc::unparse(alt, kc_printer, kc_current_view); kc::unparse(alt, kc_printer, view_gen_nodetypes_h); ID pid = f_phylumofoperator(oid); if (f_ispredefinedphylum(pid)) { f_phylumdeclofid(pid)->additional_members->unparse(kc_printer, view_gen_member_dcl_h); } kc::unparse(alt->additional_members, kc_printer, view_gen_member_dcl_h); gl_operator = 0; if(!g_options.no_unparse) { { kc_printer(kc_t("\rprivate:\v\ \n void do_unparse(printer_functor, uview);\n"), kc_current_view); } } { kc_printer(kc_t("};\ \n"), kc_current_view); } kc::unparse(ra, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_attributeOf_function_enum: { view_gen_attributeOf_function_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative)) { const alternative a = this->alternative_1; const ID oid = phylum_cast(this->alternative_1)->ID_1; const alternatives ra = this->alternatives_1; kc::unparse(ra, kc_printer, kc_current_view); int attrcount = gl_no_of_args; arguments attrs = gl_args; ac_identifier_list idents = gl_idents; a->additional_members->unparse(kc_printer, view_count_attrs); gl_no_of_args += attrcount; gl_args = concat(gl_args, attrs); gl_idents = concat(gl_idents, idents); gl_operator=oid; if (gl_no_of_args) { { kc_printer(kc_t("case sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(": switch(no) {\n"), kc_current_view); } kc::unparse(gl_args, kc_printer, kc_current_view); { kc_printer(kc_t("}\ \n "), kc_current_view); } } gl_no_of_args=attrcount; gl_args=attrs; gl_idents=idents; } else goto kc_unparsing_default; break; } case view_gen_create_function_enum: { view_gen_create_function_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative)) { const alternative alt = this->alternative_1; const ID oid = phylum_cast(this->alternative_1)->ID_1; const arguments args = phylum_cast(this->alternative_1)->arguments_1; const alternatives ra = this->alternatives_1; { kc_printer(kc_t(" \rcase sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(":\v\ \n return "), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(args, kc_printer, kc_current_view); { kc_printer(kc_t(");\ \n"), kc_current_view); } kc::unparse(ra, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_operatordefs_hash_c_enum: { view_gen_operatordefs_hash_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative)) { const alternative alt = this->alternative_1; const ID oid = phylum_cast(this->alternative_1)->ID_1; const arguments args = phylum_cast(this->alternative_1)->arguments_1; const alternatives ra = this->alternatives_1; kc::unparse(ra, kc_printer, kc_current_view); gl_isnotlist = f_listelementphylum(gl_phylum)->eq(f_emptyId()); gl_operator = oid; gl_args=args; kc::unparse(args, kc_printer, view_count_args); if(f_constructors_in_operatordecl(alt)) { kc::unparse(alt->additional_members, kc_printer, kc_current_view); } else { fndeclarations _fd = Consfndeclarations(FnAcDeclaration(Nilac_declaration_specifiers(), AcDeclarator(Nopointer(), AcNoRef(), AcQualifiedDeclProto(Nilac_class_qualifier_list(), AcDirectDeclId(oid), AcParList(Nilac_parameter_list()), AcNoQualifier())), Nilac_declaration_list(), AcNoBaseInit(), NilCtext(), Id(Str(mkcasestring(""))), ConstructorFn()), Nilfndeclarations()); UNPARSE(_fd); _fd->free(false); } gl_args=0; gl_operator = 0; gl_isnotlist = true; } else goto kc_unparsing_default; break; } case view_gen_operatordefs_nonhash_c_enum: { view_gen_operatordefs_nonhash_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative)) { const alternative alt = this->alternative_1; const ID oid = phylum_cast(this->alternative_1)->ID_1; const arguments args = phylum_cast(this->alternative_1)->arguments_1; const alternatives ra = this->alternatives_1; kc::unparse(ra, kc_printer, kc_current_view); gl_isnotlist = f_listelementphylum(gl_phylum)->eq(f_emptyId()); gl_operator = oid; gl_args=args; kc::unparse(args, kc_printer, view_count_args); if(f_constructors_in_operatordecl(alt)) { kc::unparse(alt->additional_members, kc_printer, kc_current_view); } else { fndeclarations _fd = Consfndeclarations(FnAcDeclaration(Nilac_declaration_specifiers(), AcDeclarator(Nopointer(), AcNoRef(), AcQualifiedDeclProto(Nilac_class_qualifier_list(), AcDirectDeclId(oid), AcParList(Nilac_parameter_list()), AcNoQualifier())), Nilac_declaration_list(), AcNoBaseInit(), NilCtext(), Id(Str(mkcasestring(""))), ConstructorFn()), Nilfndeclarations()); UNPARSE(_fd); _fd->free(false); } gl_args=0; gl_operator = 0; gl_isnotlist = true; } else goto kc_unparsing_default; break; } case view_gen_operatorcast_h_enum: { view_gen_operatorcast_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative)) { const alternative alt = this->alternative_1; const ID oid = phylum_cast(this->alternative_1)->ID_1; const arguments args = phylum_cast(this->alternative_1)->arguments_1; const alternatives ra = this->alternatives_1; kc::unparse(ra, kc_printer, kc_current_view); if(f_constructors_in_operatordecl(alt)) { gl_args=args; v_report(NonFatal( NoFileLine(), Problem1S( "internal error: experimental operator_cast<>() unlikely to work with user-defined constructors" ))); kc::unparse(args, kc_printer, view_count_args); kc::unparse(alt->additional_members, kc_printer, kc_current_view); gl_args=0; } else { ID pid = f_phylumofoperator(oid); { kc_printer(kc_t("template \ \n class "), kc_current_view); } kc::unparse(oid, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("*\ \n operator_cast("), kc_current_view); } kc::unparse(pid, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_p)\ \n {\ \n if (kc_f!="), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(" || kc_p->prod_sel()!=sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(")\ \n throw std::bad_cast();\ \n return static_cast(kc_p);\ \n }\n\n"), kc_current_view); } } } else goto kc_unparsing_default; break; } case view_gen_operatordecls_h_enum: { view_gen_operatordecls_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative)) { const alternative alt = this->alternative_1; const ID oid = phylum_cast(this->alternative_1)->ID_1; const arguments args = phylum_cast(this->alternative_1)->arguments_1; const alternatives ra = this->alternatives_1; kc::unparse(ra, kc_printer, kc_current_view); if(f_constructors_in_operatordecl(alt)) { gl_args=args; kc::unparse(args, kc_printer, view_count_args); kc::unparse(alt->additional_members, kc_printer, kc_current_view); gl_args=0; } else { { kc_printer(kc_t("class "), kc_current_view); } kc::unparse(oid, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("*\b "), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(" ("), kc_current_view); } kc::unparse(args, kc_printer, kc_current_view); { kc_printer(kc_t(");\n"), kc_current_view); } } } else goto kc_unparsing_default; break; } case view_gen_operatormap_attributes_enum: { view_gen_operatormap_attributes_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative)) { const alternative a = this->alternative_1; const ID oid = phylum_cast(this->alternative_1)->ID_1; const alternatives ra = this->alternatives_1; kc::unparse(ra, kc_printer, kc_current_view); int attrcount = gl_no_of_args; arguments attrs = gl_args; ac_identifier_list idents = gl_idents; a->additional_members->unparse(kc_printer, view_count_attrs); gl_no_of_args += attrcount; gl_args = concat(gl_args, attrs); gl_idents = concat(gl_idents, idents); if (gl_no_of_args) { { kc_printer(kc_t("static enum_phyla kc_attrs_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("[] = { "), kc_current_view); } kc::unparse(gl_args, kc_printer, view_gen_operatormap_subphyla); { kc_printer(kc_t(" };\ \n "), kc_current_view); } } gl_no_of_args=attrcount; gl_args=attrs; gl_idents=idents; } else goto kc_unparsing_default; break; } case view_gen_operatormap_subphyla_enum: { view_gen_operatormap_subphyla_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative)) { const ID oid = phylum_cast(this->alternative_1)->ID_1; const arguments args = phylum_cast(this->alternative_1)->arguments_1; const alternatives ra = this->alternatives_1; kc::unparse(ra, kc_printer, kc_current_view); kc::unparse(args, kc_printer, view_count_args); if (gl_no_of_args) { { kc_printer(kc_t("static enum_phyla kc_subphyla_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("[] = { "), kc_current_view); } kc::unparse(args, kc_printer, kc_current_view); { kc_printer(kc_t(" };\ \n "), kc_current_view); } } } else goto kc_unparsing_default; break; } case view_gen_operatormap_c_enum: { view_gen_operatormap_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative)) { const alternative alt = this->alternative_1; const ID oid = phylum_cast(this->alternative_1)->ID_1; const arguments args = phylum_cast(this->alternative_1)->arguments_1; const alternatives ra = this->alternatives_1; kc::unparse(ra, kc_printer, kc_current_view); kc::unparse(args, kc_printer, view_count_args); { kc_printer(kc_t(" { \""), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("\", "), kc_current_view); } kc::unparse(gl_no_of_args, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } if (gl_atomicity) { { kc_printer(kc_t("true"), kc_current_view); } } else { { kc_printer(kc_t("false"), kc_current_view); } } { kc_printer(kc_t(", phylum_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } if (gl_no_of_args>0) { { kc_printer(kc_t("kc_subphyla_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } } else { { kc_printer(kc_t("0, "), kc_current_view); } } The_abstract_phylum_decl->additional_members->unparse(kc_printer, view_count_attrs); int attrcount = gl_no_of_args; f_phylumdeclofid(f_phylumofoperator(oid))->additional_members->unparse(kc_printer, view_count_attrs); attrcount += gl_no_of_args; alt->additional_members->unparse(kc_printer, view_count_attrs); gl_no_of_args += attrcount; kc::unparse(gl_no_of_args, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } if (gl_no_of_args>0) { { kc_printer(kc_t("kc_attrs_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); } else { { kc_printer(kc_t("0"), kc_current_view); } } { kc_printer(kc_t(", sizeof("), kc_current_view); } kc::unparse(oid, kc_printer, view_class_of_op); { kc_printer(kc_t(") },\n"), kc_current_view); } } else goto kc_unparsing_default; break; } case view_gen_phylummap_c_enum: { view_gen_phylummap_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative) && (this->alternatives_1->prod_sel() == sel_Nilalternatives)) { const ID oid = phylum_cast(this->alternative_1)->ID_1; kc::unparse(oid, kc_printer, kc_current_view); } else { const alternatives ra = this->alternatives_1; kc::unparse(ra, kc_printer, kc_current_view); } break; } case view_gen_enumoperators_h_enum: { view_gen_enumoperators_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternatives_1->prod_sel() == sel_Nilalternatives)) { const alternative a = this->alternative_1; kc::unparse(a, kc_printer, kc_current_view); } else { const alternative a = this->alternative_1; const alternatives as = this->alternatives_1; kc::unparse(as, kc_printer, kc_current_view); kc::unparse(a, kc_printer, kc_current_view); } break; } case view_gen_deprecated_enum: { view_gen_deprecated_class& kc_current_view=static_cast(kc_current_view_base); { const alternative a = this->alternative_1; const alternatives as = this->alternatives_1; kc::unparse(as, kc_printer, kc_current_view); kc::unparse(a, kc_printer, kc_current_view); } break; } case view_check_uniq1_enum: { view_check_uniq1_class& kc_current_view=static_cast(kc_current_view_base); { const alternative a = this->alternative_1; const alternatives ralts = this->alternatives_1; kc::unparse(ralts, kc_printer, kc_current_view); kc::unparse(a, kc_printer, kc_current_view); } break; } case view_check_count1_enum: { view_check_count1_class& kc_current_view=static_cast(kc_current_view_base); if ((this->alternative_1->prod_sel() == sel_Alternative)) { const alternative alt = this->alternative_1; const ID id = phylum_cast(this->alternative_1)->ID_1; const arguments args = phylum_cast(this->alternative_1)->arguments_1; const alternatives ralts = this->alternatives_1; kc::unparse(ralts, kc_printer, kc_current_view); kc::unparse(args, kc_printer, kc_current_view); v_resetcount(); } else goto kc_unparsing_default; break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (alternatives iterator_ = this; iterator_->alternatives_1 != 0; iterator_ = iterator_->alternatives_1) iterator_->alternative_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_alternatives::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_classdefs_c_enum: { view_gen_classdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_classdecls2_h_enum: { view_gen_classdecls2_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_attributeOf_function_enum: { view_gen_attributeOf_function_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatorcast_h_enum: { view_gen_operatorcast_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatordecls_h_enum: { view_gen_operatordecls_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatormap_attributes_enum: { view_gen_operatormap_attributes_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatormap_subphyla_enum: { view_gen_operatormap_subphyla_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatormap_c_enum: { view_gen_operatormap_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_phylummap_c_enum: { view_gen_phylummap_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_deprecated_enum: { view_gen_deprecated_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_uniq1_enum: { view_check_uniq1_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_count1_enum: { view_check_count1_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_alternative_Alternative::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_classdefs_c_enum: { view_gen_classdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const alternative alt = this/**/; const ID oid = this->ID_1; const arguments args = this->arguments_1; gl_operator=oid; enum_operators kc_i = f_selofoperator(gl_operator); bool priorAssignments=false; if(kc_i!=sel_NoCaseStr && kc_i!=sel__Str) { if(!f_constructors_in_operatordecl(alt)) { kc::unparse(oid, kc_printer, view_class_of_op); { kc_printer(kc_t("::"), kc_current_view); } kc::unparse(oid, kc_printer, view_class_of_op); { kc_printer(kc_t("("), kc_current_view); } if (f_ispredefinedphylum(gl_phylum)) { kc::unparse(args, kc_printer, view_gen_fnarg_and_decls_predef); } else { kc::unparse(args, kc_printer, view_gen_fnarg_and_decls); } { kc_printer(kc_t(")\n\v"), kc_current_view); } if (f_ispredefinedphylum(gl_phylum)) { PRINT(priorAssignments ? ", " : ": "); priorAssignments=true; kc::unparse(args, kc_printer, view_gen_assignments_predef_ini); } else if (args->length()>0) { PRINT(priorAssignments ? ", " : ": "); priorAssignments=true; kc::unparse(args, kc_printer, view_gen_assignment_inis); } kc::unparse(additional_members, kc_printer, view_count_nonstaticmembers); if (gl_no_of_args) { PRINT(priorAssignments ? ", " : ": "); kc::unparse(gl_members, kc_printer, view_gen_user_assignment_inis); } { kc_printer(kc_t(" { }\r\n"), kc_current_view); } } } } break; } case view_gen_classdecls2_h_enum: { view_gen_classdecls2_h_class& kc_current_view=static_cast(kc_current_view_base); { const alternative alt = this/**/; const ID oid = this->ID_1; const arguments args = this->arguments_1; ID id = f_phylumofoperator(oid); gl_operator = oid; { kc_printer(kc_t("class "), kc_current_view); } if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } { kc_printer(kc_t("impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t(":"), kc_current_view); } { baseclass_list kc_selvar_0_1 = phylum_cast(alt->base_classes); if ((kc_selvar_0_1->prod_sel() == sel_Consbaseclass_list)) { UNPARSE(alt->base_classes); } else { if (f_ispredefinedphylum(id)) { PRINT("public impl_abstract_phylum"); } else { PRINT("public impl_"); UNPARSE(id); } } } { kc_printer(kc_t("{\ \n\rpublic:\v\ \n enum_operators prod_sel() const\ \n \v{ return sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("; }\r\ \n"), kc_current_view); } if (f_ispredefinedphylum(id)) { { kc_printer(kc_t(" static const enum_phyla phylum_sel_;\n"), kc_current_view); } } enum_operators kc_i = f_selofoperator(gl_operator); if(kc_i!=sel_NoCaseStr && kc_i!=sel__Str) { if(!f_constructors_in_operatordecl(alt)) { { kc_printer(kc_t("explicit impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } if (f_ispredefinedphylum(id)) { kc::unparse(args, kc_printer, view_gen_fnarg_and_decls_predef); } else { kc::unparse(args, kc_printer, view_gen_operatordecls_h); } { kc_printer(kc_t(");\ \n "), kc_current_view); } } } else { { kc_printer(kc_t("\rprivate:\v\ \n explicit impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("(const kc_char_t*);\ \n void make_own(int length);\ \n friend "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" mk"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("(const kc_char_t*, int);\ \n\rpublic:\v\ \n ~impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("() {\ \n #if defined (_MSC_VER) && _MSC_VER<1300\ \n delete [] (kc_char_t*)name;\ \n #else\ \n delete [] name;\ \n #endif\ \n }\ \n"), kc_current_view); } } if(args->length()!=0) { { kc_printer(kc_t(" abstract_phylum subphylum(int) const;\ \n void set_subphylum(int, abstract_phylum);\ \n"), kc_current_view); } } if (!g_options.no_printdot && f_ispredefinedphylum(id)) { { kc_printer(kc_t("void fprintdot( FILE*, const char*, const char*, const char*, bool, bool, bool ) const;\n"), kc_current_view); } } if (!g_options.no_rewrite) { if (!g_options.rw_loop) { if (!f_ispredefinedphylum(id)) { if(!f_rewrite_in_operatordecl(alt)) covariant_choice(id, " rewrite( rview );", "abstract_phylum rewrite( rview );", kc_printer, kc_current_view); else covariant_choice(id, " do_rewrite( rview );", "abstract_phylum do_rewrite( rview );", kc_printer, kc_current_view); } else { covariant_choice(id, " rewrite( rview )", "abstract_phylum rewrite( rview )", kc_printer, kc_current_view); { kc_printer(kc_t("\n\v{ return this; }\r"), kc_current_view); } } } else { if (!f_ispredefinedphylum(id)) { { kc_printer(kc_t("abstract_phylum do_rewrite( rview );"), kc_current_view); } } } } { kc_printer(kc_t("\n"), kc_current_view); } if (g_options.smart_pointer) { if(f_ispredefinedphylum(id)) { { kc_printer(kc_t("abstract_phylum_ref* new_phylum_ref() {\ \n return new phylum_ref(this);\ \n }\ \n impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("& operator=(const impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("& p) {\ \n phylum_ref* my_ref=static_cast*>(get_ref());\ \n "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" self=this;\ \n if(my_ref) {\ \n abstract_phylum_ref* ref=p.get_ref();\ \n self=const_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(&p);\ \n if(ref)\ \n self=phylum_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(self->copy(true));\ \n my_ref->set_phylum(self);\ \n }\ \n return *self;\ \n }\ \n"), kc_current_view); } kc::unparse(id, kc_printer, view_class_of_phy); { kc_printer(kc_t("& operator=(const phylum_ref<"), kc_current_view); } kc::unparse(id, kc_printer, view_class_of_phy); { kc_printer(kc_t(">& r) {\ \n phylum_ref<"), kc_current_view); } kc::unparse(id, kc_printer, view_class_of_phy); { kc_printer(kc_t(">* my_ref=static_cast*>(get_ref());\ \n "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" self=this;\ \n if(my_ref) {\ \n self=phylum_cast<"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(">(r.get_phylum()?r.get_phylum()->copy(true):0);\ \n my_ref->set_phylum(self);\ \n }\ \n return *self;\ \n }\ \n "), kc_current_view); } } else { kc::unparse(id, kc_printer, view_class_of_phy); { kc_printer(kc_t("& operator=(const impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("& p) {\ \n return "), kc_current_view); } kc::unparse(id, kc_printer, view_class_of_phy); { kc_printer(kc_t("::operator=(p);\ \n }\ \n impl_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("& operator=(const phylum_ref& r) {\ \n return "), kc_current_view); } kc::unparse(id, kc_printer, view_class_of_phy); { kc_printer(kc_t("::operator=(r);\ \n }\ \n "), kc_current_view); } } kc::unparse(oid, kc_printer, view_class_of_op); { kc_printer(kc_t("* return_ptr() { if(get_ref()) get_ref()->lock(); return this; }\n"), kc_current_view); } } } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const arguments args = this->arguments_1; { kc_printer(kc_t(" {\ \n"), kc_current_view); } kc::unparse(args, kc_printer, kc_current_view); { kc_printer(kc_t(" }\ \n"), kc_current_view); } } break; } case view_gen_unparsedefs_c_enum: { view_gen_unparsedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID oid = this->ID_1; unparseviewsinfo a_unparseviewsinfo = f_unparseviewsinfo_of_alternative( this, Theuviewnames ); gl_phylum = f_phylumofoperator(oid); gl_operator = oid; gl_unparse_goto_used = false; kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t("void\ \nimpl_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("::do_unparse(printer_functor kc_printer, uview kc_current_view_base)\ \n{\ \n switch(kc_current_view_base) {\ \n"), kc_current_view); } kc::unparse(a_unparseviewsinfo, kc_printer, view_gen_unparsedefs_c); { kc_printer(kc_t(" }\ \n}\ \n\ \n"), kc_current_view); } freespineandelements(a_unparseviewsinfo); gl_phylum = 0; } break; } case view_gen_rewritedefs_body_c_enum: { view_gen_rewritedefs_body_c_class& kc_current_view=static_cast(kc_current_view_base); { const alternative alt = this/**/; const ID oid = this->ID_1; const arguments args = this->arguments_1; rewriteviewsinfo a_rewriteviewsinfo = f_rewriteviewsinfo_of_alternative( alt, Therviewnames ); gl_operator = oid; gl_alternative = alt; gl_rewrite_goto_used = false; args->unparse(kc_printer, view_gen_rewritedefs_rewritearg_c); bool empty=true; { rewriteviewsinfo kc_fe_selvar_1 = a_rewriteviewsinfo; while( kc_fe_selvar_1->prod_sel() == sel_Consrewriteviewsinfo ) { rewriteviewinfo kc_selvar_0_1 = kc_fe_selvar_1->rewriteviewinfo_1; { { { const rewriteviewinfo rvi = kc_selvar_0_1; { rewriteviewinfo kc_selvar_1_1 = phylum_cast(rvi); if ((kc_selvar_1_1->prod_sel() == sel_Rewriteviewinfo) && (phylum_cast(kc_selvar_1_1)->rewriterulesinfo_1->prod_sel() == sel_Nilrewriterulesinfo)) { } else { empty=false; } } } } } kc_fe_selvar_1 = kc_fe_selvar_1->rewriteviewsinfo_1; } } if(!empty) { PRINT(" switch(kc_current_view_base) {\n"); a_rewriteviewsinfo->unparse(kc_printer, view_gen_rewritedefs_c); PRINT(" }\n"); } kc::unparse(args, kc_printer, view_gen_rewritedefs_testarg_c); freespineandelements(a_rewriteviewsinfo); gl_operator = 0; gl_alternative = 0; } break; } case view_gen_rewritedefs_other_c_enum: { view_gen_rewritedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; const arguments args = this->arguments_1; if (! gl_rewrite_rewriteinfo->eq( Nilrewriterulesinfo())) { gl_args=args; kc::unparse(gl_rewrite_rewriteinfo, kc_printer, kc_current_view); gl_args = 0; } } break; } case view_gen_rewritedefs_default_c_enum: { view_gen_rewritedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; const arguments args = this->arguments_1; gl_args=args; kc::unparse(gl_rewrite_rewriteinfo, kc_printer, kc_current_view); gl_args = 0; } break; } case view_gen_rewritedefs_c_enum: { view_gen_rewritedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const alternative alt = this/**/; const ID oid = this->ID_1; const arguments args = this->arguments_1; gl_phylum = f_phylumofoperator(oid); if(!g_options.rw_loop) { covariant_choice(gl_phylum, "", "abstract_phylum", kc_printer, kc_current_view); } else { { kc_printer(kc_t("abstract_phylum"), kc_current_view); } } { kc_printer(kc_t(" impl_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("::"), kc_current_view); } if(f_rewrite_in_operatordecl(alt) || g_options.rw_loop) { { kc_printer(kc_t("do_"), kc_current_view); } } { kc_printer(kc_t("rewrite(rview kc_current_view_base)\ \n{\ \n"), kc_current_view); } kc::unparse(this, kc_printer, view_gen_rewritedefs_body_c); { kc_printer(kc_t("\ \n}\ \n"), kc_current_view); } gl_phylum = 0; } break; } case view_gen_listdecls_h_enum: { view_gen_listdecls_h_class& kc_current_view=static_cast(kc_current_view_base); { const ID oid = this->ID_1; ID id = f_phylumofoperator(oid); ID el = f_listelementphylum(id); if (!el->eq(f_emptyId())) { { kc_printer(kc_t("// TODO: Is this code ever generated?\n"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" map("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" (*)("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("));\n"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" filter( bool (*)("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("));\n"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" merge( "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" (*)("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("));\n"), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" reduce( "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" neutral, "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(" (*)("), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(el, kc_printer, kc_current_view); { kc_printer(kc_t("));\n"), kc_current_view); } } } break; } case view_gen_nodetypes_h_enum: { view_gen_nodetypes_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->arguments_1->prod_sel() == sel_Nilarguments)) { const ID oid = this->ID_1; if (f_ispredefinedphylum(f_phylumofoperator(oid))) { enum_operators kc_i = f_selofoperator(oid); { kc_printer(kc_t(" "), kc_current_view); } PRINT(preDefTypeAndName[kc_i][0]); { kc_printer(kc_t(" "), kc_current_view); } PRINT(preDefTypeAndName[kc_i][1]); { kc_printer(kc_t(";\ \n"), kc_current_view); } } else { } } else { const ID oid = this->ID_1; const arguments args = this->arguments_1; kc::unparse(args, kc_printer, kc_current_view); } break; } case view_gen_enumoperators_h_enum: { view_gen_enumoperators_h_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; { kc_printer(kc_t(" sel_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" = "), kc_current_view); } kc::unparse(g_no_of_operators, kc_printer, kc_current_view); { kc_printer(kc_t(",\ \n"), kc_current_view); } g_no_of_operators++; } break; } case view_gen_deprecated_enum: { view_gen_deprecated_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; { kc_printer(kc_t("#define kc_tag_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" impl_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n"), kc_current_view); } } break; } case view_check_uniq1_enum: { view_check_uniq1_class& kc_current_view=static_cast(kc_current_view_base); { const arguments args = this->arguments_1; kc::unparse(args, kc_printer, kc_current_view); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; kc::unparse(additional_members, kc_printer, view_count_attrs); if (gl_no_of_args) { { kc_printer(kc_t("void kc_initialize_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("()\ \n {\n"), kc_current_view); } { kc_printer(kc_t("}\n"), kc_current_view); } } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_arguments::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_argseqnr_rec_enum: { view_gen_argseqnr_rec_class& kc_current_view=static_cast(kc_current_view_base); if ((this->arguments_1->prod_sel() == sel_Nilarguments)) { const ID a = this->ID_1; { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); } else { const ID a = this->ID_1; const arguments ra = this->arguments_1; kc::unparse(ra, kc_printer, kc_current_view); { kc_printer(kc_t(", _"), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); } break; } case view_gen_set_subphylumdefs_c_enum: { view_gen_set_subphylumdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID a = this->ID_1; const arguments ra = this->arguments_1; kc::unparse(ra, kc_printer, kc_current_view); { kc_printer(kc_t("case "), kc_current_view); } kc::unparse(gl_no_of_args, kc_printer, kc_current_view); { kc_printer(kc_t(": newval = "), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); { kc_printer(kc_t(" = dynamic_cast<"), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t(">(val);break;\n"), kc_current_view); } gl_no_of_args++; } break; } case view_gen_subphylumdefs_c_enum: { view_gen_subphylumdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID a = this->ID_1; const arguments ra = this->arguments_1; kc::unparse(ra, kc_printer, kc_current_view); { kc_printer(kc_t("case "), kc_current_view); } kc::unparse(gl_no_of_args, kc_printer, kc_current_view); { kc_printer(kc_t(": return "), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); { kc_printer(kc_t(";\n"), kc_current_view); } gl_no_of_args++; } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->arguments_1->prod_sel() == sel_Consarguments) && ((this->arguments_1)->arguments_1->prod_sel() == sel_Nilarguments) && (KC_TRACE_PROVIDED((kc_current_view.isList && kc_current_view.isOnlyDefault), "gen.k", 7429, this))) { const ID tail = this->ID_1; const ID head = (this->arguments_1)->ID_1; { kc_printer(kc_t(" for ("), kc_current_view); } kc::unparse(tail, kc_printer, kc_current_view); { kc_printer(kc_t(" iterator_ = this; iterator_->"), kc_current_view); } kc::unparse(tail, kc_printer, kc_current_view); { kc_printer(kc_t("_1 != 0; iterator_ = iterator_->"), kc_current_view); } kc::unparse(tail, kc_printer, kc_current_view); { kc_printer(kc_t("_1)\ \n \viterator_->"), kc_current_view); } kc::unparse(head, kc_printer, kc_current_view); { kc_printer(kc_t("_1->unparse(kc_printer, kc_current_view);\r\ \n"), kc_current_view); } } else if ((KC_TRACE_PROVIDED((kc_current_view.isList && !kc_current_view.isOnlyDefault), "gen.k", 7438, this))) { const ID a = this->ID_1; const arguments rargs = this->arguments_1; kc::unparse(rargs, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); { kc_printer(kc_t("->"), kc_current_view); } if (a->eq(f_phylumofoperator(gl_operator)) && kc_current_view.isList) { { kc_printer(kc_t("do_"), kc_current_view); } } { kc_printer(kc_t("unparse(kc_printer, kc_current_view );\ \n"), kc_current_view); } } else { { kc_printer(kc_t("default_unparse(kc_printer, kc_current_view );\ \n"), kc_current_view); } } break; } case view_gen_rewritedefs_args_c_enum: { view_gen_rewritedefs_args_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->arguments_1->prod_sel() == sel_Nilarguments)) { const ID a_arg = this->ID_1; if (!g_options.rw_loop) { { kc_printer(kc_t("l_"), kc_current_view); } } kc::unparse(a_arg, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); } else { const ID a_arg = this->ID_1; const arguments r_args = this->arguments_1; kc::unparse(r_args, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } if (!g_options.rw_loop) { { kc_printer(kc_t("l_"), kc_current_view); } } kc::unparse(a_arg, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); } break; } case view_gen_rewritedefs_dotestarg_c_enum: { view_gen_rewritedefs_dotestarg_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->arguments_1->prod_sel() == sel_Nilarguments)) { const ID a_arg = this->ID_1; { kc_printer(kc_t("l_"), kc_current_view); } kc::unparse(a_arg, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); { kc_printer(kc_t(" == "), kc_current_view); } kc::unparse(a_arg, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); } else { const ID a_arg = this->ID_1; const arguments r_args = this->arguments_1; kc::unparse(r_args, kc_printer, kc_current_view); { kc_printer(kc_t(") && (l_"), kc_current_view); } kc::unparse(a_arg, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); { kc_printer(kc_t(" == "), kc_current_view); } kc::unparse(a_arg, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); } break; } case view_gen_rewritedefs_testarg_c_enum: { view_gen_rewritedefs_testarg_c_class& kc_current_view=static_cast(kc_current_view_base); { gl_phylum = f_phylumofoperator(gl_operator); if(!g_options.rw_loop) { { kc_printer(kc_t(" if (("), kc_current_view); } kc::unparse(this, kc_printer, view_gen_rewritedefs_dotestarg_c); { kc_printer(kc_t("))\ \n return this;\ \n else {\ \n impl_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); if(f_listelementphylum(gl_phylum)->eq(f_emptyId())) { { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(gl_operator, kc_printer, kc_current_view); } { kc_printer(kc_t("* kc_result= "), kc_current_view); } kc::unparse(gl_operator, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(this, kc_printer, view_gen_rewritedefs_args_c); { kc_printer(kc_t(");\ \n kc_result->rewrite_members(this);\ \n return kc_result;\ \n }"), kc_current_view); } } else { { kc_printer(kc_t(" return this;"), kc_current_view); } } gl_phylum = 0; } break; } case view_gen_rewritedefs_nl_arg_c_enum: { view_gen_rewritedefs_nl_arg_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_rp = (("), kc_current_view); } kc::unparse(this, kc_printer, view_gen_rewritedefs_dotestarg_c); { kc_printer(kc_t("))\ \n ? this\ \n : "), kc_current_view); } kc::unparse(gl_operator, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(this, kc_printer, view_gen_rewritedefs_args_c); { kc_printer(kc_t(");\ \n"), kc_current_view); } } break; } case view_gen_rewritedefs_rewritearg_c_enum: { view_gen_rewritedefs_rewritearg_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID a_arg = this->ID_1; const arguments r_args = this->arguments_1; kc::unparse(r_args, kc_printer, kc_current_view); if (!g_options.rw_loop) { if(g_options.smart_pointer) { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(a_arg, kc_printer, kc_current_view); { kc_printer(kc_t("_ptr l_"), kc_current_view); } kc::unparse(a_arg, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); { kc_printer(kc_t(" ="), kc_current_view); } } else { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(a_arg, kc_printer, kc_current_view); { kc_printer(kc_t(" l_"), kc_current_view); } kc::unparse(a_arg, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); { kc_printer(kc_t(" ="), kc_current_view); } } { kc_printer(kc_t("\n"), kc_current_view); } if (g_options.covariant=='p') { { kc_printer(kc_t("#ifndef NO_COVARIANT_RETURN\n"), kc_current_view); } } if (g_options.covariant!='n') { { kc_printer(kc_t("\v"), kc_current_view); } kc::unparse(a_arg, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); { kc_printer(kc_t("->rewrite(kc_current_view_base);\r\n"), kc_current_view); } } if (g_options.covariant=='p') { { kc_printer(kc_t("#else\n"), kc_current_view); } } if (g_options.covariant!='y') { { kc_printer(kc_t("\vstatic_cast<"), kc_current_view); } kc::unparse(a_arg, kc_printer, kc_current_view); { kc_printer(kc_t(">("), kc_current_view); } kc::unparse(a_arg, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); { kc_printer(kc_t("->rewrite(kc_current_view_base));\r\n"), kc_current_view); } } if (g_options.covariant=='p') { { kc_printer(kc_t("#endif // NO_COVARIANT_RETURN\n"), kc_current_view); } } } } break; } case view_gen_test_enum: { view_gen_test_class& kc_current_view=static_cast(kc_current_view_base); { const arguments rargs = this->arguments_1; bool isnotlist=f_listelementphylum(gl_phylum)->eq(f_emptyId()); kc::unparse(rargs, kc_printer, kc_current_view); if(isnotlist) { { kc_printer(kc_t(" && (dynamic_cast(kc_x)->"), kc_current_view); } } else { { kc_printer(kc_t(" && (kc_x->"), kc_current_view); } } kc::unparse(this, kc_printer, view_gen_argseqnr); { kc_printer(kc_t(" == _"), kc_current_view); } kc::unparse(this, kc_printer, view_gen_argseqnr); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_gen_assignment_inis_enum: { view_gen_assignment_inis_class& kc_current_view=static_cast(kc_current_view_base); if ((this->arguments_1->prod_sel() == sel_Nilarguments)) { const ID a = this->ID_1; kc::unparse(this, kc_printer, view_gen_argseqnr); { kc_printer(kc_t("(_"), kc_current_view); } kc::unparse(this, kc_printer, view_gen_argseqnr); { kc_printer(kc_t(")"), kc_current_view); } if (a->named_subphylum) { { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(a->named_subphylum, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(this, kc_printer, view_gen_argseqnr); { kc_printer(kc_t(")"), kc_current_view); } } } else { const ID a = this->ID_1; const arguments rargs = this->arguments_1; kc::unparse(rargs, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(this, kc_printer, view_gen_argseqnr); { kc_printer(kc_t("(_"), kc_current_view); } kc::unparse(this, kc_printer, view_gen_argseqnr); { kc_printer(kc_t(")"), kc_current_view); } if (a->named_subphylum) { { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(a->named_subphylum, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(this, kc_printer, view_gen_argseqnr); { kc_printer(kc_t(")"), kc_current_view); } } } break; } case view_gen_assignments_enum: { view_gen_assignments_class& kc_current_view=static_cast(kc_current_view_base); { const arguments rargs = this->arguments_1; kc::unparse(rargs, kc_printer, kc_current_view); kc::unparse(this, kc_printer, view_gen_argseqnr); { kc_printer(kc_t(" = _"), kc_current_view); } kc::unparse(this, kc_printer, view_gen_argseqnr); { kc_printer(kc_t(";\ \n"), kc_current_view); } } break; } case view_gen_fnarg_and_decls_enum: { view_gen_fnarg_and_decls_class& kc_current_view=static_cast(kc_current_view_base); if ((this->arguments_1->prod_sel() == sel_Nilarguments)) { const ID a = this->ID_1; kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t(" _"), kc_current_view); } kc::unparse(this, kc_printer, view_gen_argseqnr); } else { const ID a = this->ID_1; const arguments rargs = this->arguments_1; kc::unparse(rargs, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t(" _"), kc_current_view); } kc::unparse(this, kc_printer, view_gen_argseqnr); } break; } case view_gen_fnarg_asserts_enum: { view_gen_fnarg_asserts_class& kc_current_view=static_cast(kc_current_view_base); { const ID a = this->ID_1; const arguments rargs = this->arguments_1; kc::unparse(rargs, kc_printer, kc_current_view); { kc_printer(kc_t("assertPhylum(_"), kc_current_view); } kc::unparse(this, kc_printer, view_gen_argseqnr); { kc_printer(kc_t(", phylum_"), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t(");\n"), kc_current_view); } } break; } case view_gen_argseqnr_enum: { view_gen_argseqnr_class& kc_current_view=static_cast(kc_current_view_base); { const ID a = this->ID_1; kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); } break; } case view_gen_attributeOf_function_enum: { view_gen_attributeOf_function_class& kc_current_view=static_cast(kc_current_view_base); { const ID a = this->ID_1; const arguments ra = this->arguments_1; kc::unparse(ra, kc_printer, kc_current_view); ID ident; ac_identifier_list idents = gl_idents; for (int i=gl_idents->length(); i>gl_no_of_args; --i) { { ac_identifier_list kc_selvar_0_1 = phylum_cast(idents); if ((kc_selvar_0_1->prod_sel() == sel_Consac_identifier_list)) { const ID i = (kc_selvar_0_1)->ID_1; const ac_identifier_list ri = (kc_selvar_0_1)->ac_identifier_list_1; ident=i; idents=ri; } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } } { kc_printer(kc_t("case "), kc_current_view); } kc::unparse(gl_no_of_args, kc_printer, kc_current_view); { kc_printer(kc_t(": return reinterpret_cast(phylum_cast<"), kc_current_view); } kc::unparse(gl_operator, kc_printer, view_class_of_op); { kc_printer(kc_t("*>(kc_p)->"), kc_current_view); } kc::unparse(ident, kc_printer, kc_current_view); { kc_printer(kc_t(");\n"), kc_current_view); } ++gl_no_of_args; } break; } case view_gen_create_function_enum: { view_gen_create_function_class& kc_current_view=static_cast(kc_current_view_base); if ((this->arguments_1->prod_sel() == sel_Nilarguments)) { const ID a = this->ID_1; { kc_printer(kc_t("phylum_cast<"), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t(">(kc_p1)"), kc_current_view); } gl_generic_counter=2; } else { const ID a = this->ID_1; const arguments ra = this->arguments_1; kc::unparse(ra, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } { kc_printer(kc_t("phylum_cast<"), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t(">(kc_p"), kc_current_view); } kc::unparse(gl_generic_counter, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } ++gl_generic_counter; } break; } case view_gen_operatorcast_h_enum: { view_gen_operatorcast_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->arguments_1->prod_sel() == sel_Nilarguments)) { const ID a = this->ID_1; kc::unparse(a, kc_printer, kc_current_view); } else { const ID a = this->ID_1; const arguments rargs = this->arguments_1; kc::unparse(rargs, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); } break; } case view_gen_operatordecls_h_enum: { view_gen_operatordecls_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->arguments_1->prod_sel() == sel_Nilarguments)) { const ID a = this->ID_1; kc::unparse(a, kc_printer, kc_current_view); } else { const ID a = this->ID_1; const arguments rargs = this->arguments_1; kc::unparse(rargs, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); } break; } case view_gen_nodetypes_h_enum: { view_gen_nodetypes_h_class& kc_current_view=static_cast(kc_current_view_base); { const ID a = this->ID_1; const arguments rargs = this->arguments_1; kc::unparse(rargs, kc_printer, kc_current_view); if(g_options.smart_pointer) { kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t("_ptr "), kc_current_view); } } else { { kc_printer(kc_t(" impl_"), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t("* "), kc_current_view); } } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); { kc_printer(kc_t(";\n"), kc_current_view); } if (a->named_subphylum) { if(g_options.smart_pointer) { kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t("_ptr& "), kc_current_view); } } else { { kc_printer(kc_t(" impl_"), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t("*& "), kc_current_view); } } kc::unparse(a->named_subphylum, kc_printer, kc_current_view); { kc_printer(kc_t(" /* = "), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(this->seqnr, kc_printer, kc_current_view); { kc_printer(kc_t("*/;\n"), kc_current_view); } } } break; } case view_gen_operatormap_subphyla_enum: { view_gen_operatormap_subphyla_class& kc_current_view=static_cast(kc_current_view_base); if ((this->arguments_1->prod_sel() == sel_Nilarguments)) { const ID a = this->ID_1; { kc_printer(kc_t("phylum_"), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); } else { const ID a = this->ID_1; const arguments ra = this->arguments_1; kc::unparse(ra, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } { kc_printer(kc_t("phylum_"), kc_current_view); } kc::unparse(a, kc_printer, kc_current_view); } break; } case view_count_args_enum: { view_count_args_class& kc_current_view=static_cast(kc_current_view_base); { const arguments ra = this->arguments_1; kc::unparse(ra, kc_printer, kc_current_view); gl_no_of_args++; } break; } case view_check_uniq1_enum: { view_check_uniq1_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; const arguments rargs = this->arguments_1; phylumdeclaration tmp = f_lookupdecl( id ); kc::unparse(rargs, kc_printer, kc_current_view); if (tmp) { kc::unparse(tmp, kc_printer, view_check_uniq2); } } break; } case view_check_count1_enum: { view_check_count1_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; const arguments rargs = this->arguments_1; kc::unparse(rargs, kc_printer, kc_current_view); f_useoccurphylum( id ); this->seqnr = f_getcount( id ); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (arguments iterator_ = this; iterator_->arguments_1 != 0; iterator_ = iterator_->arguments_1) iterator_->ID_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_arguments::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_rewritedefs_args_c_enum: { view_gen_rewritedefs_args_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_rewritedefs_dotestarg_c_enum: { view_gen_rewritedefs_dotestarg_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_rewritedefs_testarg_c_enum: { view_gen_rewritedefs_testarg_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t(" return this;\ \n"), kc_current_view); } } break; } case view_gen_rewritedefs_nl_arg_c_enum: { view_gen_rewritedefs_nl_arg_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_rp = this;\ \n"), kc_current_view); } } break; } case view_gen_rewritedefs_rewritearg_c_enum: { view_gen_rewritedefs_rewritearg_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_test_enum: { view_gen_test_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_assignments_predef_ini_enum: { view_gen_assignments_predef_ini_class& kc_current_view=static_cast(kc_current_view_base); { enum_operators kc_i = f_selofoperator(gl_operator); PRINT(preDefTypeAndName[kc_i][1]); { kc_printer(kc_t("(_"), kc_current_view); } PRINT(preDefTypeAndName[kc_i][1]); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_gen_assignments_predef_enum: { view_gen_assignments_predef_class& kc_current_view=static_cast(kc_current_view_base); { enum_operators kc_i = f_selofoperator(gl_operator); PRINT(preDefTypeAndName[kc_i][1]); { kc_printer(kc_t(" = _"), kc_current_view); } PRINT(preDefTypeAndName[kc_i][1]); { kc_printer(kc_t(";\n"), kc_current_view); } } break; } case view_gen_assignments_enum: { view_gen_assignments_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_fnarg_and_decls_predef_enum: { view_gen_fnarg_and_decls_predef_class& kc_current_view=static_cast(kc_current_view_base); { enum_operators kc_i = f_selofoperator(gl_operator); PRINT(preDefTypeAndName[kc_i][0]); { kc_printer(kc_t(" _"), kc_current_view); } PRINT(preDefTypeAndName[kc_i][1]); } break; } case view_gen_fnarg_and_decls_enum: { view_gen_fnarg_and_decls_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_fnarg_asserts_enum: { view_gen_fnarg_asserts_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_attributeOf_function_enum: { view_gen_attributeOf_function_class& kc_current_view=static_cast(kc_current_view_base); { gl_no_of_args=0; } break; } case view_gen_operatormap_subphyla_enum: { view_gen_operatormap_subphyla_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_count_args_enum: { view_count_args_class& kc_current_view=static_cast(kc_current_view_base); { gl_no_of_args = 0; } break; } case view_check_uniq1_enum: { view_check_uniq1_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_count1_enum: { view_check_count1_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_argument_Argument::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ID id = this->ID_1; const integer i = this->integer_1; kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(i, kc_printer, kc_current_view); } break; } } } void impl_Ccode_option_CcodeOption::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_nodetypes_h_enum: { view_gen_nodetypes_h_class& kc_current_view=static_cast(kc_current_view_base); { const attributes a = this->attributes_1; kc::unparse(a, kc_printer, kc_current_view); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const attributes attr = this->attributes_1; const Ctexts init = this->Ctexts_1; kc::unparse(attr, kc_printer, kc_current_view); kc::unparse(init, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const Ctexts ct = this->Ctexts_1; kc::unparse(ct, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_attributes::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_copy_attributes_c_enum: { view_gen_copy_attributes_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->attribute_1->prod_sel() == sel_Attribute)) { const ID aid = phylum_cast(this->attribute_1)->ID_2; const attributes ra = this->attributes_1; kc::unparse(ra, kc_printer, kc_current_view); { kc_printer(kc_t(" p2->"), kc_current_view); } kc::unparse(aid, kc_printer, kc_current_view); { kc_printer(kc_t(" = p1->"), kc_current_view); } kc::unparse(aid, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } else goto kc_unparsing_default; break; } case view_gen_nodetypes_h_enum: { view_gen_nodetypes_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->attribute_1->prod_sel() == sel_Attribute)) { const ID t = phylum_cast(this->attribute_1)->ID_1; const ID id = phylum_cast(this->attribute_1)->ID_2; const attributes ra = this->attributes_1; kc::unparse(ra, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } else goto kc_unparsing_default; break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->attribute_1->prod_sel() == sel_Attribute) && (phylum_cast(this->attribute_1)->attribute_initialisation_option_1->prod_sel() == sel_Yesattribute_initialisation)) { const ID aid = phylum_cast(this->attribute_1)->ID_2; const Cexpression cexpr = phylum_cast(phylum_cast(this->attribute_1)->attribute_initialisation_option_1)->Cexpression_1; const attributes ra = this->attributes_1; ID selvar; kc::unparse(ra, kc_printer, kc_current_view); selvar = Id(Str(mkcasestring("kc_x"))); selvar->line = aid->line; selvar->file = aid->file; dollarvarstack.push( selvar ); dollarvarextstack.push( f_emptyId() ); operatorstack.push( f_emptyId() ); if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(aid->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(aid->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t(" kc_x->"), kc_current_view); } kc::unparse(aid, kc_printer, kc_current_view); { kc_printer(kc_t(" = "), kc_current_view); } kc::unparse(cexpr, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } dollarvarstack.pop(); dollarvarextstack.pop(); operatorstack.pop(); } else if ((this->attribute_1->prod_sel() == sel_Attribute) && (phylum_cast(this->attribute_1)->attribute_initialisation_option_1->prod_sel() == sel_Noattribute_initialisation)) { const attributes ra = this->attributes_1; kc::unparse(ra, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (attributes iterator_ = this; iterator_->attributes_1 != 0; iterator_ = iterator_->attributes_1) iterator_->attribute_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_attributes::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_copy_attributes_c_enum: { view_gen_copy_attributes_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_nodetypes_h_enum: { view_gen_nodetypes_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_attribute_Attribute::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_attribute_initialisation_option_Yesattribute_initialisation::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_attribute_initialisation_option_Noattribute_initialisation::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_Cexpression::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_user_predicates_enum: { view_gen_user_predicates_class& kc_current_view=static_cast(kc_current_view_base); { const Cexpression_elem ce = this->Cexpression_elem_1; const Cexpression ces = this->Cexpression_1; kc::unparse(ces, kc_printer, kc_current_view); kc::unparse(ce, kc_printer, kc_current_view); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const Cexpression_elem ce = this->Cexpression_elem_1; const Cexpression ces = this->Cexpression_1; kc::unparse(ces, kc_printer, kc_current_view); kc::unparse(ce, kc_printer, kc_current_view); } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const Cexpression_elem h = this->Cexpression_elem_1; const Cexpression t = this->Cexpression_1; kc::unparse(t, kc_printer, kc_current_view); kc::unparse(h, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (Cexpression iterator_ = this; iterator_->Cexpression_1 != 0; iterator_ = iterator_->Cexpression_1) iterator_->Cexpression_elem_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_Cexpression::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_user_predicates_enum: { view_gen_user_predicates_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_Cexpression_elem_CExpressionArray::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_user_predicates_enum: { view_gen_user_predicates_class& kc_current_view=static_cast(kc_current_view_base); { const Cexpression cexpr = this->Cexpression_1; { kc_printer(kc_t("["), kc_current_view); } kc::unparse(cexpr, kc_printer, kc_current_view); { kc_printer(kc_t("]"), kc_current_view); } } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const Cexpression cexpr = this->Cexpression_1; { kc_printer(kc_t("["), kc_current_view); } kc::unparse(cexpr, kc_printer, kc_current_view); { kc_printer(kc_t("]"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const Cexpression ce = this->Cexpression_1; { kc_printer(kc_t("["), kc_current_view); } kc::unparse(ce, kc_printer, kc_current_view); { kc_printer(kc_t("]"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_Cexpression_elem_CExpressionPack::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_user_predicates_enum: { view_gen_user_predicates_class& kc_current_view=static_cast(kc_current_view_base); { const Cexpression cexpr = this->Cexpression_1; { kc_printer(kc_t("("), kc_current_view); } kc::unparse(cexpr, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const Cexpression cexpr = this->Cexpression_1; { kc_printer(kc_t("("), kc_current_view); } kc::unparse(cexpr, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const Cexpression ce = this->Cexpression_1; { kc_printer(kc_t("("), kc_current_view); } kc::unparse(ce, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_Cexpression_elem_CExpressionSQ::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_user_predicates_enum: { view_gen_user_predicates_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionSQ cesq = this->CexpressionSQ_1; { kc_printer(kc_t("'"), kc_current_view); } kc::unparse(cesq, kc_printer, kc_current_view); { kc_printer(kc_t("'"), kc_current_view); } } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionSQ cesq = this->CexpressionSQ_1; { kc_printer(kc_t("'"), kc_current_view); } kc::unparse(cesq, kc_printer, kc_current_view); { kc_printer(kc_t("'"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionSQ cesq = this->CexpressionSQ_1; { kc_printer(kc_t("'"), kc_current_view); } kc::unparse(cesq, kc_printer, kc_current_view); { kc_printer(kc_t("'"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_Cexpression_elem_CExpressionDQ::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_user_predicates_enum: { view_gen_user_predicates_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionDQ cedq = this->CexpressionDQ_1; { kc_printer(kc_t("\""), kc_current_view); } kc::unparse(cedq, kc_printer, kc_current_view); { kc_printer(kc_t("\""), kc_current_view); } } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionDQ cedq = this->CexpressionDQ_1; { kc_printer(kc_t("\""), kc_current_view); } kc::unparse(cedq, kc_printer, kc_current_view); { kc_printer(kc_t("\""), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionDQ cedq = this->CexpressionDQ_1; { kc_printer(kc_t("\""), kc_current_view); } kc::unparse(cedq, kc_printer, kc_current_view); { kc_printer(kc_t("\""), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_Cexpression_elem_CExpressionNl::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_user_predicates_enum: { view_gen_user_predicates_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\n"), kc_current_view); } } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\n"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t(" "), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_Cexpression_elem_CExpressionDollarvar::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const INT i = this->INT_1; ID oid = f_emptyId(), dollarvar = dollarvarstack.top(), dollarvarext = dollarvarextstack.top(); argument arg; bool nulvar = true; { INT kc_selvar_0_1 = phylum_cast( i ); if ((kc_selvar_0_1->prod_sel() == sel_Int)) { const integer ii = phylum_cast(kc_selvar_0_1)->integer_1; if (ii->value != 0) { nulvar = false; oid = operatorstack.top(); arg = f_argumentofoperator( oid, i ); } } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } if (nulvar) { kc::unparse(dollarvar, kc_printer, kc_current_view); kc::unparse(dollarvarext, kc_printer, kc_current_view); } else { kc::unparse(dollarvar, kc_printer, kc_current_view); kc::unparse(dollarvarext, kc_printer, kc_current_view); { kc_printer(kc_t("->"), kc_current_view); } kc::unparse(arg, kc_printer, kc_current_view); arg->free( false ); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const INT i = this->INT_1; { kc_printer(kc_t("$"), kc_current_view); } kc::unparse(i, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_Cexpression_elem_CExpressionPart::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_user_predicates_enum: { view_gen_user_predicates_class& kc_current_view=static_cast(kc_current_view_base); { const casestring cs = this->casestring_1; std::map::iterator p; char const *c=cs->name; std::string s; #ifdef KIMWITUVERSIONMAJOR #define kc_uviews uviews #endif while (*c) { s=f_getidentfromstring(&c); p=gl_bindings.find(s); if (p!=gl_bindings.end()) { path path_temp=p->second; { path kc_selvar_0_1 = phylum_cast(path_temp); if ((kc_selvar_0_1->prod_sel() == sel_Conspath)) { const path r_p = (kc_selvar_0_1)->path_1; r_p->unparse(kc_printer, view_gen_cast); path_temp->unparse(kc_printer, *kc_uviews[gl_outer_view].view); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpath)) { path_temp->unparse(kc_printer, *kc_uviews[gl_outer_view].view); } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } } else { PRINT(s.c_str()); } } } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const casestring cs = this->casestring_1; kc::unparse(cs, kc_printer, kc_current_view); } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s = this->casestring_1; kc::unparse(s, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_CexpressionDQ::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_output_collection_enum: { view_output_collection_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionDQ_elem cedqe = this->CexpressionDQ_elem_1; const CexpressionDQ cedq = this->CexpressionDQ_1; kc::unparse(cedq, kc_printer, kc_current_view); kc::unparse(cedqe, kc_printer, kc_current_view); } break; } case view_gen_unpstr_c_enum: { view_gen_unpstr_c_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionDQ_elem cedqe = this->CexpressionDQ_elem_1; const CexpressionDQ cedq = this->CexpressionDQ_1; kc::unparse(cedq, kc_printer, kc_current_view); kc::unparse(cedqe, kc_printer, kc_current_view); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionDQ_elem cedqe = this->CexpressionDQ_elem_1; const CexpressionDQ cedq = this->CexpressionDQ_1; kc::unparse(cedq, kc_printer, kc_current_view); kc::unparse(cedqe, kc_printer, kc_current_view); } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionDQ_elem h = this->CexpressionDQ_elem_1; const CexpressionDQ t = this->CexpressionDQ_1; kc::unparse(t, kc_printer, kc_current_view); kc::unparse(h, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (CexpressionDQ iterator_ = this; iterator_->CexpressionDQ_1 != 0; iterator_ = iterator_->CexpressionDQ_1) iterator_->CexpressionDQ_elem_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_CexpressionDQ::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unpstr_c_enum: { view_gen_unpstr_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_CexpressionDQ_elem_CExpressionDQNl::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_output_collection_enum: { view_output_collection_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\\\n\\n"), kc_current_view); } } break; } case view_gen_unpstr_c_enum: { view_gen_unpstr_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\\\n\\n"), kc_current_view); } } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\n"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t(" "), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_CexpressionDQ_elem_CExpressionDQPart::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_output_collection_enum: { view_output_collection_class& kc_current_view=static_cast(kc_current_view_base); { const casestring cs = this->casestring_1; kc::unparse(cs, kc_printer, kc_current_view); } break; } case view_gen_unpstr_c_enum: { view_gen_unpstr_c_class& kc_current_view=static_cast(kc_current_view_base); { const casestring cs = this->casestring_1; kc::unparse(cs, kc_printer, kc_current_view); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const casestring cs = this->casestring_1; kc::unparse(cs, kc_printer, kc_current_view); } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s = this->casestring_1; kc::unparse(s, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_CexpressionSQ::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionSQ_elem cesqe = this->CexpressionSQ_elem_1; const CexpressionSQ cesq = this->CexpressionSQ_1; kc::unparse(cesq, kc_printer, kc_current_view); kc::unparse(cesqe, kc_printer, kc_current_view); } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionSQ_elem h = this->CexpressionSQ_elem_1; const CexpressionSQ t = this->CexpressionSQ_1; kc::unparse(t, kc_printer, kc_current_view); kc::unparse(h, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (CexpressionSQ iterator_ = this; iterator_->CexpressionSQ_1 != 0; iterator_ = iterator_->CexpressionSQ_1) iterator_->CexpressionSQ_elem_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_CexpressionSQ::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_CexpressionSQ_elem_CExpressionSQNl::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\n"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t(" "), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_CexpressionSQ_elem_CExpressionSQPart::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const casestring cs = this->casestring_1; kc::unparse(cs, kc_printer, kc_current_view); } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s = this->casestring_1; kc::unparse(s, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_idCexpressions::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_initializephyla_update_loop_c_enum: { view_gen_initializephyla_update_loop_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->idCexpression_1->prod_sel() == sel_IdCexpression)) { const ID tid = phylum_cast(this->idCexpression_1)->ID_1; const Cexpression cexpr = phylum_cast(this->idCexpression_1)->Cexpression_1; const idCexpressions t = this->idCexpressions_1; kc::unparse(t, kc_printer, kc_current_view); g_fe_selvar_nr++; { kc_printer(kc_t("kc_fe_selvar_"), kc_current_view); } kc::unparse(g_fe_selvar_nr, kc_printer, kc_current_view); { kc_printer(kc_t(" = kc_fe_selvar_"), kc_current_view); } kc::unparse(g_fe_selvar_nr, kc_printer, kc_current_view); { kc_printer(kc_t("->"), kc_current_view); } kc::unparse(tid, kc_printer, kc_current_view); { kc_printer(kc_t("_1;\n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(cexpr->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(cexpr->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } } else goto kc_unparsing_default; break; } case view_gen_initializephyla_init_el_c_enum: { view_gen_initializephyla_init_el_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->idCexpression_1->prod_sel() == sel_IdCexpression)) { const ID tid = phylum_cast(this->idCexpression_1)->ID_1; const idCexpressions t = this->idCexpressions_1; ID element_type = f_listelementphylum( tid ); ID selvar = cf_topselvar(); kc::unparse(t, kc_printer, kc_current_view); g_fe_selvar_nr++; kc::unparse(element_type, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(selvar, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(g_fe_selvar_nr, kc_printer, kc_current_view); { kc_printer(kc_t(" = kc_fe_selvar_"), kc_current_view); } kc::unparse(g_fe_selvar_nr, kc_printer, kc_current_view); { kc_printer(kc_t("->"), kc_current_view); } kc::unparse(element_type, kc_printer, kc_current_view); { kc_printer(kc_t("_1;\ \n"), kc_current_view); } } else goto kc_unparsing_default; break; } case view_gen_initializephyla_whiletest_c_enum: { view_gen_initializephyla_whiletest_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->idCexpression_1->prod_sel() == sel_IdCexpression) && (this->idCexpressions_1->prod_sel() == sel_NilidCexpressions)) { const ID tid = phylum_cast(this->idCexpression_1)->ID_1; const idCexpressions t = this->idCexpressions_1; kc::unparse(t, kc_printer, kc_current_view); g_fe_selvar_nr++; { kc_printer(kc_t(" kc_fe_selvar_"), kc_current_view); } kc::unparse(g_fe_selvar_nr, kc_printer, kc_current_view); { kc_printer(kc_t("->prod_sel() == sel_Cons"), kc_current_view); } kc::unparse(tid, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n"), kc_current_view); } } else if ((this->idCexpression_1->prod_sel() == sel_IdCexpression)) { const ID tid = phylum_cast(this->idCexpression_1)->ID_1; const idCexpressions t = this->idCexpressions_1; kc::unparse(t, kc_printer, kc_current_view); g_fe_selvar_nr++; { kc_printer(kc_t(" && kc_fe_selvar_"), kc_current_view); } kc::unparse(g_fe_selvar_nr, kc_printer, kc_current_view); { kc_printer(kc_t("->prod_sel() == sel_Cons"), kc_current_view); } kc::unparse(tid, kc_printer, kc_current_view); { kc_printer(kc_t("\ \n"), kc_current_view); } } else goto kc_unparsing_default; break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->idCexpression_1->prod_sel() == sel_IdCexpression)) { const ID tid = phylum_cast(this->idCexpression_1)->ID_1; const Cexpression cexpr = phylum_cast(this->idCexpression_1)->Cexpression_1; const idCexpressions t = this->idCexpressions_1; kc::unparse(t, kc_printer, kc_current_view); g_fe_selvar_nr++; if (cexpr->line) { if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(cexpr->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(cexpr->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } } kc::unparse(tid, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_fe_selvar_"), kc_current_view); } kc::unparse(g_fe_selvar_nr, kc_printer, kc_current_view); { kc_printer(kc_t(" = "), kc_current_view); } kc::unparse(cexpr, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } else goto kc_unparsing_default; break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const idCexpression h = this->idCexpression_1; const idCexpressions t = this->idCexpressions_1; kc::unparse(t, kc_printer, kc_current_view); kc::unparse(h, kc_printer, kc_current_view); } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (idCexpressions iterator_ = this; iterator_->idCexpressions_1 != 0; iterator_ = iterator_->idCexpressions_1) iterator_->idCexpression_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_idCexpressions::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_update_loop_c_enum: { view_gen_initializephyla_update_loop_c_class& kc_current_view=static_cast(kc_current_view_base); { g_fe_selvar_nr = 0; } break; } case view_gen_initializephyla_init_el_c_enum: { view_gen_initializephyla_init_el_c_class& kc_current_view=static_cast(kc_current_view_base); { g_fe_selvar_nr = 0; } break; } case view_gen_initializephyla_whiletest_c_enum: { view_gen_initializephyla_whiletest_c_class& kc_current_view=static_cast(kc_current_view_base); { g_fe_selvar_nr = 0; } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { g_fe_selvar_nr = 0; } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_idCexpression_IdCexpression::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const ID t = this->ID_1; f_useoccurlistphylum( t ); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_Ctexts::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const Ctext ct = this->Ctext_1; const Ctexts cts = this->Ctexts_1; ID selvar; kc::unparse(cts, kc_printer, kc_current_view); selvar = Id(Str(mkcasestring("kc_x"))); selvar->line = ct->line; selvar->file = ct->file; dollarvarstack.push( selvar ); dollarvarextstack.push( f_emptyId() ); operatorstack.push( f_emptyId() ); if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(ct, kc_printer, kc_current_view); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); dollarvarstack.pop(); dollarvarextstack.pop(); operatorstack.pop(); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (Ctexts iterator_ = this; iterator_->Ctexts_1 != 0; iterator_ = iterator_->Ctexts_1) iterator_->Ctext_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_Ctexts::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_includefiles::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (includefiles iterator_ = this; iterator_->includefiles_1 != 0; iterator_ = iterator_->includefiles_1) iterator_->includefile_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_includefiles::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_includefile_IncludeFile::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_includedeclarations::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_do_gen_includes_enum: { view_do_gen_includes_class& kc_current_view=static_cast(kc_current_view_base); { const includedeclaration e = this->includedeclaration_1; const includedeclarations l = this->includedeclarations_1; kc::unparse(l, kc_printer, kc_current_view); kc::unparse(e, kc_printer, kc_current_view); } break; } case view_gen_includes_enum: { view_gen_includes_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("namespace kc { }\ \nusing namespace kc;\ \n/* included stuff */\ \n"), kc_current_view); } kc::unparse(this, kc_printer, view_do_gen_includes); { kc_printer(kc_t("/* end included stuff */\ \n\ \n"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (includedeclarations iterator_ = this; iterator_->includedeclarations_1 != 0; iterator_ = iterator_->includedeclarations_1) iterator_->includedeclaration_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_includedeclarations::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_do_gen_includes_enum: { view_do_gen_includes_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_includes_enum: { view_gen_includes_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_includedeclaration_IncludeDeclaration::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_do_gen_includes_enum: { view_do_gen_includes_class& kc_current_view=static_cast(kc_current_view_base); { const casestring i = this->casestring_1; if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(this->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(this->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(i, kc_printer, kc_current_view); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_rwdeclarations::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const rwdeclaration rwd = this->rwdeclaration_1; const rwdeclarations rrwd = this->rwdeclarations_1; kc::unparse(rrwd, kc_printer, kc_current_view); kc::unparse(rwd, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (rwdeclarations iterator_ = this; iterator_->rwdeclarations_1 != 0; iterator_ = iterator_->rwdeclarations_1) iterator_->rwdeclaration_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_rwdeclarations::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_rwdeclaration_RwDeclaration::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const outmostpatterns op = this->outmostpatterns_1; const rewriteclauses rc = this->rewriteclauses_1; v_resetbindingidmarks(); v_add_rewriterulesinfo_to_operator( add_predicates_to_patternrepresentations( syn_outmostpatterns( op ) ), rc ); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const outmostpatterns op = this->outmostpatterns_1; const rewriteclauses rc = this->rewriteclauses_1; outmostoperators.push( Niloperators() ); dollarvarsallowed.push( DVAllowed() ); phylumstack.push( f_emptyId() ); variablesstack.push( Nilvariables()); cl_scope++; kc::unparse(op, kc_printer, kc_current_view); kc::unparse(rc, kc_printer, kc_current_view); outmostoperators.top()->freelist(); outmostoperators.pop(); phylumstack.pop(); dollarvarsallowed.pop(); v_reset_variables_type( variablesstack.top() ); cl_scope--; variablesstack.top()->freelist(); variablesstack.pop(); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_rewriteclauses::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const rewriteclause rc = this->rewriteclause_1; const rewriteclauses rcs = this->rewriteclauses_1; kc::unparse(rcs, kc_printer, kc_current_view); kc::unparse(rc, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (rewriteclauses iterator_ = this; iterator_->rewriteclauses_1 != 0; iterator_ = iterator_->rewriteclauses_1) iterator_->rewriteclause_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_rewriteclauses::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_rewriteclause_RewriteClause::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const viewnames vn = this->viewnames_1; kc::unparse(vn, kc_printer, view_check_r); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_patternchains::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_set_type_enum: { view_set_type_class& kc_current_view=static_cast(kc_current_view_base); { const patternchain h = this->patternchain_1; const patternchains t = this->patternchains_1; kc::unparse(t, kc_printer, kc_current_view); kc::unparse(h, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const patternchain h = this->patternchain_1; const patternchains t = this->patternchains_1; kc::unparse(t, kc_printer, kc_current_view); kc::unparse(h, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (patternchains iterator_ = this; iterator_->patternchains_1 != 0; iterator_ = iterator_->patternchains_1) iterator_->patternchain_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_patternchains::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_set_type_enum: { view_set_type_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_patternchain::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_set_type_enum: { view_set_type_class& kc_current_view=static_cast(kc_current_view_base); { const patternchainitem h = this->patternchainitem_1; const patternchain t = this->patternchain_1; ID tmp_type = 0; phylumnames tmp_types = 0; { phylumnames kc_selvar_0_1 = phylum_cast( phylumnamesstack.top() ); if ((kc_selvar_0_1->prod_sel() == sel_Nilphylumnames)) { tmp_type = f_emptyId(); tmp_types = Nilphylumnames(); } else if ((kc_selvar_0_1->prod_sel() == sel_Consphylumnames)) { const ID p_h = (kc_selvar_0_1)->ID_1; const phylumnames p_t = (kc_selvar_0_1)->phylumnames_1; tmp_type = p_h; tmp_types = p_t; } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } phylumnamesstack.pop(); phylumnamesstack.push( tmp_types ); kc::unparse(t, kc_printer, kc_current_view); tmp_types = phylumnamesstack.top(); phylumnamesstack.pop(); phylumstack.push( tmp_type ); if (! phylumstack.top()->eq( f_emptyId() )) { h->type = phylumstack.top(); } kc::unparse(h, kc_printer, kc_current_view); tmp_type = phylumstack.top(); phylumstack.pop(); phylumnamesstack.push( Consphylumnames( tmp_type, tmp_types ) ); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); if ((this->patternchainitem_1->prod_sel() == sel_PatternchainitemOutmost) && (phylum_cast(this->patternchainitem_1)->outmostpattern_1->prod_sel() == sel_OPDefault) && (this->patternchain_1->prod_sel() == sel_Conspatternchain) && ((this->patternchain_1)->patternchainitem_1->prod_sel() == sel_PatternchainitemOutmost) && (phylum_cast((this->patternchain_1)->patternchainitem_1)->outmostpattern_1->prod_sel() == sel_OPDefault)) { const patternchainitem p = this->patternchainitem_1; v_report(NonFatal( FileLine( p->file, p->line ), Problem1S( "'default' can not be &-ed with (other) patterns"))); } else if ((this->patternchainitem_1->prod_sel() == sel_PatternchainitemOutmost) && (phylum_cast(this->patternchainitem_1)->outmostpattern_1->prod_sel() == sel_OPDefault) && (this->patternchain_1->prod_sel() == sel_Nilpatternchain)) { } else if ((this->patternchainitem_1->prod_sel() == sel_PatternchainitemOutmost) && (phylum_cast(this->patternchainitem_1)->outmostpattern_1->prod_sel() == sel_OPDefault) && (this->patternchain_1->prod_sel() == sel_Conspatternchain)) { const patternchainitem p = this->patternchainitem_1; v_report(NonFatal( FileLine( p->file, p->line ), Problem1S( "'default' can not be &-ed with (other) patterns"))); } else if ((this->patternchain_1->prod_sel() == sel_Conspatternchain) && ((this->patternchain_1)->patternchainitem_1->prod_sel() == sel_PatternchainitemOutmost) && (phylum_cast((this->patternchain_1)->patternchainitem_1)->outmostpattern_1->prod_sel() == sel_OPDefault)) { const patternchainitem p = (this->patternchain_1)->patternchainitem_1; v_report(NonFatal( FileLine( p->file, p->line ), Problem1S( "'default' can not be &-ed with (other) patterns"))); } else { const patternchain p = this/**/; const patternchainitem h = this->patternchainitem_1; const patternchain t = this->patternchain_1; ID tmp_type = 0; phylumnames tmp_types = 0; { phylumnames kc_selvar_0_1 = phylum_cast( phylumnamesstack.top() ); if ((kc_selvar_0_1->prod_sel() == sel_Nilphylumnames)) { tmp_type = f_emptyId(); tmp_types = Nilphylumnames(); v_report(NonFatal( FileLine( p->file, p->line ), Problem1S( "more &-ed patterns than expressions"))); } else if ((kc_selvar_0_1->prod_sel() == sel_Consphylumnames)) { const ID p_h = (kc_selvar_0_1)->ID_1; const phylumnames p_t = (kc_selvar_0_1)->phylumnames_1; tmp_type = p_h; tmp_types = p_t; } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } phylumnamesstack.pop(); phylumnamesstack.push( tmp_types ); kc::unparse(t, kc_printer, kc_current_view); tmp_types = phylumnamesstack.top(); phylumnamesstack.pop(); phylumstack.push( tmp_type ); kc::unparse(h, kc_printer, kc_current_view); tmp_type = phylumstack.top(); phylumstack.pop(); phylumnamesstack.push( Consphylumnames( tmp_type, tmp_types ) ); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (patternchain iterator_ = this; iterator_->patternchain_1 != 0; iterator_ = iterator_->patternchain_1) iterator_->patternchainitem_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_patternchain::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_set_type_enum: { view_set_type_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const patternchain p = this/**/; { phylumnames kc_selvar_0_1 = phylum_cast( phylumnamesstack.top() ); if ((kc_selvar_0_1->prod_sel() == sel_Nilphylumnames)) { /* EMPTY */ } else if ((kc_selvar_0_1->prod_sel() == sel_Consphylumnames)) { const ID p_h = (kc_selvar_0_1)->ID_1; const phylumnames p_t = (kc_selvar_0_1)->phylumnames_1; v_report(NonFatal( FileLine( p->file, p->line ), Problem1S( "fewer &-ed patterns than expressions"))); } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_outmostpatterns::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const outmostpattern p = this->outmostpattern_1; const outmostpatterns rp = this->outmostpatterns_1; kc::unparse(rp, kc_printer, kc_current_view); kc::unparse(p, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (outmostpatterns iterator_ = this; iterator_->outmostpatterns_1 != 0; iterator_ = iterator_->outmostpatterns_1) iterator_->outmostpattern_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_outmostpatterns::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_patternchainitem_PatternchainitemDollarid::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_patternchainitem_PatternchainitemGroup::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_set_type_enum: { view_set_type_class& kc_current_view=static_cast(kc_current_view_base); { const patternchains mp = this->patternchains_1; } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const patternchainitem mpg = this/**/; const patternchains mp = this->patternchains_1; v_report( NonFatal( FileLine( mpg->file, mpg->line ), Problem1S( "Internal Error: PatternchainitemGroup was not handled correctly" ))); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_patternchainitem_PatternchainitemOutmost::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_set_type_enum: { view_set_type_class& kc_current_view=static_cast(kc_current_view_base); { const outmostpattern p = this->outmostpattern_1; if (! phylumstack.top()->eq( f_emptyId() )) { p->type = phylumstack.top(); } } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const outmostpattern p = this->outmostpattern_1; if (inforeachcontext.top()!=0) { kc::unparse(p, kc_printer, view_check_is_var); } else { kc::unparse(p, kc_printer, view_check_outmostopers_in_phylum); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_outmostpattern_OPDefault::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_is_var_enum: { view_check_is_var_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_outmostpattern_OPWildcard::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_is_var_enum: { view_check_is_var_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_outmostpattern_OPNonLeafVariable::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_is_var_enum: { view_check_is_var_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_outmostopers_in_phylum_enum: { view_check_outmostopers_in_phylum_class& kc_current_view=static_cast(kc_current_view_base); { const ID v = this->ID_1; const outmostpattern p = this->outmostpattern_1; variables tmp = Consvariables( v, variablesstack.top() ); ID tmp_pid = f_phylumofoutmostpattern( p ); ID tmp_vid = f_phylumofpatternvariable( v ); ID tmp_resid = tmp_pid->eq(f_emptyId() ) ? tmp_vid : tmp_pid; if ( phylumstack.top()->eq(f_emptyId()) ) { phylumstack.pop(); phylumstack.push( tmp_resid ); } variablesstack.pop(); variablesstack.push( tmp ); v_extendoccur( v, ITPatternVariable( tmp_resid, mkinteger(cl_scope))); kc::unparse(p, kc_printer, view_check); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const ID v = this->ID_1; const outmostpattern p = this->outmostpattern_1; variables tmp = Consvariables( v, variablesstack.top() ); variablesstack.pop(); variablesstack.push( tmp ); v_extendoccur( v, ITPatternVariable( f_phylumofoutmostpattern( p ), mkinteger(cl_scope))); kc::unparse(p, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_outmostpattern_OPOperator::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_is_var_enum: { view_check_is_var_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_outmostopers_in_phylum_enum: { view_check_outmostopers_in_phylum_class& kc_current_view=static_cast(kc_current_view_base); { const ID o = this->ID_1; const patterns p = this->patterns_1; if (f_useoccuroperator( o )) { if ( phylumstack.top()->eq( f_emptyId() )) { phylumstack.pop(); phylumstack.push( f_phylumofoperator( o ) ); } if (f_operatorinphylum( o, phylumstack.top())) { operators tmp = Consoperators( o, outmostoperators.top() ); outmostoperators.pop(); outmostoperators.push( tmp ); argumentsstack.push( f_argumentsofoperator( o )->reverse()); operatorstack.push( o ); kc::unparse(p, kc_printer, view_check); if (! f_Nilarguments( argumentsstack.top() )) { v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID( "too few subpatterns for operator", o ))); } argumentsstack.pop(); operatorstack.pop(); } else { v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID1S1ID( "outermost operator", o, "not in expected phylum", phylumstack.top() ))); } } } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const ID o = this->ID_1; const patterns p = this->patterns_1; if (f_useoccuroperator( o )) { if ( phylumstack.top()->eq( f_emptyId() )) { phylumstack.pop(); phylumstack.push( f_phylumofoperator( o ) ); } { operators tmp = Consoperators( o, outmostoperators.top() ); outmostoperators.pop(); outmostoperators.push( tmp ); argumentsstack.push( f_argumentsofoperator( o )->reverse()); operatorstack.push( o ); kc::unparse(p, kc_printer, kc_current_view); if (! f_Nilarguments( argumentsstack.top() )) { v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID( "too few subpatterns for operator", o ))); } argumentsstack.pop(); operatorstack.pop(); } } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_outmostpattern_OPOperatorWildcard::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_is_var_enum: { view_check_is_var_class& kc_current_view=static_cast(kc_current_view_base); { const ID i = this->ID_1; f_warnifnotvariable( i ); } break; } case view_check_outmostopers_in_phylum_enum: { view_check_outmostopers_in_phylum_class& kc_current_view=static_cast(kc_current_view_base); { const ID o = this->ID_1; if (f_useoccuroperator( o )) { if ( phylumstack.top()->eq(f_emptyId() )) { phylumstack.pop(); phylumstack.push( f_phylumofoperator( o ) ); } if (! f_operatorinphylum( o, phylumstack.top())) { v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID1S1ID( "outermost operator", o, "not in expected phylum", phylumstack.top() ))); } else { operators tmp = Consoperators( o, outmostoperators.top() ); outmostoperators.pop(); outmostoperators.push( tmp ); } } } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const ID o = this->ID_1; if (f_useoccuroperator( o )) { if ( phylumstack.top()->eq( f_emptyId() )) { phylumstack.pop(); phylumstack.push( f_phylumofoperator( o ) ); } { operators tmp = Consoperators( o, outmostoperators.top() ); outmostoperators.pop(); outmostoperators.push( tmp ); } } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_pattern_PIntLiteral::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const INT i = this->INT_1; if ((! f_hd_arguments( argumentsstack.top() )->eq(Id( Str( mkcasestring( "integer" ))))) && (! f_hd_arguments( argumentsstack.top() )->eq(Id( Str( mkcasestring( "real" ))))) ) { v_report(NonFatal( FileLine( i->file, i->line ), Problem1S( "unexpected int subterm" ))); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_pattern_PStringLiteral::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { if ( (! f_hd_arguments( argumentsstack.top() )->eq(Id( Str( mkcasestring( "casestring" ))))) && (! f_hd_arguments( argumentsstack.top() )->eq(Id( Str( mkcasestring( "nocasestring" )))))) { v_report(NonFatal( FileLine( operatorstack.top()->file, operatorstack.top()->line ), Problem1S( "unexpected string subterm" ))); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_pattern_PWildcard::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_pattern_PNonLeafVariable::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const ID v = this->ID_1; const pattern p = this->pattern_1; variables tmp = Consvariables( v, variablesstack.top() ); variablesstack.pop(); variablesstack.push( tmp ); v_extendoccur( v, ITPatternVariable( f_hd_arguments( argumentsstack.top() ), mkinteger(cl_scope) )); kc::unparse(p, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_pattern_POperator::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const ID o = this->ID_1; const patterns p = this->patterns_1; if (f_useoccuroperator( o )) { if (f_Nilarguments( argumentsstack.top() )) { ID o = operatorstack.top(); v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID( "too many subpatterns for operator", o ))); } else if (f_operatorinphylum( o, f_hd_arguments( argumentsstack.top() ))) { argumentsstack.push( f_argumentsofoperator( o )->reverse()); operatorstack.push( o ); kc::unparse(p, kc_printer, kc_current_view); if (! f_Nilarguments( argumentsstack.top() )) { v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID( "too few subpatterns for operator", o ))); } argumentsstack.pop(); operatorstack.pop(); } else { v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID1S1ID( "operator", o, "not in phylum", f_hd_arguments( argumentsstack.top() ) ))); } } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_pattern_PVariable::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const ID v = this->ID_1; variables tmp = Consvariables( v, variablesstack.top() ); variablesstack.pop(); variablesstack.push( tmp ); v_extendoccur( v, ITPatternVariable( f_hd_arguments( argumentsstack.top() ), mkinteger(cl_scope) )); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_patterns::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const pattern p = this->pattern_1; const patterns rp = this->patterns_1; kc::unparse(rp, kc_printer, kc_current_view); if (f_Nilarguments( argumentsstack.top() )) { ID o = operatorstack.top(); v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID( "too many subpatterns for operator", o ))); } else { arguments tmp; kc::unparse(p, kc_printer, kc_current_view); tmp = argumentsstack.top(); argumentsstack.pop(); argumentsstack.push( f_tl_arguments( tmp )); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (patterns iterator_ = this; iterator_->patterns_1 != 0; iterator_ = iterator_->patterns_1) iterator_->pattern_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_patterns::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_term_TIntLiteral::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const INT i = this->INT_1; kc::unparse(i, kc_printer, kc_current_view); } break; } } } void impl_term_TStringLiteral::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const CexpressionDQ str = this->CexpressionDQ_1; { kc_printer(kc_t("\""), kc_current_view); } kc::unparse(str, kc_printer, kc_current_view); { kc_printer(kc_t("\""), kc_current_view); } } break; } } } void impl_term_TCTerm::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const CexpressionSQ Cexpr = this->CexpressionSQ_1; kc::unparse(Cexpr, kc_printer, kc_current_view); } break; } } } void impl_term_TMemberVarDot::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const term t = this->term_1; const ID id = this->ID_1; kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t("."), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); } break; } } } void impl_term_TMemberVar::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const term t = this->term_1; const ID id = this->ID_1; kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t("->"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); } break; } } } void impl_term_TMethodDot::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const term t = this->term_1; const ID id = this->ID_1; const terms ts = this->terms_1; kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t("."), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(ts, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } break; } } } void impl_term_TMethod::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const term t = this->term_1; const ID id = this->ID_1; const terms ts = this->terms_1; kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t("->"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(ts, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } break; } } } void impl_term_TOperator::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ID id = this->ID_1; const terms t = this->terms_1; kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } break; } } } void impl_term_TVariable::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ID id = this->ID_1; kc::unparse(id, kc_printer, kc_current_view); } break; } } } void impl_terms::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->terms_1->prod_sel() == sel_Nilterms)) { const term t = this->term_1; kc::unparse(t, kc_printer, kc_current_view); } else { const term t = this->term_1; const terms r_t = this->terms_1; kc::unparse(r_t, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); } break; } } } void impl_terms::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_fnfiles::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const fnfile f = this->fnfile_1; const fnfiles r_f = this->fnfiles_1; kc::unparse(r_f, kc_printer, kc_current_view); { kc_printer(kc_t("\t\""), kc_current_view); } kc::unparse(f, kc_printer, kc_current_view); { kc_printer(kc_t("\"\n"), kc_current_view); } } break; } } } void impl_fnfiles::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_fnfile_FnFile::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_fndeclarations::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_fnk_c_enum: { view_gen_fnk_c_class& kc_current_view=static_cast(kc_current_view_base); { const fndeclaration fnd = this->fndeclaration_1; const fndeclarations r_fnds = this->fndeclarations_1; kc::unparse(r_fnds, kc_printer, kc_current_view); kc::unparse(fnd, kc_printer, kc_current_view); } break; } case view_gen_fnkdecls_c_enum: { view_gen_fnkdecls_c_class& kc_current_view=static_cast(kc_current_view_base); { const fndeclaration fnd = this->fndeclaration_1; const fndeclarations r_fnds = this->fndeclarations_1; kc::unparse(r_fnds, kc_printer, kc_current_view); kc::unparse(fnd, kc_printer, kc_current_view); } break; } case view_gen_fnk_h_enum: { view_gen_fnk_h_class& kc_current_view=static_cast(kc_current_view_base); { const fndeclaration fnd = this->fndeclaration_1; const fndeclarations r_fnds = this->fndeclarations_1; kc::unparse(r_fnds, kc_printer, kc_current_view); kc::unparse(fnd, kc_printer, kc_current_view); } break; } case view_gen_user_assignment_inis_enum: { view_gen_user_assignment_inis_class& kc_current_view=static_cast(kc_current_view_base); if ((this->fndeclaration_1->prod_sel() == sel_AcMemberDeclaration) && (phylum_cast(this->fndeclaration_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcMemberDecl) && (this->fndeclarations_1->prod_sel() == sel_Nilfndeclarations)) { const ID a_id = phylum_cast(phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ID_2; const ac_constant_expression_option a_cexpr = phylum_cast(this->fndeclaration_1)->ac_constant_expression_option_1; kc::unparse(a_id, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(a_cexpr, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } else if ((this->fndeclaration_1->prod_sel() == sel_AcMemberDeclaration) && (phylum_cast(this->fndeclaration_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcMemberDecl)) { const ID a_id = phylum_cast(phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ID_2; const ac_constant_expression_option a_cexpr = phylum_cast(this->fndeclaration_1)->ac_constant_expression_option_1; const fndeclarations rargs = this->fndeclarations_1; kc::unparse(a_id, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(a_cexpr, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(rargs, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_operatordefs_hash_c_enum: { view_gen_operatordefs_hash_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->fndeclaration_1->prod_sel() == sel_FnAcDeclaration) && (phylum_cast(this->fndeclaration_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId) && (phylum_cast(this->fndeclaration_1)->fnclass_1->prod_sel() == sel_ConstructorFn)) { const fndeclaration decl = this->fndeclaration_1; const ID oid = phylum_cast(phylum_cast(phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1; const ac_parameter_type_list params = phylum_cast(phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_parameter_type_list_1; const fndeclarations tail = this->fndeclarations_1; kc::unparse(tail, kc_printer, kc_current_view); { kc_printer(kc_t("impl_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); if(gl_isnotlist) { { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); } { kc_printer(kc_t("*\n"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(gl_args, kc_printer, view_gen_fnarg_and_decls); if(gl_no_of_args && !f_no_params(params)) { PRINT(","); } kc::unparse(decl->sorted, kc_printer, view_gen_fnk_c); { kc_printer(kc_t(") {\ \n "), kc_current_view); } kc::unparse(gl_args, kc_printer, view_gen_fnarg_asserts); kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_x=new impl_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); if(gl_isnotlist) { { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); } { kc_printer(kc_t("("), kc_current_view); } kc::unparse(gl_args, kc_printer, view_gen_argseqnr_rec); if(gl_no_of_args && !f_no_params(params)) { PRINT(","); } kc::unparse(decl->sorted, kc_printer, view_gen_fnkargs); { kc_printer(kc_t(");\ \n KC_COLLECT_STATS0(KC_CREATE_STATS(sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("));\ \n "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(" unique_kc_x= hashtables["), kc_current_view); } kc::unparse(gl_sto, kc_printer, kc_current_view); { kc_printer(kc_t("]->ht_check_insert(kc_x);\ \n if(unique_kc_x!=kc_x) {\ \n "), kc_current_view); } if(!g_options.smart_pointer) { { kc_printer(kc_t(" delete kc_x;\n"), kc_current_view); } } else { { kc_printer(kc_t(" // kc_x already deleted in ht_check_insert\n"), kc_current_view); } } { kc_printer(kc_t(" kc_x=unique_kc_x;\ \n } else {\ \n KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("));\ \n kc_x->post_create();\ \n"), kc_current_view); } if (f_something_to_initialize( gl_cco )) { { kc_printer(kc_t(" kc_x = kc_initialize_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t("(kc_x);\ \n"), kc_current_view); } } { kc_printer(kc_t(" }\ \n return static_cast(kc_x);\ \n}\ \n\ \n"), kc_current_view); } } else { const fndeclaration head = this->fndeclaration_1; const fndeclarations tail = this->fndeclarations_1; kc::unparse(tail, kc_printer, kc_current_view); } break; } case view_gen_operatordefs_nonhash_c_enum: { view_gen_operatordefs_nonhash_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->fndeclaration_1->prod_sel() == sel_FnAcDeclaration) && (phylum_cast(this->fndeclaration_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId) && (phylum_cast(this->fndeclaration_1)->fnclass_1->prod_sel() == sel_ConstructorFn)) { const fndeclaration decl = this->fndeclaration_1; const ID oid = phylum_cast(phylum_cast(phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1; const ac_parameter_type_list params = phylum_cast(phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_parameter_type_list_1; const fndeclarations tail = this->fndeclarations_1; kc::unparse(tail, kc_printer, kc_current_view); { kc_printer(kc_t("impl_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); if(gl_isnotlist) { { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); } { kc_printer(kc_t("*\n"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(gl_args, kc_printer, view_gen_fnarg_and_decls); if(gl_no_of_args>0 && !f_no_params(params)) { PRINT(","); } kc::unparse(decl->sorted, kc_printer, view_gen_fnk_c); { kc_printer(kc_t(") {\ \n "), kc_current_view); } kc::unparse(gl_args, kc_printer, view_gen_fnarg_asserts); kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_x = new impl_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); if(gl_isnotlist) { { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); } { kc_printer(kc_t("("), kc_current_view); } kc::unparse(gl_args, kc_printer, view_gen_argseqnr_rec); if(gl_no_of_args && !f_no_params(params)) { PRINT(","); } kc::unparse(decl->sorted, kc_printer, view_gen_fnkargs); { kc_printer(kc_t(");\ \n KC_COLLECT_STATS0(KC_CREATE_STATS(sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("));\ \n KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_"), kc_current_view); } kc::unparse(oid, kc_printer, kc_current_view); { kc_printer(kc_t("));\ \n kc_x->post_create();\ \n "), kc_current_view); } if (f_something_to_initialize( gl_cco )) { { kc_printer(kc_t(" kc_x = kc_initialize_"), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t("(kc_x);\ \n "), kc_current_view); } } { kc_printer(kc_t(" return static_cast(kc_x);\ \n "), kc_current_view); } { kc_printer(kc_t("}\ \n\ \n "), kc_current_view); } } else { const fndeclaration head = this->fndeclaration_1; const fndeclarations tail = this->fndeclarations_1; kc::unparse(tail, kc_printer, kc_current_view); } break; } case view_gen_operatordecls_h_enum: { view_gen_operatordecls_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->fndeclaration_1->prod_sel() == sel_FnAcDeclaration) && (phylum_cast(this->fndeclaration_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(this->fndeclaration_1)->fnclass_1->prod_sel() == sel_ConstructorFn)) { const fndeclaration decl = this->fndeclaration_1; const ac_direct_declarator id = phylum_cast(phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1; const ac_parameter_type_list params = phylum_cast(phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_parameter_type_list_1; const fndeclarations tail = this->fndeclarations_1; kc::unparse(tail, kc_printer, kc_current_view); { kc_printer(kc_t("class "), kc_current_view); } kc::unparse(id, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("*\b "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" ("), kc_current_view); } kc::unparse(gl_args, kc_printer, kc_current_view); if(gl_no_of_args && !f_no_params(params)) { PRINT(","); } kc::unparse(decl->sorted, kc_printer, view_gen_fnk_h); { kc_printer(kc_t(");\n"), kc_current_view); } } else { const fndeclaration head = this->fndeclaration_1; const fndeclarations tail = this->fndeclarations_1; kc::unparse(tail, kc_printer, kc_current_view); } break; } case view_count_nonstaticmembers_enum: { view_count_nonstaticmembers_class& kc_current_view=static_cast(kc_current_view_base); if ((this->fndeclaration_1->prod_sel() == sel_AcMemberDeclaration) && (phylum_cast(this->fndeclaration_1)->ac_declaration_specifiers_1->prod_sel() == sel_Consac_declaration_specifiers) && ((phylum_cast(this->fndeclaration_1)->ac_declaration_specifiers_1)->ac_declaration_specifier_1->prod_sel() == sel_AcDeclSpecTypeSpec) && (phylum_cast((phylum_cast(this->fndeclaration_1)->ac_declaration_specifiers_1)->ac_declaration_specifier_1)->ac_type_specifier_1->prod_sel() == sel_AcTypeSpec) && (phylum_cast(this->fndeclaration_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcMemberDecl) && (phylum_cast(this->fndeclaration_1)->fnclass_1->prod_sel() == sel_MemberFn)) { const fndeclaration fd = this->fndeclaration_1; const ID a_type = phylum_cast(phylum_cast((phylum_cast(this->fndeclaration_1)->ac_declaration_specifiers_1)->ac_declaration_specifier_1)->ac_type_specifier_1)->ID_1; const ID a_id = phylum_cast(phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ID_2; const fndeclarations rfd = this->fndeclarations_1; kc::unparse(rfd, kc_printer, kc_current_view); gl_no_of_args++; gl_args=Consarguments(a_type, gl_args); gl_members=Consfndeclarations(fd, gl_members); gl_idents=Consac_identifier_list(a_id, gl_idents); } else { const fndeclarations rfd = this->fndeclarations_1; kc::unparse(rfd, kc_printer, kc_current_view); } break; } case view_count_attrs_enum: { view_count_attrs_class& kc_current_view=static_cast(kc_current_view_base); if ((this->fndeclaration_1->prod_sel() == sel_AcMemberDeclaration) && (phylum_cast(this->fndeclaration_1)->ac_declaration_specifiers_1->prod_sel() == sel_Consac_declaration_specifiers) && ((phylum_cast(this->fndeclaration_1)->ac_declaration_specifiers_1)->ac_declaration_specifier_1->prod_sel() == sel_AcDeclSpecTypeSpec) && (phylum_cast((phylum_cast(this->fndeclaration_1)->ac_declaration_specifiers_1)->ac_declaration_specifier_1)->ac_type_specifier_1->prod_sel() == sel_AcTypeSpec) && (phylum_cast(this->fndeclaration_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcMemberDecl)) { const fndeclaration fd = this->fndeclaration_1; const ID a_type = phylum_cast(phylum_cast((phylum_cast(this->fndeclaration_1)->ac_declaration_specifiers_1)->ac_declaration_specifier_1)->ac_type_specifier_1)->ID_1; const ID a_id = phylum_cast(phylum_cast(phylum_cast(this->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ID_2; const fndeclarations rfd = this->fndeclarations_1; kc::unparse(rfd, kc_printer, kc_current_view); if (fd->is_attr) { gl_no_of_args++; gl_args=Consarguments(a_type, gl_args); gl_members=Consfndeclarations(fd, gl_members); gl_idents=Consac_identifier_list(a_id, gl_idents); } } else { const fndeclarations rfd = this->fndeclarations_1; kc::unparse(rfd, kc_printer, kc_current_view); } break; } case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const fndeclaration a_fnd = this->fndeclaration_1; const fndeclarations r_fnd = this->fndeclarations_1; kc::unparse(r_fnd, kc_printer, kc_current_view); kc::unparse(a_fnd, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const fndeclaration fnd = this->fndeclaration_1; const fndeclarations fnds = this->fndeclarations_1; kc::unparse(fnds, kc_printer, kc_current_view); kc::unparse(fnd, kc_printer, kc_current_view); } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (fndeclarations iterator_ = this; iterator_->fndeclarations_1 != 0; iterator_ = iterator_->fndeclarations_1) iterator_->fndeclaration_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_fndeclarations::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnk_c_enum: { view_gen_fnk_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_fnkdecls_c_enum: { view_gen_fnkdecls_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\ \n#ifndef KC_TRACE_PROVIDED\ \n#define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND\ \n#endif\ \n\ \n"), kc_current_view); } } break; } case view_gen_fnk_h_enum: { view_gen_fnk_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatordefs_hash_c_enum: { view_gen_operatordefs_hash_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatordefs_nonhash_c_enum: { view_gen_operatordefs_nonhash_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_operatordecls_h_enum: { view_gen_operatordecls_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_count_nonstaticmembers_enum: { view_count_nonstaticmembers_class& kc_current_view=static_cast(kc_current_view_base); { gl_no_of_args = 0; gl_args = Nilarguments(); gl_members=Nilfndeclarations(); gl_idents=Nilac_identifier_list(); } break; } case view_count_attrs_enum: { view_count_attrs_class& kc_current_view=static_cast(kc_current_view_base); { gl_no_of_args = 0; gl_args = Nilarguments(); gl_members=Nilfndeclarations(); gl_idents=Nilac_identifier_list(); } break; } case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_fndeclaration_AcMemberDeclaration::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_member_dcl_h_enum: { view_gen_member_dcl_h_class& kc_current_view=static_cast(kc_current_view_base); { const ac_declaration_specifiers fn_ds = this->ac_declaration_specifiers_1; const ac_declarator fn_d = this->ac_declarator_1; kc::unparse(fn_ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(fn_d, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } break; } case view_gen_fnk_c_enum: { view_gen_fnk_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_constant_expression_option_1->prod_sel() == sel_Noac_constant_expression) && (this->fnclass_1->prod_sel() == sel_StaticFn)) { const ac_declaration_specifiers fn_ds = this->ac_declaration_specifiers_1; const ac_declarator fn_d = this->ac_declarator_1; if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(this->last_line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(this->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(fn_ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(fn_d, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } else if ((this->ac_constant_expression_option_1->prod_sel() == sel_Yesac_constant_expression) && (this->fnclass_1->prod_sel() == sel_StaticFn)) { const ac_declaration_specifiers fn_ds = this->ac_declaration_specifiers_1; const ac_declarator fn_d = this->ac_declarator_1; const ac_constant_expression expr = phylum_cast(this->ac_constant_expression_option_1)->ac_constant_expression_1; if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(this->last_line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(this->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(fn_ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(fn_d, kc_printer, kc_current_view); { kc_printer(kc_t("="), kc_current_view); } kc::unparse(expr, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } else if ((this->ac_constant_expression_option_1->prod_sel() == sel_Noac_constant_expression)) { } else goto kc_unparsing_default; break; } case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcMemberDecl) && (this->fnclass_1->prod_sel() == sel_StaticFn) && (KC_TRACE_PROVIDED((is_attr), "util.k", 672, this))) { const ID pid = phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ID_1; const ID aid = phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ID_2; v_report(NonFatal( FileLine(file, last_line) , Problem1S1ID1S1ID( "attribute", aid, "(with %attr) should not be static in phylum", pid))); } else if ((this->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcMemberDecl)) { const ID pid = phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ID_1; const ID aid = phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ID_2; { ID kc_selvar_0_1 = phylum_cast(pid); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUnknown)) { v_report(NonFatal( FileLine(file, last_line), Problem1S1ID1S1ID( "attribute", aid, "is not part of any phylum or operator; defined in", pid))); } else { } } } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } if (f_ispredefinedphylum(pid) && strcmp(f_strofID(pid), "abstract_phylum")!=0 && strcmp(f_strofID(pid), "abstract_list")!=0) v_report(NonFatal( FileLine(this->file, this->last_line) , Problem1S1ID1S1ID( "attribute", aid, "must not be defined in predefined phylum", pid))); if(!f_listelementphylum(f_phylumofoperator(pid))->eq(f_emptyId())) v_report(NonFatal( FileLine(file, last_line) , Problem1S1ID1S1ID( "attribute", aid, "must not be declared in list operator", pid))); } else { } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_fndeclaration_FnAcDeclaration::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_member_dcl_h_enum: { view_gen_member_dcl_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId) && (this->fnclass_1->prod_sel() == sel_ConstructorFn)) { const ac_declaration_specifiers fn_ds = this->ac_declaration_specifiers_1; const ac_declarator fn_d = this->ac_declarator_1; const ID oid = phylum_cast(phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1; const ac_parameter_type_list params = phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_parameter_type_list_1; const fnclass fnc = this->fnclass_1; bool is_ctor=false; { fnclass kc_selvar_0_1 = phylum_cast(fnc); if ((kc_selvar_0_1->prod_sel() == sel_ConstructorFn)) { is_ctor=true; } else { } } kc::unparse(fn_ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } if(!is_ctor) PRINT("~"); kc::unparse(fn_d, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("("), kc_current_view); } arguments args=f_argumentsofoperator(oid); if(is_ctor) { kc::unparse(args, kc_printer, view_count_args); if (f_ispredefinedphylum(f_phylumofoperator(oid))) { kc::unparse(args, kc_printer, view_gen_fnarg_and_decls_predef); } else { kc::unparse(args, kc_printer, view_gen_fnarg_and_decls); } if(gl_no_of_args && !f_no_params(params)) { PRINT(","); } kc::unparse(params, kc_printer, view_gen_fnk_h); } { kc_printer(kc_t(");\ \n"), kc_current_view); } } else if ((this->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId) && (this->fnclass_1->prod_sel() == sel_DestructorFn)) { const ac_declaration_specifiers fn_ds = this->ac_declaration_specifiers_1; const ac_declarator fn_d = this->ac_declarator_1; const ID oid = phylum_cast(phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1; const ac_parameter_type_list params = phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_parameter_type_list_1; const fnclass fnc = this->fnclass_1; bool is_ctor=false; { fnclass kc_selvar_0_1 = phylum_cast(fnc); if ((kc_selvar_0_1->prod_sel() == sel_ConstructorFn)) { is_ctor=true; } else { } } kc::unparse(fn_ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } if(!is_ctor) PRINT("~"); kc::unparse(fn_d, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("("), kc_current_view); } arguments args=f_argumentsofoperator(oid); if(is_ctor) { kc::unparse(args, kc_printer, view_count_args); if (f_ispredefinedphylum(f_phylumofoperator(oid))) { kc::unparse(args, kc_printer, view_gen_fnarg_and_decls_predef); } else { kc::unparse(args, kc_printer, view_gen_fnarg_and_decls); } if(gl_no_of_args && !f_no_params(params)) { PRINT(","); } kc::unparse(params, kc_printer, view_gen_fnk_h); } { kc_printer(kc_t(");\ \n"), kc_current_view); } } else if ((this->fnclass_1->prod_sel() == sel_ConvOperatorFn)) { const ac_declarator fn_d = this->ac_declarator_1; kc::unparse(fn_d, kc_printer, kc_current_view); } else { const ac_declaration_specifiers fn_ds = this->ac_declaration_specifiers_1; const ac_declarator fn_d = this->ac_declarator_1; kc::unparse(fn_ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(fn_d, kc_printer, kc_current_view); } break; } case view_gen_fnk_c_enum: { view_gen_fnk_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId) && (this->fnclass_1->prod_sel() == sel_ConstructorFn)) { const ac_declaration_specifiers fn_ds = this->ac_declaration_specifiers_1; const ac_declarator fn_d = this->ac_declarator_1; const ID oid = phylum_cast(phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1; const ac_parameter_type_list params = phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_parameter_type_list_1; const ac_opt_base_init_list base_init = this->ac_opt_base_init_list_1; const Ctext ct = this->Ctext_1; const fnclass fnc = this->fnclass_1; gl_return_ID = 0; gl_return_type = ""; gl_star_count = f_stars_of_declarator( fn_d ); gl_function = f_strofID(f_id_of_ctor_dtor_decl(fn_d)); gl_operator=oid; bool is_ctor=false; { fnclass kc_selvar_0_1 = phylum_cast(fnc); if ((kc_selvar_0_1->prod_sel() == sel_ConstructorFn)) { is_ctor=true; } else { } } kc::unparse(fn_d, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("::"), kc_current_view); } if(!is_ctor) { PRINT("~"); } kc::unparse(fn_d, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("("), kc_current_view); } arguments args=f_argumentsofoperator(oid); if(is_ctor) { kc::unparse(args, kc_printer, view_count_args); if (f_ispredefinedphylum(f_phylumofoperator(oid))) { kc::unparse(args, kc_printer, view_gen_fnarg_and_decls_predef); } else { kc::unparse(args, kc_printer, view_gen_fnarg_and_decls); } if(gl_no_of_args && !f_no_params(params)) { PRINT(","); } kc::unparse(this->sorted, kc_printer, kc_current_view); } { kc_printer(kc_t(")"), kc_current_view); } kc::unparse(base_init, kc_printer, kc_current_view); { kc_printer(kc_t("\n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t("{"), kc_current_view); } if(is_ctor) { if (f_ispredefinedphylum(f_phylumofoperator(oid))) { kc::unparse(args, kc_printer, view_gen_assignments_predef); } else if(The_abstract_phylum_decl->subphylum(0)->eq(oid)) { if(g_options.smart_pointer) { { kc_printer(kc_t("_ref=0;\ \n "), kc_current_view); } } } else { kc::unparse(args, kc_printer, view_gen_assignments); } } kc::unparse(ct, kc_printer, view_gen_initializephyla_c); { kc_printer(kc_t("\n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(this->last_line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(this->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t("}"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t("\ \n"), kc_current_view); } gl_return_type = ""; gl_return_ID = 0; gl_star_count = 0; gl_function = ""; } else if ((this->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId) && (this->fnclass_1->prod_sel() == sel_DestructorFn)) { const ac_declaration_specifiers fn_ds = this->ac_declaration_specifiers_1; const ac_declarator fn_d = this->ac_declarator_1; const ID oid = phylum_cast(phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1; const ac_parameter_type_list params = phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_parameter_type_list_1; const ac_opt_base_init_list base_init = this->ac_opt_base_init_list_1; const Ctext ct = this->Ctext_1; const fnclass fnc = this->fnclass_1; gl_return_ID = 0; gl_return_type = ""; gl_star_count = f_stars_of_declarator( fn_d ); gl_function = f_strofID(f_id_of_ctor_dtor_decl(fn_d)); gl_operator=oid; bool is_ctor=false; { fnclass kc_selvar_0_1 = phylum_cast(fnc); if ((kc_selvar_0_1->prod_sel() == sel_ConstructorFn)) { is_ctor=true; } else { } } kc::unparse(fn_d, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("::"), kc_current_view); } if(!is_ctor) { PRINT("~"); } kc::unparse(fn_d, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("("), kc_current_view); } arguments args=f_argumentsofoperator(oid); if(is_ctor) { kc::unparse(args, kc_printer, view_count_args); if (f_ispredefinedphylum(f_phylumofoperator(oid))) { kc::unparse(args, kc_printer, view_gen_fnarg_and_decls_predef); } else { kc::unparse(args, kc_printer, view_gen_fnarg_and_decls); } if(gl_no_of_args && !f_no_params(params)) { PRINT(","); } kc::unparse(this->sorted, kc_printer, kc_current_view); } { kc_printer(kc_t(")"), kc_current_view); } kc::unparse(base_init, kc_printer, kc_current_view); { kc_printer(kc_t("\n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t("{"), kc_current_view); } if(is_ctor) { if (f_ispredefinedphylum(f_phylumofoperator(oid))) { kc::unparse(args, kc_printer, view_gen_assignments_predef); } else if(The_abstract_phylum_decl->subphylum(0)->eq(oid)) { if(g_options.smart_pointer) { { kc_printer(kc_t("_ref=0;\ \n "), kc_current_view); } } } else { kc::unparse(args, kc_printer, view_gen_assignments); } } kc::unparse(ct, kc_printer, view_gen_initializephyla_c); { kc_printer(kc_t("\n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(this->last_line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(this->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t("}"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t("\ \n"), kc_current_view); } gl_return_type = ""; gl_return_ID = 0; gl_star_count = 0; gl_function = ""; } else if ((this->fnclass_1->prod_sel() == sel_ConvOperatorFn)) { const ac_declaration_specifiers fn_ds = this->ac_declaration_specifiers_1; const ac_declarator fn_d = this->ac_declarator_1; const Ctext ct = this->Ctext_1; const ID fn_name = this->ID_1; const fnclass fnc = this->fnclass_1; gl_return_ID = 0; gl_return_type = ""; gl_star_count = f_stars_of_declarator( fn_d ); gl_function = f_strofID( fn_name ); kc::unparse(fn_d, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("()"), kc_current_view); } kc::unparse(fn_d, kc_printer, view_gen_opt_const); { kc_printer(kc_t("\n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t("{"), kc_current_view); } kc::unparse(ct, kc_printer, view_gen_initializephyla_c); { kc_printer(kc_t("\n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(this->last_line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(this->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t("}"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t("\ \n"), kc_current_view); } gl_return_type = ""; gl_return_ID = 0; gl_star_count = 0; gl_function = ""; } else { const ac_declaration_specifiers fn_ds = this->ac_declaration_specifiers_1; const ac_declarator fn_d = this->ac_declarator_1; const Ctext ct = this->Ctext_1; const ID fn_name = this->ID_1; const fnclass fnc = this->fnclass_1; gl_return_ID = f_ID_of_ac_declaration_specifiers( fn_ds ); gl_return_type = f_strofID( gl_return_ID ); gl_star_count = f_stars_of_declarator( fn_d ); gl_function = f_strofID( fn_name ); if (strcmp(gl_function, "main")==0) PRINT("} // namespace kc\n"); kc::unparse(fnc, kc_printer, kc_current_view); kc::unparse(fn_ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(fn_d, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(this->sorted, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } kc::unparse(fn_d, kc_printer, view_gen_opt_const); { kc_printer(kc_t("\n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t("{"), kc_current_view); } kc::unparse(ct, kc_printer, view_gen_initializephyla_c); { kc_printer(kc_t("\n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(this->last_line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(this->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t("}"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t("\ \n"), kc_current_view); } gl_return_type = ""; gl_return_ID = 0; gl_star_count = 0; if (strcmp(gl_function, "main")==0) PRINT("namespace kc {\r\n"); gl_function = ""; } break; } case view_gen_fnkdecls_c_enum: { view_gen_fnkdecls_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->fnclass_1->prod_sel() == sel_GlobalFn)) { } else if ((this->fnclass_1->prod_sel() == sel_MemberFn)) { } else if ((this->fnclass_1->prod_sel() == sel_ConstructorFn)) { } else if ((this->fnclass_1->prod_sel() == sel_DestructorFn)) { } else if ((this->fnclass_1->prod_sel() == sel_ConvOperatorFn)) { } else if ((this->fnclass_1->prod_sel() == sel_StaticFn)) { const ac_declaration_specifiers fn_ds = this->ac_declaration_specifiers_1; const ac_declarator fn_d = this->ac_declarator_1; const fnclass fn_c = this->fnclass_1; kc::unparse(fn_c, kc_printer, kc_current_view); kc::unparse(fn_ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(fn_d, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t(" ("), kc_current_view); } kc::unparse(this->sorted, kc_printer, kc_current_view); { kc_printer(kc_t(");\ \n"), kc_current_view); } } else goto kc_unparsing_default; break; } case view_gen_fnk_h_enum: { view_gen_fnk_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ID_1->prod_sel() == sel_Id) && (phylum_cast(this->ID_1)->uniqID_1->prod_sel() == sel_Str) && (kc_strcmp(phylum_cast(phylum_cast(this->ID_1)->uniqID_1)->casestring_1->name, kc_t("main"))==0) && (this->fnclass_1->prod_sel() == sel_GlobalFn)) { } else if ((this->fnclass_1->prod_sel() == sel_GlobalFn)) { const ac_declaration_specifiers fn_ds = this->ac_declaration_specifiers_1; const ac_declarator fn_d = this->ac_declarator_1; kc::unparse(fn_ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(fn_d, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t(" ("), kc_current_view); } kc::unparse(this->sorted, kc_printer, kc_current_view); { kc_printer(kc_t(");\ \n"), kc_current_view); } } else if ((this->fnclass_1->prod_sel() == sel_StaticFn)) { } else if ((this->fnclass_1->prod_sel() == sel_MemberFn)) { } else if ((this->fnclass_1->prod_sel() == sel_ConstructorFn)) { } else if ((this->fnclass_1->prod_sel() == sel_DestructorFn)) { } else if ((this->fnclass_1->prod_sel() == sel_ConvOperatorFn)) { } else goto kc_unparsing_default; break; } case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const Ctext ct = this->Ctext_1; kc::unparse(ct, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_declaration_specifiers_1->prod_sel() == sel_Nilac_declaration_specifiers) && (this->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(this->ac_declarator_1)->ac_pointer_option_1->prod_sel() == sel_Nopointer) && (phylum_cast(this->ac_declarator_1)->ac_ref_option_1->prod_sel() == sel_AcNoRef) && (phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_class_qualifier_list_1->prod_sel() == sel_Nilac_class_qualifier_list) && (phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId) && (phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_type_qualifier_1->prod_sel() == sel_AcNoQualifier) && (this->ac_declaration_list_1->prod_sel() == sel_Nilac_declaration_list) && (this->fnclass_1->prod_sel() == sel_ConstructorFn)) { const ID pid = phylum_cast(phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1; const Ctext ct = this->Ctext_1; kc::unparse(ct, kc_printer, kc_current_view); { ID kc_selvar_0_1 = phylum_cast(pid); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUnknown)) { v_report(Warning( FileLine(file, last_line), Problem1S1ID( "constructor does not belong to phylum or operator:", pid))); } else { } } } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } } else if ((this->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(this->ac_declarator_1)->ac_pointer_option_1->prod_sel() == sel_Nopointer) && (phylum_cast(this->ac_declarator_1)->ac_ref_option_1->prod_sel() == sel_AcNoRef) && (phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_class_qualifier_list_1->prod_sel() == sel_Nilac_class_qualifier_list) && (phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId) && (phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_parameter_type_list_1->prod_sel() == sel_AcParList) && (phylum_cast(phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_parameter_type_list_1)->ac_parameter_list_1->prod_sel() == sel_Nilac_parameter_list) && (phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_type_qualifier_1->prod_sel() == sel_AcNoQualifier) && (this->ac_declaration_list_1->prod_sel() == sel_Nilac_declaration_list) && (this->ac_opt_base_init_list_1->prod_sel() == sel_AcNoBaseInit) && (this->fnclass_1->prod_sel() == sel_DestructorFn)) { const ID pid = phylum_cast(phylum_cast(phylum_cast(this->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1; const Ctext ct = this->Ctext_1; kc::unparse(ct, kc_printer, kc_current_view); { ID kc_selvar_0_1 = phylum_cast(pid); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUnknown)) { v_report(Warning( FileLine(file, last_line), Problem1S1ID( "destructor does not belong to phylum or operator:", pid))); } else { } } } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } } else { const Ctext ct = this->Ctext_1; kc::unparse(ct, kc_printer, kc_current_view); } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_fnclass_ConvOperatorFn::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_fnclass_DestructorFn::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_fnclass_ConstructorFn::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_fnclass_MemberFn::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_fnclass_StaticFn::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { { kc_printer(kc_t("static "), kc_current_view); } } break; } } } void impl_fnclass_GlobalFn::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnk_c_enum: { view_gen_fnk_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_Ctext::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { gl_print_line_directive = false; Ctext inversion_ = this->reverse(); for (Ctext iterator_ = inversion_; iterator_->Ctext_1 != 0; iterator_ = iterator_->Ctext_1) iterator_->Ctext_elem_1->unparse(kc_printer, kc_current_view); inversion_->freelist(); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (Ctext iterator_ = this; iterator_->Ctext_1 != 0; iterator_ = iterator_->Ctext_1) iterator_->Ctext_elem_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_Ctext::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_Ctext_elem_CTextWithexpression::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const withcases wc = this->withcases_1; kc::unparse(wc, kc_printer, kc_current_view); check_with_patterns(wc->wcinfo); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const Ctext_elem ctw = this/**/; const withexpressions wexpr = this->withexpressions_1; const withcases wcs = this->withcases_1; const contextinfo in_foreach_context = this->contextinfo_1; if (wcs->wcinfo) { ID selvar; int p; patternchain fe_pc = 0; withcasesinfo rewr_wcinfo = rewrite_withcasesinfo(wcs->wcinfo); { contextinfo kc_selvar_0_1 = phylum_cast(in_foreach_context); if ((kc_selvar_0_1->prod_sel() == sel_NotInForeachContext)) { selvar = f_mkselvar("kc_selvar_", g_ctext_level); selvar->line = ctw->line; selvar->file = ctw->file; cf_pushselvar( selvar ); inforeachcontext.push(0); } else if ((kc_selvar_0_1->prod_sel() == sel_InForeachContext)) { const patternchain mp = phylum_cast(kc_selvar_0_1)->patternchain_1; selvar = cf_topselvar(); inforeachcontext.push(1); fe_pc = mp; } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } { kc_printer(kc_t("{\ \n"), kc_current_view); } if (! inforeachcontext.top()) { kc::unparse(wexpr, kc_printer, kc_current_view); } if (! inforeachcontext.top()) { dollarvarstack.push( selvar ); dollarvarextstack.push( Id(Str(mkcasestring("_1"))) ); } else if ((p = pos_of_sole_dollar_or_pattern_in_patternchain(fe_pc)) >= 0) { dollarvarstack.push( selvar ); dollarvarextstack.push( f_mkselvar("_", p) ); } kc::unparse(rewr_wcinfo, kc_printer, view_gen_withcases_and_default); if (! inforeachcontext.top()) { cf_popselvar(); dollarvarstack.pop(); dollarvarextstack.pop(); } else if (p >= 0) { dollarvarstack.pop(); dollarvarextstack.pop(); } inforeachcontext.pop(); { kc_printer(kc_t("}\ \n"), kc_current_view); } gl_print_line_directive = true; } else { v_report(NonFatal( FileLine( this->file, this->line ), Problem1S( "internal error: no info for withcases of CTextWithexpression" ))); } } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const withexpressions we = this->withexpressions_1; const withcases wc = this->withcases_1; const contextinfo in_foreach_context = this->contextinfo_1; withexpressionsstack.push( we ); { contextinfo kc_selvar_0_1 = phylum_cast(in_foreach_context); if ((kc_selvar_0_1->prod_sel() == sel_NotInForeachContext)) { inforeachcontext.push(0); phylumnamesstack.push( we->type ); } else if ((kc_selvar_0_1->prod_sel() == sel_InForeachContext)) { inforeachcontext.push(1); } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } if (we->length() == 1) { dollarvarsallowed.push( DVAllowed() ); } else { dollarvarsallowed.push( DVDisallowed() ); } kc::unparse(wc, kc_printer, kc_current_view); kc::unparse(wc, kc_printer, view_set_type); we->type = phylumnamesstack.top(); withexpressionsstack.pop(); dollarvarsallowed.pop(); kc::unparse(we, kc_printer, kc_current_view); if (! inforeachcontext.top() ) { phylumnamesstack.pop(); } inforeachcontext.pop(); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_Ctext_elem_CTextForeachexpression::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const Ctext ct = this->Ctext_1; const foreach_after fa = this->foreach_after_1; kc::unparse(ct, kc_printer, kc_current_view); kc::unparse(fa, kc_printer, kc_current_view); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const idCexpressions idcexpr = this->idCexpressions_1; const Ctext ct = this->Ctext_1; const foreach_after fa = this->foreach_after_1; ID selvar = f_mkselvar("kc_selvar_", g_ctext_level); selvar->line = this->line; selvar->file = this->file; cf_pushselvar( selvar ); { kc_printer(kc_t("{\ \n"), kc_current_view); } kc::unparse(idcexpr, kc_printer, kc_current_view); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t("while(\ \n"), kc_current_view); } kc::unparse(idcexpr, kc_printer, view_gen_initializephyla_whiletest_c); { kc_printer(kc_t(" ) {\ \n"), kc_current_view); } kc::unparse(idcexpr, kc_printer, view_gen_initializephyla_init_el_c); { kc_printer(kc_t("{\n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(ct, kc_printer, kc_current_view); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t("}\ \n"), kc_current_view); } kc::unparse(idcexpr, kc_printer, view_gen_initializephyla_update_loop_c); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t("}\ \n"), kc_current_view); } cf_popselvar(); selvar = Id(Str(mkcasestring("kc_fe_selvar"))); selvar->line = fa->line; selvar->file = fa->file; cf_pushselvar( selvar ); kc::unparse(fa, kc_printer, kc_current_view); { kc_printer(kc_t("}\ \n"), kc_current_view); } cf_popselvar(); gl_print_line_directive = true; } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const idCexpressions ide = this->idCexpressions_1; const Ctext ct = this->Ctext_1; const foreach_after fa = this->foreach_after_1; phylumnames tmp = f_phylumnames_foreachwith_vars( ide ); phylumnamesstack.push( tmp ); kc::unparse(ide, kc_printer, kc_current_view); kc::unparse(ct, kc_printer, kc_current_view); phylumnamesstack.pop(); kc::unparse(fa, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_Ctext_elem_CTextCbody::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const Ctext ct = this->Ctext_1; kc::unparse(ct, kc_printer, kc_current_view); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const Ctext ct = this->Ctext_1; if (gl_print_line_directive) { if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(this->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(this->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } gl_print_line_directive = false; } { kc_printer(kc_t("{"), kc_current_view); } kc::unparse(ct, kc_printer, kc_current_view); { kc_printer(kc_t("}"), kc_current_view); } if (gl_print_line_directive) { { kc_printer(kc_t("\ \n"), kc_current_view); } } } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const Ctext ct = this->Ctext_1; kc::unparse(ct, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_Ctext_elem_CTextCexpressionSQ::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionSQ cesq = this->CexpressionSQ_1; if (gl_print_line_directive) { if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(this->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(this->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } gl_print_line_directive = false; } { kc_printer(kc_t("'"), kc_current_view); } kc::unparse(cesq, kc_printer, kc_current_view); { kc_printer(kc_t("'"), kc_current_view); } } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_Ctext_elem_CTextCexpressionDQ::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionDQ cedq = this->CexpressionDQ_1; if (gl_print_line_directive) { if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(this->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(this->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } gl_print_line_directive = false; } { kc_printer(kc_t("\""), kc_current_view); } kc::unparse(cedq, kc_printer, kc_current_view); { kc_printer(kc_t("\""), kc_current_view); } } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_Ctext_elem_CTextNl::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const integer i = this->integer_1; charruns nl_string = Newlines(); if (gl_print_line_directive) { if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(this->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(this->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } gl_print_line_directive = false; nl_string->set(i->value - 1); } else { nl_string->set(i->value); } kc::unparse(nl_string, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_Ctext_elem_CTextDollarVar::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const INT i = this->INT_1; ID oid = f_emptyId(), dollarvar = dollarvarstack.top(), dollarvarext = dollarvarextstack.top(); argument arg; bool nulvar = true; { INT kc_selvar_0_1 = phylum_cast( i ); if ((kc_selvar_0_1->prod_sel() == sel_Int)) { const integer ii = phylum_cast(kc_selvar_0_1)->integer_1; if (ii->value != 0) { nulvar = false; oid = operatorstack.top(); arg = f_argumentofoperator( oid, i ); } } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } if (nulvar) { kc::unparse(dollarvar, kc_printer, kc_current_view); kc::unparse(dollarvarext, kc_printer, kc_current_view); } else { kc::unparse(dollarvar, kc_printer, kc_current_view); kc::unparse(dollarvarext, kc_printer, kc_current_view); { kc_printer(kc_t("->"), kc_current_view); } kc::unparse(arg, kc_printer, kc_current_view); arg->free( false ); } } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); if ((this->INT_1->prod_sel() == sel_Int)) { const INT i = this->INT_1; const integer iv = phylum_cast(this->INT_1)->integer_1; if ( f_DvIsDisallowed( dollarvarsallowed.top() )) { v_report(NonFatal( FileLine( i->file, i->line ), Problem1S1INT( "illegal dollar variable (not allowed in &-ed pattern context)", i ))); } else if (!outmostoperators.empty()) { v_check_dollarvar_attribute_in_operators( i, Nilunpattributes(), outmostoperators.top() ); } else if (iv->value != 0) { v_report(NonFatal( FileLine( i->file, i->line ), Problem1S1INT( "illegal dollar variable", i ))); } } else goto kc_unparsing_default; break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_Ctext_elem_CTextLine::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const casestring cs = this->casestring_1; if (gl_print_line_directive) { if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(this->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(this->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } gl_print_line_directive = false; } kc::unparse(cs, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_foreach_after_ForeachAfter::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const Ctext ct = this->Ctext_1; kc::unparse(ct, kc_printer, kc_current_view); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const Ctext ct = this->Ctext_1; { kc_printer(kc_t("{\n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(ct, kc_printer, kc_current_view); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t("}\ \n"), kc_current_view); } } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const patternchain mp = this->patternchain_1; const idCexpressions ide = this->idCexpressions_1; const Ctext ct = this->Ctext_1; phylumnames tmp = f_phylumnames_foreachwith_listvars( ide ); phylumnamesstack.push( tmp ); kc::unparse(ct, kc_printer, kc_current_view); phylumnamesstack.pop(); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_foreach_after_NoForeachAfter::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_contextinfo_NotInForeachContext::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_contextinfo_InForeachContext::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_withexpressions::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const withexpression h = this->withexpression_1; const withexpressions t = this->withexpressions_1; ID selvar = cf_topselvar(); kc::unparse(t, kc_printer, kc_current_view); g_withexpr_nr++; if (h->line) { if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(h->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(h->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } } assertCond( ! (h->type->eq( f_emptyId())) ); kc::unparse(h->type, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(selvar, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(g_withexpr_nr, kc_printer, kc_current_view); { kc_printer(kc_t(" = phylum_cast<"), kc_current_view); } kc::unparse(h->type, kc_printer, kc_current_view); { kc_printer(kc_t(">("), kc_current_view); } kc::unparse(h, kc_printer, kc_current_view); { kc_printer(kc_t(");\ \n"), kc_current_view); } } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const withexpression h = this->withexpression_1; const withexpressions t = this->withexpressions_1; ID tmp_type = 0; phylumnames tmp_types = 0; t->type = phylumnamesstack.top(); { phylumnames kc_selvar_0_1 = phylum_cast( t->type ); if ((kc_selvar_0_1->prod_sel() == sel_Nilphylumnames)) { tmp_type = f_emptyId(); tmp_types = Nilphylumnames(); } else if ((kc_selvar_0_1->prod_sel() == sel_Consphylumnames)) { const ID p_h = (kc_selvar_0_1)->ID_1; const phylumnames p_t = (kc_selvar_0_1)->phylumnames_1; tmp_type = p_h; tmp_types = p_t; } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } phylumnamesstack.pop(); phylumnamesstack.push( tmp_types ); kc::unparse(t, kc_printer, kc_current_view); h->type = tmp_type; if (tmp_type->eq( f_emptyId())) { v_report(NonFatal( FileLine( h->file, h->line ), Problem1S1we( "could not infer type of with-expression argument:", h ))); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (withexpressions iterator_ = this; iterator_->withexpressions_1 != 0; iterator_ = iterator_->withexpressions_1) iterator_->withexpression_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_withexpressions::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { g_withexpr_nr = 0; } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_withexpression_WECexpression::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const Cexpression cexpr = this->Cexpression_1; kc::unparse(cexpr, kc_printer, kc_current_view); } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const Cexpression ce = this->Cexpression_1; kc::unparse(ce, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_withexpression_WEVariable::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; kc::unparse(id, kc_printer, kc_current_view); } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const ID i = this->ID_1; kc::unparse(i, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_withcases::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const withcase wc = this->withcase_1; const withcases r_wcs = this->withcases_1; kc::unparse(wc, kc_printer, kc_current_view); kc::unparse(r_wcs, kc_printer, kc_current_view); this->wcinfo = r_wcs->wcinfo; { withcasesinfo kc_fe_selvar_1 = wc->wcinfo ; while( kc_fe_selvar_1->prod_sel() == sel_Conswithcasesinfo ) { withcaseinfo kc_selvar_0_1 = kc_fe_selvar_1->withcaseinfo_1; { { { const withcaseinfo wci = kc_selvar_0_1; this->wcinfo = insertin_withcasesinfo( wci, this->wcinfo ); } } } kc_fe_selvar_1 = kc_fe_selvar_1->withcasesinfo_1; } } } break; } case view_set_type_enum: { view_set_type_class& kc_current_view=static_cast(kc_current_view_base); { const withcase wc = this->withcase_1; const withcases wcs = this->withcases_1; kc::unparse(wcs, kc_printer, kc_current_view); kc::unparse(wc, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const withcase wc = this->withcase_1; const withcases wcs = this->withcases_1; kc::unparse(wcs, kc_printer, kc_current_view); kc::unparse(wc, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (withcases iterator_ = this; iterator_->withcases_1 != 0; iterator_ = iterator_->withcases_1) iterator_->withcase_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_withcases::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { this->wcinfo = Nilwithcasesinfo(); } break; } case view_set_type_enum: { view_set_type_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_withcase_Withcase::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const patternchains mp = this->patternchains_1; const Ctext ct = this->Ctext_1; kc::unparse(ct, kc_printer, kc_current_view); v_resetbindingidmarks(); this->wcinfo = f_withcasesinfo( add_predicates_to_patternrepresentations( syn_patternchains( mp ) ), ct ); } break; } case view_set_type_enum: { view_set_type_class& kc_current_view=static_cast(kc_current_view_base); { const patternchains mp = this->patternchains_1; kc::unparse(mp, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const patternchains mp = this->patternchains_1; const Ctext ct = this->Ctext_1; outmostoperators.push( Niloperators() ); variablesstack.push( Nilvariables()); cl_scope++; kc::unparse(mp, kc_printer, kc_current_view); kc::unparse(ct, kc_printer, kc_current_view); outmostoperators.top()->freelist(); outmostoperators.pop(); v_reset_variables_type( variablesstack.top() ); cl_scope--; variablesstack.top()->freelist(); variablesstack.pop(); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unparsedeclarations::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_checklanguagenames_enum: { view_checklanguagenames_class& kc_current_view=static_cast(kc_current_view_base); { const unparsedeclaration ud = this->unparsedeclaration_1; const unparsedeclarations uds = this->unparsedeclarations_1; kc::unparse(uds, kc_printer, kc_current_view); kc::unparse(ud, kc_printer, kc_current_view); } break; } case view_check_viewnames_enum: { view_check_viewnames_class& kc_current_view=static_cast(kc_current_view_base); { const unparsedeclaration ud = this->unparsedeclaration_1; const unparsedeclarations uds = this->unparsedeclarations_1; kc::unparse(uds, kc_printer, kc_current_view); kc::unparse(ud, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const unparsedeclaration ud = this->unparsedeclaration_1; const unparsedeclarations uds = this->unparsedeclarations_1; kc::unparse(uds, kc_printer, kc_current_view); kc::unparse(ud, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (unparsedeclarations iterator_ = this; iterator_->unparsedeclarations_1 != 0; iterator_ = iterator_->unparsedeclarations_1) iterator_->unparsedeclaration_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_unparsedeclarations::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_checklanguagenames_enum: { view_checklanguagenames_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_viewnames_enum: { view_check_viewnames_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_unparsedeclaration_UnparseDeclaration::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_checklanguagenames_enum: { view_checklanguagenames_class& kc_current_view=static_cast(kc_current_view_base); { const unparseclauses uc = this->unparseclauses_1; kc::unparse(uc, kc_printer, kc_current_view); } break; } case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const outmostpatterns op = this->outmostpatterns_1; const unparseclauses uc = this->unparseclauses_1; kc::unparse(uc, kc_printer, kc_current_view); v_resetbindingidmarks(); this->patternreps = syn_outmostpatterns( op ); this->patternreps = add_predicates_to_patternrepresentations(this->patternreps); v_add_unparsedeclsinfo_to_operator( this->patternreps, uc ); } break; } case view_check_viewnames_enum: { view_check_viewnames_class& kc_current_view=static_cast(kc_current_view_base); { const unparseclauses uc = this->unparseclauses_1; kc::unparse(uc, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const outmostpatterns op = this->outmostpatterns_1; const unparseclauses uc = this->unparseclauses_1; outmostoperators.push( Niloperators() ); dollarvarsallowed.push( DVAllowed() ); phylumstack.push( f_emptyId() ); variablesstack.push( Nilvariables()); cl_scope++; kc::unparse(op, kc_printer, kc_current_view); kc::unparse(uc, kc_printer, kc_current_view); outmostoperators.top()->freelist(); outmostoperators.pop(); dollarvarsallowed.pop(); phylumstack.pop(); v_reset_variables_type( variablesstack.top() ); cl_scope--; variablesstack.top()->freelist(); variablesstack.pop(); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unparseclauses::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_checklanguagenames_enum: { view_checklanguagenames_class& kc_current_view=static_cast(kc_current_view_base); { const unparseclause uc = this->unparseclause_1; const unparseclauses ucs = this->unparseclauses_1; kc::unparse(ucs, kc_printer, kc_current_view); kc::unparse(uc, kc_printer, kc_current_view); } break; } case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const unparseclause a_uc = this->unparseclause_1; const unparseclauses r_uc = this->unparseclauses_1; kc::unparse(r_uc, kc_printer, kc_current_view); kc::unparse(a_uc, kc_printer, kc_current_view); } break; } case view_check_viewnames_enum: { view_check_viewnames_class& kc_current_view=static_cast(kc_current_view_base); { const unparseclause uc = this->unparseclause_1; const unparseclauses ucs = this->unparseclauses_1; kc::unparse(ucs, kc_printer, kc_current_view); kc::unparse(uc, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const unparseclause uc = this->unparseclause_1; const unparseclauses ucs = this->unparseclauses_1; kc::unparse(ucs, kc_printer, kc_current_view); kc::unparse(uc, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (unparseclauses iterator_ = this; iterator_->unparseclauses_1 != 0; iterator_ = iterator_->unparseclauses_1) iterator_->unparseclause_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_unparseclauses::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_checklanguagenames_enum: { view_checklanguagenames_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_viewnames_enum: { view_check_viewnames_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_unparseclause_UnparseClause::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_checklanguagenames_enum: { view_checklanguagenames_class& kc_current_view=static_cast(kc_current_view_base); { const unparseitems ui = this->unparseitems_1; kc::unparse(ui, kc_printer, kc_current_view); } break; } case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const unparseitems ui = this->unparseitems_1; kc::unparse(ui, kc_printer, kc_current_view); } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const unparseitems ui = this->unparseitems_1; kc::unparse(ui, kc_printer, kc_current_view); } break; } case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const unparseitems u_i = this->unparseitems_1; kc::unparse(u_i, kc_printer, kc_current_view); } break; } case view_check_viewnames_enum: { view_check_viewnames_class& kc_current_view=static_cast(kc_current_view_base); { const unparseitems ui = this->unparseitems_1; The_current_unparseitems=ui; kc::unparse(ui, kc_printer, kc_current_view); The_current_unparseitems=NULL; } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const viewnames vn = this->viewnames_1; const unparseitems ui = this->unparseitems_1; kc::unparse(vn, kc_printer, view_check_u); kc::unparse(ui, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_viewnames::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_rview_class_def_enum: { view_rview_class_def_class& kc_current_view=static_cast(kc_current_view_base); { const viewnames node = this/**/; const ID vn = this->ID_1; const viewnames r_vn = this->viewnames_1; kc::unparse(r_vn, kc_printer, kc_current_view); if(!node->is_extern) { { kc_printer(kc_t("struct "), kc_current_view); } if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_class: rview_class {\ \n "), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_class():rview_class("), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_enum){}\ \n};\ \nextern "), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_class "), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } else { { kc_printer(kc_t("class "), kc_current_view); } if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_baseclass: public rview_class {\ \n\rprotected:\v\ \n "), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_baseclass():rview_class("), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_enum){}\ \n};\ \n// class "), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_class is defined externally\ \n"), kc_current_view); } } } break; } case view_uview_class_def_enum: { view_uview_class_def_class& kc_current_view=static_cast(kc_current_view_base); { const viewnames node = this/**/; const ID vn = this->ID_1; const viewnames r_vn = this->viewnames_1; kc::unparse(r_vn, kc_printer, kc_current_view); if(!node->is_extern) { { kc_printer(kc_t("struct "), kc_current_view); } if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_class: uview_class {\ \n "), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_class():uview_class("), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_enum){}\ \n};\ \nextern "), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_class "), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } else { { kc_printer(kc_t("class "), kc_current_view); } if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_baseclass: public uview_class {\ \n\rprotected:\v\ \n "), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_baseclass():uview_class("), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_enum){}\ \n};\ \n// class "), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_class is defined externally\ \n"), kc_current_view); } } } break; } case view_gen_viewvars_c_enum: { view_gen_viewvars_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->viewnames_1->prod_sel() == sel_Nilviewnames)) { const viewnames node = this/**/; const ID vn = this->ID_1; if(!node->is_extern) { kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_class "), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } } else { const viewnames node = this/**/; const ID vn = this->ID_1; const viewnames r_vn = this->viewnames_1; kc::unparse(r_vn, kc_printer, kc_current_view); if(!node->is_extern) { kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_class "), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } } break; } case view_gen_unpk_c_enum: { view_gen_unpk_c_class& kc_current_view=static_cast(kc_current_view_base); { const viewnames node = this/**/; const ID vn = this->ID_1; const viewnames r_vn = this->viewnames_1; kc::unparse(r_vn, kc_printer, kc_current_view); if(!node->is_extern) { { kc_printer(kc_t("{\""), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("\",&"), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("},\ \n "), kc_current_view); } } else { { kc_printer(kc_t("{\""), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("\", 0},\ \n "), kc_current_view); } } } break; } case view_uview_def_enum: { view_uview_def_class& kc_current_view=static_cast(kc_current_view_base); { const ID vn = this->ID_1; const viewnames r_vn = this->viewnames_1; kc::unparse(r_vn, kc_printer, kc_current_view); kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_enum"), kc_current_view); } { kc_printer(kc_t(",\n\t"), kc_current_view); } } break; } case view_gen_unparsedecls_h_enum: { view_gen_unparsedecls_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->viewnames_1->prod_sel() == sel_Nilviewnames)) { const ID vn = this->ID_1; { kc_printer(kc_t("\t"), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); } else { const ID vn = this->ID_1; const viewnames r_vn = this->viewnames_1; kc::unparse(r_vn, kc_printer, kc_current_view); { kc_printer(kc_t(",\n\t"), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); } break; } case view_gen_rewritek_c_enum: { view_gen_rewritek_c_class& kc_current_view=static_cast(kc_current_view_base); { const viewnames node = this/**/; const ID vn = this->ID_1; const viewnames r_vn = this->viewnames_1; kc::unparse(r_vn, kc_printer, kc_current_view); if(!node->is_extern) { { kc_printer(kc_t("{\""), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("\",&"), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("},\ \n "), kc_current_view); } } else { { kc_printer(kc_t("{\""), kc_current_view); } kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("\", 0},\ \n "), kc_current_view); } } } break; } case view_gen_rewritek_h_enum: { view_gen_rewritek_h_class& kc_current_view=static_cast(kc_current_view_base); { const ID vn = this->ID_1; const viewnames r_vn = this->viewnames_1; kc::unparse(r_vn, kc_printer, kc_current_view); kc::unparse(vn, kc_printer, kc_current_view); { kc_printer(kc_t("_enum"), kc_current_view); } { kc_printer(kc_t(",\n\t"), kc_current_view); } } break; } case view_check_r_enum: { view_check_r_class& kc_current_view=static_cast(kc_current_view_base); { const ID vn = this->ID_1; const viewnames vns = this->viewnames_1; kc::unparse(vns, kc_printer, kc_current_view); if (pg_rviewshavebeendefined) f_useoccurrviewname( vn ); else v_extendoccur_nowarning( vn, ITUserRView() ); v_add_to_rviewnames( vn ); } break; } case view_check_u_enum: { view_check_u_class& kc_current_view=static_cast(kc_current_view_base); { const ID vn = this->ID_1; const viewnames vns = this->viewnames_1; kc::unparse(vns, kc_printer, kc_current_view); if (pg_uviewshavebeendefined) f_useoccuruviewname( vn ); else v_extendoccur_nowarning( vn, ITUserUView() ); v_add_to_uviewnames( vn ); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (viewnames iterator_ = this; iterator_->viewnames_1 != 0; iterator_ = iterator_->viewnames_1) iterator_->ID_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_viewnames::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_viewvars_c_enum: { view_gen_viewvars_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_unpk_c_enum: { view_gen_unpk_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_uview_def_enum: { view_uview_def_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_unparsedecls_h_enum: { view_gen_unparsedecls_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_rewritek_c_enum: { view_gen_rewritek_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_rewritek_h_enum: { view_gen_rewritek_h_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_r_enum: { view_check_r_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_u_enum: { view_check_u_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_unparseitems::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_output_collection_enum: { view_output_collection_class& kc_current_view=static_cast(kc_current_view_base); if ((this->unparseitems_1->prod_sel() == sel_Nilunparseitems)) { const unparseitem head = this->unparseitem_1; kc::unparse(head, kc_printer, kc_current_view); } else { const unparseitem head = this->unparseitem_1; const unparseitems tail = this->unparseitems_1; kc::unparse(head, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(tail, kc_printer, kc_current_view); } break; } case view_checklanguagenames_enum: { view_checklanguagenames_class& kc_current_view=static_cast(kc_current_view_base); { const unparseitem ui = this->unparseitem_1; const unparseitems uis = this->unparseitems_1; kc::unparse(uis, kc_printer, kc_current_view); kc::unparse(ui, kc_printer, kc_current_view); } break; } case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const unparseitem a_ui = this->unparseitem_1; const unparseitems r_ui = this->unparseitems_1; kc::unparse(r_ui, kc_printer, kc_current_view); kc::unparse(a_ui, kc_printer, kc_current_view); } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const unparseitem a_ui = this->unparseitem_1; const unparseitems r_ui = this->unparseitems_1; kc::unparse(r_ui, kc_printer, kc_current_view); kc::unparse(a_ui, kc_printer, kc_current_view); } break; } case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const unparseitem a_ui = this->unparseitem_1; const unparseitems r_ui = this->unparseitems_1; kc::unparse(r_ui, kc_printer, kc_current_view); kc::unparse(a_ui, kc_printer, kc_current_view); } break; } case view_check_viewnames_enum: { view_check_viewnames_class& kc_current_view=static_cast(kc_current_view_base); { const unparseitem ui = this->unparseitem_1; const unparseitems uis = this->unparseitems_1; kc::unparse(uis, kc_printer, kc_current_view); kc::unparse(ui, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const unparseitem ui = this->unparseitem_1; const unparseitems uis = this->unparseitems_1; kc::unparse(uis, kc_printer, kc_current_view); kc::unparse(ui, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (unparseitems iterator_ = this; iterator_->unparseitems_1 != 0; iterator_ = iterator_->unparseitems_1) iterator_->unparseitem_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_unparseitems::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_output_collection_enum: { view_output_collection_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\t\"\""), kc_current_view); } } break; } case view_checklanguagenames_enum: { view_checklanguagenames_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_viewnames_enum: { view_check_viewnames_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_unparseitem_UViewVarDecl::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->Cexpression_1->prod_sel() == sel_NilCexpression)) { const ID type = this->ID_1; const ID name = this->ID_2; { kc_printer(kc_t("\t"), kc_current_view); } kc::unparse(type, kc_printer, kc_current_view); { kc_printer(kc_t("_class "), kc_current_view); } kc::unparse(name, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } else { const ID type = this->ID_1; const ID name = this->ID_2; const Cexpression expr = this->Cexpression_1; { kc_printer(kc_t("\t"), kc_current_view); } kc::unparse(type, kc_printer, kc_current_view); { kc_printer(kc_t("_class "), kc_current_view); } kc::unparse(name, kc_printer, kc_current_view); kc::unparse(expr, kc_printer, view_gen_initializephyla_c); { kc_printer(kc_t(";\ \n"), kc_current_view); } } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->Cexpression_1->prod_sel() == sel_NilCexpression)) { const ID type = this->ID_1; const ID name = this->ID_2; { kc_printer(kc_t("\t"), kc_current_view); } kc::unparse(type, kc_printer, kc_current_view); { kc_printer(kc_t("_class "), kc_current_view); } kc::unparse(name, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } else { const ID type = this->ID_1; const ID name = this->ID_2; const Cexpression expr = this->Cexpression_1; { kc_printer(kc_t("\t"), kc_current_view); } kc::unparse(type, kc_printer, kc_current_view); { kc_printer(kc_t("_class "), kc_current_view); } kc::unparse(name, kc_printer, kc_current_view); kc::unparse(expr, kc_printer, view_gen_initializephyla_c); { kc_printer(kc_t(";\ \n"), kc_current_view); } } break; } case view_check_viewnames_enum: { view_check_viewnames_class& kc_current_view=static_cast(kc_current_view_base); { const ID vno = this->ID_1; kc::unparse(vno, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unparseitem_UnpBody::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_checklanguagenames_enum: { view_checklanguagenames_class& kc_current_view=static_cast(kc_current_view_base); if ((this->languageoption_1->prod_sel() == sel_NoLanguagename)) { const unparseitems items = this->unparseitems_1; kc::unparse(items, kc_printer, kc_current_view); } else if ((this->languageoption_1->prod_sel() == sel_LanguageList)) { const languagenames qual = phylum_cast(this->languageoption_1)->languagenames_1; const unparseitems items = this->unparseitems_1; f_useoccurlanguagename(qual); kc::unparse(items, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const languageoption lang = this->languageoption_1; const unparseitems a_unparseitems = this->unparseitems_1; kc::unparse(lang, kc_printer, kc_current_view); { kc_printer(kc_t("{\ \n"), kc_current_view); } kc::unparse(a_unparseitems, kc_printer, kc_current_view); { kc_printer(kc_t(" }\ \n"), kc_current_view); } } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const languageoption lang = this->languageoption_1; const unparseitems a_unparseitems = this->unparseitems_1; kc::unparse(lang, kc_printer, kc_current_view); { kc_printer(kc_t("{\ \n"), kc_current_view); } kc::unparse(a_unparseitems, kc_printer, kc_current_view); { kc_printer(kc_t(" }\ \n"), kc_current_view); } } break; } case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const unparseitems ui = this->unparseitems_1; kc::unparse(ui, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const unparseitems ui = this->unparseitems_1; kc::unparse(ui, kc_printer, kc_current_view); } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unparseitem_UnpCtext::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_checklanguagenames_enum: { view_checklanguagenames_class& kc_current_view=static_cast(kc_current_view_base); if ((this->languageoption_1->prod_sel() == sel_NoLanguagename)) { } else if ((this->languageoption_1->prod_sel() == sel_LanguageList)) { const languagenames qual = phylum_cast(this->languageoption_1)->languagenames_1; f_useoccurlanguagename(qual); } else goto kc_unparsing_default; break; } case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const languageoption lang = this->languageoption_1; const Ctext ct = this->Ctext_1; kc::unparse(lang, kc_printer, kc_current_view); if(lang->prod_sel()==sel_LanguageList) { { kc_printer(kc_t("{\n"), kc_current_view); } } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(ct, kc_printer, view_gen_initializephyla_c); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); if(lang->prod_sel()==sel_LanguageList) { { kc_printer(kc_t("}\n"), kc_current_view); } } } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const languageoption lang = this->languageoption_1; const Ctext ct = this->Ctext_1; kc::unparse(lang, kc_printer, kc_current_view); if(lang->prod_sel()==sel_LanguageList) { { kc_printer(kc_t("{\n"), kc_current_view); } } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(ct, kc_printer, view_gen_initializephyla_c); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); if(lang->prod_sel()==sel_LanguageList) { { kc_printer(kc_t("}\n"), kc_current_view); } } } break; } case view_make_patternreps_enum: { view_make_patternreps_class& kc_current_view=static_cast(kc_current_view_base); { const Ctext ct = this->Ctext_1; kc::unparse(ct, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const Ctext ct = this->Ctext_1; kc::unparse(ct, kc_printer, kc_current_view); } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unparseitem_UnpSubexpr::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_checklanguagenames_enum: { view_checklanguagenames_class& kc_current_view=static_cast(kc_current_view_base); if ((this->languageoption_1->prod_sel() == sel_NoLanguagename)) { } else if ((this->languageoption_1->prod_sel() == sel_LanguageList)) { const languagenames qual = phylum_cast(this->languageoption_1)->languagenames_1; f_useoccurlanguagename(qual); } else goto kc_unparsing_default; break; } case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const languageoption lang = this->languageoption_1; const unpsubterm sub = this->unpsubterm_1; const viewnameoption a_vnameopt = this->viewnameoption_1; ID phy = f_typeofunpsubterm( sub, operatorstack.top() ); kc::unparse(lang, kc_printer, kc_current_view); { kc_printer(kc_t("kc::unparse("), kc_current_view); } kc::unparse(sub, kc_printer, kc_current_view); { kc_printer(kc_t(", kc_printer, "), kc_current_view); } kc::unparse(a_vnameopt, kc_printer, kc_current_view); { kc_printer(kc_t(");\ \n"), kc_current_view); } } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const languageoption lang = this->languageoption_1; const unpsubterm sub = this->unpsubterm_1; const viewnameoption a_vnameopt = this->viewnameoption_1; ID phy = f_typeofunpsubterm( sub, operatorstack.top() ); kc::unparse(lang, kc_printer, kc_current_view); { kc_printer(kc_t("kc::unparse("), kc_current_view); } kc::unparse(sub, kc_printer, kc_current_view); { kc_printer(kc_t(", kc_printer, "), kc_current_view); } kc::unparse(a_vnameopt, kc_printer, kc_current_view); { kc_printer(kc_t(");\ \n"), kc_current_view); } } break; } case view_check_viewnames_enum: { view_check_viewnames_class& kc_current_view=static_cast(kc_current_view_base); { const viewnameoption vno = this->viewnameoption_1; kc::unparse(vno, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const unpsubterm us = this->unpsubterm_1; kc::unparse(us, kc_printer, kc_current_view); } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unparseitem_UnpStr::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_collect_strings_enum: { view_collect_strings_class& kc_current_view=static_cast(kc_current_view_base); { add_string_to_collection(this); } break; } case view_output_collection_enum: { view_output_collection_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionDQ expr = this->CexpressionDQ_1; { kc_printer(kc_t("\t\""), kc_current_view); } kc::unparse(expr, kc_printer, kc_current_view); { kc_printer(kc_t("\""), kc_current_view); } } break; } case view_checklanguagenames_enum: { view_checklanguagenames_class& kc_current_view=static_cast(kc_current_view_base); if ((this->languageoption_1->prod_sel() == sel_NoLanguagename)) { } else if ((this->languageoption_1->prod_sel() == sel_LanguageList)) { const languagenames qual = phylum_cast(this->languageoption_1)->languagenames_1; f_useoccurlanguagename(qual); } else goto kc_unparsing_default; break; } case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionDQ a_CexpressionDQ = this->CexpressionDQ_1; const viewnameoption a_vnameopt = this->viewnameoption_1; ug_viewnameopt = a_vnameopt; if(pg_languageshavebeendefined) { static char buf[10]; static long last_nr=-1; sprintf(buf,"%d",this->text_nr); if(last_nr!=this->text_nr) { last_nr=this->text_nr; { kc_printer(kc_t(" { kc_printer(LANG_TEXT("), kc_current_view); } kc_printer( buf, base_uview ); { kc_printer(kc_t("), "), kc_current_view); } kc::unparse(a_vnameopt, kc_printer, kc_current_view); { kc_printer(kc_t("); }\n"), kc_current_view); } } } else { kc_printer( "", view_no_of_printed_string_chars_reset ); { kc_printer(kc_t(" { kc_printer(kc_t(\""), kc_current_view); } kc::unparse(a_CexpressionDQ, kc_printer, view_gen_unpstr_c); { kc_printer(kc_t("\"), "), kc_current_view); } kc::unparse(a_vnameopt, kc_printer, kc_current_view); { kc_printer(kc_t("); }\ \n"), kc_current_view); } } ug_viewnameopt = 0; } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const CexpressionDQ a_CexpressionDQ = this->CexpressionDQ_1; const viewnameoption a_vnameopt = this->viewnameoption_1; ug_viewnameopt = a_vnameopt; if(pg_languageshavebeendefined) { static char buf[10]; static long last_nr=-1; sprintf(buf,"%d",this->text_nr); if(last_nr!=this->text_nr) { last_nr=this->text_nr; { kc_printer(kc_t(" { kc_printer(LANG_TEXT("), kc_current_view); } kc_printer( buf, base_uview ); { kc_printer(kc_t("), "), kc_current_view); } kc::unparse(a_vnameopt, kc_printer, kc_current_view); { kc_printer(kc_t("); }\n"), kc_current_view); } } } else { kc_printer( "", view_no_of_printed_string_chars_reset ); { kc_printer(kc_t(" { kc_printer(kc_t(\""), kc_current_view); } kc::unparse(a_CexpressionDQ, kc_printer, view_gen_unpstr_c); { kc_printer(kc_t("\"), "), kc_current_view); } kc::unparse(a_vnameopt, kc_printer, kc_current_view); { kc_printer(kc_t("); }\ \n"), kc_current_view); } } ug_viewnameopt = 0; } break; } case view_check_viewnames_enum: { view_check_viewnames_class& kc_current_view=static_cast(kc_current_view_base); { const viewnameoption vno = this->viewnameoption_1; kc::unparse(vno, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unpsubterm_UnpCastedVariable::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID a_id = this->ID_2; kc::unparse(a_id, kc_printer, kc_current_view); } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID a_id = this->ID_2; kc::unparse(a_id, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unpsubterm_UnpDollarvarAttr::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const unpattributes a_unpattributes = this->unpattributes_1; kc::unparse(this, kc_printer, view_gen_initializephyla_c); kc::unparse(a_unpattributes, kc_printer, kc_current_view); } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const unpattributes a_unpattributes = this->unpattributes_1; kc::unparse(this, kc_printer, view_gen_initializephyla_c); kc::unparse(a_unpattributes, kc_printer, kc_current_view); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const INT i = this->INT_1; ID oid = f_emptyId(), dollarvar = dollarvarstack.top(), dollarvarext = dollarvarextstack.top(); argument arg; bool nulvar = true; { INT kc_selvar_0_1 = phylum_cast( i ); if ((kc_selvar_0_1->prod_sel() == sel_Int)) { const integer ii = phylum_cast(kc_selvar_0_1)->integer_1; if (ii->value != 0) { nulvar = false; oid = operatorstack.top(); arg = f_argumentofoperator( oid, i ); } } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } if (nulvar) { kc::unparse(dollarvar, kc_printer, kc_current_view); kc::unparse(dollarvarext, kc_printer, kc_current_view); } else { kc::unparse(dollarvar, kc_printer, kc_current_view); kc::unparse(dollarvarext, kc_printer, kc_current_view); { kc_printer(kc_t("->"), kc_current_view); } kc::unparse(arg, kc_printer, kc_current_view); arg->free( false ); } } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const INT i = this->INT_1; const unpattributes unp_a = this->unpattributes_1; v_check_dollarvar_attribute_in_operators( i, unp_a, outmostoperators.top() ); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unpsubterm_UnpSubAttr::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID st = this->ID_1; const unpattributes a_unpattributes = this->unpattributes_1; kc::unparse(st, kc_printer, kc_current_view); kc::unparse(a_unpattributes, kc_printer, kc_current_view); } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID st = this->ID_1; const unpattributes a_unpattributes = this->unpattributes_1; kc::unparse(st, kc_printer, kc_current_view); kc::unparse(a_unpattributes, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const ID v_id = this->ID_1; const unpattributes unp_a = this->unpattributes_1; ID p_id; if (f_useoccurpatternvariable( v_id ) && (p_id = f_phylumofpatternvariable( v_id))) f_check_unpattributes_in_phylum( unp_a, p_id ); v_syn_type_attribute_ID( v_id ); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unpsubterm_UnpDollarvarTerm::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { kc::unparse(this, kc_printer, view_gen_initializephyla_c); } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { kc::unparse(this, kc_printer, view_gen_initializephyla_c); } break; } case view_gen_initializephyla_c_enum: { view_gen_initializephyla_c_class& kc_current_view=static_cast(kc_current_view_base); { const INT i = this->INT_1; ID oid = f_emptyId(), dollarvar = dollarvarstack.top(), dollarvarext = dollarvarextstack.top(); argument arg; bool nulvar = true; { INT kc_selvar_0_1 = phylum_cast( i ); if ((kc_selvar_0_1->prod_sel() == sel_Int)) { const integer ii = phylum_cast(kc_selvar_0_1)->integer_1; if (ii->value != 0) { nulvar = false; oid = operatorstack.top(); arg = f_argumentofoperator( oid, i ); } } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } if (nulvar) { kc::unparse(dollarvar, kc_printer, kc_current_view); kc::unparse(dollarvarext, kc_printer, kc_current_view); } else { kc::unparse(dollarvar, kc_printer, kc_current_view); kc::unparse(dollarvarext, kc_printer, kc_current_view); { kc_printer(kc_t("->"), kc_current_view); } kc::unparse(arg, kc_printer, kc_current_view); arg->free( false ); } } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const INT i = this->INT_1; v_check_dollarvar_attribute_in_operators( i, Nilunpattributes(), outmostoperators.top() ); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unpsubterm_UnpSubTerm::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID st = this->ID_1; kc::unparse(st, kc_printer, kc_current_view); } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID st = this->ID_1; kc::unparse(st, kc_printer, kc_current_view); } break; } case view_check_enum: { view_check_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unpattributes::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID a_attr = this->ID_1; const unpattributes r_attr = this->unpattributes_1; kc::unparse(r_attr, kc_printer, kc_current_view); { kc_printer(kc_t("->"), kc_current_view); } kc::unparse(a_attr, kc_printer, kc_current_view); } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID a_attr = this->ID_1; const unpattributes r_attr = this->unpattributes_1; kc::unparse(r_attr, kc_printer, kc_current_view); { kc_printer(kc_t("->"), kc_current_view); } kc::unparse(a_attr, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (unpattributes iterator_ = this; iterator_->unpattributes_1 != 0; iterator_ = iterator_->unpattributes_1) iterator_->ID_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_unpattributes::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_viewnameoption_YesViewname::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID v = this->ID_1; kc::unparse(v, kc_printer, kc_current_view); } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID v = this->ID_1; kc::unparse(v, kc_printer, kc_current_view); } break; } case view_check_viewnames_enum: { view_check_viewnames_class& kc_current_view=static_cast(kc_current_view_base); { const ID vn = this->ID_1; if(!is_uview_var(vn)) f_useoccuruviewname( vn ); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_viewnameoption_NoViewname::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("kc_current_view"), kc_current_view); } } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("kc_current_view"), kc_current_view); } } break; } case view_check_viewnames_enum: { view_check_viewnames_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_languageoption_LanguageList::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { const languagenames langs = this->languagenames_1; { kc_printer(kc_t("if("), kc_current_view); } kc::unparse(langs, kc_printer, kc_current_view); { kc_printer(kc_t(")\n "), kc_current_view); } } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const languagenames langs = this->languagenames_1; { kc_printer(kc_t("if("), kc_current_view); } kc::unparse(langs, kc_printer, kc_current_view); { kc_printer(kc_t(")\n "), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_languageoption_NoLanguagename::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_languagenames::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->languagenames_1->prod_sel() == sel_Nillanguagenames)) { const ID id = this->ID_1; { kc_printer(kc_t("is_language("), kc_current_view); } kc::unparse(id, kc_printer, base_uview); { kc_printer(kc_t(")"), kc_current_view); } } else { const ID id = this->ID_1; const languagenames tail = this->languagenames_1; kc::unparse(tail, kc_printer, kc_current_view); { kc_printer(kc_t(" || is_language("), kc_current_view); } kc::unparse(id, kc_printer, base_uview); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->languagenames_1->prod_sel() == sel_Nillanguagenames)) { const ID id = this->ID_1; { kc_printer(kc_t("is_language("), kc_current_view); } kc::unparse(id, kc_printer, base_uview); { kc_printer(kc_t(")"), kc_current_view); } } else { const ID id = this->ID_1; const languagenames tail = this->languagenames_1; kc::unparse(tail, kc_printer, kc_current_view); { kc_printer(kc_t(" || is_language("), kc_current_view); } kc::unparse(id, kc_printer, base_uview); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_gen_unparsedecls_h_enum: { view_gen_unparsedecls_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->languagenames_1->prod_sel() == sel_Nillanguagenames)) { const ID id = this->ID_1; { kc_printer(kc_t("extern char* kc_language_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("[];\n"), kc_current_view); } } else { const ID id = this->ID_1; const languagenames tail = this->languagenames_1; kc::unparse(tail, kc_printer, kc_current_view); { kc_printer(kc_t("extern char* kc_language_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("[];\n"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (languagenames iterator_ = this; iterator_->languagenames_1 != 0; iterator_ = iterator_->languagenames_1) iterator_->ID_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_languagenames::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_fileline_PosNoFileLine::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { if (pg_lineno != 0) { { kc_printer(kc_t(" at "), kc_current_view); } if (strcmp(pg_filename->name, "") != 0) { kc::unparse(pg_filename, kc_printer, kc_current_view); } { kc_printer(kc_t(":"), kc_current_view); } kc::unparse(pg_lineno, kc_printer, kc_current_view); { kc_printer(kc_t(" col:"), kc_current_view); } kc::unparse(pg_column, kc_printer, kc_current_view); } } break; } case view_error_format_enum: { view_error_format_class& kc_current_view=static_cast(kc_current_view_base); { if (pg_lineno != 0) { if (strcmp(pg_filename->name, "") != 0) { kc_current_view.file(pg_filename->name); } kc_current_view.line(pg_lineno); kc_current_view.column(pg_column); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_fileline_NoFileLine::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { if (pg_lineno != 0) { { kc_printer(kc_t(" at "), kc_current_view); } if (strcmp(pg_filename->name, "") != 0) { kc::unparse(pg_filename, kc_printer, kc_current_view); } { kc_printer(kc_t(":"), kc_current_view); } kc::unparse(pg_lineno, kc_printer, kc_current_view); } } break; } case view_error_format_enum: { view_error_format_class& kc_current_view=static_cast(kc_current_view_base); { if (pg_lineno != 0) { if (strcmp(pg_filename->name, "") != 0) { kc_current_view.file(pg_filename->name); } kc_current_view.line(pg_lineno); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_fileline_FileLine::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { if (line != 0) { { kc_printer(kc_t(" at "), kc_current_view); } if (strcmp(file->name, "") != 0) { kc::unparse(file, kc_printer, kc_current_view); } { kc_printer(kc_t(":"), kc_current_view); } kc::unparse(line, kc_printer, kc_current_view); } else if (pg_lineno != 0) { { kc_printer(kc_t(" at "), kc_current_view); } if (strcmp(pg_filename->name, "") != 0) { kc::unparse(pg_filename, kc_printer, kc_current_view); } { kc_printer(kc_t(":"), kc_current_view); } kc::unparse(pg_lineno, kc_printer, kc_current_view); } } break; } case view_error_format_enum: { view_error_format_class& kc_current_view=static_cast(kc_current_view_base); { if (line != 0) { if (strcmp(file->name, "") != 0) { kc_current_view.file(file->name); } kc_current_view.line(line); } else if (pg_lineno != 0) { if (strcmp(pg_filename->name, "") != 0) { kc_current_view.file(pg_filename->name); } kc_current_view.line(pg_lineno); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_scopetypefilelinestack::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (scopetypefilelinestack iterator_ = this; iterator_->scopetypefilelinestack_1 != 0; iterator_ = iterator_->scopetypefilelinestack_1) iterator_->scopetypefileline_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_scopetypefilelinestack::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_scopetypefileline_ScopeTypeFileLine::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_IDtype_ITLanguageName::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_IDtype_ITPatternVariable::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("(it's a "), kc_current_view); } kc::unparse(this, kc_printer, view_error); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("pattern variable"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_IDtype_ITUserFunction::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("(it's a "), kc_current_view); } kc::unparse(this, kc_printer, view_error); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("function"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_IDtype_ITUserRView::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("(it's a "), kc_current_view); } kc::unparse(this, kc_printer, view_error); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("rewrite view"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_IDtype_ITPredefinedRView::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("(it's a "), kc_current_view); } kc::unparse(this, kc_printer, view_error); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("predefined rewrite view"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_IDtype_ITUViewVar::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_IDtype_ITUserUView::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("(it's a "), kc_current_view); } kc::unparse(this, kc_printer, view_error); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("unparse view"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_IDtype_ITPredefinedUView::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("(it's a "), kc_current_view); } kc::unparse(this, kc_printer, view_error); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("predefined unparse view"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_IDtype_ITStorageClass::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("(it's a "), kc_current_view); } kc::unparse(this, kc_printer, view_error); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("storageclass"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_IDtype_ITPredefinedStorageClass::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("(it's a "), kc_current_view); } kc::unparse(this, kc_printer, view_error); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("predefined storageclass"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_IDtype_ITUserOperator::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("(it's an "), kc_current_view); } kc::unparse(this, kc_printer, view_error); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("operator"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_IDtype_ITPredefinedOperator::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("(it's a "), kc_current_view); } kc::unparse(this, kc_printer, view_error); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("predefined operator"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_IDtype_ITUserPhylum::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("(it's a "), kc_current_view); } kc::unparse(this, kc_printer, view_error); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("phylum"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_IDtype_ITPredefinedPhylum::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("(it's a "), kc_current_view); } kc::unparse(this, kc_printer, view_error); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("predefined phylum"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_IDtype_ITUnknown::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_tID_enum: { view_error_tID_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_operators::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (operators iterator_ = this; iterator_->operators_1 != 0; iterator_ = iterator_->operators_1) iterator_->ID_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_operators::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_phyla::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_printdotedges_c_enum: { view_gen_printdotedges_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID a_phy = this->ID_1; const phyla r_phy = this->phyla_1; kc::unparse(r_phy, kc_printer, kc_current_view); { kc_printer(kc_t(" case phylum_"), kc_current_view); } kc::unparse(a_phy, kc_printer, kc_current_view); { kc_printer(kc_t(": {\ \n kc_do_printdot_id_of__"), kc_current_view); } kc::unparse(a_phy, kc_printer, kc_current_view); { kc_printer(kc_t("(kc_f, kc_p->ptr_to.yt_"), kc_current_view); } kc::unparse(a_phy, kc_printer, kc_current_view); { kc_printer(kc_t(", use_context_when_sharing_leaves, kc_p->ptr_from.yt_voidptr, kc_p->son_nr);\ \n break; }\ \n"), kc_current_view); } } break; } case view_gen_printdotdefs_c_enum: { view_gen_printdotdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID a_phy = this->ID_1; const phyla r_phy = this->phyla_1; assertionFailed("Not used anymore"); kc::unparse(r_phy, kc_printer, kc_current_view); { kc_printer(kc_t(" assertReason(kc_phy != phylum_"), kc_current_view); } kc::unparse(a_phy, kc_printer, kc_current_view); { kc_printer(kc_t(", \"kc_do_printdot_phylum called with phylum_"), kc_current_view); } kc::unparse(a_phy, kc_printer, kc_current_view); { kc_printer(kc_t(" argument\");\ \n"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (phyla iterator_ = this; iterator_->phyla_1 != 0; iterator_ = iterator_->phyla_1) iterator_->ID_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_phyla::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_printdotedges_c_enum: { view_gen_printdotedges_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_printdotdefs_c_enum: { view_gen_printdotdefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_variables::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (variables iterator_ = this; iterator_->variables_1 != 0; iterator_ = iterator_->variables_1) iterator_->ID_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_variables::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_dollarvarstatus_DVDisallowed::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_dollarvarstatus_DVAllowed::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_tribool_Bigger::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_tribool_Smaller::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_tribool_Equal::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_patternrepresentations::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (patternrepresentations iterator_ = this; iterator_->patternrepresentations_1 != 0; iterator_ = iterator_->patternrepresentations_1) iterator_->patternrepresentation_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_patternrepresentations::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_patternrepresentation::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_unp_predicates_enum: { view_unp_predicates_class& kc_current_view=static_cast(kc_current_view_base); if ((this->elem_patternrepresentation_1->prod_sel() == sel_PRUserPredicate) && (this->patternrepresentation_1->prod_sel() == sel_Nilpatternrepresentation)) { const Cexpression cexpr = phylum_cast(this->elem_patternrepresentation_1)->Cexpression_1; gl_outer_view=kc_current_view; { kc_printer(kc_t("KC_TRACE_PROVIDED(("), kc_current_view); } kc::unparse(cexpr, kc_printer, view_gen_user_predicates); { kc_printer(kc_t("), \""), kc_current_view); } kc::unparse(cexpr->file, kc_printer, kc_current_view); { kc_printer(kc_t("\", "), kc_current_view); } kc::unparse(cexpr->line, kc_printer, kc_current_view); { kc_printer(kc_t(", this)"), kc_current_view); } } else if ((this->elem_patternrepresentation_1->prod_sel() == sel_PRUserPredicate)) { const Cexpression cexpr = phylum_cast(this->elem_patternrepresentation_1)->Cexpression_1; const patternrepresentation r_p = this->patternrepresentation_1; gl_outer_view=kc_current_view; kc::unparse(r_p, kc_printer, kc_current_view); { kc_printer(kc_t(") && KC_TRACE_PROVIDED(("), kc_current_view); } kc::unparse(cexpr, kc_printer, view_gen_user_predicates); { kc_printer(kc_t("), \""), kc_current_view); } kc::unparse(cexpr->file, kc_printer, kc_current_view); { kc_printer(kc_t("\", "), kc_current_view); } kc::unparse(cexpr->line, kc_printer, kc_current_view); { kc_printer(kc_t(", this"), kc_current_view); } } else if ((this->patternrepresentation_1->prod_sel() == sel_Nilpatternrepresentation)) { const elem_patternrepresentation p = this->elem_patternrepresentation_1; kc::unparse(p, kc_printer, kc_current_view); } else { const elem_patternrepresentation p = this->elem_patternrepresentation_1; const patternrepresentation r_p = this->patternrepresentation_1; kc::unparse(p, kc_printer, kc_current_view); { kc_printer(kc_t(") && ("), kc_current_view); } kc::unparse(r_p, kc_printer, kc_current_view); } break; } case view_wc_predicates_enum: { view_wc_predicates_class& kc_current_view=static_cast(kc_current_view_base); if ((this->elem_patternrepresentation_1->prod_sel() == sel_PRUserPredicate) && (this->patternrepresentation_1->prod_sel() == sel_Nilpatternrepresentation)) { const Cexpression cexpr = phylum_cast(this->elem_patternrepresentation_1)->Cexpression_1; gl_outer_view=kc_current_view; { kc_printer(kc_t("KC_TRACE_PROVIDED(("), kc_current_view); } kc::unparse(cexpr, kc_printer, view_gen_user_predicates); { kc_printer(kc_t("), \""), kc_current_view); } kc::unparse(cexpr->file, kc_printer, kc_current_view); { kc_printer(kc_t("\", "), kc_current_view); } kc::unparse(cexpr->line, kc_printer, kc_current_view); { kc_printer(kc_t(", this)"), kc_current_view); } } else if ((this->elem_patternrepresentation_1->prod_sel() == sel_PRUserPredicate)) { const Cexpression cexpr = phylum_cast(this->elem_patternrepresentation_1)->Cexpression_1; const patternrepresentation r_p = this->patternrepresentation_1; gl_outer_view=kc_current_view; kc::unparse(r_p, kc_printer, kc_current_view); { kc_printer(kc_t(") && KC_TRACE_PROVIDED(("), kc_current_view); } kc::unparse(cexpr, kc_printer, view_gen_user_predicates); { kc_printer(kc_t("), \""), kc_current_view); } kc::unparse(cexpr->file, kc_printer, kc_current_view); { kc_printer(kc_t("\", "), kc_current_view); } kc::unparse(cexpr->line, kc_printer, kc_current_view); { kc_printer(kc_t(", this"), kc_current_view); } } else if ((this->patternrepresentation_1->prod_sel() == sel_Nilpatternrepresentation)) { const elem_patternrepresentation p = this->elem_patternrepresentation_1; kc::unparse(p, kc_printer, kc_current_view); } else { const elem_patternrepresentation p = this->elem_patternrepresentation_1; const patternrepresentation r_p = this->patternrepresentation_1; kc::unparse(p, kc_printer, kc_current_view); { kc_printer(kc_t(") && ("), kc_current_view); } kc::unparse(r_p, kc_printer, kc_current_view); } break; } case view_rw_predicates_enum: { view_rw_predicates_class& kc_current_view=static_cast(kc_current_view_base); if ((this->elem_patternrepresentation_1->prod_sel() == sel_PRUserPredicate) && (this->patternrepresentation_1->prod_sel() == sel_Nilpatternrepresentation)) { const Cexpression cexpr = phylum_cast(this->elem_patternrepresentation_1)->Cexpression_1; gl_outer_view=kc_current_view; { kc_printer(kc_t("KC_TRACE_PROVIDED(("), kc_current_view); } kc::unparse(cexpr, kc_printer, view_gen_user_predicates); { kc_printer(kc_t("), \""), kc_current_view); } kc::unparse(cexpr->file, kc_printer, kc_current_view); { kc_printer(kc_t("\", "), kc_current_view); } kc::unparse(cexpr->line, kc_printer, kc_current_view); { kc_printer(kc_t(", this)"), kc_current_view); } } else if ((this->elem_patternrepresentation_1->prod_sel() == sel_PRUserPredicate)) { const Cexpression cexpr = phylum_cast(this->elem_patternrepresentation_1)->Cexpression_1; const patternrepresentation r_p = this->patternrepresentation_1; gl_outer_view=kc_current_view; kc::unparse(r_p, kc_printer, kc_current_view); { kc_printer(kc_t(") && KC_TRACE_PROVIDED(("), kc_current_view); } kc::unparse(cexpr, kc_printer, view_gen_user_predicates); { kc_printer(kc_t("), \""), kc_current_view); } kc::unparse(cexpr->file, kc_printer, kc_current_view); { kc_printer(kc_t("\", "), kc_current_view); } kc::unparse(cexpr->line, kc_printer, kc_current_view); { kc_printer(kc_t(", this"), kc_current_view); } } else if ((this->patternrepresentation_1->prod_sel() == sel_Nilpatternrepresentation)) { const elem_patternrepresentation p = this->elem_patternrepresentation_1; kc::unparse(p, kc_printer, kc_current_view); } else { const elem_patternrepresentation p = this->elem_patternrepresentation_1; const patternrepresentation r_p = this->patternrepresentation_1; kc::unparse(p, kc_printer, kc_current_view); { kc_printer(kc_t(") && ("), kc_current_view); } kc::unparse(r_p, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (patternrepresentation iterator_ = this; iterator_->patternrepresentation_1 != 0; iterator_ = iterator_->patternrepresentation_1) iterator_->elem_patternrepresentation_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_patternrepresentation::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_elem_patternrepresentation_PRIntLiteral::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->path_1->prod_sel() == sel_Conspath)) { const path p = this->path_1; const path r_p = (this->path_1)->path_1; const INT i = this->INT_1; { kc_printer(kc_t("("), kc_current_view); } kc::unparse(r_p, kc_printer, view_gen_cast); kc::unparse(p, kc_printer, kc_current_view); { kc_printer(kc_t(")->value == "), kc_current_view); } kc::unparse(i, kc_printer, kc_current_view); } else { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_elem_patternrepresentation_PRStringLiteral::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->path_1->prod_sel() == sel_Conspath)) { const path p = this->path_1; const path r_p = (this->path_1)->path_1; const CexpressionDQ Cexprdq = this->CexpressionDQ_1; if ((strcmp( f_strofID( f_typeof( p ) ), "casestring" ) == 0) || (strcmp( f_strofID( f_typeof( p ) ), "nocasestring" ) == 0)) { { kc_printer(kc_t("kc_strcmp("), kc_current_view); } kc::unparse(r_p, kc_printer, view_gen_cast); kc::unparse(p, kc_printer, kc_current_view); { kc_printer(kc_t("->name, kc_t(\""), kc_current_view); } kc::unparse(Cexprdq, kc_printer, kc_current_view); { kc_printer(kc_t("\"))==0"), kc_current_view); } } else { assertionFailed("String literal type neither casestring nor nocasestring"); } } else { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_elem_patternrepresentation_PRDefault::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { { kc_printer(kc_t("1 /*default*/"), kc_current_view); } } break; } } } void impl_elem_patternrepresentation_PRWildcard::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { { kc_printer(kc_t("1 /*default*/"), kc_current_view); } } break; } } } void impl_elem_patternrepresentation_PRNonLeafBinding::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_predicate_bindings_enum: { view_predicate_bindings_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ID_1->prod_sel() == sel_Id) && (phylum_cast(this->ID_1)->uniqID_1->prod_sel() == sel_Str)) { const path p = this->path_1; const casestring id = phylum_cast(phylum_cast(this->ID_1)->uniqID_1)->casestring_1; gl_bindings[id->name]=p; } else goto kc_unparsing_default; break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const path p = this->path_1; const ID id = this->ID_1; { ID gl_type; if (this->type->eq( f_emptyId())) { gl_type = f_typeof( p ); } else { gl_type = this->type; } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(id->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(id->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t(" const "), kc_current_view); } kc::unparse(gl_type, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" = "), kc_current_view); } { path kc_selvar_0_1 = phylum_cast(p); if ((kc_selvar_0_1->prod_sel() == sel_Conspath)) { const path r_p = (kc_selvar_0_1)->path_1; r_p->unparse(kc_printer, view_gen_cast); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpath)) { } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } kc::unparse(p, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } } break; } } } void impl_elem_patternrepresentation_PRUserPredicate::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_elem_patternrepresentation_PROperPredicate::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_unp_predicates_enum: { view_unp_predicates_class& kc_current_view=static_cast(kc_current_view_base); if ((this->path_1->prod_sel() == sel_Conspath) && ((this->path_1)->path_1->prod_sel() == sel_Conspath)) { const path p = (this->path_1)->path_1; const path r_p = ((this->path_1)->path_1)->path_1; const ID id = this->ID_1; kc::unparse(r_p, kc_printer, view_gen_cast); kc::unparse(p, kc_printer, kc_current_view); { kc_printer(kc_t("->prod_sel() == sel_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); } else if ((this->path_1->prod_sel() == sel_Nilpath)) { } else { { kc_printer(kc_t(" true "), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->path_1->prod_sel() == sel_Conspath) && ((this->path_1)->path_1->prod_sel() == sel_Conspath)) { const path p = (this->path_1)->path_1; const path r_p = ((this->path_1)->path_1)->path_1; const ID id = this->ID_1; kc::unparse(r_p, kc_printer, view_gen_cast); kc::unparse(p, kc_printer, kc_current_view); { kc_printer(kc_t("->prod_sel() == sel_"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); } else if ((this->path_1->prod_sel() == sel_Nilpath)) { } else { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_elem_patternrepresentation_PRVarPredicate::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const paths ps = this->paths_1; kc::unparse(ps, kc_printer, kc_current_view); } break; } } } void impl_elem_patternrepresentation_PRBinding::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_predicate_bindings_enum: { view_predicate_bindings_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ID_1->prod_sel() == sel_Id) && (phylum_cast(this->ID_1)->uniqID_1->prod_sel() == sel_Str)) { const path p = this->path_1; const casestring id = phylum_cast(phylum_cast(this->ID_1)->uniqID_1)->casestring_1; gl_bindings[id->name]=p; } else goto kc_unparsing_default; break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const path p = this->path_1; const ID id = this->ID_1; { ID gl_type; if (this->type->eq( f_emptyId())) { gl_type = f_typeof( p ); } else { gl_type = this->type; } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(id->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(id->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t(" const "), kc_current_view); } kc::unparse(gl_type, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t(" = "), kc_current_view); } { path kc_selvar_0_1 = phylum_cast(p); if ((kc_selvar_0_1->prod_sel() == sel_Conspath)) { const path r_p = (kc_selvar_0_1)->path_1; r_p->unparse(kc_printer, view_gen_cast); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpath)) { } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } kc::unparse(p, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } } break; } } } void impl_path::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_cast_enum: { view_gen_cast_class& kc_current_view=static_cast(kc_current_view_base); { const integer i = this->integer_1; const path r_p = this->path_1; bool isnotlist = f_listelementphylum(f_phylumofoperator(this->op))->eq(f_emptyId()); if(isnotlist) { { kc_printer(kc_t("phylum_castop, kc_printer, view_class_of_op); { kc_printer(kc_t("*>"), kc_current_view); } } { kc_printer(kc_t("("), kc_current_view); } kc::unparse(r_p, kc_printer, kc_current_view); } break; } case view_rw_bindings_enum: { view_rw_bindings_class& kc_current_view=static_cast(kc_current_view_base); if ((this->path_1->prod_sel() == sel_Nilpath)) { const integer i = this->integer_1; const path r_p = this->path_1; argument gl_argument = f_argumentofoperator( r_p->op, Int( i )); if (!g_options.rw_loop) { { kc_printer(kc_t("l_"), kc_current_view); } } kc::unparse(gl_argument, kc_printer, kc_current_view); gl_argument->free(false); } else goto kc_unparsing_default; break; } case view_unp_bindings_enum: { view_unp_bindings_class& kc_current_view=static_cast(kc_current_view_base); if ((this->path_1->prod_sel() == sel_Nilpath)) { const integer i = this->integer_1; const path r_p = this->path_1; argument gl_argument = f_argumentofoperator( r_p->op, Int( i )); { kc_printer(kc_t("this->"), kc_current_view); } kc::unparse(gl_argument, kc_printer, kc_current_view); gl_argument->free(false); } else goto kc_unparsing_default; break; } case view_wc_bindings_enum: { view_wc_bindings_class& kc_current_view=static_cast(kc_current_view_base); if ((this->path_1->prod_sel() == sel_Nilpath)) { const integer i = this->integer_1; ID selvar = cf_topselvar(); kc::unparse(selvar, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(i, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_unp_predicates_enum: { view_unp_predicates_class& kc_current_view=static_cast(kc_current_view_base); if ((this->path_1->prod_sel() == sel_Nilpath)) { const integer i = this->integer_1; const path r_p = this->path_1; argument gl_argument = f_argumentofoperator( r_p->op, Int( i )); { kc_printer(kc_t("this->"), kc_current_view); } kc::unparse(gl_argument, kc_printer, kc_current_view); gl_argument->free(false); } else goto kc_unparsing_default; break; } case view_wc_predicates_enum: { view_wc_predicates_class& kc_current_view=static_cast(kc_current_view_base); if ((this->path_1->prod_sel() == sel_Nilpath)) { const integer i = this->integer_1; ID selvar = cf_topselvar(); kc::unparse(selvar, kc_printer, kc_current_view); { kc_printer(kc_t("_"), kc_current_view); } kc::unparse(i, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_rw_predicates_enum: { view_rw_predicates_class& kc_current_view=static_cast(kc_current_view_base); if ((this->path_1->prod_sel() == sel_Nilpath)) { const integer i = this->integer_1; const path r_p = this->path_1; argument gl_argument = f_argumentofoperator( r_p->op, Int( i )); if (!g_options.rw_loop) { { kc_printer(kc_t("l_"), kc_current_view); } } kc::unparse(gl_argument, kc_printer, kc_current_view); gl_argument->free(false); } else goto kc_unparsing_default; break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const integer i = this->integer_1; const path r_p = this->path_1; kc::unparse(r_p, kc_printer, kc_current_view); { kc_printer(kc_t(")->"), kc_current_view); } argument gl_argument = f_argumentofoperator( r_p->op, Int( i )); kc::unparse(gl_argument, kc_printer, kc_current_view); gl_argument->free(false); } break; } } } void impl_path::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_rw_bindings_enum: { view_rw_bindings_class& kc_current_view=static_cast(kc_current_view_base); { if (gl_args->is_nil() || g_options.rw_loop) { { kc_printer(kc_t("this"), kc_current_view); } } else { { kc_printer(kc_t("((("), kc_current_view); } kc::unparse(gl_args, kc_printer, view_gen_rewritedefs_dotestarg_c); { kc_printer(kc_t(")) ? this : "), kc_current_view); } kc::unparse(gl_operator, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(gl_args, kc_printer, view_gen_rewritedefs_args_c); { kc_printer(kc_t("))"), kc_current_view); } } } break; } case view_unp_bindings_enum: { view_unp_bindings_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("this/**/"), kc_current_view); } } break; } case view_unp_predicates_enum: { view_unp_predicates_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("this/**/"), kc_current_view); } } break; } case view_rw_predicates_enum: { view_rw_predicates_class& kc_current_view=static_cast(kc_current_view_base); { if (gl_args->is_nil() || g_options.rw_loop) { { kc_printer(kc_t("this"), kc_current_view); } } else { { kc_printer(kc_t("((("), kc_current_view); } kc::unparse(gl_args, kc_printer, view_gen_rewritedefs_dotestarg_c); { kc_printer(kc_t(")) ? this : "), kc_current_view); } kc::unparse(gl_operator, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(gl_args, kc_printer, view_gen_rewritedefs_args_c); { kc_printer(kc_t("))"), kc_current_view); } } } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_paths::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->path_1->prod_sel() == sel_Conspath) && (this->paths_1->prod_sel() == sel_Conspaths) && ((this->paths_1)->path_1->prod_sel() == sel_Conspath) && ((this->paths_1)->paths_1->prod_sel() == sel_Nilpaths)) { const path p1 = this->path_1; const path r_p1 = (this->path_1)->path_1; const path p2 = (this->paths_1)->path_1; const path r_p2 = ((this->paths_1)->path_1)->path_1; kc::unparse(r_p1, kc_printer, view_gen_cast); kc::unparse(p1, kc_printer, kc_current_view); { kc_printer(kc_t("->eq("), kc_current_view); } kc::unparse(r_p2, kc_printer, view_gen_cast); kc::unparse(p2, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } else if ((this->path_1->prod_sel() == sel_Conspath) && (this->paths_1->prod_sel() == sel_Conspaths) && ((this->paths_1)->path_1->prod_sel() == sel_Conspath)) { const path p1 = this->path_1; const path r_p1 = (this->path_1)->path_1; const paths pp1 = this->paths_1; const path p2 = (this->paths_1)->path_1; const path r_p2 = ((this->paths_1)->path_1)->path_1; kc::unparse(r_p1, kc_printer, view_gen_cast); kc::unparse(p1, kc_printer, kc_current_view); { kc_printer(kc_t("->eq("), kc_current_view); } kc::unparse(r_p2, kc_printer, view_gen_cast); kc::unparse(p2, kc_printer, kc_current_view); { kc_printer(kc_t(")) && ("), kc_current_view); } kc::unparse(pp1, kc_printer, kc_current_view); } else if ((this->paths_1->prod_sel() == sel_Nilpaths)) { } else { path_1->unparse(kc_printer, kc_current_view ); paths_1->do_unparse(kc_printer, kc_current_view ); } break; } } } void impl_paths::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_argsnumbers::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_rewritek_c_enum: { view_gen_rewritek_c_class& kc_current_view=static_cast(kc_current_view_base); { const integer i = this->integer_1; const argsnumbers r = this->argsnumbers_1; { kc_printer(kc_t(" case "), kc_current_view); } kc::unparse(i, kc_printer, kc_current_view); { kc_printer(kc_t(": return kc_create(kc_op"), kc_current_view); } for (int j=0; jvalue; ++j) { { kc_printer(kc_t(", sons[son_offset"), kc_current_view); } if (j!=0) { { kc_printer(kc_t("+"), kc_current_view); } kc::unparse(j, kc_printer, kc_current_view); } { kc_printer(kc_t("]"), kc_current_view); } } { kc_printer(kc_t(");\ \n"), kc_current_view); } kc::unparse(r, kc_printer, kc_current_view); } break; } case view_gen_copydefs_c_enum: { view_gen_copydefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const integer i = this->integer_1; const argsnumbers r = this->argsnumbers_1; { kc_printer(kc_t(" case "), kc_current_view); } kc::unparse(i, kc_printer, kc_current_view); { kc_printer(kc_t(": kc_answer = kc_create(prod_sel()"), kc_current_view); } for (int j=0; jvalue; ++j) { { kc_printer(kc_t(", kc_subtmp["), kc_current_view); } kc::unparse(j, kc_printer, kc_current_view); { kc_printer(kc_t("]"), kc_current_view); } } { kc_printer(kc_t("); break;\ \n"), kc_current_view); } kc::unparse(r, kc_printer, kc_current_view); } break; } case view_gen_csgio_c_enum: { view_gen_csgio_c_class& kc_current_view=static_cast(kc_current_view_base); { const integer i = this->integer_1; const argsnumbers r = this->argsnumbers_1; { kc_printer(kc_t(" case "), kc_current_view); } kc::unparse(i, kc_printer, kc_current_view); { kc_printer(kc_t(": kc_answer = kc_create(kc_op"), kc_current_view); } for (int j=0; jvalue; ++j) { { kc_printer(kc_t(", kc_subtmp["), kc_current_view); } kc::unparse(j, kc_printer, kc_current_view); { kc_printer(kc_t("]"), kc_current_view); } } { kc_printer(kc_t("); break;\ \n"), kc_current_view); } kc::unparse(r, kc_printer, kc_current_view); } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (argsnumbers iterator_ = this; iterator_->argsnumbers_1 != 0; iterator_ = iterator_->argsnumbers_1) iterator_->integer_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_argsnumbers::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_rewritek_c_enum: { view_gen_rewritek_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_copydefs_c_enum: { view_gen_copydefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_csgio_c_enum: { view_gen_csgio_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_rewriterulesinfo::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_rewritedefs_other_c_enum: { view_gen_rewritedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->rewriteruleinfo_1->prod_sel() == sel_Rewriteruleinfo) && (phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1->prod_sel() == sel_Conspatternrepresentation) && ((phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1)->patternrepresentation_1->prod_sel() == sel_Nilpatternrepresentation) && (phylum_cast(this->rewriteruleinfo_1)->rewriteclause_1->prod_sel() == sel_RewriteClause)) { const elem_patternrepresentation rep = (phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1)->elem_patternrepresentation_1; const patternrepresentation bindings = phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_2; const term t = phylum_cast(phylum_cast(this->rewriteruleinfo_1)->rewriteclause_1)->term_1; const rewriterulesinfo r_rri = this->rewriterulesinfo_1; if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(rep->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(rep->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t(" { KC_TRACE_REWRITE_MATCH(kc_current_view, \""), kc_current_view); } kc::unparse(rep->file, kc_printer, kc_current_view); { kc_printer(kc_t("\", "), kc_current_view); } kc::unparse(rep->line, kc_printer, kc_current_view); { kc_printer(kc_t(", this);\ \n"), kc_current_view); } kc::unparse(bindings, kc_printer, view_rw_bindings); if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(t->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } if(g_options.rw_loop) { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_result = "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" KC_TRACE_REWRITE_RESULT(kc_current_view,\""), kc_current_view); } kc::unparse(t->file, kc_printer, kc_current_view); { kc_printer(kc_t("\","), kc_current_view); } kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(",kc_result);\ \n return kc_result;\ \n"), kc_current_view); } } else { if(g_options.smart_pointer) { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t("_ptr kc_result = "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" KC_TRACE_REWRITE_RESULT(kc_current_view,\""), kc_current_view); } kc::unparse(t->file, kc_printer, kc_current_view); { kc_printer(kc_t("\","), kc_current_view); } kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(",kc_result);\ \n return (kc_result() == this ? this : kc_result->rewrite( kc_current_view_base ))->return_ptr();\ \n"), kc_current_view); } } else { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_result = "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" KC_TRACE_REWRITE_RESULT(kc_current_view,\""), kc_current_view); } kc::unparse(t->file, kc_printer, kc_current_view); { kc_printer(kc_t("\","), kc_current_view); } kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(",kc_result);\ \n return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base );\ \n"), kc_current_view); } } } { kc_printer(kc_t("\ \n }\ \n"), kc_current_view); } if (g_options.warn_drop_identical_patterns) { rewriterulesinfo kc_selvar_0_1 = phylum_cast(r_rri); if ((kc_selvar_0_1->prod_sel() == sel_Consrewriterulesinfo)) { { rewriterulesinfo kc_fe_selvar_1 = kc_selvar_0_1; while( kc_fe_selvar_1->prod_sel() == sel_Consrewriterulesinfo ) { rewriteruleinfo kc_selvar_1_1 = kc_fe_selvar_1->rewriteruleinfo_1; { { { const rewriteruleinfo rri = kc_selvar_1_1; warn_drop_identical_pattern(rri); } } } kc_fe_selvar_1 = kc_fe_selvar_1->rewriterulesinfo_1; } } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilrewriterulesinfo)) { } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } } else if ((this->rewriteruleinfo_1->prod_sel() == sel_Rewriteruleinfo) && (phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1->prod_sel() == sel_Nilpatternrepresentation) && (phylum_cast(this->rewriteruleinfo_1)->rewriteclause_1->prod_sel() == sel_RewriteClause)) { const patternrepresentation bindings = phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_2; const term t = phylum_cast(phylum_cast(this->rewriteruleinfo_1)->rewriteclause_1)->term_1; assertionFailed("Completely empty rewrite pattern not possible."); } else if ((this->rewriteruleinfo_1->prod_sel() == sel_Rewriteruleinfo) && (phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1->prod_sel() == sel_Conspatternrepresentation) && (phylum_cast(this->rewriteruleinfo_1)->rewriteclause_1->prod_sel() == sel_RewriteClause)) { const elem_patternrepresentation rep = (phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1)->elem_patternrepresentation_1; const patternrepresentation r_p = (phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1)->patternrepresentation_1; const patternrepresentation bindings = phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_2; const term t = phylum_cast(phylum_cast(this->rewriteruleinfo_1)->rewriteclause_1)->term_1; const rewriterulesinfo r_rri = this->rewriterulesinfo_1; gl_bindings.clear(); kc::unparse(bindings, kc_printer, view_predicate_bindings); if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(rep->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(rep->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t(" if (("), kc_current_view); } kc::unparse(r_p, kc_printer, view_rw_predicates); { kc_printer(kc_t(")) { KC_TRACE_REWRITE_MATCH(kc_current_view, \""), kc_current_view); } kc::unparse(rep->file, kc_printer, kc_current_view); { kc_printer(kc_t("\", "), kc_current_view); } kc::unparse(rep->line, kc_printer, kc_current_view); { kc_printer(kc_t(", this);\ \n"), kc_current_view); } kc::unparse(bindings, kc_printer, view_rw_bindings); if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(t->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } if(g_options.rw_loop) { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_result = "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" KC_TRACE_REWRITE_RESULT(kc_current_view,\""), kc_current_view); } kc::unparse(t->file, kc_printer, kc_current_view); { kc_printer(kc_t("\","), kc_current_view); } kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(",kc_result);\ \n return kc_result;\ \n"), kc_current_view); } } else { if(g_options.smart_pointer) { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t("_ptr kc_result = "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" KC_TRACE_REWRITE_RESULT(kc_current_view,\""), kc_current_view); } kc::unparse(t->file, kc_printer, kc_current_view); { kc_printer(kc_t("\","), kc_current_view); } kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(",kc_result);\ \n return (kc_result() == this ? this : kc_result->rewrite( kc_current_view_base ))->return_ptr();\ \n"), kc_current_view); } } else { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_result = "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" KC_TRACE_REWRITE_RESULT(kc_current_view,\""), kc_current_view); } kc::unparse(t->file, kc_printer, kc_current_view); { kc_printer(kc_t("\","), kc_current_view); } kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(",kc_result);\ \n return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base );\ \n"), kc_current_view); } } } { kc_printer(kc_t("\ \n } else\ \n"), kc_current_view); } kc::unparse(r_rri, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_rewritedefs_default_c_enum: { view_gen_rewritedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->rewriteruleinfo_1->prod_sel() == sel_Rewriteruleinfo) && (phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1->prod_sel() == sel_Conspatternrepresentation) && ((phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1)->patternrepresentation_1->prod_sel() == sel_Nilpatternrepresentation) && (phylum_cast(this->rewriteruleinfo_1)->rewriteclause_1->prod_sel() == sel_RewriteClause)) { const elem_patternrepresentation rep = (phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1)->elem_patternrepresentation_1; const patternrepresentation bindings = phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_2; const term t = phylum_cast(phylum_cast(this->rewriteruleinfo_1)->rewriteclause_1)->term_1; const rewriterulesinfo r_rri = this->rewriterulesinfo_1; if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(rep->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(rep->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t(" { KC_TRACE_REWRITE_MATCH(kc_current_view, \""), kc_current_view); } kc::unparse(rep->file, kc_printer, kc_current_view); { kc_printer(kc_t("\", "), kc_current_view); } kc::unparse(rep->line, kc_printer, kc_current_view); { kc_printer(kc_t(", this);\ \n"), kc_current_view); } kc::unparse(bindings, kc_printer, view_rw_bindings); if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(t->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } if(g_options.rw_loop) { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_result = "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" KC_TRACE_REWRITE_RESULT(kc_current_view,\""), kc_current_view); } kc::unparse(t->file, kc_printer, kc_current_view); { kc_printer(kc_t("\","), kc_current_view); } kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(",kc_result);\ \n return kc_result;\ \n"), kc_current_view); } } else { if(g_options.smart_pointer) { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t("_ptr kc_result = "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" KC_TRACE_REWRITE_RESULT(kc_current_view,\""), kc_current_view); } kc::unparse(t->file, kc_printer, kc_current_view); { kc_printer(kc_t("\","), kc_current_view); } kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(",kc_result);\ \n return (kc_result() == this ? this : kc_result->rewrite( kc_current_view_base ))->return_ptr();\ \n"), kc_current_view); } } else { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_result = "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" KC_TRACE_REWRITE_RESULT(kc_current_view,\""), kc_current_view); } kc::unparse(t->file, kc_printer, kc_current_view); { kc_printer(kc_t("\","), kc_current_view); } kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(",kc_result);\ \n return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base );\ \n"), kc_current_view); } } } { kc_printer(kc_t("\ \n }\ \n"), kc_current_view); } if (g_options.warn_drop_identical_patterns) { rewriterulesinfo kc_selvar_0_1 = phylum_cast(r_rri); if ((kc_selvar_0_1->prod_sel() == sel_Consrewriterulesinfo)) { { rewriterulesinfo kc_fe_selvar_1 = kc_selvar_0_1; while( kc_fe_selvar_1->prod_sel() == sel_Consrewriterulesinfo ) { rewriteruleinfo kc_selvar_1_1 = kc_fe_selvar_1->rewriteruleinfo_1; { { { const rewriteruleinfo rri = kc_selvar_1_1; warn_drop_identical_pattern(rri); } } } kc_fe_selvar_1 = kc_fe_selvar_1->rewriterulesinfo_1; } } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilrewriterulesinfo)) { } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } } else if ((this->rewriteruleinfo_1->prod_sel() == sel_Rewriteruleinfo) && (phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1->prod_sel() == sel_Nilpatternrepresentation) && (phylum_cast(this->rewriteruleinfo_1)->rewriteclause_1->prod_sel() == sel_RewriteClause)) { const patternrepresentation bindings = phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_2; const term t = phylum_cast(phylum_cast(this->rewriteruleinfo_1)->rewriteclause_1)->term_1; assertionFailed("Completely empty rewrite pattern not possible."); } else if ((this->rewriteruleinfo_1->prod_sel() == sel_Rewriteruleinfo) && (phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1->prod_sel() == sel_Conspatternrepresentation) && (phylum_cast(this->rewriteruleinfo_1)->rewriteclause_1->prod_sel() == sel_RewriteClause)) { const elem_patternrepresentation rep = (phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1)->elem_patternrepresentation_1; const patternrepresentation r_p = (phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_1)->patternrepresentation_1; const patternrepresentation bindings = phylum_cast(this->rewriteruleinfo_1)->patternrepresentation_2; const term t = phylum_cast(phylum_cast(this->rewriteruleinfo_1)->rewriteclause_1)->term_1; const rewriterulesinfo r_rri = this->rewriterulesinfo_1; gl_bindings.clear(); kc::unparse(bindings, kc_printer, view_predicate_bindings); if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(rep->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(rep->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t(" if (("), kc_current_view); } kc::unparse(r_p, kc_printer, view_rw_predicates); { kc_printer(kc_t(")) { KC_TRACE_REWRITE_MATCH(kc_current_view, \""), kc_current_view); } kc::unparse(rep->file, kc_printer, kc_current_view); { kc_printer(kc_t("\", "), kc_current_view); } kc::unparse(rep->line, kc_printer, kc_current_view); { kc_printer(kc_t(", this);\ \n"), kc_current_view); } kc::unparse(bindings, kc_printer, view_rw_bindings); if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(t->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } if(g_options.rw_loop) { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_result = "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" KC_TRACE_REWRITE_RESULT(kc_current_view,\""), kc_current_view); } kc::unparse(t->file, kc_printer, kc_current_view); { kc_printer(kc_t("\","), kc_current_view); } kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(",kc_result);\ \n return kc_result;\ \n"), kc_current_view); } } else { if(g_options.smart_pointer) { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t("_ptr kc_result = "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" KC_TRACE_REWRITE_RESULT(kc_current_view,\""), kc_current_view); } kc::unparse(t->file, kc_printer, kc_current_view); { kc_printer(kc_t("\","), kc_current_view); } kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(",kc_result);\ \n return (kc_result() == this ? this : kc_result->rewrite( kc_current_view_base ))->return_ptr();\ \n"), kc_current_view); } } else { { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(gl_phylum, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_result = "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" KC_TRACE_REWRITE_RESULT(kc_current_view,\""), kc_current_view); } kc::unparse(t->file, kc_printer, kc_current_view); { kc_printer(kc_t("\","), kc_current_view); } kc::unparse(t->line, kc_printer, kc_current_view); { kc_printer(kc_t(",kc_result);\ \n return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base );\ \n"), kc_current_view); } } } { kc_printer(kc_t("\ \n } else\ \n"), kc_current_view); } kc::unparse(r_rri, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (rewriterulesinfo iterator_ = this; iterator_->rewriterulesinfo_1 != 0; iterator_ = iterator_->rewriterulesinfo_1) iterator_->rewriteruleinfo_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_rewriterulesinfo::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_rewritedefs_other_c_enum: { view_gen_rewritedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\vgoto kc_rewrite_default\r;\ \n"), kc_current_view); } gl_rewrite_goto_used = true; } break; } case view_gen_rewritedefs_default_c_enum: { view_gen_rewritedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("break;"), kc_current_view); } } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_rewriteruleinfo_Rewriteruleinfo::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_withcasesinfo::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->withcaseinfo_1->prod_sel() == sel_Withcaseinfo) && (phylum_cast(this->withcaseinfo_1)->patternrepresentation_1->prod_sel() == sel_Conspatternrepresentation) && ((phylum_cast(this->withcaseinfo_1)->patternrepresentation_1)->elem_patternrepresentation_1->prod_sel() == sel_PRUserPredicate) && (phylum_cast((phylum_cast(this->withcaseinfo_1)->patternrepresentation_1)->elem_patternrepresentation_1)->Cexpression_1->prod_sel() == sel_NilCexpression)) { const patternrepresentation bindings = phylum_cast(this->withcaseinfo_1)->patternrepresentation_2; const Ctext ct = phylum_cast(this->withcaseinfo_1)->Ctext_1; { kc_printer(kc_t("{\ \n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(bindings, kc_printer, view_wc_bindings); if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(ct, kc_printer, view_gen_initializephyla_c); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t("}\ \n"), kc_current_view); } } else if ((this->withcaseinfo_1->prod_sel() == sel_Withcaseinfo) && (phylum_cast(this->withcaseinfo_1)->patternrepresentation_1->prod_sel() == sel_Conspatternrepresentation) && ((phylum_cast(this->withcaseinfo_1)->patternrepresentation_1)->elem_patternrepresentation_1->prod_sel() == sel_PRDefault)) { const patternrepresentation bindings = phylum_cast(this->withcaseinfo_1)->patternrepresentation_2; const Ctext ct = phylum_cast(this->withcaseinfo_1)->Ctext_1; { kc_printer(kc_t("{\ \n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(bindings, kc_printer, view_wc_bindings); if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(ct, kc_printer, view_gen_initializephyla_c); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t("}\ \n"), kc_current_view); } } else if ((this->withcaseinfo_1->prod_sel() == sel_Withcaseinfo) && (phylum_cast(this->withcaseinfo_1)->patternrepresentation_1->prod_sel() == sel_Nilpatternrepresentation)) { const patternrepresentation bindings = phylum_cast(this->withcaseinfo_1)->patternrepresentation_2; const Ctext ct = phylum_cast(this->withcaseinfo_1)->Ctext_1; { kc_printer(kc_t("{\ \n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(bindings, kc_printer, view_wc_bindings); if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(ct, kc_printer, view_gen_initializephyla_c); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t("}\ \n"), kc_current_view); } } else if ((this->withcaseinfo_1->prod_sel() == sel_Withcaseinfo)) { const patternrepresentation p = phylum_cast(this->withcaseinfo_1)->patternrepresentation_1; const patternrepresentation bindings = phylum_cast(this->withcaseinfo_1)->patternrepresentation_2; const Ctext ct = phylum_cast(this->withcaseinfo_1)->Ctext_1; const withcasesinfo r_rri = this->withcasesinfo_1; gl_bindings.clear(); kc::unparse(bindings, kc_printer, view_predicate_bindings); if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } { kc_printer(kc_t(" if (("), kc_current_view); } kc::unparse(p, kc_printer, view_wc_predicates); { kc_printer(kc_t(")) {\ \n"), kc_current_view); } if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(bindings, kc_printer, view_wc_bindings); operatorstack.push( f_operatorofpatternrepresentation( p ) ); if(g_options.linedirec) { kc::unparse(pg_line, kc_printer, kc_current_view); kc::unparse(ct->line, kc_printer, kc_current_view); { kc_printer(kc_t(" \""), kc_current_view); } PRINT(g_options.dir_line.c_str()); kc::unparse(ct->file, kc_printer, view_filename); { kc_printer(kc_t("\"\n"), kc_current_view); } } kc::unparse(ct, kc_printer, view_gen_initializephyla_c); operatorstack.pop(); kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" } else\ \n"), kc_current_view); } kc::unparse(r_rri, kc_printer, kc_current_view); } else { withcaseinfo_1->unparse(kc_printer, kc_current_view ); withcasesinfo_1->do_unparse(kc_printer, kc_current_view ); } break; } } } void impl_withcasesinfo::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_withcases_and_default_enum: { view_gen_withcases_and_default_class& kc_current_view=static_cast(kc_current_view_base); { if (inforeachcontext.top()) { { kc_printer(kc_t("{/* EMPTY */ /*skip: no matching pattern in foreach patterns*/}\ \n"), kc_current_view); } } else if ( (strcmp( gl_return_type, "" ) == 0) || ((gl_star_count == 0) && (! f_isphylum( gl_return_ID )) && (! f_is_known_ptr_type( gl_return_ID )) ) ) { { kc_printer(kc_t("kc_no_default_in_with( \""), kc_current_view); } kc::unparse(gl_function, kc_printer, kc_current_view); { kc_printer(kc_t("\", __LINE__, __FILE__ );\ \n"), kc_current_view); } } else { { kc_printer(kc_t("{ kc_no_default_in_with( \""), kc_current_view); } kc::unparse(gl_function, kc_printer, kc_current_view); { kc_printer(kc_t("\", __LINE__, __FILE__ );\ \n return static_cast<"), kc_current_view); } kc::unparse(gl_return_type, kc_printer, kc_current_view); charruns star_string = Stars()->set(gl_star_count); kc::unparse(star_string, kc_printer, kc_current_view); { kc_printer(kc_t(">(0); }\ \n"), kc_current_view); } } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_withcaseinfo_Withcaseinfo::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_rewriteviewsinfo::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_rewritedefs_c_enum: { view_gen_rewritedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const rewriteviewinfo a_rvi = this->rewriteviewinfo_1; const rewriteviewsinfo r_rvi = this->rewriteviewsinfo_1; kc::unparse(r_rvi, kc_printer, kc_current_view); kc::unparse(a_rvi, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (rewriteviewsinfo iterator_ = this; iterator_->rewriteviewsinfo_1 != 0; iterator_ = iterator_->rewriteviewsinfo_1) iterator_->rewriteviewinfo_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_rewriteviewsinfo::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_rewritedefs_c_enum: { view_gen_rewritedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_rewriteviewinfo_Rewriteviewinfo::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_rewritedefs_other_c_enum: { view_gen_rewritedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->rewriterulesinfo_1->prod_sel() == sel_Nilrewriterulesinfo)) { } else { const ID v = this->ID_1; { kc_printer(kc_t(" case "), kc_current_view); } kc::unparse(v, kc_printer, kc_current_view); { kc_printer(kc_t("_enum: {\ \n "), kc_current_view); } kc::unparse(v, kc_printer, kc_current_view); { kc_printer(kc_t("_class& kc_current_view=static_cast<"), kc_current_view); } kc::unparse(v, kc_printer, kc_current_view); { kc_printer(kc_t("_class&>(kc_current_view_base);\ \n"), kc_current_view); } gl_view = v; kc::unparse(gl_alternative, kc_printer, kc_current_view); gl_view = 0; { kc_printer(kc_t(" }\ \n"), kc_current_view); } } break; } case view_gen_rewritedefs_default_c_enum: { view_gen_rewritedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->rewriterulesinfo_1->prod_sel() == sel_Nilrewriterulesinfo)) { if (gl_rewrite_goto_used) { { kc_printer(kc_t(" kc_rewrite_default:\ \n"), kc_current_view); } } { kc_printer(kc_t(" default:;\ \n"), kc_current_view); } } else { const ID v = this->ID_1; { kc_printer(kc_t(" default:\ \n"), kc_current_view); } if (gl_rewrite_goto_used) { { kc_printer(kc_t(" kc_rewrite_default:\ \n"), kc_current_view); } } { kc_printer(kc_t(" case "), kc_current_view); } kc::unparse(v, kc_printer, kc_current_view); { kc_printer(kc_t("_enum: {\ \n "), kc_current_view); } kc::unparse(v, kc_printer, kc_current_view); { kc_printer(kc_t("_class& kc_current_view=static_cast<"), kc_current_view); } kc::unparse(v, kc_printer, kc_current_view); { kc_printer(kc_t("_class&>(kc_current_view_base);\ \n"), kc_current_view); } gl_view = v; kc::unparse(gl_alternative, kc_printer, kc_current_view); gl_view = 0; { kc_printer(kc_t(" }\ \n"), kc_current_view); } } break; } case view_gen_rewritedefs_c_enum: { view_gen_rewritedefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ID_1->prod_sel() == sel_Id) && (phylum_cast(this->ID_1)->uniqID_1->prod_sel() == sel_Str)) { const casestring v = phylum_cast(phylum_cast(this->ID_1)->uniqID_1)->casestring_1; const rewriterulesinfo rri = this->rewriterulesinfo_1; gl_rewrite_rewriteinfo = rri; if ( strcmp(v->name, "base_rview" )==0 ) { kc::unparse(this, kc_printer, view_gen_rewritedefs_default_c); } else { kc::unparse(this, kc_printer, view_gen_rewritedefs_other_c); } gl_rewrite_rewriteinfo = 0; } else goto kc_unparsing_default; break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unparseviewsinfo::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_unparsedefs_c_enum: { view_gen_unparsedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { const unparseviewinfo a_uvi = this->unparseviewinfo_1; const unparseviewsinfo r_uvi = this->unparseviewsinfo_1; kc::unparse(r_uvi, kc_printer, kc_current_view); kc::unparse(a_uvi, kc_printer, kc_current_view); } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (unparseviewsinfo iterator_ = this; iterator_->unparseviewsinfo_1 != 0; iterator_ = iterator_->unparseviewsinfo_1) iterator_->unparseviewinfo_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_unparseviewsinfo::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_c_enum: { view_gen_unparsedefs_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_unparseviewinfo_Unparseviewinfo::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->unparsedeclsinfo_1->prod_sel() == sel_Nilunparsedeclsinfo)) { } else { const ID v = this->ID_1; const unparsedeclsinfo udi = this->unparsedeclsinfo_1; { kc_printer(kc_t(" case "), kc_current_view); } kc::unparse(v, kc_printer, kc_current_view); { kc_printer(kc_t("_enum: {\ \n "), kc_current_view); } kc::unparse(v, kc_printer, kc_current_view); { kc_printer(kc_t("_class& kc_current_view=static_cast<"), kc_current_view); } kc::unparse(v, kc_printer, kc_current_view); { kc_printer(kc_t("_class&>(kc_current_view_base);\ \n"), kc_current_view); } kc::unparse(udi, kc_printer, kc_current_view); { kc_printer(kc_t(" break;\ \n }\ \n"), kc_current_view); } } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID v = this->ID_1; const unparsedeclsinfo udi = this->unparsedeclsinfo_1; kc::unparse(g_emptystring, kc_printer, view_printer_outputfileline); { kc_printer(kc_t(" default:\ \n"), kc_current_view); } if (gl_unparse_goto_used) { { kc_printer(kc_t(" kc_unparsing_default:\ \n"), kc_current_view); } } { kc_printer(kc_t(" case "), kc_current_view); } kc::unparse(v, kc_printer, kc_current_view); { kc_printer(kc_t("_enum: {\ \n uview kc_current_view=kc_current_view_base;\ \n"), kc_current_view); } bool onlyDefault; { unparsedeclsinfo kc_selvar_0_1 = phylum_cast(udi); if ((kc_selvar_0_1->prod_sel() == sel_Nilunparsedeclsinfo)) { onlyDefault = true; } else { onlyDefault = false; } } view_gen_unparsedefs_default_c_class vgudcD(/* is list ? */ false, onlyDefault); kc::unparse(udi, kc_printer, vgudcD); { kc_printer(kc_t(" break;\ \n }\ \n"), kc_current_view); } } break; } case view_gen_unparsedefs_c_enum: { view_gen_unparsedefs_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ID_1->prod_sel() == sel_Id) && (phylum_cast(this->ID_1)->uniqID_1->prod_sel() == sel_Str)) { const casestring v = phylum_cast(phylum_cast(this->ID_1)->uniqID_1)->casestring_1; if ( strcmp(v->name, "base_uview" )==0 ) { kc::unparse(this, kc_printer, view_gen_unparsedefs_default_c); } else { kc::unparse(this, kc_printer, view_gen_unparsedefs_other_c); } } else goto kc_unparsing_default; break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_unparsedeclsinfo::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->unparsedeclinfo_1->prod_sel() == sel_Unparsedeclinfo) && (phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_1->prod_sel() == sel_Conspatternrepresentation) && ((phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_1)->patternrepresentation_1->prod_sel() == sel_Nilpatternrepresentation)) { const patternrepresentation p = phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_1; const patternrepresentation bindings = phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_2; const unparseclause uc = phylum_cast(this->unparsedeclinfo_1)->unparseclause_1; const unparsedeclsinfo r_udi = this->unparsedeclsinfo_1; { kc_printer(kc_t("{\n"), kc_current_view); } kc::unparse(bindings, kc_printer, view_unp_bindings); operatorstack.push( f_operatorofpatternrepresentation( p ) ); kc::unparse(uc, kc_printer, kc_current_view); operatorstack.pop(); { kc_printer(kc_t("}\ \n"), kc_current_view); } if (g_options.warn_drop_identical_patterns) { unparsedeclsinfo kc_selvar_0_1 = phylum_cast(r_udi); if ((kc_selvar_0_1->prod_sel() == sel_Consunparsedeclsinfo)) { { unparsedeclsinfo kc_fe_selvar_1 = kc_selvar_0_1; while( kc_fe_selvar_1->prod_sel() == sel_Consunparsedeclsinfo ) { unparsedeclinfo kc_selvar_1_1 = kc_fe_selvar_1->unparsedeclinfo_1; { { { const unparsedeclinfo udi = kc_selvar_1_1; warn_drop_identical_pattern(udi); } } } kc_fe_selvar_1 = kc_fe_selvar_1->unparsedeclsinfo_1; } } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilunparsedeclsinfo)) { } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } } else if ((this->unparsedeclinfo_1->prod_sel() == sel_Unparsedeclinfo) && (phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_1->prod_sel() == sel_Conspatternrepresentation)) { const patternrepresentation p = phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_1; const patternrepresentation r_p = (phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_1)->patternrepresentation_1; const patternrepresentation bindings = phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_2; const unparseclause uc = phylum_cast(this->unparsedeclinfo_1)->unparseclause_1; const unparsedeclsinfo r_udi = this->unparsedeclsinfo_1; gl_bindings.clear(); kc::unparse(bindings, kc_printer, view_predicate_bindings); { kc_printer(kc_t(" if (("), kc_current_view); } kc::unparse(r_p, kc_printer, view_unp_predicates); { kc_printer(kc_t(")) {\ \n"), kc_current_view); } kc::unparse(bindings, kc_printer, view_unp_bindings); operatorstack.push( f_operatorofpatternrepresentation( p ) ); kc::unparse(uc, kc_printer, kc_current_view); operatorstack.pop(); { kc_printer(kc_t(" } else\ \n"), kc_current_view); } kc::unparse(r_udi, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->unparsedeclinfo_1->prod_sel() == sel_Unparsedeclinfo) && (phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_1->prod_sel() == sel_Conspatternrepresentation) && ((phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_1)->patternrepresentation_1->prod_sel() == sel_Nilpatternrepresentation)) { const patternrepresentation p = phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_1; const patternrepresentation bindings = phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_2; const unparseclause uc = phylum_cast(this->unparsedeclinfo_1)->unparseclause_1; const unparsedeclsinfo r_udi = this->unparsedeclsinfo_1; { kc_printer(kc_t("{\n"), kc_current_view); } kc::unparse(bindings, kc_printer, view_unp_bindings); operatorstack.push( f_operatorofpatternrepresentation( p ) ); kc::unparse(uc, kc_printer, kc_current_view); operatorstack.pop(); { kc_printer(kc_t("}\ \n"), kc_current_view); } if (g_options.warn_drop_identical_patterns) { unparsedeclsinfo kc_selvar_0_1 = phylum_cast(r_udi); if ((kc_selvar_0_1->prod_sel() == sel_Consunparsedeclsinfo)) { { unparsedeclsinfo kc_fe_selvar_1 = kc_selvar_0_1; while( kc_fe_selvar_1->prod_sel() == sel_Consunparsedeclsinfo ) { unparsedeclinfo kc_selvar_1_1 = kc_fe_selvar_1->unparsedeclinfo_1; { { { const unparsedeclinfo udi = kc_selvar_1_1; warn_drop_identical_pattern(udi); } } } kc_fe_selvar_1 = kc_fe_selvar_1->unparsedeclsinfo_1; } } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilunparsedeclsinfo)) { } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } } else if ((this->unparsedeclinfo_1->prod_sel() == sel_Unparsedeclinfo) && (phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_1->prod_sel() == sel_Conspatternrepresentation)) { const patternrepresentation p = phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_1; const patternrepresentation r_p = (phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_1)->patternrepresentation_1; const patternrepresentation bindings = phylum_cast(this->unparsedeclinfo_1)->patternrepresentation_2; const unparseclause uc = phylum_cast(this->unparsedeclinfo_1)->unparseclause_1; const unparsedeclsinfo r_udi = this->unparsedeclsinfo_1; gl_bindings.clear(); kc::unparse(bindings, kc_printer, view_predicate_bindings); { kc_printer(kc_t(" if (("), kc_current_view); } kc::unparse(r_p, kc_printer, view_unp_predicates); { kc_printer(kc_t(")) {\ \n"), kc_current_view); } kc::unparse(bindings, kc_printer, view_unp_bindings); operatorstack.push( f_operatorofpatternrepresentation( p ) ); kc::unparse(uc, kc_printer, kc_current_view); operatorstack.pop(); { kc_printer(kc_t(" } else\ \n"), kc_current_view); } kc::unparse(r_udi, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (unparsedeclsinfo iterator_ = this; iterator_->unparsedeclsinfo_1 != 0; iterator_ = iterator_->unparsedeclsinfo_1) iterator_->unparsedeclinfo_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_unparsedeclsinfo::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_unparsedefs_other_c_enum: { view_gen_unparsedefs_other_c_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("\vgoto kc_unparsing_default\r;\ \n"), kc_current_view); } gl_unparse_goto_used = true; } break; } case view_gen_unparsedefs_default_c_enum: { view_gen_unparsedefs_default_c_class& kc_current_view=static_cast(kc_current_view_base); { phylumdeclaration phydecl = f_lookupdecl( gl_phylum ); if ( phydecl == 0 ) { v_report(NonFatal( FileLine( gl_phylum->file, gl_phylum->line ), Problem1S1ID( "internal error: could not find declaration of phylum:", gl_phylum ))); } else { kc::unparse(phydecl, kc_printer, kc_current_view); } } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_unparsedeclinfo_Unparsedeclinfo::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_ac_declaration_AcDeclaration::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_init_declarator_list idlo = this->ac_init_declarator_list_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(idlo, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } break; } } } void impl_ac_declaration_list::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_declaration h = this->ac_declaration_1; const ac_declaration_list t = this->ac_declaration_list_1; kc::unparse(t, kc_printer, kc_current_view); kc::unparse(h, kc_printer, kc_current_view); } break; } } } void impl_ac_declaration_list::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_declaration_specifiers::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->ac_declaration_specifiers_1->prod_sel() == sel_Nilac_declaration_specifiers)) { const ac_declaration_specifier h = this->ac_declaration_specifier_1; kc::unparse(h, kc_printer, kc_current_view); } else { const ac_declaration_specifier h = this->ac_declaration_specifier_1; const ac_declaration_specifiers t = this->ac_declaration_specifiers_1; kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(h, kc_printer, kc_current_view); } break; } } } void impl_ac_declaration_specifiers::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_declaration_specifier_AcDeclSpecTypeQual::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_ac_declaration_specifier_AcDeclSpecTypeSpec::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_ac_declaration_specifier_AcDeclSpecStorageSpec::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_ac_storage_class_specifier_AcVirtual::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnk_c_enum: { view_gen_fnk_c_class& kc_current_view=static_cast(kc_current_view_base); { } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { { kc_printer(kc_t("virtual"), kc_current_view); } } break; } } } void impl_ac_storage_class_specifier_AcTypedef::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { { kc_printer(kc_t("typedef"), kc_current_view); } } break; } } } void impl_ac_storage_class_specifier_AcExtern::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { { kc_printer(kc_t("extern"), kc_current_view); } } break; } } } void impl_ac_storage_class_specifier_AcStatic::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_member_dcl_h_enum: { view_gen_member_dcl_h_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("static"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_storage_class_specifier_AcRegister::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { { kc_printer(kc_t("register"), kc_current_view); } } break; } } } void impl_ac_storage_class_specifier_AcAuto::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { { kc_printer(kc_t("auto"), kc_current_view); } } break; } } } void impl_ac_type_specifier_AcTypeSpec::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ID i = this->ID_1; kc::unparse(i, kc_printer, kc_current_view); } break; } } } void impl_ac_type_qualifier_AcNoQualifier::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_type_qualifier_AcUnsigned::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { { kc_printer(kc_t("unsigned"), kc_current_view); } } break; } } } void impl_ac_type_qualifier_AcVolatile::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { { kc_printer(kc_t("volatile"), kc_current_view); } } break; } } } void impl_ac_type_qualifier_AcConst::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { { kc_printer(kc_t("const"), kc_current_view); } } break; } } } void impl_ac_init_declarator_list::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->ac_init_declarator_list_1->prod_sel() == sel_Nilac_init_declarator_list)) { const ac_init_declarator h = this->ac_init_declarator_1; kc::unparse(h, kc_printer, kc_current_view); } else { const ac_init_declarator h = this->ac_init_declarator_1; const ac_init_declarator_list t = this->ac_init_declarator_list_1; kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(h, kc_printer, kc_current_view); } break; } } } void impl_ac_init_declarator_list::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_init_declarator_AcInitDecl::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_declarator d = this->ac_declarator_1; kc::unparse(d, kc_printer, kc_current_view); } break; } } } void impl_ac_declarator_AcDeclarator::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_opt_const_enum: { view_gen_opt_const_class& kc_current_view=static_cast(kc_current_view_base); { const ac_direct_declarator dd = this->ac_direct_declarator_1; kc::unparse(dd, kc_printer, kc_current_view); } break; } case view_gen_fnkdecls_enum: { view_gen_fnkdecls_class& kc_current_view=static_cast(kc_current_view_base); { const ac_pointer_option po = this->ac_pointer_option_1; const ac_ref_option rr = this->ac_ref_option_1; const ac_direct_declarator dd = this->ac_direct_declarator_1; kc::unparse(po, kc_printer, kc_current_view); kc::unparse(rr, kc_printer, kc_current_view); kc::unparse(dd, kc_printer, kc_current_view); } break; } case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); { const ac_direct_declarator dd = this->ac_direct_declarator_1; kc::unparse(dd, kc_printer, kc_current_view); } break; } case view_gen_fn_pointer_name_enum: { view_gen_fn_pointer_name_class& kc_current_view=static_cast(kc_current_view_base); { const ac_pointer_option po = this->ac_pointer_option_1; const ac_ref_option rr = this->ac_ref_option_1; const ac_direct_declarator dd = this->ac_direct_declarator_1; kc::unparse(po, kc_printer, kc_current_view); kc::unparse(rr, kc_printer, kc_current_view); kc::unparse(dd, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_pointer_option po = this->ac_pointer_option_1; const ac_ref_option rr = this->ac_ref_option_1; const ac_direct_declarator dd = this->ac_direct_declarator_1; kc::unparse(po, kc_printer, kc_current_view); kc::unparse(rr, kc_printer, kc_current_view); kc::unparse(dd, kc_printer, kc_current_view); } break; } } } void impl_ac_direct_declarator_AcOperatorDeclId::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_operator_name id = this->ac_operator_name_1; { kc_printer(kc_t("operator "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); } break; } } } void impl_ac_direct_declarator_AcConvOperatorDecl::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_member_dcl_h_enum: { view_gen_member_dcl_h_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_2; { kc_printer(kc_t("operator "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); } break; } case view_gen_fn_pointer_name_enum: { view_gen_fn_pointer_name_class& kc_current_view=static_cast(kc_current_view_base); { const ID clid = this->ID_1; const ID id = this->ID_2; kc::unparse(clid, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("::operator "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); } break; } case view_gen_fnk_c_enum: { view_gen_fnk_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID clid = this->ID_1; const ID id = this->ID_2; kc::unparse(clid, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("::operator "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_ac_direct_declarator_AcMemberDecl::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_member_dcl_h_enum: { view_gen_member_dcl_h_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_2; const ac_constant_expression_list idxs = this->ac_constant_expression_list_1; kc::unparse(id, kc_printer, kc_current_view); kc::unparse(idxs, kc_printer, kc_current_view); } break; } case view_gen_fn_pointer_name_enum: { view_gen_fn_pointer_name_class& kc_current_view=static_cast(kc_current_view_base); { const ID clid = this->ID_1; const ID id = this->ID_2; const ac_constant_expression_list idxs = this->ac_constant_expression_list_1; kc::unparse(clid, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("::"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); kc::unparse(idxs, kc_printer, kc_current_view); } break; } case view_gen_fnk_c_enum: { view_gen_fnk_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID clid = this->ID_1; const ID id = this->ID_2; const ac_constant_expression_list idxs = this->ac_constant_expression_list_1; kc::unparse(clid, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("::"), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); kc::unparse(idxs, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_ac_direct_declarator_AcQualifiedDeclProto::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_opt_const_enum: { view_gen_opt_const_class& kc_current_view=static_cast(kc_current_view_base); { const ac_type_qualifier co = this->ac_type_qualifier_1; kc::unparse(co, kc_printer, kc_current_view); } break; } case view_gen_member_dcl_h_enum: { view_gen_member_dcl_h_class& kc_current_view=static_cast(kc_current_view_base); { const ac_direct_declarator id = this->ac_direct_declarator_1; const ac_parameter_type_list args = this->ac_parameter_type_list_1; const ac_type_qualifier opt_const = this->ac_type_qualifier_1; kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(args, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } kc::unparse(opt_const, kc_printer, kc_current_view); { kc_printer(kc_t(";\ \n"), kc_current_view); } } break; } case view_gen_fnkdecls_enum: { view_gen_fnkdecls_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_class_qualifier_list_1->prod_sel() == sel_Nilac_class_qualifier_list)) { const ac_direct_declarator dd = this->ac_direct_declarator_1; kc::unparse(dd, kc_printer, kc_current_view); { kc_printer(kc_t("()"), kc_current_view); } } else { } break; } case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); { const ac_direct_declarator dd = this->ac_direct_declarator_1; kc::unparse(dd, kc_printer, kc_current_view); } break; } case view_gen_fn_pointer_name_enum: { view_gen_fn_pointer_name_class& kc_current_view=static_cast(kc_current_view_base); { const ac_class_qualifier_list dd = this->ac_class_qualifier_list_1; const ac_direct_declarator id = this->ac_direct_declarator_1; kc::unparse(dd, kc_printer, kc_current_view); kc::unparse(id, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_class_qualifier_list qq = this->ac_class_qualifier_list_1; const ac_direct_declarator id = this->ac_direct_declarator_1; const ac_parameter_type_list ptl = this->ac_parameter_type_list_1; const ac_type_qualifier oc = this->ac_type_qualifier_1; kc::unparse(qq, kc_printer, kc_current_view); kc::unparse(id, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(ptl, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } kc::unparse(oc, kc_printer, kc_current_view); } break; } } } void impl_ac_direct_declarator_AcDirectDeclProto::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_opt_const_enum: { view_gen_opt_const_class& kc_current_view=static_cast(kc_current_view_base); { } break; } case view_gen_fnkdecls_enum: { view_gen_fnkdecls_class& kc_current_view=static_cast(kc_current_view_base); { const ac_direct_declarator dd = this->ac_direct_declarator_1; kc::unparse(dd, kc_printer, kc_current_view); { kc_printer(kc_t("()"), kc_current_view); } } break; } case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); { const ac_direct_declarator dd = this->ac_direct_declarator_1; kc::unparse(dd, kc_printer, kc_current_view); } break; } case view_gen_fn_pointer_name_enum: { view_gen_fn_pointer_name_class& kc_current_view=static_cast(kc_current_view_base); { const ac_direct_declarator dd = this->ac_direct_declarator_1; kc::unparse(dd, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_direct_declarator dd = this->ac_direct_declarator_1; const ac_parameter_type_list ptl = this->ac_parameter_type_list_1; kc::unparse(dd, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(ptl, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } break; } } } void impl_ac_direct_declarator_AcDirectDeclArray::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnkdecls_enum: { view_gen_fnkdecls_class& kc_current_view=static_cast(kc_current_view_base); { const ac_direct_declarator dd = this->ac_direct_declarator_1; const ac_constant_expression_option ceo = this->ac_constant_expression_option_1; kc::unparse(dd, kc_printer, kc_current_view); { kc_printer(kc_t("["), kc_current_view); } kc::unparse(ceo, kc_printer, kc_current_view); { kc_printer(kc_t("]"), kc_current_view); } } break; } case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); { const ac_direct_declarator dd = this->ac_direct_declarator_1; kc::unparse(dd, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_direct_declarator dd = this->ac_direct_declarator_1; const ac_constant_expression_option ceo = this->ac_constant_expression_option_1; kc::unparse(dd, kc_printer, kc_current_view); { kc_printer(kc_t("["), kc_current_view); } kc::unparse(ceo, kc_printer, kc_current_view); { kc_printer(kc_t("]"), kc_current_view); } } break; } } } void impl_ac_direct_declarator_AcDirectDeclPack::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnkdecls_enum: { view_gen_fnkdecls_class& kc_current_view=static_cast(kc_current_view_base); { const ac_declarator d = this->ac_declarator_1; { kc_printer(kc_t("("), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } break; } case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); { const ac_declarator d = this->ac_declarator_1; kc::unparse(d, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_declarator d = this->ac_declarator_1; { kc_printer(kc_t("("), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } break; } } } void impl_ac_direct_declarator_AcDirectDeclId::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnkdecls_enum: { view_gen_fnkdecls_class& kc_current_view=static_cast(kc_current_view_base); { const ID i = this->ID_1; kc::unparse(i, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ID i = this->ID_1; kc::unparse(i, kc_printer, kc_current_view); } break; } } } void impl_ac_pointer_option_Yespointer::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_pointer p = this->ac_pointer_1; kc::unparse(p, kc_printer, kc_current_view); } break; } } } void impl_ac_pointer_option_Nopointer::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_pointer_AcPointerCons::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->ac_type_qualifier_list_1->prod_sel() == sel_Nilac_type_qualifier_list)) { const ac_pointer p = this->ac_pointer_1; { kc_printer(kc_t("*"), kc_current_view); } kc::unparse(p, kc_printer, kc_current_view); } else { const ac_type_qualifier_list tql = this->ac_type_qualifier_list_1; const ac_pointer p = this->ac_pointer_1; { kc_printer(kc_t("* "), kc_current_view); } kc::unparse(tql, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(p, kc_printer, kc_current_view); } break; } } } void impl_ac_pointer_AcPointerNil::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->ac_type_qualifier_list_1->prod_sel() == sel_Nilac_type_qualifier_list)) { { kc_printer(kc_t("*"), kc_current_view); } } else { const ac_type_qualifier_list tql = this->ac_type_qualifier_list_1; { kc_printer(kc_t("* "), kc_current_view); } kc::unparse(tql, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } } break; } } } void impl_ac_ref_option_AcRef::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { { kc_printer(kc_t("&"), kc_current_view); } } break; } } } void impl_ac_ref_option_AcNoRef::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_operator_name_AcOperatorName::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_ac_class_qualifier_help_list::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (ac_class_qualifier_help_list iterator_ = this; iterator_->ac_class_qualifier_help_list_1 != 0; iterator_ = iterator_->ac_class_qualifier_help_list_1) iterator_->ac_direct_declarator_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_ac_class_qualifier_help_list::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_class_qualifier_list::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ID head = this->ID_1; const ac_class_qualifier_list tail = this->ac_class_qualifier_list_1; kc::unparse(tail, kc_printer, kc_current_view); kc::unparse(head, kc_printer, kc_current_view); { kc_printer(kc_t("::"), kc_current_view); } } break; } } } void impl_ac_class_qualifier_list::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_type_qualifier_list::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->ac_type_qualifier_list_1->prod_sel() == sel_Nilac_type_qualifier_list)) { const ac_type_qualifier h = this->ac_type_qualifier_1; kc::unparse(h, kc_printer, kc_current_view); } else { const ac_type_qualifier h = this->ac_type_qualifier_1; const ac_type_qualifier_list t = this->ac_type_qualifier_list_1; kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(h, kc_printer, kc_current_view); } break; } } } void impl_ac_type_qualifier_list::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_parameter_type_list_AcParList3Dot::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnkdecls_enum: { view_gen_fnkdecls_class& kc_current_view=static_cast(kc_current_view_base); { const ac_parameter_list pl = this->ac_parameter_list_1; kc::unparse(pl, kc_printer, kc_current_view); } break; } case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); { const ac_parameter_list pl = this->ac_parameter_list_1; kc::unparse(pl, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_parameter_list pl = this->ac_parameter_list_1; kc::unparse(pl, kc_printer, kc_current_view); { kc_printer(kc_t(" ..."), kc_current_view); } } break; } } } void impl_ac_parameter_type_list_AcParList::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnkdecls_enum: { view_gen_fnkdecls_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_parameter_list_1->prod_sel() == sel_Nilac_parameter_list)) { } else goto kc_unparsing_default; break; } case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_parameter_list_1->prod_sel() == sel_Nilac_parameter_list)) { } else goto kc_unparsing_default; break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_parameter_list pl = this->ac_parameter_list_1; kc::unparse(pl, kc_printer, kc_current_view); } break; } } } void impl_ac_parameter_list::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_fnkdecls_enum: { view_gen_fnkdecls_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_parameter_list_1->prod_sel() == sel_Nilac_parameter_list)) { const ac_parameter_declaration h = this->ac_parameter_declaration_1; kc::unparse(h, kc_printer, kc_current_view); { kc_printer(kc_t(";"), kc_current_view); } } else { const ac_parameter_declaration h = this->ac_parameter_declaration_1; const ac_parameter_list t = this->ac_parameter_list_1; kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t("\n"), kc_current_view); } kc::unparse(h, kc_printer, kc_current_view); { kc_printer(kc_t(";"), kc_current_view); } } break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->ac_parameter_list_1->prod_sel() == sel_Nilac_parameter_list)) { const ac_parameter_declaration h = this->ac_parameter_declaration_1; kc::unparse(h, kc_printer, kc_current_view); } else { const ac_parameter_declaration h = this->ac_parameter_declaration_1; const ac_parameter_list t = this->ac_parameter_list_1; kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(h, kc_printer, kc_current_view); } break; } } } void impl_ac_parameter_list::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_parameter_declaration_AcParDeclAbsdecl::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_member_dcl_h_enum: { view_gen_member_dcl_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_constant_expression_option_1->prod_sel() == sel_Noac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_abstract_declarator ad = this->ac_abstract_declarator_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(ad, kc_printer, kc_current_view); } else if ((this->ac_constant_expression_option_1->prod_sel() == sel_Yesac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_abstract_declarator ad = this->ac_abstract_declarator_1; const ac_constant_expression expr = phylum_cast(this->ac_constant_expression_option_1)->ac_constant_expression_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(ad, kc_printer, kc_current_view); { kc_printer(kc_t("="), kc_current_view); } kc::unparse(expr, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_fnkdecls_enum: { view_gen_fnkdecls_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_constant_expression_option_1->prod_sel() == sel_Noac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_abstract_declarator ad = this->ac_abstract_declarator_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(ad, kc_printer, kc_current_view); } else if ((this->ac_constant_expression_option_1->prod_sel() == sel_Yesac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_abstract_declarator ad = this->ac_abstract_declarator_1; const ac_constant_expression expr = phylum_cast(this->ac_constant_expression_option_1)->ac_constant_expression_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(ad, kc_printer, kc_current_view); { kc_printer(kc_t("="), kc_current_view); } kc::unparse(expr, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); { const ac_abstract_declarator ad = this->ac_abstract_declarator_1; kc::unparse(ad, kc_printer, kc_current_view); } break; } case view_gen_fnkdecls_c_enum: { view_gen_fnkdecls_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_constant_expression_option_1->prod_sel() == sel_Noac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_abstract_declarator ad = this->ac_abstract_declarator_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(ad, kc_printer, kc_current_view); } else if ((this->ac_constant_expression_option_1->prod_sel() == sel_Yesac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_abstract_declarator ad = this->ac_abstract_declarator_1; const ac_constant_expression expr = phylum_cast(this->ac_constant_expression_option_1)->ac_constant_expression_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(ad, kc_printer, kc_current_view); { kc_printer(kc_t("="), kc_current_view); } kc::unparse(expr, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_fnk_h_enum: { view_gen_fnk_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_constant_expression_option_1->prod_sel() == sel_Noac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_abstract_declarator ad = this->ac_abstract_declarator_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(ad, kc_printer, kc_current_view); } else if ((this->ac_constant_expression_option_1->prod_sel() == sel_Yesac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_abstract_declarator ad = this->ac_abstract_declarator_1; const ac_constant_expression expr = phylum_cast(this->ac_constant_expression_option_1)->ac_constant_expression_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(ad, kc_printer, kc_current_view); { kc_printer(kc_t("="), kc_current_view); } kc::unparse(expr, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_abstract_declarator ad = this->ac_abstract_declarator_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(ad, kc_printer, kc_current_view); } break; } } } void impl_ac_parameter_declaration_AcParDeclDecl::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_member_dcl_h_enum: { view_gen_member_dcl_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_constant_expression_option_1->prod_sel() == sel_Noac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_declarator d = this->ac_declarator_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); } else if ((this->ac_constant_expression_option_1->prod_sel() == sel_Yesac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_declarator d = this->ac_declarator_1; const ac_constant_expression expr = phylum_cast(this->ac_constant_expression_option_1)->ac_constant_expression_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); { kc_printer(kc_t("="), kc_current_view); } kc::unparse(expr, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_fnkdecls_enum: { view_gen_fnkdecls_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_constant_expression_option_1->prod_sel() == sel_Noac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_declarator d = this->ac_declarator_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); } else if ((this->ac_constant_expression_option_1->prod_sel() == sel_Yesac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_declarator d = this->ac_declarator_1; const ac_constant_expression expr = phylum_cast(this->ac_constant_expression_option_1)->ac_constant_expression_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); { kc_printer(kc_t("="), kc_current_view); } kc::unparse(expr, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); { const ac_declarator d = this->ac_declarator_1; kc::unparse(d, kc_printer, kc_current_view); } break; } case view_gen_fnkdecls_c_enum: { view_gen_fnkdecls_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_constant_expression_option_1->prod_sel() == sel_Noac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_declarator d = this->ac_declarator_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); } else if ((this->ac_constant_expression_option_1->prod_sel() == sel_Yesac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_declarator d = this->ac_declarator_1; const ac_constant_expression expr = phylum_cast(this->ac_constant_expression_option_1)->ac_constant_expression_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); { kc_printer(kc_t("="), kc_current_view); } kc::unparse(expr, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } case view_gen_fnk_h_enum: { view_gen_fnk_h_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_constant_expression_option_1->prod_sel() == sel_Noac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_declarator d = this->ac_declarator_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); } else if ((this->ac_constant_expression_option_1->prod_sel() == sel_Yesac_constant_expression)) { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_declarator d = this->ac_declarator_1; const ac_constant_expression expr = phylum_cast(this->ac_constant_expression_option_1)->ac_constant_expression_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); { kc_printer(kc_t("="), kc_current_view); } kc::unparse(expr, kc_printer, kc_current_view); } else goto kc_unparsing_default; break; } default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_declaration_specifiers ds = this->ac_declaration_specifiers_1; const ac_declarator d = this->ac_declarator_1; kc::unparse(ds, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(d, kc_printer, kc_current_view); } break; } } } void impl_ac_identifier_list::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->ac_identifier_list_1->prod_sel() == sel_Nilac_identifier_list)) { const ID h = this->ID_1; kc::unparse(h, kc_printer, kc_current_view); } else { const ID h = this->ID_1; const ac_identifier_list t = this->ac_identifier_list_1; kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(", "), kc_current_view); } kc::unparse(h, kc_printer, kc_current_view); } break; } } } void impl_ac_identifier_list::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: kc_unparsing_default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_abstract_declarator_AcAbsdeclDirdecl::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnkdecls_enum: { view_gen_fnkdecls_class& kc_current_view=static_cast(kc_current_view_base); { const ac_pointer_option p = this->ac_pointer_option_1; const ac_direct_abstract_declarator dad = this->ac_direct_abstract_declarator_1; kc::unparse(p, kc_printer, kc_current_view); kc::unparse(dad, kc_printer, kc_current_view); } break; } case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); { const ac_direct_abstract_declarator dad = this->ac_direct_abstract_declarator_1; kc::unparse(dad, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_pointer_option po = this->ac_pointer_option_1; const ac_direct_abstract_declarator dad = this->ac_direct_abstract_declarator_1; kc::unparse(po, kc_printer, kc_current_view); kc::unparse(dad, kc_printer, kc_current_view); } break; } } } void impl_ac_abstract_declarator_AcAbsdeclPointer::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnkdecls_enum: { view_gen_fnkdecls_class& kc_current_view=static_cast(kc_current_view_base); { const ac_pointer p = this->ac_pointer_1; kc::unparse(p, kc_printer, kc_current_view); { kc_printer(kc_t(" kc_arg_missing"), kc_current_view); } } break; } case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); { { kc_printer(kc_t("kc_arg_missing"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_pointer p = this->ac_pointer_1; kc::unparse(p, kc_printer, kc_current_view); } break; } } } void impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_direct_abstract_declarator dad = this->ac_direct_abstract_declarator_1; kc::unparse(dad, kc_printer, kc_current_view); } break; } } } void impl_ac_direct_abstract_declarator_option_Noac_direct_abstract_declarator::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_direct_abstract_declarator_AcDirAbsdeclFn::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); { const ac_direct_abstract_declarator_option dado = this->ac_direct_abstract_declarator_option_1; kc::unparse(dado, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_direct_abstract_declarator_option dado = this->ac_direct_abstract_declarator_option_1; const ac_parameter_type_list ptl = this->ac_parameter_type_list_1; kc::unparse(dado, kc_printer, kc_current_view); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(ptl, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } break; } } } void impl_ac_direct_abstract_declarator_AcDirAbsdeclArray::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); { const ac_direct_abstract_declarator_option dado = this->ac_direct_abstract_declarator_option_1; kc::unparse(dado, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_direct_abstract_declarator_option dado = this->ac_direct_abstract_declarator_option_1; const ac_constant_expression_option ceo = this->ac_constant_expression_option_1; kc::unparse(dado, kc_printer, kc_current_view); { kc_printer(kc_t("["), kc_current_view); } kc::unparse(ceo, kc_printer, kc_current_view); { kc_printer(kc_t("]"), kc_current_view); } } break; } } } void impl_ac_direct_abstract_declarator_AcDirAbsdeclPack::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnkargs_enum: { view_gen_fnkargs_class& kc_current_view=static_cast(kc_current_view_base); { const ac_abstract_declarator ad = this->ac_abstract_declarator_1; kc::unparse(ad, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_abstract_declarator ad = this->ac_abstract_declarator_1; { kc_printer(kc_t("("), kc_current_view); } kc::unparse(ad, kc_printer, kc_current_view); { kc_printer(kc_t(")"), kc_current_view); } } break; } } } void impl_ac_constant_expression_option_Noac_constant_expression::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_constant_expression_option_Yesac_constant_expression::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_ac_constant_expression_AcConstExpr::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const Cexpression ce = this->Cexpression_1; kc::unparse(ce, kc_printer, view_gen_initializephyla_c); } break; } } } void impl_ac_constant_expression_list::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_base_init_expression_list_enum: { view_gen_base_init_expression_list_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_constant_expression_list_1->prod_sel() == sel_Nilac_constant_expression_list)) { const ac_constant_expression head = this->ac_constant_expression_1; kc::unparse(head, kc_printer, kc_current_view); } else { const ac_constant_expression head = this->ac_constant_expression_1; const ac_constant_expression_list tail = this->ac_constant_expression_list_1; kc::unparse(tail, kc_printer, kc_current_view); { kc_printer(kc_t(","), kc_current_view); } kc::unparse(head, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { const ac_constant_expression head = this->ac_constant_expression_1; const ac_constant_expression_list tail = this->ac_constant_expression_list_1; kc::unparse(tail, kc_printer, kc_current_view); { kc_printer(kc_t("["), kc_current_view); } kc::unparse(head, kc_printer, kc_current_view); { kc_printer(kc_t("]"), kc_current_view); } } break; } } } void impl_ac_constant_expression_list::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_opt_base_init_list_AcYesBaseInit::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnk_c_enum: { view_gen_fnk_c_class& kc_current_view=static_cast(kc_current_view_base); { const ac_base_init_list base_init_list = this->ac_base_init_list_1; { kc_printer(kc_t(":"), kc_current_view); } kc::unparse(base_init_list, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_opt_base_init_list_AcNoBaseInit::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_base_init_list::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { case view_gen_fnk_c_enum: { view_gen_fnk_c_class& kc_current_view=static_cast(kc_current_view_base); if ((this->ac_base_init_list_1->prod_sel() == sel_Nilac_base_init_list)) { const ac_base_init head = this->ac_base_init_1; kc::unparse(head, kc_printer, kc_current_view); } else { const ac_base_init head = this->ac_base_init_1; const ac_base_init_list tail = this->ac_base_init_list_1; kc::unparse(tail, kc_printer, kc_current_view); { kc_printer(kc_t(","), kc_current_view); } kc::unparse(head, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (ac_base_init_list iterator_ = this; iterator_->ac_base_init_list_1 != 0; iterator_ = iterator_->ac_base_init_list_1) iterator_->ac_base_init_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_ac_base_init_list::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_ac_base_init_AcBaseInit::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_gen_fnk_c_enum: { view_gen_fnk_c_class& kc_current_view=static_cast(kc_current_view_base); { const ID id = this->ID_1; const ac_constant_expression_list expr = this->ac_constant_expression_list_1; kc::unparse(id, kc_printer, view_gen_fn_pointer_name); { kc_printer(kc_t("("), kc_current_view); } kc::unparse(expr, kc_printer, view_gen_base_init_expression_list); { kc_printer(kc_t(")"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_baseclass_declarations::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (baseclass_declarations iterator_ = this; iterator_->baseclass_declarations_1 != 0; iterator_ = iterator_->baseclass_declarations_1) iterator_->baseclass_decl_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_baseclass_declarations::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_baseclass_decl_BaseClassDecl::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_baseclass_list::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((this->baseclass_list_1->prod_sel() == sel_Nilbaseclass_list)) { const ID head = this->ID_1; { kc_printer(kc_t("public "), kc_current_view); } kc::unparse(head, kc_printer, view_gen_fn_pointer_name); } else { const ID head = this->ID_1; const baseclass_list tail = this->baseclass_list_1; kc::unparse(tail, kc_printer, kc_current_view); { kc_printer(kc_t(", public "), kc_current_view); } kc::unparse(head, kc_printer, view_gen_fn_pointer_name); } break; } } } void impl_baseclass_list::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_error_Warning::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const fileline fl = this->fileline_1; const problem e = this->problem_1; kc::unparse(g_progname, kc_printer, kc_current_view); { kc_printer(kc_t(": warning"), kc_current_view); } kc::unparse(fl, kc_printer, kc_current_view); { kc_printer(kc_t(": "), kc_current_view); } kc::unparse(e, kc_printer, kc_current_view); { kc_printer(kc_t("\n"), kc_current_view); } } break; } case view_error_format_enum: { view_error_format_class& kc_current_view=static_cast(kc_current_view_base); { const fileline fl = this->fileline_1; const problem e = this->problem_1; kc_current_view.program(g_progname->name); kc_current_view.severity("warning"); kc::unparse(fl, kc_printer, kc_current_view); PRINT(kc_current_view.get_msg()); kc::unparse(e, kc_printer, view_error); { kc_printer(kc_t("\n"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_error_NonFatal::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const fileline fl = this->fileline_1; const problem e = this->problem_1; gp_no_fatal_problems=false; kc::unparse(g_progname, kc_printer, kc_current_view); { kc_printer(kc_t(": error"), kc_current_view); } kc::unparse(fl, kc_printer, kc_current_view); { kc_printer(kc_t(": "), kc_current_view); } kc::unparse(e, kc_printer, kc_current_view); { kc_printer(kc_t("\n"), kc_current_view); } } break; } case view_error_format_enum: { view_error_format_class& kc_current_view=static_cast(kc_current_view_base); { const fileline fl = this->fileline_1; const problem e = this->problem_1; gp_no_fatal_problems=false; kc_current_view.program(g_progname->name); kc_current_view.severity("error"); kc::unparse(fl, kc_printer, kc_current_view); PRINT(kc_current_view.get_msg()); kc::unparse(e, kc_printer, view_error); { kc_printer(kc_t("\n"), kc_current_view); } } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_error_Fatal::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const fileline fl = this->fileline_1; const problem e = this->problem_1; gp_no_fatal_problems=false; kc::unparse(g_progname, kc_printer, kc_current_view); { kc_printer(kc_t(": fatal error"), kc_current_view); } kc::unparse(fl, kc_printer, kc_current_view); { kc_printer(kc_t(": "), kc_current_view); } kc::unparse(e, kc_printer, kc_current_view); { kc_printer(kc_t("\n"), kc_current_view); } leave( 1 ); } break; } case view_error_format_enum: { view_error_format_class& kc_current_view=static_cast(kc_current_view_base); { const fileline fl = this->fileline_1; const problem e = this->problem_1; gp_no_fatal_problems=false; kc_current_view.program(g_progname->name); kc_current_view.severity("fatal error"); kc::unparse(fl, kc_printer, kc_current_view); PRINT(kc_current_view.get_msg()); kc::unparse(e, kc_printer, view_error); { kc_printer(kc_t("\n"), kc_current_view); } leave( 1 ); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem6::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const casestring s2 = this->casestring_2; const casestring s3 = this->casestring_3; const casestring s4 = this->casestring_4; const casestring s5 = this->casestring_5; const casestring s6 = this->casestring_6; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s2, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s3, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s4, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s5, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s6, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem5::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const casestring s2 = this->casestring_2; const casestring s3 = this->casestring_3; const casestring s4 = this->casestring_4; const casestring s5 = this->casestring_5; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s2, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s3, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s4, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s5, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem4::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const casestring s2 = this->casestring_2; const casestring s3 = this->casestring_3; const casestring s4 = this->casestring_4; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s2, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s3, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s4, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem3int1::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const casestring s2 = this->casestring_2; const casestring s3 = this->casestring_3; const integer i1 = this->integer_1; const casestring s4 = this->casestring_4; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s2, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s3, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(i1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s4, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem3::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const casestring s2 = this->casestring_2; const casestring s3 = this->casestring_3; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s2, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s3, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem2::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const casestring s2 = this->casestring_2; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s2, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem1storageoption1ID::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const storageoption so = this->storageoption_1; const casestring s2 = this->casestring_2; const ID id = this->ID_1; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(so, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s2, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem1INT1ID1ID::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const INT i1 = this->INT_1; const casestring s2 = this->casestring_2; const ID id1 = this->ID_1; const casestring s3 = this->casestring_3; const ID id2 = this->ID_2; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(i1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s2, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s3, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id2, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem1ID1ID1ID::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const ID id1 = this->ID_1; const casestring s2 = this->casestring_2; const ID id2 = this->ID_2; const casestring s3 = this->casestring_3; const ID id3 = this->ID_3; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s2, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id2, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s3, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id3, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem1INT1ID::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const INT i1 = this->INT_1; const casestring s2 = this->casestring_2; const ID id1 = this->ID_1; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(i1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s2, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id1, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem1int1::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const integer i1 = this->integer_1; const casestring s2 = this->casestring_2; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(i1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s2, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem1INT::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const INT i1 = this->INT_1; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(i1, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem1t1ID::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const IDtype t = this->IDtype_1; const casestring s2 = this->casestring_2; const ID id = this->ID_1; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(t, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s2, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem1ID1ID::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const ID id1 = this->ID_1; const casestring s2 = this->casestring_2; const ID id2 = this->ID_2; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(s2, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id2, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem1we::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const withexpression we1 = this->withexpression_1; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(we1, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem1tID::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const ID id = this->ID_1; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id, kc_printer, view_error_tID); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem1ID::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; const ID id = this->ID_1; kc::unparse(s1, kc_printer, kc_current_view); { kc_printer(kc_t(" "), kc_current_view); } kc::unparse(id, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_problem_Problem1::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { case view_error_enum: { view_error_class& kc_current_view=static_cast(kc_current_view_base); { const casestring s1 = this->casestring_1; kc::unparse(s1, kc_printer, kc_current_view); } break; } default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_addedphylumdeclarations::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (addedphylumdeclarations iterator_ = this; iterator_->addedphylumdeclarations_1 != 0; iterator_ = iterator_->addedphylumdeclarations_1) iterator_->addedphylumdeclaration_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_addedphylumdeclarations::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_addedphylumdeclaration_AddedPhylumdeclaration::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_countedphylumdeclarations::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (countedphylumdeclarations iterator_ = this; iterator_->countedphylumdeclarations_1 != 0; iterator_ = iterator_->countedphylumdeclarations_1) iterator_->countedphylumdeclaration_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_countedphylumdeclarations::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_countedphylumdeclaration_CountedPhylumdeclaration::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } void impl_charruns_Stars::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((KC_TRACE_PROVIDED((this->number>0), "gutil.k", 370, this))) { { kc_printer(kc_t("*"), kc_current_view); } this->number--; kc::unparse(this, kc_printer, kc_current_view); } else { } break; } } } void impl_charruns_QuotedNewlines::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((KC_TRACE_PROVIDED((this->number>0), "gutil.k", 369, this))) { { kc_printer(kc_t("\\\n\\n"), kc_current_view); } this->number--; kc::unparse(this, kc_printer, kc_current_view); } else { } break; } } } void impl_charruns_Newlines::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; if ((KC_TRACE_PROVIDED((this->number>0), "gutil.k", 368, this))) { { kc_printer(kc_t("\n"), kc_current_view); } this->number--; kc::unparse(this, kc_printer, kc_current_view); } else { } break; } } } void impl_bindingidmarks::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { for (bindingidmarks iterator_ = this; iterator_->bindingidmarks_1 != 0; iterator_ = iterator_->bindingidmarks_1) iterator_->bindingidmark_1->unparse(kc_printer, kc_current_view); } break; } } } void impl_bindingidmarks::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { } break; } } } void impl_bindingidmark_BindingIdMark::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { default: case base_uview_enum: { uview kc_current_view=kc_current_view_base; { default_unparse(kc_printer, kc_current_view ); } break; } } } } // namespace kc kimwitu++-2.3.13/src/Gen.boot/errmsg.inc0000644000175000017500000004616611135163773016415 0ustar useruserint const error_rules[][2]={ { 0, 0}, { 0, 0}, { 0, 1}, { 0, 0}, { 5, 1}, { 0, 0}, { 0, 2}, { 0, 0}, { 5, 2}, { 7, 1}, { 0, 0}, { 0, 0}, { 2, 1}, { 0, 0}, { 128, 1}, { 0, 0}, { 291, 1}, { 0, 0}, { 160, 1}, { 0, 0}, { 248, 1}, { 0, 0}, { 238, 1}, { 0, 0}, { 258, 1}, { 0, 0}, { 372, 1}, { 0, 0}, { 289, 1}, { 0, 0}, { 290, 1}, { 0, 0}, { 292, 1}, { 0, 0}, { 293, 1}, { 0, 0}, { 299, 1}, { 0, 0}, { 300, 1}, { 0, 0}, { 301, 1}, { 0, 0}, { 294, 1}, { 0, 0}, { 267, 1}, { 0, 0}, { 268, 1}, { 0, 0}, { 269, 1}, { 0, 0}, { 270, 1}, { 0, 0}, { 18, 1}, { 0, 0}, { 159, 1}, { 0, 0}, { 22, 1}, { 156, 1}, { 157, 1}, { 158, 1}, { 266, 1}, { 298, 1}, { 0, 0}, { 7, 2}, { 0, 0}, { 17, 1}, { 0, 0}, { 8, 1}, { 0, 0}, { 11, 1}, { 0, 0}, { 9, 1}, { 0, 0}, { 151, 1}, { 204, 1}, { 0, 0}, { 150, 1}, { 0, 0}, { 12, 1}, { 0, 0}, { 13, 1}, { 0, 0}, { 14, 1}, { 0, 0}, { 15, 1}, { 0, 0}, { 10, 1}, { 0, 0}, { 265, 1}, { 0, 0}, { 282, 1}, { 284, 1}, { 0, 0}, { 281, 1}, { 0, 0}, { 283, 1}, { 0, 0}, { 16, 1}, { 0, 0}, { 0, 0}, { 132, 1}, { 0, 0}, { 128, 2}, { 0, 0}, { 131, 1}, { 133, 1}, { 0, 0}, { 164, 1}, { 0, 0}, { 160, 2}, { 0, 0}, { 0, 0}, { 251, 1}, { 0, 0}, { 250, 1}, { 0, 0}, { 248, 2}, { 252, 1}, { 253, 1}, { 254, 1}, { 255, 1}, { 0, 0}, { 0, 0}, { 241, 1}, { 0, 0}, { 240, 1}, { 0, 0}, { 238, 2}, { 242, 1}, { 243, 1}, { 244, 1}, { 245, 1}, { 0, 0}, { 0, 0}, { 260, 1}, { 0, 0}, { 258, 2}, { 261, 1}, { 262, 1}, { 0, 0}, { 0, 0}, { 374, 1}, { 0, 0}, { 372, 2}, { 375, 1}, { 376, 1}, { 0, 0}, { 267, 2}, { 0, 0}, { 297, 1}, { 0, 0}, { 268, 2}, { 0, 0}, { 295, 1}, { 0, 0}, { 298, 1}, { 0, 0}, { 269, 2}, { 0, 0}, { 286, 1}, { 288, 1}, { 0, 0}, { 285, 1}, { 0, 0}, { 287, 1}, { 0, 0}, { 270, 2}, { 0, 0}, { 18, 2}, { 0, 0}, { 159, 2}, { 0, 0}, { 266, 2}, { 0, 0}, { 24, 1}, { 25, 1}, { 0, 0}, { 157, 2}, { 0, 0}, { 158, 2}, { 0, 0}, { 22, 2}, { 0, 0}, { 156, 2}, { 0, 0}, { 0, 0}, { 204, 2}, { 0, 0}, { 151, 2}, { 0, 0}, { 330, 1}, { 0, 0}, { 304, 1}, { 0, 0}, { 333, 1}, { 334, 1}, { 335, 1}, { 336, 1}, { 0, 0}, { 329, 1}, { 0, 0}, { 265, 2}, { 0, 0}, { 302, 1}, { 0, 0}, { 325, 1}, { 328, 1}, { 0, 0}, { 327, 1}, { 0, 0}, { 303, 1}, { 305, 1}, { 0, 0}, { 282, 2}, { 0, 0}, { 284, 2}, { 0, 0}, { 283, 2}, { 0, 0}, { 0, 0}, { 128, 3}, { 0, 0}, { 133, 2}, { 0, 0}, { 164, 2}, { 0, 0}, { 0, 0}, { 251, 2}, { 0, 0}, { 0, 0}, { 248, 3}, { 0, 0}, { 254, 2}, { 255, 2}, { 0, 0}, { 253, 2}, { 0, 0}, { 252, 2}, { 0, 0}, { 0, 0}, { 241, 2}, { 0, 0}, { 0, 0}, { 238, 3}, { 0, 0}, { 244, 2}, { 245, 2}, { 0, 0}, { 243, 2}, { 0, 0}, { 242, 2}, { 0, 0}, { 0, 0}, { 0, 0}, { 258, 3}, { 0, 0}, { 262, 2}, { 0, 0}, { 261, 2}, { 0, 0}, { 0, 0}, { 0, 0}, { 372, 3}, { 0, 0}, { 376, 2}, { 0, 0}, { 375, 2}, { 0, 0}, { 267, 3}, { 0, 0}, { 268, 3}, { 0, 0}, { 312, 1}, { 0, 0}, { 320, 1}, { 0, 0}, { 269, 3}, { 0, 0}, { 310, 1}, { 0, 0}, { 311, 1}, { 313, 1}, { 0, 0}, { 286, 2}, { 0, 0}, { 288, 2}, { 0, 0}, { 287, 2}, { 0, 0}, { 270, 3}, { 0, 0}, { 18, 3}, { 0, 0}, { 266, 3}, { 0, 0}, { 0, 0}, { 25, 2}, { 0, 0}, { 24, 2}, { 0, 0}, { 0, 0}, { 3, 1}, { 0, 0}, { 168, 1}, { 0, 0}, { 171, 1}, { 0, 0}, { 167, 1}, { 0, 0}, { 165, 1}, { 166, 1}, { 169, 1}, { 0, 0}, { 172, 1}, { 0, 0}, { 175, 1}, { 0, 0}, { 157, 3}, { 0, 0}, { 174, 1}, { 176, 1}, { 0, 0}, { 156, 1}, { 157, 1}, { 158, 1}, { 0, 0}, { 158, 3}, { 0, 0}, { 22, 3}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 204, 3}, { 0, 0}, { 0, 0}, { 151, 3}, { 0, 0}, { 330, 2}, { 0, 0}, { 304, 2}, { 0, 0}, { 337, 1}, { 0, 0}, { 335, 2}, { 0, 0}, { 334, 2}, { 336, 2}, { 338, 1}, { 0, 0}, { 0, 0}, { 90, 1}, { 0, 0}, { 361, 1}, { 0, 0}, { 265, 3}, { 0, 0}, { 328, 2}, { 0, 0}, { 325, 2}, { 0, 0}, { 305, 2}, { 0, 0}, { 303, 2}, { 0, 0}, { 284, 3}, { 0, 0}, { 128, 4}, { 0, 0}, { 164, 3}, { 0, 0}, { 251, 3}, { 0, 0}, { 0, 0}, { 255, 3}, { 0, 0}, { 254, 3}, { 0, 0}, { 253, 3}, { 0, 0}, { 241, 3}, { 0, 0}, { 0, 0}, { 245, 3}, { 0, 0}, { 244, 3}, { 0, 0}, { 243, 3}, { 0, 0}, { 0, 0}, { 262, 3}, { 0, 0}, { 0, 0}, { 376, 3}, { 0, 0}, { 340, 1}, { 0, 0}, { 346, 1}, { 347, 1}, { 0, 0}, { 267, 4}, { 0, 0}, { 341, 1}, { 342, 1}, { 343, 1}, { 345, 1}, { 0, 0}, { 344, 1}, { 0, 0}, { 268, 4}, { 0, 0}, { 312, 2}, { 0, 0}, { 320, 2}, { 0, 0}, { 280, 1}, { 0, 0}, { 279, 1}, { 0, 0}, { 269, 4}, { 0, 0}, { 313, 2}, { 0, 0}, { 311, 2}, { 0, 0}, { 288, 3}, { 0, 0}, { 270, 4}, { 0, 0}, { 19, 1}, { 0, 0}, { 18, 4}, { 20, 1}, { 0, 0}, { 266, 4}, { 0, 0}, { 0, 0}, { 25, 3}, { 0, 0}, { 24, 3}, { 0, 0}, { 171, 2}, { 0, 0}, { 166, 2}, { 0, 0}, { 169, 2}, { 0, 0}, { 157, 4}, { 0, 0}, { 0, 0}, { 176, 2}, { 0, 0}, { 22, 4}, { 0, 0}, { 0, 0}, { 138, 1}, { 0, 0}, { 137, 1}, { 0, 0}, { 136, 1}, { 0, 0}, { 208, 1}, { 0, 0}, { 204, 4}, { 207, 1}, { 0, 0}, { 206, 1}, { 0, 0}, { 338, 2}, { 0, 0}, { 336, 3}, { 0, 0}, { 0, 0}, { 90, 2}, { 0, 0}, { 328, 3}, { 0, 0}, { 0, 0}, { 325, 3}, { 0, 0}, { 305, 3}, { 0, 0}, { 128, 5}, { 0, 0}, { 53, 1}, { 164, 4}, { 0, 0}, { 255, 4}, { 0, 0}, { 253, 4}, { 0, 0}, { 245, 4}, { 0, 0}, { 243, 4}, { 0, 0}, { 317, 1}, { 351, 1}, { 355, 1}, { 0, 0}, { 353, 1}, { 0, 0}, { 308, 1}, { 0, 0}, { 360, 1}, { 0, 0}, { 359, 1}, { 0, 0}, { 346, 2}, { 0, 0}, { 306, 1}, { 318, 1}, { 319, 1}, { 0, 0}, { 307, 1}, { 309, 1}, { 348, 1}, { 350, 1}, { 0, 0}, { 347, 2}, { 0, 0}, { 349, 1}, { 352, 1}, { 354, 1}, { 0, 0}, { 316, 1}, { 0, 0}, { 267, 5}, { 0, 0}, { 342, 2}, { 0, 0}, { 343, 2}, { 345, 2}, { 0, 0}, { 268, 5}, { 0, 0}, { 320, 3}, { 0, 0}, { 280, 2}, { 0, 0}, { 358, 1}, { 0, 0}, { 279, 2}, { 0, 0}, { 269, 5}, { 0, 0}, { 313, 3}, { 0, 0}, { 270, 5}, { 0, 0}, { 18, 5}, { 0, 0}, { 20, 2}, { 0, 0}, { 266, 5}, { 0, 0}, { 25, 4}, { 0, 0}, { 72, 1}, { 171, 3}, { 0, 0}, { 166, 3}, { 0, 0}, { 169, 3}, { 0, 0}, { 157, 5}, { 0, 0}, { 0, 0}, { 0, 0}, { 176, 3}, { 0, 0}, { 0, 0}, { 29, 1}, { 0, 0}, { 38, 1}, { 0, 0}, { 22, 5}, { 0, 0}, { 30, 1}, { 32, 1}, { 0, 0}, { 31, 1}, { 0, 0}, { 138, 2}, { 214, 1}, { 0, 0}, { 0, 0}, { 0, 0}, { 137, 2}, { 0, 0}, { 0, 0}, { 0, 0}, { 208, 2}, { 214, 1}, { 0, 0}, { 204, 5}, { 0, 0}, { 207, 2}, { 0, 0}, { 0, 0}, { 0, 0}, { 90, 3}, { 0, 0}, { 94, 1}, { 102, 1}, { 0, 0}, { 142, 1}, { 202, 1}, { 0, 0}, { 141, 1}, { 144, 1}, { 0, 0}, { 143, 1}, { 0, 0}, { 146, 1}, { 0, 0}, { 95, 1}, { 201, 1}, { 0, 0}, { 200, 1}, { 0, 0}, { 0, 0}, { 325, 4}, { 0, 0}, { 54, 1}, { 0, 0}, { 1, 1}, { 0, 0}, { 59, 1}, { 0, 0}, { 56, 1}, { 0, 0}, { 57, 1}, { 0, 0}, { 58, 1}, { 0, 0}, { 60, 1}, { 0, 0}, { 55, 1}, { 0, 0}, { 53, 2}, { 0, 0}, { 164, 5}, { 0, 0}, { 255, 5}, { 0, 0}, { 245, 5}, { 0, 0}, { 351, 1}, { 355, 1}, { 0, 0}, { 317, 2}, { 0, 0}, { 314, 1}, { 315, 1}, { 348, 1}, { 350, 1}, { 0, 0}, { 355, 2}, { 0, 0}, { 351, 2}, { 0, 0}, { 353, 2}, { 0, 0}, { 356, 1}, { 0, 0}, { 317, 1}, { 0, 0}, { 308, 2}, { 318, 1}, { 319, 1}, { 0, 0}, { 360, 2}, { 0, 0}, { 277, 1}, { 0, 0}, { 346, 3}, { 0, 0}, { 319, 2}, { 0, 0}, { 318, 2}, { 0, 0}, { 309, 2}, { 0, 0}, { 307, 2}, { 318, 1}, { 319, 1}, { 0, 0}, { 350, 2}, { 352, 1}, { 354, 1}, { 0, 0}, { 347, 3}, { 0, 0}, { 354, 2}, { 0, 0}, { 352, 2}, { 0, 0}, { 272, 1}, { 0, 0}, { 267, 6}, { 0, 0}, { 343, 3}, { 0, 0}, { 345, 3}, { 0, 0}, { 268, 6}, { 0, 0}, { 320, 4}, { 322, 1}, { 0, 0}, { 280, 3}, { 0, 0}, { 53, 1}, { 358, 2}, { 0, 0}, { 20, 3}, { 0, 0}, { 266, 6}, { 0, 0}, { 73, 1}, { 0, 0}, { 74, 1}, { 0, 0}, { 171, 4}, { 0, 0}, { 72, 2}, { 0, 0}, { 166, 4}, { 0, 0}, { 29, 2}, { 0, 0}, { 38, 2}, { 0, 0}, { 44, 1}, { 0, 0}, { 22, 6}, { 0, 0}, { 0, 0}, { 32, 2}, { 0, 0}, { 138, 3}, { 0, 0}, { 214, 2}, { 0, 0}, { 0, 0}, { 208, 3}, { 0, 0}, { 0, 0}, { 90, 4}, { 0, 0}, { 102, 2}, { 0, 0}, { 202, 2}, { 0, 0}, { 142, 2}, { 0, 0}, { 144, 2}, { 0, 0}, { 148, 1}, { 0, 0}, { 149, 1}, { 0, 0}, { 146, 2}, { 0, 0}, { 147, 1}, { 0, 0}, { 201, 2}, { 0, 0}, { 332, 1}, { 0, 0}, { 0, 0}, { 325, 5}, { 0, 0}, { 0, 0}, { 59, 2}, { 66, 1}, { 0, 0}, { 0, 0}, { 57, 2}, { 72, 1}, { 0, 0}, { 0, 0}, { 58, 2}, { 76, 1}, { 0, 0}, { 0, 0}, { 60, 2}, { 66, 1}, { 0, 0}, { 164, 6}, { 0, 0}, { 348, 1}, { 350, 1}, { 0, 0}, { 317, 3}, { 0, 0}, { 315, 2}, { 0, 0}, { 314, 2}, { 318, 1}, { 319, 1}, { 0, 0}, { 355, 3}, { 0, 0}, { 351, 3}, { 0, 0}, { 353, 3}, { 0, 0}, { 314, 1}, { 315, 1}, { 0, 0}, { 277, 2}, { 0, 0}, { 319, 3}, { 0, 0}, { 318, 3}, { 0, 0}, { 309, 3}, { 318, 1}, { 319, 1}, { 0, 0}, { 354, 3}, { 0, 0}, { 352, 3}, { 0, 0}, { 275, 1}, { 0, 0}, { 272, 2}, { 274, 1}, { 0, 0}, { 273, 1}, { 0, 0}, { 267, 7}, { 0, 0}, { 322, 2}, { 0, 0}, { 266, 7}, { 0, 0}, { 0, 0}, { 38, 3}, { 0, 0}, { 0, 0}, { 44, 2}, { 47, 1}, { 0, 0}, { 22, 7}, { 0, 0}, { 0, 0}, { 0, 0}, { 32, 3}, { 0, 0}, { 190, 1}, { 0, 0}, { 188, 1}, { 0, 0}, { 181, 1}, { 182, 1}, { 0, 0}, { 191, 1}, { 0, 0}, { 138, 4}, { 183, 1}, { 184, 1}, { 185, 1}, { 186, 1}, { 0, 0}, { 0, 0}, { 216, 1}, { 0, 0}, { 0, 0}, { 208, 4}, { 216, 1}, { 0, 0}, { 90, 5}, { 0, 0}, { 106, 1}, { 0, 0}, { 103, 1}, { 0, 0}, { 117, 1}, { 0, 0}, { 113, 1}, { 0, 0}, { 99, 1}, { 0, 0}, { 105, 1}, { 0, 0}, { 108, 1}, { 0, 0}, { 110, 1}, { 0, 0}, { 104, 1}, { 0, 0}, { 111, 1}, { 0, 0}, { 102, 3}, { 0, 0}, { 202, 3}, { 0, 0}, { 142, 3}, { 144, 1}, { 0, 0}, { 144, 3}, { 0, 0}, { 142, 1}, { 148, 2}, { 0, 0}, { 149, 2}, { 0, 0}, { 68, 1}, { 0, 0}, { 59, 3}, { 0, 0}, { 67, 1}, { 0, 0}, { 66, 2}, { 0, 0}, { 57, 3}, { 0, 0}, { 77, 1}, { 0, 0}, { 78, 1}, { 0, 0}, { 58, 3}, { 0, 0}, { 76, 2}, { 0, 0}, { 60, 3}, { 0, 0}, { 315, 3}, { 318, 1}, { 319, 1}, { 0, 0}, { 319, 4}, { 0, 0}, { 318, 4}, { 0, 0}, { 354, 4}, { 0, 0}, { 352, 4}, { 0, 0}, { 275, 2}, { 0, 0}, { 274, 2}, { 0, 0}, { 322, 3}, { 0, 0}, { 266, 8}, { 0, 0}, { 38, 4}, { 41, 1}, { 42, 1}, { 0, 0}, { 48, 1}, { 0, 0}, { 47, 2}, { 0, 0}, { 126, 1}, { 0, 0}, { 44, 3}, { 0, 0}, { 190, 2}, { 0, 0}, { 188, 2}, { 0, 0}, { 182, 2}, { 0, 0}, { 183, 2}, { 185, 2}, { 0, 0}, { 138, 5}, { 0, 0}, { 184, 2}, { 186, 2}, { 0, 0}, { 225, 1}, { 0, 0}, { 0, 0}, { 364, 1}, { 0, 0}, { 216, 2}, { 0, 0}, { 220, 1}, { 221, 1}, { 222, 1}, { 0, 0}, { 208, 5}, { 0, 0}, { 117, 2}, { 0, 0}, { 113, 2}, { 0, 0}, { 99, 2}, { 0, 0}, { 108, 2}, { 0, 0}, { 110, 2}, { 0, 0}, { 148, 3}, { 0, 0}, { 275, 3}, { 324, 1}, { 0, 0}, { 323, 1}, { 0, 0}, { 274, 3}, { 0, 0}, { 322, 4}, { 0, 0}, { 2, 1}, { 42, 2}, { 0, 0}, { 41, 2}, { 0, 0}, { 38, 5}, { 0, 0}, { 48, 2}, { 0, 0}, { 44, 4}, { 0, 0}, { 72, 1}, { 190, 3}, { 0, 0}, { 76, 1}, { 188, 3}, { 0, 0}, { 0, 0}, { 183, 1}, { 184, 1}, { 185, 1}, { 186, 1}, { 194, 1}, { 0, 0}, { 182, 3}, { 0, 0}, { 193, 1}, { 195, 1}, { 0, 0}, { 183, 3}, { 185, 3}, { 0, 0}, { 184, 3}, { 186, 3}, { 0, 0}, { 225, 2}, { 0, 0}, { 0, 0}, { 366, 1}, { 0, 0}, { 364, 2}, { 367, 1}, { 0, 0}, { 222, 2}, { 0, 0}, { 230, 1}, { 0, 0}, { 0, 0}, { 227, 1}, { 229, 1}, { 0, 0}, { 226, 1}, { 228, 1}, { 0, 0}, { 221, 2}, { 0, 0}, { 220, 2}, { 0, 0}, { 117, 3}, { 0, 0}, { 120, 1}, { 0, 0}, { 113, 3}, { 0, 0}, { 99, 3}, { 102, 1}, { 0, 0}, { 72, 1}, { 108, 3}, { 0, 0}, { 76, 1}, { 110, 3}, { 0, 0}, { 324, 2}, { 0, 0}, { 275, 4}, { 0, 0}, { 42, 3}, { 0, 0}, { 38, 6}, { 0, 0}, { 51, 1}, { 0, 0}, { 48, 3}, { 0, 0}, { 190, 4}, { 0, 0}, { 188, 4}, { 0, 0}, { 182, 4}, { 0, 0}, { 0, 0}, { 195, 2}, { 0, 0}, { 183, 4}, { 0, 0}, { 184, 4}, { 0, 0}, { 225, 3}, { 0, 0}, { 0, 0}, { 367, 2}, { 0, 0}, { 364, 3}, { 0, 0}, { 216, 1}, { 222, 3}, { 0, 0}, { 230, 2}, { 0, 0}, { 0, 0}, { 233, 1}, { 0, 0}, { 229, 2}, { 232, 1}, { 0, 0}, { 231, 1}, { 0, 0}, { 228, 2}, { 232, 1}, { 0, 0}, { 236, 1}, { 0, 0}, { 220, 3}, { 0, 0}, { 117, 4}, { 0, 0}, { 120, 2}, { 144, 1}, { 0, 0}, { 99, 4}, { 0, 0}, { 108, 4}, { 0, 0}, { 110, 4}, { 0, 0}, { 324, 3}, { 0, 0}, { 42, 4}, { 0, 0}, { 51, 2}, { 0, 0}, { 48, 4}, { 0, 0}, { 183, 1}, { 184, 1}, { 185, 1}, { 186, 1}, { 0, 0}, { 0, 0}, { 183, 1}, { 184, 1}, { 185, 1}, { 186, 1}, { 195, 3}, { 0, 0}, { 183, 5}, { 0, 0}, { 184, 5}, { 0, 0}, { 225, 4}, { 0, 0}, { 0, 0}, { 0, 0}, { 367, 3}, { 0, 0}, { 364, 4}, { 0, 0}, { 222, 4}, { 0, 0}, { 230, 3}, { 0, 0}, { 72, 1}, { 0, 0}, { 0, 0}, { 233, 2}, { 0, 0}, { 232, 2}, { 0, 0}, { 0, 0}, { 236, 2}, { 0, 0}, { 53, 1}, { 84, 1}, { 0, 0}, { 85, 1}, { 0, 0}, { 87, 1}, { 117, 5}, { 0, 0}, { 120, 3}, { 0, 0}, { 99, 5}, { 0, 0}, { 51, 3}, { 53, 1}, { 0, 0}, { 183, 6}, { 0, 0}, { 184, 6}, { 0, 0}, { 53, 1}, { 225, 5}, { 0, 0}, { 230, 4}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 87, 2}, { 0, 0}, { 117, 6}, { 0, 0}, { 120, 4}, { 0, 0}, { 225, 6}, { 0, 0}, { 0, 0}, { 87, 3}, { 0, 0}, { 117, 7}, { 0, 0}, { 83, 1}, { 0, 0}, { 80, 1}, { 120, 5}, { 0, 0}, { 79, 1}, { 0, 0}, { 225, 7}, { 0, 0}, { 0, 0}, { 87, 4}, { 0, 0}, { 117, 8}, { 0, 0}, { 83, 2}, { 0, 0}, { 80, 2}, { 0, 0}, { 120, 6}, { 0, 0}, { 117, 9}, { 201, 1}, { 0, 0}, { 53, 1}, { 83, 3}, { 0, 0}, { 80, 3}, { 0, 0}, { 93, 1}, { 0, 0}, { 120, 7}, { 0, 0}, { 117, 10}, { 0, 0}, { 83, 4}, { 0, 0}, { 93, 2}, { 0, 0}, { 120, 8}, { 0, 0}, { 93, 3}, { 0, 0}, { 124, 1}, { 0, 0}, { 120, 9}, { 0, 0}, { 93, 4}, { 0, 0}, { 124, 2}, { 0, 0}, { 93, 5}, { 0, 0}, { 124, 3}, { 0, 0}, { 124, 4}, { 144, 1}, { 0, 0}, { 124, 5}, { 0, 0}, { 124, 6}, { 0, 0}, { 124, 7}, { 0, 0}, { 0, 0} }; int error_state[]={ 0, 2, 4, 6, 8, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 63, 65, 67, 69, 71, 73, 76, 78, 80, 82, 84, 86, 88, 90, 93, 95, 97, 99, 100, 102, 104, 107, 109, 111, 112, 114, 116, 122, 123, 125, 127, 133, 134, 136, 140, 141, 143, 147, 149, 151, 153, 155, 157, 159, 162, 164, 166, 168, 170, 172, 174, 177, 179, 181, 183, 185, 186, 188, 190, 192, 194, 199, 201, 203, 205, 208, 210, 213, 215, 217, 219, 220, 222, 224, 226, 227, 229, 230, 232, 235, 237, 239, 240, 242, 243, 245, 248, 250, 252, 253, 254, 256, 258, 260, 261, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280, 283, 285, 287, 289, 291, 293, 295, 296, 298, 300, 301, 303, 305, 307, 309, 313, 315, 317, 319, 322, 326, 328, 330, 331, 332, 333, 335, 336, 338, 340, 342, 344, 346, 350, 351, 353, 355, 357, 359, 361, 363, 365, 367, 369, 371, 373, 374, 376, 378, 380, 382, 383, 385, 387, 389, 390, 392, 393, 395, 397, 400, 402, 407, 409, 411, 413, 415, 417, 419, 421, 423, 425, 427, 429, 431, 434, 436, 437, 439, 441, 443, 445, 447, 449, 450, 452, 454, 455, 457, 459, 461, 463, 466, 468, 470, 472, 473, 475, 477, 478, 480, 482, 484, 487, 489, 491, 493, 495, 499, 501, 503, 505, 507, 509, 513, 518, 520, 524, 526, 528, 530, 533, 535, 537, 539, 541, 543, 545, 547, 549, 551, 553, 555, 557, 560, 562, 564, 566, 567, 568, 570, 571, 573, 575, 577, 580, 582, 585, 586, 587, 589, 590, 591, 594, 596, 598, 599, 600, 602, 605, 608, 611, 613, 615, 618, 620, 621, 623, 625, 627, 629, 631, 633, 635, 637, 639, 641, 643, 645, 647, 650, 652, 657, 659, 661, 663, 665, 667, 671, 673, 675, 677, 679, 681, 683, 687, 691, 693, 695, 697, 699, 701, 703, 705, 707, 710, 712, 715, 717, 719, 721, 723, 725, 727, 729, 731, 733, 735, 737, 738, 740, 742, 744, 745, 747, 748, 750, 752, 754, 756, 758, 760, 762, 764, 766, 768, 770, 771, 773, 774, 777, 778, 781, 782, 785, 786, 789, 791, 794, 796, 798, 802, 804, 806, 808, 811, 813, 815, 817, 821, 823, 825, 827, 830, 832, 834, 836, 838, 839, 841, 842, 845, 847, 848, 849, 851, 853, 855, 858, 860, 866, 867, 869, 870, 873, 875, 877, 879, 881, 883, 885, 887, 889, 891, 893, 895, 897, 899, 902, 904, 907, 909, 911, 913, 915, 917, 919, 921, 923, 925, 927, 929, 933, 935, 937, 939, 941, 943, 945, 947, 949, 953, 955, 957, 959, 961, 963, 965, 967, 970, 972, 975, 977, 978, 980, 982, 986, 988, 990, 992, 994, 996, 998, 1000, 1003, 1005, 1007, 1009, 1012, 1014, 1016, 1018, 1020, 1023, 1026, 1027, 1033, 1035, 1038, 1041, 1044, 1046, 1047, 1049, 1052, 1054, 1056, 1057, 1060, 1063, 1065, 1067, 1069, 1071, 1073, 1076, 1079, 1082, 1084, 1086, 1088, 1090, 1092, 1094, 1096, 1098, 1100, 1101, 1103, 1105, 1107, 1109, 1110, 1112, 1114, 1117, 1119, 1120, 1122, 1125, 1127, 1130, 1132, 1134, 1136, 1139, 1141, 1143, 1145, 1147, 1149, 1151, 1153, 1158, 1159, 1165, 1167, 1169, 1171, 1172, 1173, 1175, 1177, 1179, 1181, 1183, 1184, 1186, 1188, 1189, 1191, 1194, 1196, 1199, 1201, 1203, 1206, 1208, 1210, 1213, 1215, 1216, 1217, 1218, 1220, 1222, 1224, 1226, 1227, 1229, 1231, 1233, 1236, 1238, 1240, 1241, 1243, 1245, 1247, 1249, 1251, 1254, 1257, 1259, 1261, 1263, 1265, 1267, 1269, 1271, 1273, 1275, 1277, 1279, 1281, 1283, 1285, 1288, 1290, 1292, 0 }; kimwitu++-2.3.13/src/Gen.boot/abs.h0000644000175000017500000000245711135163773015334 0ustar useruser/* translation of file "abs.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #ifndef KC_FUNCTIONS_abs_HEADER #define KC_FUNCTIONS_abs_HEADER #include "k.h" // in case a user forgets namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // /* end included stuff */ namespace kc { } // namespace kc #endif // ! KC_FUNCTIONS_abs_HEADER kimwitu++-2.3.13/src/Gen.boot/error.cc0000644000175000017500000002411011135163773016044 0ustar useruser/* translation of file "error.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #define KC_FUNCTIONS_error #include #include "k.h" #include "error.h" namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // static char error_kAccesSid[] = "@(#)$Id: error.k,v 1.50 2008/02/08 20:37:46 piefel Exp $"; bool gp_no_fatal_problems; #define QUOTEDBACKSLASH '\\' #ifndef KC_MAX_STRING_LEN # define KC_MAX_STRING_LEN 200 #endif /* !KC_MAX_STRING_LEN */ viewnameoption ug_viewnameopt; int kc_filePrinter::indent_level = 4; kc_filePrinter::kc_filePrinter(FILE* f):file(f) { lineno=0; no_of_printed_string_chars=0; doit=false; lastChar='\n'; indent=0; bs_cnt=0; inString=false; inChar=false; inComment=false; inCppComment=false; spacePending=false; beginOfLine = false; keyword=0; indentKeyword=false; inPreProStmt=false; } kc_filePrinter v_stdout_printer(stdout); kc_filePrinter v_hfile_printer; kc_filePrinter v_ccfile_printer; printer_functor_class v_null_printer; bool kc_filePrinter::check_keyword(const char* s) { bool res=false; if(inPreProStmt) { // just to ignore #if and #else if(!isspace(*s)) inPreProStmt=false; } else if(!keyword) { if(*s=='#') inPreProStmt=true; else if(*s=='i' || *s=='e' || *s=='d' || *s=='w') // 'if', 'else', 'do', 'while' keyword=s; // 'for' not supported yet } else if(!isalnum(*s) && *s!='_') { // end of identifier ptrdiff_t length=s-keyword; if( (length==2 && strncmp(keyword,"if",length)==0) || (length==4 && strncmp(keyword,"else",length)==0) || (length==2 && strncmp(keyword,"do",length)==0) || (length==5 && strncmp(keyword,"while",length)==0)) res=true; // keyword found keyword=0; } return res; } void kc_filePrinter::operator()(const char *s, uview v) { char c; assertCond(file != 0); switch(v) { case view_no_of_printed_string_chars_reset_enum: no_of_printed_string_chars = 0; break; case view_printer_outputfileline_enum: fprintf( file, "\n" ); lineno = lineno +1; if(g_options.linedirec) fprintf( file, "%s %d \"%s%s\"\n", pg_line, lineno+1, g_options.dir_line.c_str(),filename.c_str() ); lineno = lineno +1; lastChar='\n'; break; default: while((c=*s++)) { switch( c ) { case '\0': return; case '\n': /* if (*s == QUOTEDBACKSLASH) s++; */ lineno = lineno +1; beginOfLine = true; /* FALLTHROUGH */ default: if (v == view_gen_unpstr_c) { if (no_of_printed_string_chars >= KC_MAX_STRING_LEN) { if (doit) { fprintf( file, "\"), " ); ug_viewnameopt->unparse( *this, view_gen_unparsedefs_other_c ); fprintf( file, " );\n kc_printer(kc_t(\"" ); lineno = lineno +1; no_of_printed_string_chars = 0; doit = false; } else { switch( c ) { case '\\': case '\n': break; default: doit = true; } } } no_of_printed_string_chars = no_of_printed_string_chars +1; } else if (v == view_filename) { /* duplicate (= escape) backslashes in file names. * we do this to help those that work on windows etc. */ if (c == QUOTEDBACKSLASH) { /* we have to quote it! */ putc( c, file ); } } if(inString) { if(c=='"' && bs_cnt%2==0) inString=false; putc( c, file ); lastChar=c; } else if(inChar) { if(c=='\'' && bs_cnt%2==0) inChar=false; putc( c, file ); lastChar=c; } else if(inComment) { if(c=='/' && lastChar=='*') inComment=false; /* C comments */ switch(c) { case '\v': case '\r': case '\b': break; default: putc( c, file ); lastChar=c; } } else if(inCppComment) { if(c=='\n') inCppComment=false; /* C++ comments */ switch(c) { case '\v': case '\r': case '\b': break; default: putc( c, file ); lastChar=c; } } else { int indent_offset=0; if(!indentKeyword) { indentKeyword=check_keyword(s-1); if(indentKeyword) ++indent; } switch(c) { case ';': if(indentKeyword) { --indent; indentKeyword=false; } goto default_case; case '{': if(indentKeyword) { --indent; indentKeyword=false; } // no break case '(': indent_offset=1; goto default_case; case '\v': ++indent; break; case '}': case ')': if(indent) --indent; goto default_case; case '\r': if(indent) --indent; break; case '\b': lastChar=c; break; case ' ': case '\t': if(lastChar=='\b' || !beginOfLine) goto default_case; if(isspace(lastChar)) break; if(isalnum(lastChar) || lastChar=='_' || lastChar=='"' || lastChar=='\'' || lastChar==')' || lastChar=='}') { if(isalnum(*(s+1))|| *(s+1)=='_'|| *(s+1)=='"' || *(s+1)=='\'') { c=' '; goto default_case; } spacePending=true; } break; default: default_case: if(lastChar=='\n' && c!='\n' && c!='#') { for(int i=indent*indent_level;i>0;) if(i>=8) { putc('\t',file); i-=8; } else { for(int k=0;kunparse( v_stderr_printer, v ); } else e->unparse( v_stderr_printer, view_error ); } static void v_stderr_printer(const char *s, uview v) { fflush( stdout ); fprintf( stderr, "%s", s ); fflush( stderr ); } } // namespace kc kimwitu++-2.3.13/src/Gen.boot/error.h0000644000175000017500000001144111135163773015711 0ustar useruser/* translation of file "error.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #ifndef KC_FUNCTIONS_error_HEADER #define KC_FUNCTIONS_error_HEADER #include "k.h" // in case a user forgets namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // #include "unpk.h" /* for the definition of uview and printer_functor_class */ extern bool gp_no_fatal_problems; #include #include #include #include using std::string; // Cater for broken compilers (eg. MacOS gcc) #ifndef isalpha using std::isalpha; using std::isalnum; #endif #include namespace kc { class view_error_format_class : public view_error_format_baseclass { public: view_error_format_class(const std::string& fmt): msg(fmt) { } void program(const char* p) { replace("%p",p); } void file(const char* f) { replace("%f",f); } void line(INTEGER l) { char buf[30]; sprintf(buf,"%d",l); replace("%l",buf); } void column(INTEGER c) { char buf[30]; sprintf(buf,"%d",c); replace("%c",buf); } void severity(const char* s) { replace("%s",s); } const char* get_msg() { // discard unused patterns program(""); file(""); replace("%l",""); replace("%c",""); char* buf; replace("%d",buf=getcwd(NULL,0)); // current directory free(buf); severity(""); return msg.c_str(); } void replace(const char* s1, const char* s2) { std::string::size_type pos; while((pos=msg.find(s1)) != std::string::npos) { msg.replace(pos,strlen(s1),s2); } } private: std::string msg; }; } class kc_filePrinter : public printer_functor_class { public: kc_filePrinter(FILE *f=0); virtual void operator()(const char* s, uview v); int fclose() { int temp=0; if (file) temp=::fclose(file); file=0; return temp; } void init(const char *name, const char *mode, const string &type); bool check_keyword(const char*); FILE *destination() { return file; } private: FILE *file; int lineno; string filename; int no_of_printed_string_chars; /* to split long double-quoted strings */ bool doit; char lastChar; int indent; int bs_cnt; bool inString; bool inChar; bool inComment; bool inCppComment; bool spacePending; bool beginOfLine; const char* keyword; bool indentKeyword; bool inPreProStmt; static int indent_level; }; extern kc_filePrinter v_stdout_printer; extern kc_filePrinter v_hfile_printer; extern kc_filePrinter v_ccfile_printer; extern printer_functor_class v_null_printer; /* end included stuff */ namespace kc { problem Problem1S (const char *s1); problem Problem1S1we (const char *s1, withexpression we); problem Problem1S1ID (const char *s1, ID id); problem Problem1S1tID (const char *s1, ID id); problem Problem1S1ID1S1ID (const char *s1, ID id1, const char *s2, ID id2); problem Problem1S1t1S1ID (const char *s1, IDtype id1, const char *s2, ID id2); problem Problem1S1INT (const char *s1, INT i1); problem Problem1S1int1S (const char *s1, int i1, const char *s2); problem Problem1S1INT1S1ID (const char *s1, INT i1, const char *s2, ID id2); problem Problem1S1ID1S1ID1S1ID (const char *s1, ID id1, const char *s2, ID id2, const char *s3, ID id3); problem Problem1S1INT1S1ID1S1ID (const char *s1, INT i1, const char *s2, ID id2, const char *s3, ID id3); problem Problem1S1storageoption1S1ID (const char *s1, storageoption so, const char *s2, ID id); problem Problem2S (const char *s1, const char *s2); problem ProblemSC (const char *s1, casestring s2); problem Problem3S (const char *s1, const char *s2, const char *s3); problem Problem4S (const char *s1, const char *s2, const char *s3, const char *s4); problem Problem3S1int1S (const char *s1, const char *s2, const char *s3, int i1, const char *s4); void v_report (error e); } // namespace kc #endif // ! KC_FUNCTIONS_error_HEADER kimwitu++-2.3.13/src/Gen.boot/parse.cc0000644000175000017500000012455711135163773016045 0ustar useruser/* translation of file "parse.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #define KC_FUNCTIONS_parse #include #include "k.h" #include "parse.h" namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // static char parse_kAccesSid[] = "@(#)$Id: parse.k,v 1.35 2008/02/06 20:28:59 piefel Exp $"; int pg_lineno = 1; /* global line # */ int pg_column = 0; /* global column # */ int pg_charpos = 0; /* global charpos # */ casestring pg_filename; /* global file name */ int pg_no_of_arguments; /* no_of_arguments */ phylumdeclarations Thephylumdeclarations; /* global phylumdecls */ rwdeclarations Therwdeclarations; /* global rw-decls */ fndeclarations Thefndeclarations; /* fn-decls for the file being parsed */ fnfiles Thefnfiles; /* global fn-decls */ includefiles Theincludefiles; /* global incl-decls */ unparsedeclarations Theunparsedeclarations; /* global unp-decls */ argsnumbers Theargsnumbers; /* global list of argsnumbers */ viewnames Theuviewnames; /* global list of u-viewnames */ viewnames Therviewnames; /* global list of r-viewnames */ storageclasses Thestorageclasses; /* global list of storageclasses */ languagenames Thelanguages; /* global list of used languages */ baseclass_declarations Thebaseclasses; /* global list of defined baseclasses */ bool pg_uviewshavebeendefined; /* global indication */ bool pg_rviewshavebeendefined; /* global indication */ bool pg_storageclasseshavebeendefined; /* global indication */ bool pg_languageshavebeendefined; /* global indication */ static long language_text_nr=0; static bool language_text_nr_used=false; #include "util.h" /* end included stuff */ namespace kc { #ifndef KC_TRACE_PROVIDED #define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND #endif static ID f_ID_of_direct_decl (ac_direct_declarator d); static int f_stars_of_ac_pointer_option (ac_pointer_option d); static int f_stars_of_ac_pointer (ac_pointer d); static bool f_is_member_fn (ac_declarator dec); static bool f_static_in_ac_decl_spec (ac_declaration_specifier ds); static bool f_static_in_ac_stor_class (ac_storage_class_specifier sc); static ID f_ID_of_ac_declaration_specifier (ac_declaration_specifier d); static ID f_ID_of_ac_type_specifier (ac_type_specifier d); phylumdeclarations mergephylumdeclarations(phylumdeclaration pd, phylumdeclarations pds) {{ phylumdeclaration kc_selvar_0_1 = phylum_cast(pd); if ((kc_selvar_0_1->prod_sel() == sel_PhylumDeclaration)) { const ID pd_id = phylum_cast(kc_selvar_0_1)->ID_1; const storageoption pd_stopt = phylum_cast(kc_selvar_0_1)->storageoption_1; const productionblock pd_pb = phylum_cast(kc_selvar_0_1)->productionblock_1; const Ccode_option pd_ccopt = phylum_cast(kc_selvar_0_1)->Ccode_option_1; phylumdeclaration fpd = f_lookupuserdecl( pd_id ); if (!fpd) { v_add( pd_id ); return Consphylumdeclarations( pd, pds ); } else if ( pd == fpd ) { if ( f_added( pd_id ) ) { return pds; } else { v_add( pd_id ); return Consphylumdeclarations( pd, pds ); } } { phylumdeclaration kc_selvar_1_1 = phylum_cast( fpd ); if ((kc_selvar_1_1->prod_sel() == sel_PhylumDeclaration)) { const ID fpd_id = phylum_cast(kc_selvar_1_1)->ID_1; const storageoption fpd_stopt = phylum_cast(kc_selvar_1_1)->storageoption_1; const productionblock fpd_pb = phylum_cast(kc_selvar_1_1)->productionblock_1; const Ccode_option fpd_ccopt = phylum_cast(kc_selvar_1_1)->Ccode_option_1; { storageoption kc_selvar_2_1 = phylum_cast( pd_stopt); storageoption kc_selvar_2_2 = phylum_cast( fpd_stopt ); if ((kc_selvar_2_1->prod_sel() == sel_PositiveStorageOption) && (kc_selvar_2_2->prod_sel() == sel_NegativeStorageOption) && (phylum_cast(kc_selvar_2_2)->ID_1->eq(phylum_cast(kc_selvar_2_1)->ID_1))) { const ID id = phylum_cast(kc_selvar_2_1)->ID_1; v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1storageoption1S1ID( "storage option mismatch ( declared as ", fpd_stopt, ") for phylum", fpd_id ))); } else if ((kc_selvar_2_1->prod_sel() == sel_NegativeStorageOption) && (kc_selvar_2_2->prod_sel() == sel_PositiveStorageOption) && (phylum_cast(kc_selvar_2_2)->ID_1->eq(phylum_cast(kc_selvar_2_1)->ID_1))) { const ID id = phylum_cast(kc_selvar_2_1)->ID_1; v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1storageoption1S1ID( "storage option mismatch ( declared as ", fpd_stopt, ") for phylum", fpd_id ))); } else if ((kc_selvar_2_1->prod_sel() == sel_PositiveStorageOption) && (kc_selvar_2_2->prod_sel() == sel_PositiveStorageOption) && (phylum_cast(kc_selvar_2_2)->ID_1->eq(phylum_cast(kc_selvar_2_1)->ID_1))) { const ID id = phylum_cast(kc_selvar_2_1)->ID_1; } else if ((kc_selvar_2_1->prod_sel() == sel_NegativeStorageOption) && (kc_selvar_2_2->prod_sel() == sel_NegativeStorageOption) && (phylum_cast(kc_selvar_2_2)->ID_1->eq(phylum_cast(kc_selvar_2_1)->ID_1))) { const ID id = phylum_cast(kc_selvar_2_1)->ID_1; } else if ((kc_selvar_2_1->prod_sel() == sel_NoStorageOption)) { /*EMPTY*/ } else if ((kc_selvar_2_2->prod_sel() == sel_NoStorageOption)) { static_cast(fpd)->storageoption_1 = pd_stopt; } else { v_report(NonFatal( FileLine( pd_id->file, pd_id->line ), Problem1S1storageoption1S1ID( "storage option mismatch ( declared as ", fpd_stopt, ") for phylum", fpd_id ))); } } { productionblock kc_selvar_2_1 = phylum_cast( pd_pb); productionblock kc_selvar_2_2 = phylum_cast( fpd_pb ); if ((kc_selvar_2_1->prod_sel() == sel_NonlistAlternatives) && (kc_selvar_2_2->prod_sel() == sel_NonlistAlternatives)) { const alternatives pd_pb_a = phylum_cast(kc_selvar_2_1)->alternatives_1; const alternatives fpd_pb_a = phylum_cast(kc_selvar_2_2)->alternatives_1; static_cast(fpd_pb)->alternatives_1 = concat(pd_pb_a, fpd_pb_a ); } else if ((kc_selvar_2_1->prod_sel() == sel_NonlistAlternatives) && (kc_selvar_2_2->prod_sel() == sel_Emptyproductionblock)) { static_cast(fpd)->productionblock_1 = pd_pb; } else if ((kc_selvar_2_1->prod_sel() == sel_PredefinedAlternatives) && (kc_selvar_2_2->prod_sel() == sel_Emptyproductionblock)) { static_cast(fpd)->productionblock_1 = pd_pb; } else if ((kc_selvar_2_1->prod_sel() == sel_ListAlternatives) && (kc_selvar_2_2->prod_sel() == sel_Emptyproductionblock)) { static_cast(fpd)->productionblock_1 = pd_pb; } else if ((kc_selvar_2_1->prod_sel() == sel_Emptyproductionblock) && (kc_selvar_2_2->prod_sel() == sel_Emptyproductionblock)) { /*EMPTY*/ } else if ((kc_selvar_2_1->prod_sel() == sel_NonlistAlternatives)) { v_report(NonFatal( FileLine( pd_id->file, pd_id->line ), Problem1S1ID( "production block mismatch: trying to extend phylum", pd_id ))); } else if ((kc_selvar_2_1->prod_sel() == sel_PredefinedAlternatives)) { v_report(NonFatal( FileLine( pd_id->file, pd_id->line ), Problem1S1ID( "production block mismatch: trying to predefine phylum", pd_id ))); } else if ((kc_selvar_2_1->prod_sel() == sel_ListAlternatives)) { v_report(NonFatal( FileLine( pd_id->file, pd_id->line ), Problem1S1ID( "production block mismatch: trying to redefine list phylum", pd_id ))); } else if ((kc_selvar_2_1->prod_sel() == sel_Emptyproductionblock)) { /*EMPTY*/ } else { kc_no_default_in_with( "mergephylumdeclarations", __LINE__, __FILE__ ); return static_cast(0); } } { Ccode_option kc_selvar_2_1 = phylum_cast( pd_ccopt); Ccode_option kc_selvar_2_2 = phylum_cast( fpd_ccopt ); if ((kc_selvar_2_1->prod_sel() == sel_CcodeOption) && (kc_selvar_2_2->prod_sel() == sel_CcodeOption)) { const attributes pd_ccopt_attr = phylum_cast(kc_selvar_2_1)->attributes_1; const Ctexts pd_ccopt_ct = phylum_cast(kc_selvar_2_1)->Ctexts_1; const attributes fpd_ccopt_attr = phylum_cast(kc_selvar_2_2)->attributes_1; const Ctexts fpd_ccopt_ct = phylum_cast(kc_selvar_2_2)->Ctexts_1; static_cast(fpd)->Ccode_option_1 = CcodeOption( concat(pd_ccopt_attr, fpd_ccopt_attr), concat(pd_ccopt_ct, fpd_ccopt_ct )); } else { kc_no_default_in_with( "mergephylumdeclarations", __LINE__, __FILE__ ); return static_cast(0); } } } else { kc_no_default_in_with( "mergephylumdeclarations", __LINE__, __FILE__ ); return static_cast(0); } } return pds; } else { kc_no_default_in_with( "mergephylumdeclarations", __LINE__, __FILE__ ); return static_cast(0); } } } alternatives makeListAlternatives(ID listphylum, ID elementphylum) { ID Nil_id, Cons_id; alternative Nil_alternative, Cons_alternative; Nil_id = Id( Str( mkcasestring((string("Nil")+f_strofID(listphylum)).c_str()))); Cons_id = Id( Str( mkcasestring((string("Cons")+f_strofID(listphylum)).c_str()))); Nil_id->line = elementphylum->line; Nil_id->file = elementphylum->file; Cons_id->line = elementphylum->line; Cons_id->file = elementphylum->file; Nil_alternative = Alternative( Nil_id, Nilarguments() ); Cons_alternative = Alternative( Cons_id, Consarguments( listphylum, Consarguments( elementphylum, Nilarguments() ) ) ); v_extendoccur( Nil_id, ITUserOperator( Nil_alternative, listphylum ) ); v_extendoccur( Cons_id, ITUserOperator( Cons_alternative, listphylum ) ); return Consalternatives( Cons_alternative, Consalternatives( Nil_alternative, Nilalternatives() ) ); } const char *f_strofID(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id) && (phylum_cast(kc_selvar_0_1)->uniqID_1->prod_sel() == sel_Str)) { const casestring cs = phylum_cast(phylum_cast(kc_selvar_0_1)->uniqID_1)->casestring_1; return cs->name; } else { kc_no_default_in_with( "f_strofID", __LINE__, __FILE__ ); return static_cast(0); } } } phylumdeclaration f_lookupuserdecl(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserFunction)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of user-defined function:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITUserRView)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of user-defined rewrite view:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedRView)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of predefined rewrite view:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITUserUView)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of user-defined unparse view:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedUView)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of predefined unparse view:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITStorageClass)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of user-defined storage class:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedStorageClass)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of predefined storage class:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITUserOperator)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of user-defined operator:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedOperator)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of predefined operator:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITUserPhylum)) { const phylumdeclaration pd = phylum_cast(kc_selvar_1_1)->phylumdeclaration_1; return pd; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedPhylum)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of predefined phylum:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITUnknown)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "undefined phylum:", id ))); return 0; } else { kc_no_default_in_with( "f_lookupuserdecl", __LINE__, __FILE__ ); return static_cast(0); } } } else { kc_no_default_in_with( "f_lookupuserdecl", __LINE__, __FILE__ ); return static_cast(0); } } } phylumdeclaration f_lookupdecl(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserFunction)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of user-defined function:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITUserRView)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of user-defined rewrite view:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedRView)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of predefined rewrite view:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITUserUView)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of user-defined unparse view:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedUView)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of predefined unparse view:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITStorageClass)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of user-defined storage class:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedStorageClass)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of predefined storage class:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITUserOperator)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of user-defined operator:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedOperator)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "expected user-defined phylum instead of predefined operator:", id ))); return 0; } else if ((kc_selvar_1_1->prod_sel() == sel_ITUserPhylum)) { const phylumdeclaration pd = phylum_cast(kc_selvar_1_1)->phylumdeclaration_1; return pd; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedPhylum)) { const phylumdeclaration pd = phylum_cast(kc_selvar_1_1)->phylumdeclaration_1; return pd; } else if ((kc_selvar_1_1->prod_sel() == sel_ITUnknown)) { v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "undefined phylum:", id ))); return 0; } else { kc_no_default_in_with( "f_lookupdecl", __LINE__, __FILE__ ); return static_cast(0); } } } else { kc_no_default_in_with( "f_lookupdecl", __LINE__, __FILE__ ); return static_cast(0); } } } argsnumbers insert_in_argsnumbers(int i, argsnumbers a) {{ argsnumbers kc_selvar_0_1 = phylum_cast(a); if ((kc_selvar_0_1->prod_sel() == sel_Consargsnumbers)) { const integer j = (kc_selvar_0_1)->integer_1; const argsnumbers ra = (kc_selvar_0_1)->argsnumbers_1; if ( i < j->value ) return Consargsnumbers( mkinteger(i), a ); else if ( i == j->value ) return a; else return Consargsnumbers( j, insert_in_argsnumbers( i, ra )); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilargsnumbers)) { return Consargsnumbers( mkinteger(i), a ); } else { kc_no_default_in_with( "insert_in_argsnumbers", __LINE__, __FILE__ ); return static_cast(0); } } } void set_includefiles(includefiles ifs, includedeclaration i) { { includefiles kc_fe_selvar_1 = ifs ; while( kc_fe_selvar_1->prod_sel() == sel_Consincludefiles ) { includefile kc_selvar_0_1 = kc_fe_selvar_1->includefile_1; { { { const includefile pl_includefile = kc_selvar_0_1; assertCond((pl_includefile->inc_type == include_file) || (pl_includefile->inc_type == include_header)); pl_includefile->inc[pl_includefile->inc_type] = Consincludedeclarations( i, pl_includefile->inc[pl_includefile->inc_type] ); } } } kc_fe_selvar_1 = kc_fe_selvar_1->includefiles_1; } } } languagenames merge_languagenames(languagenames names, languagenames name_list) { languagenames res=name_list; { languagenames kc_fe_selvar_1 = names ; while( kc_fe_selvar_1->prod_sel() == sel_Conslanguagenames ) { ID kc_selvar_0_1 = kc_fe_selvar_1->ID_1; { { if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const ID id = kc_selvar_0_1; const uniqID u_id = phylum_cast(kc_selvar_0_1)->uniqID_1; if(u_id->type->eq(ITUnknown())) { res=Conslanguagenames(id,res); u_id->type=ITLanguageName( mkinteger(res->length()-1)); } } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->languagenames_1; } } return res; } long get_text_nr() { language_text_nr_used=true; return language_text_nr; } void inc_text_nr() { if(language_text_nr_used) { language_text_nr++; language_text_nr_used=false; } } long last_text_nr() { if(language_text_nr_used) return language_text_nr; else return language_text_nr-1; } ID f_ID_of_declarator(ac_declarator d) {{ ac_declarator kc_selvar_0_1 = phylum_cast(d); if ((kc_selvar_0_1->prod_sel() == sel_AcDeclarator)) { const ac_direct_declarator dd = phylum_cast(kc_selvar_0_1)->ac_direct_declarator_1; return f_ID_of_direct_decl( dd ); } else { kc_no_default_in_with( "f_ID_of_declarator", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_ID_of_fn_declarator(ac_declarator d, fnclass fnc) {{ ac_declarator kc_selvar_0_1 = phylum_cast(d); if ((kc_selvar_0_1->prod_sel() == sel_AcDeclarator)) { const ac_direct_declarator dd = phylum_cast(kc_selvar_0_1)->ac_direct_declarator_1; ID id=f_ID_of_direct_decl( dd ); { fnclass kc_selvar_1_1 = phylum_cast(fnc); if ((kc_selvar_1_1->prod_sel() == sel_DestructorFn)) { static int dtor_nr=0; char buf[30]; sprintf(buf,"destructor_%d",++dtor_nr); ID new_id=Id(Str(mkcasestring(buf))); new_id->file=id->file; new_id->line=id->line; return new_id; } else if ((kc_selvar_1_1->prod_sel() == sel_ConstructorFn)) { static int ctor_nr=0; char buf[30]; sprintf(buf,"constructor_%d",++ctor_nr); ID new_id=Id(Str(mkcasestring(buf))); new_id->file=id->file; new_id->line=id->line; return new_id; } else { return id; } } } else { kc_no_default_in_with( "f_ID_of_fn_declarator", __LINE__, __FILE__ ); return static_cast(0); } } } static ID f_ID_of_direct_decl(ac_direct_declarator d) {{ ac_direct_declarator kc_selvar_0_1 = phylum_cast(d); if ((kc_selvar_0_1->prod_sel() == sel_AcQualifiedDeclProto)) { const ac_direct_declarator a_d = phylum_cast(kc_selvar_0_1)->ac_direct_declarator_1; return f_ID_of_direct_decl( a_d ); } else if ((kc_selvar_0_1->prod_sel() == sel_AcDirectDeclProto)) { const ac_direct_declarator a_d = phylum_cast(kc_selvar_0_1)->ac_direct_declarator_1; return f_ID_of_direct_decl( a_d ); } else if ((kc_selvar_0_1->prod_sel() == sel_AcDirectDeclArray)) { const ac_direct_declarator a_d = phylum_cast(kc_selvar_0_1)->ac_direct_declarator_1; return f_ID_of_direct_decl( a_d ); } else if ((kc_selvar_0_1->prod_sel() == sel_AcDirectDeclPack)) { const ac_declarator a_d = phylum_cast(kc_selvar_0_1)->ac_declarator_1; return f_ID_of_declarator( a_d ); } else if ((kc_selvar_0_1->prod_sel() == sel_AcDirectDeclId)) { const ID i = phylum_cast(kc_selvar_0_1)->ID_1; return i; } else { return f_emptyId(); } } } int f_stars_of_declarator(ac_declarator d) {{ ac_declarator kc_selvar_0_1 = phylum_cast(d); if ((kc_selvar_0_1->prod_sel() == sel_AcDeclarator)) { const ac_pointer_option po = phylum_cast(kc_selvar_0_1)->ac_pointer_option_1; return f_stars_of_ac_pointer_option( po ); } else { return 0; } } } static int f_stars_of_ac_pointer_option(ac_pointer_option d) {{ ac_pointer_option kc_selvar_0_1 = phylum_cast(d); if ((kc_selvar_0_1->prod_sel() == sel_Yespointer)) { const ac_pointer p = phylum_cast(kc_selvar_0_1)->ac_pointer_1; return f_stars_of_ac_pointer( p ); } else { return 0; } } } static int f_stars_of_ac_pointer(ac_pointer d) {{ ac_pointer kc_selvar_0_1 = phylum_cast(d); if ((kc_selvar_0_1->prod_sel() == sel_AcPointerCons)) { const ac_pointer p = phylum_cast(kc_selvar_0_1)->ac_pointer_1; return 1 + f_stars_of_ac_pointer( p ); } else { return 1; } } } static bool f_is_member_fn(ac_declarator dec) {{ ac_declarator kc_selvar_0_1 = phylum_cast(dec); if ((kc_selvar_0_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(kc_selvar_0_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(kc_selvar_0_1)->ac_direct_declarator_1)->ac_class_qualifier_list_1->prod_sel() == sel_Consac_class_qualifier_list)) { return true; } else { return false; } } } fnclass f_fnclass_info(ac_declaration_specifiers ds, casestring fn, ac_declarator dec) {{ ac_declaration_specifiers kc_selvar_0_1 = phylum_cast(ds); if ((kc_selvar_0_1->prod_sel() == sel_Consac_declaration_specifiers)) { const ac_declaration_specifier h = (kc_selvar_0_1)->ac_declaration_specifier_1; const ac_declaration_specifiers t = (kc_selvar_0_1)->ac_declaration_specifiers_1; if (f_static_in_ac_decl_spec( h )) { return StaticFn( fn ); } else { return f_is_member_fn(dec)?MemberFn():f_fnclass_info( t, fn , dec); } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilac_declaration_specifiers)) { assertCond(!f_is_member_fn(dec)); return GlobalFn(); } else { kc_no_default_in_with( "f_fnclass_info", __LINE__, __FILE__ ); return static_cast(0); } } } fnclass f_member_class_info(ac_declaration_specifiers ds, casestring fn) {{ ac_declaration_specifiers kc_selvar_0_1 = phylum_cast(ds); if ((kc_selvar_0_1->prod_sel() == sel_Consac_declaration_specifiers)) { const ac_declaration_specifier h = (kc_selvar_0_1)->ac_declaration_specifier_1; const ac_declaration_specifiers t = (kc_selvar_0_1)->ac_declaration_specifiers_1; if (f_static_in_ac_decl_spec( h )) { return StaticFn( fn ); } else { return f_member_class_info( t, fn); } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilac_declaration_specifiers)) { return MemberFn(); } else { kc_no_default_in_with( "f_member_class_info", __LINE__, __FILE__ ); return static_cast(0); } } } bool f_static_in_ac_decl_specs(ac_declaration_specifiers ds) {{ ac_declaration_specifiers kc_selvar_0_1 = phylum_cast(ds); if ((kc_selvar_0_1->prod_sel() == sel_Nilac_declaration_specifiers)) { return false; } else if ((kc_selvar_0_1->prod_sel() == sel_Consac_declaration_specifiers)) { const ac_declaration_specifier head = (kc_selvar_0_1)->ac_declaration_specifier_1; const ac_declaration_specifiers tail = (kc_selvar_0_1)->ac_declaration_specifiers_1; return f_static_in_ac_decl_spec(head) || f_static_in_ac_decl_specs(tail); } else { kc_no_default_in_with( "f_static_in_ac_decl_specs", __LINE__, __FILE__ ); return static_cast(0); } } } static bool f_static_in_ac_decl_spec(ac_declaration_specifier ds) {{ ac_declaration_specifier kc_selvar_0_1 = phylum_cast(ds); if ((kc_selvar_0_1->prod_sel() == sel_AcDeclSpecTypeQual)) { return false; } else if ((kc_selvar_0_1->prod_sel() == sel_AcDeclSpecTypeSpec)) { return false; } else if ((kc_selvar_0_1->prod_sel() == sel_AcDeclSpecStorageSpec)) { const ac_storage_class_specifier a_sc = phylum_cast(kc_selvar_0_1)->ac_storage_class_specifier_1; return f_static_in_ac_stor_class( a_sc ); } else { kc_no_default_in_with( "f_static_in_ac_decl_spec", __LINE__, __FILE__ ); return static_cast(0); } } } static bool f_static_in_ac_stor_class(ac_storage_class_specifier sc) {{ ac_storage_class_specifier kc_selvar_0_1 = phylum_cast(sc); if ((kc_selvar_0_1->prod_sel() == sel_AcTypedef)) { return false; } else if ((kc_selvar_0_1->prod_sel() == sel_AcExtern)) { return false; } else if ((kc_selvar_0_1->prod_sel() == sel_AcStatic)) { return true; } else if ((kc_selvar_0_1->prod_sel() == sel_AcRegister)) { return false; } else if ((kc_selvar_0_1->prod_sel() == sel_AcAuto)) { return false; } else { kc_no_default_in_with( "f_static_in_ac_stor_class", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_ID_of_ac_declaration_specifiers(ac_declaration_specifiers d) {{ ac_declaration_specifiers kc_selvar_0_1 = phylum_cast(d); if ((kc_selvar_0_1->prod_sel() == sel_Consac_declaration_specifiers)) { const ac_declaration_specifier h = (kc_selvar_0_1)->ac_declaration_specifier_1; const ac_declaration_specifiers t = (kc_selvar_0_1)->ac_declaration_specifiers_1; ID tmp = f_ID_of_ac_declaration_specifier( h ); if (tmp) return tmp; else return f_ID_of_ac_declaration_specifiers( t ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilac_declaration_specifiers)) { return 0; } else { kc_no_default_in_with( "f_ID_of_ac_declaration_specifiers", __LINE__, __FILE__ ); return static_cast(0); } } } static ID f_ID_of_ac_declaration_specifier(ac_declaration_specifier d) {{ ac_declaration_specifier kc_selvar_0_1 = phylum_cast(d); if ((kc_selvar_0_1->prod_sel() == sel_AcDeclSpecTypeSpec)) { const ac_type_specifier t = phylum_cast(kc_selvar_0_1)->ac_type_specifier_1; return f_ID_of_ac_type_specifier( t ); } else if ((kc_selvar_0_1->prod_sel() == sel_AcDeclSpecTypeQual)) { return 0; } else if ((kc_selvar_0_1->prod_sel() == sel_AcDeclSpecStorageSpec)) { return 0; } else { kc_no_default_in_with( "f_ID_of_ac_declaration_specifier", __LINE__, __FILE__ ); return static_cast(0); } } } static ID f_ID_of_ac_type_specifier(ac_type_specifier d) {{ ac_type_specifier kc_selvar_0_1 = phylum_cast(d); if ((kc_selvar_0_1->prod_sel() == sel_AcTypeSpec)) { const ID i = phylum_cast(kc_selvar_0_1)->ID_1; return i; } else { kc_no_default_in_with( "f_ID_of_ac_type_specifier", __LINE__, __FILE__ ); return static_cast(0); } } } void check_no_patternchaingroup_in_patternchain(casestring f, int l, patternchain a_patternchain, const char *ctxt) {{ patternchain kc_selvar_0_1 = phylum_cast(a_patternchain); if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternchain)) { /*EMPTY*/ } else if ((kc_selvar_0_1->prod_sel() == sel_Conspatternchain)) { const patternchainitem h = (kc_selvar_0_1)->patternchainitem_1; const patternchain t = (kc_selvar_0_1)->patternchain_1; check_no_patternchaingroup_in_patternchain( f, l, t, ctxt ); { patternchainitem kc_selvar_1_1 = phylum_cast( h ); if ((kc_selvar_1_1->prod_sel() == sel_PatternchainitemGroup)) { v_report(NonFatal( FileLine( f, l ), Problem3S( "no pattern grouping () allowed in", ctxt, "context." ))); } else if ((kc_selvar_1_1->prod_sel() == sel_PatternchainitemDollarid)) { /*EMPTY*/ } else if ((kc_selvar_1_1->prod_sel() == sel_PatternchainitemOutmost)) { /*EMPTY*/ } else kc_no_default_in_with( "check_no_patternchaingroup_in_patternchain", __LINE__, __FILE__ ); } } else kc_no_default_in_with( "check_no_patternchaingroup_in_patternchain", __LINE__, __FILE__ ); } } void check_no_patternchaingroup_in_patternchains(casestring f, int l, patternchains a_patternchains, const char *ctxt) {{ patternchains kc_selvar_0_1 = phylum_cast(a_patternchains); if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternchains)) { /*EMPTY*/ } else if ((kc_selvar_0_1->prod_sel() == sel_Conspatternchains)) { const patternchain h = (kc_selvar_0_1)->patternchain_1; const patternchains t = (kc_selvar_0_1)->patternchains_1; check_no_patternchaingroup_in_patternchains( f, l, t, ctxt ); check_no_patternchaingroup_in_patternchain( f, l, h, ctxt ); } else kc_no_default_in_with( "check_no_patternchaingroup_in_patternchains", __LINE__, __FILE__ ); } } void check_no_patternchaingroup_or_pattern_in_patternchain(casestring f, int l, patternchain a_patternchain, const char *ctxt) {{ patternchain kc_selvar_0_1 = phylum_cast(a_patternchain); if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternchain)) { /*EMPTY*/ } else if ((kc_selvar_0_1->prod_sel() == sel_Conspatternchain)) { const patternchainitem h = (kc_selvar_0_1)->patternchainitem_1; const patternchain t = (kc_selvar_0_1)->patternchain_1; check_no_patternchaingroup_or_pattern_in_patternchain( f, l, t, ctxt ); { patternchainitem kc_selvar_1_1 = phylum_cast( h ); if ((kc_selvar_1_1->prod_sel() == sel_PatternchainitemGroup)) { v_report(NonFatal( FileLine( f, l ), Problem3S( "no pattern grouping () allowed in", ctxt, "context." ))); } else if ((kc_selvar_1_1->prod_sel() == sel_PatternchainitemDollarid)) { /*EMPTY*/ } else if ((kc_selvar_1_1->prod_sel() == sel_PatternchainitemOutmost)) { const outmostpattern op = phylum_cast(kc_selvar_1_1)->outmostpattern_1; } else kc_no_default_in_with( "check_no_patternchaingroup_or_pattern_in_patternchain", __LINE__, __FILE__ ); } } else kc_no_default_in_with( "check_no_patternchaingroup_or_pattern_in_patternchain", __LINE__, __FILE__ ); } } void check_no_patternchaingroup_or_pattern_in_patternchains(casestring f, int l, patternchains a_patternchains, const char *ctxt) {{ patternchains kc_selvar_0_1 = phylum_cast(a_patternchains); if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternchains)) { /*EMPTY*/ } else if ((kc_selvar_0_1->prod_sel() == sel_Conspatternchains)) { const patternchain h = (kc_selvar_0_1)->patternchain_1; const patternchains t = (kc_selvar_0_1)->patternchains_1; check_no_patternchaingroup_or_pattern_in_patternchains( f, l, t, ctxt ); check_no_patternchaingroup_or_pattern_in_patternchain( f, l, h, ctxt ); } else kc_no_default_in_with( "check_no_patternchaingroup_or_pattern_in_patternchains", __LINE__, __FILE__ ); } } patternchains syn_patternchains_fileline(patternchains a_patternchains, casestring a_file, int a_line) {{ patternchains kc_selvar_0_1 = phylum_cast(a_patternchains); if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternchains)) { kc_selvar_0_1->file = a_file; kc_selvar_0_1->line = a_line; return a_patternchains; } else if ((kc_selvar_0_1->prod_sel() == sel_Conspatternchains)) { const patternchain h = (kc_selvar_0_1)->patternchain_1; const patternchains t = (kc_selvar_0_1)->patternchains_1; syn_patternchains_fileline( t, a_file, a_line ); syn_patternchain_fileline( h, t->file, t->line ); kc_selvar_0_1->file = h->file; kc_selvar_0_1->line = h->line; return a_patternchains; } else { kc_no_default_in_with( "syn_patternchains_fileline", __LINE__, __FILE__ ); return static_cast(0); } } } patternchain syn_patternchain_fileline(patternchain a_patternchain, casestring a_file, int a_line) {{ patternchain kc_selvar_0_1 = phylum_cast(a_patternchain); if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternchain)) { kc_selvar_0_1->file = a_file; kc_selvar_0_1->line = a_line; return a_patternchain; } else if ((kc_selvar_0_1->prod_sel() == sel_Conspatternchain)) { const patternchainitem h = (kc_selvar_0_1)->patternchainitem_1; const patternchain t = (kc_selvar_0_1)->patternchain_1; syn_patternchain_fileline( t, a_file, a_line ); kc_selvar_0_1->file = h->file; kc_selvar_0_1->line = h->line; return a_patternchain; } else { kc_no_default_in_with( "syn_patternchain_fileline", __LINE__, __FILE__ ); return static_cast(0); } } } withexpressions pf_gen_foreachwith_vars(idCexpressions a_idCexpressions) { static int nrof_foreach_occ = 0; nrof_foreach_occ++; return t_pf_gen_foreachwith_vars(a_idCexpressions, nrof_foreach_occ, a_idCexpressions->length(), false); } withexpressions pf_gen_foreachwith_listvars(idCexpressions a_idCexpressions) { static int nrof_foreach_occ = 0; nrof_foreach_occ++; return t_pf_gen_foreachwith_vars(a_idCexpressions, nrof_foreach_occ, a_idCexpressions->length(), true); } withexpressions t_pf_gen_foreachwith_vars(idCexpressions a_idCexpressions, int occ, int nr, bool listvars) {{ idCexpressions kc_selvar_0_1 = phylum_cast(a_idCexpressions); if ((kc_selvar_0_1->prod_sel() == sel_ConsidCexpressions) && ((kc_selvar_0_1)->idCexpression_1->prod_sel() == sel_IdCexpression)) { const idCexpression ice = (kc_selvar_0_1)->idCexpression_1; const ID id = phylum_cast((kc_selvar_0_1)->idCexpression_1)->ID_1; const Cexpression ce = phylum_cast((kc_selvar_0_1)->idCexpression_1)->Cexpression_1; const idCexpressions t = (kc_selvar_0_1)->idCexpressions_1; char tmp[BUFSIZ]; withexpression w; withexpressions ws; ID w_id; if (listvars) sprintf(tmp, "kc_fe_withlistvar_%d_%d", occ, nr); else sprintf(tmp, "kc_fe_withvar_%d_%d", occ, nr); w_id = Id(Str(mkcasestring(tmp))); w = WEVariable(w_id); w->type = (listvars ? id : f_listelementphylum(id)); w->file = ce->file; w->line = ce->line; ice->id = w_id; ws = Conswithexpressions( w, t_pf_gen_foreachwith_vars( t, occ, nr-1, listvars)); ws->file = w->file; ws->line = w->line; return ws; } else if ((kc_selvar_0_1->prod_sel() == sel_NilidCexpressions)) { return Nilwithexpressions(); } else { kc_no_default_in_with( "t_pf_gen_foreachwith_vars", __LINE__, __FILE__ ); return static_cast(0); } } } ac_class_qualifier_list f_check_build_qualifier_tail(ac_class_qualifier_help_list qh_list) {{ ac_class_qualifier_help_list kc_selvar_0_1 = phylum_cast(qh_list); if ((kc_selvar_0_1->prod_sel() == sel_Consac_class_qualifier_help_list) && ((kc_selvar_0_1)->ac_direct_declarator_1->prod_sel() == sel_AcOperatorDeclId) && (phylum_cast((kc_selvar_0_1)->ac_direct_declarator_1)->ac_operator_name_1->prod_sel() == sel_AcOperatorName)) { const ac_operator_name op = phylum_cast((kc_selvar_0_1)->ac_direct_declarator_1)->ac_operator_name_1; const casestring str = phylum_cast(phylum_cast((kc_selvar_0_1)->ac_direct_declarator_1)->ac_operator_name_1)->casestring_1; v_report(NonFatal( FileLine( op->file, op->line ), Problem3S( "operator ",str->name, "is not a type name" ))); return Nilac_class_qualifier_list(); } else if ((kc_selvar_0_1->prod_sel() == sel_Consac_class_qualifier_help_list) && ((kc_selvar_0_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId)) { const ID id = phylum_cast((kc_selvar_0_1)->ac_direct_declarator_1)->ID_1; const ac_class_qualifier_help_list tail = (kc_selvar_0_1)->ac_class_qualifier_help_list_1; return Consac_class_qualifier_list(id,f_check_build_qualifier_tail(tail)); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilac_class_qualifier_help_list)) { return Nilac_class_qualifier_list(); } else { kc_no_default_in_with( "f_check_build_qualifier_tail", __LINE__, __FILE__ ); return static_cast(0); } } } ac_class_qualifier_list f_check_build_qualifier(ac_class_qualifier_help_list qh_list, ac_direct_declarator &decl) {{ ac_class_qualifier_help_list kc_selvar_0_1 = phylum_cast(qh_list); if ((kc_selvar_0_1->prod_sel() == sel_Consac_class_qualifier_help_list)) { const ac_direct_declarator dd = (kc_selvar_0_1)->ac_direct_declarator_1; const ac_class_qualifier_help_list tail = (kc_selvar_0_1)->ac_class_qualifier_help_list_1; decl=dd; return f_check_build_qualifier_tail(tail); } else { assertCond(false); return NULL; } } } ID subst_name(ID n, casestring oldname, casestring newname) {{ ID kc_selvar_0_1 = phylum_cast(n); if ((kc_selvar_0_1->prod_sel() == sel_Id) && (phylum_cast(kc_selvar_0_1)->uniqID_1->prod_sel() == sel_Str)) { const casestring s = phylum_cast(phylum_cast(kc_selvar_0_1)->uniqID_1)->casestring_1; if (s->eq(oldname)) { ID tmp = Id(Str(newname)); tmp->file = n->file; tmp->line = n->line; return tmp; } else return n; } else { kc_no_default_in_with( "subst_name", __LINE__, __FILE__ ); return static_cast(0); } } } } // namespace kc kimwitu++-2.3.13/src/Gen.boot/main.cc0000644000175000017500000014406111135163773015647 0ustar useruser/* translation of file "main.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #define KC_FUNCTIONS_main #include #include "k.h" #include "main.h" namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // #include "defs.h" #ifndef KIMWITUCOPYRIGHT # define KIMWITUCOPYRIGHT "@(#) Kimwitu++ version: (unknown) (c) 2008 Humboldt-Universitaet zu Berlin" #endif #ifndef RCSMAKEID # define RCSMAKEID "@(#) Makefile version unknown" #endif static char kimwc_cAccesSid[] = "@(#)$Id: main.k,v 1.90 2008/02/06 20:28:59 piefel Exp $"; static char kimwitu_release[] = KIMWITURELEASE; // defined in Makefile static char kimwitu_version[] = KIMWITUVERSIONSTRING; // defined in Makefile static char Makefile_AccesSid[] = RCSMAKEID; // defined in Makefile char kimwitu_copyright[] = KIMWITUCOPYRIGHT; // defined in Makefile (used in gen.k) // For access #ifdef HAVE_UNISTD_H # include #else inline int access(const char*, int) { return 0; } # define R_OK 4 #endif #if defined(_WIN32) && ! defined (__GNUC__) # define popen _popen #endif // next include files needed for stat #if defined(KC_USE_STAT) # include # if defined(_WIN32) && ! defined (__GNUC__) # define stat _stat # endif #endif // for signal/sigvec #include #ifdef SIGHOLD // must be SVR4 # define signal sigset // use reliable signals on SVR4 #endif #include using std::cout; using std::endl; using std::flush; // string(s) stuff #include #include #include using std::string; #include "getopt.h" extern int yyparse(void); extern void yyrestart(FILE*); extern void do_NORMAL(void); #include "unpk.h" #include "gutil.h" #include "util.h" #include "pat.h" #define STDINPUTNAME "stdin" extern FILE *yyin; static const char *const Thetempccfile=".kc.cc.temp"; static const char *const Thetemphfile=".k.h.temp" ; /* * the following (3) variables are used by processargs and prepare_for_next_file */ static char **inputfilenames = 0; static int no_inputfiles = 0; static int current_inputfile; casestring g_progname; const char* pg_line("#line "); static const char *progname_initvalue = "kc++"; cmdline_options g_options; // cleanup the generated intermediate files if we are interupted extern "C" RETSIGTYPE cleanup_and_die(int i) { fprintf(stderr, "%s: received signal %d, cleaning up\n", g_progname->name, i); /* even though we don't die a violent death, we still do inform * our environment that we didn't finish as planned, by exiting * with non-zero exit status */ leave(1); } // cleanup the generated intermediate files if we are interupted extern "C" RETSIGTYPE cleanup_and_abort(int i) { if (i==SIGSEGV) fprintf(stderr, "kc++: segmentation violation\n"); else fprintf(stderr, "kc++: something horrible happened\n"); fprintf(stderr, "%s: received signal %d, cleaning up\n", g_progname->name, i); leave(1); } /* end included stuff */ namespace kc { #ifndef KC_TRACE_PROVIDED #define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND #endif static FILE *openfile (const char *file, const char *mode); static char *get_basename (char *s); static void print_version (); static void print_help (); static void processargs (int argc, char *argv[]); static int prepare_for_next_file (); static casestring mkfunctionincname (const casestring fn, bool header); static void do_parse (); static bool different (FILE *f1, FILE *f2, const char *fn1, const char *fn2); static void erename (const char *oldfilename, const char *newfilename); static void eremove (const char *filename); static void compare_and_delete_or_move (const char *tmp_filename, const string &filenamestring); static phylumdeclarations f_add_predefined_phyla (phylumdeclarations p); static phylumdeclaration v_predefined_int (); static phylumdeclaration v_predefined_real (); static phylumdeclaration v_predefined_casestring (); static phylumdeclaration v_predefined_nocasestring (); static phylumdeclaration v_predefined_voidptr (); static phylumdeclaration v_predefined_abstract_phylum (); static phylumdeclaration v_predefined_abstract_phylum_ref (); static phylumdeclaration v_predefined_abstract_list (); static casestring make_pg_filename (const char *s); static void set_signals (); static void block_signals (); static void cleanup (); static FILE *openfile(const char *file, const char *mode) { if(g_options.filter=="") return fopen(file,mode); else return popen((g_options.filter+" "+file).c_str(),mode); } static char *get_basename(char *s) { char *basename = strrchr( s, '/'); if (basename == NULL) { basename = s; } else { basename++; } return basename; } static void print_version() { printf("Kimwitu++ version %s\n\n\ Copyright (C) 1997-2007 Michael Piefel, Humboldt-Universitaet zu Berlin\n\ Kimwitu++ comes with ABSOLUTELY NO WARRANTY; for details see GPL.\n\ This is free software, and you are welcome to redistribute it under\n\ certain conditions; for details see GPL.\n", kimwitu_version); } static void print_help() { printf("Usage: %s [options] file...\n\n", g_progname->name); printf("\ Options:\n\ Kimwitu++ Features:\n\ -c, --no-csgio no read/write functions (csgio.{h,cc}) are generated\n\ -r, --no-rewrite no code for rewrite rules (rk.{h,cc}) is generated\n\ -u, --no-unparse no code for unparse rules (unpk.{h,cc}) is generated\n\ -d, --no-printdot no printdot functions are generated\n\ -t, --no-hashtables no code for hashtables is generated (works only when\n\ both --no-csgio and --no-printdot are specified)\n\ --operator-cast generate operatork.h for operator_cast<>\n"); printf("\ C++ Compiler Options:\n\ -n, --covariant=C use covariant return types: yes|no|pre\n\ --stdafx[=FILE] include for Microsoft precompiled header files is\n\ generated (default stdafx.h)\n\ -e, --dllexport=STRING generates string between keyword class and the\n\ class name of all operators and phyla\n\ -m, --smart-pointer generates code for smart pointers (reference counting)\n\ -w, --weak-pointer generates code for weak pointers\n\ (implies --smart-pointer)\n"); printf("\ Files:\n\ -s, --suffix=EXT extension for generated source files (default cc)\n\ -f, --file-prefix=PREF prefix for generated files\n\ -o, --overwrite always write generated files even if not changed.\n\ -b, --yystype[=FILE] generates file (default yystype.h) containing YYSTYPE\n\ for yacc or bison\n\ -y, --yxx-union generates file yxx_union.h for yacc++\n"); printf("\ Advanced:\n\ -l, --no-linedirec doesn't print line directives ('#line')\n\ --comment-line print line comments ('//line') instead of directives\n\ --dir-line prepends the current working directory to the file\n\ name in line directives\n\ --rw-loop generates a non recursive rewrite function\n\ -p, --pipe=CMD process all files while piping them through CMD.\n"); printf("\ Other:\n\ -M, --msg-format=PAT specifies format of (error) messages, PAT can contain:\n\ %%p (program name), %%s (severity), %%f (file name),\n\ %%d (current working directory), %%l (line number),\n\ %%c (column); the actual message is appended\n\ -q, --quiet quiet operation\n\ -v, --verbose print additional status information while processing\n\ -W enable all warnings; use comma-seperated list for\n\ detailed control (can be prefixed with 'no')\n\ drop - dropped rule bodies (no code generated)\n\ equiv - equivalent patterns (cannot match)\n\ overlap - possibly overlapping patterns\n\ -h, --help display this help and exit\n\ -V, --version output version information and exit\n"); } static void processargs(int argc, char *argv[]) { g_progname = mkcasestring(get_basename(argv[0])); enum { O_stdafx = 1, O_commment_line, O_dir_line, O_rw_loop, O_operator_cast }; static struct option const long_options[] = { {"no-csgio", no_argument, 0, 'c'}, {"no-rewrite", no_argument, 0, 'r'}, {"no-unparse", no_argument, 0, 'u'}, {"no-printdot", no_argument, 0, 'd'}, {"no-hashtables", no_argument, 0, 't'}, {"operator-cast", no_argument, 0, O_operator_cast}, {"suffix", required_argument, 0, 's'}, {"file-prefix", required_argument, 0, 'f'}, {"covariant", required_argument, 0, 'n'}, {"stdafx", optional_argument, 0, O_stdafx}, {"dllexport", required_argument, 0, 'e'}, {"smart-pointer", no_argument, 0, 'm'}, {"weak-pointer", no_argument, 0, 'w'}, {"no-linedirec", no_argument, 0, 'l'}, {"comment-line", no_argument, 0, O_commment_line}, {"dir-line", no_argument, 0, O_dir_line}, {"rw-loop", no_argument, 0, O_rw_loop}, {"yystype", optional_argument, 0, 'b'}, {"yxx-union", no_argument, 0, 'y'}, {"overwrite", no_argument, 0, 'o'}, {"pipe", required_argument, 0, 'p'}, {"msg-format", required_argument, 0, 'M'}, {"quiet", no_argument, 0, 'q'}, {"silent", no_argument, 0, 'q'}, {"verbose", no_argument, 0, 'v'}, {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'V'}, {0, 0, 0, 0} }; int c; while ((c = getopt_long (argc, argv, "c" "r" "u" "d" "t" "s:" "f:" "n:" "e:" "m" "w" "l" "b::" "y" "o" "p:" "M:" "q" "v" "W::" "h" "V" , long_options, 0)) != -1) switch (c) { case 'V': print_version(); leave(0); case '?': case ':': case 'h': print_help(); leave(0); case 'p': g_options.filter=optarg; continue; case 'q': g_options.quiet=true; if (g_options.verbose) v_report(Warning(NoFileLine(), Problem1S("Can't be quiet when asked to be verbose."))); continue; case 'v': g_options.verbose=true; if (g_options.quiet) v_report(Warning(NoFileLine(), Problem1S("Can't be verbose when asked to be quiet."))); continue; case 'W': if (!optarg) { g_options.warn_drop_identical_patterns = true; g_options.warn_equivalent_patterns = true; g_options.warn_overlapping_patterns = true; } else { std::vector warn_options; warn_options.push_back(""); int option_count=0; while (*optarg) { if (*optarg == ',') { warn_options.push_back(""); option_count++; } else warn_options[option_count] += *optarg; optarg++; } for (int i=0; i <= option_count; ++i) { if (warn_options[i] == "drop") g_options.warn_drop_identical_patterns = true; else if (warn_options[i] == "nodrop") g_options.warn_drop_identical_patterns = false; else if (warn_options[i] == "equiv") g_options.warn_equivalent_patterns = true; else if (warn_options[i] == "noequiv") g_options.warn_equivalent_patterns = false; else if (warn_options[i] == "overlap") g_options.warn_overlapping_patterns = true; else if (warn_options[i] == "noverlapo") g_options.warn_overlapping_patterns = false; else v_report(Warning(NoFileLine(), Problem2S("Unknown warning sub-option:", warn_options[i].c_str()))); } } continue; case 's': g_options.suffix=optarg; continue; case 'f': g_options.prefix = optarg; continue; case 'y': g_options.for_yxx=true; continue; case 'b': g_options.for_bison= optarg ? optarg : "yystype.h"; continue; case 'c': g_options.no_csgio=true; continue; case 'u': g_options.no_unparse=true; continue; case 'r': g_options.no_rewrite=true; continue; case 'd': g_options.no_printdot=true; continue; case 't': g_options.no_hashtables=true; continue; case O_operator_cast: g_options.operator_cast=true; continue; case 'm': g_options.smart_pointer=true; continue; case 'w': g_options.smart_pointer=true; g_options.weak_pointer=true; continue; case 'o': g_options.overwrite=true; continue; case 'n': if (optarg[0]!='y' && optarg[0]!='n' && optarg[0]!='p') v_report(Warning(NoFileLine(), Problem1S("Covariant option must be yes or no or pre."))); g_options.covariant = optarg[0]; continue; case 'l': g_options.linedirec=false; continue; case O_commment_line: pg_line="// line "; continue; case O_dir_line: { char* dir=getcwd(0, 0); g_options.dir_line=dir; free(dir); if(!g_options.dir_line.empty() && g_options.dir_line[g_options.dir_line.length()-1]!='/') g_options.dir_line+='/'; } continue; case O_stdafx: g_options.stdafx = optarg ? optarg : "stdafx.h"; continue; case O_rw_loop: g_options.rw_loop=true; continue; case 'e': if (optarg[0]=='-' || (optarg[strlen(optarg)-1]=='k' && optarg[strlen(optarg)-2]=='.')) v_report(Warning(NoFileLine(), Problem3S("Do you really want ", optarg, " as dllexport?"))); g_options.dllexports=optarg; continue; case 'M': g_options.msg_format=optarg; continue; } if(!(g_options.no_csgio && g_options.no_printdot)) g_options.no_hashtables=false; char *basename; for (int i=optind; i < argc; ++i) { size_t len = strlen(argv[i]); basename = get_basename( argv[i] ); if ( ! (argv[i][len-1] == 'k') && (argv[i][len-2] == '.') ) { v_report( NonFatal( NoFileLine(), Problem2S( "input file must have '.k' suffix:", argv[i] ))); } else if ( (strcmp(basename, (g_options.prefix+"k.k").c_str()) == 0) || (strcmp(basename, (g_options.prefix+"rk.k").c_str()) == 0) || (strcmp(basename, (g_options.prefix+"unpk.k").c_str()) == 0) || (strcmp(basename, (g_options.prefix+"csgiok.k").c_str()) == 0) || (strcmp(basename, "stdin.k") == 0) ) { string tmp="reserved file basenames '"+g_options.prefix+"k.k', '"+g_options.prefix+"rk.k', '"+g_options.prefix+"unpk.k', '"+g_options.prefix+"csgiok.k' and 'stdin.k' not allowed:"; v_report( NonFatal( NoFileLine(), Problem2S(tmp.c_str(), argv[i] ))); } else if ((yyin = fopen(argv[i], "r"))== NULL){ v_report( NonFatal( NoFileLine(), Problem2S( "cannot open ", argv[i] ))); } else { fclose(yyin); } } if ( gp_no_fatal_problems ) { if ( argc > optind ) { inputfilenames = argv+optind; no_inputfiles = argc-optind; current_inputfile = 0; pg_filename = make_pg_filename( inputfilenames[current_inputfile] ); if ((yyin = openfile(inputfilenames[current_inputfile],"r"))== NULL){ v_report( Fatal( NoFileLine(), Problem2S( "cannot open ", inputfilenames[current_inputfile] ))); } pg_lineno = 1; pg_column = 0; pg_charpos = 0; } } else { leave(1); } } static int prepare_for_next_file() { if ( current_inputfile < no_inputfiles-1 ) { current_inputfile++; pg_filename = make_pg_filename( inputfilenames[current_inputfile] ); pg_lineno = 1; pg_column = 0; pg_charpos = 0; fclose(yyin); if ((yyin = openfile(inputfilenames[current_inputfile],"r"))== NULL){ v_report( Fatal( NoFileLine(), Problem2S( "cannot open ", inputfilenames[current_inputfile] ))); } yyrestart(yyin); return 1; } do_NORMAL(); if ( no_inputfiles > 0 ) fclose( yyin ); return 0; } static casestring mkfunctionincname(const casestring fn, bool header) { std::ostringstream os; os << "KC_FUNCTIONS_" << f_make_identifier_basename(fn->name); if (header) os << "_HEADER"; return mkcasestring(os.str().c_str()); } static void do_parse() { includefile Theincheader = IncludeFile( mkcasestring("HEADER")); includefile Theinccfile = IncludeFile( mkcasestring("CODE")); ID Thebase_uview = Id( Str( mkcasestring( "base_uview" ))); ID Thebase_rview = Id( Str( mkcasestring( "base_rview" ))); ID Thekc_not_uniq = Id( Str( mkcasestring( "kc_not_uniq" ))); ID Theuniq = Id( Str( mkcasestring( "uniq" ))); The_abstract_phylum_decl=v_predefined_abstract_phylum(); The_abstract_phylum_ref_decl=v_predefined_abstract_phylum_ref(); The_abstract_list_decl=v_predefined_abstract_list(); Thephylumdeclarations = f_add_predefined_phyla( Nilphylumdeclarations() ); Therwdeclarations = Nilrwdeclarations(); Theunparsedeclarations = Nilunparsedeclarations(); Theargsnumbers = Nilargsnumbers(); Thefndeclarations = Nilfndeclarations(); Thelanguages = Nillanguagenames(); Thebaseclasses = Nilbaseclass_declarations(); Theincheader->inc_type = include_header; Theinccfile->inc_type = include_file; IncludeFile( mkcasestring("KC_TYPES_HEADER"))->inc_type = include_header; IncludeFile( mkcasestring("KC_TYPES"))->inc_type = include_file; IncludeFile( mkcasestring("KC_REWRITE_HEADER"))->inc_type = include_header; IncludeFile( mkcasestring("KC_REWRITE"))->inc_type = include_file; IncludeFile( mkcasestring("KC_CSGIO_HEADER"))->inc_type = include_header; IncludeFile( mkcasestring("KC_CSGIO"))->inc_type = include_file; IncludeFile( mkcasestring("KC_UNPARSE_HEADER"))->inc_type = include_header; IncludeFile( mkcasestring("KC_UNPARSE"))->inc_type = include_file; v_defoccur( Thebase_uview, ITPredefinedUView() ); v_defoccur( Thebase_rview, ITPredefinedRView() ); v_defoccur( Theuniq, ITPredefinedStorageClass() ); Theuviewnames = Consviewnames( Thebase_uview, Nilviewnames() ); Therviewnames = Consviewnames( Thebase_rview, Nilviewnames() ); Thestorageclasses = Consstorageclasses( Theuniq, Consstorageclasses( Thekc_not_uniq, Nilstorageclasses() )); do { IncludeFile( mkfunctionincname(pg_filename, false))->inc_type = include_file; IncludeFile( mkfunctionincname(pg_filename, true))->inc_type = include_header; if (g_options.verbose) cout << " " << pg_filename->name << flush; try { yyparse(); FnFile( pg_filename )->fns = Thefndeclarations; IncludeFile( pg_filename )->inc[include_header] = Theincheader->inc[Theincheader->inc_type] ; IncludeFile( pg_filename )->inc[include_file] = Theinccfile->inc[Theinccfile->inc_type] ; IncludeFile( pg_filename )->inc_type = include_both; Theincheader->inc[Theincheader->inc_type] = Nilincludedeclarations(); Theinccfile->inc[Theinccfile->inc_type] = Nilincludedeclarations(); } catch (int) { } Thefndeclarations = Nilfndeclarations(); } while( prepare_for_next_file() ); if (! gp_no_fatal_problems) { leave(1); } } } // namespace kc int main(int argc, char *argv[]) { #ifdef YYDEBUG extern int yydebug; yydebug = 1; #endif g_progname = mkcasestring( progname_initvalue ); pg_filename = make_pg_filename( STDINPUTNAME ); gp_no_fatal_problems = true; pg_uviewshavebeendefined = false; pg_rviewshavebeendefined = false; pg_storageclasseshavebeendefined = false; pg_lineno = 0; pg_column = 0; pg_charpos = 0; processargs(argc, argv); set_signals(); pg_lineno = 1; pg_column = 0; pg_charpos = 0; if (g_options.verbose) cout << "Reading input files ..." << flush; do_parse(); if (g_options.verbose) cout << " - done.\n"; pg_lineno = 0; pg_column = 0; pg_charpos = 0; Thebindingidmarks = 0; if (g_options.verbose) cout << "Checking input.\n"; Thephylumdeclarations->unparse( v_null_printer, view_check_count ); Thephylumdeclarations->unparse( v_null_printer, view_check ); Therwdeclarations->unparse( v_null_printer, view_check ); { fnfiles kc_fe_selvar_1 = Thefnfiles ; while( kc_fe_selvar_1->prod_sel() == sel_Consfnfiles ) { fnfile kc_selvar_0_1 = kc_fe_selvar_1->fnfile_1; { { { const fnfile a_fnfile = kc_selvar_0_1; a_fnfile->fns->unparse( v_null_printer, view_check ); } } } kc_fe_selvar_1 = kc_fe_selvar_1->fnfiles_1; } } { fnfiles kc_fe_selvar_1 = Thefnfiles ; while( kc_fe_selvar_1->prod_sel() == sel_Consfnfiles ) { fnfile kc_selvar_0_1 = kc_fe_selvar_1->fnfile_1; { { { const fnfile a_fnfile = kc_selvar_0_1; f_collect_members( a_fnfile->fns ); } } } kc_fe_selvar_1 = kc_fe_selvar_1->fnfiles_1; } } prepare_base_classes(Thebaseclasses); Theunparsedeclarations->unparse( v_null_printer, view_check ); Theunparsedeclarations->unparse( v_null_printer, view_check_viewnames ); Thephylumdeclarations->unparse( v_null_printer, view_check_uniq ); Theunparsedeclarations->unparse( v_null_printer, view_checklanguagenames ); Thephylumdeclarations->unparse( v_null_printer, view_make_patternreps ); Therwdeclarations->unparse( v_null_printer, view_make_patternreps ); { fnfiles kc_fe_selvar_1 = Thefnfiles ; while( kc_fe_selvar_1->prod_sel() == sel_Consfnfiles ) { fnfile kc_selvar_0_1 = kc_fe_selvar_1->fnfile_1; { { { const fnfile a_fnfile = kc_selvar_0_1; a_fnfile->fns->unparse( v_null_printer, view_make_patternreps ); } } } kc_fe_selvar_1 = kc_fe_selvar_1->fnfiles_1; } } Theunparsedeclarations->unparse( v_null_printer, view_make_patternreps ); { phylumdeclarations kc_fe_selvar_1 = Thephylumdeclarations; while( kc_fe_selvar_1->prod_sel() == sel_Consphylumdeclarations ) { phylumdeclaration kc_selvar_0_1 = kc_fe_selvar_1->phylumdeclaration_1; { { if ((kc_selvar_0_1->prod_sel() == sel_PhylumDeclaration)) { const productionblock prod_block = phylum_cast(kc_selvar_0_1)->productionblock_1; { productionblock kc_selvar_1_1 = phylum_cast(prod_block); if ((kc_selvar_1_1->prod_sel() == sel_NonlistAlternatives)) { const alternatives alts = phylum_cast(kc_selvar_1_1)->alternatives_1; { alternatives kc_fe_selvar_1 = alts ; while( kc_fe_selvar_1->prod_sel() == sel_Consalternatives ) { alternative kc_selvar_2_1 = kc_fe_selvar_1->alternative_1; { { { const alternative alt = kc_selvar_2_1; unparseviewsinfo uvi = f_unparseviewsinfo_of_alternative( alt, Theuviewnames ); { unparseviewsinfo kc_fe_selvar_1 = uvi; while( kc_fe_selvar_1->prod_sel() == sel_Consunparseviewsinfo ) { unparseviewinfo kc_selvar_3_1 = kc_fe_selvar_1->unparseviewinfo_1; { { if ((kc_selvar_3_1->prod_sel() == sel_Unparseviewinfo)) { const unparsedeclsinfo decl_info = phylum_cast(kc_selvar_3_1)->unparsedeclsinfo_1; check_unparse_patterns(decl_info); } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->unparseviewsinfo_1; } } rewriteviewsinfo rvi = f_rewriteviewsinfo_of_alternative( alt, Therviewnames ); { rewriteviewsinfo kc_fe_selvar_1 = rvi; while( kc_fe_selvar_1->prod_sel() == sel_Consrewriteviewsinfo ) { rewriteviewinfo kc_selvar_3_1 = kc_fe_selvar_1->rewriteviewinfo_1; { { if ((kc_selvar_3_1->prod_sel() == sel_Rewriteviewinfo)) { const rewriterulesinfo rule_info = phylum_cast(kc_selvar_3_1)->rewriterulesinfo_1; check_rewrite_patterns(rule_info); } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->rewriteviewsinfo_1; } } } } } kc_fe_selvar_1 = kc_fe_selvar_1->alternatives_1; } } } else if ((kc_selvar_1_1->prod_sel() == sel_ListAlternatives)) { const alternatives alts = phylum_cast(kc_selvar_1_1)->alternatives_1; { alternatives kc_fe_selvar_1 = alts ; while( kc_fe_selvar_1->prod_sel() == sel_Consalternatives ) { alternative kc_selvar_2_1 = kc_fe_selvar_1->alternative_1; { { { const alternative alt = kc_selvar_2_1; unparseviewsinfo uvi = f_unparseviewsinfo_of_alternative( alt, Theuviewnames ); { unparseviewsinfo kc_fe_selvar_1 = uvi; while( kc_fe_selvar_1->prod_sel() == sel_Consunparseviewsinfo ) { unparseviewinfo kc_selvar_3_1 = kc_fe_selvar_1->unparseviewinfo_1; { { if ((kc_selvar_3_1->prod_sel() == sel_Unparseviewinfo)) { const unparsedeclsinfo decl_info = phylum_cast(kc_selvar_3_1)->unparsedeclsinfo_1; check_unparse_patterns(decl_info); } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->unparseviewsinfo_1; } } rewriteviewsinfo rvi = f_rewriteviewsinfo_of_alternative( alt, Therviewnames ); { rewriteviewsinfo kc_fe_selvar_1 = rvi; while( kc_fe_selvar_1->prod_sel() == sel_Consrewriteviewsinfo ) { rewriteviewinfo kc_selvar_3_1 = kc_fe_selvar_1->rewriteviewinfo_1; { { if ((kc_selvar_3_1->prod_sel() == sel_Rewriteviewinfo)) { const rewriterulesinfo rule_info = phylum_cast(kc_selvar_3_1)->rewriterulesinfo_1; check_rewrite_patterns(rule_info); } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->rewriteviewsinfo_1; } } } } } kc_fe_selvar_1 = kc_fe_selvar_1->alternatives_1; } } } else { } } } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->phylumdeclarations_1; } } if(pg_languageshavebeendefined) { collect_strings(); } if ( ! gp_no_fatal_problems ) { leave( 1 ); } phylumdeclarationsroot proot = PhylumDeclarations( Thephylumdeclarations ); if (Theargsnumbers->length() == 0) { Theargsnumbers = Consargsnumbers( mkinteger(0), Theargsnumbers ); } if (g_options.verbose) cout << "Writing output files ..." << flush; v_hfile_printer.init(Thetemphfile, "w", g_options.prefix+"k.h"); v_ccfile_printer.init(Thetempccfile, "w", g_options.prefix+"k." + g_options.suffix); if (g_options.verbose) cout << " "+g_options.prefix+"k" << flush; proot->unparse( v_hfile_printer, view_gen_k_h ); proot->unparse( v_ccfile_printer, view_gen_k_c ); proot->unparse( v_hfile_printer, view_gen_enumphyla_h ); proot->unparse( v_hfile_printer, view_gen_enumoperators_h ); proot->unparse( v_hfile_printer, view_gen_classdecls1_h ); proot->unparse( v_hfile_printer, view_gen_nodetypedefs_h ); proot->unparse( v_hfile_printer, view_gen_operatormap_type_h ); proot->unparse( v_ccfile_printer, view_gen_subphylumdefs_c ); proot->unparse( v_ccfile_printer, view_gen_set_subphylumdefs_c ); proot->unparse( v_ccfile_printer, view_gen_copy_attributes_c ); proot->unparse( v_ccfile_printer, view_gen_phylummap_c ); proot->unparse( v_ccfile_printer, view_gen_operatormap_c ); Thestorageclasses->unparse( v_ccfile_printer, view_gen_uniqmap_c ); proot->unparse( v_hfile_printer, view_gen_nodetypes_h ); proot->unparse( v_hfile_printer, view_gen_noofoperators_h ); proot->unparse( v_hfile_printer, view_close_namespace ); proot->unparse( v_ccfile_printer, view_close_namespace ); IncludeFile(mkcasestring("KC_TYPES_HEADER"))->inc[IncludeFile(mkcasestring("KC_TYPES_HEADER"))->inc_type]->unparse( v_hfile_printer, view_gen_includes ); IncludeFile(mkcasestring("KC_TYPES"))->inc[IncludeFile(mkcasestring("KC_TYPES"))->inc_type]->unparse( v_ccfile_printer, view_gen_includes ); proot->unparse( v_hfile_printer, view_open_namespace ); proot->unparse( v_ccfile_printer, view_open_namespace ); proot->unparse( v_hfile_printer, view_gen_assertmacros_h ); proot->unparse( v_ccfile_printer, view_gen_assertmacros_c ); proot->unparse( v_hfile_printer, view_gen_operatordecls_h ); proot->unparse( v_hfile_printer, view_gen_classdecls2_h ); proot->unparse( v_ccfile_printer, view_gen_classdefs_c ); proot->unparse( v_hfile_printer, view_gen_alloc_h ); proot->unparse( v_ccfile_printer, view_gen_alloc_c ); proot->unparse( v_hfile_printer, view_gen_hashtables_h ); proot->unparse( v_ccfile_printer, view_gen_operatordefs_c ); proot->unparse( v_ccfile_printer, view_gen_hashtables_c ); proot->unparse( v_hfile_printer, view_gen_error_decls_h ); proot->unparse( v_ccfile_printer, view_gen_error_defs_c ); if(!g_options.no_printdot) { proot->unparse( v_hfile_printer, view_gen_printdotdecls_h ); proot->unparse( v_ccfile_printer, view_gen_printdotdefs_c ); } proot->unparse( v_ccfile_printer, view_gen_listdefs_c ); proot->unparse( v_ccfile_printer, view_gen_copydefs_c ); proot->unparse( v_hfile_printer, view_gen_end_k_h ); proot->unparse( v_ccfile_printer, view_close_namespace ); if (v_ccfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem2S( "writing temporary k.cc file failed:", Thetempccfile ))); } if (v_hfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem2S( "writing temporary k.h file failed:", Thetemphfile ))); } compare_and_delete_or_move(Thetempccfile, g_options.prefix+"k."+g_options.suffix); compare_and_delete_or_move(Thetemphfile, g_options.prefix+"k.h"); if(!g_options.no_csgio) { v_hfile_printer.init(Thetemphfile, "w", g_options.prefix+"csgiok.h"); v_ccfile_printer.init(Thetempccfile, "w", g_options.prefix+"csgiok."+g_options.suffix); if (g_options.verbose) cout << " "+g_options.prefix+"csgiok" << flush; proot->unparse( v_hfile_printer, view_gen_csgio_start_h ); IncludeFile(mkcasestring("KC_CSGIO_HEADER"))->inc[IncludeFile(mkcasestring("KC_CSGIO_HEADER"))->inc_type]->unparse( v_hfile_printer, view_gen_includes ); proot->unparse( v_hfile_printer, view_open_namespace ); proot->unparse( v_hfile_printer, view_gen_csgio_h ); proot->unparse( v_hfile_printer, view_close_namespace ); proot->unparse( v_hfile_printer, view_gen_csgio_end_h ); proot->unparse( v_ccfile_printer, view_gen_csgio_start_c ); IncludeFile(mkcasestring("KC_CSGIO"))->inc[IncludeFile(mkcasestring("KC_CSGIO"))->inc_type]->unparse( v_ccfile_printer, view_gen_includes ); proot->unparse( v_ccfile_printer, view_open_namespace ); proot->unparse( v_ccfile_printer, view_gen_csgio_c ); proot->unparse( v_ccfile_printer, view_close_namespace ); if (v_ccfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem2S( "writing temporary csgiok.cc file failed:", Thetempccfile ))); } if (v_hfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem2S( "writing temporary csgiok.h file failed:", Thetemphfile ))); } compare_and_delete_or_move(Thetempccfile, g_options.prefix+"csgiok."+g_options.suffix); compare_and_delete_or_move(Thetemphfile, g_options.prefix+"csgiok.h"); } if(!g_options.no_unparse) { v_hfile_printer.init(Thetemphfile, "w", g_options.prefix+"unpk.h"); v_ccfile_printer.init(Thetempccfile, "w", g_options.prefix+"unpk."+g_options.suffix); if (g_options.verbose) cout << " "+g_options.prefix+"unpk" << flush; proot->unparse( v_hfile_printer, view_gen_unpk_h ); IncludeFile(mkcasestring("KC_UNPARSE_HEADER"))->inc[IncludeFile(mkcasestring("KC_UNPARSE_HEADER"))->inc_type]->unparse( v_hfile_printer, view_gen_includes ); proot->unparse( v_hfile_printer, view_open_namespace ); proot->unparse( v_hfile_printer, view_uview_class_decl ); proot->unparse( v_hfile_printer, view_gen_unparsedecls_h ); proot->unparse( v_hfile_printer, view_close_namespace ); proot->unparse( v_hfile_printer, view_gen_end_unpk_h ); proot->unparse( v_ccfile_printer, view_gen_unpk_c ); proot->unparse( v_ccfile_printer, view_close_namespace ); IncludeFile(mkcasestring("KC_UNPARSE"))->inc[IncludeFile(mkcasestring("KC_UNPARSE"))->inc_type]->unparse( v_ccfile_printer, view_gen_includes ); proot->unparse( v_ccfile_printer, view_open_namespace ); proot->unparse( v_ccfile_printer, view_gen_default_types_unpk_c ); proot->unparse( v_ccfile_printer, view_gen_unparsedefs_c ); if(pg_languageshavebeendefined) { unparse_string_collection(); } proot->unparse( v_ccfile_printer, view_close_namespace ); if (v_ccfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem2S( "writing temporary unpk.cc file failed:", Thetempccfile ))); } if (v_hfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem2S( "writing temporary unpk.h file failed:", Thetemphfile ))); } compare_and_delete_or_move(Thetempccfile, g_options.prefix+"unpk."+g_options.suffix); compare_and_delete_or_move(Thetemphfile, g_options.prefix+"unpk.h"); } if(!g_options.no_rewrite) { v_hfile_printer.init(Thetemphfile, "w", g_options.prefix+"rk.h"); v_ccfile_printer.init(Thetempccfile, "w", g_options.prefix+"rk."+g_options.suffix); if (g_options.verbose) cout << " "+g_options.prefix+"rk" << flush; proot->unparse( v_hfile_printer, view_gen_rewritek_h ); IncludeFile(mkcasestring("KC_REWRITE_HEADER"))->inc[IncludeFile(mkcasestring("KC_REWRITE_HEADER"))->inc_type]->unparse( v_hfile_printer, view_gen_includes ); proot->unparse( v_hfile_printer, view_open_namespace ); proot->unparse( v_hfile_printer, view_rview_class_decl ); proot->unparse( v_hfile_printer, view_gen_rewritedecls_h ); proot->unparse( v_hfile_printer, view_close_namespace ); proot->unparse( v_hfile_printer, view_gen_end_rewritek_h ); proot->unparse( v_ccfile_printer, view_gen_rewritek_c ); proot->unparse( v_ccfile_printer, view_close_namespace ); IncludeFile(mkcasestring("KC_REWRITE"))->inc[IncludeFile(mkcasestring("KC_REWRITE"))->inc_type]->unparse( v_ccfile_printer, view_gen_includes ); proot->unparse( v_ccfile_printer, view_open_namespace ); proot->unparse( v_ccfile_printer, view_gen_rewritedefs_c ); proot->unparse( v_ccfile_printer, view_close_namespace ); if (v_ccfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem2S( "writing temporary rk.cc file failed:", Thetempccfile ))); } if (v_hfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem2S( "writing temporary rk.h file failed:", Thetemphfile ))); } compare_and_delete_or_move(Thetempccfile, g_options.prefix+"rk."+g_options.suffix); compare_and_delete_or_move(Thetemphfile, g_options.prefix+"rk.h"); } { fnfiles kc_fe_selvar_1 = Thefnfiles ; while( kc_fe_selvar_1->prod_sel() == sel_Consfnfiles ) { fnfile kc_selvar_0_1 = kc_fe_selvar_1->fnfile_1; { { { const fnfile a_fnfile = kc_selvar_0_1; { fnfile kc_selvar_1_1 = phylum_cast( a_fnfile ); if ((kc_selvar_1_1->prod_sel() == sel_FnFile)) { const casestring a_filename = phylum_cast(kc_selvar_1_1)->casestring_1; g_options.hfilename = f_mk_filename( a_filename, "h" ); g_options.ccfilename = f_mk_filename( a_filename, g_options.suffix); pg_filename = a_filename; v_hfile_printer.init(Thetemphfile, "w", g_options.hfilename); v_ccfile_printer.init(Thetempccfile, "w", g_options.ccfilename); if (g_options.verbose) cout << " " << f_mk_filename(a_filename, "") << flush; proot->unparse( v_hfile_printer, view_gen_fns_start_h ); IncludeFile( a_filename )->inc[include_header]->unparse( v_hfile_printer, view_gen_includes ); IncludeFile( mkfunctionincname(a_filename, true))->inc[include_header]->unparse( v_hfile_printer, view_gen_includes ); proot->unparse( v_hfile_printer, view_open_namespace ); a_fnfile->fns->unparse( v_hfile_printer, view_gen_fnk_h ); proot->unparse( v_hfile_printer, view_close_namespace ); proot->unparse( v_hfile_printer, view_gen_fns_end_h ); proot->unparse( v_ccfile_printer, view_gen_fns_start_c ); proot->unparse( v_ccfile_printer, view_gen_fns_owninclude_c ); IncludeFile( a_filename )->inc[include_file]->unparse( v_ccfile_printer, view_gen_includes ); IncludeFile( mkfunctionincname(a_filename, false))->inc[include_file]->unparse( v_ccfile_printer, view_gen_includes ); proot->unparse( v_ccfile_printer, view_open_namespace ); a_fnfile->fns->unparse( v_ccfile_printer, view_gen_fnkdecls_c ); a_fnfile->fns->unparse( v_ccfile_printer, view_gen_fnk_c ); proot->unparse( v_ccfile_printer, view_close_namespace ); if (v_ccfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem4S( "writing temporary ", g_options.ccfilename.c_str(), " file failed:", Thetempccfile ))); } if (v_hfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem4S( "writing temporary ", g_options.hfilename.c_str(), " file failed:", Thetemphfile ))); } compare_and_delete_or_move(Thetempccfile, g_options.ccfilename); compare_and_delete_or_move(Thetemphfile, g_options.hfilename); } else kc_no_default_in_with( "main", __LINE__, __FILE__ ); } } } } kc_fe_selvar_1 = kc_fe_selvar_1->fnfiles_1; } } if(g_options.operator_cast) { v_hfile_printer.init(Thetemphfile, "w", g_options.prefix+"operatork.h"); if (g_options.verbose) cout << " "+g_options.prefix+"operatork.h" << flush; proot->unparse( v_hfile_printer, view_gen_operatorcast_h ); if (v_hfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem2S( "writing temporary operatork.h file failed:", Thetemphfile ))); } compare_and_delete_or_move(Thetemphfile, g_options.prefix+"operatork.h"); } if(g_options.for_bison!="") { v_hfile_printer.init(Thetemphfile, "w", g_options.prefix+g_options.for_bison); if (g_options.verbose) cout << " "+g_options.prefix+g_options.for_bison << flush; proot->unparse( v_hfile_printer, view_gen_yaccstacktype_h ); if (v_hfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem4S( "writing temporary ", g_options.for_bison.c_str(), " file failed:", Thetemphfile ))); } compare_and_delete_or_move(Thetemphfile, g_options.prefix+g_options.for_bison); } if(g_options.for_yxx) { v_hfile_printer.init(Thetemphfile, "w", g_options.prefix+"yxx_union.h"); if (g_options.verbose) cout << " "+g_options.prefix+"yxx_union.h" << flush; proot->unparse( v_hfile_printer, view_gen_yxx_union_h ); if (v_hfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem2S( "writing temporary yxx_union.h file failed:", Thetemphfile ))); } compare_and_delete_or_move(Thetemphfile, g_options.prefix+"yxx_union.h"); } if (g_options.verbose) cout << " - done.\n"; leave( 0 ); exit( 0 ); return 0; } namespace kc { static bool different(FILE *f1, FILE *f2, const char *fn1, const char *fn2) { char buf1[BUFSIZ], buf2[BUFSIZ] ; size_t characters_read1, characters_read2; #ifdef KC_USE_STAT struct stat stbuf1, stbuf2; if (stat(fn1, &stbuf1) != 0) { perror("kc++ error (in 'different')"); v_report( NonFatal( NoFileLine(), Problem2S( "error stat'ing", fn1 ))); } if (stat(fn2, &stbuf2) != 0) { perror("kc++ error (in 'different')"); v_report( NonFatal( NoFileLine(), Problem2S( "error stat'ing", fn2 ))); } if (stbuf1.st_size != stbuf2.st_size) { return true; } #endif while(true) { characters_read1 = fread(buf1, 1, BUFSIZ, f1); if (ferror(f1)) { perror("kc++ error (in 'different')"); v_report( Fatal( NoFileLine(), Problem2S( "error while reading from", fn1 ))); } characters_read2 = fread(buf2, 1, BUFSIZ, f2); if (ferror(f2)) { perror("kc++ error (in 'different')"); v_report( Fatal( NoFileLine(), Problem2S( "error while reading from", fn2 ))); } if (characters_read1 == 0 && characters_read2 == 0) return false; else if ( (characters_read1 != characters_read2) || (memcmp(buf1, buf2, characters_read1) != 0) ) return true; } /*NOTREACHED*/ } static void erename(const char *oldfilename, const char *newfilename) { if (rename(oldfilename, newfilename) != 0) { perror("kc++ error (in 'erename')"); v_report( NonFatal( NoFileLine(), Problem4S( "error while renaming", oldfilename, "to", newfilename ))); } } static void eremove(const char *filename) { if (remove(filename) != 0) { perror("kc++ error (in 'eremove')"); v_report( NonFatal( NoFileLine(), Problem2S( "error while removing", filename ))); } } static void compare_and_delete_or_move(const char *tmp_filename, const string &filenamestring) { FILE *tmp_file, *file; const char *filename=filenamestring.c_str(); if ((file = fopen(filename, "r")) == 0) { erename(tmp_filename, filename); } else if ((tmp_file = fopen(tmp_filename, "r")) == 0) { perror("kc++ error (in 'compare_and_delete_or_move')"); v_report( Fatal( NoFileLine(), Problem2S( "could not open temporary file", tmp_filename ))); } else { bool they_are_different=different(tmp_file, file, tmp_filename, filename); if (fclose(tmp_file) == -1) { perror("kc++ error (in 'compare_and_delete_or_move')"); v_report( NonFatal( NoFileLine(), Problem2S( "error while closing", tmp_filename ))); } if (fclose(file) == -1) { perror("kc++ error (in 'compare_and_delete_or_move')"); v_report( NonFatal( NoFileLine(), Problem2S( "error while closing", filename ))); } if (they_are_different || g_options.overwrite) { eremove(filename); erename(tmp_filename, filename); } else { if (g_options.verbose) cout << "(unchanged:" << filename << ')' << flush; eremove(tmp_filename); } } } static phylumdeclarations f_add_predefined_phyla(phylumdeclarations p) { return Consphylumdeclarations( v_predefined_voidptr(), Consphylumdeclarations( v_predefined_int(), Consphylumdeclarations( v_predefined_real(), Consphylumdeclarations( v_predefined_casestring(), Consphylumdeclarations( v_predefined_nocasestring(), p ) ) ) ) ); } static phylumdeclaration v_predefined_int() { ID int_pid, int_oid, int_sto; alternative int_alternative; phylumdeclaration int_phylumdeclaration; int_pid = Id( Str( mkcasestring( "integer" ) )); int_sto = Id( Str( mkcasestring( "uniq" ) )); int_oid = Id( Str( mkcasestring( "_Int" ) )); int_alternative = Alternative( int_oid, Nilarguments() ); int_phylumdeclaration = PhylumDeclaration( int_pid, PositiveStorageOption( int_sto ), PredefinedAlternatives( Consalternatives( int_alternative, Nilalternatives() )), CcodeOption( Nilattributes(), NilCtexts() ) ); v_defoccur( int_oid, ITPredefinedOperator( int_alternative, int_pid ) ); v_defoccur( int_pid, ITPredefinedPhylum( int_phylumdeclaration ) ); return int_phylumdeclaration; } static phylumdeclaration v_predefined_real() { ID real_pid, real_oid, real_sto; alternative real_alternative; phylumdeclaration real_phylumdeclaration; real_pid = Id( Str( mkcasestring( "real" ) )); real_sto = Id( Str( mkcasestring( "uniq" ) )); real_oid = Id( Str( mkcasestring( "_Real" ) )); real_alternative = Alternative( real_oid, Nilarguments() ); real_phylumdeclaration = PhylumDeclaration( real_pid, PositiveStorageOption( real_sto ), PredefinedAlternatives( Consalternatives( real_alternative, Nilalternatives() )), CcodeOption( Nilattributes(), NilCtexts() ) ); v_defoccur( real_oid, ITPredefinedOperator( real_alternative, real_pid ) ); v_defoccur( real_pid, ITPredefinedPhylum( real_phylumdeclaration ) ); return real_phylumdeclaration; } static phylumdeclaration v_predefined_casestring() { ID casestring_pid, casestring_oid, casestring_sto; alternative casestring_alternative; phylumdeclaration casestring_phylumdeclaration; casestring_pid = Id( Str( mkcasestring( "casestring" ) )); casestring_sto = Id( Str( mkcasestring( "uniq" ) )); casestring_oid = Id( Str( mkcasestring( "_Str" ) )); casestring_alternative = Alternative( casestring_oid, Nilarguments() ); casestring_phylumdeclaration = PhylumDeclaration( casestring_pid, PositiveStorageOption( casestring_sto ), PredefinedAlternatives( Consalternatives( casestring_alternative, Nilalternatives() )), CcodeOption( Nilattributes(), NilCtexts() ) ); v_defoccur( casestring_oid, ITPredefinedOperator( casestring_alternative, casestring_pid ) ); v_defoccur( casestring_pid, ITPredefinedPhylum( casestring_phylumdeclaration ) ); return casestring_phylumdeclaration; } static phylumdeclaration v_predefined_nocasestring() { ID nocasestring_pid, nocasestring_oid, nocasestring_sto; alternative nocasestring_alternative; phylumdeclaration nocasestring_phylumdeclaration; nocasestring_pid = Id( Str( mkcasestring( "nocasestring" ) )); nocasestring_sto = Id( Str( mkcasestring( "uniq" ) )); nocasestring_oid = Id( Str( mkcasestring( "NoCaseStr" ) )); nocasestring_alternative = Alternative( nocasestring_oid, Nilarguments() ); nocasestring_phylumdeclaration = PhylumDeclaration( nocasestring_pid, PositiveStorageOption( nocasestring_sto ), PredefinedAlternatives( Consalternatives( nocasestring_alternative, Nilalternatives() )), CcodeOption( Nilattributes(), NilCtexts() ) ); v_defoccur( nocasestring_oid, ITPredefinedOperator( nocasestring_alternative, nocasestring_pid ) ); v_defoccur( nocasestring_pid, ITPredefinedPhylum( nocasestring_phylumdeclaration ) ); return nocasestring_phylumdeclaration; } static phylumdeclaration v_predefined_voidptr() { ID voidptr_pid, voidptr_oid, voidptr_sto; alternative voidptr_alternative; phylumdeclaration voidptr_phylumdeclaration; voidptr_pid = Id( Str( mkcasestring( "voidptr" ) )); voidptr_sto = Id( Str( mkcasestring( "uniq" ) )); voidptr_oid = Id( Str( mkcasestring( "_VoidPtr" ) )); voidptr_alternative = Alternative( voidptr_oid, Nilarguments() ); voidptr_phylumdeclaration = PhylumDeclaration( voidptr_pid, PositiveStorageOption( voidptr_sto ), PredefinedAlternatives( Consalternatives( voidptr_alternative, Nilalternatives() )), CcodeOption( Nilattributes(), NilCtexts() ) ); v_defoccur( voidptr_oid, ITPredefinedOperator( voidptr_alternative, voidptr_pid ) ); v_defoccur( voidptr_pid, ITPredefinedPhylum( voidptr_phylumdeclaration ) ); return voidptr_phylumdeclaration; } static phylumdeclaration v_predefined_abstract_phylum() { ID a_ph_pid; phylumdeclaration a_ph_phylumdeclaration; a_ph_pid = Id( Str( mkcasestring( "abstract_phylum" ) )); a_ph_phylumdeclaration = PhylumDeclaration( a_ph_pid, PositiveStorageOption( f_emptyId() ), Emptyproductionblock(), CcodeOption( Nilattributes(), NilCtexts() ) ); v_defoccur( a_ph_pid, ITPredefinedPhylum( a_ph_phylumdeclaration ) ); return a_ph_phylumdeclaration; } static phylumdeclaration v_predefined_abstract_phylum_ref() { ID a_ph_pid; phylumdeclaration a_ph_phylumdeclaration; a_ph_pid = Id( Str( mkcasestring( "abstract_phylum_ref" ) )); a_ph_phylumdeclaration = PhylumDeclaration( a_ph_pid, PositiveStorageOption( f_emptyId() ), Emptyproductionblock(), CcodeOption( Nilattributes(), NilCtexts() ) ); v_defoccur( a_ph_pid, ITPredefinedPhylum( a_ph_phylumdeclaration ) ); return a_ph_phylumdeclaration; } static phylumdeclaration v_predefined_abstract_list() { ID a_list_pid; phylumdeclaration a_list_phylumdeclaration; a_list_pid = Id( Str( mkcasestring( "abstract_list" ) )); a_list_phylumdeclaration = PhylumDeclaration( a_list_pid, PositiveStorageOption( f_emptyId() ), Emptyproductionblock(), CcodeOption( Nilattributes(), NilCtexts() ) ); v_defoccur( a_list_pid, ITPredefinedPhylum( a_list_phylumdeclaration ) ); return a_list_phylumdeclaration; } static casestring make_pg_filename(const char *s) { char *tmpinpfilename; char *str; casestring tmp; tmpinpfilename=new char[strlen(s)+3]; strcpy(tmpinpfilename,s); for(str=tmpinpfilename;(str=strchr(str,'\\'));) *str='/'; tmp = mkcasestring( tmpinpfilename ); delete[] tmpinpfilename; return tmp; } static void set_signals() { #ifdef SIGINT signal(SIGINT, cleanup_and_die); #endif #ifdef SIGTERM signal(SIGTERM, cleanup_and_die); #endif #ifdef SIGSEGV signal(SIGSEGV, cleanup_and_abort); #endif #ifdef SIGILL signal(SIGILL, cleanup_and_abort); #endif #ifdef SIGSYS signal(SIGSYS, cleanup_and_abort); #endif #ifdef SIGIOT signal(SIGIOT, cleanup_and_abort); #endif #ifdef SIGHUP signal(SIGHUP, cleanup_and_die); #endif #ifdef SIGQUIT signal(SIGQUIT, cleanup_and_die); #endif #ifdef SIGBUS signal(SIGBUS, cleanup_and_abort); #endif } static void block_signals() { } static void cleanup() { block_signals(); if (v_ccfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem2S( "writing temporary file failed:", Thetempccfile ))); } if (v_hfile_printer.fclose() == EOF) { v_report( Fatal( NoFileLine(), Problem2S( "writing temporary file failed:", Thetemphfile ))); } if (access(Thetempccfile, R_OK) == 0) { if (g_options.verbose) cout << "removing " << Thetempccfile << endl; eremove(Thetempccfile); } if (access(Thetemphfile, R_OK) == 0) { if (g_options.verbose) cout << "removing " << Thetemphfile << endl; eremove(Thetemphfile); } } void leave(int status) { cleanup(); if (gp_no_fatal_problems) { exit( (status==0) ? 0 : status ); } else { exit( (status==0) ? 1 : status ); } } } // namespace kc kimwitu++-2.3.13/src/Gen.boot/gutil.cc0000644000175000017500000011676411135163773016060 0ustar useruser/* translation of file "gutil.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #define KC_FUNCTIONS_gutil #include #include "k.h" #include "gutil.h" namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // static char gutil_kAccesSid[] = "@(#)$Id: gutil.k,v 1.50 2008/02/06 20:28:58 piefel Exp $"; /* string(s) stuff */ #include #include #include phylumdeclaration The_abstract_phylum_decl; phylumdeclaration The_abstract_phylum_ref_decl; phylumdeclaration The_abstract_list_decl; #include "util.h" #include "parse.h" #include "unpk.h" #include static ID global_filterview; /* to be used by filteronview */ #include "rk.h" /* for the rewrite_withcasesinfo call below */ /* end included stuff */ namespace kc { #ifndef KC_TRACE_PROVIDED #define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND #endif static bool f_attributes_to_initialize (attributes attr); static bool f_constructors_in_members (fndeclarations dcl); static bool f_destructors_in_members (fndeclarations dcl); static bool f_post_create_in_members (fndeclarations dcl); static bool f_rewrite_in_members (fndeclarations dcl); static ac_parameter_declaration lookup_and_create_ac_parameter_declaration (ID a_fnarg, ac_declaration_list C_vardecls); static bool filterrewriteruleinfoonview (rewriteruleinfo a_rewriteruleinfo); static bool filterunparsedeclinfoonview (unparsedeclinfo a_unparsedeclinfo); static bool is_viewname_in_rewriteruleinfo (ID a_view, rewriteruleinfo a_rewriteruleinfo); static bool is_viewname_in_unparsedeclinfo (ID a_view, unparsedeclinfo a_unparsedeclinfo); static bool is_viewname_in_viewnames (ID a_view, viewnames a_viewnames); static ID f_operatorofelem_patternrepresentation (elem_patternrepresentation a_elem_patternrepresentation); static ID f_operatorofpaths (paths a_paths); static ID f_operatorofpath (path a_path); static elem_patternrepresentation f_outmost_nl_preds_in_patternrepresentation (patternrepresentation p); static bool f_outmost_nl_preds_in_elem_patternrepresentation (elem_patternrepresentation e_p); static bool f_outmost_nl_preds_in_paths (paths p); bool f_something_to_initialize(Ccode_option cco) { { Ccode_option kc_selvar_0_1 = phylum_cast( cco ); if ((kc_selvar_0_1->prod_sel() == sel_CcodeOption)) { const attributes attr = phylum_cast(kc_selvar_0_1)->attributes_1; const Ctexts ct = phylum_cast(kc_selvar_0_1)->Ctexts_1; return (f_attributes_to_initialize( attr ) || (! f_NilCtexts( ct ))); } else { kc_no_default_in_with( "f_something_to_initialize", __LINE__, __FILE__ ); return static_cast(0); } } } bool f_something_to_initialize(alternative a) { return false; } bool f_NilCtexts(Ctexts c) { { Ctexts kc_selvar_0_1 = phylum_cast( c ); if ((kc_selvar_0_1->prod_sel() == sel_ConsCtexts)) { return false; } else if ((kc_selvar_0_1->prod_sel() == sel_NilCtexts)) { return true; } else { kc_no_default_in_with( "f_NilCtexts", __LINE__, __FILE__ ); return static_cast(0); } } } static bool f_attributes_to_initialize(attributes attr) { { attributes kc_fe_selvar_1 = attr ; while( kc_fe_selvar_1->prod_sel() == sel_Consattributes ) { attribute kc_selvar_0_1 = kc_fe_selvar_1->attribute_1; { { { const attribute a = kc_selvar_0_1; { attribute kc_selvar_1_1 = phylum_cast( a ); if ((kc_selvar_1_1->prod_sel() == sel_Attribute) && (phylum_cast(kc_selvar_1_1)->attribute_initialisation_option_1->prod_sel() == sel_Yesattribute_initialisation)) { return true; } else if ((kc_selvar_1_1->prod_sel() == sel_Attribute) && (phylum_cast(kc_selvar_1_1)->attribute_initialisation_option_1->prod_sel() == sel_Noattribute_initialisation)) { /*EMPTY*/ } else { kc_no_default_in_with( "f_attributes_to_initialize", __LINE__, __FILE__ ); return static_cast(0); } } } } } kc_fe_selvar_1 = kc_fe_selvar_1->attributes_1; } } return false; } static bool f_constructors_in_members(fndeclarations dcl) {{ fndeclarations kc_selvar_0_1 = phylum_cast(dcl); if ((kc_selvar_0_1->prod_sel() == sel_Consfndeclarations) && ((kc_selvar_0_1)->fndeclaration_1->prod_sel() == sel_FnAcDeclaration) && (phylum_cast((kc_selvar_0_1)->fndeclaration_1)->fnclass_1->prod_sel() == sel_ConstructorFn)) { return true; } else if ((kc_selvar_0_1->prod_sel() == sel_Consfndeclarations)) { const fndeclarations tail = (kc_selvar_0_1)->fndeclarations_1; return f_constructors_in_members(tail); } else { return false; } } } bool f_constructors_in_operatordecl(alternative op) { return f_constructors_in_members(op->additional_members); } bool f_constructors_in_phylumdecl(phylumdeclaration ph) { return f_constructors_in_members(ph->additional_members); } static bool f_destructors_in_members(fndeclarations dcl) {{ fndeclarations kc_selvar_0_1 = phylum_cast(dcl); if ((kc_selvar_0_1->prod_sel() == sel_Consfndeclarations) && ((kc_selvar_0_1)->fndeclaration_1->prod_sel() == sel_FnAcDeclaration) && (phylum_cast((kc_selvar_0_1)->fndeclaration_1)->fnclass_1->prod_sel() == sel_DestructorFn)) { return true; } else if ((kc_selvar_0_1->prod_sel() == sel_Consfndeclarations)) { const fndeclarations tail = (kc_selvar_0_1)->fndeclarations_1; return f_destructors_in_members(tail); } else { return false; } } } bool f_destructors_in_operatordecl(alternative op) { return f_destructors_in_members(op->additional_members); } bool f_destructors_in_phylumdecl(phylumdeclaration ph) { return f_destructors_in_members(ph->additional_members); } bool f_no_params(ac_parameter_type_list p) {{ ac_parameter_type_list kc_selvar_0_1 = phylum_cast(p); if ((kc_selvar_0_1->prod_sel() == sel_AcParList) && (phylum_cast(kc_selvar_0_1)->ac_parameter_list_1->prod_sel() == sel_Nilac_parameter_list)) { return true; } else { return false; } } } static bool f_post_create_in_members(fndeclarations dcl) {{ fndeclarations kc_selvar_0_1 = phylum_cast(dcl); if ((kc_selvar_0_1->prod_sel() == sel_Consfndeclarations) && ((kc_selvar_0_1)->fndeclaration_1->prod_sel() == sel_FnAcDeclaration) && (phylum_cast((kc_selvar_0_1)->fndeclaration_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast((kc_selvar_0_1)->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(phylum_cast((kc_selvar_0_1)->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId) && (phylum_cast(phylum_cast(phylum_cast(phylum_cast((kc_selvar_0_1)->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1->prod_sel() == sel_Id) && (phylum_cast(phylum_cast(phylum_cast(phylum_cast(phylum_cast((kc_selvar_0_1)->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1)->uniqID_1->prod_sel() == sel_Str) && (kc_strcmp(phylum_cast(phylum_cast(phylum_cast(phylum_cast(phylum_cast(phylum_cast((kc_selvar_0_1)->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1)->uniqID_1)->casestring_1->name, kc_t("post_create"))==0) && (phylum_cast((kc_selvar_0_1)->fndeclaration_1)->fnclass_1->prod_sel() == sel_MemberFn)) { return true; } else if ((kc_selvar_0_1->prod_sel() == sel_Consfndeclarations)) { const fndeclarations tail = (kc_selvar_0_1)->fndeclarations_1; return f_post_create_in_members(tail); } else { return false; } } } bool f_post_create_in_operatordecl(alternative op) { return f_post_create_in_members(op->additional_members); } bool f_post_create_in_phylumdecl(phylumdeclaration ph) { return f_post_create_in_members(ph->additional_members); } static bool f_rewrite_in_members(fndeclarations dcl) {{ fndeclarations kc_selvar_0_1 = phylum_cast(dcl); if ((kc_selvar_0_1->prod_sel() == sel_Consfndeclarations) && ((kc_selvar_0_1)->fndeclaration_1->prod_sel() == sel_FnAcDeclaration) && (phylum_cast((kc_selvar_0_1)->fndeclaration_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast((kc_selvar_0_1)->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(phylum_cast((kc_selvar_0_1)->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId) && (phylum_cast(phylum_cast(phylum_cast(phylum_cast((kc_selvar_0_1)->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1->prod_sel() == sel_Id) && (phylum_cast(phylum_cast(phylum_cast(phylum_cast(phylum_cast((kc_selvar_0_1)->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1)->uniqID_1->prod_sel() == sel_Str) && (kc_strcmp(phylum_cast(phylum_cast(phylum_cast(phylum_cast(phylum_cast(phylum_cast((kc_selvar_0_1)->fndeclaration_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1)->uniqID_1)->casestring_1->name, kc_t("rewrite"))==0) && (phylum_cast((kc_selvar_0_1)->fndeclaration_1)->fnclass_1->prod_sel() == sel_MemberFn)) { return true; } else if ((kc_selvar_0_1->prod_sel() == sel_Consfndeclarations)) { const fndeclarations tail = (kc_selvar_0_1)->fndeclarations_1; return f_rewrite_in_members(tail); } else { return false; } } } bool f_rewrite_in_phylumdecl(phylumdeclaration ph) { return f_rewrite_in_members(ph->additional_members); } bool f_rewrite_in_operatordecl(alternative op) {{ alternative kc_selvar_0_1 = phylum_cast(op); if ((kc_selvar_0_1->prod_sel() == sel_Alternative)) { const ID oid = phylum_cast(kc_selvar_0_1)->ID_1; if(f_rewrite_in_members(op->additional_members)) return true; return f_rewrite_in_phylumdecl(f_phylumdeclofid(f_phylumofoperator(oid))); } else { return false; } } } ID f_phylumofwithcasesinfo(withcasesinfo wcso) { ID id; { withcasesinfo kc_selvar_0_1 = phylum_cast( wcso ); if ((kc_selvar_0_1->prod_sel() == sel_Conswithcasesinfo)) { const withcaseinfo wco = (kc_selvar_0_1)->withcaseinfo_1; const withcasesinfo r_wcso = (kc_selvar_0_1)->withcasesinfo_1; { withcaseinfo kc_selvar_1_1 = phylum_cast( wco ); if ((kc_selvar_1_1->prod_sel() == sel_Withcaseinfo)) { const patternrepresentation patrep = phylum_cast(kc_selvar_1_1)->patternrepresentation_1; if ( (id = f_phylumofpatternrepresentation( patrep ))->eq( f_emptyId() )) { return f_phylumofwithcasesinfo( r_wcso ); } else { return id; } } else { kc_no_default_in_with( "f_phylumofwithcasesinfo", __LINE__, __FILE__ ); return static_cast(0); } } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilwithcasesinfo)) { v_report(NonFatal( NoFileLine(), Problem1S( "Error: can not find type of with expression" ))); return Id( Str( mkcasestring( "KC_ERRORunknownTYPE" ))); } else { kc_no_default_in_with( "f_phylumofwithcasesinfo", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_phylumofpatternrepresentation(patternrepresentation a_patrep) { { patternrepresentation kc_selvar_0_1 = phylum_cast( a_patrep ); if ((kc_selvar_0_1->prod_sel() == sel_Conspatternrepresentation)) { const elem_patternrepresentation a_patrep_elem = (kc_selvar_0_1)->elem_patternrepresentation_1; const patternrepresentation r_patrep = (kc_selvar_0_1)->patternrepresentation_1; { elem_patternrepresentation kc_selvar_1_1 = phylum_cast( a_patrep_elem ); if ((kc_selvar_1_1->prod_sel() == sel_PROperPredicate)) { const ID id = phylum_cast(kc_selvar_1_1)->ID_1; return f_phylumofoperator( id ); } else { return f_phylumofpatternrepresentation( r_patrep ); } } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternrepresentation)) { return f_emptyId(); } else { kc_no_default_in_with( "f_phylumofpatternrepresentation", __LINE__, __FILE__ ); return static_cast(0); } } } ac_parameter_type_list sort_extend_parameter_type_list(ac_declaration_list C_vardecls, ac_declarator decl) {{ ac_declarator kc_selvar_0_1 = phylum_cast(decl); if ((kc_selvar_0_1->prod_sel() == sel_AcDeclarator)) { const ac_direct_declarator add = phylum_cast(kc_selvar_0_1)->ac_direct_declarator_1; { ac_direct_declarator kc_selvar_1_1 = phylum_cast( add ); if ((kc_selvar_1_1->prod_sel() == sel_AcQualifiedDeclProto)) { const ac_parameter_type_list fn_proto = phylum_cast(kc_selvar_1_1)->ac_parameter_type_list_1; return fn_proto; } else if ((kc_selvar_1_1->prod_sel() == sel_AcDirectDeclProto)) { const ac_parameter_type_list fn_proto = phylum_cast(kc_selvar_1_1)->ac_parameter_type_list_1; return fn_proto; } else if ((kc_selvar_1_1->prod_sel() == sel_AcDirectDeclArray)) { return AcParList( Nilac_parameter_list() ); } else if ((kc_selvar_1_1->prod_sel() == sel_AcDirectDeclPack)) { return AcParList( Nilac_parameter_list() ); } else if ((kc_selvar_1_1->prod_sel() == sel_AcDirectDeclId)) { return AcParList( Nilac_parameter_list() ); } else { kc_no_default_in_with( "sort_extend_parameter_type_list", __LINE__, __FILE__ ); return static_cast(0); } } } else { kc_no_default_in_with( "sort_extend_parameter_type_list", __LINE__, __FILE__ ); return static_cast(0); } } } ac_parameter_list t_sort_extend_parameter_list(ac_declaration_list C_vardecls, ac_identifier_list fn_args, ac_parameter_list temp) { { ac_identifier_list kc_selvar_0_1 = phylum_cast( fn_args ); if ((kc_selvar_0_1->prod_sel() == sel_Consac_identifier_list)) { const ID a_fnarg = (kc_selvar_0_1)->ID_1; const ac_identifier_list r_fnargs = (kc_selvar_0_1)->ac_identifier_list_1; temp = t_sort_extend_parameter_list( C_vardecls, r_fnargs, temp ); return Consac_parameter_list( lookup_and_create_ac_parameter_declaration( a_fnarg, C_vardecls ), temp ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilac_identifier_list)) { return temp; } else { kc_no_default_in_with( "t_sort_extend_parameter_list", __LINE__, __FILE__ ); return static_cast(0); } } } static ac_parameter_declaration lookup_and_create_ac_parameter_declaration(ID a_fnarg, ac_declaration_list C_vardecls) { ac_parameter_declaration result = 0; int number_of_results = 0; { ac_declaration_list kc_fe_selvar_1 = C_vardecls ; while( kc_fe_selvar_1->prod_sel() == sel_Consac_declaration_list ) { ac_declaration kc_selvar_0_1 = kc_fe_selvar_1->ac_declaration_1; { { if ((kc_selvar_0_1->prod_sel() == sel_AcDeclaration)) { const ac_declaration_specifiers type = phylum_cast(kc_selvar_0_1)->ac_declaration_specifiers_1; const ac_init_declarator_list cvars = phylum_cast(kc_selvar_0_1)->ac_init_declarator_list_1; { ac_init_declarator_list kc_fe_selvar_1 = cvars ; while( kc_fe_selvar_1->prod_sel() == sel_Consac_init_declarator_list ) { ac_init_declarator kc_selvar_1_1 = kc_fe_selvar_1->ac_init_declarator_1; { { if ((kc_selvar_1_1->prod_sel() == sel_AcInitDecl)) { const ac_declarator decl = phylum_cast(kc_selvar_1_1)->ac_declarator_1; ID name = f_ID_of_declarator( decl ); if (name->eq( a_fnarg ) ) { result = AcParDeclDecl( type, decl, Noac_constant_expression()); number_of_results++; } } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->ac_init_declarator_list_1; } } } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->ac_declaration_list_1; } } if (number_of_results == 1) { return result; } else { if (number_of_results > 1) { v_report(Warning( FileLine( a_fnarg->file, a_fnarg->line ), Problem1S1ID( "more than one type defined for function argument:", a_fnarg ))); } else { v_report(Warning( FileLine( a_fnarg->file, a_fnarg->line ), Problem1S1ID( "can not find type of function argument:", a_fnarg ))); } return AcParDeclDecl( Consac_declaration_specifiers( AcDeclSpecTypeSpec( AcTypeSpec( Id( Str( mkcasestring( "KC_ERRORunknownTYPE" ))))), Nilac_declaration_specifiers()), AcDeclarator( Nopointer(), AcNoRef(), AcDirectDeclId( a_fnarg )), Noac_constant_expression()); } } void unparse(const char *s, printer_functor printer_fn, uview v) { printer_fn( s, v ); } charruns impl_charruns::set(int _n) { number=_n; return this; } ID f_mkselvar(const char *prefix, int level) { std::ostringstream os; os << prefix << level; return Id( Str( mkcasestring( os.str().c_str() ))); } string f_mk_filename(casestring a_casestring, const string &suffix) { char const *basename; if ((basename = strrchr( a_casestring->name, '/' )) == 0) basename = a_casestring->name; if (basename[0] == '/') basename++; else if (basename[0] == '"') basename++; size_t baselen = strlen(basename); string filename = basename; if (baselen > 0 && filename[baselen-1] == '"' ) { filename.erase(baselen-1); baselen--; } if ( baselen > 1 && (filename[baselen-1] == 'k' && filename[baselen-2] == '.' )) filename.erase(baselen-2); if (suffix.length()==0) return filename; filename += '.'; filename += suffix; return filename; } string f_make_identifier_basename(string fn) { size_t baselen = fn.length(); baselen -= (fn[baselen-1] == 'h') ? 2 : 3; string nn; for (size_t i=0; i < baselen; ++i) nn += isalnum(fn[i]) ? fn[i] : '_'; return nn; } rewriterulesinfo f_rewriterulesinfoofalternativeinview(alternative a_alternative, ID a_view) { global_filterview = a_view; return a_alternative->rewriteinfo->filter( filterrewriteruleinfoonview ); } rewriteviewsinfo f_rewriteviewsinfo_of_alternative(alternative a_alternative, viewnames a_views) { rewriterulesinfo tmp_rulesinfo = a_alternative->rewriteinfo; rewriteviewsinfo tmp_viewsinfo = Nilrewriteviewsinfo(); { viewnames kc_fe_selvar_1 = a_views ; while( kc_fe_selvar_1->prod_sel() == sel_Consviewnames ) { ID kc_selvar_0_1 = kc_fe_selvar_1->ID_1; { { { const ID a_view = kc_selvar_0_1; global_filterview = a_view; tmp_viewsinfo = Consrewriteviewsinfo( Rewriteviewinfo( a_view, tmp_rulesinfo->filter( filterrewriteruleinfoonview )), tmp_viewsinfo ); } } } kc_fe_selvar_1 = kc_fe_selvar_1->viewnames_1; } } return tmp_viewsinfo; } unparseviewsinfo f_unparseviewsinfo_of_alternative(alternative a_alternative, viewnames a_views) { unparsedeclsinfo tmp_declsinfo = a_alternative->unparseinfo; unparseviewsinfo tmp_viewsinfo = Nilunparseviewsinfo(); { viewnames kc_fe_selvar_1 = a_views ; while( kc_fe_selvar_1->prod_sel() == sel_Consviewnames ) { ID kc_selvar_0_1 = kc_fe_selvar_1->ID_1; { { { const ID a_view = kc_selvar_0_1; global_filterview = a_view; tmp_viewsinfo = Consunparseviewsinfo( Unparseviewinfo( a_view, tmp_declsinfo->filter( filterunparsedeclinfoonview )), tmp_viewsinfo ); } } } kc_fe_selvar_1 = kc_fe_selvar_1->viewnames_1; } } return tmp_viewsinfo; } static bool filterrewriteruleinfoonview(rewriteruleinfo a_rewriteruleinfo) { return is_viewname_in_rewriteruleinfo( global_filterview, a_rewriteruleinfo ); } static bool filterunparsedeclinfoonview(unparsedeclinfo a_unparsedeclinfo) { return is_viewname_in_unparsedeclinfo( global_filterview, a_unparsedeclinfo ); } static bool is_viewname_in_rewriteruleinfo(ID a_view, rewriteruleinfo a_rewriteruleinfo) { { rewriteruleinfo kc_selvar_0_1 = phylum_cast( a_rewriteruleinfo ); if ((kc_selvar_0_1->prod_sel() == sel_Rewriteruleinfo) && (phylum_cast(kc_selvar_0_1)->rewriteclause_1->prod_sel() == sel_RewriteClause)) { const viewnames a_viewnames = phylum_cast(phylum_cast(kc_selvar_0_1)->rewriteclause_1)->viewnames_1; return is_viewname_in_viewnames( a_view, a_viewnames ); } else { kc_no_default_in_with( "is_viewname_in_rewriteruleinfo", __LINE__, __FILE__ ); return static_cast(0); } } } static bool is_viewname_in_unparsedeclinfo(ID a_view, unparsedeclinfo a_unparsedeclinfo) { { unparsedeclinfo kc_selvar_0_1 = phylum_cast( a_unparsedeclinfo ); if ((kc_selvar_0_1->prod_sel() == sel_Unparsedeclinfo) && (phylum_cast(kc_selvar_0_1)->unparseclause_1->prod_sel() == sel_UnparseClause)) { const viewnames a_viewnames = phylum_cast(phylum_cast(kc_selvar_0_1)->unparseclause_1)->viewnames_1; return is_viewname_in_viewnames( a_view, a_viewnames ); } else { kc_no_default_in_with( "is_viewname_in_unparsedeclinfo", __LINE__, __FILE__ ); return static_cast(0); } } } static bool is_viewname_in_viewnames(ID a_view, viewnames a_viewnames) { { viewnames kc_fe_selvar_1 = a_viewnames ; while( kc_fe_selvar_1->prod_sel() == sel_Consviewnames ) { ID kc_selvar_0_1 = kc_fe_selvar_1->ID_1; { { { const ID a_viewname = kc_selvar_0_1; if ( a_view->eq( a_viewname ) ) { return true; } } } } kc_fe_selvar_1 = kc_fe_selvar_1->viewnames_1; } } return false; } ID f_typeof(path a_path) { if (a_path->id->eq(f_emptyId())) { { path kc_selvar_0_1 = phylum_cast( a_path ); if ((kc_selvar_0_1->prod_sel() == sel_Conspath)) { const integer i = (kc_selvar_0_1)->integer_1; const path r_path = (kc_selvar_0_1)->path_1; return f_subphylumofoperator( r_path->op, Int( i ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpath)) { return f_phylumofoperator( a_path->op ); } else { kc_no_default_in_with( "f_typeof", __LINE__, __FILE__ ); return static_cast(0); } } } else { return a_path->id; } } ID f_operatorofpatternrepresentation(patternrepresentation a_patternrepresentation) { { patternrepresentation kc_selvar_0_1 = phylum_cast( a_patternrepresentation ); if ((kc_selvar_0_1->prod_sel() == sel_Conspatternrepresentation)) { const elem_patternrepresentation e = (kc_selvar_0_1)->elem_patternrepresentation_1; return f_operatorofelem_patternrepresentation( e ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternrepresentation)) { return f_emptyId(); } else { kc_no_default_in_with( "f_operatorofpatternrepresentation", __LINE__, __FILE__ ); return static_cast(0); } } } static ID f_operatorofelem_patternrepresentation(elem_patternrepresentation a_elem_patternrepresentation) { { elem_patternrepresentation kc_selvar_0_1 = phylum_cast( a_elem_patternrepresentation ); if ((kc_selvar_0_1->prod_sel() == sel_PRDefault)) { return f_emptyId(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRUserPredicate)) { return f_emptyId(); } else if ((kc_selvar_0_1->prod_sel() == sel_PRIntLiteral)) { const path p = phylum_cast(kc_selvar_0_1)->path_1; return f_operatorofpath( p ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRStringLiteral)) { const path p = phylum_cast(kc_selvar_0_1)->path_1; return f_operatorofpath( p ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRWildcard)) { const path p = phylum_cast(kc_selvar_0_1)->path_1; return f_operatorofpath( p ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRNonLeafBinding)) { const path p = phylum_cast(kc_selvar_0_1)->path_1; return f_operatorofpath( p ); } else if ((kc_selvar_0_1->prod_sel() == sel_PROperPredicate)) { const path p = phylum_cast(kc_selvar_0_1)->path_1; return f_operatorofpath( p ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRBinding)) { const path p = phylum_cast(kc_selvar_0_1)->path_1; return f_operatorofpath( p ); } else if ((kc_selvar_0_1->prod_sel() == sel_PRVarPredicate)) { const paths ps = phylum_cast(kc_selvar_0_1)->paths_1; return f_operatorofpaths( ps ); } else { kc_no_default_in_with( "f_operatorofelem_patternrepresentation", __LINE__, __FILE__ ); return static_cast(0); } } } static ID f_operatorofpaths(paths a_paths) { { paths kc_selvar_0_1 = phylum_cast( a_paths ); if ((kc_selvar_0_1->prod_sel() == sel_Conspaths)) { const path p = (kc_selvar_0_1)->path_1; return f_operatorofpath( p ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpaths)) { return f_emptyId(); } else { kc_no_default_in_with( "f_operatorofpaths", __LINE__, __FILE__ ); return static_cast(0); } } } static ID f_operatorofpath(path a_path) { { path kc_selvar_0_1 = phylum_cast( a_path ); if ((kc_selvar_0_1->prod_sel() == sel_Conspath)) { const path r_path = (kc_selvar_0_1)->path_1; return r_path->op; } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpath)) { return a_path->op; } else { kc_no_default_in_with( "f_operatorofpath", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_typeofunpsubterm(unpsubterm a_unpsubterm, ID a_operator) { { unpsubterm kc_selvar_0_1 = phylum_cast( a_unpsubterm ); if ((kc_selvar_0_1->prod_sel() == sel_UnpCastedVariable)) { const ID a_cast = phylum_cast(kc_selvar_0_1)->ID_1; return a_cast; } else if ((kc_selvar_0_1->prod_sel() == sel_UnpDollarvarAttr)) { const INT i = phylum_cast(kc_selvar_0_1)->INT_1; const unpattributes a_unpattributes = phylum_cast(kc_selvar_0_1)->unpattributes_1; return f_check_unpattributes_in_phylum( a_unpattributes, f_subphylumofoperator( a_operator, i ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_UnpSubAttr)) { const ID an_id = phylum_cast(kc_selvar_0_1)->ID_1; const unpattributes an_unpattributes = phylum_cast(kc_selvar_0_1)->unpattributes_1; return f_check_unpattributes_in_phylum( an_unpattributes, f_phylumofpatternID( an_id ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_UnpDollarvarTerm)) { const INT i = phylum_cast(kc_selvar_0_1)->INT_1; return f_subphylumofoperator( a_operator, i ); } else if ((kc_selvar_0_1->prod_sel() == sel_UnpSubTerm)) { const ID a_id = phylum_cast(kc_selvar_0_1)->ID_1; return f_phylumofpatternID( a_id ); } else { kc_no_default_in_with( "f_typeofunpsubterm", __LINE__, __FILE__ ); return static_cast(0); } } } elem_patternrepresentation f_outmost_nl_preds_in_rewriterulesinfo(rewriterulesinfo ri) { { rewriterulesinfo kc_selvar_0_1 = phylum_cast( ri ); if ((kc_selvar_0_1->prod_sel() == sel_Consrewriterulesinfo) && ((kc_selvar_0_1)->rewriteruleinfo_1->prod_sel() == sel_Rewriteruleinfo)) { const patternrepresentation preds = phylum_cast((kc_selvar_0_1)->rewriteruleinfo_1)->patternrepresentation_1; const rewriterulesinfo r_ri = (kc_selvar_0_1)->rewriterulesinfo_1; elem_patternrepresentation epr = f_outmost_nl_preds_in_patternrepresentation( preds ); return epr ? epr : f_outmost_nl_preds_in_rewriterulesinfo( r_ri ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilrewriterulesinfo)) { return 0; } else { kc_no_default_in_with( "f_outmost_nl_preds_in_rewriterulesinfo", __LINE__, __FILE__ ); return static_cast(0); } } } elem_patternrepresentation f_outmost_nl_preds_in_unparsedeclsinfo(unparsedeclsinfo ri) { { unparsedeclsinfo kc_selvar_0_1 = phylum_cast( ri ); if ((kc_selvar_0_1->prod_sel() == sel_Consunparsedeclsinfo) && ((kc_selvar_0_1)->unparsedeclinfo_1->prod_sel() == sel_Unparsedeclinfo)) { const patternrepresentation preds = phylum_cast((kc_selvar_0_1)->unparsedeclinfo_1)->patternrepresentation_1; const unparsedeclsinfo r_ri = (kc_selvar_0_1)->unparsedeclsinfo_1; elem_patternrepresentation epr = f_outmost_nl_preds_in_patternrepresentation( preds ); return epr ? epr : f_outmost_nl_preds_in_unparsedeclsinfo( r_ri ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilunparsedeclsinfo)) { return 0; } else { kc_no_default_in_with( "f_outmost_nl_preds_in_unparsedeclsinfo", __LINE__, __FILE__ ); return static_cast(0); } } } static elem_patternrepresentation f_outmost_nl_preds_in_patternrepresentation(patternrepresentation p) { { patternrepresentation kc_selvar_0_1 = phylum_cast( p ); if ((kc_selvar_0_1->prod_sel() == sel_Conspatternrepresentation)) { const elem_patternrepresentation a_p = (kc_selvar_0_1)->elem_patternrepresentation_1; const patternrepresentation r_p = (kc_selvar_0_1)->patternrepresentation_1; return f_outmost_nl_preds_in_elem_patternrepresentation( a_p ) ? a_p : f_outmost_nl_preds_in_patternrepresentation( r_p ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpatternrepresentation)) { return 0; } else { kc_no_default_in_with( "f_outmost_nl_preds_in_patternrepresentation", __LINE__, __FILE__ ); return static_cast(0); } } } static bool f_outmost_nl_preds_in_elem_patternrepresentation(elem_patternrepresentation e_p) { { elem_patternrepresentation kc_selvar_0_1 = phylum_cast( e_p ); if ((kc_selvar_0_1->prod_sel() == sel_PRVarPredicate)) { const paths a_p = phylum_cast(kc_selvar_0_1)->paths_1; return f_outmost_nl_preds_in_paths( a_p ); } else { return false; } } } static bool f_outmost_nl_preds_in_paths(paths p) { { paths kc_selvar_0_1 = phylum_cast( p ); if ((kc_selvar_0_1->prod_sel() == sel_Conspaths) && ((kc_selvar_0_1)->path_1->prod_sel() == sel_Conspath)) { const paths r_p = (kc_selvar_0_1)->paths_1; return f_outmost_nl_preds_in_paths( r_p ); } else if ((kc_selvar_0_1->prod_sel() == sel_Conspaths) && ((kc_selvar_0_1)->path_1->prod_sel() == sel_Nilpath)) { return true; } else if ((kc_selvar_0_1->prod_sel() == sel_Nilpaths)) { return false; } else { kc_no_default_in_with( "f_outmost_nl_preds_in_paths", __LINE__, __FILE__ ); return static_cast(0); } } } bool f_is_known_ptr_type(ID id) { static phylumnames known = 0; if (! known ) { known = Nilphylumnames(); known = Consphylumnames( Id( Str( mkcasestring( "size_t" ))), known ); known = Consphylumnames( Id( Str( mkcasestring( "unsigned" ))), known ); known = Consphylumnames( Id( Str( mkcasestring( "enum_phyla" ))), known ); known = Consphylumnames( Id( Str( mkcasestring( "enum_operators" ))), known ); known = Consphylumnames( Id( Str( mkcasestring( "KC_UNIQ_INFO" ))), known ); known = Consphylumnames( Id( Str( mkcasestring( "bool" ))), known ); known = Consphylumnames( Id( Str( mkcasestring( "hashtable_t" ))), known ); known = Consphylumnames( Id( Str( mkcasestring( "KC_IO_STATUS" ))), known ); known = Consphylumnames( Id( Str( mkcasestring( "uview" ))), known ); known = Consphylumnames( Id( Str( mkcasestring( "rview" ))), known ); } { phylumnames kc_fe_selvar_1 = known ; while( kc_fe_selvar_1->prod_sel() == sel_Consphylumnames ) { ID kc_selvar_0_1 = kc_fe_selvar_1->ID_1; { { { const ID pn = kc_selvar_0_1; if ( pn->eq( id )) { return true; } } } } kc_fe_selvar_1 = kc_fe_selvar_1->phylumnames_1; } } return false; } withcasesinfo rewrite_withcasesinfo(withcasesinfo a_withcasesinfo) {{ withcasesinfo kc_selvar_0_1 = phylum_cast(a_withcasesinfo); if ((kc_selvar_0_1->prod_sel() == sel_Conswithcasesinfo) && ((kc_selvar_0_1)->withcaseinfo_1->prod_sel() == sel_Withcaseinfo)) { const patternrepresentation p = phylum_cast((kc_selvar_0_1)->withcaseinfo_1)->patternrepresentation_1; const patternrepresentation b = phylum_cast((kc_selvar_0_1)->withcaseinfo_1)->patternrepresentation_2; const Ctext ct = phylum_cast((kc_selvar_0_1)->withcaseinfo_1)->Ctext_1; const withcasesinfo r = (kc_selvar_0_1)->withcasesinfo_1; return Conswithcasesinfo( Withcaseinfo( p->rewrite(base_rview), b, ct ), rewrite_withcasesinfo( r ) ); } else if ((kc_selvar_0_1->prod_sel() == sel_Nilwithcasesinfo)) { return kc_selvar_0_1; } else { kc_no_default_in_with( "rewrite_withcasesinfo", __LINE__, __FILE__ ); return static_cast(0); } } } int pos_of_sole_dollar_or_pattern_in_patternchain(patternchain a_patternchain) { return t_pos_of_sole_dollar_or_pattern_in_patternchain(a_patternchain, -2, 1); } int t_pos_of_sole_dollar_or_pattern_in_patternchain(patternchain a_patternchain, int tmp_result, int pos) { if (tmp_result == -1) { return tmp_result; } { patternchain kc_selvar_0_1 = phylum_cast( a_patternchain ); if ((kc_selvar_0_1->prod_sel() == sel_Conspatternchain)) { const patternchainitem h = (kc_selvar_0_1)->patternchainitem_1; const patternchain t = (kc_selvar_0_1)->patternchain_1; tmp_result = t_pos_of_sole_dollar_or_pattern_in_patternchain( t, tmp_result, pos+1 ); if (tmp_result == -1) { return tmp_result; } { patternchainitem kc_selvar_1_1 = phylum_cast( h ); if ((kc_selvar_1_1->prod_sel() == sel_PatternchainitemDollarid)) { return tmp_result >= 0 ? -1 : pos; } else if ((kc_selvar_1_1->prod_sel() == sel_PatternchainitemOutmost)) { const outmostpattern p = phylum_cast(kc_selvar_1_1)->outmostpattern_1; { outmostpattern kc_selvar_2_1 = phylum_cast( p ); if ((kc_selvar_2_1->prod_sel() == sel_OPOperatorWildcard) && (phylum_cast(kc_selvar_2_1)->ID_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(phylum_cast(kc_selvar_2_1)->ID_1)->uniqID_1; { IDtype kc_selvar_3_1 = phylum_cast( uid->type ); if ((kc_selvar_3_1->prod_sel() == sel_ITUnknown)) { return tmp_result; } else if ((kc_selvar_3_1->prod_sel() == sel_ITPatternVariable)) { return tmp_result; } else { if (tmp_result >= 0) { return -1; } else { return pos; } } } } else { return tmp_result >= 0 ? -1 : pos; } } } else { return -1; } } } else { return tmp_result; } } } string f_getidentfromstring(const char **c) { string s=""; if (isalnum(**c) || **c=='_') while (isalnum(**c) || **c=='_') s+=*(*c)++; else while (!(isalnum(**c) || **c=='_' || **c=='\0')) s+=*(*c)++; return s; } } // namespace kc kimwitu++-2.3.13/src/Gen.boot/k.cc0000644000175000017500000211537111135163773015161 0ustar useruser/* translation of file(s) "abs.k" "main.k" "parse.k" "error.k" "occur.k" "util.k" "gen.k" "gutil.k" "pat.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #define KC_TYPES #include "k.h" #include #include #include #include #include #ifdef _MSC_VER #pragma warning( disable : 4786 ) #endif #include #include #include #include #if !defined(USE_HASHSET) && (defined(__GNUC__) || defined(__ICC) || defined(__ECC)) \ && !defined(DONT_USE_HASHSET) # define USE_HASHSET #endif #ifdef USE_HASHSET # if defined(__GNUC__) && __GNUC__>2 # include # else # include # endif #endif using namespace std; namespace kc { inline bool ht_less(casestring p1, casestring p2){ return kc_strcmp(p1->name, p2->name)<0; } inline bool ht_less(nocasestring p1, nocasestring p2){ return kc_strcasecmp(p1->name, p2->name)<0; } inline bool ht_less(real p1, real p2){ return p1->value < p2->value; } inline bool ht_less(integer p1, integer p2){ return p1->value < p2->value; } inline bool ht_less(voidptr p1, voidptr p2){ return p1->pointer < p2->pointer; } bool ht_less(abstract_phylum p1, abstract_phylum p2) { enum_operators prod_sel=p1->prod_sel(); enum_operators prod_sel2=p2->prod_sel(); if(prod_selprod_sel2) return false; switch(prod_sel) { case sel_NoCaseStr: return ht_less(static_cast(p1),static_cast(p2)); case sel__Str: return ht_less(static_cast(p1),static_cast(p2)); case sel__Real: return ht_less(static_cast(p1),static_cast(p2)); case sel__Int: return ht_less(static_cast(p1),static_cast(p2)); case sel__VoidPtr: return ht_less(static_cast(p1),static_cast(p2)); default: { int i=0; bool still_unique = kc_storageclass_still_uniq[phylum_info[p1->phylum()].uniq_stored]; abstract_phylum sub1=0; do { sub1=p1->subphylum(i); abstract_phylum sub2=p2->subphylum(i); if(still_unique) { if(sub1 class phylum_less : std::binary_function { public: bool operator()(const T& X, const T& Y) const { return ht_less(X,Y); } }; inline void deletefun(c_abstract_phylum t){ delete const_cast(t); } #ifdef USE_HASHSET struct hashitem { size_t hashvalue; casestring contents; hashitem(casestring cs): contents(cs) { unsigned long h = 0; kc_char_t const *s = cs->name; for ( ; *s; ++s) h = 5*h + *s; hashvalue=(size_t)h; } }; inline void deletefunhashitem(hashitem t) { delete t.contents; } # ifdef __GNUC__ struct eq_hashitem { bool operator()(hashitem hi1, hashitem hi2) const { return kc_strcmp(hi1.contents->name, hi2.contents->name) == 0; } }; struct hash_hashitem { size_t operator()(hashitem hi) const { return hi.hashvalue; } }; # else struct comp_hashitem { enum { bucket_size = 4, min_buckets = 8 }; // bucket_size and min_buckets are just guesses size_t operator()(const hashitem hi) const { return hi.hashvalue; } bool operator()(const hashitem hi1, const hashitem hi2) const { return kc_strcmp(hi1.contents->name, hi2.contents->name) < 0; } }; # endif // Whether gcc or icc #endif // Whether hash or not struct hashtable_level { hashtable_level(bool cod = true): clean_on_destruction(cod) { } void clear(bool free_entries=true) { if(free_entries) clear_entries(); _casestring.clear(); _nocasestring.clear(); _integer.clear(); _real.clear(); _voidptr.clear(); _abstract_phylum.clear(); } void clear_entries() { #ifdef USE_HASHSET std::for_each(_casestring.begin(),_casestring.end(),deletefunhashitem); #else std::for_each(_casestring.begin(),_casestring.end(),deletefun); #endif std::for_each(_nocasestring.begin(),_nocasestring.end(),deletefun); std::for_each(_integer.begin(),_integer.end(),deletefun); std::for_each(_real.begin(),_real.end(),deletefun); std::for_each(_voidptr.begin(),_voidptr.end(),deletefun); std::for_each(_abstract_phylum.begin(),_abstract_phylum.end(),deletefun); } ~hashtable_level() { clear(clean_on_destruction); } abstract_phylum check_insert(abstract_phylum t) { return *_abstract_phylum.insert(t).first; } casestring check_insert(casestring t) { #ifdef USE_HASHSET return (*_casestring.insert(hashitem(t)).first).contents; #else return *_casestring.insert(t).first; #endif } nocasestring check_insert(nocasestring t) { return *_nocasestring.insert(t).first; } integer check_insert(integer t) { return *_integer.insert(t).first; } real check_insert(real t) { return *_real.insert(t).first; } voidptr check_insert(voidptr t) { return *_voidptr.insert(t).first; } private: bool clean_on_destruction; #ifdef USE_HASHSET # ifdef __GNUC__ # if __GNUC__==2 || (__GNUC__==3 && __GNUC_MINOR__==0) std::hash_set _casestring; # else __gnu_cxx::hash_set _casestring; # endif # else std::hash_set _casestring; # endif #else std::set > _casestring; #endif std::set > _nocasestring; std::set > _integer; std::set > _real; std::set > _voidptr; std::set > _abstract_phylum; }; class hashtable_stack: public std::list { public: hashtable_stack(): _pos(begin()) { } void inc_level() { _pos=insert(_pos, hashtable_level()); } void dec_level() { if(valid() && _pos!=end()) ++_pos; } void free_level() { if(_pos!=begin()) { erase(begin(),_pos);_pos=begin(); } } bool valid() const { return !empty(); } hashtable_level& get_level() { return *_pos; } template T check_insert(T t) { return dynamic_cast((*_pos).check_insert(t)); } private: iterator _pos; }; class hashtable_struct_t { public: // don't clean _static_level on destruction (program ends) hashtable_struct_t(): _static_level(false), _to_be_freed(false), _dynamic(false) { } template T ht_check_insert(T t) { if(_dynamic && _dynamic_level.valid()) return _dynamic_level.check_insert(t); else return dynamic_cast(_static_level.check_insert(t)); } void ht_static() {_dynamic=false; } void ht_dynamic() { _dynamic=true; if(!_dynamic_level.valid()) _dynamic_level.inc_level(); } void ht_inc_level() { _dynamic_level.inc_level(); } void ht_dec_level() { _dynamic_level.dec_level(); } void ht_free_level() { _dynamic_level.free_level(); } void ht_clear() { _static_level.clear(); _dynamic_level.clear(); _dynamic=false; } bool to_be_freed() { return _to_be_freed; } void set_to_be_freed(bool b=true) { _to_be_freed=b; } private: hashtable_level _static_level; hashtable_stack _dynamic_level; bool _to_be_freed; /* should be true for dynamic, false for statically allocated structures */ bool _dynamic; }; impl_nocasestring_NoCaseStr::impl_nocasestring_NoCaseStr(const kc_char_t* _name) : name(_name) { } void impl_nocasestring_NoCaseStr::make_own(int length) { kc_char_t *newname=new kc_char_t[length+1]; for (int i=0; i < length && name[i]; ++i) newname[i] = kc_tolower(name[i]); newname[length]=0; name=newname; } impl_casestring__Str::impl_casestring__Str(const kc_char_t* _name) : name(_name) { } void impl_casestring__Str::make_own(int length) { kc_char_t *newname=kc_strncpy(new kc_char_t[length+1],name,length); newname[length]=0; name=newname; } abstract_phylum impl_bindingidmark_BindingIdMark::subphylum(int no) const { switch(no){ case 0: return uniqID_1; } return 0; } abstract_phylum impl_bindingidmarks::subphylum(int no) const { switch(no){ case 0: return bindingidmark_1; case 1: return bindingidmarks_1; } return 0; } abstract_phylum impl_countedphylumdeclaration_CountedPhylumdeclaration::subphylum(int no) const { switch(no){ case 0: return uniqID_1; } return 0; } abstract_phylum impl_countedphylumdeclarations::subphylum(int no) const { switch(no){ case 0: return countedphylumdeclaration_1; case 1: return countedphylumdeclarations_1; } return 0; } abstract_phylum impl_addedphylumdeclaration_AddedPhylumdeclaration::subphylum(int no) const { switch(no){ case 0: return uniqID_1; } return 0; } abstract_phylum impl_addedphylumdeclarations::subphylum(int no) const { switch(no){ case 0: return addedphylumdeclaration_1; case 1: return addedphylumdeclarations_1; } return 0; } abstract_phylum impl_problem_Problem6::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return casestring_2; case 2: return casestring_3; case 3: return casestring_4; case 4: return casestring_5; case 5: return casestring_6; } return 0; } abstract_phylum impl_problem_Problem5::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return casestring_2; case 2: return casestring_3; case 3: return casestring_4; case 4: return casestring_5; } return 0; } abstract_phylum impl_problem_Problem4::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return casestring_2; case 2: return casestring_3; case 3: return casestring_4; } return 0; } abstract_phylum impl_problem_Problem3int1::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return casestring_2; case 2: return casestring_3; case 3: return integer_1; case 4: return casestring_4; } return 0; } abstract_phylum impl_problem_Problem3::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return casestring_2; case 2: return casestring_3; } return 0; } abstract_phylum impl_problem_Problem2::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return casestring_2; } return 0; } abstract_phylum impl_problem_Problem1storageoption1ID::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return storageoption_1; case 2: return casestring_2; case 3: return ID_1; } return 0; } abstract_phylum impl_problem_Problem1INT1ID1ID::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return INT_1; case 2: return casestring_2; case 3: return ID_1; case 4: return casestring_3; case 5: return ID_2; } return 0; } abstract_phylum impl_problem_Problem1ID1ID1ID::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return ID_1; case 2: return casestring_2; case 3: return ID_2; case 4: return casestring_3; case 5: return ID_3; } return 0; } abstract_phylum impl_problem_Problem1INT1ID::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return INT_1; case 2: return casestring_2; case 3: return ID_1; } return 0; } abstract_phylum impl_problem_Problem1int1::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return integer_1; case 2: return casestring_2; } return 0; } abstract_phylum impl_problem_Problem1INT::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return INT_1; } return 0; } abstract_phylum impl_problem_Problem1t1ID::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return IDtype_1; case 2: return casestring_2; case 3: return ID_1; } return 0; } abstract_phylum impl_problem_Problem1ID1ID::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return ID_1; case 2: return casestring_2; case 3: return ID_2; } return 0; } abstract_phylum impl_problem_Problem1we::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return withexpression_1; } return 0; } abstract_phylum impl_problem_Problem1tID::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return ID_1; } return 0; } abstract_phylum impl_problem_Problem1ID::subphylum(int no) const { switch(no){ case 0: return casestring_1; case 1: return ID_1; } return 0; } abstract_phylum impl_problem_Problem1::subphylum(int no) const { switch(no){ case 0: return casestring_1; } return 0; } abstract_phylum impl_error_Warning::subphylum(int no) const { switch(no){ case 0: return fileline_1; case 1: return problem_1; } return 0; } abstract_phylum impl_error_NonFatal::subphylum(int no) const { switch(no){ case 0: return fileline_1; case 1: return problem_1; } return 0; } abstract_phylum impl_error_Fatal::subphylum(int no) const { switch(no){ case 0: return fileline_1; case 1: return problem_1; } return 0; } abstract_phylum impl_baseclass_list::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return baseclass_list_1; } return 0; } abstract_phylum impl_baseclass_decl_BaseClassDecl::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return baseclass_list_1; } return 0; } abstract_phylum impl_baseclass_declarations::subphylum(int no) const { switch(no){ case 0: return baseclass_decl_1; case 1: return baseclass_declarations_1; } return 0; } abstract_phylum impl_ac_base_init_AcBaseInit::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return ac_constant_expression_list_1; } return 0; } abstract_phylum impl_ac_base_init_list::subphylum(int no) const { switch(no){ case 0: return ac_base_init_1; case 1: return ac_base_init_list_1; } return 0; } abstract_phylum impl_ac_opt_base_init_list_AcYesBaseInit::subphylum(int no) const { switch(no){ case 0: return ac_base_init_list_1; } return 0; } abstract_phylum impl_ac_constant_expression_list::subphylum(int no) const { switch(no){ case 0: return ac_constant_expression_1; case 1: return ac_constant_expression_list_1; } return 0; } abstract_phylum impl_ac_constant_expression_AcConstExpr::subphylum(int no) const { switch(no){ case 0: return Cexpression_1; } return 0; } abstract_phylum impl_ac_constant_expression_option_Yesac_constant_expression::subphylum(int no) const { switch(no){ case 0: return ac_constant_expression_1; } return 0; } abstract_phylum impl_ac_direct_abstract_declarator_AcDirAbsdeclFn::subphylum(int no) const { switch(no){ case 0: return ac_direct_abstract_declarator_option_1; case 1: return ac_parameter_type_list_1; } return 0; } abstract_phylum impl_ac_direct_abstract_declarator_AcDirAbsdeclArray::subphylum(int no) const { switch(no){ case 0: return ac_direct_abstract_declarator_option_1; case 1: return ac_constant_expression_option_1; } return 0; } abstract_phylum impl_ac_direct_abstract_declarator_AcDirAbsdeclPack::subphylum(int no) const { switch(no){ case 0: return ac_abstract_declarator_1; } return 0; } abstract_phylum impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator::subphylum(int no) const { switch(no){ case 0: return ac_direct_abstract_declarator_1; } return 0; } abstract_phylum impl_ac_abstract_declarator_AcAbsdeclDirdecl::subphylum(int no) const { switch(no){ case 0: return ac_pointer_option_1; case 1: return ac_direct_abstract_declarator_1; } return 0; } abstract_phylum impl_ac_abstract_declarator_AcAbsdeclPointer::subphylum(int no) const { switch(no){ case 0: return ac_pointer_1; } return 0; } abstract_phylum impl_ac_identifier_list::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return ac_identifier_list_1; } return 0; } abstract_phylum impl_ac_parameter_declaration_AcParDeclAbsdecl::subphylum(int no) const { switch(no){ case 0: return ac_declaration_specifiers_1; case 1: return ac_abstract_declarator_1; case 2: return ac_constant_expression_option_1; } return 0; } abstract_phylum impl_ac_parameter_declaration_AcParDeclDecl::subphylum(int no) const { switch(no){ case 0: return ac_declaration_specifiers_1; case 1: return ac_declarator_1; case 2: return ac_constant_expression_option_1; } return 0; } abstract_phylum impl_ac_parameter_list::subphylum(int no) const { switch(no){ case 0: return ac_parameter_declaration_1; case 1: return ac_parameter_list_1; } return 0; } abstract_phylum impl_ac_parameter_type_list_AcParList3Dot::subphylum(int no) const { switch(no){ case 0: return ac_parameter_list_1; } return 0; } abstract_phylum impl_ac_parameter_type_list_AcParList::subphylum(int no) const { switch(no){ case 0: return ac_parameter_list_1; } return 0; } abstract_phylum impl_ac_type_qualifier_list::subphylum(int no) const { switch(no){ case 0: return ac_type_qualifier_1; case 1: return ac_type_qualifier_list_1; } return 0; } abstract_phylum impl_ac_class_qualifier_list::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return ac_class_qualifier_list_1; } return 0; } abstract_phylum impl_ac_class_qualifier_help_list::subphylum(int no) const { switch(no){ case 0: return ac_direct_declarator_1; case 1: return ac_class_qualifier_help_list_1; } return 0; } abstract_phylum impl_ac_operator_name_AcOperatorName::subphylum(int no) const { switch(no){ case 0: return casestring_1; } return 0; } abstract_phylum impl_ac_pointer_AcPointerCons::subphylum(int no) const { switch(no){ case 0: return ac_type_qualifier_list_1; case 1: return ac_pointer_1; } return 0; } abstract_phylum impl_ac_pointer_AcPointerNil::subphylum(int no) const { switch(no){ case 0: return ac_type_qualifier_list_1; } return 0; } abstract_phylum impl_ac_pointer_option_Yespointer::subphylum(int no) const { switch(no){ case 0: return ac_pointer_1; } return 0; } abstract_phylum impl_ac_direct_declarator_AcOperatorDeclId::subphylum(int no) const { switch(no){ case 0: return ac_operator_name_1; } return 0; } abstract_phylum impl_ac_direct_declarator_AcConvOperatorDecl::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return ID_2; } return 0; } abstract_phylum impl_ac_direct_declarator_AcMemberDecl::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return ID_2; case 2: return ac_constant_expression_list_1; } return 0; } abstract_phylum impl_ac_direct_declarator_AcQualifiedDeclProto::subphylum(int no) const { switch(no){ case 0: return ac_class_qualifier_list_1; case 1: return ac_direct_declarator_1; case 2: return ac_parameter_type_list_1; case 3: return ac_type_qualifier_1; } return 0; } abstract_phylum impl_ac_direct_declarator_AcDirectDeclProto::subphylum(int no) const { switch(no){ case 0: return ac_direct_declarator_1; case 1: return ac_parameter_type_list_1; } return 0; } abstract_phylum impl_ac_direct_declarator_AcDirectDeclArray::subphylum(int no) const { switch(no){ case 0: return ac_direct_declarator_1; case 1: return ac_constant_expression_option_1; } return 0; } abstract_phylum impl_ac_direct_declarator_AcDirectDeclPack::subphylum(int no) const { switch(no){ case 0: return ac_declarator_1; } return 0; } abstract_phylum impl_ac_direct_declarator_AcDirectDeclId::subphylum(int no) const { switch(no){ case 0: return ID_1; } return 0; } abstract_phylum impl_ac_declarator_AcDeclarator::subphylum(int no) const { switch(no){ case 0: return ac_pointer_option_1; case 1: return ac_ref_option_1; case 2: return ac_direct_declarator_1; } return 0; } abstract_phylum impl_ac_init_declarator_AcInitDecl::subphylum(int no) const { switch(no){ case 0: return ac_declarator_1; } return 0; } abstract_phylum impl_ac_init_declarator_list::subphylum(int no) const { switch(no){ case 0: return ac_init_declarator_1; case 1: return ac_init_declarator_list_1; } return 0; } abstract_phylum impl_ac_type_specifier_AcTypeSpec::subphylum(int no) const { switch(no){ case 0: return ID_1; } return 0; } abstract_phylum impl_ac_declaration_specifier_AcDeclSpecTypeQual::subphylum(int no) const { switch(no){ case 0: return ac_type_qualifier_1; } return 0; } abstract_phylum impl_ac_declaration_specifier_AcDeclSpecTypeSpec::subphylum(int no) const { switch(no){ case 0: return ac_type_specifier_1; } return 0; } abstract_phylum impl_ac_declaration_specifier_AcDeclSpecStorageSpec::subphylum(int no) const { switch(no){ case 0: return ac_storage_class_specifier_1; } return 0; } abstract_phylum impl_ac_declaration_specifiers::subphylum(int no) const { switch(no){ case 0: return ac_declaration_specifier_1; case 1: return ac_declaration_specifiers_1; } return 0; } abstract_phylum impl_ac_declaration_list::subphylum(int no) const { switch(no){ case 0: return ac_declaration_1; case 1: return ac_declaration_list_1; } return 0; } abstract_phylum impl_ac_declaration_AcDeclaration::subphylum(int no) const { switch(no){ case 0: return ac_declaration_specifiers_1; case 1: return ac_init_declarator_list_1; } return 0; } abstract_phylum impl_unparsedeclinfo_Unparsedeclinfo::subphylum(int no) const { switch(no){ case 0: return patternrepresentation_1; case 1: return patternrepresentation_2; case 2: return unparseclause_1; } return 0; } abstract_phylum impl_unparsedeclsinfo::subphylum(int no) const { switch(no){ case 0: return unparsedeclinfo_1; case 1: return unparsedeclsinfo_1; } return 0; } abstract_phylum impl_unparseviewinfo_Unparseviewinfo::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return unparsedeclsinfo_1; } return 0; } abstract_phylum impl_unparseviewsinfo::subphylum(int no) const { switch(no){ case 0: return unparseviewinfo_1; case 1: return unparseviewsinfo_1; } return 0; } abstract_phylum impl_rewriteviewinfo_Rewriteviewinfo::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return rewriterulesinfo_1; } return 0; } abstract_phylum impl_rewriteviewsinfo::subphylum(int no) const { switch(no){ case 0: return rewriteviewinfo_1; case 1: return rewriteviewsinfo_1; } return 0; } abstract_phylum impl_withcaseinfo_Withcaseinfo::subphylum(int no) const { switch(no){ case 0: return patternrepresentation_1; case 1: return patternrepresentation_2; case 2: return Ctext_1; } return 0; } abstract_phylum impl_withcasesinfo::subphylum(int no) const { switch(no){ case 0: return withcaseinfo_1; case 1: return withcasesinfo_1; } return 0; } abstract_phylum impl_rewriteruleinfo_Rewriteruleinfo::subphylum(int no) const { switch(no){ case 0: return patternrepresentation_1; case 1: return patternrepresentation_2; case 2: return rewriteclause_1; } return 0; } abstract_phylum impl_rewriterulesinfo::subphylum(int no) const { switch(no){ case 0: return rewriteruleinfo_1; case 1: return rewriterulesinfo_1; } return 0; } abstract_phylum impl_argsnumbers::subphylum(int no) const { switch(no){ case 0: return integer_1; case 1: return argsnumbers_1; } return 0; } abstract_phylum impl_paths::subphylum(int no) const { switch(no){ case 0: return path_1; case 1: return paths_1; } return 0; } abstract_phylum impl_path::subphylum(int no) const { switch(no){ case 0: return integer_1; case 1: return path_1; } return 0; } abstract_phylum impl_elem_patternrepresentation_PRIntLiteral::subphylum(int no) const { switch(no){ case 0: return path_1; case 1: return INT_1; } return 0; } abstract_phylum impl_elem_patternrepresentation_PRStringLiteral::subphylum(int no) const { switch(no){ case 0: return path_1; case 1: return CexpressionDQ_1; } return 0; } abstract_phylum impl_elem_patternrepresentation_PRWildcard::subphylum(int no) const { switch(no){ case 0: return path_1; } return 0; } abstract_phylum impl_elem_patternrepresentation_PRNonLeafBinding::subphylum(int no) const { switch(no){ case 0: return path_1; case 1: return ID_1; case 2: return patternrepresentation_1; } return 0; } abstract_phylum impl_elem_patternrepresentation_PRUserPredicate::subphylum(int no) const { switch(no){ case 0: return Cexpression_1; } return 0; } abstract_phylum impl_elem_patternrepresentation_PROperPredicate::subphylum(int no) const { switch(no){ case 0: return path_1; case 1: return ID_1; } return 0; } abstract_phylum impl_elem_patternrepresentation_PRVarPredicate::subphylum(int no) const { switch(no){ case 0: return paths_1; case 1: return ID_1; case 2: return patternrepresentation_1; } return 0; } abstract_phylum impl_elem_patternrepresentation_PRBinding::subphylum(int no) const { switch(no){ case 0: return path_1; case 1: return ID_1; } return 0; } abstract_phylum impl_patternrepresentation::subphylum(int no) const { switch(no){ case 0: return elem_patternrepresentation_1; case 1: return patternrepresentation_1; } return 0; } abstract_phylum impl_patternrepresentations::subphylum(int no) const { switch(no){ case 0: return patternrepresentation_1; case 1: return patternrepresentations_1; } return 0; } abstract_phylum impl_variables::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return variables_1; } return 0; } abstract_phylum impl_phyla::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return phyla_1; } return 0; } abstract_phylum impl_operators::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return operators_1; } return 0; } abstract_phylum impl_IDtype_ITLanguageName::subphylum(int no) const { switch(no){ case 0: return integer_1; } return 0; } abstract_phylum impl_IDtype_ITPatternVariable::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return integer_1; } return 0; } abstract_phylum impl_IDtype_ITUserFunction::subphylum(int no) const { switch(no){ case 0: return fnclass_1; } return 0; } abstract_phylum impl_IDtype_ITUserOperator::subphylum(int no) const { switch(no){ case 0: return alternative_1; case 1: return ID_1; } return 0; } abstract_phylum impl_IDtype_ITPredefinedOperator::subphylum(int no) const { switch(no){ case 0: return alternative_1; case 1: return ID_1; } return 0; } abstract_phylum impl_IDtype_ITUserPhylum::subphylum(int no) const { switch(no){ case 0: return phylumdeclaration_1; } return 0; } abstract_phylum impl_IDtype_ITPredefinedPhylum::subphylum(int no) const { switch(no){ case 0: return phylumdeclaration_1; } return 0; } abstract_phylum impl_scopetypefileline_ScopeTypeFileLine::subphylum(int no) const { switch(no){ case 0: return integer_1; case 1: return IDtype_1; case 2: return casestring_1; case 3: return integer_2; } return 0; } abstract_phylum impl_scopetypefilelinestack::subphylum(int no) const { switch(no){ case 0: return scopetypefileline_1; case 1: return scopetypefilelinestack_1; } return 0; } abstract_phylum impl_languagenames::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return languagenames_1; } return 0; } abstract_phylum impl_languageoption_LanguageList::subphylum(int no) const { switch(no){ case 0: return languagenames_1; } return 0; } abstract_phylum impl_viewnameoption_YesViewname::subphylum(int no) const { switch(no){ case 0: return ID_1; } return 0; } abstract_phylum impl_unpattributes::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return unpattributes_1; } return 0; } abstract_phylum impl_unpsubterm_UnpCastedVariable::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return ID_2; } return 0; } abstract_phylum impl_unpsubterm_UnpDollarvarAttr::subphylum(int no) const { switch(no){ case 0: return INT_1; case 1: return unpattributes_1; } return 0; } abstract_phylum impl_unpsubterm_UnpSubAttr::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return unpattributes_1; } return 0; } abstract_phylum impl_unpsubterm_UnpDollarvarTerm::subphylum(int no) const { switch(no){ case 0: return INT_1; } return 0; } abstract_phylum impl_unpsubterm_UnpSubTerm::subphylum(int no) const { switch(no){ case 0: return ID_1; } return 0; } abstract_phylum impl_unparseitem_UViewVarDecl::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return ID_2; case 2: return Cexpression_1; } return 0; } abstract_phylum impl_unparseitem_UnpBody::subphylum(int no) const { switch(no){ case 0: return languageoption_1; case 1: return unparseitems_1; } return 0; } abstract_phylum impl_unparseitem_UnpCtext::subphylum(int no) const { switch(no){ case 0: return languageoption_1; case 1: return Ctext_1; } return 0; } abstract_phylum impl_unparseitem_UnpSubexpr::subphylum(int no) const { switch(no){ case 0: return languageoption_1; case 1: return unpsubterm_1; case 2: return viewnameoption_1; } return 0; } abstract_phylum impl_unparseitem_UnpStr::subphylum(int no) const { switch(no){ case 0: return languageoption_1; case 1: return CexpressionDQ_1; case 2: return viewnameoption_1; } return 0; } abstract_phylum impl_unparseitems::subphylum(int no) const { switch(no){ case 0: return unparseitem_1; case 1: return unparseitems_1; } return 0; } abstract_phylum impl_viewnames::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return viewnames_1; } return 0; } abstract_phylum impl_unparseclause_UnparseClause::subphylum(int no) const { switch(no){ case 0: return viewnames_1; case 1: return unparseitems_1; } return 0; } abstract_phylum impl_unparseclauses::subphylum(int no) const { switch(no){ case 0: return unparseclause_1; case 1: return unparseclauses_1; } return 0; } abstract_phylum impl_unparsedeclaration_UnparseDeclaration::subphylum(int no) const { switch(no){ case 0: return outmostpatterns_1; case 1: return unparseclauses_1; } return 0; } abstract_phylum impl_unparsedeclarations::subphylum(int no) const { switch(no){ case 0: return unparsedeclaration_1; case 1: return unparsedeclarations_1; } return 0; } abstract_phylum impl_withcase_Withcase::subphylum(int no) const { switch(no){ case 0: return patternchains_1; case 1: return Ctext_1; } return 0; } abstract_phylum impl_withcases::subphylum(int no) const { switch(no){ case 0: return withcase_1; case 1: return withcases_1; } return 0; } abstract_phylum impl_withexpression_WECexpression::subphylum(int no) const { switch(no){ case 0: return Cexpression_1; } return 0; } abstract_phylum impl_withexpression_WEVariable::subphylum(int no) const { switch(no){ case 0: return ID_1; } return 0; } abstract_phylum impl_withexpressions::subphylum(int no) const { switch(no){ case 0: return withexpression_1; case 1: return withexpressions_1; } return 0; } abstract_phylum impl_contextinfo_InForeachContext::subphylum(int no) const { switch(no){ case 0: return patternchain_1; } return 0; } abstract_phylum impl_foreach_after_ForeachAfter::subphylum(int no) const { switch(no){ case 0: return patternchain_1; case 1: return idCexpressions_1; case 2: return withexpressions_1; case 3: return Ctext_1; } return 0; } abstract_phylum impl_Ctext_elem_CTextWithexpression::subphylum(int no) const { switch(no){ case 0: return withexpressions_1; case 1: return withcases_1; case 2: return contextinfo_1; } return 0; } abstract_phylum impl_Ctext_elem_CTextForeachexpression::subphylum(int no) const { switch(no){ case 0: return patternchain_1; case 1: return idCexpressions_1; case 2: return withexpressions_1; case 3: return Ctext_1; case 4: return foreach_after_1; } return 0; } abstract_phylum impl_Ctext_elem_CTextCbody::subphylum(int no) const { switch(no){ case 0: return Ctext_1; } return 0; } abstract_phylum impl_Ctext_elem_CTextCexpressionSQ::subphylum(int no) const { switch(no){ case 0: return CexpressionSQ_1; } return 0; } abstract_phylum impl_Ctext_elem_CTextCexpressionDQ::subphylum(int no) const { switch(no){ case 0: return CexpressionDQ_1; } return 0; } abstract_phylum impl_Ctext_elem_CTextNl::subphylum(int no) const { switch(no){ case 0: return integer_1; } return 0; } abstract_phylum impl_Ctext_elem_CTextDollarVar::subphylum(int no) const { switch(no){ case 0: return INT_1; } return 0; } abstract_phylum impl_Ctext_elem_CTextLine::subphylum(int no) const { switch(no){ case 0: return casestring_1; } return 0; } abstract_phylum impl_Ctext::subphylum(int no) const { switch(no){ case 0: return Ctext_elem_1; case 1: return Ctext_1; } return 0; } abstract_phylum impl_fnclass_StaticFn::subphylum(int no) const { switch(no){ case 0: return casestring_1; } return 0; } abstract_phylum impl_fndeclaration_AcMemberDeclaration::subphylum(int no) const { switch(no){ case 0: return ac_declaration_specifiers_1; case 1: return ac_declarator_1; case 2: return ac_constant_expression_option_1; case 3: return fnclass_1; } return 0; } abstract_phylum impl_fndeclaration_FnAcDeclaration::subphylum(int no) const { switch(no){ case 0: return ac_declaration_specifiers_1; case 1: return ac_declarator_1; case 2: return ac_declaration_list_1; case 3: return ac_opt_base_init_list_1; case 4: return Ctext_1; case 5: return ID_1; case 6: return fnclass_1; } return 0; } abstract_phylum impl_fndeclarations::subphylum(int no) const { switch(no){ case 0: return fndeclaration_1; case 1: return fndeclarations_1; } return 0; } abstract_phylum impl_fnfile_FnFile::subphylum(int no) const { switch(no){ case 0: return casestring_1; } return 0; } abstract_phylum impl_fnfiles::subphylum(int no) const { switch(no){ case 0: return fnfile_1; case 1: return fnfiles_1; } return 0; } abstract_phylum impl_terms::subphylum(int no) const { switch(no){ case 0: return term_1; case 1: return terms_1; } return 0; } abstract_phylum impl_term_TIntLiteral::subphylum(int no) const { switch(no){ case 0: return INT_1; } return 0; } abstract_phylum impl_term_TStringLiteral::subphylum(int no) const { switch(no){ case 0: return CexpressionDQ_1; } return 0; } abstract_phylum impl_term_TCTerm::subphylum(int no) const { switch(no){ case 0: return CexpressionSQ_1; } return 0; } abstract_phylum impl_term_TMemberVarDot::subphylum(int no) const { switch(no){ case 0: return term_1; case 1: return ID_1; } return 0; } abstract_phylum impl_term_TMemberVar::subphylum(int no) const { switch(no){ case 0: return term_1; case 1: return ID_1; } return 0; } abstract_phylum impl_term_TMethodDot::subphylum(int no) const { switch(no){ case 0: return term_1; case 1: return ID_1; case 2: return terms_1; } return 0; } abstract_phylum impl_term_TMethod::subphylum(int no) const { switch(no){ case 0: return term_1; case 1: return ID_1; case 2: return terms_1; } return 0; } abstract_phylum impl_term_TOperator::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return terms_1; } return 0; } abstract_phylum impl_term_TVariable::subphylum(int no) const { switch(no){ case 0: return ID_1; } return 0; } abstract_phylum impl_patterns::subphylum(int no) const { switch(no){ case 0: return pattern_1; case 1: return patterns_1; } return 0; } abstract_phylum impl_pattern_PIntLiteral::subphylum(int no) const { switch(no){ case 0: return INT_1; } return 0; } abstract_phylum impl_pattern_PStringLiteral::subphylum(int no) const { switch(no){ case 0: return CexpressionDQ_1; } return 0; } abstract_phylum impl_pattern_PNonLeafVariable::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return pattern_1; } return 0; } abstract_phylum impl_pattern_POperator::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return patterns_1; } return 0; } abstract_phylum impl_pattern_PVariable::subphylum(int no) const { switch(no){ case 0: return ID_1; } return 0; } abstract_phylum impl_outmostpattern_OPDefault::subphylum(int no) const { switch(no){ case 0: return Cexpression_1; } return 0; } abstract_phylum impl_outmostpattern_OPWildcard::subphylum(int no) const { switch(no){ case 0: return Cexpression_1; } return 0; } abstract_phylum impl_outmostpattern_OPNonLeafVariable::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return outmostpattern_1; } return 0; } abstract_phylum impl_outmostpattern_OPOperator::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return patterns_1; case 2: return Cexpression_1; } return 0; } abstract_phylum impl_outmostpattern_OPOperatorWildcard::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return Cexpression_1; } return 0; } abstract_phylum impl_patternchainitem_PatternchainitemDollarid::subphylum(int no) const { switch(no){ case 0: return ID_1; } return 0; } abstract_phylum impl_patternchainitem_PatternchainitemGroup::subphylum(int no) const { switch(no){ case 0: return patternchains_1; } return 0; } abstract_phylum impl_patternchainitem_PatternchainitemOutmost::subphylum(int no) const { switch(no){ case 0: return outmostpattern_1; } return 0; } abstract_phylum impl_outmostpatterns::subphylum(int no) const { switch(no){ case 0: return outmostpattern_1; case 1: return outmostpatterns_1; } return 0; } abstract_phylum impl_patternchain::subphylum(int no) const { switch(no){ case 0: return patternchainitem_1; case 1: return patternchain_1; } return 0; } abstract_phylum impl_patternchains::subphylum(int no) const { switch(no){ case 0: return patternchain_1; case 1: return patternchains_1; } return 0; } abstract_phylum impl_rewriteclause_RewriteClause::subphylum(int no) const { switch(no){ case 0: return viewnames_1; case 1: return term_1; } return 0; } abstract_phylum impl_rewriteclauses::subphylum(int no) const { switch(no){ case 0: return rewriteclause_1; case 1: return rewriteclauses_1; } return 0; } abstract_phylum impl_rwdeclaration_RwDeclaration::subphylum(int no) const { switch(no){ case 0: return outmostpatterns_1; case 1: return rewriteclauses_1; } return 0; } abstract_phylum impl_rwdeclarations::subphylum(int no) const { switch(no){ case 0: return rwdeclaration_1; case 1: return rwdeclarations_1; } return 0; } abstract_phylum impl_includedeclaration_IncludeDeclaration::subphylum(int no) const { switch(no){ case 0: return casestring_1; } return 0; } abstract_phylum impl_includedeclarations::subphylum(int no) const { switch(no){ case 0: return includedeclaration_1; case 1: return includedeclarations_1; } return 0; } abstract_phylum impl_includefile_IncludeFile::subphylum(int no) const { switch(no){ case 0: return casestring_1; } return 0; } abstract_phylum impl_includefiles::subphylum(int no) const { switch(no){ case 0: return includefile_1; case 1: return includefiles_1; } return 0; } abstract_phylum impl_Ctexts::subphylum(int no) const { switch(no){ case 0: return Ctext_1; case 1: return Ctexts_1; } return 0; } abstract_phylum impl_idCexpression_IdCexpression::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return Cexpression_1; } return 0; } abstract_phylum impl_idCexpressions::subphylum(int no) const { switch(no){ case 0: return idCexpression_1; case 1: return idCexpressions_1; } return 0; } abstract_phylum impl_CexpressionSQ_elem_CExpressionSQPart::subphylum(int no) const { switch(no){ case 0: return casestring_1; } return 0; } abstract_phylum impl_CexpressionSQ::subphylum(int no) const { switch(no){ case 0: return CexpressionSQ_elem_1; case 1: return CexpressionSQ_1; } return 0; } abstract_phylum impl_CexpressionDQ_elem_CExpressionDQPart::subphylum(int no) const { switch(no){ case 0: return casestring_1; } return 0; } abstract_phylum impl_CexpressionDQ::subphylum(int no) const { switch(no){ case 0: return CexpressionDQ_elem_1; case 1: return CexpressionDQ_1; } return 0; } abstract_phylum impl_Cexpression_elem_CExpressionArray::subphylum(int no) const { switch(no){ case 0: return Cexpression_1; } return 0; } abstract_phylum impl_Cexpression_elem_CExpressionPack::subphylum(int no) const { switch(no){ case 0: return Cexpression_1; } return 0; } abstract_phylum impl_Cexpression_elem_CExpressionSQ::subphylum(int no) const { switch(no){ case 0: return CexpressionSQ_1; } return 0; } abstract_phylum impl_Cexpression_elem_CExpressionDQ::subphylum(int no) const { switch(no){ case 0: return CexpressionDQ_1; } return 0; } abstract_phylum impl_Cexpression_elem_CExpressionDollarvar::subphylum(int no) const { switch(no){ case 0: return INT_1; } return 0; } abstract_phylum impl_Cexpression_elem_CExpressionPart::subphylum(int no) const { switch(no){ case 0: return casestring_1; } return 0; } abstract_phylum impl_Cexpression::subphylum(int no) const { switch(no){ case 0: return Cexpression_elem_1; case 1: return Cexpression_1; } return 0; } abstract_phylum impl_attribute_initialisation_option_Yesattribute_initialisation::subphylum(int no) const { switch(no){ case 0: return Cexpression_1; } return 0; } abstract_phylum impl_attribute_Attribute::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return ID_2; case 2: return attribute_initialisation_option_1; } return 0; } abstract_phylum impl_attributes::subphylum(int no) const { switch(no){ case 0: return attribute_1; case 1: return attributes_1; } return 0; } abstract_phylum impl_Ccode_option_CcodeOption::subphylum(int no) const { switch(no){ case 0: return attributes_1; case 1: return Ctexts_1; } return 0; } abstract_phylum impl_argument_Argument::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return integer_1; } return 0; } abstract_phylum impl_arguments::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return arguments_1; } return 0; } abstract_phylum impl_alternative_Alternative::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return arguments_1; } return 0; } abstract_phylum impl_alternatives::subphylum(int no) const { switch(no){ case 0: return alternative_1; case 1: return alternatives_1; } return 0; } abstract_phylum impl_productionblock_PredefinedAlternatives::subphylum(int no) const { switch(no){ case 0: return alternatives_1; } return 0; } abstract_phylum impl_productionblock_NonlistAlternatives::subphylum(int no) const { switch(no){ case 0: return alternatives_1; } return 0; } abstract_phylum impl_productionblock_ListAlternatives::subphylum(int no) const { switch(no){ case 0: return alternatives_1; case 1: return ID_1; } return 0; } abstract_phylum impl_storageclasses::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return storageclasses_1; } return 0; } abstract_phylum impl_storageoption_PositiveStorageOption::subphylum(int no) const { switch(no){ case 0: return ID_1; } return 0; } abstract_phylum impl_storageoption_NegativeStorageOption::subphylum(int no) const { switch(no){ case 0: return ID_1; } return 0; } abstract_phylum impl_phylumdeclaration_PhylumDeclaration::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return storageoption_1; case 2: return productionblock_1; case 3: return Ccode_option_1; } return 0; } abstract_phylum impl_phylumnames::subphylum(int no) const { switch(no){ case 0: return ID_1; case 1: return phylumnames_1; } return 0; } abstract_phylum impl_phylumdeclarations::subphylum(int no) const { switch(no){ case 0: return phylumdeclaration_1; case 1: return phylumdeclarations_1; } return 0; } abstract_phylum impl_phylumdeclarationsroot_PhylumDeclarations::subphylum(int no) const { switch(no){ case 0: return phylumdeclarations_1; } return 0; } abstract_phylum impl_STRING_String::subphylum(int no) const { switch(no){ case 0: return casestring_1; } return 0; } abstract_phylum impl_INT_Int::subphylum(int no) const { switch(no){ case 0: return integer_1; } return 0; } abstract_phylum impl_ID_Id::subphylum(int no) const { switch(no){ case 0: return uniqID_1; } return 0; } abstract_phylum impl_uniqID_Str::subphylum(int no) const { switch(no){ case 0: return casestring_1; } return 0; } void impl_bindingidmark_BindingIdMark::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = uniqID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_bindingidmarks::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = bindingidmark_1 = dynamic_cast(val);break; case 1: newval = bindingidmarks_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_countedphylumdeclaration_CountedPhylumdeclaration::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = uniqID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_countedphylumdeclarations::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = countedphylumdeclaration_1 = dynamic_cast(val);break; case 1: newval = countedphylumdeclarations_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_addedphylumdeclaration_AddedPhylumdeclaration::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = uniqID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_addedphylumdeclarations::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = addedphylumdeclaration_1 = dynamic_cast(val);break; case 1: newval = addedphylumdeclarations_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem6::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = casestring_2 = dynamic_cast(val);break; case 2: newval = casestring_3 = dynamic_cast(val);break; case 3: newval = casestring_4 = dynamic_cast(val);break; case 4: newval = casestring_5 = dynamic_cast(val);break; case 5: newval = casestring_6 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem5::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = casestring_2 = dynamic_cast(val);break; case 2: newval = casestring_3 = dynamic_cast(val);break; case 3: newval = casestring_4 = dynamic_cast(val);break; case 4: newval = casestring_5 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem4::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = casestring_2 = dynamic_cast(val);break; case 2: newval = casestring_3 = dynamic_cast(val);break; case 3: newval = casestring_4 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem3int1::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = casestring_2 = dynamic_cast(val);break; case 2: newval = casestring_3 = dynamic_cast(val);break; case 3: newval = integer_1 = dynamic_cast(val);break; case 4: newval = casestring_4 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem3::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = casestring_2 = dynamic_cast(val);break; case 2: newval = casestring_3 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem2::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = casestring_2 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem1storageoption1ID::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = storageoption_1 = dynamic_cast(val);break; case 2: newval = casestring_2 = dynamic_cast(val);break; case 3: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem1INT1ID1ID::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = INT_1 = dynamic_cast(val);break; case 2: newval = casestring_2 = dynamic_cast(val);break; case 3: newval = ID_1 = dynamic_cast(val);break; case 4: newval = casestring_3 = dynamic_cast(val);break; case 5: newval = ID_2 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem1ID1ID1ID::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; case 2: newval = casestring_2 = dynamic_cast(val);break; case 3: newval = ID_2 = dynamic_cast(val);break; case 4: newval = casestring_3 = dynamic_cast(val);break; case 5: newval = ID_3 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem1INT1ID::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = INT_1 = dynamic_cast(val);break; case 2: newval = casestring_2 = dynamic_cast(val);break; case 3: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem1int1::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = integer_1 = dynamic_cast(val);break; case 2: newval = casestring_2 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem1INT::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = INT_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem1t1ID::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = IDtype_1 = dynamic_cast(val);break; case 2: newval = casestring_2 = dynamic_cast(val);break; case 3: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem1ID1ID::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; case 2: newval = casestring_2 = dynamic_cast(val);break; case 3: newval = ID_2 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem1we::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = withexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem1tID::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem1ID::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_problem_Problem1::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_error_Warning::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = fileline_1 = dynamic_cast(val);break; case 1: newval = problem_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_error_NonFatal::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = fileline_1 = dynamic_cast(val);break; case 1: newval = problem_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_error_Fatal::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = fileline_1 = dynamic_cast(val);break; case 1: newval = problem_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_baseclass_list::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = baseclass_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_baseclass_decl_BaseClassDecl::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = baseclass_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_baseclass_declarations::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = baseclass_decl_1 = dynamic_cast(val);break; case 1: newval = baseclass_declarations_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_base_init_AcBaseInit::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = ac_constant_expression_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_base_init_list::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_base_init_1 = dynamic_cast(val);break; case 1: newval = ac_base_init_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_opt_base_init_list_AcYesBaseInit::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_base_init_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_constant_expression_list::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_constant_expression_1 = dynamic_cast(val);break; case 1: newval = ac_constant_expression_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_constant_expression_AcConstExpr::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = Cexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_constant_expression_option_Yesac_constant_expression::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_constant_expression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_direct_abstract_declarator_AcDirAbsdeclFn::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_direct_abstract_declarator_option_1 = dynamic_cast(val);break; case 1: newval = ac_parameter_type_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_direct_abstract_declarator_AcDirAbsdeclArray::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_direct_abstract_declarator_option_1 = dynamic_cast(val);break; case 1: newval = ac_constant_expression_option_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_direct_abstract_declarator_AcDirAbsdeclPack::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_abstract_declarator_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_direct_abstract_declarator_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_abstract_declarator_AcAbsdeclDirdecl::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_pointer_option_1 = dynamic_cast(val);break; case 1: newval = ac_direct_abstract_declarator_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_abstract_declarator_AcAbsdeclPointer::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_pointer_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_identifier_list::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = ac_identifier_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_parameter_declaration_AcParDeclAbsdecl::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_declaration_specifiers_1 = dynamic_cast(val);break; case 1: newval = ac_abstract_declarator_1 = dynamic_cast(val);break; case 2: newval = ac_constant_expression_option_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_parameter_declaration_AcParDeclDecl::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_declaration_specifiers_1 = dynamic_cast(val);break; case 1: newval = ac_declarator_1 = dynamic_cast(val);break; case 2: newval = ac_constant_expression_option_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_parameter_list::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_parameter_declaration_1 = dynamic_cast(val);break; case 1: newval = ac_parameter_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_parameter_type_list_AcParList3Dot::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_parameter_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_parameter_type_list_AcParList::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_parameter_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_type_qualifier_list::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_type_qualifier_1 = dynamic_cast(val);break; case 1: newval = ac_type_qualifier_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_class_qualifier_list::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = ac_class_qualifier_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_class_qualifier_help_list::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_direct_declarator_1 = dynamic_cast(val);break; case 1: newval = ac_class_qualifier_help_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_operator_name_AcOperatorName::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_pointer_AcPointerCons::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_type_qualifier_list_1 = dynamic_cast(val);break; case 1: newval = ac_pointer_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_pointer_AcPointerNil::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_type_qualifier_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_pointer_option_Yespointer::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_pointer_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_direct_declarator_AcOperatorDeclId::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_operator_name_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_direct_declarator_AcConvOperatorDecl::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = ID_2 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_direct_declarator_AcMemberDecl::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = ID_2 = dynamic_cast(val);break; case 2: newval = ac_constant_expression_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_direct_declarator_AcQualifiedDeclProto::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_class_qualifier_list_1 = dynamic_cast(val);break; case 1: newval = ac_direct_declarator_1 = dynamic_cast(val);break; case 2: newval = ac_parameter_type_list_1 = dynamic_cast(val);break; case 3: newval = ac_type_qualifier_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_direct_declarator_AcDirectDeclProto::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_direct_declarator_1 = dynamic_cast(val);break; case 1: newval = ac_parameter_type_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_direct_declarator_AcDirectDeclArray::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_direct_declarator_1 = dynamic_cast(val);break; case 1: newval = ac_constant_expression_option_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_direct_declarator_AcDirectDeclPack::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_declarator_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_direct_declarator_AcDirectDeclId::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_declarator_AcDeclarator::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_pointer_option_1 = dynamic_cast(val);break; case 1: newval = ac_ref_option_1 = dynamic_cast(val);break; case 2: newval = ac_direct_declarator_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_init_declarator_AcInitDecl::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_declarator_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_init_declarator_list::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_init_declarator_1 = dynamic_cast(val);break; case 1: newval = ac_init_declarator_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_type_specifier_AcTypeSpec::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_declaration_specifier_AcDeclSpecTypeQual::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_type_qualifier_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_declaration_specifier_AcDeclSpecTypeSpec::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_type_specifier_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_declaration_specifier_AcDeclSpecStorageSpec::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_storage_class_specifier_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_declaration_specifiers::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_declaration_specifier_1 = dynamic_cast(val);break; case 1: newval = ac_declaration_specifiers_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_declaration_list::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_declaration_1 = dynamic_cast(val);break; case 1: newval = ac_declaration_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ac_declaration_AcDeclaration::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_declaration_specifiers_1 = dynamic_cast(val);break; case 1: newval = ac_init_declarator_list_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparsedeclinfo_Unparsedeclinfo::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = patternrepresentation_1 = dynamic_cast(val);break; case 1: newval = patternrepresentation_2 = dynamic_cast(val);break; case 2: newval = unparseclause_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparsedeclsinfo::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = unparsedeclinfo_1 = dynamic_cast(val);break; case 1: newval = unparsedeclsinfo_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparseviewinfo_Unparseviewinfo::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = unparsedeclsinfo_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparseviewsinfo::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = unparseviewinfo_1 = dynamic_cast(val);break; case 1: newval = unparseviewsinfo_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_rewriteviewinfo_Rewriteviewinfo::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = rewriterulesinfo_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_rewriteviewsinfo::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = rewriteviewinfo_1 = dynamic_cast(val);break; case 1: newval = rewriteviewsinfo_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_withcaseinfo_Withcaseinfo::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = patternrepresentation_1 = dynamic_cast(val);break; case 1: newval = patternrepresentation_2 = dynamic_cast(val);break; case 2: newval = Ctext_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_withcasesinfo::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = withcaseinfo_1 = dynamic_cast(val);break; case 1: newval = withcasesinfo_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_rewriteruleinfo_Rewriteruleinfo::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = patternrepresentation_1 = dynamic_cast(val);break; case 1: newval = patternrepresentation_2 = dynamic_cast(val);break; case 2: newval = rewriteclause_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_rewriterulesinfo::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = rewriteruleinfo_1 = dynamic_cast(val);break; case 1: newval = rewriterulesinfo_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_argsnumbers::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = integer_1 = dynamic_cast(val);break; case 1: newval = argsnumbers_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_paths::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = path_1 = dynamic_cast(val);break; case 1: newval = paths_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_path::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = integer_1 = dynamic_cast(val);break; case 1: newval = path_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_elem_patternrepresentation_PRIntLiteral::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = path_1 = dynamic_cast(val);break; case 1: newval = INT_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_elem_patternrepresentation_PRStringLiteral::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = path_1 = dynamic_cast(val);break; case 1: newval = CexpressionDQ_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_elem_patternrepresentation_PRWildcard::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = path_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_elem_patternrepresentation_PRNonLeafBinding::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = path_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; case 2: newval = patternrepresentation_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_elem_patternrepresentation_PRUserPredicate::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = Cexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_elem_patternrepresentation_PROperPredicate::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = path_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_elem_patternrepresentation_PRVarPredicate::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = paths_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; case 2: newval = patternrepresentation_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_elem_patternrepresentation_PRBinding::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = path_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_patternrepresentation::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = elem_patternrepresentation_1 = dynamic_cast(val);break; case 1: newval = patternrepresentation_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_patternrepresentations::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = patternrepresentation_1 = dynamic_cast(val);break; case 1: newval = patternrepresentations_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_variables::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = variables_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_phyla::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = phyla_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_operators::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = operators_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_IDtype_ITLanguageName::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = integer_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_IDtype_ITPatternVariable::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = integer_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_IDtype_ITUserFunction::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = fnclass_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_IDtype_ITUserOperator::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = alternative_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_IDtype_ITPredefinedOperator::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = alternative_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_IDtype_ITUserPhylum::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = phylumdeclaration_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_IDtype_ITPredefinedPhylum::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = phylumdeclaration_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_scopetypefileline_ScopeTypeFileLine::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = integer_1 = dynamic_cast(val);break; case 1: newval = IDtype_1 = dynamic_cast(val);break; case 2: newval = casestring_1 = dynamic_cast(val);break; case 3: newval = integer_2 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_scopetypefilelinestack::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = scopetypefileline_1 = dynamic_cast(val);break; case 1: newval = scopetypefilelinestack_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_languagenames::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = languagenames_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_languageoption_LanguageList::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = languagenames_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_viewnameoption_YesViewname::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unpattributes::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = unpattributes_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unpsubterm_UnpCastedVariable::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = ID_2 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unpsubterm_UnpDollarvarAttr::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = INT_1 = dynamic_cast(val);break; case 1: newval = unpattributes_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unpsubterm_UnpSubAttr::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = unpattributes_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unpsubterm_UnpDollarvarTerm::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = INT_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unpsubterm_UnpSubTerm::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparseitem_UViewVarDecl::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = ID_2 = dynamic_cast(val);break; case 2: newval = Cexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparseitem_UnpBody::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = languageoption_1 = dynamic_cast(val);break; case 1: newval = unparseitems_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparseitem_UnpCtext::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = languageoption_1 = dynamic_cast(val);break; case 1: newval = Ctext_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparseitem_UnpSubexpr::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = languageoption_1 = dynamic_cast(val);break; case 1: newval = unpsubterm_1 = dynamic_cast(val);break; case 2: newval = viewnameoption_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparseitem_UnpStr::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = languageoption_1 = dynamic_cast(val);break; case 1: newval = CexpressionDQ_1 = dynamic_cast(val);break; case 2: newval = viewnameoption_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparseitems::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = unparseitem_1 = dynamic_cast(val);break; case 1: newval = unparseitems_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_viewnames::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = viewnames_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparseclause_UnparseClause::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = viewnames_1 = dynamic_cast(val);break; case 1: newval = unparseitems_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparseclauses::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = unparseclause_1 = dynamic_cast(val);break; case 1: newval = unparseclauses_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparsedeclaration_UnparseDeclaration::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = outmostpatterns_1 = dynamic_cast(val);break; case 1: newval = unparseclauses_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_unparsedeclarations::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = unparsedeclaration_1 = dynamic_cast(val);break; case 1: newval = unparsedeclarations_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_withcase_Withcase::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = patternchains_1 = dynamic_cast(val);break; case 1: newval = Ctext_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_withcases::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = withcase_1 = dynamic_cast(val);break; case 1: newval = withcases_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_withexpression_WECexpression::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = Cexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_withexpression_WEVariable::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_withexpressions::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = withexpression_1 = dynamic_cast(val);break; case 1: newval = withexpressions_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_contextinfo_InForeachContext::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = patternchain_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_foreach_after_ForeachAfter::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = patternchain_1 = dynamic_cast(val);break; case 1: newval = idCexpressions_1 = dynamic_cast(val);break; case 2: newval = withexpressions_1 = dynamic_cast(val);break; case 3: newval = Ctext_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Ctext_elem_CTextWithexpression::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = withexpressions_1 = dynamic_cast(val);break; case 1: newval = withcases_1 = dynamic_cast(val);break; case 2: newval = contextinfo_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Ctext_elem_CTextForeachexpression::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = patternchain_1 = dynamic_cast(val);break; case 1: newval = idCexpressions_1 = dynamic_cast(val);break; case 2: newval = withexpressions_1 = dynamic_cast(val);break; case 3: newval = Ctext_1 = dynamic_cast(val);break; case 4: newval = foreach_after_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Ctext_elem_CTextCbody::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = Ctext_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Ctext_elem_CTextCexpressionSQ::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = CexpressionSQ_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Ctext_elem_CTextCexpressionDQ::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = CexpressionDQ_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Ctext_elem_CTextNl::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = integer_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Ctext_elem_CTextDollarVar::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = INT_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Ctext_elem_CTextLine::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Ctext::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = Ctext_elem_1 = dynamic_cast(val);break; case 1: newval = Ctext_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_fnclass_StaticFn::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_fndeclaration_AcMemberDeclaration::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_declaration_specifiers_1 = dynamic_cast(val);break; case 1: newval = ac_declarator_1 = dynamic_cast(val);break; case 2: newval = ac_constant_expression_option_1 = dynamic_cast(val);break; case 3: newval = fnclass_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_fndeclaration_FnAcDeclaration::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ac_declaration_specifiers_1 = dynamic_cast(val);break; case 1: newval = ac_declarator_1 = dynamic_cast(val);break; case 2: newval = ac_declaration_list_1 = dynamic_cast(val);break; case 3: newval = ac_opt_base_init_list_1 = dynamic_cast(val);break; case 4: newval = Ctext_1 = dynamic_cast(val);break; case 5: newval = ID_1 = dynamic_cast(val);break; case 6: newval = fnclass_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_fndeclarations::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = fndeclaration_1 = dynamic_cast(val);break; case 1: newval = fndeclarations_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_fnfile_FnFile::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_fnfiles::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = fnfile_1 = dynamic_cast(val);break; case 1: newval = fnfiles_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_terms::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = term_1 = dynamic_cast(val);break; case 1: newval = terms_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_term_TIntLiteral::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = INT_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_term_TStringLiteral::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = CexpressionDQ_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_term_TCTerm::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = CexpressionSQ_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_term_TMemberVarDot::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = term_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_term_TMemberVar::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = term_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_term_TMethodDot::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = term_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; case 2: newval = terms_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_term_TMethod::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = term_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; case 2: newval = terms_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_term_TOperator::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = terms_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_term_TVariable::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_patterns::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = pattern_1 = dynamic_cast(val);break; case 1: newval = patterns_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_pattern_PIntLiteral::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = INT_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_pattern_PStringLiteral::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = CexpressionDQ_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_pattern_PNonLeafVariable::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = pattern_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_pattern_POperator::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = patterns_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_pattern_PVariable::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_outmostpattern_OPDefault::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = Cexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_outmostpattern_OPWildcard::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = Cexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_outmostpattern_OPNonLeafVariable::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = outmostpattern_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_outmostpattern_OPOperator::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = patterns_1 = dynamic_cast(val);break; case 2: newval = Cexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_outmostpattern_OPOperatorWildcard::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = Cexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_patternchainitem_PatternchainitemDollarid::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_patternchainitem_PatternchainitemGroup::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = patternchains_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_patternchainitem_PatternchainitemOutmost::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = outmostpattern_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_outmostpatterns::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = outmostpattern_1 = dynamic_cast(val);break; case 1: newval = outmostpatterns_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_patternchain::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = patternchainitem_1 = dynamic_cast(val);break; case 1: newval = patternchain_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_patternchains::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = patternchain_1 = dynamic_cast(val);break; case 1: newval = patternchains_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_rewriteclause_RewriteClause::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = viewnames_1 = dynamic_cast(val);break; case 1: newval = term_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_rewriteclauses::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = rewriteclause_1 = dynamic_cast(val);break; case 1: newval = rewriteclauses_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_rwdeclaration_RwDeclaration::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = outmostpatterns_1 = dynamic_cast(val);break; case 1: newval = rewriteclauses_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_rwdeclarations::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = rwdeclaration_1 = dynamic_cast(val);break; case 1: newval = rwdeclarations_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_includedeclaration_IncludeDeclaration::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_includedeclarations::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = includedeclaration_1 = dynamic_cast(val);break; case 1: newval = includedeclarations_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_includefile_IncludeFile::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_includefiles::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = includefile_1 = dynamic_cast(val);break; case 1: newval = includefiles_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Ctexts::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = Ctext_1 = dynamic_cast(val);break; case 1: newval = Ctexts_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_idCexpression_IdCexpression::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = Cexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_idCexpressions::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = idCexpression_1 = dynamic_cast(val);break; case 1: newval = idCexpressions_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_CexpressionSQ_elem_CExpressionSQPart::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_CexpressionSQ::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = CexpressionSQ_elem_1 = dynamic_cast(val);break; case 1: newval = CexpressionSQ_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_CexpressionDQ_elem_CExpressionDQPart::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_CexpressionDQ::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = CexpressionDQ_elem_1 = dynamic_cast(val);break; case 1: newval = CexpressionDQ_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Cexpression_elem_CExpressionArray::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = Cexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Cexpression_elem_CExpressionPack::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = Cexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Cexpression_elem_CExpressionSQ::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = CexpressionSQ_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Cexpression_elem_CExpressionDQ::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = CexpressionDQ_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Cexpression_elem_CExpressionDollarvar::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = INT_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Cexpression_elem_CExpressionPart::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Cexpression::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = Cexpression_elem_1 = dynamic_cast(val);break; case 1: newval = Cexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_attribute_initialisation_option_Yesattribute_initialisation::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = Cexpression_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_attribute_Attribute::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = ID_2 = dynamic_cast(val);break; case 2: newval = attribute_initialisation_option_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_attributes::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = attribute_1 = dynamic_cast(val);break; case 1: newval = attributes_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_Ccode_option_CcodeOption::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = attributes_1 = dynamic_cast(val);break; case 1: newval = Ctexts_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_argument_Argument::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = integer_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_arguments::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = arguments_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_alternative_Alternative::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = arguments_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_alternatives::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = alternative_1 = dynamic_cast(val);break; case 1: newval = alternatives_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_productionblock_PredefinedAlternatives::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = alternatives_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_productionblock_NonlistAlternatives::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = alternatives_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_productionblock_ListAlternatives::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = alternatives_1 = dynamic_cast(val);break; case 1: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_storageclasses::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = storageclasses_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_storageoption_PositiveStorageOption::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_storageoption_NegativeStorageOption::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_phylumdeclaration_PhylumDeclaration::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = storageoption_1 = dynamic_cast(val);break; case 2: newval = productionblock_1 = dynamic_cast(val);break; case 3: newval = Ccode_option_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_phylumnames::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = ID_1 = dynamic_cast(val);break; case 1: newval = phylumnames_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_phylumdeclarations::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = phylumdeclaration_1 = dynamic_cast(val);break; case 1: newval = phylumdeclarations_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_phylumdeclarationsroot_PhylumDeclarations::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = phylumdeclarations_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_STRING_String::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_INT_Int::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = integer_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_ID_Id::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = uniqID_1 = dynamic_cast(val);break; } assertNonNull(newval); } void impl_uniqID_Str::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = casestring_1 = dynamic_cast(val);break; } assertNonNull(newval); } void copy_attributes(enum_phyla copyPhy, c_abstract_phylum kc_p1, abstract_phylum kc_p2) { switch(copyPhy) { case phylum_uniqID: { c_uniqID p1 = dynamic_cast(kc_p1); uniqID p2 = dynamic_cast(kc_p2); p2->type = p1->type; p2->line = p1->line; p2->file = p1->file; p2->scopeinfo = p1->scopeinfo; break; } case phylum_ID: { c_ID p1 = dynamic_cast(kc_p1); ID p2 = dynamic_cast(kc_p2); p2->type = p1->type; p2->named_subphylum = p1->named_subphylum; p2->line = p1->line; p2->file = p1->file; break; } case phylum_INT: { c_INT p1 = dynamic_cast(kc_p1); INT p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; break; } case phylum_STRING: { c_STRING p1 = dynamic_cast(kc_p1); STRING p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; break; } case phylum_phylumdeclaration: { c_phylumdeclaration p1 = dynamic_cast(kc_p1); phylumdeclaration p2 = dynamic_cast(kc_p2); p2->marked = p1->marked; p2->additional_members = p1->additional_members; p2->base_classes = p1->base_classes; break; } case phylum_storageclasses: dynamic_cast(kc_p2)->phyla = dynamic_cast(kc_p1)->phyla; break; case phylum_alternative: { c_alternative p1 = dynamic_cast(kc_p1); alternative p2 = dynamic_cast(kc_p2); p2->rewriteinfo = p1->rewriteinfo; p2->unparseinfo = p1->unparseinfo; p2->additional_members = p1->additional_members; p2->base_classes = p1->base_classes; break; } case phylum_arguments: dynamic_cast(kc_p2)->seqnr = dynamic_cast(kc_p1)->seqnr; break; case phylum_Cexpression: { c_Cexpression p1 = dynamic_cast(kc_p1); Cexpression p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; break; } case phylum_idCexpression: dynamic_cast(kc_p2)->id = dynamic_cast(kc_p1)->id; break; case phylum_includefile: { c_includefile p1 = dynamic_cast(kc_p1); includefile p2 = dynamic_cast(kc_p2); p2->inc_type = p1->inc_type; p2->inc = p1->inc; break; } case phylum_includedeclaration: { c_includedeclaration p1 = dynamic_cast(kc_p1); includedeclaration p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; break; } case phylum_patternchains: { c_patternchains p1 = dynamic_cast(kc_p1); patternchains p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; break; } case phylum_patternchain: { c_patternchain p1 = dynamic_cast(kc_p1); patternchain p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; break; } case phylum_patternchainitem: { c_patternchainitem p1 = dynamic_cast(kc_p1); patternchainitem p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; p2->type = p1->type; break; } case phylum_outmostpattern: { c_outmostpattern p1 = dynamic_cast(kc_p1); outmostpattern p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; p2->type = p1->type; break; } case phylum_term: { c_term p1 = dynamic_cast(kc_p1); term p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; break; } case phylum_fnfile: dynamic_cast(kc_p2)->fns = dynamic_cast(kc_p1)->fns; break; case phylum_fndeclaration: { c_fndeclaration p1 = dynamic_cast(kc_p1); fndeclaration p2 = dynamic_cast(kc_p2); p2->sorted = p1->sorted; p2->last_line = p1->last_line; p2->file = p1->file; p2->is_attr = p1->is_attr; break; } case phylum_Ctext: { c_Ctext p1 = dynamic_cast(kc_p1); Ctext p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; break; } case phylum_Ctext_elem: { c_Ctext_elem p1 = dynamic_cast(kc_p1); Ctext_elem p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; break; } case phylum_foreach_after: { c_foreach_after p1 = dynamic_cast(kc_p1); foreach_after p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; break; } case phylum_withexpressions: { c_withexpressions p1 = dynamic_cast(kc_p1); withexpressions p2 = dynamic_cast(kc_p2); p2->type = p1->type; p2->line = p1->line; p2->file = p1->file; break; } case phylum_withexpression: { c_withexpression p1 = dynamic_cast(kc_p1); withexpression p2 = dynamic_cast(kc_p2); p2->type = p1->type; p2->line = p1->line; p2->file = p1->file; break; } case phylum_withcases: dynamic_cast(kc_p2)->wcinfo = dynamic_cast(kc_p1)->wcinfo; break; case phylum_withcase: dynamic_cast(kc_p2)->wcinfo = dynamic_cast(kc_p1)->wcinfo; break; case phylum_unparsedeclaration: dynamic_cast(kc_p2)->patternreps = dynamic_cast(kc_p1)->patternreps; break; case phylum_viewnames: dynamic_cast(kc_p2)->is_extern = dynamic_cast(kc_p1)->is_extern; break; case phylum_unparseitem: dynamic_cast(kc_p2)->text_nr = dynamic_cast(kc_p1)->text_nr; break; case phylum_fileline: { c_fileline p1 = dynamic_cast(kc_p1); fileline p2 = dynamic_cast(kc_p2); p2->file = p1->file; p2->line = p1->line; break; } case phylum_elem_patternrepresentation: { c_elem_patternrepresentation p1 = dynamic_cast(kc_p1); elem_patternrepresentation p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; p2->type = p1->type; break; } case phylum_path: { c_path p1 = dynamic_cast(kc_p1); path p2 = dynamic_cast(kc_p2); p2->op = p1->op; p2->id = p1->id; break; } case phylum_ac_operator_name: { c_ac_operator_name p1 = dynamic_cast(kc_p1); ac_operator_name p2 = dynamic_cast(kc_p2); p2->line = p1->line; p2->file = p1->file; break; } case phylum_addedphylumdeclaration: dynamic_cast(kc_p2)->added = dynamic_cast(kc_p1)->added; break; case phylum_countedphylumdeclaration: dynamic_cast(kc_p2)->count = dynamic_cast(kc_p1)->count; break; case phylum_charruns: dynamic_cast(kc_p2)->number = dynamic_cast(kc_p1)->number; break; case phylum_bindingidmark: dynamic_cast(kc_p2)->marked = dynamic_cast(kc_p1)->marked; break; case one_before_first_phylum: // just to avoid a warning about missing case if empty default: break; // it's alright, no attributes to copy } enum_operators copyOp=kc_p1->prod_sel(); for (int i=operator_info[copyOp].no_attrs-1; i>=0; --i) attributeOf(kc_p2, i)=attributeOf(const_cast(kc_p1), i); } KC_PHYLUM_INFO phylum_info[] = { { "", one_before_first_operator, one_before_first_operator, (kc_storageclass_t)0 }, /* dummy element */ { "nocasestring", sel_NoCaseStr, sel_NoCaseStr, uniq }, { "casestring", sel__Str, sel__Str, uniq }, { "real", sel__Real, sel__Real, uniq }, { "integer", sel__Int, sel__Int, uniq }, { "voidptr", sel__VoidPtr, sel__VoidPtr, uniq }, { "uniqID", sel_Str, sel_Str, uniq }, { "ID", sel_Id, sel_Id, kc_not_uniq }, { "INT", sel_Int, sel_Int, kc_not_uniq }, { "STRING", sel_String, sel_String, kc_not_uniq }, { "phylumdeclarationsroot", sel_PhylumDeclarations, sel_PhylumDeclarations, kc_not_uniq }, { "phylumdeclarations", sel_Nilphylumdeclarations, sel_Consphylumdeclarations, kc_not_uniq }, { "phylumnames", sel_Nilphylumnames, sel_Consphylumnames, kc_not_uniq }, { "phylumdeclaration", sel_PhylumDeclaration, sel_PhylumDeclaration, kc_not_uniq }, { "storageoption", sel_NoStorageOption, sel_PositiveStorageOption, kc_not_uniq }, { "storageclasses", sel_Nilstorageclasses, sel_Consstorageclasses, kc_not_uniq }, { "productionblock", sel_Emptyproductionblock, sel_PredefinedAlternatives, kc_not_uniq }, { "alternatives", sel_Nilalternatives, sel_Consalternatives, kc_not_uniq }, { "alternative", sel_Alternative, sel_Alternative, kc_not_uniq }, { "arguments", sel_Nilarguments, sel_Consarguments, kc_not_uniq }, { "argument", sel_Argument, sel_Argument, kc_not_uniq }, { "Ccode_option", sel_CcodeOption, sel_CcodeOption, kc_not_uniq }, { "attributes", sel_Nilattributes, sel_Consattributes, kc_not_uniq }, { "attribute", sel_Attribute, sel_Attribute, kc_not_uniq }, { "attribute_initialisation_option", sel_Noattribute_initialisation, sel_Yesattribute_initialisation, kc_not_uniq }, { "Cexpression", sel_NilCexpression, sel_ConsCexpression, kc_not_uniq }, { "Cexpression_elem", sel_CExpressionPart, sel_CExpressionArray, kc_not_uniq }, { "CexpressionDQ", sel_NilCexpressionDQ, sel_ConsCexpressionDQ, kc_not_uniq }, { "CexpressionDQ_elem", sel_CExpressionDQPart, sel_CExpressionDQNl, kc_not_uniq }, { "CexpressionSQ", sel_NilCexpressionSQ, sel_ConsCexpressionSQ, kc_not_uniq }, { "CexpressionSQ_elem", sel_CExpressionSQPart, sel_CExpressionSQNl, kc_not_uniq }, { "idCexpressions", sel_NilidCexpressions, sel_ConsidCexpressions, kc_not_uniq }, { "idCexpression", sel_IdCexpression, sel_IdCexpression, kc_not_uniq }, { "Ctexts", sel_NilCtexts, sel_ConsCtexts, kc_not_uniq }, { "includefiles", sel_Nilincludefiles, sel_Consincludefiles, kc_not_uniq }, { "includefile", sel_IncludeFile, sel_IncludeFile, uniq }, { "includedeclarations", sel_Nilincludedeclarations, sel_Consincludedeclarations, kc_not_uniq }, { "includedeclaration", sel_IncludeDeclaration, sel_IncludeDeclaration, kc_not_uniq }, { "rwdeclarations", sel_Nilrwdeclarations, sel_Consrwdeclarations, kc_not_uniq }, { "rwdeclaration", sel_RwDeclaration, sel_RwDeclaration, kc_not_uniq }, { "rewriteclauses", sel_Nilrewriteclauses, sel_Consrewriteclauses, kc_not_uniq }, { "rewriteclause", sel_RewriteClause, sel_RewriteClause, kc_not_uniq }, { "patternchains", sel_Nilpatternchains, sel_Conspatternchains, kc_not_uniq }, { "patternchain", sel_Nilpatternchain, sel_Conspatternchain, kc_not_uniq }, { "outmostpatterns", sel_Niloutmostpatterns, sel_Consoutmostpatterns, kc_not_uniq }, { "patternchainitem", sel_PatternchainitemOutmost, sel_PatternchainitemDollarid, kc_not_uniq }, { "outmostpattern", sel_OPOperatorWildcard, sel_OPDefault, kc_not_uniq }, { "pattern", sel_PVariable, sel_PIntLiteral, kc_not_uniq }, { "patterns", sel_Nilpatterns, sel_Conspatterns, kc_not_uniq }, { "term", sel_TVariable, sel_TIntLiteral, kc_not_uniq }, { "terms", sel_Nilterms, sel_Consterms, kc_not_uniq }, { "fnfiles", sel_Nilfnfiles, sel_Consfnfiles, kc_not_uniq }, { "fnfile", sel_FnFile, sel_FnFile, uniq }, { "fndeclarations", sel_Nilfndeclarations, sel_Consfndeclarations, kc_not_uniq }, { "fndeclaration", sel_FnAcDeclaration, sel_AcMemberDeclaration, kc_not_uniq }, { "fnclass", sel_GlobalFn, sel_ConvOperatorFn, kc_not_uniq }, { "Ctext", sel_NilCtext, sel_ConsCtext, kc_not_uniq }, { "Ctext_elem", sel_CTextLine, sel_CTextWithexpression, kc_not_uniq }, { "foreach_after", sel_NoForeachAfter, sel_ForeachAfter, kc_not_uniq }, { "contextinfo", sel_InForeachContext, sel_NotInForeachContext, kc_not_uniq }, { "withexpressions", sel_Nilwithexpressions, sel_Conswithexpressions, kc_not_uniq }, { "withexpression", sel_WEVariable, sel_WECexpression, kc_not_uniq }, { "withcases", sel_Nilwithcases, sel_Conswithcases, kc_not_uniq }, { "withcase", sel_Withcase, sel_Withcase, kc_not_uniq }, { "unparsedeclarations", sel_Nilunparsedeclarations, sel_Consunparsedeclarations, kc_not_uniq }, { "unparsedeclaration", sel_UnparseDeclaration, sel_UnparseDeclaration, kc_not_uniq }, { "unparseclauses", sel_Nilunparseclauses, sel_Consunparseclauses, kc_not_uniq }, { "unparseclause", sel_UnparseClause, sel_UnparseClause, kc_not_uniq }, { "viewnames", sel_Nilviewnames, sel_Consviewnames, kc_not_uniq }, { "unparseitems", sel_Nilunparseitems, sel_Consunparseitems, kc_not_uniq }, { "unparseitem", sel_UnpStr, sel_UViewVarDecl, kc_not_uniq }, { "unpsubterm", sel_UnpSubTerm, sel_UnpCastedVariable, kc_not_uniq }, { "unpattributes", sel_Nilunpattributes, sel_Consunpattributes, kc_not_uniq }, { "viewnameoption", sel_NoViewname, sel_YesViewname, kc_not_uniq }, { "languageoption", sel_NoLanguagename, sel_LanguageList, kc_not_uniq }, { "languagenames", sel_Nillanguagenames, sel_Conslanguagenames, kc_not_uniq }, { "fileline", sel_FileLine, sel_PosNoFileLine, kc_not_uniq }, { "scopetypefilelinestack", sel_Nilscopetypefilelinestack, sel_Consscopetypefilelinestack, kc_not_uniq }, { "scopetypefileline", sel_ScopeTypeFileLine, sel_ScopeTypeFileLine, kc_not_uniq }, { "IDtype", sel_ITUnknown, sel_ITLanguageName, kc_not_uniq }, { "operators", sel_Niloperators, sel_Consoperators, kc_not_uniq }, { "phyla", sel_Nilphyla, sel_Consphyla, kc_not_uniq }, { "variables", sel_Nilvariables, sel_Consvariables, kc_not_uniq }, { "dollarvarstatus", sel_DVAllowed, sel_DVDisallowed, kc_not_uniq }, { "tribool", sel_Equal, sel_Bigger, kc_not_uniq }, { "patternrepresentations", sel_Nilpatternrepresentations, sel_Conspatternrepresentations, kc_not_uniq }, { "patternrepresentation", sel_Nilpatternrepresentation, sel_Conspatternrepresentation, kc_not_uniq }, { "elem_patternrepresentation", sel_PRBinding, sel_PRIntLiteral, kc_not_uniq }, { "path", sel_Nilpath, sel_Conspath, kc_not_uniq }, { "paths", sel_Nilpaths, sel_Conspaths, kc_not_uniq }, { "argsnumbers", sel_Nilargsnumbers, sel_Consargsnumbers, kc_not_uniq }, { "rewriterulesinfo", sel_Nilrewriterulesinfo, sel_Consrewriterulesinfo, kc_not_uniq }, { "rewriteruleinfo", sel_Rewriteruleinfo, sel_Rewriteruleinfo, kc_not_uniq }, { "withcasesinfo", sel_Nilwithcasesinfo, sel_Conswithcasesinfo, kc_not_uniq }, { "withcaseinfo", sel_Withcaseinfo, sel_Withcaseinfo, kc_not_uniq }, { "rewriteviewsinfo", sel_Nilrewriteviewsinfo, sel_Consrewriteviewsinfo, kc_not_uniq }, { "rewriteviewinfo", sel_Rewriteviewinfo, sel_Rewriteviewinfo, kc_not_uniq }, { "unparseviewsinfo", sel_Nilunparseviewsinfo, sel_Consunparseviewsinfo, kc_not_uniq }, { "unparseviewinfo", sel_Unparseviewinfo, sel_Unparseviewinfo, kc_not_uniq }, { "unparsedeclsinfo", sel_Nilunparsedeclsinfo, sel_Consunparsedeclsinfo, kc_not_uniq }, { "unparsedeclinfo", sel_Unparsedeclinfo, sel_Unparsedeclinfo, kc_not_uniq }, { "ac_declaration", sel_AcDeclaration, sel_AcDeclaration, kc_not_uniq }, { "ac_declaration_list", sel_Nilac_declaration_list, sel_Consac_declaration_list, kc_not_uniq }, { "ac_declaration_specifiers", sel_Nilac_declaration_specifiers, sel_Consac_declaration_specifiers, kc_not_uniq }, { "ac_declaration_specifier", sel_AcDeclSpecStorageSpec, sel_AcDeclSpecTypeQual, kc_not_uniq }, { "ac_storage_class_specifier", sel_AcAuto, sel_AcVirtual, kc_not_uniq }, { "ac_type_specifier", sel_AcTypeSpec, sel_AcTypeSpec, kc_not_uniq }, { "ac_type_qualifier", sel_AcConst, sel_AcNoQualifier, kc_not_uniq }, { "ac_init_declarator_list", sel_Nilac_init_declarator_list, sel_Consac_init_declarator_list, kc_not_uniq }, { "ac_init_declarator", sel_AcInitDecl, sel_AcInitDecl, kc_not_uniq }, { "ac_declarator", sel_AcDeclarator, sel_AcDeclarator, kc_not_uniq }, { "ac_direct_declarator", sel_AcDirectDeclId, sel_AcOperatorDeclId, kc_not_uniq }, { "ac_pointer_option", sel_Nopointer, sel_Yespointer, kc_not_uniq }, { "ac_pointer", sel_AcPointerNil, sel_AcPointerCons, kc_not_uniq }, { "ac_ref_option", sel_AcNoRef, sel_AcRef, kc_not_uniq }, { "ac_operator_name", sel_AcOperatorName, sel_AcOperatorName, kc_not_uniq }, { "ac_class_qualifier_help_list", sel_Nilac_class_qualifier_help_list, sel_Consac_class_qualifier_help_list, kc_not_uniq }, { "ac_class_qualifier_list", sel_Nilac_class_qualifier_list, sel_Consac_class_qualifier_list, kc_not_uniq }, { "ac_type_qualifier_list", sel_Nilac_type_qualifier_list, sel_Consac_type_qualifier_list, kc_not_uniq }, { "ac_parameter_type_list", sel_AcParList, sel_AcParList3Dot, kc_not_uniq }, { "ac_parameter_list", sel_Nilac_parameter_list, sel_Consac_parameter_list, kc_not_uniq }, { "ac_parameter_declaration", sel_AcParDeclDecl, sel_AcParDeclAbsdecl, kc_not_uniq }, { "ac_identifier_list", sel_Nilac_identifier_list, sel_Consac_identifier_list, kc_not_uniq }, { "ac_abstract_declarator", sel_AcAbsdeclPointer, sel_AcAbsdeclDirdecl, kc_not_uniq }, { "ac_direct_abstract_declarator_option", sel_Noac_direct_abstract_declarator, sel_Yesac_direct_abstract_declarator, kc_not_uniq }, { "ac_direct_abstract_declarator", sel_AcDirAbsdeclPack, sel_AcDirAbsdeclFn, kc_not_uniq }, { "ac_constant_expression_option", sel_Yesac_constant_expression, sel_Noac_constant_expression, kc_not_uniq }, { "ac_constant_expression", sel_AcConstExpr, sel_AcConstExpr, kc_not_uniq }, { "ac_constant_expression_list", sel_Nilac_constant_expression_list, sel_Consac_constant_expression_list, kc_not_uniq }, { "ac_opt_base_init_list", sel_AcNoBaseInit, sel_AcYesBaseInit, kc_not_uniq }, { "ac_base_init_list", sel_Nilac_base_init_list, sel_Consac_base_init_list, kc_not_uniq }, { "ac_base_init", sel_AcBaseInit, sel_AcBaseInit, kc_not_uniq }, { "baseclass_declarations", sel_Nilbaseclass_declarations, sel_Consbaseclass_declarations, kc_not_uniq }, { "baseclass_decl", sel_BaseClassDecl, sel_BaseClassDecl, kc_not_uniq }, { "baseclass_list", sel_Nilbaseclass_list, sel_Consbaseclass_list, kc_not_uniq }, { "error", sel_Fatal, sel_Warning, kc_not_uniq }, { "problem", sel_Problem1, sel_Problem6, kc_not_uniq }, { "addedphylumdeclarations", sel_Niladdedphylumdeclarations, sel_Consaddedphylumdeclarations, kc_not_uniq }, { "addedphylumdeclaration", sel_AddedPhylumdeclaration, sel_AddedPhylumdeclaration, kc_not_uniq }, { "countedphylumdeclarations", sel_Nilcountedphylumdeclarations, sel_Conscountedphylumdeclarations, kc_not_uniq }, { "countedphylumdeclaration", sel_CountedPhylumdeclaration, sel_CountedPhylumdeclaration, uniq }, { "charruns", sel_Newlines, sel_Stars, uniq }, { "bindingidmarks", sel_Nilbindingidmarks, sel_Consbindingidmarks, uniq }, { "bindingidmark", sel_BindingIdMark, sel_BindingIdMark, uniq }, { "", one_before_first_operator, one_before_first_operator, (kc_storageclass_t)0 } /* last element */ }; static enum_phyla kc_subphyla_Str[] = { phylum_casestring }; static enum_phyla kc_subphyla_Id[] = { phylum_uniqID }; static enum_phyla kc_subphyla_Int[] = { phylum_integer }; static enum_phyla kc_subphyla_String[] = { phylum_casestring }; static enum_phyla kc_subphyla_PhylumDeclarations[] = { phylum_phylumdeclarations }; static enum_phyla kc_subphyla_Consphylumdeclarations[] = { phylum_phylumdeclaration, phylum_phylumdeclarations }; static enum_phyla kc_subphyla_Consphylumnames[] = { phylum_ID, phylum_phylumnames }; static enum_phyla kc_subphyla_PhylumDeclaration[] = { phylum_ID, phylum_storageoption, phylum_productionblock, phylum_Ccode_option }; static enum_phyla kc_subphyla_NegativeStorageOption[] = { phylum_ID }; static enum_phyla kc_subphyla_PositiveStorageOption[] = { phylum_ID }; static enum_phyla kc_subphyla_Consstorageclasses[] = { phylum_ID, phylum_storageclasses }; static enum_phyla kc_subphyla_ListAlternatives[] = { phylum_alternatives, phylum_ID }; static enum_phyla kc_subphyla_NonlistAlternatives[] = { phylum_alternatives }; static enum_phyla kc_subphyla_PredefinedAlternatives[] = { phylum_alternatives }; static enum_phyla kc_subphyla_Consalternatives[] = { phylum_alternative, phylum_alternatives }; static enum_phyla kc_subphyla_Alternative[] = { phylum_ID, phylum_arguments }; static enum_phyla kc_subphyla_Consarguments[] = { phylum_ID, phylum_arguments }; static enum_phyla kc_subphyla_Argument[] = { phylum_ID, phylum_integer }; static enum_phyla kc_subphyla_CcodeOption[] = { phylum_attributes, phylum_Ctexts }; static enum_phyla kc_subphyla_Consattributes[] = { phylum_attribute, phylum_attributes }; static enum_phyla kc_subphyla_Attribute[] = { phylum_ID, phylum_ID, phylum_attribute_initialisation_option }; static enum_phyla kc_subphyla_Yesattribute_initialisation[] = { phylum_Cexpression }; static enum_phyla kc_subphyla_ConsCexpression[] = { phylum_Cexpression_elem, phylum_Cexpression }; static enum_phyla kc_subphyla_CExpressionPart[] = { phylum_casestring }; static enum_phyla kc_subphyla_CExpressionDollarvar[] = { phylum_INT }; static enum_phyla kc_subphyla_CExpressionDQ[] = { phylum_CexpressionDQ }; static enum_phyla kc_subphyla_CExpressionSQ[] = { phylum_CexpressionSQ }; static enum_phyla kc_subphyla_CExpressionPack[] = { phylum_Cexpression }; static enum_phyla kc_subphyla_CExpressionArray[] = { phylum_Cexpression }; static enum_phyla kc_subphyla_ConsCexpressionDQ[] = { phylum_CexpressionDQ_elem, phylum_CexpressionDQ }; static enum_phyla kc_subphyla_CExpressionDQPart[] = { phylum_casestring }; static enum_phyla kc_subphyla_ConsCexpressionSQ[] = { phylum_CexpressionSQ_elem, phylum_CexpressionSQ }; static enum_phyla kc_subphyla_CExpressionSQPart[] = { phylum_casestring }; static enum_phyla kc_subphyla_ConsidCexpressions[] = { phylum_idCexpression, phylum_idCexpressions }; static enum_phyla kc_subphyla_IdCexpression[] = { phylum_ID, phylum_Cexpression }; static enum_phyla kc_subphyla_ConsCtexts[] = { phylum_Ctext, phylum_Ctexts }; static enum_phyla kc_subphyla_Consincludefiles[] = { phylum_includefile, phylum_includefiles }; static enum_phyla kc_subphyla_IncludeFile[] = { phylum_casestring }; static enum_phyla kc_subphyla_Consincludedeclarations[] = { phylum_includedeclaration, phylum_includedeclarations }; static enum_phyla kc_subphyla_IncludeDeclaration[] = { phylum_casestring }; static enum_phyla kc_subphyla_Consrwdeclarations[] = { phylum_rwdeclaration, phylum_rwdeclarations }; static enum_phyla kc_subphyla_RwDeclaration[] = { phylum_outmostpatterns, phylum_rewriteclauses }; static enum_phyla kc_subphyla_Consrewriteclauses[] = { phylum_rewriteclause, phylum_rewriteclauses }; static enum_phyla kc_subphyla_RewriteClause[] = { phylum_viewnames, phylum_term }; static enum_phyla kc_subphyla_Conspatternchains[] = { phylum_patternchain, phylum_patternchains }; static enum_phyla kc_subphyla_Conspatternchain[] = { phylum_patternchainitem, phylum_patternchain }; static enum_phyla kc_subphyla_Consoutmostpatterns[] = { phylum_outmostpattern, phylum_outmostpatterns }; static enum_phyla kc_subphyla_PatternchainitemOutmost[] = { phylum_outmostpattern }; static enum_phyla kc_subphyla_PatternchainitemGroup[] = { phylum_patternchains }; static enum_phyla kc_subphyla_PatternchainitemDollarid[] = { phylum_ID }; static enum_phyla kc_subphyla_OPOperatorWildcard[] = { phylum_ID, phylum_Cexpression }; static enum_phyla kc_subphyla_OPOperator[] = { phylum_ID, phylum_patterns, phylum_Cexpression }; static enum_phyla kc_subphyla_OPNonLeafVariable[] = { phylum_ID, phylum_outmostpattern }; static enum_phyla kc_subphyla_OPWildcard[] = { phylum_Cexpression }; static enum_phyla kc_subphyla_OPDefault[] = { phylum_Cexpression }; static enum_phyla kc_subphyla_PVariable[] = { phylum_ID }; static enum_phyla kc_subphyla_POperator[] = { phylum_ID, phylum_patterns }; static enum_phyla kc_subphyla_PNonLeafVariable[] = { phylum_ID, phylum_pattern }; static enum_phyla kc_subphyla_PStringLiteral[] = { phylum_CexpressionDQ }; static enum_phyla kc_subphyla_PIntLiteral[] = { phylum_INT }; static enum_phyla kc_subphyla_Conspatterns[] = { phylum_pattern, phylum_patterns }; static enum_phyla kc_subphyla_TVariable[] = { phylum_ID }; static enum_phyla kc_subphyla_TOperator[] = { phylum_ID, phylum_terms }; static enum_phyla kc_subphyla_TMethod[] = { phylum_term, phylum_ID, phylum_terms }; static enum_phyla kc_subphyla_TMethodDot[] = { phylum_term, phylum_ID, phylum_terms }; static enum_phyla kc_subphyla_TMemberVar[] = { phylum_term, phylum_ID }; static enum_phyla kc_subphyla_TMemberVarDot[] = { phylum_term, phylum_ID }; static enum_phyla kc_subphyla_TCTerm[] = { phylum_CexpressionSQ }; static enum_phyla kc_subphyla_TStringLiteral[] = { phylum_CexpressionDQ }; static enum_phyla kc_subphyla_TIntLiteral[] = { phylum_INT }; static enum_phyla kc_subphyla_Consterms[] = { phylum_term, phylum_terms }; static enum_phyla kc_subphyla_Consfnfiles[] = { phylum_fnfile, phylum_fnfiles }; static enum_phyla kc_subphyla_FnFile[] = { phylum_casestring }; static enum_phyla kc_subphyla_Consfndeclarations[] = { phylum_fndeclaration, phylum_fndeclarations }; static enum_phyla kc_subphyla_FnAcDeclaration[] = { phylum_ac_declaration_specifiers, phylum_ac_declarator, phylum_ac_declaration_list, phylum_ac_opt_base_init_list, phylum_Ctext, phylum_ID, phylum_fnclass }; static enum_phyla kc_subphyla_AcMemberDeclaration[] = { phylum_ac_declaration_specifiers, phylum_ac_declarator, phylum_ac_constant_expression_option, phylum_fnclass }; static enum_phyla kc_subphyla_StaticFn[] = { phylum_casestring }; static enum_phyla kc_subphyla_ConsCtext[] = { phylum_Ctext_elem, phylum_Ctext }; static enum_phyla kc_subphyla_CTextLine[] = { phylum_casestring }; static enum_phyla kc_subphyla_CTextDollarVar[] = { phylum_INT }; static enum_phyla kc_subphyla_CTextNl[] = { phylum_integer }; static enum_phyla kc_subphyla_CTextCexpressionDQ[] = { phylum_CexpressionDQ }; static enum_phyla kc_subphyla_CTextCexpressionSQ[] = { phylum_CexpressionSQ }; static enum_phyla kc_subphyla_CTextCbody[] = { phylum_Ctext }; static enum_phyla kc_subphyla_CTextForeachexpression[] = { phylum_patternchain, phylum_idCexpressions, phylum_withexpressions, phylum_Ctext, phylum_foreach_after }; static enum_phyla kc_subphyla_CTextWithexpression[] = { phylum_withexpressions, phylum_withcases, phylum_contextinfo }; static enum_phyla kc_subphyla_ForeachAfter[] = { phylum_patternchain, phylum_idCexpressions, phylum_withexpressions, phylum_Ctext }; static enum_phyla kc_subphyla_InForeachContext[] = { phylum_patternchain }; static enum_phyla kc_subphyla_Conswithexpressions[] = { phylum_withexpression, phylum_withexpressions }; static enum_phyla kc_subphyla_WEVariable[] = { phylum_ID }; static enum_phyla kc_subphyla_WECexpression[] = { phylum_Cexpression }; static enum_phyla kc_subphyla_Conswithcases[] = { phylum_withcase, phylum_withcases }; static enum_phyla kc_subphyla_Withcase[] = { phylum_patternchains, phylum_Ctext }; static enum_phyla kc_subphyla_Consunparsedeclarations[] = { phylum_unparsedeclaration, phylum_unparsedeclarations }; static enum_phyla kc_subphyla_UnparseDeclaration[] = { phylum_outmostpatterns, phylum_unparseclauses }; static enum_phyla kc_subphyla_Consunparseclauses[] = { phylum_unparseclause, phylum_unparseclauses }; static enum_phyla kc_subphyla_UnparseClause[] = { phylum_viewnames, phylum_unparseitems }; static enum_phyla kc_subphyla_Consviewnames[] = { phylum_ID, phylum_viewnames }; static enum_phyla kc_subphyla_Consunparseitems[] = { phylum_unparseitem, phylum_unparseitems }; static enum_phyla kc_subphyla_UnpStr[] = { phylum_languageoption, phylum_CexpressionDQ, phylum_viewnameoption }; static enum_phyla kc_subphyla_UnpSubexpr[] = { phylum_languageoption, phylum_unpsubterm, phylum_viewnameoption }; static enum_phyla kc_subphyla_UnpCtext[] = { phylum_languageoption, phylum_Ctext }; static enum_phyla kc_subphyla_UnpBody[] = { phylum_languageoption, phylum_unparseitems }; static enum_phyla kc_subphyla_UViewVarDecl[] = { phylum_ID, phylum_ID, phylum_Cexpression }; static enum_phyla kc_subphyla_UnpSubTerm[] = { phylum_ID }; static enum_phyla kc_subphyla_UnpDollarvarTerm[] = { phylum_INT }; static enum_phyla kc_subphyla_UnpSubAttr[] = { phylum_ID, phylum_unpattributes }; static enum_phyla kc_subphyla_UnpDollarvarAttr[] = { phylum_INT, phylum_unpattributes }; static enum_phyla kc_subphyla_UnpCastedVariable[] = { phylum_ID, phylum_ID }; static enum_phyla kc_subphyla_Consunpattributes[] = { phylum_ID, phylum_unpattributes }; static enum_phyla kc_subphyla_YesViewname[] = { phylum_ID }; static enum_phyla kc_subphyla_LanguageList[] = { phylum_languagenames }; static enum_phyla kc_subphyla_Conslanguagenames[] = { phylum_ID, phylum_languagenames }; static enum_phyla kc_subphyla_Consscopetypefilelinestack[] = { phylum_scopetypefileline, phylum_scopetypefilelinestack }; static enum_phyla kc_subphyla_ScopeTypeFileLine[] = { phylum_integer, phylum_IDtype, phylum_casestring, phylum_integer }; static enum_phyla kc_subphyla_ITPredefinedPhylum[] = { phylum_phylumdeclaration }; static enum_phyla kc_subphyla_ITUserPhylum[] = { phylum_phylumdeclaration }; static enum_phyla kc_subphyla_ITPredefinedOperator[] = { phylum_alternative, phylum_ID }; static enum_phyla kc_subphyla_ITUserOperator[] = { phylum_alternative, phylum_ID }; static enum_phyla kc_subphyla_ITUserFunction[] = { phylum_fnclass }; static enum_phyla kc_subphyla_ITPatternVariable[] = { phylum_ID, phylum_integer }; static enum_phyla kc_subphyla_ITLanguageName[] = { phylum_integer }; static enum_phyla kc_subphyla_Consoperators[] = { phylum_ID, phylum_operators }; static enum_phyla kc_subphyla_Consphyla[] = { phylum_ID, phylum_phyla }; static enum_phyla kc_subphyla_Consvariables[] = { phylum_ID, phylum_variables }; static enum_phyla kc_subphyla_Conspatternrepresentations[] = { phylum_patternrepresentation, phylum_patternrepresentations }; static enum_phyla kc_subphyla_Conspatternrepresentation[] = { phylum_elem_patternrepresentation, phylum_patternrepresentation }; static enum_phyla kc_subphyla_PRBinding[] = { phylum_path, phylum_ID }; static enum_phyla kc_subphyla_PRVarPredicate[] = { phylum_paths, phylum_ID, phylum_patternrepresentation }; static enum_phyla kc_subphyla_PROperPredicate[] = { phylum_path, phylum_ID }; static enum_phyla kc_subphyla_PRUserPredicate[] = { phylum_Cexpression }; static enum_phyla kc_subphyla_PRNonLeafBinding[] = { phylum_path, phylum_ID, phylum_patternrepresentation }; static enum_phyla kc_subphyla_PRWildcard[] = { phylum_path }; static enum_phyla kc_subphyla_PRStringLiteral[] = { phylum_path, phylum_CexpressionDQ }; static enum_phyla kc_subphyla_PRIntLiteral[] = { phylum_path, phylum_INT }; static enum_phyla kc_subphyla_Conspath[] = { phylum_integer, phylum_path }; static enum_phyla kc_subphyla_Conspaths[] = { phylum_path, phylum_paths }; static enum_phyla kc_subphyla_Consargsnumbers[] = { phylum_integer, phylum_argsnumbers }; static enum_phyla kc_subphyla_Consrewriterulesinfo[] = { phylum_rewriteruleinfo, phylum_rewriterulesinfo }; static enum_phyla kc_subphyla_Rewriteruleinfo[] = { phylum_patternrepresentation, phylum_patternrepresentation, phylum_rewriteclause }; static enum_phyla kc_subphyla_Conswithcasesinfo[] = { phylum_withcaseinfo, phylum_withcasesinfo }; static enum_phyla kc_subphyla_Withcaseinfo[] = { phylum_patternrepresentation, phylum_patternrepresentation, phylum_Ctext }; static enum_phyla kc_subphyla_Consrewriteviewsinfo[] = { phylum_rewriteviewinfo, phylum_rewriteviewsinfo }; static enum_phyla kc_subphyla_Rewriteviewinfo[] = { phylum_ID, phylum_rewriterulesinfo }; static enum_phyla kc_subphyla_Consunparseviewsinfo[] = { phylum_unparseviewinfo, phylum_unparseviewsinfo }; static enum_phyla kc_subphyla_Unparseviewinfo[] = { phylum_ID, phylum_unparsedeclsinfo }; static enum_phyla kc_subphyla_Consunparsedeclsinfo[] = { phylum_unparsedeclinfo, phylum_unparsedeclsinfo }; static enum_phyla kc_subphyla_Unparsedeclinfo[] = { phylum_patternrepresentation, phylum_patternrepresentation, phylum_unparseclause }; static enum_phyla kc_subphyla_AcDeclaration[] = { phylum_ac_declaration_specifiers, phylum_ac_init_declarator_list }; static enum_phyla kc_subphyla_Consac_declaration_list[] = { phylum_ac_declaration, phylum_ac_declaration_list }; static enum_phyla kc_subphyla_Consac_declaration_specifiers[] = { phylum_ac_declaration_specifier, phylum_ac_declaration_specifiers }; static enum_phyla kc_subphyla_AcDeclSpecStorageSpec[] = { phylum_ac_storage_class_specifier }; static enum_phyla kc_subphyla_AcDeclSpecTypeSpec[] = { phylum_ac_type_specifier }; static enum_phyla kc_subphyla_AcDeclSpecTypeQual[] = { phylum_ac_type_qualifier }; static enum_phyla kc_subphyla_AcTypeSpec[] = { phylum_ID }; static enum_phyla kc_subphyla_Consac_init_declarator_list[] = { phylum_ac_init_declarator, phylum_ac_init_declarator_list }; static enum_phyla kc_subphyla_AcInitDecl[] = { phylum_ac_declarator }; static enum_phyla kc_subphyla_AcDeclarator[] = { phylum_ac_pointer_option, phylum_ac_ref_option, phylum_ac_direct_declarator }; static enum_phyla kc_subphyla_AcDirectDeclId[] = { phylum_ID }; static enum_phyla kc_subphyla_AcDirectDeclPack[] = { phylum_ac_declarator }; static enum_phyla kc_subphyla_AcDirectDeclArray[] = { phylum_ac_direct_declarator, phylum_ac_constant_expression_option }; static enum_phyla kc_subphyla_AcDirectDeclProto[] = { phylum_ac_direct_declarator, phylum_ac_parameter_type_list }; static enum_phyla kc_subphyla_AcQualifiedDeclProto[] = { phylum_ac_class_qualifier_list, phylum_ac_direct_declarator, phylum_ac_parameter_type_list, phylum_ac_type_qualifier }; static enum_phyla kc_subphyla_AcMemberDecl[] = { phylum_ID, phylum_ID, phylum_ac_constant_expression_list }; static enum_phyla kc_subphyla_AcConvOperatorDecl[] = { phylum_ID, phylum_ID }; static enum_phyla kc_subphyla_AcOperatorDeclId[] = { phylum_ac_operator_name }; static enum_phyla kc_subphyla_Yespointer[] = { phylum_ac_pointer }; static enum_phyla kc_subphyla_AcPointerNil[] = { phylum_ac_type_qualifier_list }; static enum_phyla kc_subphyla_AcPointerCons[] = { phylum_ac_type_qualifier_list, phylum_ac_pointer }; static enum_phyla kc_subphyla_AcOperatorName[] = { phylum_casestring }; static enum_phyla kc_subphyla_Consac_class_qualifier_help_list[] = { phylum_ac_direct_declarator, phylum_ac_class_qualifier_help_list }; static enum_phyla kc_subphyla_Consac_class_qualifier_list[] = { phylum_ID, phylum_ac_class_qualifier_list }; static enum_phyla kc_subphyla_Consac_type_qualifier_list[] = { phylum_ac_type_qualifier, phylum_ac_type_qualifier_list }; static enum_phyla kc_subphyla_AcParList[] = { phylum_ac_parameter_list }; static enum_phyla kc_subphyla_AcParList3Dot[] = { phylum_ac_parameter_list }; static enum_phyla kc_subphyla_Consac_parameter_list[] = { phylum_ac_parameter_declaration, phylum_ac_parameter_list }; static enum_phyla kc_subphyla_AcParDeclDecl[] = { phylum_ac_declaration_specifiers, phylum_ac_declarator, phylum_ac_constant_expression_option }; static enum_phyla kc_subphyla_AcParDeclAbsdecl[] = { phylum_ac_declaration_specifiers, phylum_ac_abstract_declarator, phylum_ac_constant_expression_option }; static enum_phyla kc_subphyla_Consac_identifier_list[] = { phylum_ID, phylum_ac_identifier_list }; static enum_phyla kc_subphyla_AcAbsdeclPointer[] = { phylum_ac_pointer }; static enum_phyla kc_subphyla_AcAbsdeclDirdecl[] = { phylum_ac_pointer_option, phylum_ac_direct_abstract_declarator }; static enum_phyla kc_subphyla_Yesac_direct_abstract_declarator[] = { phylum_ac_direct_abstract_declarator }; static enum_phyla kc_subphyla_AcDirAbsdeclPack[] = { phylum_ac_abstract_declarator }; static enum_phyla kc_subphyla_AcDirAbsdeclArray[] = { phylum_ac_direct_abstract_declarator_option, phylum_ac_constant_expression_option }; static enum_phyla kc_subphyla_AcDirAbsdeclFn[] = { phylum_ac_direct_abstract_declarator_option, phylum_ac_parameter_type_list }; static enum_phyla kc_subphyla_Yesac_constant_expression[] = { phylum_ac_constant_expression }; static enum_phyla kc_subphyla_AcConstExpr[] = { phylum_Cexpression }; static enum_phyla kc_subphyla_Consac_constant_expression_list[] = { phylum_ac_constant_expression, phylum_ac_constant_expression_list }; static enum_phyla kc_subphyla_AcYesBaseInit[] = { phylum_ac_base_init_list }; static enum_phyla kc_subphyla_Consac_base_init_list[] = { phylum_ac_base_init, phylum_ac_base_init_list }; static enum_phyla kc_subphyla_AcBaseInit[] = { phylum_ID, phylum_ac_constant_expression_list }; static enum_phyla kc_subphyla_Consbaseclass_declarations[] = { phylum_baseclass_decl, phylum_baseclass_declarations }; static enum_phyla kc_subphyla_BaseClassDecl[] = { phylum_ID, phylum_baseclass_list }; static enum_phyla kc_subphyla_Consbaseclass_list[] = { phylum_ID, phylum_baseclass_list }; static enum_phyla kc_subphyla_Fatal[] = { phylum_fileline, phylum_problem }; static enum_phyla kc_subphyla_NonFatal[] = { phylum_fileline, phylum_problem }; static enum_phyla kc_subphyla_Warning[] = { phylum_fileline, phylum_problem }; static enum_phyla kc_subphyla_Problem1[] = { phylum_casestring }; static enum_phyla kc_subphyla_Problem1ID[] = { phylum_casestring, phylum_ID }; static enum_phyla kc_subphyla_Problem1tID[] = { phylum_casestring, phylum_ID }; static enum_phyla kc_subphyla_Problem1we[] = { phylum_casestring, phylum_withexpression }; static enum_phyla kc_subphyla_Problem1ID1ID[] = { phylum_casestring, phylum_ID, phylum_casestring, phylum_ID }; static enum_phyla kc_subphyla_Problem1t1ID[] = { phylum_casestring, phylum_IDtype, phylum_casestring, phylum_ID }; static enum_phyla kc_subphyla_Problem1INT[] = { phylum_casestring, phylum_INT }; static enum_phyla kc_subphyla_Problem1int1[] = { phylum_casestring, phylum_integer, phylum_casestring }; static enum_phyla kc_subphyla_Problem1INT1ID[] = { phylum_casestring, phylum_INT, phylum_casestring, phylum_ID }; static enum_phyla kc_subphyla_Problem1ID1ID1ID[] = { phylum_casestring, phylum_ID, phylum_casestring, phylum_ID, phylum_casestring, phylum_ID }; static enum_phyla kc_subphyla_Problem1INT1ID1ID[] = { phylum_casestring, phylum_INT, phylum_casestring, phylum_ID, phylum_casestring, phylum_ID }; static enum_phyla kc_subphyla_Problem1storageoption1ID[] = { phylum_casestring, phylum_storageoption, phylum_casestring, phylum_ID }; static enum_phyla kc_subphyla_Problem2[] = { phylum_casestring, phylum_casestring }; static enum_phyla kc_subphyla_Problem3[] = { phylum_casestring, phylum_casestring, phylum_casestring }; static enum_phyla kc_subphyla_Problem3int1[] = { phylum_casestring, phylum_casestring, phylum_casestring, phylum_integer, phylum_casestring }; static enum_phyla kc_subphyla_Problem4[] = { phylum_casestring, phylum_casestring, phylum_casestring, phylum_casestring }; static enum_phyla kc_subphyla_Problem5[] = { phylum_casestring, phylum_casestring, phylum_casestring, phylum_casestring, phylum_casestring }; static enum_phyla kc_subphyla_Problem6[] = { phylum_casestring, phylum_casestring, phylum_casestring, phylum_casestring, phylum_casestring, phylum_casestring }; static enum_phyla kc_subphyla_Consaddedphylumdeclarations[] = { phylum_addedphylumdeclaration, phylum_addedphylumdeclarations }; static enum_phyla kc_subphyla_AddedPhylumdeclaration[] = { phylum_uniqID }; static enum_phyla kc_subphyla_Conscountedphylumdeclarations[] = { phylum_countedphylumdeclaration, phylum_countedphylumdeclarations }; static enum_phyla kc_subphyla_CountedPhylumdeclaration[] = { phylum_uniqID }; static enum_phyla kc_subphyla_Consbindingidmarks[] = { phylum_bindingidmark, phylum_bindingidmarks }; static enum_phyla kc_subphyla_BindingIdMark[] = { phylum_uniqID }; KC_OPERATOR_INFO operator_info[] = { { "", 0, 0, one_before_first_phylum, 0, 0, 0, 0 }, /* dummy element */ { "NoCaseStr", 0, true, phylum_nocasestring, 0, 0, 0, sizeof(impl_nocasestring_NoCaseStr) }, { "_Str", 0, true, phylum_casestring, 0, 0, 0, sizeof(impl_casestring__Str) }, { "_Real", 0, true, phylum_real, 0, 0, 0, sizeof(impl_real__Real) }, { "_Int", 0, true, phylum_integer, 0, 0, 0, sizeof(impl_integer__Int) }, { "_VoidPtr", 0, true, phylum_voidptr, 0, 0, 0, sizeof(impl_voidptr__VoidPtr) }, { "Str", 1, false, phylum_uniqID, kc_subphyla_Str, 0, 0, sizeof(impl_uniqID_Str) }, { "Id", 1, false, phylum_ID, kc_subphyla_Id, 0, 0, sizeof(impl_ID_Id) }, { "Int", 1, false, phylum_INT, kc_subphyla_Int, 0, 0, sizeof(impl_INT_Int) }, { "String", 1, false, phylum_STRING, kc_subphyla_String, 0, 0, sizeof(impl_STRING_String) }, { "PhylumDeclarations", 1, false, phylum_phylumdeclarationsroot, kc_subphyla_PhylumDeclarations, 0, 0, sizeof(impl_phylumdeclarationsroot_PhylumDeclarations) }, { "Nilphylumdeclarations", 0, false, phylum_phylumdeclarations, 0, 0, 0, sizeof(impl_phylumdeclarations) }, { "Consphylumdeclarations", 2, false, phylum_phylumdeclarations, kc_subphyla_Consphylumdeclarations, 0, 0, sizeof(impl_phylumdeclarations) }, { "Nilphylumnames", 0, false, phylum_phylumnames, 0, 0, 0, sizeof(impl_phylumnames) }, { "Consphylumnames", 2, false, phylum_phylumnames, kc_subphyla_Consphylumnames, 0, 0, sizeof(impl_phylumnames) }, { "PhylumDeclaration", 4, false, phylum_phylumdeclaration, kc_subphyla_PhylumDeclaration, 0, 0, sizeof(impl_phylumdeclaration_PhylumDeclaration) }, { "NoStorageOption", 0, false, phylum_storageoption, 0, 0, 0, sizeof(impl_storageoption_NoStorageOption) }, { "NegativeStorageOption", 1, false, phylum_storageoption, kc_subphyla_NegativeStorageOption, 0, 0, sizeof(impl_storageoption_NegativeStorageOption) }, { "PositiveStorageOption", 1, false, phylum_storageoption, kc_subphyla_PositiveStorageOption, 0, 0, sizeof(impl_storageoption_PositiveStorageOption) }, { "Nilstorageclasses", 0, false, phylum_storageclasses, 0, 0, 0, sizeof(impl_storageclasses) }, { "Consstorageclasses", 2, false, phylum_storageclasses, kc_subphyla_Consstorageclasses, 0, 0, sizeof(impl_storageclasses) }, { "Emptyproductionblock", 0, false, phylum_productionblock, 0, 0, 0, sizeof(impl_productionblock_Emptyproductionblock) }, { "ListAlternatives", 2, false, phylum_productionblock, kc_subphyla_ListAlternatives, 0, 0, sizeof(impl_productionblock_ListAlternatives) }, { "NonlistAlternatives", 1, false, phylum_productionblock, kc_subphyla_NonlistAlternatives, 0, 0, sizeof(impl_productionblock_NonlistAlternatives) }, { "PredefinedAlternatives", 1, false, phylum_productionblock, kc_subphyla_PredefinedAlternatives, 0, 0, sizeof(impl_productionblock_PredefinedAlternatives) }, { "Nilalternatives", 0, false, phylum_alternatives, 0, 0, 0, sizeof(impl_alternatives) }, { "Consalternatives", 2, false, phylum_alternatives, kc_subphyla_Consalternatives, 0, 0, sizeof(impl_alternatives) }, { "Alternative", 2, false, phylum_alternative, kc_subphyla_Alternative, 0, 0, sizeof(impl_alternative_Alternative) }, { "Nilarguments", 0, false, phylum_arguments, 0, 0, 0, sizeof(impl_arguments) }, { "Consarguments", 2, false, phylum_arguments, kc_subphyla_Consarguments, 0, 0, sizeof(impl_arguments) }, { "Argument", 2, false, phylum_argument, kc_subphyla_Argument, 0, 0, sizeof(impl_argument_Argument) }, { "CcodeOption", 2, false, phylum_Ccode_option, kc_subphyla_CcodeOption, 0, 0, sizeof(impl_Ccode_option_CcodeOption) }, { "Nilattributes", 0, false, phylum_attributes, 0, 0, 0, sizeof(impl_attributes) }, { "Consattributes", 2, false, phylum_attributes, kc_subphyla_Consattributes, 0, 0, sizeof(impl_attributes) }, { "Attribute", 3, false, phylum_attribute, kc_subphyla_Attribute, 0, 0, sizeof(impl_attribute_Attribute) }, { "Noattribute_initialisation", 0, false, phylum_attribute_initialisation_option, 0, 0, 0, sizeof(impl_attribute_initialisation_option_Noattribute_initialisation) }, { "Yesattribute_initialisation", 1, false, phylum_attribute_initialisation_option, kc_subphyla_Yesattribute_initialisation, 0, 0, sizeof(impl_attribute_initialisation_option_Yesattribute_initialisation) }, { "NilCexpression", 0, false, phylum_Cexpression, 0, 0, 0, sizeof(impl_Cexpression) }, { "ConsCexpression", 2, false, phylum_Cexpression, kc_subphyla_ConsCexpression, 0, 0, sizeof(impl_Cexpression) }, { "CExpressionPart", 1, false, phylum_Cexpression_elem, kc_subphyla_CExpressionPart, 0, 0, sizeof(impl_Cexpression_elem_CExpressionPart) }, { "CExpressionDollarvar", 1, false, phylum_Cexpression_elem, kc_subphyla_CExpressionDollarvar, 0, 0, sizeof(impl_Cexpression_elem_CExpressionDollarvar) }, { "CExpressionNl", 0, false, phylum_Cexpression_elem, 0, 0, 0, sizeof(impl_Cexpression_elem_CExpressionNl) }, { "CExpressionDQ", 1, false, phylum_Cexpression_elem, kc_subphyla_CExpressionDQ, 0, 0, sizeof(impl_Cexpression_elem_CExpressionDQ) }, { "CExpressionSQ", 1, false, phylum_Cexpression_elem, kc_subphyla_CExpressionSQ, 0, 0, sizeof(impl_Cexpression_elem_CExpressionSQ) }, { "CExpressionPack", 1, false, phylum_Cexpression_elem, kc_subphyla_CExpressionPack, 0, 0, sizeof(impl_Cexpression_elem_CExpressionPack) }, { "CExpressionArray", 1, false, phylum_Cexpression_elem, kc_subphyla_CExpressionArray, 0, 0, sizeof(impl_Cexpression_elem_CExpressionArray) }, { "NilCexpressionDQ", 0, false, phylum_CexpressionDQ, 0, 0, 0, sizeof(impl_CexpressionDQ) }, { "ConsCexpressionDQ", 2, false, phylum_CexpressionDQ, kc_subphyla_ConsCexpressionDQ, 0, 0, sizeof(impl_CexpressionDQ) }, { "CExpressionDQPart", 1, false, phylum_CexpressionDQ_elem, kc_subphyla_CExpressionDQPart, 0, 0, sizeof(impl_CexpressionDQ_elem_CExpressionDQPart) }, { "CExpressionDQNl", 0, false, phylum_CexpressionDQ_elem, 0, 0, 0, sizeof(impl_CexpressionDQ_elem_CExpressionDQNl) }, { "NilCexpressionSQ", 0, false, phylum_CexpressionSQ, 0, 0, 0, sizeof(impl_CexpressionSQ) }, { "ConsCexpressionSQ", 2, false, phylum_CexpressionSQ, kc_subphyla_ConsCexpressionSQ, 0, 0, sizeof(impl_CexpressionSQ) }, { "CExpressionSQPart", 1, false, phylum_CexpressionSQ_elem, kc_subphyla_CExpressionSQPart, 0, 0, sizeof(impl_CexpressionSQ_elem_CExpressionSQPart) }, { "CExpressionSQNl", 0, false, phylum_CexpressionSQ_elem, 0, 0, 0, sizeof(impl_CexpressionSQ_elem_CExpressionSQNl) }, { "NilidCexpressions", 0, false, phylum_idCexpressions, 0, 0, 0, sizeof(impl_idCexpressions) }, { "ConsidCexpressions", 2, false, phylum_idCexpressions, kc_subphyla_ConsidCexpressions, 0, 0, sizeof(impl_idCexpressions) }, { "IdCexpression", 2, false, phylum_idCexpression, kc_subphyla_IdCexpression, 0, 0, sizeof(impl_idCexpression_IdCexpression) }, { "NilCtexts", 0, false, phylum_Ctexts, 0, 0, 0, sizeof(impl_Ctexts) }, { "ConsCtexts", 2, false, phylum_Ctexts, kc_subphyla_ConsCtexts, 0, 0, sizeof(impl_Ctexts) }, { "Nilincludefiles", 0, false, phylum_includefiles, 0, 0, 0, sizeof(impl_includefiles) }, { "Consincludefiles", 2, false, phylum_includefiles, kc_subphyla_Consincludefiles, 0, 0, sizeof(impl_includefiles) }, { "IncludeFile", 1, false, phylum_includefile, kc_subphyla_IncludeFile, 0, 0, sizeof(impl_includefile_IncludeFile) }, { "Nilincludedeclarations", 0, false, phylum_includedeclarations, 0, 0, 0, sizeof(impl_includedeclarations) }, { "Consincludedeclarations", 2, false, phylum_includedeclarations, kc_subphyla_Consincludedeclarations, 0, 0, sizeof(impl_includedeclarations) }, { "IncludeDeclaration", 1, false, phylum_includedeclaration, kc_subphyla_IncludeDeclaration, 0, 0, sizeof(impl_includedeclaration_IncludeDeclaration) }, { "Nilrwdeclarations", 0, false, phylum_rwdeclarations, 0, 0, 0, sizeof(impl_rwdeclarations) }, { "Consrwdeclarations", 2, false, phylum_rwdeclarations, kc_subphyla_Consrwdeclarations, 0, 0, sizeof(impl_rwdeclarations) }, { "RwDeclaration", 2, false, phylum_rwdeclaration, kc_subphyla_RwDeclaration, 0, 0, sizeof(impl_rwdeclaration_RwDeclaration) }, { "Nilrewriteclauses", 0, false, phylum_rewriteclauses, 0, 0, 0, sizeof(impl_rewriteclauses) }, { "Consrewriteclauses", 2, false, phylum_rewriteclauses, kc_subphyla_Consrewriteclauses, 0, 0, sizeof(impl_rewriteclauses) }, { "RewriteClause", 2, false, phylum_rewriteclause, kc_subphyla_RewriteClause, 0, 0, sizeof(impl_rewriteclause_RewriteClause) }, { "Nilpatternchains", 0, false, phylum_patternchains, 0, 0, 0, sizeof(impl_patternchains) }, { "Conspatternchains", 2, false, phylum_patternchains, kc_subphyla_Conspatternchains, 0, 0, sizeof(impl_patternchains) }, { "Nilpatternchain", 0, false, phylum_patternchain, 0, 0, 0, sizeof(impl_patternchain) }, { "Conspatternchain", 2, false, phylum_patternchain, kc_subphyla_Conspatternchain, 0, 0, sizeof(impl_patternchain) }, { "Niloutmostpatterns", 0, false, phylum_outmostpatterns, 0, 0, 0, sizeof(impl_outmostpatterns) }, { "Consoutmostpatterns", 2, false, phylum_outmostpatterns, kc_subphyla_Consoutmostpatterns, 0, 0, sizeof(impl_outmostpatterns) }, { "PatternchainitemOutmost", 1, false, phylum_patternchainitem, kc_subphyla_PatternchainitemOutmost, 0, 0, sizeof(impl_patternchainitem_PatternchainitemOutmost) }, { "PatternchainitemGroup", 1, false, phylum_patternchainitem, kc_subphyla_PatternchainitemGroup, 0, 0, sizeof(impl_patternchainitem_PatternchainitemGroup) }, { "PatternchainitemDollarid", 1, false, phylum_patternchainitem, kc_subphyla_PatternchainitemDollarid, 0, 0, sizeof(impl_patternchainitem_PatternchainitemDollarid) }, { "OPOperatorWildcard", 2, false, phylum_outmostpattern, kc_subphyla_OPOperatorWildcard, 0, 0, sizeof(impl_outmostpattern_OPOperatorWildcard) }, { "OPOperator", 3, false, phylum_outmostpattern, kc_subphyla_OPOperator, 0, 0, sizeof(impl_outmostpattern_OPOperator) }, { "OPNonLeafVariable", 2, false, phylum_outmostpattern, kc_subphyla_OPNonLeafVariable, 0, 0, sizeof(impl_outmostpattern_OPNonLeafVariable) }, { "OPWildcard", 1, false, phylum_outmostpattern, kc_subphyla_OPWildcard, 0, 0, sizeof(impl_outmostpattern_OPWildcard) }, { "OPDefault", 1, false, phylum_outmostpattern, kc_subphyla_OPDefault, 0, 0, sizeof(impl_outmostpattern_OPDefault) }, { "PVariable", 1, false, phylum_pattern, kc_subphyla_PVariable, 0, 0, sizeof(impl_pattern_PVariable) }, { "POperator", 2, false, phylum_pattern, kc_subphyla_POperator, 0, 0, sizeof(impl_pattern_POperator) }, { "PNonLeafVariable", 2, false, phylum_pattern, kc_subphyla_PNonLeafVariable, 0, 0, sizeof(impl_pattern_PNonLeafVariable) }, { "PWildcard", 0, false, phylum_pattern, 0, 0, 0, sizeof(impl_pattern_PWildcard) }, { "PStringLiteral", 1, false, phylum_pattern, kc_subphyla_PStringLiteral, 0, 0, sizeof(impl_pattern_PStringLiteral) }, { "PIntLiteral", 1, false, phylum_pattern, kc_subphyla_PIntLiteral, 0, 0, sizeof(impl_pattern_PIntLiteral) }, { "Nilpatterns", 0, false, phylum_patterns, 0, 0, 0, sizeof(impl_patterns) }, { "Conspatterns", 2, false, phylum_patterns, kc_subphyla_Conspatterns, 0, 0, sizeof(impl_patterns) }, { "TVariable", 1, false, phylum_term, kc_subphyla_TVariable, 0, 0, sizeof(impl_term_TVariable) }, { "TOperator", 2, false, phylum_term, kc_subphyla_TOperator, 0, 0, sizeof(impl_term_TOperator) }, { "TMethod", 3, false, phylum_term, kc_subphyla_TMethod, 0, 0, sizeof(impl_term_TMethod) }, { "TMethodDot", 3, false, phylum_term, kc_subphyla_TMethodDot, 0, 0, sizeof(impl_term_TMethodDot) }, { "TMemberVar", 2, false, phylum_term, kc_subphyla_TMemberVar, 0, 0, sizeof(impl_term_TMemberVar) }, { "TMemberVarDot", 2, false, phylum_term, kc_subphyla_TMemberVarDot, 0, 0, sizeof(impl_term_TMemberVarDot) }, { "TCTerm", 1, false, phylum_term, kc_subphyla_TCTerm, 0, 0, sizeof(impl_term_TCTerm) }, { "TStringLiteral", 1, false, phylum_term, kc_subphyla_TStringLiteral, 0, 0, sizeof(impl_term_TStringLiteral) }, { "TIntLiteral", 1, false, phylum_term, kc_subphyla_TIntLiteral, 0, 0, sizeof(impl_term_TIntLiteral) }, { "Nilterms", 0, false, phylum_terms, 0, 0, 0, sizeof(impl_terms) }, { "Consterms", 2, false, phylum_terms, kc_subphyla_Consterms, 0, 0, sizeof(impl_terms) }, { "Nilfnfiles", 0, false, phylum_fnfiles, 0, 0, 0, sizeof(impl_fnfiles) }, { "Consfnfiles", 2, false, phylum_fnfiles, kc_subphyla_Consfnfiles, 0, 0, sizeof(impl_fnfiles) }, { "FnFile", 1, false, phylum_fnfile, kc_subphyla_FnFile, 0, 0, sizeof(impl_fnfile_FnFile) }, { "Nilfndeclarations", 0, false, phylum_fndeclarations, 0, 0, 0, sizeof(impl_fndeclarations) }, { "Consfndeclarations", 2, false, phylum_fndeclarations, kc_subphyla_Consfndeclarations, 0, 0, sizeof(impl_fndeclarations) }, { "FnAcDeclaration", 7, false, phylum_fndeclaration, kc_subphyla_FnAcDeclaration, 0, 0, sizeof(impl_fndeclaration_FnAcDeclaration) }, { "AcMemberDeclaration", 4, false, phylum_fndeclaration, kc_subphyla_AcMemberDeclaration, 0, 0, sizeof(impl_fndeclaration_AcMemberDeclaration) }, { "GlobalFn", 0, false, phylum_fnclass, 0, 0, 0, sizeof(impl_fnclass_GlobalFn) }, { "StaticFn", 1, false, phylum_fnclass, kc_subphyla_StaticFn, 0, 0, sizeof(impl_fnclass_StaticFn) }, { "MemberFn", 0, false, phylum_fnclass, 0, 0, 0, sizeof(impl_fnclass_MemberFn) }, { "ConstructorFn", 0, false, phylum_fnclass, 0, 0, 0, sizeof(impl_fnclass_ConstructorFn) }, { "DestructorFn", 0, false, phylum_fnclass, 0, 0, 0, sizeof(impl_fnclass_DestructorFn) }, { "ConvOperatorFn", 0, false, phylum_fnclass, 0, 0, 0, sizeof(impl_fnclass_ConvOperatorFn) }, { "NilCtext", 0, false, phylum_Ctext, 0, 0, 0, sizeof(impl_Ctext) }, { "ConsCtext", 2, false, phylum_Ctext, kc_subphyla_ConsCtext, 0, 0, sizeof(impl_Ctext) }, { "CTextLine", 1, false, phylum_Ctext_elem, kc_subphyla_CTextLine, 0, 0, sizeof(impl_Ctext_elem_CTextLine) }, { "CTextDollarVar", 1, false, phylum_Ctext_elem, kc_subphyla_CTextDollarVar, 0, 0, sizeof(impl_Ctext_elem_CTextDollarVar) }, { "CTextNl", 1, false, phylum_Ctext_elem, kc_subphyla_CTextNl, 0, 0, sizeof(impl_Ctext_elem_CTextNl) }, { "CTextCexpressionDQ", 1, false, phylum_Ctext_elem, kc_subphyla_CTextCexpressionDQ, 0, 0, sizeof(impl_Ctext_elem_CTextCexpressionDQ) }, { "CTextCexpressionSQ", 1, false, phylum_Ctext_elem, kc_subphyla_CTextCexpressionSQ, 0, 0, sizeof(impl_Ctext_elem_CTextCexpressionSQ) }, { "CTextCbody", 1, false, phylum_Ctext_elem, kc_subphyla_CTextCbody, 0, 0, sizeof(impl_Ctext_elem_CTextCbody) }, { "CTextForeachexpression", 5, false, phylum_Ctext_elem, kc_subphyla_CTextForeachexpression, 0, 0, sizeof(impl_Ctext_elem_CTextForeachexpression) }, { "CTextWithexpression", 3, false, phylum_Ctext_elem, kc_subphyla_CTextWithexpression, 0, 0, sizeof(impl_Ctext_elem_CTextWithexpression) }, { "NoForeachAfter", 0, false, phylum_foreach_after, 0, 0, 0, sizeof(impl_foreach_after_NoForeachAfter) }, { "ForeachAfter", 4, false, phylum_foreach_after, kc_subphyla_ForeachAfter, 0, 0, sizeof(impl_foreach_after_ForeachAfter) }, { "InForeachContext", 1, false, phylum_contextinfo, kc_subphyla_InForeachContext, 0, 0, sizeof(impl_contextinfo_InForeachContext) }, { "NotInForeachContext", 0, false, phylum_contextinfo, 0, 0, 0, sizeof(impl_contextinfo_NotInForeachContext) }, { "Nilwithexpressions", 0, false, phylum_withexpressions, 0, 0, 0, sizeof(impl_withexpressions) }, { "Conswithexpressions", 2, false, phylum_withexpressions, kc_subphyla_Conswithexpressions, 0, 0, sizeof(impl_withexpressions) }, { "WEVariable", 1, false, phylum_withexpression, kc_subphyla_WEVariable, 0, 0, sizeof(impl_withexpression_WEVariable) }, { "WECexpression", 1, false, phylum_withexpression, kc_subphyla_WECexpression, 0, 0, sizeof(impl_withexpression_WECexpression) }, { "Nilwithcases", 0, false, phylum_withcases, 0, 0, 0, sizeof(impl_withcases) }, { "Conswithcases", 2, false, phylum_withcases, kc_subphyla_Conswithcases, 0, 0, sizeof(impl_withcases) }, { "Withcase", 2, false, phylum_withcase, kc_subphyla_Withcase, 0, 0, sizeof(impl_withcase_Withcase) }, { "Nilunparsedeclarations", 0, false, phylum_unparsedeclarations, 0, 0, 0, sizeof(impl_unparsedeclarations) }, { "Consunparsedeclarations", 2, false, phylum_unparsedeclarations, kc_subphyla_Consunparsedeclarations, 0, 0, sizeof(impl_unparsedeclarations) }, { "UnparseDeclaration", 2, false, phylum_unparsedeclaration, kc_subphyla_UnparseDeclaration, 0, 0, sizeof(impl_unparsedeclaration_UnparseDeclaration) }, { "Nilunparseclauses", 0, false, phylum_unparseclauses, 0, 0, 0, sizeof(impl_unparseclauses) }, { "Consunparseclauses", 2, false, phylum_unparseclauses, kc_subphyla_Consunparseclauses, 0, 0, sizeof(impl_unparseclauses) }, { "UnparseClause", 2, false, phylum_unparseclause, kc_subphyla_UnparseClause, 0, 0, sizeof(impl_unparseclause_UnparseClause) }, { "Nilviewnames", 0, false, phylum_viewnames, 0, 0, 0, sizeof(impl_viewnames) }, { "Consviewnames", 2, false, phylum_viewnames, kc_subphyla_Consviewnames, 0, 0, sizeof(impl_viewnames) }, { "Nilunparseitems", 0, false, phylum_unparseitems, 0, 0, 0, sizeof(impl_unparseitems) }, { "Consunparseitems", 2, false, phylum_unparseitems, kc_subphyla_Consunparseitems, 0, 0, sizeof(impl_unparseitems) }, { "UnpStr", 3, false, phylum_unparseitem, kc_subphyla_UnpStr, 0, 0, sizeof(impl_unparseitem_UnpStr) }, { "UnpSubexpr", 3, false, phylum_unparseitem, kc_subphyla_UnpSubexpr, 0, 0, sizeof(impl_unparseitem_UnpSubexpr) }, { "UnpCtext", 2, false, phylum_unparseitem, kc_subphyla_UnpCtext, 0, 0, sizeof(impl_unparseitem_UnpCtext) }, { "UnpBody", 2, false, phylum_unparseitem, kc_subphyla_UnpBody, 0, 0, sizeof(impl_unparseitem_UnpBody) }, { "UViewVarDecl", 3, false, phylum_unparseitem, kc_subphyla_UViewVarDecl, 0, 0, sizeof(impl_unparseitem_UViewVarDecl) }, { "UnpSubTerm", 1, false, phylum_unpsubterm, kc_subphyla_UnpSubTerm, 0, 0, sizeof(impl_unpsubterm_UnpSubTerm) }, { "UnpDollarvarTerm", 1, false, phylum_unpsubterm, kc_subphyla_UnpDollarvarTerm, 0, 0, sizeof(impl_unpsubterm_UnpDollarvarTerm) }, { "UnpSubAttr", 2, false, phylum_unpsubterm, kc_subphyla_UnpSubAttr, 0, 0, sizeof(impl_unpsubterm_UnpSubAttr) }, { "UnpDollarvarAttr", 2, false, phylum_unpsubterm, kc_subphyla_UnpDollarvarAttr, 0, 0, sizeof(impl_unpsubterm_UnpDollarvarAttr) }, { "UnpCastedVariable", 2, false, phylum_unpsubterm, kc_subphyla_UnpCastedVariable, 0, 0, sizeof(impl_unpsubterm_UnpCastedVariable) }, { "Nilunpattributes", 0, false, phylum_unpattributes, 0, 0, 0, sizeof(impl_unpattributes) }, { "Consunpattributes", 2, false, phylum_unpattributes, kc_subphyla_Consunpattributes, 0, 0, sizeof(impl_unpattributes) }, { "NoViewname", 0, false, phylum_viewnameoption, 0, 0, 0, sizeof(impl_viewnameoption_NoViewname) }, { "YesViewname", 1, false, phylum_viewnameoption, kc_subphyla_YesViewname, 0, 0, sizeof(impl_viewnameoption_YesViewname) }, { "NoLanguagename", 0, false, phylum_languageoption, 0, 0, 0, sizeof(impl_languageoption_NoLanguagename) }, { "LanguageList", 1, false, phylum_languageoption, kc_subphyla_LanguageList, 0, 0, sizeof(impl_languageoption_LanguageList) }, { "Nillanguagenames", 0, false, phylum_languagenames, 0, 0, 0, sizeof(impl_languagenames) }, { "Conslanguagenames", 2, false, phylum_languagenames, kc_subphyla_Conslanguagenames, 0, 0, sizeof(impl_languagenames) }, { "FileLine", 0, false, phylum_fileline, 0, 0, 0, sizeof(impl_fileline_FileLine) }, { "NoFileLine", 0, false, phylum_fileline, 0, 0, 0, sizeof(impl_fileline_NoFileLine) }, { "PosNoFileLine", 0, false, phylum_fileline, 0, 0, 0, sizeof(impl_fileline_PosNoFileLine) }, { "Nilscopetypefilelinestack", 0, false, phylum_scopetypefilelinestack, 0, 0, 0, sizeof(impl_scopetypefilelinestack) }, { "Consscopetypefilelinestack", 2, false, phylum_scopetypefilelinestack, kc_subphyla_Consscopetypefilelinestack, 0, 0, sizeof(impl_scopetypefilelinestack) }, { "ScopeTypeFileLine", 4, false, phylum_scopetypefileline, kc_subphyla_ScopeTypeFileLine, 0, 0, sizeof(impl_scopetypefileline_ScopeTypeFileLine) }, { "ITUnknown", 0, false, phylum_IDtype, 0, 0, 0, sizeof(impl_IDtype_ITUnknown) }, { "ITPredefinedPhylum", 1, false, phylum_IDtype, kc_subphyla_ITPredefinedPhylum, 0, 0, sizeof(impl_IDtype_ITPredefinedPhylum) }, { "ITUserPhylum", 1, false, phylum_IDtype, kc_subphyla_ITUserPhylum, 0, 0, sizeof(impl_IDtype_ITUserPhylum) }, { "ITPredefinedOperator", 2, false, phylum_IDtype, kc_subphyla_ITPredefinedOperator, 0, 0, sizeof(impl_IDtype_ITPredefinedOperator) }, { "ITUserOperator", 2, false, phylum_IDtype, kc_subphyla_ITUserOperator, 0, 0, sizeof(impl_IDtype_ITUserOperator) }, { "ITPredefinedStorageClass", 0, false, phylum_IDtype, 0, 0, 0, sizeof(impl_IDtype_ITPredefinedStorageClass) }, { "ITStorageClass", 0, false, phylum_IDtype, 0, 0, 0, sizeof(impl_IDtype_ITStorageClass) }, { "ITPredefinedUView", 0, false, phylum_IDtype, 0, 0, 0, sizeof(impl_IDtype_ITPredefinedUView) }, { "ITUserUView", 0, false, phylum_IDtype, 0, 0, 0, sizeof(impl_IDtype_ITUserUView) }, { "ITUViewVar", 0, false, phylum_IDtype, 0, 0, 0, sizeof(impl_IDtype_ITUViewVar) }, { "ITPredefinedRView", 0, false, phylum_IDtype, 0, 0, 0, sizeof(impl_IDtype_ITPredefinedRView) }, { "ITUserRView", 0, false, phylum_IDtype, 0, 0, 0, sizeof(impl_IDtype_ITUserRView) }, { "ITUserFunction", 1, false, phylum_IDtype, kc_subphyla_ITUserFunction, 0, 0, sizeof(impl_IDtype_ITUserFunction) }, { "ITPatternVariable", 2, false, phylum_IDtype, kc_subphyla_ITPatternVariable, 0, 0, sizeof(impl_IDtype_ITPatternVariable) }, { "ITLanguageName", 1, false, phylum_IDtype, kc_subphyla_ITLanguageName, 0, 0, sizeof(impl_IDtype_ITLanguageName) }, { "Niloperators", 0, false, phylum_operators, 0, 0, 0, sizeof(impl_operators) }, { "Consoperators", 2, false, phylum_operators, kc_subphyla_Consoperators, 0, 0, sizeof(impl_operators) }, { "Nilphyla", 0, false, phylum_phyla, 0, 0, 0, sizeof(impl_phyla) }, { "Consphyla", 2, false, phylum_phyla, kc_subphyla_Consphyla, 0, 0, sizeof(impl_phyla) }, { "Nilvariables", 0, false, phylum_variables, 0, 0, 0, sizeof(impl_variables) }, { "Consvariables", 2, false, phylum_variables, kc_subphyla_Consvariables, 0, 0, sizeof(impl_variables) }, { "DVAllowed", 0, false, phylum_dollarvarstatus, 0, 0, 0, sizeof(impl_dollarvarstatus_DVAllowed) }, { "DVDisallowed", 0, false, phylum_dollarvarstatus, 0, 0, 0, sizeof(impl_dollarvarstatus_DVDisallowed) }, { "Equal", 0, false, phylum_tribool, 0, 0, 0, sizeof(impl_tribool_Equal) }, { "Smaller", 0, false, phylum_tribool, 0, 0, 0, sizeof(impl_tribool_Smaller) }, { "Bigger", 0, false, phylum_tribool, 0, 0, 0, sizeof(impl_tribool_Bigger) }, { "Nilpatternrepresentations", 0, false, phylum_patternrepresentations, 0, 0, 0, sizeof(impl_patternrepresentations) }, { "Conspatternrepresentations", 2, false, phylum_patternrepresentations, kc_subphyla_Conspatternrepresentations, 0, 0, sizeof(impl_patternrepresentations) }, { "Nilpatternrepresentation", 0, false, phylum_patternrepresentation, 0, 0, 0, sizeof(impl_patternrepresentation) }, { "Conspatternrepresentation", 2, false, phylum_patternrepresentation, kc_subphyla_Conspatternrepresentation, 0, 0, sizeof(impl_patternrepresentation) }, { "PRBinding", 2, false, phylum_elem_patternrepresentation, kc_subphyla_PRBinding, 0, 0, sizeof(impl_elem_patternrepresentation_PRBinding) }, { "PRVarPredicate", 3, false, phylum_elem_patternrepresentation, kc_subphyla_PRVarPredicate, 0, 0, sizeof(impl_elem_patternrepresentation_PRVarPredicate) }, { "PROperPredicate", 2, false, phylum_elem_patternrepresentation, kc_subphyla_PROperPredicate, 0, 0, sizeof(impl_elem_patternrepresentation_PROperPredicate) }, { "PRUserPredicate", 1, false, phylum_elem_patternrepresentation, kc_subphyla_PRUserPredicate, 0, 0, sizeof(impl_elem_patternrepresentation_PRUserPredicate) }, { "PRNonLeafBinding", 3, false, phylum_elem_patternrepresentation, kc_subphyla_PRNonLeafBinding, 0, 0, sizeof(impl_elem_patternrepresentation_PRNonLeafBinding) }, { "PRWildcard", 1, false, phylum_elem_patternrepresentation, kc_subphyla_PRWildcard, 0, 0, sizeof(impl_elem_patternrepresentation_PRWildcard) }, { "PRDefault", 0, false, phylum_elem_patternrepresentation, 0, 0, 0, sizeof(impl_elem_patternrepresentation_PRDefault) }, { "PRStringLiteral", 2, false, phylum_elem_patternrepresentation, kc_subphyla_PRStringLiteral, 0, 0, sizeof(impl_elem_patternrepresentation_PRStringLiteral) }, { "PRIntLiteral", 2, false, phylum_elem_patternrepresentation, kc_subphyla_PRIntLiteral, 0, 0, sizeof(impl_elem_patternrepresentation_PRIntLiteral) }, { "Nilpath", 0, false, phylum_path, 0, 0, 0, sizeof(impl_path) }, { "Conspath", 2, false, phylum_path, kc_subphyla_Conspath, 0, 0, sizeof(impl_path) }, { "Nilpaths", 0, false, phylum_paths, 0, 0, 0, sizeof(impl_paths) }, { "Conspaths", 2, false, phylum_paths, kc_subphyla_Conspaths, 0, 0, sizeof(impl_paths) }, { "Nilargsnumbers", 0, false, phylum_argsnumbers, 0, 0, 0, sizeof(impl_argsnumbers) }, { "Consargsnumbers", 2, false, phylum_argsnumbers, kc_subphyla_Consargsnumbers, 0, 0, sizeof(impl_argsnumbers) }, { "Nilrewriterulesinfo", 0, false, phylum_rewriterulesinfo, 0, 0, 0, sizeof(impl_rewriterulesinfo) }, { "Consrewriterulesinfo", 2, false, phylum_rewriterulesinfo, kc_subphyla_Consrewriterulesinfo, 0, 0, sizeof(impl_rewriterulesinfo) }, { "Rewriteruleinfo", 3, false, phylum_rewriteruleinfo, kc_subphyla_Rewriteruleinfo, 0, 0, sizeof(impl_rewriteruleinfo_Rewriteruleinfo) }, { "Nilwithcasesinfo", 0, false, phylum_withcasesinfo, 0, 0, 0, sizeof(impl_withcasesinfo) }, { "Conswithcasesinfo", 2, false, phylum_withcasesinfo, kc_subphyla_Conswithcasesinfo, 0, 0, sizeof(impl_withcasesinfo) }, { "Withcaseinfo", 3, false, phylum_withcaseinfo, kc_subphyla_Withcaseinfo, 0, 0, sizeof(impl_withcaseinfo_Withcaseinfo) }, { "Nilrewriteviewsinfo", 0, false, phylum_rewriteviewsinfo, 0, 0, 0, sizeof(impl_rewriteviewsinfo) }, { "Consrewriteviewsinfo", 2, false, phylum_rewriteviewsinfo, kc_subphyla_Consrewriteviewsinfo, 0, 0, sizeof(impl_rewriteviewsinfo) }, { "Rewriteviewinfo", 2, false, phylum_rewriteviewinfo, kc_subphyla_Rewriteviewinfo, 0, 0, sizeof(impl_rewriteviewinfo_Rewriteviewinfo) }, { "Nilunparseviewsinfo", 0, false, phylum_unparseviewsinfo, 0, 0, 0, sizeof(impl_unparseviewsinfo) }, { "Consunparseviewsinfo", 2, false, phylum_unparseviewsinfo, kc_subphyla_Consunparseviewsinfo, 0, 0, sizeof(impl_unparseviewsinfo) }, { "Unparseviewinfo", 2, false, phylum_unparseviewinfo, kc_subphyla_Unparseviewinfo, 0, 0, sizeof(impl_unparseviewinfo_Unparseviewinfo) }, { "Nilunparsedeclsinfo", 0, false, phylum_unparsedeclsinfo, 0, 0, 0, sizeof(impl_unparsedeclsinfo) }, { "Consunparsedeclsinfo", 2, false, phylum_unparsedeclsinfo, kc_subphyla_Consunparsedeclsinfo, 0, 0, sizeof(impl_unparsedeclsinfo) }, { "Unparsedeclinfo", 3, false, phylum_unparsedeclinfo, kc_subphyla_Unparsedeclinfo, 0, 0, sizeof(impl_unparsedeclinfo_Unparsedeclinfo) }, { "AcDeclaration", 2, false, phylum_ac_declaration, kc_subphyla_AcDeclaration, 0, 0, sizeof(impl_ac_declaration_AcDeclaration) }, { "Nilac_declaration_list", 0, false, phylum_ac_declaration_list, 0, 0, 0, sizeof(impl_ac_declaration_list) }, { "Consac_declaration_list", 2, false, phylum_ac_declaration_list, kc_subphyla_Consac_declaration_list, 0, 0, sizeof(impl_ac_declaration_list) }, { "Nilac_declaration_specifiers", 0, false, phylum_ac_declaration_specifiers, 0, 0, 0, sizeof(impl_ac_declaration_specifiers) }, { "Consac_declaration_specifiers", 2, false, phylum_ac_declaration_specifiers, kc_subphyla_Consac_declaration_specifiers, 0, 0, sizeof(impl_ac_declaration_specifiers) }, { "AcDeclSpecStorageSpec", 1, false, phylum_ac_declaration_specifier, kc_subphyla_AcDeclSpecStorageSpec, 0, 0, sizeof(impl_ac_declaration_specifier_AcDeclSpecStorageSpec) }, { "AcDeclSpecTypeSpec", 1, false, phylum_ac_declaration_specifier, kc_subphyla_AcDeclSpecTypeSpec, 0, 0, sizeof(impl_ac_declaration_specifier_AcDeclSpecTypeSpec) }, { "AcDeclSpecTypeQual", 1, false, phylum_ac_declaration_specifier, kc_subphyla_AcDeclSpecTypeQual, 0, 0, sizeof(impl_ac_declaration_specifier_AcDeclSpecTypeQual) }, { "AcAuto", 0, false, phylum_ac_storage_class_specifier, 0, 0, 0, sizeof(impl_ac_storage_class_specifier_AcAuto) }, { "AcRegister", 0, false, phylum_ac_storage_class_specifier, 0, 0, 0, sizeof(impl_ac_storage_class_specifier_AcRegister) }, { "AcStatic", 0, false, phylum_ac_storage_class_specifier, 0, 0, 0, sizeof(impl_ac_storage_class_specifier_AcStatic) }, { "AcExtern", 0, false, phylum_ac_storage_class_specifier, 0, 0, 0, sizeof(impl_ac_storage_class_specifier_AcExtern) }, { "AcTypedef", 0, false, phylum_ac_storage_class_specifier, 0, 0, 0, sizeof(impl_ac_storage_class_specifier_AcTypedef) }, { "AcVirtual", 0, false, phylum_ac_storage_class_specifier, 0, 0, 0, sizeof(impl_ac_storage_class_specifier_AcVirtual) }, { "AcTypeSpec", 1, false, phylum_ac_type_specifier, kc_subphyla_AcTypeSpec, 0, 0, sizeof(impl_ac_type_specifier_AcTypeSpec) }, { "AcConst", 0, false, phylum_ac_type_qualifier, 0, 0, 0, sizeof(impl_ac_type_qualifier_AcConst) }, { "AcVolatile", 0, false, phylum_ac_type_qualifier, 0, 0, 0, sizeof(impl_ac_type_qualifier_AcVolatile) }, { "AcUnsigned", 0, false, phylum_ac_type_qualifier, 0, 0, 0, sizeof(impl_ac_type_qualifier_AcUnsigned) }, { "AcNoQualifier", 0, false, phylum_ac_type_qualifier, 0, 0, 0, sizeof(impl_ac_type_qualifier_AcNoQualifier) }, { "Nilac_init_declarator_list", 0, false, phylum_ac_init_declarator_list, 0, 0, 0, sizeof(impl_ac_init_declarator_list) }, { "Consac_init_declarator_list", 2, false, phylum_ac_init_declarator_list, kc_subphyla_Consac_init_declarator_list, 0, 0, sizeof(impl_ac_init_declarator_list) }, { "AcInitDecl", 1, false, phylum_ac_init_declarator, kc_subphyla_AcInitDecl, 0, 0, sizeof(impl_ac_init_declarator_AcInitDecl) }, { "AcDeclarator", 3, false, phylum_ac_declarator, kc_subphyla_AcDeclarator, 0, 0, sizeof(impl_ac_declarator_AcDeclarator) }, { "AcDirectDeclId", 1, false, phylum_ac_direct_declarator, kc_subphyla_AcDirectDeclId, 0, 0, sizeof(impl_ac_direct_declarator_AcDirectDeclId) }, { "AcDirectDeclPack", 1, false, phylum_ac_direct_declarator, kc_subphyla_AcDirectDeclPack, 0, 0, sizeof(impl_ac_direct_declarator_AcDirectDeclPack) }, { "AcDirectDeclArray", 2, false, phylum_ac_direct_declarator, kc_subphyla_AcDirectDeclArray, 0, 0, sizeof(impl_ac_direct_declarator_AcDirectDeclArray) }, { "AcDirectDeclProto", 2, false, phylum_ac_direct_declarator, kc_subphyla_AcDirectDeclProto, 0, 0, sizeof(impl_ac_direct_declarator_AcDirectDeclProto) }, { "AcQualifiedDeclProto", 4, false, phylum_ac_direct_declarator, kc_subphyla_AcQualifiedDeclProto, 0, 0, sizeof(impl_ac_direct_declarator_AcQualifiedDeclProto) }, { "AcMemberDecl", 3, false, phylum_ac_direct_declarator, kc_subphyla_AcMemberDecl, 0, 0, sizeof(impl_ac_direct_declarator_AcMemberDecl) }, { "AcConvOperatorDecl", 2, false, phylum_ac_direct_declarator, kc_subphyla_AcConvOperatorDecl, 0, 0, sizeof(impl_ac_direct_declarator_AcConvOperatorDecl) }, { "AcOperatorDeclId", 1, false, phylum_ac_direct_declarator, kc_subphyla_AcOperatorDeclId, 0, 0, sizeof(impl_ac_direct_declarator_AcOperatorDeclId) }, { "Nopointer", 0, false, phylum_ac_pointer_option, 0, 0, 0, sizeof(impl_ac_pointer_option_Nopointer) }, { "Yespointer", 1, false, phylum_ac_pointer_option, kc_subphyla_Yespointer, 0, 0, sizeof(impl_ac_pointer_option_Yespointer) }, { "AcPointerNil", 1, false, phylum_ac_pointer, kc_subphyla_AcPointerNil, 0, 0, sizeof(impl_ac_pointer_AcPointerNil) }, { "AcPointerCons", 2, false, phylum_ac_pointer, kc_subphyla_AcPointerCons, 0, 0, sizeof(impl_ac_pointer_AcPointerCons) }, { "AcNoRef", 0, false, phylum_ac_ref_option, 0, 0, 0, sizeof(impl_ac_ref_option_AcNoRef) }, { "AcRef", 0, false, phylum_ac_ref_option, 0, 0, 0, sizeof(impl_ac_ref_option_AcRef) }, { "AcOperatorName", 1, false, phylum_ac_operator_name, kc_subphyla_AcOperatorName, 0, 0, sizeof(impl_ac_operator_name_AcOperatorName) }, { "Nilac_class_qualifier_help_list", 0, false, phylum_ac_class_qualifier_help_list, 0, 0, 0, sizeof(impl_ac_class_qualifier_help_list) }, { "Consac_class_qualifier_help_list", 2, false, phylum_ac_class_qualifier_help_list, kc_subphyla_Consac_class_qualifier_help_list, 0, 0, sizeof(impl_ac_class_qualifier_help_list) }, { "Nilac_class_qualifier_list", 0, false, phylum_ac_class_qualifier_list, 0, 0, 0, sizeof(impl_ac_class_qualifier_list) }, { "Consac_class_qualifier_list", 2, false, phylum_ac_class_qualifier_list, kc_subphyla_Consac_class_qualifier_list, 0, 0, sizeof(impl_ac_class_qualifier_list) }, { "Nilac_type_qualifier_list", 0, false, phylum_ac_type_qualifier_list, 0, 0, 0, sizeof(impl_ac_type_qualifier_list) }, { "Consac_type_qualifier_list", 2, false, phylum_ac_type_qualifier_list, kc_subphyla_Consac_type_qualifier_list, 0, 0, sizeof(impl_ac_type_qualifier_list) }, { "AcParList", 1, false, phylum_ac_parameter_type_list, kc_subphyla_AcParList, 0, 0, sizeof(impl_ac_parameter_type_list_AcParList) }, { "AcParList3Dot", 1, false, phylum_ac_parameter_type_list, kc_subphyla_AcParList3Dot, 0, 0, sizeof(impl_ac_parameter_type_list_AcParList3Dot) }, { "Nilac_parameter_list", 0, false, phylum_ac_parameter_list, 0, 0, 0, sizeof(impl_ac_parameter_list) }, { "Consac_parameter_list", 2, false, phylum_ac_parameter_list, kc_subphyla_Consac_parameter_list, 0, 0, sizeof(impl_ac_parameter_list) }, { "AcParDeclDecl", 3, false, phylum_ac_parameter_declaration, kc_subphyla_AcParDeclDecl, 0, 0, sizeof(impl_ac_parameter_declaration_AcParDeclDecl) }, { "AcParDeclAbsdecl", 3, false, phylum_ac_parameter_declaration, kc_subphyla_AcParDeclAbsdecl, 0, 0, sizeof(impl_ac_parameter_declaration_AcParDeclAbsdecl) }, { "Nilac_identifier_list", 0, false, phylum_ac_identifier_list, 0, 0, 0, sizeof(impl_ac_identifier_list) }, { "Consac_identifier_list", 2, false, phylum_ac_identifier_list, kc_subphyla_Consac_identifier_list, 0, 0, sizeof(impl_ac_identifier_list) }, { "AcAbsdeclPointer", 1, false, phylum_ac_abstract_declarator, kc_subphyla_AcAbsdeclPointer, 0, 0, sizeof(impl_ac_abstract_declarator_AcAbsdeclPointer) }, { "AcAbsdeclDirdecl", 2, false, phylum_ac_abstract_declarator, kc_subphyla_AcAbsdeclDirdecl, 0, 0, sizeof(impl_ac_abstract_declarator_AcAbsdeclDirdecl) }, { "Noac_direct_abstract_declarator", 0, false, phylum_ac_direct_abstract_declarator_option, 0, 0, 0, sizeof(impl_ac_direct_abstract_declarator_option_Noac_direct_abstract_declarator) }, { "Yesac_direct_abstract_declarator", 1, false, phylum_ac_direct_abstract_declarator_option, kc_subphyla_Yesac_direct_abstract_declarator, 0, 0, sizeof(impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator) }, { "AcDirAbsdeclPack", 1, false, phylum_ac_direct_abstract_declarator, kc_subphyla_AcDirAbsdeclPack, 0, 0, sizeof(impl_ac_direct_abstract_declarator_AcDirAbsdeclPack) }, { "AcDirAbsdeclArray", 2, false, phylum_ac_direct_abstract_declarator, kc_subphyla_AcDirAbsdeclArray, 0, 0, sizeof(impl_ac_direct_abstract_declarator_AcDirAbsdeclArray) }, { "AcDirAbsdeclFn", 2, false, phylum_ac_direct_abstract_declarator, kc_subphyla_AcDirAbsdeclFn, 0, 0, sizeof(impl_ac_direct_abstract_declarator_AcDirAbsdeclFn) }, { "Yesac_constant_expression", 1, false, phylum_ac_constant_expression_option, kc_subphyla_Yesac_constant_expression, 0, 0, sizeof(impl_ac_constant_expression_option_Yesac_constant_expression) }, { "Noac_constant_expression", 0, false, phylum_ac_constant_expression_option, 0, 0, 0, sizeof(impl_ac_constant_expression_option_Noac_constant_expression) }, { "AcConstExpr", 1, false, phylum_ac_constant_expression, kc_subphyla_AcConstExpr, 0, 0, sizeof(impl_ac_constant_expression_AcConstExpr) }, { "Nilac_constant_expression_list", 0, false, phylum_ac_constant_expression_list, 0, 0, 0, sizeof(impl_ac_constant_expression_list) }, { "Consac_constant_expression_list", 2, false, phylum_ac_constant_expression_list, kc_subphyla_Consac_constant_expression_list, 0, 0, sizeof(impl_ac_constant_expression_list) }, { "AcNoBaseInit", 0, false, phylum_ac_opt_base_init_list, 0, 0, 0, sizeof(impl_ac_opt_base_init_list_AcNoBaseInit) }, { "AcYesBaseInit", 1, false, phylum_ac_opt_base_init_list, kc_subphyla_AcYesBaseInit, 0, 0, sizeof(impl_ac_opt_base_init_list_AcYesBaseInit) }, { "Nilac_base_init_list", 0, false, phylum_ac_base_init_list, 0, 0, 0, sizeof(impl_ac_base_init_list) }, { "Consac_base_init_list", 2, false, phylum_ac_base_init_list, kc_subphyla_Consac_base_init_list, 0, 0, sizeof(impl_ac_base_init_list) }, { "AcBaseInit", 2, false, phylum_ac_base_init, kc_subphyla_AcBaseInit, 0, 0, sizeof(impl_ac_base_init_AcBaseInit) }, { "Nilbaseclass_declarations", 0, false, phylum_baseclass_declarations, 0, 0, 0, sizeof(impl_baseclass_declarations) }, { "Consbaseclass_declarations", 2, false, phylum_baseclass_declarations, kc_subphyla_Consbaseclass_declarations, 0, 0, sizeof(impl_baseclass_declarations) }, { "BaseClassDecl", 2, false, phylum_baseclass_decl, kc_subphyla_BaseClassDecl, 0, 0, sizeof(impl_baseclass_decl_BaseClassDecl) }, { "Nilbaseclass_list", 0, false, phylum_baseclass_list, 0, 0, 0, sizeof(impl_baseclass_list) }, { "Consbaseclass_list", 2, false, phylum_baseclass_list, kc_subphyla_Consbaseclass_list, 0, 0, sizeof(impl_baseclass_list) }, { "Fatal", 2, false, phylum_error, kc_subphyla_Fatal, 0, 0, sizeof(impl_error_Fatal) }, { "NonFatal", 2, false, phylum_error, kc_subphyla_NonFatal, 0, 0, sizeof(impl_error_NonFatal) }, { "Warning", 2, false, phylum_error, kc_subphyla_Warning, 0, 0, sizeof(impl_error_Warning) }, { "Problem1", 1, false, phylum_problem, kc_subphyla_Problem1, 0, 0, sizeof(impl_problem_Problem1) }, { "Problem1ID", 2, false, phylum_problem, kc_subphyla_Problem1ID, 0, 0, sizeof(impl_problem_Problem1ID) }, { "Problem1tID", 2, false, phylum_problem, kc_subphyla_Problem1tID, 0, 0, sizeof(impl_problem_Problem1tID) }, { "Problem1we", 2, false, phylum_problem, kc_subphyla_Problem1we, 0, 0, sizeof(impl_problem_Problem1we) }, { "Problem1ID1ID", 4, false, phylum_problem, kc_subphyla_Problem1ID1ID, 0, 0, sizeof(impl_problem_Problem1ID1ID) }, { "Problem1t1ID", 4, false, phylum_problem, kc_subphyla_Problem1t1ID, 0, 0, sizeof(impl_problem_Problem1t1ID) }, { "Problem1INT", 2, false, phylum_problem, kc_subphyla_Problem1INT, 0, 0, sizeof(impl_problem_Problem1INT) }, { "Problem1int1", 3, false, phylum_problem, kc_subphyla_Problem1int1, 0, 0, sizeof(impl_problem_Problem1int1) }, { "Problem1INT1ID", 4, false, phylum_problem, kc_subphyla_Problem1INT1ID, 0, 0, sizeof(impl_problem_Problem1INT1ID) }, { "Problem1ID1ID1ID", 6, false, phylum_problem, kc_subphyla_Problem1ID1ID1ID, 0, 0, sizeof(impl_problem_Problem1ID1ID1ID) }, { "Problem1INT1ID1ID", 6, false, phylum_problem, kc_subphyla_Problem1INT1ID1ID, 0, 0, sizeof(impl_problem_Problem1INT1ID1ID) }, { "Problem1storageoption1ID", 4, false, phylum_problem, kc_subphyla_Problem1storageoption1ID, 0, 0, sizeof(impl_problem_Problem1storageoption1ID) }, { "Problem2", 2, false, phylum_problem, kc_subphyla_Problem2, 0, 0, sizeof(impl_problem_Problem2) }, { "Problem3", 3, false, phylum_problem, kc_subphyla_Problem3, 0, 0, sizeof(impl_problem_Problem3) }, { "Problem3int1", 5, false, phylum_problem, kc_subphyla_Problem3int1, 0, 0, sizeof(impl_problem_Problem3int1) }, { "Problem4", 4, false, phylum_problem, kc_subphyla_Problem4, 0, 0, sizeof(impl_problem_Problem4) }, { "Problem5", 5, false, phylum_problem, kc_subphyla_Problem5, 0, 0, sizeof(impl_problem_Problem5) }, { "Problem6", 6, false, phylum_problem, kc_subphyla_Problem6, 0, 0, sizeof(impl_problem_Problem6) }, { "Niladdedphylumdeclarations", 0, false, phylum_addedphylumdeclarations, 0, 0, 0, sizeof(impl_addedphylumdeclarations) }, { "Consaddedphylumdeclarations", 2, false, phylum_addedphylumdeclarations, kc_subphyla_Consaddedphylumdeclarations, 0, 0, sizeof(impl_addedphylumdeclarations) }, { "AddedPhylumdeclaration", 1, false, phylum_addedphylumdeclaration, kc_subphyla_AddedPhylumdeclaration, 0, 0, sizeof(impl_addedphylumdeclaration_AddedPhylumdeclaration) }, { "Nilcountedphylumdeclarations", 0, false, phylum_countedphylumdeclarations, 0, 0, 0, sizeof(impl_countedphylumdeclarations) }, { "Conscountedphylumdeclarations", 2, false, phylum_countedphylumdeclarations, kc_subphyla_Conscountedphylumdeclarations, 0, 0, sizeof(impl_countedphylumdeclarations) }, { "CountedPhylumdeclaration", 1, false, phylum_countedphylumdeclaration, kc_subphyla_CountedPhylumdeclaration, 0, 0, sizeof(impl_countedphylumdeclaration_CountedPhylumdeclaration) }, { "Newlines", 0, false, phylum_charruns, 0, 0, 0, sizeof(impl_charruns_Newlines) }, { "QuotedNewlines", 0, false, phylum_charruns, 0, 0, 0, sizeof(impl_charruns_QuotedNewlines) }, { "Stars", 0, false, phylum_charruns, 0, 0, 0, sizeof(impl_charruns_Stars) }, { "Nilbindingidmarks", 0, false, phylum_bindingidmarks, 0, 0, 0, sizeof(impl_bindingidmarks) }, { "Consbindingidmarks", 2, false, phylum_bindingidmarks, kc_subphyla_Consbindingidmarks, 0, 0, sizeof(impl_bindingidmarks) }, { "BindingIdMark", 1, false, phylum_bindingidmark, kc_subphyla_BindingIdMark, 0, 0, sizeof(impl_bindingidmark_BindingIdMark) }, { "", 0, 0, one_before_first_phylum, 0, 0, 0, 0 } /* last element */ }; static enum_phyla phylumstorageclass_uniq[] = { one_before_first_phylum, phylum_nocasestring, phylum_casestring, phylum_real, phylum_integer, phylum_voidptr, phylum_uniqID, phylum_includefile, phylum_fnfile, phylum_countedphylumdeclaration, phylum_charruns, phylum_bindingidmarks, phylum_bindingidmark, last_phylum }; KC_UNIQ_INFO kc_UniqInfo[] = { (KC_UNIQ_INFO)0, phylumstorageclass_uniq }; } // namespace kc namespace kc { } using namespace kc; /* included stuff */ #include "gutil.h" // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // /* end included stuff */ namespace kc { void kc_no_default_in_with( const char *kc_func, int kc_line, const char *kc_file ) { fflush(stdout); #ifdef _AFX USES_CONVERSION; const _TCHAR* format=A2CT(KC_NO_DEFAULT_IN_WITH); const _TCHAR* tkc_func=A2CT(kc_func); const _TCHAR* tkc_file=A2CT(kc_file); TRACE( format, tkc_func, tkc_file, kc_line ); #ifdef _DEBUG if (AfxAssertFailedLine(kc_file, kc_line)) #endif AfxDebugBreak(); #else fprintf( stderr, KC_NO_DEFAULT_IN_WITH, kc_func, kc_file, kc_line ); #ifndef KC_NODEFAULT_NO_ABORT abort(); #else exit( 1 ); #endif #endif } void kc_returnless_function( const char *kc_func, int kc_line, const char *kc_file ) { fflush(stdout); #ifdef _AFX USES_CONVERSION; const _TCHAR* format=_T("Internal Error: function %s does not return a value, at %s:%d"); const _TCHAR* tkc_func=A2CT(kc_func); const _TCHAR* tkc_file=A2CT(kc_file); TRACE( format, tkc_func, tkc_file, kc_line ); #ifdef _DEBUG if (AfxAssertFailedLine(kc_file, kc_line)) #endif AfxDebugBreak(); #else fprintf( stderr, "Internal Error: function %s does not return a value, at %s:%d", kc_func, kc_file, kc_line ); #ifndef KC_NODEFAULT_NO_ABORT abort(); #else exit( 1 ); #endif #endif } void kc_assertionFailed(const char *kc_fn, int kc_l) { fflush(stdout); #ifdef _AFX USES_CONVERSION; const _TCHAR* format=_T("Internal Error: Assertion failed at %s:%d\n"); const _TCHAR* tkc_func=A2CT(kc_fn); TRACE( format, tkc_func, kc_l ); #ifdef _DEBUG if (AfxAssertFailedLine(kc_fn, kc_l)) #endif AfxDebugBreak(); #else fprintf( stderr, "Internal Error: Assertion failed at %s:%d\n", kc_fn, kc_l ); #ifndef KC_ASSERT_NO_ABORT abort(); #else exit( 1 ); #endif #endif } void kc_assertionReasonFailed(const char *kc_fn, int kc_l, const char *kc_s) { fflush(stdout); #ifdef _AFX USES_CONVERSION; const _TCHAR* format=_T("Internal Error: Assertion failed at file %s:%d: %s\n"); const _TCHAR* tkc_func=A2CT(kc_fn); const _TCHAR* tkc_s=A2CT(kc_s); TRACE( format, tkc_func, kc_l, tkc_s ); #ifdef _DEBUG if (AfxAssertFailedLine(kc_fn, kc_l)) #endif AfxDebugBreak(); #else fprintf( stderr, "Internal Error: Assertion failed at file %s:%d: %s\n", kc_fn, kc_l, kc_s ); #ifndef KC_ASSERT_NO_ABORT abort(); #else exit( 1 ); #endif #endif } void kc_assertionNonNullFailed(const char *kc_fn, int kc_l, const char *kc_str) { fflush(stdout); #ifdef _AFX USES_CONVERSION; const _TCHAR* format=_T("Internal Error: Assertion failed at %s:%d: pointer %s is NULL\n"); const _TCHAR* tkc_func=A2CT(kc_fn); const _TCHAR* tkc_s=A2CT(kc_str); TRACE( format , tkc_func, kc_l, tkc_s); #ifdef _DEBUG if (AfxAssertFailedLine(kc_fn, kc_l)) #endif AfxDebugBreak(); #else fprintf( stderr, "Internal Error: Assertion failed at %s:%d: pointer %s is NULL\n", kc_fn, kc_l, kc_str ); #ifndef KC_ASSERT_NO_ABORT abort(); #else exit( 1 ); #endif #endif } void kc_assertionOperatorInPhylumFailed(int kc_op, const char *kc_str1, const char *kc_str2, const char *kc_phy, const char *kc_fn, int kc_l) { fflush(stdout); #ifdef _AFX USES_CONVERSION; const _TCHAR* format=_T("Internal Error: Assertion failed at %s:%d: illegal value for (%s) %s%s: %d not a valid operator\n"); const _TCHAR* tkc_func=A2CT(kc_fn); const _TCHAR* tkc_s1=A2CT(kc_str1); const _TCHAR* tkc_s2=A2CT(kc_str2); const _TCHAR* tname=A2CT(kc_phy); if ((kc_op <= one_before_first_operator) || (kc_op >= last_operator)) { TRACE (format, tkc_func, kc_l, tname, tkc_s1, tkc_s2, kc_op ); } else { format=_T("Internal Error: Assertion failed at %s:%d: illegal value for (%s) %s%s: %s (%d) is a value of %s\n"); const _TCHAR* tname2=A2CT(operator_info[kc_op].name); const _TCHAR* tname3=A2CT(phylum_info[operator_info[kc_op].phylum].name); TRACE(format,tkc_func, kc_l, tname, tkc_s1, tkc_s2, tname2, kc_op, tname3 ); } #ifdef _DEBUG if (AfxAssertFailedLine(kc_fn, kc_l)) #endif AfxDebugBreak(); #else if ((kc_op <= one_before_first_operator) || (kc_op >= last_operator)) { fprintf( stderr, "Internal Error: Assertion failed at %s:%d: illegal value for (%s) %s%s: %d not a valid operator\n", kc_fn, kc_l, kc_phy, kc_str1, kc_str2, kc_op ); } else { fprintf( stderr, "Internal Error: Assertion failed at %s:%d: illegal value for (%s) %s%s: %s (%d) is a value of %s\n", kc_fn, kc_l, kc_phy, kc_str1, kc_str2, operator_info[kc_op].name, kc_op, phylum_info[operator_info[kc_op].phylum].name ); } #ifndef KC_ASSERT_NO_ABORT abort(); #else exit( 1 ); #endif #endif } void kc_invalid_operator( const char *kc_func_prefix, enum_phyla kc_phy, int kc_line, const char *kc_file, enum_operators kc_oper ) { fflush(stdout); #ifdef _AFX USES_CONVERSION; const _TCHAR* format=_T("Internal Error: invalid operator code in %s%s at %s:%d: %s\n"); const _TCHAR* tkc_func=A2CT(kc_func_prefix); const _TCHAR* tkc_file=A2CT(kc_file); const _TCHAR* ts1=A2CT(phylumname_or_error( kc_phy )); const _TCHAR* ts2=A2CT(kc_operatorname_or_error( kc_oper )); TRACE( format, tkc_func, ts1, tkc_file, kc_line, ts2); #ifdef _DEBUG if (AfxAssertFailedLine(kc_file, kc_line)) #endif AfxDebugBreak(); #else fprintf( stderr, "Internal Error: invalid operator code in %s%s at %s:%d: %s\n", kc_func_prefix, phylumname_or_error( kc_phy ), kc_file, kc_line, kc_operatorname_or_error( kc_oper )); #ifndef KC_INVALID_OPERATOR_NO_ABORT abort(); #else exit( 1 ); #endif #endif } const enum_phyla impl_nocasestring::phylum_sel_ = phylum_nocasestring; const enum_phyla impl_casestring::phylum_sel_ = phylum_casestring; const enum_phyla impl_real::phylum_sel_ = phylum_real; impl_real__Real::impl_real__Real(REAL _value) : value(_value) { } const enum_phyla impl_integer::phylum_sel_ = phylum_integer; impl_integer__Int::impl_integer__Int(INTEGER _value) : value(_value) { } const enum_phyla impl_voidptr::phylum_sel_ = phylum_voidptr; impl_voidptr__VoidPtr::impl_voidptr__VoidPtr(void* _pointer) : pointer(_pointer) { } const enum_phyla impl_uniqID::phylum_sel_ = phylum_uniqID; impl_uniqID_Str::impl_uniqID_Str(casestring _casestring_1) : casestring_1(_casestring_1) { } const enum_phyla impl_ID::phylum_sel_ = phylum_ID; impl_ID_Id::impl_ID_Id(uniqID _uniqID_1) : uniqID_1(_uniqID_1) { } const enum_phyla impl_INT::phylum_sel_ = phylum_INT; impl_INT_Int::impl_INT_Int(integer _integer_1) : integer_1(_integer_1) { } const enum_phyla impl_STRING::phylum_sel_ = phylum_STRING; impl_STRING_String::impl_STRING_String(casestring _casestring_1) : casestring_1(_casestring_1) { } const enum_phyla impl_phylumdeclarationsroot::phylum_sel_ = phylum_phylumdeclarationsroot; impl_phylumdeclarationsroot_PhylumDeclarations::impl_phylumdeclarationsroot_PhylumDeclarations(phylumdeclarations _phylumdeclarations_1) : phylumdeclarations_1(_phylumdeclarations_1) { } const enum_phyla impl_phylumdeclarations::phylum_sel_ = phylum_phylumdeclarations; impl_phylumdeclarations::impl_phylumdeclarations(phylumdeclaration p1 , phylumdeclarations p2) : phylumdeclaration_1(p1), phylumdeclarations_1(p2) { } const enum_phyla impl_phylumnames::phylum_sel_ = phylum_phylumnames; impl_phylumnames::impl_phylumnames(ID p1 , phylumnames p2) : ID_1(p1), phylumnames_1(p2) { } const enum_phyla impl_phylumdeclaration::phylum_sel_ = phylum_phylumdeclaration; impl_phylumdeclaration_PhylumDeclaration::impl_phylumdeclaration_PhylumDeclaration(ID _ID_1, storageoption _storageoption_1, productionblock _productionblock_1, Ccode_option _Ccode_option_1) : ID_1(_ID_1), storageoption_1(_storageoption_1), productionblock_1(_productionblock_1), Ccode_option_1(_Ccode_option_1) { } const enum_phyla impl_storageoption::phylum_sel_ = phylum_storageoption; impl_storageoption_PositiveStorageOption::impl_storageoption_PositiveStorageOption(ID _ID_1) : ID_1(_ID_1) { } impl_storageoption_NegativeStorageOption::impl_storageoption_NegativeStorageOption(ID _ID_1) : ID_1(_ID_1) { } impl_storageoption_NoStorageOption::impl_storageoption_NoStorageOption() { } const enum_phyla impl_storageclasses::phylum_sel_ = phylum_storageclasses; impl_storageclasses::impl_storageclasses(ID p1 , storageclasses p2) : ID_1(p1), storageclasses_1(p2) { } const enum_phyla impl_productionblock::phylum_sel_ = phylum_productionblock; impl_productionblock_PredefinedAlternatives::impl_productionblock_PredefinedAlternatives(alternatives _alternatives_1) : alternatives_1(_alternatives_1) { } impl_productionblock_NonlistAlternatives::impl_productionblock_NonlistAlternatives(alternatives _alternatives_1) : alternatives_1(_alternatives_1) { } impl_productionblock_ListAlternatives::impl_productionblock_ListAlternatives(alternatives _alternatives_1, ID _ID_1) : alternatives_1(_alternatives_1), ID_1(_ID_1) { } impl_productionblock_Emptyproductionblock::impl_productionblock_Emptyproductionblock() { } const enum_phyla impl_alternatives::phylum_sel_ = phylum_alternatives; impl_alternatives::impl_alternatives(alternative p1 , alternatives p2) : alternative_1(p1), alternatives_1(p2) { } const enum_phyla impl_alternative::phylum_sel_ = phylum_alternative; impl_alternative_Alternative::impl_alternative_Alternative(ID _ID_1, arguments _arguments_1) : ID_1(_ID_1), arguments_1(_arguments_1) { } const enum_phyla impl_arguments::phylum_sel_ = phylum_arguments; impl_arguments::impl_arguments(ID p1 , arguments p2) : ID_1(p1), arguments_1(p2) { } const enum_phyla impl_argument::phylum_sel_ = phylum_argument; impl_argument_Argument::impl_argument_Argument(ID _ID_1, integer _integer_1) : ID_1(_ID_1), integer_1(_integer_1) { } const enum_phyla impl_Ccode_option::phylum_sel_ = phylum_Ccode_option; impl_Ccode_option_CcodeOption::impl_Ccode_option_CcodeOption(attributes _attributes_1, Ctexts _Ctexts_1) : attributes_1(_attributes_1), Ctexts_1(_Ctexts_1) { } const enum_phyla impl_attributes::phylum_sel_ = phylum_attributes; impl_attributes::impl_attributes(attribute p1 , attributes p2) : attribute_1(p1), attributes_1(p2) { } const enum_phyla impl_attribute::phylum_sel_ = phylum_attribute; impl_attribute_Attribute::impl_attribute_Attribute(ID _ID_1, ID _ID_2, attribute_initialisation_option _attribute_initialisation_option_1) : ID_1(_ID_1), ID_2(_ID_2), attribute_initialisation_option_1(_attribute_initialisation_option_1) { } const enum_phyla impl_attribute_initialisation_option::phylum_sel_ = phylum_attribute_initialisation_option; impl_attribute_initialisation_option_Yesattribute_initialisation::impl_attribute_initialisation_option_Yesattribute_initialisation(Cexpression _Cexpression_1) : Cexpression_1(_Cexpression_1) { } impl_attribute_initialisation_option_Noattribute_initialisation::impl_attribute_initialisation_option_Noattribute_initialisation() { } const enum_phyla impl_Cexpression::phylum_sel_ = phylum_Cexpression; impl_Cexpression::impl_Cexpression(Cexpression_elem p1 , Cexpression p2) : Cexpression_elem_1(p1), Cexpression_1(p2) { } const enum_phyla impl_Cexpression_elem::phylum_sel_ = phylum_Cexpression_elem; impl_Cexpression_elem_CExpressionArray::impl_Cexpression_elem_CExpressionArray(Cexpression _Cexpression_1) : Cexpression_1(_Cexpression_1) { } impl_Cexpression_elem_CExpressionPack::impl_Cexpression_elem_CExpressionPack(Cexpression _Cexpression_1) : Cexpression_1(_Cexpression_1) { } impl_Cexpression_elem_CExpressionSQ::impl_Cexpression_elem_CExpressionSQ(CexpressionSQ _CexpressionSQ_1) : CexpressionSQ_1(_CexpressionSQ_1) { } impl_Cexpression_elem_CExpressionDQ::impl_Cexpression_elem_CExpressionDQ(CexpressionDQ _CexpressionDQ_1) : CexpressionDQ_1(_CexpressionDQ_1) { } impl_Cexpression_elem_CExpressionNl::impl_Cexpression_elem_CExpressionNl() { } impl_Cexpression_elem_CExpressionDollarvar::impl_Cexpression_elem_CExpressionDollarvar(INT _INT_1) : INT_1(_INT_1) { } impl_Cexpression_elem_CExpressionPart::impl_Cexpression_elem_CExpressionPart(casestring _casestring_1) : casestring_1(_casestring_1) { } const enum_phyla impl_CexpressionDQ::phylum_sel_ = phylum_CexpressionDQ; impl_CexpressionDQ::impl_CexpressionDQ(CexpressionDQ_elem p1 , CexpressionDQ p2) : CexpressionDQ_elem_1(p1), CexpressionDQ_1(p2) { } const enum_phyla impl_CexpressionDQ_elem::phylum_sel_ = phylum_CexpressionDQ_elem; impl_CexpressionDQ_elem_CExpressionDQNl::impl_CexpressionDQ_elem_CExpressionDQNl() { } impl_CexpressionDQ_elem_CExpressionDQPart::impl_CexpressionDQ_elem_CExpressionDQPart(casestring _casestring_1) : casestring_1(_casestring_1) { } const enum_phyla impl_CexpressionSQ::phylum_sel_ = phylum_CexpressionSQ; impl_CexpressionSQ::impl_CexpressionSQ(CexpressionSQ_elem p1 , CexpressionSQ p2) : CexpressionSQ_elem_1(p1), CexpressionSQ_1(p2) { } const enum_phyla impl_CexpressionSQ_elem::phylum_sel_ = phylum_CexpressionSQ_elem; impl_CexpressionSQ_elem_CExpressionSQNl::impl_CexpressionSQ_elem_CExpressionSQNl() { } impl_CexpressionSQ_elem_CExpressionSQPart::impl_CexpressionSQ_elem_CExpressionSQPart(casestring _casestring_1) : casestring_1(_casestring_1) { } const enum_phyla impl_idCexpressions::phylum_sel_ = phylum_idCexpressions; impl_idCexpressions::impl_idCexpressions(idCexpression p1 , idCexpressions p2) : idCexpression_1(p1), idCexpressions_1(p2) { } const enum_phyla impl_idCexpression::phylum_sel_ = phylum_idCexpression; impl_idCexpression_IdCexpression::impl_idCexpression_IdCexpression(ID _ID_1, Cexpression _Cexpression_1) : ID_1(_ID_1), Cexpression_1(_Cexpression_1) { } const enum_phyla impl_Ctexts::phylum_sel_ = phylum_Ctexts; impl_Ctexts::impl_Ctexts(Ctext p1 , Ctexts p2) : Ctext_1(p1), Ctexts_1(p2) { } const enum_phyla impl_includefiles::phylum_sel_ = phylum_includefiles; impl_includefiles::impl_includefiles(includefile p1 , includefiles p2) : includefile_1(p1), includefiles_1(p2) { } const enum_phyla impl_includefile::phylum_sel_ = phylum_includefile; impl_includefile_IncludeFile::impl_includefile_IncludeFile(casestring _casestring_1) : casestring_1(_casestring_1) { } const enum_phyla impl_includedeclarations::phylum_sel_ = phylum_includedeclarations; impl_includedeclarations::impl_includedeclarations(includedeclaration p1 , includedeclarations p2) : includedeclaration_1(p1), includedeclarations_1(p2) { } const enum_phyla impl_includedeclaration::phylum_sel_ = phylum_includedeclaration; impl_includedeclaration_IncludeDeclaration::impl_includedeclaration_IncludeDeclaration(casestring _casestring_1) : casestring_1(_casestring_1) { } const enum_phyla impl_rwdeclarations::phylum_sel_ = phylum_rwdeclarations; impl_rwdeclarations::impl_rwdeclarations(rwdeclaration p1 , rwdeclarations p2) : rwdeclaration_1(p1), rwdeclarations_1(p2) { } const enum_phyla impl_rwdeclaration::phylum_sel_ = phylum_rwdeclaration; impl_rwdeclaration_RwDeclaration::impl_rwdeclaration_RwDeclaration(outmostpatterns _outmostpatterns_1, rewriteclauses _rewriteclauses_1) : outmostpatterns_1(_outmostpatterns_1), rewriteclauses_1(_rewriteclauses_1) { } const enum_phyla impl_rewriteclauses::phylum_sel_ = phylum_rewriteclauses; impl_rewriteclauses::impl_rewriteclauses(rewriteclause p1 , rewriteclauses p2) : rewriteclause_1(p1), rewriteclauses_1(p2) { } const enum_phyla impl_rewriteclause::phylum_sel_ = phylum_rewriteclause; impl_rewriteclause_RewriteClause::impl_rewriteclause_RewriteClause(viewnames _viewnames_1, term _term_1) : viewnames_1(_viewnames_1), term_1(_term_1) { } const enum_phyla impl_patternchains::phylum_sel_ = phylum_patternchains; impl_patternchains::impl_patternchains(patternchain p1 , patternchains p2) : patternchain_1(p1), patternchains_1(p2) { } const enum_phyla impl_patternchain::phylum_sel_ = phylum_patternchain; impl_patternchain::impl_patternchain(patternchainitem p1 , patternchain p2) : patternchainitem_1(p1), patternchain_1(p2) { } const enum_phyla impl_outmostpatterns::phylum_sel_ = phylum_outmostpatterns; impl_outmostpatterns::impl_outmostpatterns(outmostpattern p1 , outmostpatterns p2) : outmostpattern_1(p1), outmostpatterns_1(p2) { } const enum_phyla impl_patternchainitem::phylum_sel_ = phylum_patternchainitem; impl_patternchainitem_PatternchainitemDollarid::impl_patternchainitem_PatternchainitemDollarid(ID _ID_1) : ID_1(_ID_1) { } impl_patternchainitem_PatternchainitemGroup::impl_patternchainitem_PatternchainitemGroup(patternchains _patternchains_1) : patternchains_1(_patternchains_1) { } impl_patternchainitem_PatternchainitemOutmost::impl_patternchainitem_PatternchainitemOutmost(outmostpattern _outmostpattern_1) : outmostpattern_1(_outmostpattern_1) { } const enum_phyla impl_outmostpattern::phylum_sel_ = phylum_outmostpattern; impl_outmostpattern_OPDefault::impl_outmostpattern_OPDefault(Cexpression _Cexpression_1) : Cexpression_1(_Cexpression_1) { } impl_outmostpattern_OPWildcard::impl_outmostpattern_OPWildcard(Cexpression _Cexpression_1) : Cexpression_1(_Cexpression_1) { } impl_outmostpattern_OPNonLeafVariable::impl_outmostpattern_OPNonLeafVariable(ID _ID_1, outmostpattern _outmostpattern_1) : ID_1(_ID_1), outmostpattern_1(_outmostpattern_1) { } impl_outmostpattern_OPOperator::impl_outmostpattern_OPOperator(ID _ID_1, patterns _patterns_1, Cexpression _Cexpression_1) : ID_1(_ID_1), patterns_1(_patterns_1), Cexpression_1(_Cexpression_1) { } impl_outmostpattern_OPOperatorWildcard::impl_outmostpattern_OPOperatorWildcard(ID _ID_1, Cexpression _Cexpression_1) : ID_1(_ID_1), Cexpression_1(_Cexpression_1) { } const enum_phyla impl_pattern::phylum_sel_ = phylum_pattern; impl_pattern_PIntLiteral::impl_pattern_PIntLiteral(INT _INT_1) : INT_1(_INT_1) { } impl_pattern_PStringLiteral::impl_pattern_PStringLiteral(CexpressionDQ _CexpressionDQ_1) : CexpressionDQ_1(_CexpressionDQ_1) { } impl_pattern_PWildcard::impl_pattern_PWildcard() { } impl_pattern_PNonLeafVariable::impl_pattern_PNonLeafVariable(ID _ID_1, pattern _pattern_1) : ID_1(_ID_1), pattern_1(_pattern_1) { } impl_pattern_POperator::impl_pattern_POperator(ID _ID_1, patterns _patterns_1) : ID_1(_ID_1), patterns_1(_patterns_1) { } impl_pattern_PVariable::impl_pattern_PVariable(ID _ID_1) : ID_1(_ID_1) { } const enum_phyla impl_patterns::phylum_sel_ = phylum_patterns; impl_patterns::impl_patterns(pattern p1 , patterns p2) : pattern_1(p1), patterns_1(p2) { } const enum_phyla impl_term::phylum_sel_ = phylum_term; impl_term_TIntLiteral::impl_term_TIntLiteral(INT _INT_1) : INT_1(_INT_1) { } impl_term_TStringLiteral::impl_term_TStringLiteral(CexpressionDQ _CexpressionDQ_1) : CexpressionDQ_1(_CexpressionDQ_1) { } impl_term_TCTerm::impl_term_TCTerm(CexpressionSQ _CexpressionSQ_1) : CexpressionSQ_1(_CexpressionSQ_1) { } impl_term_TMemberVarDot::impl_term_TMemberVarDot(term _term_1, ID _ID_1) : term_1(_term_1), ID_1(_ID_1) { } impl_term_TMemberVar::impl_term_TMemberVar(term _term_1, ID _ID_1) : term_1(_term_1), ID_1(_ID_1) { } impl_term_TMethodDot::impl_term_TMethodDot(term _term_1, ID _ID_1, terms _terms_1) : term_1(_term_1), ID_1(_ID_1), terms_1(_terms_1) { } impl_term_TMethod::impl_term_TMethod(term _term_1, ID _ID_1, terms _terms_1) : term_1(_term_1), ID_1(_ID_1), terms_1(_terms_1) { } impl_term_TOperator::impl_term_TOperator(ID _ID_1, terms _terms_1) : ID_1(_ID_1), terms_1(_terms_1) { } impl_term_TVariable::impl_term_TVariable(ID _ID_1) : ID_1(_ID_1) { } const enum_phyla impl_terms::phylum_sel_ = phylum_terms; impl_terms::impl_terms(term p1 , terms p2) : term_1(p1), terms_1(p2) { } const enum_phyla impl_fnfiles::phylum_sel_ = phylum_fnfiles; impl_fnfiles::impl_fnfiles(fnfile p1 , fnfiles p2) : fnfile_1(p1), fnfiles_1(p2) { } const enum_phyla impl_fnfile::phylum_sel_ = phylum_fnfile; impl_fnfile_FnFile::impl_fnfile_FnFile(casestring _casestring_1) : casestring_1(_casestring_1) { } const enum_phyla impl_fndeclarations::phylum_sel_ = phylum_fndeclarations; impl_fndeclarations::impl_fndeclarations(fndeclaration p1 , fndeclarations p2) : fndeclaration_1(p1), fndeclarations_1(p2) { } const enum_phyla impl_fndeclaration::phylum_sel_ = phylum_fndeclaration; impl_fndeclaration_AcMemberDeclaration::impl_fndeclaration_AcMemberDeclaration(ac_declaration_specifiers _ac_declaration_specifiers_1, ac_declarator _ac_declarator_1, ac_constant_expression_option _ac_constant_expression_option_1, fnclass _fnclass_1) : ac_declaration_specifiers_1(_ac_declaration_specifiers_1), ac_declarator_1(_ac_declarator_1), ac_constant_expression_option_1(_ac_constant_expression_option_1), fnclass_1(_fnclass_1) { } impl_fndeclaration_FnAcDeclaration::impl_fndeclaration_FnAcDeclaration(ac_declaration_specifiers _ac_declaration_specifiers_1, ac_declarator _ac_declarator_1, ac_declaration_list _ac_declaration_list_1, ac_opt_base_init_list _ac_opt_base_init_list_1, Ctext _Ctext_1, ID _ID_1, fnclass _fnclass_1) : ac_declaration_specifiers_1(_ac_declaration_specifiers_1), ac_declarator_1(_ac_declarator_1), ac_declaration_list_1(_ac_declaration_list_1), ac_opt_base_init_list_1(_ac_opt_base_init_list_1), Ctext_1(_Ctext_1), ID_1(_ID_1), fnclass_1(_fnclass_1) { } const enum_phyla impl_fnclass::phylum_sel_ = phylum_fnclass; impl_fnclass_ConvOperatorFn::impl_fnclass_ConvOperatorFn() { } impl_fnclass_DestructorFn::impl_fnclass_DestructorFn() { } impl_fnclass_ConstructorFn::impl_fnclass_ConstructorFn() { } impl_fnclass_MemberFn::impl_fnclass_MemberFn() { } impl_fnclass_StaticFn::impl_fnclass_StaticFn(casestring _casestring_1) : casestring_1(_casestring_1) { } impl_fnclass_GlobalFn::impl_fnclass_GlobalFn() { } const enum_phyla impl_Ctext::phylum_sel_ = phylum_Ctext; impl_Ctext::impl_Ctext(Ctext_elem p1 , Ctext p2) : Ctext_elem_1(p1), Ctext_1(p2) { } const enum_phyla impl_Ctext_elem::phylum_sel_ = phylum_Ctext_elem; impl_Ctext_elem_CTextWithexpression::impl_Ctext_elem_CTextWithexpression(withexpressions _withexpressions_1, withcases _withcases_1, contextinfo _contextinfo_1) : withexpressions_1(_withexpressions_1), withcases_1(_withcases_1), contextinfo_1(_contextinfo_1) { } impl_Ctext_elem_CTextForeachexpression::impl_Ctext_elem_CTextForeachexpression(patternchain _patternchain_1, idCexpressions _idCexpressions_1, withexpressions _withexpressions_1, Ctext _Ctext_1, foreach_after _foreach_after_1) : patternchain_1(_patternchain_1), idCexpressions_1(_idCexpressions_1), withexpressions_1(_withexpressions_1), Ctext_1(_Ctext_1), foreach_after_1(_foreach_after_1) { } impl_Ctext_elem_CTextCbody::impl_Ctext_elem_CTextCbody(Ctext _Ctext_1) : Ctext_1(_Ctext_1) { } impl_Ctext_elem_CTextCexpressionSQ::impl_Ctext_elem_CTextCexpressionSQ(CexpressionSQ _CexpressionSQ_1) : CexpressionSQ_1(_CexpressionSQ_1) { } impl_Ctext_elem_CTextCexpressionDQ::impl_Ctext_elem_CTextCexpressionDQ(CexpressionDQ _CexpressionDQ_1) : CexpressionDQ_1(_CexpressionDQ_1) { } impl_Ctext_elem_CTextNl::impl_Ctext_elem_CTextNl(integer _integer_1) : integer_1(_integer_1) { } impl_Ctext_elem_CTextDollarVar::impl_Ctext_elem_CTextDollarVar(INT _INT_1) : INT_1(_INT_1) { } impl_Ctext_elem_CTextLine::impl_Ctext_elem_CTextLine(casestring _casestring_1) : casestring_1(_casestring_1) { } const enum_phyla impl_foreach_after::phylum_sel_ = phylum_foreach_after; impl_foreach_after_ForeachAfter::impl_foreach_after_ForeachAfter(patternchain _patternchain_1, idCexpressions _idCexpressions_1, withexpressions _withexpressions_1, Ctext _Ctext_1) : patternchain_1(_patternchain_1), idCexpressions_1(_idCexpressions_1), withexpressions_1(_withexpressions_1), Ctext_1(_Ctext_1) { } impl_foreach_after_NoForeachAfter::impl_foreach_after_NoForeachAfter() { } const enum_phyla impl_contextinfo::phylum_sel_ = phylum_contextinfo; impl_contextinfo_NotInForeachContext::impl_contextinfo_NotInForeachContext() { } impl_contextinfo_InForeachContext::impl_contextinfo_InForeachContext(patternchain _patternchain_1) : patternchain_1(_patternchain_1) { } const enum_phyla impl_withexpressions::phylum_sel_ = phylum_withexpressions; impl_withexpressions::impl_withexpressions(withexpression p1 , withexpressions p2) : withexpression_1(p1), withexpressions_1(p2) { } const enum_phyla impl_withexpression::phylum_sel_ = phylum_withexpression; impl_withexpression_WECexpression::impl_withexpression_WECexpression(Cexpression _Cexpression_1) : Cexpression_1(_Cexpression_1) { } impl_withexpression_WEVariable::impl_withexpression_WEVariable(ID _ID_1) : ID_1(_ID_1) { } const enum_phyla impl_withcases::phylum_sel_ = phylum_withcases; impl_withcases::impl_withcases(withcase p1 , withcases p2) : withcase_1(p1), withcases_1(p2) { } const enum_phyla impl_withcase::phylum_sel_ = phylum_withcase; impl_withcase_Withcase::impl_withcase_Withcase(patternchains _patternchains_1, Ctext _Ctext_1) : patternchains_1(_patternchains_1), Ctext_1(_Ctext_1) { } const enum_phyla impl_unparsedeclarations::phylum_sel_ = phylum_unparsedeclarations; impl_unparsedeclarations::impl_unparsedeclarations(unparsedeclaration p1 , unparsedeclarations p2) : unparsedeclaration_1(p1), unparsedeclarations_1(p2) { } const enum_phyla impl_unparsedeclaration::phylum_sel_ = phylum_unparsedeclaration; impl_unparsedeclaration_UnparseDeclaration::impl_unparsedeclaration_UnparseDeclaration(outmostpatterns _outmostpatterns_1, unparseclauses _unparseclauses_1) : outmostpatterns_1(_outmostpatterns_1), unparseclauses_1(_unparseclauses_1) { } const enum_phyla impl_unparseclauses::phylum_sel_ = phylum_unparseclauses; impl_unparseclauses::impl_unparseclauses(unparseclause p1 , unparseclauses p2) : unparseclause_1(p1), unparseclauses_1(p2) { } const enum_phyla impl_unparseclause::phylum_sel_ = phylum_unparseclause; impl_unparseclause_UnparseClause::impl_unparseclause_UnparseClause(viewnames _viewnames_1, unparseitems _unparseitems_1) : viewnames_1(_viewnames_1), unparseitems_1(_unparseitems_1) { } const enum_phyla impl_viewnames::phylum_sel_ = phylum_viewnames; impl_viewnames::impl_viewnames(ID p1 , viewnames p2) : ID_1(p1), viewnames_1(p2) { } const enum_phyla impl_unparseitems::phylum_sel_ = phylum_unparseitems; impl_unparseitems::impl_unparseitems(unparseitem p1 , unparseitems p2) : unparseitem_1(p1), unparseitems_1(p2) { } const enum_phyla impl_unparseitem::phylum_sel_ = phylum_unparseitem; impl_unparseitem_UViewVarDecl::impl_unparseitem_UViewVarDecl(ID _ID_1, ID _ID_2, Cexpression _Cexpression_1) : ID_1(_ID_1), ID_2(_ID_2), Cexpression_1(_Cexpression_1) { } impl_unparseitem_UnpBody::impl_unparseitem_UnpBody(languageoption _languageoption_1, unparseitems _unparseitems_1) : languageoption_1(_languageoption_1), unparseitems_1(_unparseitems_1) { } impl_unparseitem_UnpCtext::impl_unparseitem_UnpCtext(languageoption _languageoption_1, Ctext _Ctext_1) : languageoption_1(_languageoption_1), Ctext_1(_Ctext_1) { } impl_unparseitem_UnpSubexpr::impl_unparseitem_UnpSubexpr(languageoption _languageoption_1, unpsubterm _unpsubterm_1, viewnameoption _viewnameoption_1) : languageoption_1(_languageoption_1), unpsubterm_1(_unpsubterm_1), viewnameoption_1(_viewnameoption_1) { } impl_unparseitem_UnpStr::impl_unparseitem_UnpStr(languageoption _languageoption_1, CexpressionDQ _CexpressionDQ_1, viewnameoption _viewnameoption_1) : languageoption_1(_languageoption_1), CexpressionDQ_1(_CexpressionDQ_1), viewnameoption_1(_viewnameoption_1) { } const enum_phyla impl_unpsubterm::phylum_sel_ = phylum_unpsubterm; impl_unpsubterm_UnpCastedVariable::impl_unpsubterm_UnpCastedVariable(ID _ID_1, ID _ID_2) : ID_1(_ID_1), ID_2(_ID_2) { } impl_unpsubterm_UnpDollarvarAttr::impl_unpsubterm_UnpDollarvarAttr(INT _INT_1, unpattributes _unpattributes_1) : INT_1(_INT_1), unpattributes_1(_unpattributes_1) { } impl_unpsubterm_UnpSubAttr::impl_unpsubterm_UnpSubAttr(ID _ID_1, unpattributes _unpattributes_1) : ID_1(_ID_1), unpattributes_1(_unpattributes_1) { } impl_unpsubterm_UnpDollarvarTerm::impl_unpsubterm_UnpDollarvarTerm(INT _INT_1) : INT_1(_INT_1) { } impl_unpsubterm_UnpSubTerm::impl_unpsubterm_UnpSubTerm(ID _ID_1) : ID_1(_ID_1) { } const enum_phyla impl_unpattributes::phylum_sel_ = phylum_unpattributes; impl_unpattributes::impl_unpattributes(ID p1 , unpattributes p2) : ID_1(p1), unpattributes_1(p2) { } const enum_phyla impl_viewnameoption::phylum_sel_ = phylum_viewnameoption; impl_viewnameoption_YesViewname::impl_viewnameoption_YesViewname(ID _ID_1) : ID_1(_ID_1) { } impl_viewnameoption_NoViewname::impl_viewnameoption_NoViewname() { } const enum_phyla impl_languageoption::phylum_sel_ = phylum_languageoption; impl_languageoption_LanguageList::impl_languageoption_LanguageList(languagenames _languagenames_1) : languagenames_1(_languagenames_1) { } impl_languageoption_NoLanguagename::impl_languageoption_NoLanguagename() { } const enum_phyla impl_languagenames::phylum_sel_ = phylum_languagenames; impl_languagenames::impl_languagenames(ID p1 , languagenames p2) : ID_1(p1), languagenames_1(p2) { } const enum_phyla impl_fileline::phylum_sel_ = phylum_fileline; impl_fileline_PosNoFileLine::impl_fileline_PosNoFileLine() { } impl_fileline_NoFileLine::impl_fileline_NoFileLine() { } const enum_phyla impl_scopetypefilelinestack::phylum_sel_ = phylum_scopetypefilelinestack; impl_scopetypefilelinestack::impl_scopetypefilelinestack(scopetypefileline p1 , scopetypefilelinestack p2) : scopetypefileline_1(p1), scopetypefilelinestack_1(p2) { } const enum_phyla impl_scopetypefileline::phylum_sel_ = phylum_scopetypefileline; impl_scopetypefileline_ScopeTypeFileLine::impl_scopetypefileline_ScopeTypeFileLine(integer _integer_1, IDtype _IDtype_1, casestring _casestring_1, integer _integer_2) : integer_1(_integer_1), IDtype_1(_IDtype_1), casestring_1(_casestring_1), integer_2(_integer_2) { } const enum_phyla impl_IDtype::phylum_sel_ = phylum_IDtype; impl_IDtype_ITLanguageName::impl_IDtype_ITLanguageName(integer _integer_1) : integer_1(_integer_1) { } impl_IDtype_ITPatternVariable::impl_IDtype_ITPatternVariable(ID _ID_1, integer _integer_1) : ID_1(_ID_1), integer_1(_integer_1) { } impl_IDtype_ITUserFunction::impl_IDtype_ITUserFunction(fnclass _fnclass_1) : fnclass_1(_fnclass_1) { } impl_IDtype_ITUserRView::impl_IDtype_ITUserRView() { } impl_IDtype_ITPredefinedRView::impl_IDtype_ITPredefinedRView() { } impl_IDtype_ITUViewVar::impl_IDtype_ITUViewVar() { } impl_IDtype_ITUserUView::impl_IDtype_ITUserUView() { } impl_IDtype_ITPredefinedUView::impl_IDtype_ITPredefinedUView() { } impl_IDtype_ITStorageClass::impl_IDtype_ITStorageClass() { } impl_IDtype_ITPredefinedStorageClass::impl_IDtype_ITPredefinedStorageClass() { } impl_IDtype_ITUserOperator::impl_IDtype_ITUserOperator(alternative _alternative_1, ID _ID_1) : alternative_1(_alternative_1), ID_1(_ID_1) { } impl_IDtype_ITPredefinedOperator::impl_IDtype_ITPredefinedOperator(alternative _alternative_1, ID _ID_1) : alternative_1(_alternative_1), ID_1(_ID_1) { } impl_IDtype_ITUserPhylum::impl_IDtype_ITUserPhylum(phylumdeclaration _phylumdeclaration_1) : phylumdeclaration_1(_phylumdeclaration_1) { } impl_IDtype_ITPredefinedPhylum::impl_IDtype_ITPredefinedPhylum(phylumdeclaration _phylumdeclaration_1) : phylumdeclaration_1(_phylumdeclaration_1) { } impl_IDtype_ITUnknown::impl_IDtype_ITUnknown() { } const enum_phyla impl_operators::phylum_sel_ = phylum_operators; impl_operators::impl_operators(ID p1 , operators p2) : ID_1(p1), operators_1(p2) { } const enum_phyla impl_phyla::phylum_sel_ = phylum_phyla; impl_phyla::impl_phyla(ID p1 , phyla p2) : ID_1(p1), phyla_1(p2) { } const enum_phyla impl_variables::phylum_sel_ = phylum_variables; impl_variables::impl_variables(ID p1 , variables p2) : ID_1(p1), variables_1(p2) { } const enum_phyla impl_dollarvarstatus::phylum_sel_ = phylum_dollarvarstatus; impl_dollarvarstatus_DVDisallowed::impl_dollarvarstatus_DVDisallowed() { } impl_dollarvarstatus_DVAllowed::impl_dollarvarstatus_DVAllowed() { } const enum_phyla impl_tribool::phylum_sel_ = phylum_tribool; impl_tribool_Bigger::impl_tribool_Bigger() { } impl_tribool_Smaller::impl_tribool_Smaller() { } impl_tribool_Equal::impl_tribool_Equal() { } const enum_phyla impl_patternrepresentations::phylum_sel_ = phylum_patternrepresentations; impl_patternrepresentations::impl_patternrepresentations(patternrepresentation p1 , patternrepresentations p2) : patternrepresentation_1(p1), patternrepresentations_1(p2) { } const enum_phyla impl_patternrepresentation::phylum_sel_ = phylum_patternrepresentation; impl_patternrepresentation::impl_patternrepresentation(elem_patternrepresentation p1 , patternrepresentation p2) : elem_patternrepresentation_1(p1), patternrepresentation_1(p2) { } const enum_phyla impl_elem_patternrepresentation::phylum_sel_ = phylum_elem_patternrepresentation; impl_elem_patternrepresentation_PRIntLiteral::impl_elem_patternrepresentation_PRIntLiteral(path _path_1, INT _INT_1) : path_1(_path_1), INT_1(_INT_1) { } impl_elem_patternrepresentation_PRStringLiteral::impl_elem_patternrepresentation_PRStringLiteral(path _path_1, CexpressionDQ _CexpressionDQ_1) : path_1(_path_1), CexpressionDQ_1(_CexpressionDQ_1) { } impl_elem_patternrepresentation_PRDefault::impl_elem_patternrepresentation_PRDefault() { } impl_elem_patternrepresentation_PRWildcard::impl_elem_patternrepresentation_PRWildcard(path _path_1) : path_1(_path_1) { } impl_elem_patternrepresentation_PRNonLeafBinding::impl_elem_patternrepresentation_PRNonLeafBinding(path _path_1, ID _ID_1, patternrepresentation _patternrepresentation_1) : path_1(_path_1), ID_1(_ID_1), patternrepresentation_1(_patternrepresentation_1) { } impl_elem_patternrepresentation_PRUserPredicate::impl_elem_patternrepresentation_PRUserPredicate(Cexpression _Cexpression_1) : Cexpression_1(_Cexpression_1) { } impl_elem_patternrepresentation_PROperPredicate::impl_elem_patternrepresentation_PROperPredicate(path _path_1, ID _ID_1) : path_1(_path_1), ID_1(_ID_1) { } impl_elem_patternrepresentation_PRVarPredicate::impl_elem_patternrepresentation_PRVarPredicate(paths _paths_1, ID _ID_1, patternrepresentation _patternrepresentation_1) : paths_1(_paths_1), ID_1(_ID_1), patternrepresentation_1(_patternrepresentation_1) { } impl_elem_patternrepresentation_PRBinding::impl_elem_patternrepresentation_PRBinding(path _path_1, ID _ID_1) : path_1(_path_1), ID_1(_ID_1) { } const enum_phyla impl_path::phylum_sel_ = phylum_path; impl_path::impl_path(integer p1 , path p2) : integer_1(p1), path_1(p2) { } const enum_phyla impl_paths::phylum_sel_ = phylum_paths; impl_paths::impl_paths(path p1 , paths p2) : path_1(p1), paths_1(p2) { } const enum_phyla impl_argsnumbers::phylum_sel_ = phylum_argsnumbers; impl_argsnumbers::impl_argsnumbers(integer p1 , argsnumbers p2) : integer_1(p1), argsnumbers_1(p2) { } const enum_phyla impl_rewriterulesinfo::phylum_sel_ = phylum_rewriterulesinfo; impl_rewriterulesinfo::impl_rewriterulesinfo(rewriteruleinfo p1 , rewriterulesinfo p2) : rewriteruleinfo_1(p1), rewriterulesinfo_1(p2) { } const enum_phyla impl_rewriteruleinfo::phylum_sel_ = phylum_rewriteruleinfo; impl_rewriteruleinfo_Rewriteruleinfo::impl_rewriteruleinfo_Rewriteruleinfo(patternrepresentation _patternrepresentation_1, patternrepresentation _patternrepresentation_2, rewriteclause _rewriteclause_1) : patternrepresentation_1(_patternrepresentation_1), patternrepresentation_2(_patternrepresentation_2), rewriteclause_1(_rewriteclause_1) { } const enum_phyla impl_withcasesinfo::phylum_sel_ = phylum_withcasesinfo; impl_withcasesinfo::impl_withcasesinfo(withcaseinfo p1 , withcasesinfo p2) : withcaseinfo_1(p1), withcasesinfo_1(p2) { } const enum_phyla impl_withcaseinfo::phylum_sel_ = phylum_withcaseinfo; impl_withcaseinfo_Withcaseinfo::impl_withcaseinfo_Withcaseinfo(patternrepresentation _patternrepresentation_1, patternrepresentation _patternrepresentation_2, Ctext _Ctext_1) : patternrepresentation_1(_patternrepresentation_1), patternrepresentation_2(_patternrepresentation_2), Ctext_1(_Ctext_1) { } const enum_phyla impl_rewriteviewsinfo::phylum_sel_ = phylum_rewriteviewsinfo; impl_rewriteviewsinfo::impl_rewriteviewsinfo(rewriteviewinfo p1 , rewriteviewsinfo p2) : rewriteviewinfo_1(p1), rewriteviewsinfo_1(p2) { } const enum_phyla impl_rewriteviewinfo::phylum_sel_ = phylum_rewriteviewinfo; impl_rewriteviewinfo_Rewriteviewinfo::impl_rewriteviewinfo_Rewriteviewinfo(ID _ID_1, rewriterulesinfo _rewriterulesinfo_1) : ID_1(_ID_1), rewriterulesinfo_1(_rewriterulesinfo_1) { } const enum_phyla impl_unparseviewsinfo::phylum_sel_ = phylum_unparseviewsinfo; impl_unparseviewsinfo::impl_unparseviewsinfo(unparseviewinfo p1 , unparseviewsinfo p2) : unparseviewinfo_1(p1), unparseviewsinfo_1(p2) { } const enum_phyla impl_unparseviewinfo::phylum_sel_ = phylum_unparseviewinfo; impl_unparseviewinfo_Unparseviewinfo::impl_unparseviewinfo_Unparseviewinfo(ID _ID_1, unparsedeclsinfo _unparsedeclsinfo_1) : ID_1(_ID_1), unparsedeclsinfo_1(_unparsedeclsinfo_1) { } const enum_phyla impl_unparsedeclsinfo::phylum_sel_ = phylum_unparsedeclsinfo; impl_unparsedeclsinfo::impl_unparsedeclsinfo(unparsedeclinfo p1 , unparsedeclsinfo p2) : unparsedeclinfo_1(p1), unparsedeclsinfo_1(p2) { } const enum_phyla impl_unparsedeclinfo::phylum_sel_ = phylum_unparsedeclinfo; impl_unparsedeclinfo_Unparsedeclinfo::impl_unparsedeclinfo_Unparsedeclinfo(patternrepresentation _patternrepresentation_1, patternrepresentation _patternrepresentation_2, unparseclause _unparseclause_1) : patternrepresentation_1(_patternrepresentation_1), patternrepresentation_2(_patternrepresentation_2), unparseclause_1(_unparseclause_1) { } const enum_phyla impl_ac_declaration::phylum_sel_ = phylum_ac_declaration; impl_ac_declaration_AcDeclaration::impl_ac_declaration_AcDeclaration(ac_declaration_specifiers _ac_declaration_specifiers_1, ac_init_declarator_list _ac_init_declarator_list_1) : ac_declaration_specifiers_1(_ac_declaration_specifiers_1), ac_init_declarator_list_1(_ac_init_declarator_list_1) { } const enum_phyla impl_ac_declaration_list::phylum_sel_ = phylum_ac_declaration_list; impl_ac_declaration_list::impl_ac_declaration_list(ac_declaration p1 , ac_declaration_list p2) : ac_declaration_1(p1), ac_declaration_list_1(p2) { } const enum_phyla impl_ac_declaration_specifiers::phylum_sel_ = phylum_ac_declaration_specifiers; impl_ac_declaration_specifiers::impl_ac_declaration_specifiers(ac_declaration_specifier p1 , ac_declaration_specifiers p2) : ac_declaration_specifier_1(p1), ac_declaration_specifiers_1(p2) { } const enum_phyla impl_ac_declaration_specifier::phylum_sel_ = phylum_ac_declaration_specifier; impl_ac_declaration_specifier_AcDeclSpecTypeQual::impl_ac_declaration_specifier_AcDeclSpecTypeQual(ac_type_qualifier _ac_type_qualifier_1) : ac_type_qualifier_1(_ac_type_qualifier_1) { } impl_ac_declaration_specifier_AcDeclSpecTypeSpec::impl_ac_declaration_specifier_AcDeclSpecTypeSpec(ac_type_specifier _ac_type_specifier_1) : ac_type_specifier_1(_ac_type_specifier_1) { } impl_ac_declaration_specifier_AcDeclSpecStorageSpec::impl_ac_declaration_specifier_AcDeclSpecStorageSpec(ac_storage_class_specifier _ac_storage_class_specifier_1) : ac_storage_class_specifier_1(_ac_storage_class_specifier_1) { } const enum_phyla impl_ac_storage_class_specifier::phylum_sel_ = phylum_ac_storage_class_specifier; impl_ac_storage_class_specifier_AcVirtual::impl_ac_storage_class_specifier_AcVirtual() { } impl_ac_storage_class_specifier_AcTypedef::impl_ac_storage_class_specifier_AcTypedef() { } impl_ac_storage_class_specifier_AcExtern::impl_ac_storage_class_specifier_AcExtern() { } impl_ac_storage_class_specifier_AcStatic::impl_ac_storage_class_specifier_AcStatic() { } impl_ac_storage_class_specifier_AcRegister::impl_ac_storage_class_specifier_AcRegister() { } impl_ac_storage_class_specifier_AcAuto::impl_ac_storage_class_specifier_AcAuto() { } const enum_phyla impl_ac_type_specifier::phylum_sel_ = phylum_ac_type_specifier; impl_ac_type_specifier_AcTypeSpec::impl_ac_type_specifier_AcTypeSpec(ID _ID_1) : ID_1(_ID_1) { } const enum_phyla impl_ac_type_qualifier::phylum_sel_ = phylum_ac_type_qualifier; impl_ac_type_qualifier_AcNoQualifier::impl_ac_type_qualifier_AcNoQualifier() { } impl_ac_type_qualifier_AcUnsigned::impl_ac_type_qualifier_AcUnsigned() { } impl_ac_type_qualifier_AcVolatile::impl_ac_type_qualifier_AcVolatile() { } impl_ac_type_qualifier_AcConst::impl_ac_type_qualifier_AcConst() { } const enum_phyla impl_ac_init_declarator_list::phylum_sel_ = phylum_ac_init_declarator_list; impl_ac_init_declarator_list::impl_ac_init_declarator_list(ac_init_declarator p1 , ac_init_declarator_list p2) : ac_init_declarator_1(p1), ac_init_declarator_list_1(p2) { } const enum_phyla impl_ac_init_declarator::phylum_sel_ = phylum_ac_init_declarator; impl_ac_init_declarator_AcInitDecl::impl_ac_init_declarator_AcInitDecl(ac_declarator _ac_declarator_1) : ac_declarator_1(_ac_declarator_1) { } const enum_phyla impl_ac_declarator::phylum_sel_ = phylum_ac_declarator; impl_ac_declarator_AcDeclarator::impl_ac_declarator_AcDeclarator(ac_pointer_option _ac_pointer_option_1, ac_ref_option _ac_ref_option_1, ac_direct_declarator _ac_direct_declarator_1) : ac_pointer_option_1(_ac_pointer_option_1), ac_ref_option_1(_ac_ref_option_1), ac_direct_declarator_1(_ac_direct_declarator_1) { } const enum_phyla impl_ac_direct_declarator::phylum_sel_ = phylum_ac_direct_declarator; impl_ac_direct_declarator_AcOperatorDeclId::impl_ac_direct_declarator_AcOperatorDeclId(ac_operator_name _ac_operator_name_1) : ac_operator_name_1(_ac_operator_name_1) { } impl_ac_direct_declarator_AcConvOperatorDecl::impl_ac_direct_declarator_AcConvOperatorDecl(ID _ID_1, ID _ID_2) : ID_1(_ID_1), ID_2(_ID_2) { } impl_ac_direct_declarator_AcMemberDecl::impl_ac_direct_declarator_AcMemberDecl(ID _ID_1, ID _ID_2, ac_constant_expression_list _ac_constant_expression_list_1) : ID_1(_ID_1), ID_2(_ID_2), ac_constant_expression_list_1(_ac_constant_expression_list_1) { } impl_ac_direct_declarator_AcQualifiedDeclProto::impl_ac_direct_declarator_AcQualifiedDeclProto(ac_class_qualifier_list _ac_class_qualifier_list_1, ac_direct_declarator _ac_direct_declarator_1, ac_parameter_type_list _ac_parameter_type_list_1, ac_type_qualifier _ac_type_qualifier_1) : ac_class_qualifier_list_1(_ac_class_qualifier_list_1), ac_direct_declarator_1(_ac_direct_declarator_1), ac_parameter_type_list_1(_ac_parameter_type_list_1), ac_type_qualifier_1(_ac_type_qualifier_1) { } impl_ac_direct_declarator_AcDirectDeclProto::impl_ac_direct_declarator_AcDirectDeclProto(ac_direct_declarator _ac_direct_declarator_1, ac_parameter_type_list _ac_parameter_type_list_1) : ac_direct_declarator_1(_ac_direct_declarator_1), ac_parameter_type_list_1(_ac_parameter_type_list_1) { } impl_ac_direct_declarator_AcDirectDeclArray::impl_ac_direct_declarator_AcDirectDeclArray(ac_direct_declarator _ac_direct_declarator_1, ac_constant_expression_option _ac_constant_expression_option_1) : ac_direct_declarator_1(_ac_direct_declarator_1), ac_constant_expression_option_1(_ac_constant_expression_option_1) { } impl_ac_direct_declarator_AcDirectDeclPack::impl_ac_direct_declarator_AcDirectDeclPack(ac_declarator _ac_declarator_1) : ac_declarator_1(_ac_declarator_1) { } impl_ac_direct_declarator_AcDirectDeclId::impl_ac_direct_declarator_AcDirectDeclId(ID _ID_1) : ID_1(_ID_1) { } const enum_phyla impl_ac_pointer_option::phylum_sel_ = phylum_ac_pointer_option; impl_ac_pointer_option_Yespointer::impl_ac_pointer_option_Yespointer(ac_pointer _ac_pointer_1) : ac_pointer_1(_ac_pointer_1) { } impl_ac_pointer_option_Nopointer::impl_ac_pointer_option_Nopointer() { } const enum_phyla impl_ac_pointer::phylum_sel_ = phylum_ac_pointer; impl_ac_pointer_AcPointerCons::impl_ac_pointer_AcPointerCons(ac_type_qualifier_list _ac_type_qualifier_list_1, ac_pointer _ac_pointer_1) : ac_type_qualifier_list_1(_ac_type_qualifier_list_1), ac_pointer_1(_ac_pointer_1) { } impl_ac_pointer_AcPointerNil::impl_ac_pointer_AcPointerNil(ac_type_qualifier_list _ac_type_qualifier_list_1) : ac_type_qualifier_list_1(_ac_type_qualifier_list_1) { } const enum_phyla impl_ac_ref_option::phylum_sel_ = phylum_ac_ref_option; impl_ac_ref_option_AcRef::impl_ac_ref_option_AcRef() { } impl_ac_ref_option_AcNoRef::impl_ac_ref_option_AcNoRef() { } const enum_phyla impl_ac_operator_name::phylum_sel_ = phylum_ac_operator_name; impl_ac_operator_name_AcOperatorName::impl_ac_operator_name_AcOperatorName(casestring _casestring_1) : casestring_1(_casestring_1) { } const enum_phyla impl_ac_class_qualifier_help_list::phylum_sel_ = phylum_ac_class_qualifier_help_list; impl_ac_class_qualifier_help_list::impl_ac_class_qualifier_help_list(ac_direct_declarator p1 , ac_class_qualifier_help_list p2) : ac_direct_declarator_1(p1), ac_class_qualifier_help_list_1(p2) { } const enum_phyla impl_ac_class_qualifier_list::phylum_sel_ = phylum_ac_class_qualifier_list; impl_ac_class_qualifier_list::impl_ac_class_qualifier_list(ID p1 , ac_class_qualifier_list p2) : ID_1(p1), ac_class_qualifier_list_1(p2) { } const enum_phyla impl_ac_type_qualifier_list::phylum_sel_ = phylum_ac_type_qualifier_list; impl_ac_type_qualifier_list::impl_ac_type_qualifier_list(ac_type_qualifier p1 , ac_type_qualifier_list p2) : ac_type_qualifier_1(p1), ac_type_qualifier_list_1(p2) { } const enum_phyla impl_ac_parameter_type_list::phylum_sel_ = phylum_ac_parameter_type_list; impl_ac_parameter_type_list_AcParList3Dot::impl_ac_parameter_type_list_AcParList3Dot(ac_parameter_list _ac_parameter_list_1) : ac_parameter_list_1(_ac_parameter_list_1) { } impl_ac_parameter_type_list_AcParList::impl_ac_parameter_type_list_AcParList(ac_parameter_list _ac_parameter_list_1) : ac_parameter_list_1(_ac_parameter_list_1) { } const enum_phyla impl_ac_parameter_list::phylum_sel_ = phylum_ac_parameter_list; impl_ac_parameter_list::impl_ac_parameter_list(ac_parameter_declaration p1 , ac_parameter_list p2) : ac_parameter_declaration_1(p1), ac_parameter_list_1(p2) { } const enum_phyla impl_ac_parameter_declaration::phylum_sel_ = phylum_ac_parameter_declaration; impl_ac_parameter_declaration_AcParDeclAbsdecl::impl_ac_parameter_declaration_AcParDeclAbsdecl(ac_declaration_specifiers _ac_declaration_specifiers_1, ac_abstract_declarator _ac_abstract_declarator_1, ac_constant_expression_option _ac_constant_expression_option_1) : ac_declaration_specifiers_1(_ac_declaration_specifiers_1), ac_abstract_declarator_1(_ac_abstract_declarator_1), ac_constant_expression_option_1(_ac_constant_expression_option_1) { } impl_ac_parameter_declaration_AcParDeclDecl::impl_ac_parameter_declaration_AcParDeclDecl(ac_declaration_specifiers _ac_declaration_specifiers_1, ac_declarator _ac_declarator_1, ac_constant_expression_option _ac_constant_expression_option_1) : ac_declaration_specifiers_1(_ac_declaration_specifiers_1), ac_declarator_1(_ac_declarator_1), ac_constant_expression_option_1(_ac_constant_expression_option_1) { } const enum_phyla impl_ac_identifier_list::phylum_sel_ = phylum_ac_identifier_list; impl_ac_identifier_list::impl_ac_identifier_list(ID p1 , ac_identifier_list p2) : ID_1(p1), ac_identifier_list_1(p2) { } const enum_phyla impl_ac_abstract_declarator::phylum_sel_ = phylum_ac_abstract_declarator; impl_ac_abstract_declarator_AcAbsdeclDirdecl::impl_ac_abstract_declarator_AcAbsdeclDirdecl(ac_pointer_option _ac_pointer_option_1, ac_direct_abstract_declarator _ac_direct_abstract_declarator_1) : ac_pointer_option_1(_ac_pointer_option_1), ac_direct_abstract_declarator_1(_ac_direct_abstract_declarator_1) { } impl_ac_abstract_declarator_AcAbsdeclPointer::impl_ac_abstract_declarator_AcAbsdeclPointer(ac_pointer _ac_pointer_1) : ac_pointer_1(_ac_pointer_1) { } const enum_phyla impl_ac_direct_abstract_declarator_option::phylum_sel_ = phylum_ac_direct_abstract_declarator_option; impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator::impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator(ac_direct_abstract_declarator _ac_direct_abstract_declarator_1) : ac_direct_abstract_declarator_1(_ac_direct_abstract_declarator_1) { } impl_ac_direct_abstract_declarator_option_Noac_direct_abstract_declarator::impl_ac_direct_abstract_declarator_option_Noac_direct_abstract_declarator() { } const enum_phyla impl_ac_direct_abstract_declarator::phylum_sel_ = phylum_ac_direct_abstract_declarator; impl_ac_direct_abstract_declarator_AcDirAbsdeclFn::impl_ac_direct_abstract_declarator_AcDirAbsdeclFn(ac_direct_abstract_declarator_option _ac_direct_abstract_declarator_option_1, ac_parameter_type_list _ac_parameter_type_list_1) : ac_direct_abstract_declarator_option_1(_ac_direct_abstract_declarator_option_1), ac_parameter_type_list_1(_ac_parameter_type_list_1) { } impl_ac_direct_abstract_declarator_AcDirAbsdeclArray::impl_ac_direct_abstract_declarator_AcDirAbsdeclArray(ac_direct_abstract_declarator_option _ac_direct_abstract_declarator_option_1, ac_constant_expression_option _ac_constant_expression_option_1) : ac_direct_abstract_declarator_option_1(_ac_direct_abstract_declarator_option_1), ac_constant_expression_option_1(_ac_constant_expression_option_1) { } impl_ac_direct_abstract_declarator_AcDirAbsdeclPack::impl_ac_direct_abstract_declarator_AcDirAbsdeclPack(ac_abstract_declarator _ac_abstract_declarator_1) : ac_abstract_declarator_1(_ac_abstract_declarator_1) { } const enum_phyla impl_ac_constant_expression_option::phylum_sel_ = phylum_ac_constant_expression_option; impl_ac_constant_expression_option_Noac_constant_expression::impl_ac_constant_expression_option_Noac_constant_expression() { } impl_ac_constant_expression_option_Yesac_constant_expression::impl_ac_constant_expression_option_Yesac_constant_expression(ac_constant_expression _ac_constant_expression_1) : ac_constant_expression_1(_ac_constant_expression_1) { } const enum_phyla impl_ac_constant_expression::phylum_sel_ = phylum_ac_constant_expression; impl_ac_constant_expression_AcConstExpr::impl_ac_constant_expression_AcConstExpr(Cexpression _Cexpression_1) : Cexpression_1(_Cexpression_1) { } const enum_phyla impl_ac_constant_expression_list::phylum_sel_ = phylum_ac_constant_expression_list; impl_ac_constant_expression_list::impl_ac_constant_expression_list(ac_constant_expression p1 , ac_constant_expression_list p2) : ac_constant_expression_1(p1), ac_constant_expression_list_1(p2) { } const enum_phyla impl_ac_opt_base_init_list::phylum_sel_ = phylum_ac_opt_base_init_list; impl_ac_opt_base_init_list_AcYesBaseInit::impl_ac_opt_base_init_list_AcYesBaseInit(ac_base_init_list _ac_base_init_list_1) : ac_base_init_list_1(_ac_base_init_list_1) { } impl_ac_opt_base_init_list_AcNoBaseInit::impl_ac_opt_base_init_list_AcNoBaseInit() { } const enum_phyla impl_ac_base_init_list::phylum_sel_ = phylum_ac_base_init_list; impl_ac_base_init_list::impl_ac_base_init_list(ac_base_init p1 , ac_base_init_list p2) : ac_base_init_1(p1), ac_base_init_list_1(p2) { } const enum_phyla impl_ac_base_init::phylum_sel_ = phylum_ac_base_init; impl_ac_base_init_AcBaseInit::impl_ac_base_init_AcBaseInit(ID _ID_1, ac_constant_expression_list _ac_constant_expression_list_1) : ID_1(_ID_1), ac_constant_expression_list_1(_ac_constant_expression_list_1) { } const enum_phyla impl_baseclass_declarations::phylum_sel_ = phylum_baseclass_declarations; impl_baseclass_declarations::impl_baseclass_declarations(baseclass_decl p1 , baseclass_declarations p2) : baseclass_decl_1(p1), baseclass_declarations_1(p2) { } const enum_phyla impl_baseclass_decl::phylum_sel_ = phylum_baseclass_decl; impl_baseclass_decl_BaseClassDecl::impl_baseclass_decl_BaseClassDecl(ID _ID_1, baseclass_list _baseclass_list_1) : ID_1(_ID_1), baseclass_list_1(_baseclass_list_1) { } const enum_phyla impl_baseclass_list::phylum_sel_ = phylum_baseclass_list; impl_baseclass_list::impl_baseclass_list(ID p1 , baseclass_list p2) : ID_1(p1), baseclass_list_1(p2) { } const enum_phyla impl_error::phylum_sel_ = phylum_error; impl_error_Warning::impl_error_Warning(fileline _fileline_1, problem _problem_1) : fileline_1(_fileline_1), problem_1(_problem_1) { } impl_error_NonFatal::impl_error_NonFatal(fileline _fileline_1, problem _problem_1) : fileline_1(_fileline_1), problem_1(_problem_1) { } impl_error_Fatal::impl_error_Fatal(fileline _fileline_1, problem _problem_1) : fileline_1(_fileline_1), problem_1(_problem_1) { } const enum_phyla impl_problem::phylum_sel_ = phylum_problem; impl_problem_Problem6::impl_problem_Problem6(casestring _casestring_1, casestring _casestring_2, casestring _casestring_3, casestring _casestring_4, casestring _casestring_5, casestring _casestring_6) : casestring_1(_casestring_1), casestring_2(_casestring_2), casestring_3(_casestring_3), casestring_4(_casestring_4), casestring_5(_casestring_5), casestring_6(_casestring_6) { } impl_problem_Problem5::impl_problem_Problem5(casestring _casestring_1, casestring _casestring_2, casestring _casestring_3, casestring _casestring_4, casestring _casestring_5) : casestring_1(_casestring_1), casestring_2(_casestring_2), casestring_3(_casestring_3), casestring_4(_casestring_4), casestring_5(_casestring_5) { } impl_problem_Problem4::impl_problem_Problem4(casestring _casestring_1, casestring _casestring_2, casestring _casestring_3, casestring _casestring_4) : casestring_1(_casestring_1), casestring_2(_casestring_2), casestring_3(_casestring_3), casestring_4(_casestring_4) { } impl_problem_Problem3int1::impl_problem_Problem3int1(casestring _casestring_1, casestring _casestring_2, casestring _casestring_3, integer _integer_1, casestring _casestring_4) : casestring_1(_casestring_1), casestring_2(_casestring_2), casestring_3(_casestring_3), integer_1(_integer_1), casestring_4(_casestring_4) { } impl_problem_Problem3::impl_problem_Problem3(casestring _casestring_1, casestring _casestring_2, casestring _casestring_3) : casestring_1(_casestring_1), casestring_2(_casestring_2), casestring_3(_casestring_3) { } impl_problem_Problem2::impl_problem_Problem2(casestring _casestring_1, casestring _casestring_2) : casestring_1(_casestring_1), casestring_2(_casestring_2) { } impl_problem_Problem1storageoption1ID::impl_problem_Problem1storageoption1ID(casestring _casestring_1, storageoption _storageoption_1, casestring _casestring_2, ID _ID_1) : casestring_1(_casestring_1), storageoption_1(_storageoption_1), casestring_2(_casestring_2), ID_1(_ID_1) { } impl_problem_Problem1INT1ID1ID::impl_problem_Problem1INT1ID1ID(casestring _casestring_1, INT _INT_1, casestring _casestring_2, ID _ID_1, casestring _casestring_3, ID _ID_2) : casestring_1(_casestring_1), INT_1(_INT_1), casestring_2(_casestring_2), ID_1(_ID_1), casestring_3(_casestring_3), ID_2(_ID_2) { } impl_problem_Problem1ID1ID1ID::impl_problem_Problem1ID1ID1ID(casestring _casestring_1, ID _ID_1, casestring _casestring_2, ID _ID_2, casestring _casestring_3, ID _ID_3) : casestring_1(_casestring_1), ID_1(_ID_1), casestring_2(_casestring_2), ID_2(_ID_2), casestring_3(_casestring_3), ID_3(_ID_3) { } impl_problem_Problem1INT1ID::impl_problem_Problem1INT1ID(casestring _casestring_1, INT _INT_1, casestring _casestring_2, ID _ID_1) : casestring_1(_casestring_1), INT_1(_INT_1), casestring_2(_casestring_2), ID_1(_ID_1) { } impl_problem_Problem1int1::impl_problem_Problem1int1(casestring _casestring_1, integer _integer_1, casestring _casestring_2) : casestring_1(_casestring_1), integer_1(_integer_1), casestring_2(_casestring_2) { } impl_problem_Problem1INT::impl_problem_Problem1INT(casestring _casestring_1, INT _INT_1) : casestring_1(_casestring_1), INT_1(_INT_1) { } impl_problem_Problem1t1ID::impl_problem_Problem1t1ID(casestring _casestring_1, IDtype _IDtype_1, casestring _casestring_2, ID _ID_1) : casestring_1(_casestring_1), IDtype_1(_IDtype_1), casestring_2(_casestring_2), ID_1(_ID_1) { } impl_problem_Problem1ID1ID::impl_problem_Problem1ID1ID(casestring _casestring_1, ID _ID_1, casestring _casestring_2, ID _ID_2) : casestring_1(_casestring_1), ID_1(_ID_1), casestring_2(_casestring_2), ID_2(_ID_2) { } impl_problem_Problem1we::impl_problem_Problem1we(casestring _casestring_1, withexpression _withexpression_1) : casestring_1(_casestring_1), withexpression_1(_withexpression_1) { } impl_problem_Problem1tID::impl_problem_Problem1tID(casestring _casestring_1, ID _ID_1) : casestring_1(_casestring_1), ID_1(_ID_1) { } impl_problem_Problem1ID::impl_problem_Problem1ID(casestring _casestring_1, ID _ID_1) : casestring_1(_casestring_1), ID_1(_ID_1) { } impl_problem_Problem1::impl_problem_Problem1(casestring _casestring_1) : casestring_1(_casestring_1) { } const enum_phyla impl_addedphylumdeclarations::phylum_sel_ = phylum_addedphylumdeclarations; impl_addedphylumdeclarations::impl_addedphylumdeclarations(addedphylumdeclaration p1 , addedphylumdeclarations p2) : addedphylumdeclaration_1(p1), addedphylumdeclarations_1(p2) { } const enum_phyla impl_addedphylumdeclaration::phylum_sel_ = phylum_addedphylumdeclaration; impl_addedphylumdeclaration_AddedPhylumdeclaration::impl_addedphylumdeclaration_AddedPhylumdeclaration(uniqID _uniqID_1) : uniqID_1(_uniqID_1) { } const enum_phyla impl_countedphylumdeclarations::phylum_sel_ = phylum_countedphylumdeclarations; impl_countedphylumdeclarations::impl_countedphylumdeclarations(countedphylumdeclaration p1 , countedphylumdeclarations p2) : countedphylumdeclaration_1(p1), countedphylumdeclarations_1(p2) { } const enum_phyla impl_countedphylumdeclaration::phylum_sel_ = phylum_countedphylumdeclaration; impl_countedphylumdeclaration_CountedPhylumdeclaration::impl_countedphylumdeclaration_CountedPhylumdeclaration(uniqID _uniqID_1) : uniqID_1(_uniqID_1) { } const enum_phyla impl_charruns::phylum_sel_ = phylum_charruns; impl_charruns_Stars::impl_charruns_Stars() { } impl_charruns_QuotedNewlines::impl_charruns_QuotedNewlines() { } impl_charruns_Newlines::impl_charruns_Newlines() { } const enum_phyla impl_bindingidmarks::phylum_sel_ = phylum_bindingidmarks; impl_bindingidmarks::impl_bindingidmarks(bindingidmark p1 , bindingidmarks p2) : bindingidmark_1(p1), bindingidmarks_1(p2) { } const enum_phyla impl_bindingidmark::phylum_sel_ = phylum_bindingidmark; impl_bindingidmark_BindingIdMark::impl_bindingidmark_BindingIdMark(uniqID _uniqID_1) : uniqID_1(_uniqID_1) { } #ifdef KC_STATISTICS KC_OPERATOR_STATISTICS operator_statistics[KC_NO_OF_OPERATORS]; static int kc_casestring_strlen =0; static int kc_nocasestring_strlen =0; # define KC_COLLECT_STATS0(v) v #else # define KC_COLLECT_STATS0(v) #endif #ifndef KC_CREATE_STATS # define KC_CREATE_STATS(oper) operator_statistics[oper].created++; #endif #ifndef KC_EXISTINGNOTFOUND_STATS # define KC_EXISTINGNOTFOUND_STATS(oper) operator_statistics[oper].existing_not_found++; #endif #ifndef KC_FREE_CALLED_STATS # define KC_FREE_CALLED_STATS(oper,rec) operator_statistics[oper].free_called[(rec?true:false)]++; #endif #ifndef KC_FREED_STATS # define KC_FREED_STATS(oper,rec) operator_statistics[oper].freed[(rec?true:false)]++; #endif static hashtable_struct_t kc_not_uniq_static_hashtable; static hashtable_struct_t uniq_static_hashtable; bool kc_storageclass_still_uniq[] = { true, true }; hashtable_t hashtables[] = { &kc_not_uniq_static_hashtable, &uniq_static_hashtable, }; const char* kc_storageclassnames[] = { "kc_not_uniq", "uniq" }; namespace { // all local to k.cc uniqID kc_initialize_uniqID(uniqID kc_x) { kc_x->type = ITUnknown(); kc_x->line = 0; kc_x->file = mkcasestring(""); kc_x->scopeinfo = Nilscopetypefilelinestack(); return kc_x; } ID kc_initialize_ID(ID kc_x) { kc_x->type = ITUnknown(); kc_x->named_subphylum = 0; kc_x->line = 0; kc_x->file = mkcasestring(""); return kc_x; } INT kc_initialize_INT(INT kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); return kc_x; } STRING kc_initialize_STRING(STRING kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); return kc_x; } phylumdeclaration kc_initialize_phylumdeclaration(phylumdeclaration kc_x) { kc_x->marked = 0; kc_x->additional_members = Nilfndeclarations(); kc_x->base_classes = Nilbaseclass_list(); return kc_x; } storageclasses kc_initialize_storageclasses(storageclasses kc_x) { kc_x->phyla = Nilphylumnames(); return kc_x; } alternative kc_initialize_alternative(alternative kc_x) { kc_x->rewriteinfo = Nilrewriterulesinfo(); kc_x->unparseinfo = Nilunparsedeclsinfo(); kc_x->additional_members = Nilfndeclarations(); kc_x->base_classes = Nilbaseclass_list(); return kc_x; } Cexpression kc_initialize_Cexpression(Cexpression kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); return kc_x; } idCexpression kc_initialize_idCexpression(idCexpression kc_x) { kc_x->id = f_emptyId(); return kc_x; } includefile kc_initialize_includefile(includefile kc_x) { kc_x->inc_type = include_unknown; kc_x->inc[0] = Nilincludedeclarations(); kc_x->inc[1] = Nilincludedeclarations(); if (Theincludefiles == 0) { Theincludefiles = Consincludefiles( kc_x, Nilincludefiles()); } else { Theincludefiles = Consincludefiles( kc_x, Theincludefiles); } return kc_x; } includedeclaration kc_initialize_includedeclaration(includedeclaration kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); return kc_x; } patternchains kc_initialize_patternchains(patternchains kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); return kc_x; } patternchain kc_initialize_patternchain(patternchain kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); return kc_x; } patternchainitem kc_initialize_patternchainitem(patternchainitem kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); kc_x->type = f_emptyId(); return kc_x; } outmostpattern kc_initialize_outmostpattern(outmostpattern kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); kc_x->type = f_emptyId(); return kc_x; } term kc_initialize_term(term kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); return kc_x; } fnfile kc_initialize_fnfile(fnfile kc_x) { kc_x->fns = Nilfndeclarations(); if (Thefnfiles == 0) { Thefnfiles = Consfnfiles( kc_x, Nilfnfiles()); } else { Thefnfiles = Consfnfiles( kc_x, Thefnfiles); } return kc_x; } fndeclaration kc_initialize_fndeclaration(fndeclaration kc_x) { kc_x->last_line = 0; kc_x->file = mkcasestring(""); { fndeclaration kc_selvar_0_1 = phylum_cast(kc_x); if ((kc_selvar_0_1->prod_sel() == sel_FnAcDeclaration)) { const ac_declarator fn_args = phylum_cast(kc_selvar_0_1)->ac_declarator_1; const ac_declaration_list C_vardecls = phylum_cast(kc_selvar_0_1)->ac_declaration_list_1; kc_selvar_0_1->sorted = sort_extend_parameter_type_list( C_vardecls, fn_args ); } else { kc_selvar_0_1->sorted = AcParList( Nilac_parameter_list() ); } } return kc_x; } Ctext kc_initialize_Ctext(Ctext kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); return kc_x; } Ctext_elem kc_initialize_Ctext_elem(Ctext_elem kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); return kc_x; } foreach_after kc_initialize_foreach_after(foreach_after kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); return kc_x; } withexpressions kc_initialize_withexpressions(withexpressions kc_x) { kc_x->type = 0; kc_x->line = 0; kc_x->file = mkcasestring(""); { withexpressions kc_selvar_0_1 = phylum_cast(kc_x); if ((kc_selvar_0_1->prod_sel() == sel_Conswithexpressions)) { const withexpression h = (kc_selvar_0_1)->withexpression_1; const withexpressions t = (kc_selvar_0_1)->withexpressions_1; kc_selvar_0_1->type = Consphylumnames( h->type, t->type ); kc_selvar_0_1->line = h->line; kc_selvar_0_1->file = h->file; } else if ((kc_selvar_0_1->prod_sel() == sel_Nilwithexpressions)) { kc_selvar_0_1->type = Nilphylumnames(); } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } return kc_x; } withexpression kc_initialize_withexpression(withexpression kc_x) { kc_x->type = f_emptyId(); kc_x->line = 0; kc_x->file = mkcasestring(""); { withexpression kc_selvar_0_1 = phylum_cast(kc_x); if ((kc_selvar_0_1->prod_sel() == sel_WECexpression)) { const Cexpression e = phylum_cast(kc_selvar_0_1)->Cexpression_1; kc_selvar_0_1->line = e->line; kc_selvar_0_1->file = e->file; } else if ((kc_selvar_0_1->prod_sel() == sel_WEVariable)) { const ID id = phylum_cast(kc_selvar_0_1)->ID_1; kc_selvar_0_1->line = id->line; kc_selvar_0_1->file = id->file; } else kc_no_default_in_with( "", __LINE__, __FILE__ ); } return kc_x; } viewnames kc_initialize_viewnames(viewnames kc_x) { kc_x->is_extern = false; return kc_x; } unparseitem kc_initialize_unparseitem(unparseitem kc_x) { kc_x->text_nr = 0; return kc_x; } elem_patternrepresentation kc_initialize_elem_patternrepresentation(elem_patternrepresentation kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); kc_x->type = f_emptyId(); return kc_x; } path kc_initialize_path(path kc_x) { kc_x->op = f_emptyId(); kc_x->id = f_emptyId(); return kc_x; } ac_operator_name kc_initialize_ac_operator_name(ac_operator_name kc_x) { kc_x->line = 0; kc_x->file = mkcasestring(""); return kc_x; } addedphylumdeclaration kc_initialize_addedphylumdeclaration(addedphylumdeclaration kc_x) { kc_x->added = false; if (!pl_addedphylumdeclarations) pl_addedphylumdeclarations = Consaddedphylumdeclarations( kc_x, Niladdedphylumdeclarations() ); else pl_addedphylumdeclarations = Consaddedphylumdeclarations( kc_x, pl_addedphylumdeclarations ); return kc_x; } countedphylumdeclaration kc_initialize_countedphylumdeclaration(countedphylumdeclaration kc_x) { kc_x->count = 0; if (!pl_countedphylumdeclarations) pl_countedphylumdeclarations = Conscountedphylumdeclarations( kc_x, Nilcountedphylumdeclarations() ); else pl_countedphylumdeclarations = Conscountedphylumdeclarations( kc_x, pl_countedphylumdeclarations ); return kc_x; } bindingidmark kc_initialize_bindingidmark(bindingidmark kc_x) { kc_x->marked = false; if (! Thebindingidmarks) Thebindingidmarks = Consbindingidmarks( kc_x, Nilbindingidmarks() ); else Thebindingidmarks = Consbindingidmarks( kc_x, Thebindingidmarks ); return kc_x; } } // namespace enum_phyla impl_abstract_phylum::phylum() const { return operator_info[prod_sel()].phylum; } const char* impl_abstract_phylum::phylum_name() const { return phylum_info[phylum()].name; } const char* impl_abstract_phylum::op_name() const { return operator_info[prod_sel()].name; } casestring mkcasestring(const kc_char_t *kc_s, int length) { KC_COLLECT_STATS0(KC_CREATE_STATS(sel__Str)); casestring kc_x=new impl_casestring__Str(kc_s); if(length>=0) kc_x->make_own(length); casestring unique_kc_x=hashtables[uniq]->ht_check_insert((casestring)kc_x); if(unique_kc_x!=kc_x) { if(length<0) kc_x->name=0; delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel__Str)); if(length<0) kc_x->make_own(static_cast(kc_strlen(kc_s))); kc_x->post_create(); } return kc_x; } nocasestring mknocasestring(const kc_char_t *kc_s, int length) { KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NoCaseStr)); nocasestring kc_x=new impl_nocasestring_NoCaseStr(kc_s); if(length>=0) kc_x->make_own(length); nocasestring unique_kc_x=hashtables[uniq]->ht_check_insert((nocasestring)kc_x); if(unique_kc_x!=kc_x) { if(length<0) kc_x->name=0; delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NoCaseStr)); if(length<0) kc_x->make_own(static_cast(kc_strlen(kc_s))); kc_x->post_create(); } return kc_x; } integer mkinteger(const INTEGER kc_i) { KC_COLLECT_STATS0(KC_CREATE_STATS(sel__Int)); integer kc_x =new impl_integer__Int(kc_i); integer unique_kc_x=hashtables[uniq]->ht_check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel__Int)); kc_x->post_create(); } return kc_x; } real mkreal(const REAL kc_r) { KC_COLLECT_STATS0(KC_CREATE_STATS(sel__Real)); real kc_x=new impl_real__Real(kc_r); real unique_kc_x=hashtables[uniq]->ht_check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel__Real)); kc_x->post_create(); } return kc_x; } voidptr mkvoidptr(void *kc_p) { KC_COLLECT_STATS0(KC_CREATE_STATS(sel__VoidPtr)); voidptr kc_x=new impl_voidptr__VoidPtr(kc_p); voidptr unique_kc_x=hashtables[uniq]->ht_check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel__VoidPtr)); kc_x->post_create(); } return kc_x; } impl_uniqID_Str* Str(casestring _casestring_1) { assertPhylum(_casestring_1, phylum_casestring); uniqID kc_x=new impl_uniqID_Str(_casestring_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Str)); uniqID unique_kc_x= hashtables[uniq]->ht_check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Str)); kc_x->post_create(); kc_x = kc_initialize_uniqID(kc_x); } return static_cast(kc_x); } impl_ID_Id* Id(uniqID _uniqID_1) { assertPhylum(_uniqID_1, phylum_uniqID); ID kc_x = new impl_ID_Id(_uniqID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Id)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Id)); kc_x->post_create(); kc_x = kc_initialize_ID(kc_x); return static_cast(kc_x); } impl_INT_Int* Int(integer _integer_1) { assertPhylum(_integer_1, phylum_integer); INT kc_x = new impl_INT_Int(_integer_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Int)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Int)); kc_x->post_create(); kc_x = kc_initialize_INT(kc_x); return static_cast(kc_x); } impl_STRING_String* String(casestring _casestring_1) { assertPhylum(_casestring_1, phylum_casestring); STRING kc_x = new impl_STRING_String(_casestring_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_String)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_String)); kc_x->post_create(); kc_x = kc_initialize_STRING(kc_x); return static_cast(kc_x); } impl_phylumdeclarationsroot_PhylumDeclarations* PhylumDeclarations(phylumdeclarations _phylumdeclarations_1) { assertPhylum(_phylumdeclarations_1, phylum_phylumdeclarations); phylumdeclarationsroot kc_x = new impl_phylumdeclarationsroot_PhylumDeclarations(_phylumdeclarations_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PhylumDeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PhylumDeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_phylumdeclarations* Nilphylumdeclarations() { phylumdeclarations kc_x = new impl_phylumdeclarations(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilphylumdeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilphylumdeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_phylumdeclarations* Consphylumdeclarations(phylumdeclaration _phylumdeclaration_1, phylumdeclarations _phylumdeclarations_1) { assertPhylum(_phylumdeclaration_1, phylum_phylumdeclaration); assertPhylum(_phylumdeclarations_1, phylum_phylumdeclarations); phylumdeclarations kc_x = new impl_phylumdeclarations(_phylumdeclaration_1, _phylumdeclarations_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consphylumdeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consphylumdeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_phylumnames* Nilphylumnames() { phylumnames kc_x = new impl_phylumnames(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilphylumnames)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilphylumnames)); kc_x->post_create(); return static_cast(kc_x); } impl_phylumnames* Consphylumnames(ID _ID_1, phylumnames _phylumnames_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_phylumnames_1, phylum_phylumnames); phylumnames kc_x = new impl_phylumnames(_ID_1, _phylumnames_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consphylumnames)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consphylumnames)); kc_x->post_create(); return static_cast(kc_x); } impl_phylumdeclaration_PhylumDeclaration* PhylumDeclaration(ID _ID_1, storageoption _storageoption_1, productionblock _productionblock_1, Ccode_option _Ccode_option_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_storageoption_1, phylum_storageoption); assertPhylum(_productionblock_1, phylum_productionblock); assertPhylum(_Ccode_option_1, phylum_Ccode_option); phylumdeclaration kc_x = new impl_phylumdeclaration_PhylumDeclaration(_ID_1, _storageoption_1, _productionblock_1, _Ccode_option_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PhylumDeclaration)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PhylumDeclaration)); kc_x->post_create(); kc_x = kc_initialize_phylumdeclaration(kc_x); return static_cast(kc_x); } impl_storageoption_NoStorageOption* NoStorageOption() { storageoption kc_x = new impl_storageoption_NoStorageOption(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NoStorageOption)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NoStorageOption)); kc_x->post_create(); return static_cast(kc_x); } impl_storageoption_NegativeStorageOption* NegativeStorageOption(ID _ID_1) { assertPhylum(_ID_1, phylum_ID); storageoption kc_x = new impl_storageoption_NegativeStorageOption(_ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NegativeStorageOption)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NegativeStorageOption)); kc_x->post_create(); return static_cast(kc_x); } impl_storageoption_PositiveStorageOption* PositiveStorageOption(ID _ID_1) { assertPhylum(_ID_1, phylum_ID); storageoption kc_x = new impl_storageoption_PositiveStorageOption(_ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PositiveStorageOption)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PositiveStorageOption)); kc_x->post_create(); return static_cast(kc_x); } impl_storageclasses* Nilstorageclasses() { storageclasses kc_x = new impl_storageclasses(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilstorageclasses)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilstorageclasses)); kc_x->post_create(); kc_x = kc_initialize_storageclasses(kc_x); return static_cast(kc_x); } impl_storageclasses* Consstorageclasses(ID _ID_1, storageclasses _storageclasses_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_storageclasses_1, phylum_storageclasses); storageclasses kc_x = new impl_storageclasses(_ID_1, _storageclasses_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consstorageclasses)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consstorageclasses)); kc_x->post_create(); kc_x = kc_initialize_storageclasses(kc_x); return static_cast(kc_x); } impl_productionblock_Emptyproductionblock* Emptyproductionblock() { productionblock kc_x = new impl_productionblock_Emptyproductionblock(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Emptyproductionblock)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Emptyproductionblock)); kc_x->post_create(); return static_cast(kc_x); } impl_productionblock_ListAlternatives* ListAlternatives(alternatives _alternatives_1, ID _ID_1) { assertPhylum(_alternatives_1, phylum_alternatives); assertPhylum(_ID_1, phylum_ID); productionblock kc_x = new impl_productionblock_ListAlternatives(_alternatives_1, _ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ListAlternatives)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ListAlternatives)); kc_x->post_create(); return static_cast(kc_x); } impl_productionblock_NonlistAlternatives* NonlistAlternatives(alternatives _alternatives_1) { assertPhylum(_alternatives_1, phylum_alternatives); productionblock kc_x = new impl_productionblock_NonlistAlternatives(_alternatives_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NonlistAlternatives)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NonlistAlternatives)); kc_x->post_create(); return static_cast(kc_x); } impl_productionblock_PredefinedAlternatives* PredefinedAlternatives(alternatives _alternatives_1) { assertPhylum(_alternatives_1, phylum_alternatives); productionblock kc_x = new impl_productionblock_PredefinedAlternatives(_alternatives_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PredefinedAlternatives)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PredefinedAlternatives)); kc_x->post_create(); return static_cast(kc_x); } impl_alternatives* Nilalternatives() { alternatives kc_x = new impl_alternatives(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilalternatives)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilalternatives)); kc_x->post_create(); return static_cast(kc_x); } impl_alternatives* Consalternatives(alternative _alternative_1, alternatives _alternatives_1) { assertPhylum(_alternative_1, phylum_alternative); assertPhylum(_alternatives_1, phylum_alternatives); alternatives kc_x = new impl_alternatives(_alternative_1, _alternatives_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consalternatives)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consalternatives)); kc_x->post_create(); return static_cast(kc_x); } impl_alternative_Alternative* Alternative(ID _ID_1, arguments _arguments_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_arguments_1, phylum_arguments); alternative kc_x = new impl_alternative_Alternative(_ID_1, _arguments_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Alternative)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Alternative)); kc_x->post_create(); kc_x = kc_initialize_alternative(kc_x); return static_cast(kc_x); } impl_arguments* Nilarguments() { arguments kc_x = new impl_arguments(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilarguments)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilarguments)); kc_x->post_create(); return static_cast(kc_x); } impl_arguments* Consarguments(ID _ID_1, arguments _arguments_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_arguments_1, phylum_arguments); arguments kc_x = new impl_arguments(_ID_1, _arguments_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consarguments)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consarguments)); kc_x->post_create(); return static_cast(kc_x); } impl_argument_Argument* Argument(ID _ID_1, integer _integer_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_integer_1, phylum_integer); argument kc_x = new impl_argument_Argument(_ID_1, _integer_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Argument)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Argument)); kc_x->post_create(); return static_cast(kc_x); } impl_Ccode_option_CcodeOption* CcodeOption(attributes _attributes_1, Ctexts _Ctexts_1) { assertPhylum(_attributes_1, phylum_attributes); assertPhylum(_Ctexts_1, phylum_Ctexts); Ccode_option kc_x = new impl_Ccode_option_CcodeOption(_attributes_1, _Ctexts_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CcodeOption)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CcodeOption)); kc_x->post_create(); return static_cast(kc_x); } impl_attributes* Nilattributes() { attributes kc_x = new impl_attributes(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilattributes)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilattributes)); kc_x->post_create(); return static_cast(kc_x); } impl_attributes* Consattributes(attribute _attribute_1, attributes _attributes_1) { assertPhylum(_attribute_1, phylum_attribute); assertPhylum(_attributes_1, phylum_attributes); attributes kc_x = new impl_attributes(_attribute_1, _attributes_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consattributes)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consattributes)); kc_x->post_create(); return static_cast(kc_x); } impl_attribute_Attribute* Attribute(ID _ID_1, ID _ID_2, attribute_initialisation_option _attribute_initialisation_option_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_ID_2, phylum_ID); assertPhylum(_attribute_initialisation_option_1, phylum_attribute_initialisation_option); attribute kc_x = new impl_attribute_Attribute(_ID_1, _ID_2, _attribute_initialisation_option_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Attribute)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Attribute)); kc_x->post_create(); return static_cast(kc_x); } impl_attribute_initialisation_option_Noattribute_initialisation* Noattribute_initialisation() { attribute_initialisation_option kc_x = new impl_attribute_initialisation_option_Noattribute_initialisation(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Noattribute_initialisation)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Noattribute_initialisation)); kc_x->post_create(); return static_cast(kc_x); } impl_attribute_initialisation_option_Yesattribute_initialisation* Yesattribute_initialisation(Cexpression _Cexpression_1) { assertPhylum(_Cexpression_1, phylum_Cexpression); attribute_initialisation_option kc_x = new impl_attribute_initialisation_option_Yesattribute_initialisation(_Cexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Yesattribute_initialisation)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Yesattribute_initialisation)); kc_x->post_create(); return static_cast(kc_x); } impl_Cexpression* NilCexpression() { Cexpression kc_x = new impl_Cexpression(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NilCexpression)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NilCexpression)); kc_x->post_create(); kc_x = kc_initialize_Cexpression(kc_x); return static_cast(kc_x); } impl_Cexpression* ConsCexpression(Cexpression_elem _Cexpression_elem_1, Cexpression _Cexpression_1) { assertPhylum(_Cexpression_elem_1, phylum_Cexpression_elem); assertPhylum(_Cexpression_1, phylum_Cexpression); Cexpression kc_x = new impl_Cexpression(_Cexpression_elem_1, _Cexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ConsCexpression)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ConsCexpression)); kc_x->post_create(); kc_x = kc_initialize_Cexpression(kc_x); return static_cast(kc_x); } impl_Cexpression_elem_CExpressionPart* CExpressionPart(casestring _casestring_1) { assertPhylum(_casestring_1, phylum_casestring); Cexpression_elem kc_x = new impl_Cexpression_elem_CExpressionPart(_casestring_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CExpressionPart)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CExpressionPart)); kc_x->post_create(); return static_cast(kc_x); } impl_Cexpression_elem_CExpressionDollarvar* CExpressionDollarvar(INT _INT_1) { assertPhylum(_INT_1, phylum_INT); Cexpression_elem kc_x = new impl_Cexpression_elem_CExpressionDollarvar(_INT_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CExpressionDollarvar)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CExpressionDollarvar)); kc_x->post_create(); return static_cast(kc_x); } impl_Cexpression_elem_CExpressionNl* CExpressionNl() { Cexpression_elem kc_x = new impl_Cexpression_elem_CExpressionNl(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CExpressionNl)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CExpressionNl)); kc_x->post_create(); return static_cast(kc_x); } impl_Cexpression_elem_CExpressionDQ* CExpressionDQ(CexpressionDQ _CexpressionDQ_1) { assertPhylum(_CexpressionDQ_1, phylum_CexpressionDQ); Cexpression_elem kc_x = new impl_Cexpression_elem_CExpressionDQ(_CexpressionDQ_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CExpressionDQ)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CExpressionDQ)); kc_x->post_create(); return static_cast(kc_x); } impl_Cexpression_elem_CExpressionSQ* CExpressionSQ(CexpressionSQ _CexpressionSQ_1) { assertPhylum(_CexpressionSQ_1, phylum_CexpressionSQ); Cexpression_elem kc_x = new impl_Cexpression_elem_CExpressionSQ(_CexpressionSQ_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CExpressionSQ)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CExpressionSQ)); kc_x->post_create(); return static_cast(kc_x); } impl_Cexpression_elem_CExpressionPack* CExpressionPack(Cexpression _Cexpression_1) { assertPhylum(_Cexpression_1, phylum_Cexpression); Cexpression_elem kc_x = new impl_Cexpression_elem_CExpressionPack(_Cexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CExpressionPack)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CExpressionPack)); kc_x->post_create(); return static_cast(kc_x); } impl_Cexpression_elem_CExpressionArray* CExpressionArray(Cexpression _Cexpression_1) { assertPhylum(_Cexpression_1, phylum_Cexpression); Cexpression_elem kc_x = new impl_Cexpression_elem_CExpressionArray(_Cexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CExpressionArray)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CExpressionArray)); kc_x->post_create(); return static_cast(kc_x); } impl_CexpressionDQ* NilCexpressionDQ() { CexpressionDQ kc_x = new impl_CexpressionDQ(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NilCexpressionDQ)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NilCexpressionDQ)); kc_x->post_create(); return static_cast(kc_x); } impl_CexpressionDQ* ConsCexpressionDQ(CexpressionDQ_elem _CexpressionDQ_elem_1, CexpressionDQ _CexpressionDQ_1) { assertPhylum(_CexpressionDQ_elem_1, phylum_CexpressionDQ_elem); assertPhylum(_CexpressionDQ_1, phylum_CexpressionDQ); CexpressionDQ kc_x = new impl_CexpressionDQ(_CexpressionDQ_elem_1, _CexpressionDQ_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ConsCexpressionDQ)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ConsCexpressionDQ)); kc_x->post_create(); return static_cast(kc_x); } impl_CexpressionDQ_elem_CExpressionDQPart* CExpressionDQPart(casestring _casestring_1) { assertPhylum(_casestring_1, phylum_casestring); CexpressionDQ_elem kc_x = new impl_CexpressionDQ_elem_CExpressionDQPart(_casestring_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CExpressionDQPart)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CExpressionDQPart)); kc_x->post_create(); return static_cast(kc_x); } impl_CexpressionDQ_elem_CExpressionDQNl* CExpressionDQNl() { CexpressionDQ_elem kc_x = new impl_CexpressionDQ_elem_CExpressionDQNl(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CExpressionDQNl)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CExpressionDQNl)); kc_x->post_create(); return static_cast(kc_x); } impl_CexpressionSQ* NilCexpressionSQ() { CexpressionSQ kc_x = new impl_CexpressionSQ(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NilCexpressionSQ)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NilCexpressionSQ)); kc_x->post_create(); return static_cast(kc_x); } impl_CexpressionSQ* ConsCexpressionSQ(CexpressionSQ_elem _CexpressionSQ_elem_1, CexpressionSQ _CexpressionSQ_1) { assertPhylum(_CexpressionSQ_elem_1, phylum_CexpressionSQ_elem); assertPhylum(_CexpressionSQ_1, phylum_CexpressionSQ); CexpressionSQ kc_x = new impl_CexpressionSQ(_CexpressionSQ_elem_1, _CexpressionSQ_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ConsCexpressionSQ)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ConsCexpressionSQ)); kc_x->post_create(); return static_cast(kc_x); } impl_CexpressionSQ_elem_CExpressionSQPart* CExpressionSQPart(casestring _casestring_1) { assertPhylum(_casestring_1, phylum_casestring); CexpressionSQ_elem kc_x = new impl_CexpressionSQ_elem_CExpressionSQPart(_casestring_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CExpressionSQPart)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CExpressionSQPart)); kc_x->post_create(); return static_cast(kc_x); } impl_CexpressionSQ_elem_CExpressionSQNl* CExpressionSQNl() { CexpressionSQ_elem kc_x = new impl_CexpressionSQ_elem_CExpressionSQNl(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CExpressionSQNl)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CExpressionSQNl)); kc_x->post_create(); return static_cast(kc_x); } impl_idCexpressions* NilidCexpressions() { idCexpressions kc_x = new impl_idCexpressions(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NilidCexpressions)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NilidCexpressions)); kc_x->post_create(); return static_cast(kc_x); } impl_idCexpressions* ConsidCexpressions(idCexpression _idCexpression_1, idCexpressions _idCexpressions_1) { assertPhylum(_idCexpression_1, phylum_idCexpression); assertPhylum(_idCexpressions_1, phylum_idCexpressions); idCexpressions kc_x = new impl_idCexpressions(_idCexpression_1, _idCexpressions_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ConsidCexpressions)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ConsidCexpressions)); kc_x->post_create(); return static_cast(kc_x); } impl_idCexpression_IdCexpression* IdCexpression(ID _ID_1, Cexpression _Cexpression_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_Cexpression_1, phylum_Cexpression); idCexpression kc_x = new impl_idCexpression_IdCexpression(_ID_1, _Cexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_IdCexpression)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_IdCexpression)); kc_x->post_create(); kc_x = kc_initialize_idCexpression(kc_x); return static_cast(kc_x); } impl_Ctexts* NilCtexts() { Ctexts kc_x = new impl_Ctexts(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NilCtexts)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NilCtexts)); kc_x->post_create(); return static_cast(kc_x); } impl_Ctexts* ConsCtexts(Ctext _Ctext_1, Ctexts _Ctexts_1) { assertPhylum(_Ctext_1, phylum_Ctext); assertPhylum(_Ctexts_1, phylum_Ctexts); Ctexts kc_x = new impl_Ctexts(_Ctext_1, _Ctexts_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ConsCtexts)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ConsCtexts)); kc_x->post_create(); return static_cast(kc_x); } impl_includefiles* Nilincludefiles() { includefiles kc_x = new impl_includefiles(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilincludefiles)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilincludefiles)); kc_x->post_create(); return static_cast(kc_x); } impl_includefiles* Consincludefiles(includefile _includefile_1, includefiles _includefiles_1) { assertPhylum(_includefile_1, phylum_includefile); assertPhylum(_includefiles_1, phylum_includefiles); includefiles kc_x = new impl_includefiles(_includefile_1, _includefiles_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consincludefiles)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consincludefiles)); kc_x->post_create(); return static_cast(kc_x); } impl_includefile_IncludeFile* IncludeFile(casestring _casestring_1) { assertPhylum(_casestring_1, phylum_casestring); includefile kc_x=new impl_includefile_IncludeFile(_casestring_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_IncludeFile)); includefile unique_kc_x= hashtables[uniq]->ht_check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_IncludeFile)); kc_x->post_create(); kc_x = kc_initialize_includefile(kc_x); } return static_cast(kc_x); } impl_includedeclarations* Nilincludedeclarations() { includedeclarations kc_x = new impl_includedeclarations(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilincludedeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilincludedeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_includedeclarations* Consincludedeclarations(includedeclaration _includedeclaration_1, includedeclarations _includedeclarations_1) { assertPhylum(_includedeclaration_1, phylum_includedeclaration); assertPhylum(_includedeclarations_1, phylum_includedeclarations); includedeclarations kc_x = new impl_includedeclarations(_includedeclaration_1, _includedeclarations_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consincludedeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consincludedeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_includedeclaration_IncludeDeclaration* IncludeDeclaration(casestring _casestring_1) { assertPhylum(_casestring_1, phylum_casestring); includedeclaration kc_x = new impl_includedeclaration_IncludeDeclaration(_casestring_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_IncludeDeclaration)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_IncludeDeclaration)); kc_x->post_create(); kc_x = kc_initialize_includedeclaration(kc_x); return static_cast(kc_x); } impl_rwdeclarations* Nilrwdeclarations() { rwdeclarations kc_x = new impl_rwdeclarations(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilrwdeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilrwdeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_rwdeclarations* Consrwdeclarations(rwdeclaration _rwdeclaration_1, rwdeclarations _rwdeclarations_1) { assertPhylum(_rwdeclaration_1, phylum_rwdeclaration); assertPhylum(_rwdeclarations_1, phylum_rwdeclarations); rwdeclarations kc_x = new impl_rwdeclarations(_rwdeclaration_1, _rwdeclarations_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consrwdeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consrwdeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_rwdeclaration_RwDeclaration* RwDeclaration(outmostpatterns _outmostpatterns_1, rewriteclauses _rewriteclauses_1) { assertPhylum(_outmostpatterns_1, phylum_outmostpatterns); assertPhylum(_rewriteclauses_1, phylum_rewriteclauses); rwdeclaration kc_x = new impl_rwdeclaration_RwDeclaration(_outmostpatterns_1, _rewriteclauses_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_RwDeclaration)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_RwDeclaration)); kc_x->post_create(); return static_cast(kc_x); } impl_rewriteclauses* Nilrewriteclauses() { rewriteclauses kc_x = new impl_rewriteclauses(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilrewriteclauses)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilrewriteclauses)); kc_x->post_create(); return static_cast(kc_x); } impl_rewriteclauses* Consrewriteclauses(rewriteclause _rewriteclause_1, rewriteclauses _rewriteclauses_1) { assertPhylum(_rewriteclause_1, phylum_rewriteclause); assertPhylum(_rewriteclauses_1, phylum_rewriteclauses); rewriteclauses kc_x = new impl_rewriteclauses(_rewriteclause_1, _rewriteclauses_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consrewriteclauses)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consrewriteclauses)); kc_x->post_create(); return static_cast(kc_x); } impl_rewriteclause_RewriteClause* RewriteClause(viewnames _viewnames_1, term _term_1) { assertPhylum(_viewnames_1, phylum_viewnames); assertPhylum(_term_1, phylum_term); rewriteclause kc_x = new impl_rewriteclause_RewriteClause(_viewnames_1, _term_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_RewriteClause)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_RewriteClause)); kc_x->post_create(); return static_cast(kc_x); } impl_patternchains* Nilpatternchains() { patternchains kc_x = new impl_patternchains(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilpatternchains)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilpatternchains)); kc_x->post_create(); kc_x = kc_initialize_patternchains(kc_x); return static_cast(kc_x); } impl_patternchains* Conspatternchains(patternchain _patternchain_1, patternchains _patternchains_1) { assertPhylum(_patternchain_1, phylum_patternchain); assertPhylum(_patternchains_1, phylum_patternchains); patternchains kc_x = new impl_patternchains(_patternchain_1, _patternchains_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Conspatternchains)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Conspatternchains)); kc_x->post_create(); kc_x = kc_initialize_patternchains(kc_x); return static_cast(kc_x); } impl_patternchain* Nilpatternchain() { patternchain kc_x = new impl_patternchain(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilpatternchain)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilpatternchain)); kc_x->post_create(); kc_x = kc_initialize_patternchain(kc_x); return static_cast(kc_x); } impl_patternchain* Conspatternchain(patternchainitem _patternchainitem_1, patternchain _patternchain_1) { assertPhylum(_patternchainitem_1, phylum_patternchainitem); assertPhylum(_patternchain_1, phylum_patternchain); patternchain kc_x = new impl_patternchain(_patternchainitem_1, _patternchain_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Conspatternchain)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Conspatternchain)); kc_x->post_create(); kc_x = kc_initialize_patternchain(kc_x); return static_cast(kc_x); } impl_outmostpatterns* Niloutmostpatterns() { outmostpatterns kc_x = new impl_outmostpatterns(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Niloutmostpatterns)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Niloutmostpatterns)); kc_x->post_create(); return static_cast(kc_x); } impl_outmostpatterns* Consoutmostpatterns(outmostpattern _outmostpattern_1, outmostpatterns _outmostpatterns_1) { assertPhylum(_outmostpattern_1, phylum_outmostpattern); assertPhylum(_outmostpatterns_1, phylum_outmostpatterns); outmostpatterns kc_x = new impl_outmostpatterns(_outmostpattern_1, _outmostpatterns_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consoutmostpatterns)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consoutmostpatterns)); kc_x->post_create(); return static_cast(kc_x); } impl_patternchainitem_PatternchainitemOutmost* PatternchainitemOutmost(outmostpattern _outmostpattern_1) { assertPhylum(_outmostpattern_1, phylum_outmostpattern); patternchainitem kc_x = new impl_patternchainitem_PatternchainitemOutmost(_outmostpattern_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PatternchainitemOutmost)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PatternchainitemOutmost)); kc_x->post_create(); kc_x = kc_initialize_patternchainitem(kc_x); return static_cast(kc_x); } impl_patternchainitem_PatternchainitemGroup* PatternchainitemGroup(patternchains _patternchains_1) { assertPhylum(_patternchains_1, phylum_patternchains); patternchainitem kc_x = new impl_patternchainitem_PatternchainitemGroup(_patternchains_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PatternchainitemGroup)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PatternchainitemGroup)); kc_x->post_create(); kc_x = kc_initialize_patternchainitem(kc_x); return static_cast(kc_x); } impl_patternchainitem_PatternchainitemDollarid* PatternchainitemDollarid(ID _ID_1) { assertPhylum(_ID_1, phylum_ID); patternchainitem kc_x = new impl_patternchainitem_PatternchainitemDollarid(_ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PatternchainitemDollarid)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PatternchainitemDollarid)); kc_x->post_create(); kc_x = kc_initialize_patternchainitem(kc_x); return static_cast(kc_x); } impl_outmostpattern_OPOperatorWildcard* OPOperatorWildcard(ID _ID_1, Cexpression _Cexpression_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_Cexpression_1, phylum_Cexpression); outmostpattern kc_x = new impl_outmostpattern_OPOperatorWildcard(_ID_1, _Cexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_OPOperatorWildcard)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_OPOperatorWildcard)); kc_x->post_create(); kc_x = kc_initialize_outmostpattern(kc_x); return static_cast(kc_x); } impl_outmostpattern_OPOperator* OPOperator(ID _ID_1, patterns _patterns_1, Cexpression _Cexpression_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_patterns_1, phylum_patterns); assertPhylum(_Cexpression_1, phylum_Cexpression); outmostpattern kc_x = new impl_outmostpattern_OPOperator(_ID_1, _patterns_1, _Cexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_OPOperator)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_OPOperator)); kc_x->post_create(); kc_x = kc_initialize_outmostpattern(kc_x); return static_cast(kc_x); } impl_outmostpattern_OPNonLeafVariable* OPNonLeafVariable(ID _ID_1, outmostpattern _outmostpattern_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_outmostpattern_1, phylum_outmostpattern); outmostpattern kc_x = new impl_outmostpattern_OPNonLeafVariable(_ID_1, _outmostpattern_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_OPNonLeafVariable)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_OPNonLeafVariable)); kc_x->post_create(); kc_x = kc_initialize_outmostpattern(kc_x); return static_cast(kc_x); } impl_outmostpattern_OPWildcard* OPWildcard(Cexpression _Cexpression_1) { assertPhylum(_Cexpression_1, phylum_Cexpression); outmostpattern kc_x = new impl_outmostpattern_OPWildcard(_Cexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_OPWildcard)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_OPWildcard)); kc_x->post_create(); kc_x = kc_initialize_outmostpattern(kc_x); return static_cast(kc_x); } impl_outmostpattern_OPDefault* OPDefault(Cexpression _Cexpression_1) { assertPhylum(_Cexpression_1, phylum_Cexpression); outmostpattern kc_x = new impl_outmostpattern_OPDefault(_Cexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_OPDefault)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_OPDefault)); kc_x->post_create(); kc_x = kc_initialize_outmostpattern(kc_x); return static_cast(kc_x); } impl_pattern_PVariable* PVariable(ID _ID_1) { assertPhylum(_ID_1, phylum_ID); pattern kc_x = new impl_pattern_PVariable(_ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PVariable)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PVariable)); kc_x->post_create(); return static_cast(kc_x); } impl_pattern_POperator* POperator(ID _ID_1, patterns _patterns_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_patterns_1, phylum_patterns); pattern kc_x = new impl_pattern_POperator(_ID_1, _patterns_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_POperator)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_POperator)); kc_x->post_create(); return static_cast(kc_x); } impl_pattern_PNonLeafVariable* PNonLeafVariable(ID _ID_1, pattern _pattern_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_pattern_1, phylum_pattern); pattern kc_x = new impl_pattern_PNonLeafVariable(_ID_1, _pattern_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PNonLeafVariable)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PNonLeafVariable)); kc_x->post_create(); return static_cast(kc_x); } impl_pattern_PWildcard* PWildcard() { pattern kc_x = new impl_pattern_PWildcard(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PWildcard)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PWildcard)); kc_x->post_create(); return static_cast(kc_x); } impl_pattern_PStringLiteral* PStringLiteral(CexpressionDQ _CexpressionDQ_1) { assertPhylum(_CexpressionDQ_1, phylum_CexpressionDQ); pattern kc_x = new impl_pattern_PStringLiteral(_CexpressionDQ_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PStringLiteral)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PStringLiteral)); kc_x->post_create(); return static_cast(kc_x); } impl_pattern_PIntLiteral* PIntLiteral(INT _INT_1) { assertPhylum(_INT_1, phylum_INT); pattern kc_x = new impl_pattern_PIntLiteral(_INT_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PIntLiteral)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PIntLiteral)); kc_x->post_create(); return static_cast(kc_x); } impl_patterns* Nilpatterns() { patterns kc_x = new impl_patterns(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilpatterns)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilpatterns)); kc_x->post_create(); return static_cast(kc_x); } impl_patterns* Conspatterns(pattern _pattern_1, patterns _patterns_1) { assertPhylum(_pattern_1, phylum_pattern); assertPhylum(_patterns_1, phylum_patterns); patterns kc_x = new impl_patterns(_pattern_1, _patterns_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Conspatterns)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Conspatterns)); kc_x->post_create(); return static_cast(kc_x); } impl_term_TVariable* TVariable(ID _ID_1) { assertPhylum(_ID_1, phylum_ID); term kc_x = new impl_term_TVariable(_ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_TVariable)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_TVariable)); kc_x->post_create(); kc_x = kc_initialize_term(kc_x); return static_cast(kc_x); } impl_term_TOperator* TOperator(ID _ID_1, terms _terms_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_terms_1, phylum_terms); term kc_x = new impl_term_TOperator(_ID_1, _terms_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_TOperator)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_TOperator)); kc_x->post_create(); kc_x = kc_initialize_term(kc_x); return static_cast(kc_x); } impl_term_TMethod* TMethod(term _term_1, ID _ID_1, terms _terms_1) { assertPhylum(_term_1, phylum_term); assertPhylum(_ID_1, phylum_ID); assertPhylum(_terms_1, phylum_terms); term kc_x = new impl_term_TMethod(_term_1, _ID_1, _terms_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_TMethod)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_TMethod)); kc_x->post_create(); kc_x = kc_initialize_term(kc_x); return static_cast(kc_x); } impl_term_TMethodDot* TMethodDot(term _term_1, ID _ID_1, terms _terms_1) { assertPhylum(_term_1, phylum_term); assertPhylum(_ID_1, phylum_ID); assertPhylum(_terms_1, phylum_terms); term kc_x = new impl_term_TMethodDot(_term_1, _ID_1, _terms_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_TMethodDot)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_TMethodDot)); kc_x->post_create(); kc_x = kc_initialize_term(kc_x); return static_cast(kc_x); } impl_term_TMemberVar* TMemberVar(term _term_1, ID _ID_1) { assertPhylum(_term_1, phylum_term); assertPhylum(_ID_1, phylum_ID); term kc_x = new impl_term_TMemberVar(_term_1, _ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_TMemberVar)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_TMemberVar)); kc_x->post_create(); kc_x = kc_initialize_term(kc_x); return static_cast(kc_x); } impl_term_TMemberVarDot* TMemberVarDot(term _term_1, ID _ID_1) { assertPhylum(_term_1, phylum_term); assertPhylum(_ID_1, phylum_ID); term kc_x = new impl_term_TMemberVarDot(_term_1, _ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_TMemberVarDot)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_TMemberVarDot)); kc_x->post_create(); kc_x = kc_initialize_term(kc_x); return static_cast(kc_x); } impl_term_TCTerm* TCTerm(CexpressionSQ _CexpressionSQ_1) { assertPhylum(_CexpressionSQ_1, phylum_CexpressionSQ); term kc_x = new impl_term_TCTerm(_CexpressionSQ_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_TCTerm)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_TCTerm)); kc_x->post_create(); kc_x = kc_initialize_term(kc_x); return static_cast(kc_x); } impl_term_TStringLiteral* TStringLiteral(CexpressionDQ _CexpressionDQ_1) { assertPhylum(_CexpressionDQ_1, phylum_CexpressionDQ); term kc_x = new impl_term_TStringLiteral(_CexpressionDQ_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_TStringLiteral)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_TStringLiteral)); kc_x->post_create(); kc_x = kc_initialize_term(kc_x); return static_cast(kc_x); } impl_term_TIntLiteral* TIntLiteral(INT _INT_1) { assertPhylum(_INT_1, phylum_INT); term kc_x = new impl_term_TIntLiteral(_INT_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_TIntLiteral)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_TIntLiteral)); kc_x->post_create(); kc_x = kc_initialize_term(kc_x); return static_cast(kc_x); } impl_terms* Nilterms() { terms kc_x = new impl_terms(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilterms)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilterms)); kc_x->post_create(); return static_cast(kc_x); } impl_terms* Consterms(term _term_1, terms _terms_1) { assertPhylum(_term_1, phylum_term); assertPhylum(_terms_1, phylum_terms); terms kc_x = new impl_terms(_term_1, _terms_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consterms)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consterms)); kc_x->post_create(); return static_cast(kc_x); } impl_fnfiles* Nilfnfiles() { fnfiles kc_x = new impl_fnfiles(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilfnfiles)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilfnfiles)); kc_x->post_create(); return static_cast(kc_x); } impl_fnfiles* Consfnfiles(fnfile _fnfile_1, fnfiles _fnfiles_1) { assertPhylum(_fnfile_1, phylum_fnfile); assertPhylum(_fnfiles_1, phylum_fnfiles); fnfiles kc_x = new impl_fnfiles(_fnfile_1, _fnfiles_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consfnfiles)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consfnfiles)); kc_x->post_create(); return static_cast(kc_x); } impl_fnfile_FnFile* FnFile(casestring _casestring_1) { assertPhylum(_casestring_1, phylum_casestring); fnfile kc_x=new impl_fnfile_FnFile(_casestring_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_FnFile)); fnfile unique_kc_x= hashtables[uniq]->ht_check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_FnFile)); kc_x->post_create(); kc_x = kc_initialize_fnfile(kc_x); } return static_cast(kc_x); } impl_fndeclarations* Nilfndeclarations() { fndeclarations kc_x = new impl_fndeclarations(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilfndeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilfndeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_fndeclarations* Consfndeclarations(fndeclaration _fndeclaration_1, fndeclarations _fndeclarations_1) { assertPhylum(_fndeclaration_1, phylum_fndeclaration); assertPhylum(_fndeclarations_1, phylum_fndeclarations); fndeclarations kc_x = new impl_fndeclarations(_fndeclaration_1, _fndeclarations_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consfndeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consfndeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_fndeclaration_FnAcDeclaration* FnAcDeclaration(ac_declaration_specifiers _ac_declaration_specifiers_1, ac_declarator _ac_declarator_1, ac_declaration_list _ac_declaration_list_1, ac_opt_base_init_list _ac_opt_base_init_list_1, Ctext _Ctext_1, ID _ID_1, fnclass _fnclass_1) { assertPhylum(_ac_declaration_specifiers_1, phylum_ac_declaration_specifiers); assertPhylum(_ac_declarator_1, phylum_ac_declarator); assertPhylum(_ac_declaration_list_1, phylum_ac_declaration_list); assertPhylum(_ac_opt_base_init_list_1, phylum_ac_opt_base_init_list); assertPhylum(_Ctext_1, phylum_Ctext); assertPhylum(_ID_1, phylum_ID); assertPhylum(_fnclass_1, phylum_fnclass); fndeclaration kc_x = new impl_fndeclaration_FnAcDeclaration(_ac_declaration_specifiers_1, _ac_declarator_1, _ac_declaration_list_1, _ac_opt_base_init_list_1, _Ctext_1, _ID_1, _fnclass_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_FnAcDeclaration)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_FnAcDeclaration)); kc_x->post_create(); kc_x = kc_initialize_fndeclaration(kc_x); return static_cast(kc_x); } impl_fndeclaration_AcMemberDeclaration* AcMemberDeclaration(ac_declaration_specifiers _ac_declaration_specifiers_1, ac_declarator _ac_declarator_1, ac_constant_expression_option _ac_constant_expression_option_1, fnclass _fnclass_1) { assertPhylum(_ac_declaration_specifiers_1, phylum_ac_declaration_specifiers); assertPhylum(_ac_declarator_1, phylum_ac_declarator); assertPhylum(_ac_constant_expression_option_1, phylum_ac_constant_expression_option); assertPhylum(_fnclass_1, phylum_fnclass); fndeclaration kc_x = new impl_fndeclaration_AcMemberDeclaration(_ac_declaration_specifiers_1, _ac_declarator_1, _ac_constant_expression_option_1, _fnclass_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcMemberDeclaration)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcMemberDeclaration)); kc_x->post_create(); kc_x = kc_initialize_fndeclaration(kc_x); return static_cast(kc_x); } impl_fnclass_GlobalFn* GlobalFn() { fnclass kc_x = new impl_fnclass_GlobalFn(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_GlobalFn)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_GlobalFn)); kc_x->post_create(); return static_cast(kc_x); } impl_fnclass_StaticFn* StaticFn(casestring _casestring_1) { assertPhylum(_casestring_1, phylum_casestring); fnclass kc_x = new impl_fnclass_StaticFn(_casestring_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_StaticFn)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_StaticFn)); kc_x->post_create(); return static_cast(kc_x); } impl_fnclass_MemberFn* MemberFn() { fnclass kc_x = new impl_fnclass_MemberFn(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_MemberFn)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_MemberFn)); kc_x->post_create(); return static_cast(kc_x); } impl_fnclass_ConstructorFn* ConstructorFn() { fnclass kc_x = new impl_fnclass_ConstructorFn(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ConstructorFn)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ConstructorFn)); kc_x->post_create(); return static_cast(kc_x); } impl_fnclass_DestructorFn* DestructorFn() { fnclass kc_x = new impl_fnclass_DestructorFn(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_DestructorFn)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_DestructorFn)); kc_x->post_create(); return static_cast(kc_x); } impl_fnclass_ConvOperatorFn* ConvOperatorFn() { fnclass kc_x = new impl_fnclass_ConvOperatorFn(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ConvOperatorFn)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ConvOperatorFn)); kc_x->post_create(); return static_cast(kc_x); } impl_Ctext* NilCtext() { Ctext kc_x = new impl_Ctext(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NilCtext)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NilCtext)); kc_x->post_create(); kc_x = kc_initialize_Ctext(kc_x); return static_cast(kc_x); } impl_Ctext* ConsCtext(Ctext_elem _Ctext_elem_1, Ctext _Ctext_1) { assertPhylum(_Ctext_elem_1, phylum_Ctext_elem); assertPhylum(_Ctext_1, phylum_Ctext); Ctext kc_x = new impl_Ctext(_Ctext_elem_1, _Ctext_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ConsCtext)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ConsCtext)); kc_x->post_create(); kc_x = kc_initialize_Ctext(kc_x); return static_cast(kc_x); } impl_Ctext_elem_CTextLine* CTextLine(casestring _casestring_1) { assertPhylum(_casestring_1, phylum_casestring); Ctext_elem kc_x = new impl_Ctext_elem_CTextLine(_casestring_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CTextLine)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CTextLine)); kc_x->post_create(); kc_x = kc_initialize_Ctext_elem(kc_x); return static_cast(kc_x); } impl_Ctext_elem_CTextDollarVar* CTextDollarVar(INT _INT_1) { assertPhylum(_INT_1, phylum_INT); Ctext_elem kc_x = new impl_Ctext_elem_CTextDollarVar(_INT_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CTextDollarVar)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CTextDollarVar)); kc_x->post_create(); kc_x = kc_initialize_Ctext_elem(kc_x); return static_cast(kc_x); } impl_Ctext_elem_CTextNl* CTextNl(integer _integer_1) { assertPhylum(_integer_1, phylum_integer); Ctext_elem kc_x = new impl_Ctext_elem_CTextNl(_integer_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CTextNl)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CTextNl)); kc_x->post_create(); kc_x = kc_initialize_Ctext_elem(kc_x); return static_cast(kc_x); } impl_Ctext_elem_CTextCexpressionDQ* CTextCexpressionDQ(CexpressionDQ _CexpressionDQ_1) { assertPhylum(_CexpressionDQ_1, phylum_CexpressionDQ); Ctext_elem kc_x = new impl_Ctext_elem_CTextCexpressionDQ(_CexpressionDQ_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CTextCexpressionDQ)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CTextCexpressionDQ)); kc_x->post_create(); kc_x = kc_initialize_Ctext_elem(kc_x); return static_cast(kc_x); } impl_Ctext_elem_CTextCexpressionSQ* CTextCexpressionSQ(CexpressionSQ _CexpressionSQ_1) { assertPhylum(_CexpressionSQ_1, phylum_CexpressionSQ); Ctext_elem kc_x = new impl_Ctext_elem_CTextCexpressionSQ(_CexpressionSQ_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CTextCexpressionSQ)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CTextCexpressionSQ)); kc_x->post_create(); kc_x = kc_initialize_Ctext_elem(kc_x); return static_cast(kc_x); } impl_Ctext_elem_CTextCbody* CTextCbody(Ctext _Ctext_1) { assertPhylum(_Ctext_1, phylum_Ctext); Ctext_elem kc_x = new impl_Ctext_elem_CTextCbody(_Ctext_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CTextCbody)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CTextCbody)); kc_x->post_create(); kc_x = kc_initialize_Ctext_elem(kc_x); return static_cast(kc_x); } impl_Ctext_elem_CTextForeachexpression* CTextForeachexpression(patternchain _patternchain_1, idCexpressions _idCexpressions_1, withexpressions _withexpressions_1, Ctext _Ctext_1, foreach_after _foreach_after_1) { assertPhylum(_patternchain_1, phylum_patternchain); assertPhylum(_idCexpressions_1, phylum_idCexpressions); assertPhylum(_withexpressions_1, phylum_withexpressions); assertPhylum(_Ctext_1, phylum_Ctext); assertPhylum(_foreach_after_1, phylum_foreach_after); Ctext_elem kc_x = new impl_Ctext_elem_CTextForeachexpression(_patternchain_1, _idCexpressions_1, _withexpressions_1, _Ctext_1, _foreach_after_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CTextForeachexpression)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CTextForeachexpression)); kc_x->post_create(); kc_x = kc_initialize_Ctext_elem(kc_x); return static_cast(kc_x); } impl_Ctext_elem_CTextWithexpression* CTextWithexpression(withexpressions _withexpressions_1, withcases _withcases_1, contextinfo _contextinfo_1) { assertPhylum(_withexpressions_1, phylum_withexpressions); assertPhylum(_withcases_1, phylum_withcases); assertPhylum(_contextinfo_1, phylum_contextinfo); Ctext_elem kc_x = new impl_Ctext_elem_CTextWithexpression(_withexpressions_1, _withcases_1, _contextinfo_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CTextWithexpression)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CTextWithexpression)); kc_x->post_create(); kc_x = kc_initialize_Ctext_elem(kc_x); return static_cast(kc_x); } impl_foreach_after_NoForeachAfter* NoForeachAfter() { foreach_after kc_x = new impl_foreach_after_NoForeachAfter(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NoForeachAfter)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NoForeachAfter)); kc_x->post_create(); kc_x = kc_initialize_foreach_after(kc_x); return static_cast(kc_x); } impl_foreach_after_ForeachAfter* ForeachAfter(patternchain _patternchain_1, idCexpressions _idCexpressions_1, withexpressions _withexpressions_1, Ctext _Ctext_1) { assertPhylum(_patternchain_1, phylum_patternchain); assertPhylum(_idCexpressions_1, phylum_idCexpressions); assertPhylum(_withexpressions_1, phylum_withexpressions); assertPhylum(_Ctext_1, phylum_Ctext); foreach_after kc_x = new impl_foreach_after_ForeachAfter(_patternchain_1, _idCexpressions_1, _withexpressions_1, _Ctext_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ForeachAfter)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ForeachAfter)); kc_x->post_create(); kc_x = kc_initialize_foreach_after(kc_x); return static_cast(kc_x); } impl_contextinfo_InForeachContext* InForeachContext(patternchain _patternchain_1) { assertPhylum(_patternchain_1, phylum_patternchain); contextinfo kc_x = new impl_contextinfo_InForeachContext(_patternchain_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_InForeachContext)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_InForeachContext)); kc_x->post_create(); return static_cast(kc_x); } impl_contextinfo_NotInForeachContext* NotInForeachContext() { contextinfo kc_x = new impl_contextinfo_NotInForeachContext(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NotInForeachContext)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NotInForeachContext)); kc_x->post_create(); return static_cast(kc_x); } impl_withexpressions* Nilwithexpressions() { withexpressions kc_x = new impl_withexpressions(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilwithexpressions)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilwithexpressions)); kc_x->post_create(); kc_x = kc_initialize_withexpressions(kc_x); return static_cast(kc_x); } impl_withexpressions* Conswithexpressions(withexpression _withexpression_1, withexpressions _withexpressions_1) { assertPhylum(_withexpression_1, phylum_withexpression); assertPhylum(_withexpressions_1, phylum_withexpressions); withexpressions kc_x = new impl_withexpressions(_withexpression_1, _withexpressions_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Conswithexpressions)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Conswithexpressions)); kc_x->post_create(); kc_x = kc_initialize_withexpressions(kc_x); return static_cast(kc_x); } impl_withexpression_WEVariable* WEVariable(ID _ID_1) { assertPhylum(_ID_1, phylum_ID); withexpression kc_x = new impl_withexpression_WEVariable(_ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_WEVariable)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_WEVariable)); kc_x->post_create(); kc_x = kc_initialize_withexpression(kc_x); return static_cast(kc_x); } impl_withexpression_WECexpression* WECexpression(Cexpression _Cexpression_1) { assertPhylum(_Cexpression_1, phylum_Cexpression); withexpression kc_x = new impl_withexpression_WECexpression(_Cexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_WECexpression)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_WECexpression)); kc_x->post_create(); kc_x = kc_initialize_withexpression(kc_x); return static_cast(kc_x); } impl_withcases* Nilwithcases() { withcases kc_x = new impl_withcases(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilwithcases)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilwithcases)); kc_x->post_create(); return static_cast(kc_x); } impl_withcases* Conswithcases(withcase _withcase_1, withcases _withcases_1) { assertPhylum(_withcase_1, phylum_withcase); assertPhylum(_withcases_1, phylum_withcases); withcases kc_x = new impl_withcases(_withcase_1, _withcases_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Conswithcases)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Conswithcases)); kc_x->post_create(); return static_cast(kc_x); } impl_withcase_Withcase* Withcase(patternchains _patternchains_1, Ctext _Ctext_1) { assertPhylum(_patternchains_1, phylum_patternchains); assertPhylum(_Ctext_1, phylum_Ctext); withcase kc_x = new impl_withcase_Withcase(_patternchains_1, _Ctext_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Withcase)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Withcase)); kc_x->post_create(); return static_cast(kc_x); } impl_unparsedeclarations* Nilunparsedeclarations() { unparsedeclarations kc_x = new impl_unparsedeclarations(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilunparsedeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilunparsedeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_unparsedeclarations* Consunparsedeclarations(unparsedeclaration _unparsedeclaration_1, unparsedeclarations _unparsedeclarations_1) { assertPhylum(_unparsedeclaration_1, phylum_unparsedeclaration); assertPhylum(_unparsedeclarations_1, phylum_unparsedeclarations); unparsedeclarations kc_x = new impl_unparsedeclarations(_unparsedeclaration_1, _unparsedeclarations_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consunparsedeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consunparsedeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_unparsedeclaration_UnparseDeclaration* UnparseDeclaration(outmostpatterns _outmostpatterns_1, unparseclauses _unparseclauses_1) { assertPhylum(_outmostpatterns_1, phylum_outmostpatterns); assertPhylum(_unparseclauses_1, phylum_unparseclauses); unparsedeclaration kc_x = new impl_unparsedeclaration_UnparseDeclaration(_outmostpatterns_1, _unparseclauses_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_UnparseDeclaration)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_UnparseDeclaration)); kc_x->post_create(); return static_cast(kc_x); } impl_unparseclauses* Nilunparseclauses() { unparseclauses kc_x = new impl_unparseclauses(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilunparseclauses)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilunparseclauses)); kc_x->post_create(); return static_cast(kc_x); } impl_unparseclauses* Consunparseclauses(unparseclause _unparseclause_1, unparseclauses _unparseclauses_1) { assertPhylum(_unparseclause_1, phylum_unparseclause); assertPhylum(_unparseclauses_1, phylum_unparseclauses); unparseclauses kc_x = new impl_unparseclauses(_unparseclause_1, _unparseclauses_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consunparseclauses)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consunparseclauses)); kc_x->post_create(); return static_cast(kc_x); } impl_unparseclause_UnparseClause* UnparseClause(viewnames _viewnames_1, unparseitems _unparseitems_1) { assertPhylum(_viewnames_1, phylum_viewnames); assertPhylum(_unparseitems_1, phylum_unparseitems); unparseclause kc_x = new impl_unparseclause_UnparseClause(_viewnames_1, _unparseitems_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_UnparseClause)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_UnparseClause)); kc_x->post_create(); return static_cast(kc_x); } impl_viewnames* Nilviewnames() { viewnames kc_x = new impl_viewnames(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilviewnames)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilviewnames)); kc_x->post_create(); kc_x = kc_initialize_viewnames(kc_x); return static_cast(kc_x); } impl_viewnames* Consviewnames(ID _ID_1, viewnames _viewnames_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_viewnames_1, phylum_viewnames); viewnames kc_x = new impl_viewnames(_ID_1, _viewnames_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consviewnames)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consviewnames)); kc_x->post_create(); kc_x = kc_initialize_viewnames(kc_x); return static_cast(kc_x); } impl_unparseitems* Nilunparseitems() { unparseitems kc_x = new impl_unparseitems(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilunparseitems)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilunparseitems)); kc_x->post_create(); return static_cast(kc_x); } impl_unparseitems* Consunparseitems(unparseitem _unparseitem_1, unparseitems _unparseitems_1) { assertPhylum(_unparseitem_1, phylum_unparseitem); assertPhylum(_unparseitems_1, phylum_unparseitems); unparseitems kc_x = new impl_unparseitems(_unparseitem_1, _unparseitems_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consunparseitems)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consunparseitems)); kc_x->post_create(); return static_cast(kc_x); } impl_unparseitem_UnpStr* UnpStr(languageoption _languageoption_1, CexpressionDQ _CexpressionDQ_1, viewnameoption _viewnameoption_1) { assertPhylum(_languageoption_1, phylum_languageoption); assertPhylum(_CexpressionDQ_1, phylum_CexpressionDQ); assertPhylum(_viewnameoption_1, phylum_viewnameoption); unparseitem kc_x = new impl_unparseitem_UnpStr(_languageoption_1, _CexpressionDQ_1, _viewnameoption_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_UnpStr)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_UnpStr)); kc_x->post_create(); kc_x = kc_initialize_unparseitem(kc_x); return static_cast(kc_x); } impl_unparseitem_UnpSubexpr* UnpSubexpr(languageoption _languageoption_1, unpsubterm _unpsubterm_1, viewnameoption _viewnameoption_1) { assertPhylum(_languageoption_1, phylum_languageoption); assertPhylum(_unpsubterm_1, phylum_unpsubterm); assertPhylum(_viewnameoption_1, phylum_viewnameoption); unparseitem kc_x = new impl_unparseitem_UnpSubexpr(_languageoption_1, _unpsubterm_1, _viewnameoption_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_UnpSubexpr)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_UnpSubexpr)); kc_x->post_create(); kc_x = kc_initialize_unparseitem(kc_x); return static_cast(kc_x); } impl_unparseitem_UnpCtext* UnpCtext(languageoption _languageoption_1, Ctext _Ctext_1) { assertPhylum(_languageoption_1, phylum_languageoption); assertPhylum(_Ctext_1, phylum_Ctext); unparseitem kc_x = new impl_unparseitem_UnpCtext(_languageoption_1, _Ctext_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_UnpCtext)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_UnpCtext)); kc_x->post_create(); kc_x = kc_initialize_unparseitem(kc_x); return static_cast(kc_x); } impl_unparseitem_UnpBody* UnpBody(languageoption _languageoption_1, unparseitems _unparseitems_1) { assertPhylum(_languageoption_1, phylum_languageoption); assertPhylum(_unparseitems_1, phylum_unparseitems); unparseitem kc_x = new impl_unparseitem_UnpBody(_languageoption_1, _unparseitems_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_UnpBody)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_UnpBody)); kc_x->post_create(); kc_x = kc_initialize_unparseitem(kc_x); return static_cast(kc_x); } impl_unparseitem_UViewVarDecl* UViewVarDecl(ID _ID_1, ID _ID_2, Cexpression _Cexpression_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_ID_2, phylum_ID); assertPhylum(_Cexpression_1, phylum_Cexpression); unparseitem kc_x = new impl_unparseitem_UViewVarDecl(_ID_1, _ID_2, _Cexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_UViewVarDecl)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_UViewVarDecl)); kc_x->post_create(); kc_x = kc_initialize_unparseitem(kc_x); return static_cast(kc_x); } impl_unpsubterm_UnpSubTerm* UnpSubTerm(ID _ID_1) { assertPhylum(_ID_1, phylum_ID); unpsubterm kc_x = new impl_unpsubterm_UnpSubTerm(_ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_UnpSubTerm)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_UnpSubTerm)); kc_x->post_create(); return static_cast(kc_x); } impl_unpsubterm_UnpDollarvarTerm* UnpDollarvarTerm(INT _INT_1) { assertPhylum(_INT_1, phylum_INT); unpsubterm kc_x = new impl_unpsubterm_UnpDollarvarTerm(_INT_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_UnpDollarvarTerm)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_UnpDollarvarTerm)); kc_x->post_create(); return static_cast(kc_x); } impl_unpsubterm_UnpSubAttr* UnpSubAttr(ID _ID_1, unpattributes _unpattributes_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_unpattributes_1, phylum_unpattributes); unpsubterm kc_x = new impl_unpsubterm_UnpSubAttr(_ID_1, _unpattributes_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_UnpSubAttr)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_UnpSubAttr)); kc_x->post_create(); return static_cast(kc_x); } impl_unpsubterm_UnpDollarvarAttr* UnpDollarvarAttr(INT _INT_1, unpattributes _unpattributes_1) { assertPhylum(_INT_1, phylum_INT); assertPhylum(_unpattributes_1, phylum_unpattributes); unpsubterm kc_x = new impl_unpsubterm_UnpDollarvarAttr(_INT_1, _unpattributes_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_UnpDollarvarAttr)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_UnpDollarvarAttr)); kc_x->post_create(); return static_cast(kc_x); } impl_unpsubterm_UnpCastedVariable* UnpCastedVariable(ID _ID_1, ID _ID_2) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_ID_2, phylum_ID); unpsubterm kc_x = new impl_unpsubterm_UnpCastedVariable(_ID_1, _ID_2); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_UnpCastedVariable)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_UnpCastedVariable)); kc_x->post_create(); return static_cast(kc_x); } impl_unpattributes* Nilunpattributes() { unpattributes kc_x = new impl_unpattributes(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilunpattributes)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilunpattributes)); kc_x->post_create(); return static_cast(kc_x); } impl_unpattributes* Consunpattributes(ID _ID_1, unpattributes _unpattributes_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_unpattributes_1, phylum_unpattributes); unpattributes kc_x = new impl_unpattributes(_ID_1, _unpattributes_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consunpattributes)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consunpattributes)); kc_x->post_create(); return static_cast(kc_x); } impl_viewnameoption_NoViewname* NoViewname() { viewnameoption kc_x = new impl_viewnameoption_NoViewname(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NoViewname)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NoViewname)); kc_x->post_create(); return static_cast(kc_x); } impl_viewnameoption_YesViewname* YesViewname(ID _ID_1) { assertPhylum(_ID_1, phylum_ID); viewnameoption kc_x = new impl_viewnameoption_YesViewname(_ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_YesViewname)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_YesViewname)); kc_x->post_create(); return static_cast(kc_x); } impl_languageoption_NoLanguagename* NoLanguagename() { languageoption kc_x = new impl_languageoption_NoLanguagename(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NoLanguagename)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NoLanguagename)); kc_x->post_create(); return static_cast(kc_x); } impl_languageoption_LanguageList* LanguageList(languagenames _languagenames_1) { assertPhylum(_languagenames_1, phylum_languagenames); languageoption kc_x = new impl_languageoption_LanguageList(_languagenames_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_LanguageList)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_LanguageList)); kc_x->post_create(); return static_cast(kc_x); } impl_languagenames* Nillanguagenames() { languagenames kc_x = new impl_languagenames(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nillanguagenames)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nillanguagenames)); kc_x->post_create(); return static_cast(kc_x); } impl_languagenames* Conslanguagenames(ID _ID_1, languagenames _languagenames_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_languagenames_1, phylum_languagenames); languagenames kc_x = new impl_languagenames(_ID_1, _languagenames_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Conslanguagenames)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Conslanguagenames)); kc_x->post_create(); return static_cast(kc_x); } impl_fileline_FileLine* FileLine(casestring _file, int _line) { fileline kc_x = new impl_fileline_FileLine(_file, _line); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_FileLine)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_FileLine)); kc_x->post_create(); return static_cast(kc_x); } impl_fileline_NoFileLine* NoFileLine() { fileline kc_x = new impl_fileline_NoFileLine(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NoFileLine)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NoFileLine)); kc_x->post_create(); return static_cast(kc_x); } impl_fileline_PosNoFileLine* PosNoFileLine() { fileline kc_x = new impl_fileline_PosNoFileLine(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PosNoFileLine)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PosNoFileLine)); kc_x->post_create(); return static_cast(kc_x); } impl_scopetypefilelinestack* Nilscopetypefilelinestack() { scopetypefilelinestack kc_x = new impl_scopetypefilelinestack(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilscopetypefilelinestack)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilscopetypefilelinestack)); kc_x->post_create(); return static_cast(kc_x); } impl_scopetypefilelinestack* Consscopetypefilelinestack(scopetypefileline _scopetypefileline_1, scopetypefilelinestack _scopetypefilelinestack_1) { assertPhylum(_scopetypefileline_1, phylum_scopetypefileline); assertPhylum(_scopetypefilelinestack_1, phylum_scopetypefilelinestack); scopetypefilelinestack kc_x = new impl_scopetypefilelinestack(_scopetypefileline_1, _scopetypefilelinestack_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consscopetypefilelinestack)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consscopetypefilelinestack)); kc_x->post_create(); return static_cast(kc_x); } impl_scopetypefileline_ScopeTypeFileLine* ScopeTypeFileLine(integer _integer_1, IDtype _IDtype_1, casestring _casestring_1, integer _integer_2) { assertPhylum(_integer_1, phylum_integer); assertPhylum(_IDtype_1, phylum_IDtype); assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_integer_2, phylum_integer); scopetypefileline kc_x = new impl_scopetypefileline_ScopeTypeFileLine(_integer_1, _IDtype_1, _casestring_1, _integer_2); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ScopeTypeFileLine)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ScopeTypeFileLine)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITUnknown* ITUnknown() { IDtype kc_x = new impl_IDtype_ITUnknown(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITUnknown)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITUnknown)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITPredefinedPhylum* ITPredefinedPhylum(phylumdeclaration _phylumdeclaration_1) { assertPhylum(_phylumdeclaration_1, phylum_phylumdeclaration); IDtype kc_x = new impl_IDtype_ITPredefinedPhylum(_phylumdeclaration_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITPredefinedPhylum)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITPredefinedPhylum)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITUserPhylum* ITUserPhylum(phylumdeclaration _phylumdeclaration_1) { assertPhylum(_phylumdeclaration_1, phylum_phylumdeclaration); IDtype kc_x = new impl_IDtype_ITUserPhylum(_phylumdeclaration_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITUserPhylum)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITUserPhylum)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITPredefinedOperator* ITPredefinedOperator(alternative _alternative_1, ID _ID_1) { assertPhylum(_alternative_1, phylum_alternative); assertPhylum(_ID_1, phylum_ID); IDtype kc_x = new impl_IDtype_ITPredefinedOperator(_alternative_1, _ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITPredefinedOperator)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITPredefinedOperator)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITUserOperator* ITUserOperator(alternative _alternative_1, ID _ID_1) { assertPhylum(_alternative_1, phylum_alternative); assertPhylum(_ID_1, phylum_ID); IDtype kc_x = new impl_IDtype_ITUserOperator(_alternative_1, _ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITUserOperator)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITUserOperator)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITPredefinedStorageClass* ITPredefinedStorageClass() { IDtype kc_x = new impl_IDtype_ITPredefinedStorageClass(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITPredefinedStorageClass)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITPredefinedStorageClass)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITStorageClass* ITStorageClass() { IDtype kc_x = new impl_IDtype_ITStorageClass(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITStorageClass)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITStorageClass)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITPredefinedUView* ITPredefinedUView() { IDtype kc_x = new impl_IDtype_ITPredefinedUView(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITPredefinedUView)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITPredefinedUView)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITUserUView* ITUserUView() { IDtype kc_x = new impl_IDtype_ITUserUView(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITUserUView)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITUserUView)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITUViewVar* ITUViewVar() { IDtype kc_x = new impl_IDtype_ITUViewVar(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITUViewVar)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITUViewVar)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITPredefinedRView* ITPredefinedRView() { IDtype kc_x = new impl_IDtype_ITPredefinedRView(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITPredefinedRView)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITPredefinedRView)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITUserRView* ITUserRView() { IDtype kc_x = new impl_IDtype_ITUserRView(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITUserRView)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITUserRView)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITUserFunction* ITUserFunction(fnclass _fnclass_1) { assertPhylum(_fnclass_1, phylum_fnclass); IDtype kc_x = new impl_IDtype_ITUserFunction(_fnclass_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITUserFunction)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITUserFunction)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITPatternVariable* ITPatternVariable(ID _ID_1, integer _integer_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_integer_1, phylum_integer); IDtype kc_x = new impl_IDtype_ITPatternVariable(_ID_1, _integer_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITPatternVariable)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITPatternVariable)); kc_x->post_create(); return static_cast(kc_x); } impl_IDtype_ITLanguageName* ITLanguageName(integer _integer_1) { assertPhylum(_integer_1, phylum_integer); IDtype kc_x = new impl_IDtype_ITLanguageName(_integer_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_ITLanguageName)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_ITLanguageName)); kc_x->post_create(); return static_cast(kc_x); } impl_operators* Niloperators() { operators kc_x = new impl_operators(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Niloperators)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Niloperators)); kc_x->post_create(); return static_cast(kc_x); } impl_operators* Consoperators(ID _ID_1, operators _operators_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_operators_1, phylum_operators); operators kc_x = new impl_operators(_ID_1, _operators_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consoperators)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consoperators)); kc_x->post_create(); return static_cast(kc_x); } impl_phyla* Nilphyla() { phyla kc_x = new impl_phyla(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilphyla)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilphyla)); kc_x->post_create(); return static_cast(kc_x); } impl_phyla* Consphyla(ID _ID_1, phyla _phyla_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_phyla_1, phylum_phyla); phyla kc_x = new impl_phyla(_ID_1, _phyla_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consphyla)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consphyla)); kc_x->post_create(); return static_cast(kc_x); } impl_variables* Nilvariables() { variables kc_x = new impl_variables(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilvariables)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilvariables)); kc_x->post_create(); return static_cast(kc_x); } impl_variables* Consvariables(ID _ID_1, variables _variables_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_variables_1, phylum_variables); variables kc_x = new impl_variables(_ID_1, _variables_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consvariables)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consvariables)); kc_x->post_create(); return static_cast(kc_x); } impl_dollarvarstatus_DVAllowed* DVAllowed() { dollarvarstatus kc_x = new impl_dollarvarstatus_DVAllowed(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_DVAllowed)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_DVAllowed)); kc_x->post_create(); return static_cast(kc_x); } impl_dollarvarstatus_DVDisallowed* DVDisallowed() { dollarvarstatus kc_x = new impl_dollarvarstatus_DVDisallowed(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_DVDisallowed)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_DVDisallowed)); kc_x->post_create(); return static_cast(kc_x); } impl_tribool_Equal* Equal() { tribool kc_x = new impl_tribool_Equal(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Equal)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Equal)); kc_x->post_create(); return static_cast(kc_x); } impl_tribool_Smaller* Smaller() { tribool kc_x = new impl_tribool_Smaller(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Smaller)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Smaller)); kc_x->post_create(); return static_cast(kc_x); } impl_tribool_Bigger* Bigger() { tribool kc_x = new impl_tribool_Bigger(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Bigger)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Bigger)); kc_x->post_create(); return static_cast(kc_x); } impl_patternrepresentations* Nilpatternrepresentations() { patternrepresentations kc_x = new impl_patternrepresentations(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilpatternrepresentations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilpatternrepresentations)); kc_x->post_create(); return static_cast(kc_x); } impl_patternrepresentations* Conspatternrepresentations(patternrepresentation _patternrepresentation_1, patternrepresentations _patternrepresentations_1) { assertPhylum(_patternrepresentation_1, phylum_patternrepresentation); assertPhylum(_patternrepresentations_1, phylum_patternrepresentations); patternrepresentations kc_x = new impl_patternrepresentations(_patternrepresentation_1, _patternrepresentations_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Conspatternrepresentations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Conspatternrepresentations)); kc_x->post_create(); return static_cast(kc_x); } impl_patternrepresentation* Nilpatternrepresentation() { patternrepresentation kc_x = new impl_patternrepresentation(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilpatternrepresentation)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilpatternrepresentation)); kc_x->post_create(); return static_cast(kc_x); } impl_patternrepresentation* Conspatternrepresentation(elem_patternrepresentation _elem_patternrepresentation_1, patternrepresentation _patternrepresentation_1) { assertPhylum(_elem_patternrepresentation_1, phylum_elem_patternrepresentation); assertPhylum(_patternrepresentation_1, phylum_patternrepresentation); patternrepresentation kc_x = new impl_patternrepresentation(_elem_patternrepresentation_1, _patternrepresentation_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Conspatternrepresentation)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Conspatternrepresentation)); kc_x->post_create(); return static_cast(kc_x); } impl_elem_patternrepresentation_PRBinding* PRBinding(path _path_1, ID _ID_1) { assertPhylum(_path_1, phylum_path); assertPhylum(_ID_1, phylum_ID); elem_patternrepresentation kc_x = new impl_elem_patternrepresentation_PRBinding(_path_1, _ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PRBinding)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PRBinding)); kc_x->post_create(); kc_x = kc_initialize_elem_patternrepresentation(kc_x); return static_cast(kc_x); } impl_elem_patternrepresentation_PRVarPredicate* PRVarPredicate(paths _paths_1, ID _ID_1, patternrepresentation _patternrepresentation_1) { assertPhylum(_paths_1, phylum_paths); assertPhylum(_ID_1, phylum_ID); assertPhylum(_patternrepresentation_1, phylum_patternrepresentation); elem_patternrepresentation kc_x = new impl_elem_patternrepresentation_PRVarPredicate(_paths_1, _ID_1, _patternrepresentation_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PRVarPredicate)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PRVarPredicate)); kc_x->post_create(); kc_x = kc_initialize_elem_patternrepresentation(kc_x); return static_cast(kc_x); } impl_elem_patternrepresentation_PROperPredicate* PROperPredicate(path _path_1, ID _ID_1) { assertPhylum(_path_1, phylum_path); assertPhylum(_ID_1, phylum_ID); elem_patternrepresentation kc_x = new impl_elem_patternrepresentation_PROperPredicate(_path_1, _ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PROperPredicate)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PROperPredicate)); kc_x->post_create(); kc_x = kc_initialize_elem_patternrepresentation(kc_x); return static_cast(kc_x); } impl_elem_patternrepresentation_PRUserPredicate* PRUserPredicate(Cexpression _Cexpression_1) { assertPhylum(_Cexpression_1, phylum_Cexpression); elem_patternrepresentation kc_x = new impl_elem_patternrepresentation_PRUserPredicate(_Cexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PRUserPredicate)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PRUserPredicate)); kc_x->post_create(); kc_x = kc_initialize_elem_patternrepresentation(kc_x); return static_cast(kc_x); } impl_elem_patternrepresentation_PRNonLeafBinding* PRNonLeafBinding(path _path_1, ID _ID_1, patternrepresentation _patternrepresentation_1) { assertPhylum(_path_1, phylum_path); assertPhylum(_ID_1, phylum_ID); assertPhylum(_patternrepresentation_1, phylum_patternrepresentation); elem_patternrepresentation kc_x = new impl_elem_patternrepresentation_PRNonLeafBinding(_path_1, _ID_1, _patternrepresentation_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PRNonLeafBinding)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PRNonLeafBinding)); kc_x->post_create(); kc_x = kc_initialize_elem_patternrepresentation(kc_x); return static_cast(kc_x); } impl_elem_patternrepresentation_PRWildcard* PRWildcard(path _path_1) { assertPhylum(_path_1, phylum_path); elem_patternrepresentation kc_x = new impl_elem_patternrepresentation_PRWildcard(_path_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PRWildcard)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PRWildcard)); kc_x->post_create(); kc_x = kc_initialize_elem_patternrepresentation(kc_x); return static_cast(kc_x); } impl_elem_patternrepresentation_PRDefault* PRDefault() { elem_patternrepresentation kc_x = new impl_elem_patternrepresentation_PRDefault(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PRDefault)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PRDefault)); kc_x->post_create(); kc_x = kc_initialize_elem_patternrepresentation(kc_x); return static_cast(kc_x); } impl_elem_patternrepresentation_PRStringLiteral* PRStringLiteral(path _path_1, CexpressionDQ _CexpressionDQ_1) { assertPhylum(_path_1, phylum_path); assertPhylum(_CexpressionDQ_1, phylum_CexpressionDQ); elem_patternrepresentation kc_x = new impl_elem_patternrepresentation_PRStringLiteral(_path_1, _CexpressionDQ_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PRStringLiteral)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PRStringLiteral)); kc_x->post_create(); kc_x = kc_initialize_elem_patternrepresentation(kc_x); return static_cast(kc_x); } impl_elem_patternrepresentation_PRIntLiteral* PRIntLiteral(path _path_1, INT _INT_1) { assertPhylum(_path_1, phylum_path); assertPhylum(_INT_1, phylum_INT); elem_patternrepresentation kc_x = new impl_elem_patternrepresentation_PRIntLiteral(_path_1, _INT_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_PRIntLiteral)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_PRIntLiteral)); kc_x->post_create(); kc_x = kc_initialize_elem_patternrepresentation(kc_x); return static_cast(kc_x); } impl_path* Nilpath() { path kc_x = new impl_path(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilpath)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilpath)); kc_x->post_create(); kc_x = kc_initialize_path(kc_x); return static_cast(kc_x); } impl_path* Conspath(integer _integer_1, path _path_1) { assertPhylum(_integer_1, phylum_integer); assertPhylum(_path_1, phylum_path); path kc_x = new impl_path(_integer_1, _path_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Conspath)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Conspath)); kc_x->post_create(); kc_x = kc_initialize_path(kc_x); return static_cast(kc_x); } impl_paths* Nilpaths() { paths kc_x = new impl_paths(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilpaths)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilpaths)); kc_x->post_create(); return static_cast(kc_x); } impl_paths* Conspaths(path _path_1, paths _paths_1) { assertPhylum(_path_1, phylum_path); assertPhylum(_paths_1, phylum_paths); paths kc_x = new impl_paths(_path_1, _paths_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Conspaths)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Conspaths)); kc_x->post_create(); return static_cast(kc_x); } impl_argsnumbers* Nilargsnumbers() { argsnumbers kc_x = new impl_argsnumbers(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilargsnumbers)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilargsnumbers)); kc_x->post_create(); return static_cast(kc_x); } impl_argsnumbers* Consargsnumbers(integer _integer_1, argsnumbers _argsnumbers_1) { assertPhylum(_integer_1, phylum_integer); assertPhylum(_argsnumbers_1, phylum_argsnumbers); argsnumbers kc_x = new impl_argsnumbers(_integer_1, _argsnumbers_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consargsnumbers)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consargsnumbers)); kc_x->post_create(); return static_cast(kc_x); } impl_rewriterulesinfo* Nilrewriterulesinfo() { rewriterulesinfo kc_x = new impl_rewriterulesinfo(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilrewriterulesinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilrewriterulesinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_rewriterulesinfo* Consrewriterulesinfo(rewriteruleinfo _rewriteruleinfo_1, rewriterulesinfo _rewriterulesinfo_1) { assertPhylum(_rewriteruleinfo_1, phylum_rewriteruleinfo); assertPhylum(_rewriterulesinfo_1, phylum_rewriterulesinfo); rewriterulesinfo kc_x = new impl_rewriterulesinfo(_rewriteruleinfo_1, _rewriterulesinfo_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consrewriterulesinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consrewriterulesinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_rewriteruleinfo_Rewriteruleinfo* Rewriteruleinfo(patternrepresentation _patternrepresentation_1, patternrepresentation _patternrepresentation_2, rewriteclause _rewriteclause_1) { assertPhylum(_patternrepresentation_1, phylum_patternrepresentation); assertPhylum(_patternrepresentation_2, phylum_patternrepresentation); assertPhylum(_rewriteclause_1, phylum_rewriteclause); rewriteruleinfo kc_x = new impl_rewriteruleinfo_Rewriteruleinfo(_patternrepresentation_1, _patternrepresentation_2, _rewriteclause_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Rewriteruleinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Rewriteruleinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_withcasesinfo* Nilwithcasesinfo() { withcasesinfo kc_x = new impl_withcasesinfo(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilwithcasesinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilwithcasesinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_withcasesinfo* Conswithcasesinfo(withcaseinfo _withcaseinfo_1, withcasesinfo _withcasesinfo_1) { assertPhylum(_withcaseinfo_1, phylum_withcaseinfo); assertPhylum(_withcasesinfo_1, phylum_withcasesinfo); withcasesinfo kc_x = new impl_withcasesinfo(_withcaseinfo_1, _withcasesinfo_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Conswithcasesinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Conswithcasesinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_withcaseinfo_Withcaseinfo* Withcaseinfo(patternrepresentation _patternrepresentation_1, patternrepresentation _patternrepresentation_2, Ctext _Ctext_1) { assertPhylum(_patternrepresentation_1, phylum_patternrepresentation); assertPhylum(_patternrepresentation_2, phylum_patternrepresentation); assertPhylum(_Ctext_1, phylum_Ctext); withcaseinfo kc_x = new impl_withcaseinfo_Withcaseinfo(_patternrepresentation_1, _patternrepresentation_2, _Ctext_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Withcaseinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Withcaseinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_rewriteviewsinfo* Nilrewriteviewsinfo() { rewriteviewsinfo kc_x = new impl_rewriteviewsinfo(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilrewriteviewsinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilrewriteviewsinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_rewriteviewsinfo* Consrewriteviewsinfo(rewriteviewinfo _rewriteviewinfo_1, rewriteviewsinfo _rewriteviewsinfo_1) { assertPhylum(_rewriteviewinfo_1, phylum_rewriteviewinfo); assertPhylum(_rewriteviewsinfo_1, phylum_rewriteviewsinfo); rewriteviewsinfo kc_x = new impl_rewriteviewsinfo(_rewriteviewinfo_1, _rewriteviewsinfo_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consrewriteviewsinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consrewriteviewsinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_rewriteviewinfo_Rewriteviewinfo* Rewriteviewinfo(ID _ID_1, rewriterulesinfo _rewriterulesinfo_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_rewriterulesinfo_1, phylum_rewriterulesinfo); rewriteviewinfo kc_x = new impl_rewriteviewinfo_Rewriteviewinfo(_ID_1, _rewriterulesinfo_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Rewriteviewinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Rewriteviewinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_unparseviewsinfo* Nilunparseviewsinfo() { unparseviewsinfo kc_x = new impl_unparseviewsinfo(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilunparseviewsinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilunparseviewsinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_unparseviewsinfo* Consunparseviewsinfo(unparseviewinfo _unparseviewinfo_1, unparseviewsinfo _unparseviewsinfo_1) { assertPhylum(_unparseviewinfo_1, phylum_unparseviewinfo); assertPhylum(_unparseviewsinfo_1, phylum_unparseviewsinfo); unparseviewsinfo kc_x = new impl_unparseviewsinfo(_unparseviewinfo_1, _unparseviewsinfo_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consunparseviewsinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consunparseviewsinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_unparseviewinfo_Unparseviewinfo* Unparseviewinfo(ID _ID_1, unparsedeclsinfo _unparsedeclsinfo_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_unparsedeclsinfo_1, phylum_unparsedeclsinfo); unparseviewinfo kc_x = new impl_unparseviewinfo_Unparseviewinfo(_ID_1, _unparsedeclsinfo_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Unparseviewinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Unparseviewinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_unparsedeclsinfo* Nilunparsedeclsinfo() { unparsedeclsinfo kc_x = new impl_unparsedeclsinfo(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilunparsedeclsinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilunparsedeclsinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_unparsedeclsinfo* Consunparsedeclsinfo(unparsedeclinfo _unparsedeclinfo_1, unparsedeclsinfo _unparsedeclsinfo_1) { assertPhylum(_unparsedeclinfo_1, phylum_unparsedeclinfo); assertPhylum(_unparsedeclsinfo_1, phylum_unparsedeclsinfo); unparsedeclsinfo kc_x = new impl_unparsedeclsinfo(_unparsedeclinfo_1, _unparsedeclsinfo_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consunparsedeclsinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consunparsedeclsinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_unparsedeclinfo_Unparsedeclinfo* Unparsedeclinfo(patternrepresentation _patternrepresentation_1, patternrepresentation _patternrepresentation_2, unparseclause _unparseclause_1) { assertPhylum(_patternrepresentation_1, phylum_patternrepresentation); assertPhylum(_patternrepresentation_2, phylum_patternrepresentation); assertPhylum(_unparseclause_1, phylum_unparseclause); unparsedeclinfo kc_x = new impl_unparsedeclinfo_Unparsedeclinfo(_patternrepresentation_1, _patternrepresentation_2, _unparseclause_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Unparsedeclinfo)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Unparsedeclinfo)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_declaration_AcDeclaration* AcDeclaration(ac_declaration_specifiers _ac_declaration_specifiers_1, ac_init_declarator_list _ac_init_declarator_list_1) { assertPhylum(_ac_declaration_specifiers_1, phylum_ac_declaration_specifiers); assertPhylum(_ac_init_declarator_list_1, phylum_ac_init_declarator_list); ac_declaration kc_x = new impl_ac_declaration_AcDeclaration(_ac_declaration_specifiers_1, _ac_init_declarator_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcDeclaration)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcDeclaration)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_declaration_list* Nilac_declaration_list() { ac_declaration_list kc_x = new impl_ac_declaration_list(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilac_declaration_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilac_declaration_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_declaration_list* Consac_declaration_list(ac_declaration _ac_declaration_1, ac_declaration_list _ac_declaration_list_1) { assertPhylum(_ac_declaration_1, phylum_ac_declaration); assertPhylum(_ac_declaration_list_1, phylum_ac_declaration_list); ac_declaration_list kc_x = new impl_ac_declaration_list(_ac_declaration_1, _ac_declaration_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consac_declaration_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consac_declaration_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_declaration_specifiers* Nilac_declaration_specifiers() { ac_declaration_specifiers kc_x = new impl_ac_declaration_specifiers(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilac_declaration_specifiers)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilac_declaration_specifiers)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_declaration_specifiers* Consac_declaration_specifiers(ac_declaration_specifier _ac_declaration_specifier_1, ac_declaration_specifiers _ac_declaration_specifiers_1) { assertPhylum(_ac_declaration_specifier_1, phylum_ac_declaration_specifier); assertPhylum(_ac_declaration_specifiers_1, phylum_ac_declaration_specifiers); ac_declaration_specifiers kc_x = new impl_ac_declaration_specifiers(_ac_declaration_specifier_1, _ac_declaration_specifiers_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consac_declaration_specifiers)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consac_declaration_specifiers)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_declaration_specifier_AcDeclSpecStorageSpec* AcDeclSpecStorageSpec(ac_storage_class_specifier _ac_storage_class_specifier_1) { assertPhylum(_ac_storage_class_specifier_1, phylum_ac_storage_class_specifier); ac_declaration_specifier kc_x = new impl_ac_declaration_specifier_AcDeclSpecStorageSpec(_ac_storage_class_specifier_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcDeclSpecStorageSpec)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcDeclSpecStorageSpec)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_declaration_specifier_AcDeclSpecTypeSpec* AcDeclSpecTypeSpec(ac_type_specifier _ac_type_specifier_1) { assertPhylum(_ac_type_specifier_1, phylum_ac_type_specifier); ac_declaration_specifier kc_x = new impl_ac_declaration_specifier_AcDeclSpecTypeSpec(_ac_type_specifier_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcDeclSpecTypeSpec)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcDeclSpecTypeSpec)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_declaration_specifier_AcDeclSpecTypeQual* AcDeclSpecTypeQual(ac_type_qualifier _ac_type_qualifier_1) { assertPhylum(_ac_type_qualifier_1, phylum_ac_type_qualifier); ac_declaration_specifier kc_x = new impl_ac_declaration_specifier_AcDeclSpecTypeQual(_ac_type_qualifier_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcDeclSpecTypeQual)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcDeclSpecTypeQual)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_storage_class_specifier_AcAuto* AcAuto() { ac_storage_class_specifier kc_x = new impl_ac_storage_class_specifier_AcAuto(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcAuto)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcAuto)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_storage_class_specifier_AcRegister* AcRegister() { ac_storage_class_specifier kc_x = new impl_ac_storage_class_specifier_AcRegister(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcRegister)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcRegister)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_storage_class_specifier_AcStatic* AcStatic() { ac_storage_class_specifier kc_x = new impl_ac_storage_class_specifier_AcStatic(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcStatic)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcStatic)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_storage_class_specifier_AcExtern* AcExtern() { ac_storage_class_specifier kc_x = new impl_ac_storage_class_specifier_AcExtern(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcExtern)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcExtern)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_storage_class_specifier_AcTypedef* AcTypedef() { ac_storage_class_specifier kc_x = new impl_ac_storage_class_specifier_AcTypedef(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcTypedef)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcTypedef)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_storage_class_specifier_AcVirtual* AcVirtual() { ac_storage_class_specifier kc_x = new impl_ac_storage_class_specifier_AcVirtual(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcVirtual)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcVirtual)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_type_specifier_AcTypeSpec* AcTypeSpec(ID _ID_1) { assertPhylum(_ID_1, phylum_ID); ac_type_specifier kc_x = new impl_ac_type_specifier_AcTypeSpec(_ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcTypeSpec)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcTypeSpec)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_type_qualifier_AcConst* AcConst() { ac_type_qualifier kc_x = new impl_ac_type_qualifier_AcConst(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcConst)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcConst)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_type_qualifier_AcVolatile* AcVolatile() { ac_type_qualifier kc_x = new impl_ac_type_qualifier_AcVolatile(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcVolatile)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcVolatile)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_type_qualifier_AcUnsigned* AcUnsigned() { ac_type_qualifier kc_x = new impl_ac_type_qualifier_AcUnsigned(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcUnsigned)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcUnsigned)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_type_qualifier_AcNoQualifier* AcNoQualifier() { ac_type_qualifier kc_x = new impl_ac_type_qualifier_AcNoQualifier(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcNoQualifier)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcNoQualifier)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_init_declarator_list* Nilac_init_declarator_list() { ac_init_declarator_list kc_x = new impl_ac_init_declarator_list(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilac_init_declarator_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilac_init_declarator_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_init_declarator_list* Consac_init_declarator_list(ac_init_declarator _ac_init_declarator_1, ac_init_declarator_list _ac_init_declarator_list_1) { assertPhylum(_ac_init_declarator_1, phylum_ac_init_declarator); assertPhylum(_ac_init_declarator_list_1, phylum_ac_init_declarator_list); ac_init_declarator_list kc_x = new impl_ac_init_declarator_list(_ac_init_declarator_1, _ac_init_declarator_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consac_init_declarator_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consac_init_declarator_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_init_declarator_AcInitDecl* AcInitDecl(ac_declarator _ac_declarator_1) { assertPhylum(_ac_declarator_1, phylum_ac_declarator); ac_init_declarator kc_x = new impl_ac_init_declarator_AcInitDecl(_ac_declarator_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcInitDecl)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcInitDecl)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_declarator_AcDeclarator* AcDeclarator(ac_pointer_option _ac_pointer_option_1, ac_ref_option _ac_ref_option_1, ac_direct_declarator _ac_direct_declarator_1) { assertPhylum(_ac_pointer_option_1, phylum_ac_pointer_option); assertPhylum(_ac_ref_option_1, phylum_ac_ref_option); assertPhylum(_ac_direct_declarator_1, phylum_ac_direct_declarator); ac_declarator kc_x = new impl_ac_declarator_AcDeclarator(_ac_pointer_option_1, _ac_ref_option_1, _ac_direct_declarator_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcDeclarator)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcDeclarator)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_direct_declarator_AcDirectDeclId* AcDirectDeclId(ID _ID_1) { assertPhylum(_ID_1, phylum_ID); ac_direct_declarator kc_x = new impl_ac_direct_declarator_AcDirectDeclId(_ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcDirectDeclId)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcDirectDeclId)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_direct_declarator_AcDirectDeclPack* AcDirectDeclPack(ac_declarator _ac_declarator_1) { assertPhylum(_ac_declarator_1, phylum_ac_declarator); ac_direct_declarator kc_x = new impl_ac_direct_declarator_AcDirectDeclPack(_ac_declarator_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcDirectDeclPack)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcDirectDeclPack)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_direct_declarator_AcDirectDeclArray* AcDirectDeclArray(ac_direct_declarator _ac_direct_declarator_1, ac_constant_expression_option _ac_constant_expression_option_1) { assertPhylum(_ac_direct_declarator_1, phylum_ac_direct_declarator); assertPhylum(_ac_constant_expression_option_1, phylum_ac_constant_expression_option); ac_direct_declarator kc_x = new impl_ac_direct_declarator_AcDirectDeclArray(_ac_direct_declarator_1, _ac_constant_expression_option_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcDirectDeclArray)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcDirectDeclArray)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_direct_declarator_AcDirectDeclProto* AcDirectDeclProto(ac_direct_declarator _ac_direct_declarator_1, ac_parameter_type_list _ac_parameter_type_list_1) { assertPhylum(_ac_direct_declarator_1, phylum_ac_direct_declarator); assertPhylum(_ac_parameter_type_list_1, phylum_ac_parameter_type_list); ac_direct_declarator kc_x = new impl_ac_direct_declarator_AcDirectDeclProto(_ac_direct_declarator_1, _ac_parameter_type_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcDirectDeclProto)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcDirectDeclProto)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_direct_declarator_AcQualifiedDeclProto* AcQualifiedDeclProto(ac_class_qualifier_list _ac_class_qualifier_list_1, ac_direct_declarator _ac_direct_declarator_1, ac_parameter_type_list _ac_parameter_type_list_1, ac_type_qualifier _ac_type_qualifier_1) { assertPhylum(_ac_class_qualifier_list_1, phylum_ac_class_qualifier_list); assertPhylum(_ac_direct_declarator_1, phylum_ac_direct_declarator); assertPhylum(_ac_parameter_type_list_1, phylum_ac_parameter_type_list); assertPhylum(_ac_type_qualifier_1, phylum_ac_type_qualifier); ac_direct_declarator kc_x = new impl_ac_direct_declarator_AcQualifiedDeclProto(_ac_class_qualifier_list_1, _ac_direct_declarator_1, _ac_parameter_type_list_1, _ac_type_qualifier_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcQualifiedDeclProto)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcQualifiedDeclProto)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_direct_declarator_AcMemberDecl* AcMemberDecl(ID _ID_1, ID _ID_2, ac_constant_expression_list _ac_constant_expression_list_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_ID_2, phylum_ID); assertPhylum(_ac_constant_expression_list_1, phylum_ac_constant_expression_list); ac_direct_declarator kc_x = new impl_ac_direct_declarator_AcMemberDecl(_ID_1, _ID_2, _ac_constant_expression_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcMemberDecl)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcMemberDecl)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_direct_declarator_AcConvOperatorDecl* AcConvOperatorDecl(ID _ID_1, ID _ID_2) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_ID_2, phylum_ID); ac_direct_declarator kc_x = new impl_ac_direct_declarator_AcConvOperatorDecl(_ID_1, _ID_2); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcConvOperatorDecl)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcConvOperatorDecl)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_direct_declarator_AcOperatorDeclId* AcOperatorDeclId(ac_operator_name _ac_operator_name_1) { assertPhylum(_ac_operator_name_1, phylum_ac_operator_name); ac_direct_declarator kc_x = new impl_ac_direct_declarator_AcOperatorDeclId(_ac_operator_name_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcOperatorDeclId)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcOperatorDeclId)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_pointer_option_Nopointer* Nopointer() { ac_pointer_option kc_x = new impl_ac_pointer_option_Nopointer(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nopointer)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nopointer)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_pointer_option_Yespointer* Yespointer(ac_pointer _ac_pointer_1) { assertPhylum(_ac_pointer_1, phylum_ac_pointer); ac_pointer_option kc_x = new impl_ac_pointer_option_Yespointer(_ac_pointer_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Yespointer)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Yespointer)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_pointer_AcPointerNil* AcPointerNil(ac_type_qualifier_list _ac_type_qualifier_list_1) { assertPhylum(_ac_type_qualifier_list_1, phylum_ac_type_qualifier_list); ac_pointer kc_x = new impl_ac_pointer_AcPointerNil(_ac_type_qualifier_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcPointerNil)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcPointerNil)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_pointer_AcPointerCons* AcPointerCons(ac_type_qualifier_list _ac_type_qualifier_list_1, ac_pointer _ac_pointer_1) { assertPhylum(_ac_type_qualifier_list_1, phylum_ac_type_qualifier_list); assertPhylum(_ac_pointer_1, phylum_ac_pointer); ac_pointer kc_x = new impl_ac_pointer_AcPointerCons(_ac_type_qualifier_list_1, _ac_pointer_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcPointerCons)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcPointerCons)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_ref_option_AcNoRef* AcNoRef() { ac_ref_option kc_x = new impl_ac_ref_option_AcNoRef(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcNoRef)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcNoRef)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_ref_option_AcRef* AcRef() { ac_ref_option kc_x = new impl_ac_ref_option_AcRef(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcRef)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcRef)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_operator_name_AcOperatorName* AcOperatorName(casestring _casestring_1) { assertPhylum(_casestring_1, phylum_casestring); ac_operator_name kc_x = new impl_ac_operator_name_AcOperatorName(_casestring_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcOperatorName)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcOperatorName)); kc_x->post_create(); kc_x = kc_initialize_ac_operator_name(kc_x); return static_cast(kc_x); } impl_ac_class_qualifier_help_list* Nilac_class_qualifier_help_list() { ac_class_qualifier_help_list kc_x = new impl_ac_class_qualifier_help_list(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilac_class_qualifier_help_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilac_class_qualifier_help_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_class_qualifier_help_list* Consac_class_qualifier_help_list(ac_direct_declarator _ac_direct_declarator_1, ac_class_qualifier_help_list _ac_class_qualifier_help_list_1) { assertPhylum(_ac_direct_declarator_1, phylum_ac_direct_declarator); assertPhylum(_ac_class_qualifier_help_list_1, phylum_ac_class_qualifier_help_list); ac_class_qualifier_help_list kc_x = new impl_ac_class_qualifier_help_list(_ac_direct_declarator_1, _ac_class_qualifier_help_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consac_class_qualifier_help_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consac_class_qualifier_help_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_class_qualifier_list* Nilac_class_qualifier_list() { ac_class_qualifier_list kc_x = new impl_ac_class_qualifier_list(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilac_class_qualifier_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilac_class_qualifier_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_class_qualifier_list* Consac_class_qualifier_list(ID _ID_1, ac_class_qualifier_list _ac_class_qualifier_list_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_ac_class_qualifier_list_1, phylum_ac_class_qualifier_list); ac_class_qualifier_list kc_x = new impl_ac_class_qualifier_list(_ID_1, _ac_class_qualifier_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consac_class_qualifier_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consac_class_qualifier_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_type_qualifier_list* Nilac_type_qualifier_list() { ac_type_qualifier_list kc_x = new impl_ac_type_qualifier_list(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilac_type_qualifier_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilac_type_qualifier_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_type_qualifier_list* Consac_type_qualifier_list(ac_type_qualifier _ac_type_qualifier_1, ac_type_qualifier_list _ac_type_qualifier_list_1) { assertPhylum(_ac_type_qualifier_1, phylum_ac_type_qualifier); assertPhylum(_ac_type_qualifier_list_1, phylum_ac_type_qualifier_list); ac_type_qualifier_list kc_x = new impl_ac_type_qualifier_list(_ac_type_qualifier_1, _ac_type_qualifier_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consac_type_qualifier_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consac_type_qualifier_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_parameter_type_list_AcParList* AcParList(ac_parameter_list _ac_parameter_list_1) { assertPhylum(_ac_parameter_list_1, phylum_ac_parameter_list); ac_parameter_type_list kc_x = new impl_ac_parameter_type_list_AcParList(_ac_parameter_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcParList)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcParList)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_parameter_type_list_AcParList3Dot* AcParList3Dot(ac_parameter_list _ac_parameter_list_1) { assertPhylum(_ac_parameter_list_1, phylum_ac_parameter_list); ac_parameter_type_list kc_x = new impl_ac_parameter_type_list_AcParList3Dot(_ac_parameter_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcParList3Dot)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcParList3Dot)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_parameter_list* Nilac_parameter_list() { ac_parameter_list kc_x = new impl_ac_parameter_list(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilac_parameter_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilac_parameter_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_parameter_list* Consac_parameter_list(ac_parameter_declaration _ac_parameter_declaration_1, ac_parameter_list _ac_parameter_list_1) { assertPhylum(_ac_parameter_declaration_1, phylum_ac_parameter_declaration); assertPhylum(_ac_parameter_list_1, phylum_ac_parameter_list); ac_parameter_list kc_x = new impl_ac_parameter_list(_ac_parameter_declaration_1, _ac_parameter_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consac_parameter_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consac_parameter_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_parameter_declaration_AcParDeclDecl* AcParDeclDecl(ac_declaration_specifiers _ac_declaration_specifiers_1, ac_declarator _ac_declarator_1, ac_constant_expression_option _ac_constant_expression_option_1) { assertPhylum(_ac_declaration_specifiers_1, phylum_ac_declaration_specifiers); assertPhylum(_ac_declarator_1, phylum_ac_declarator); assertPhylum(_ac_constant_expression_option_1, phylum_ac_constant_expression_option); ac_parameter_declaration kc_x = new impl_ac_parameter_declaration_AcParDeclDecl(_ac_declaration_specifiers_1, _ac_declarator_1, _ac_constant_expression_option_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcParDeclDecl)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcParDeclDecl)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_parameter_declaration_AcParDeclAbsdecl* AcParDeclAbsdecl(ac_declaration_specifiers _ac_declaration_specifiers_1, ac_abstract_declarator _ac_abstract_declarator_1, ac_constant_expression_option _ac_constant_expression_option_1) { assertPhylum(_ac_declaration_specifiers_1, phylum_ac_declaration_specifiers); assertPhylum(_ac_abstract_declarator_1, phylum_ac_abstract_declarator); assertPhylum(_ac_constant_expression_option_1, phylum_ac_constant_expression_option); ac_parameter_declaration kc_x = new impl_ac_parameter_declaration_AcParDeclAbsdecl(_ac_declaration_specifiers_1, _ac_abstract_declarator_1, _ac_constant_expression_option_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcParDeclAbsdecl)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcParDeclAbsdecl)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_identifier_list* Nilac_identifier_list() { ac_identifier_list kc_x = new impl_ac_identifier_list(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilac_identifier_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilac_identifier_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_identifier_list* Consac_identifier_list(ID _ID_1, ac_identifier_list _ac_identifier_list_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_ac_identifier_list_1, phylum_ac_identifier_list); ac_identifier_list kc_x = new impl_ac_identifier_list(_ID_1, _ac_identifier_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consac_identifier_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consac_identifier_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_abstract_declarator_AcAbsdeclPointer* AcAbsdeclPointer(ac_pointer _ac_pointer_1) { assertPhylum(_ac_pointer_1, phylum_ac_pointer); ac_abstract_declarator kc_x = new impl_ac_abstract_declarator_AcAbsdeclPointer(_ac_pointer_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcAbsdeclPointer)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcAbsdeclPointer)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_abstract_declarator_AcAbsdeclDirdecl* AcAbsdeclDirdecl(ac_pointer_option _ac_pointer_option_1, ac_direct_abstract_declarator _ac_direct_abstract_declarator_1) { assertPhylum(_ac_pointer_option_1, phylum_ac_pointer_option); assertPhylum(_ac_direct_abstract_declarator_1, phylum_ac_direct_abstract_declarator); ac_abstract_declarator kc_x = new impl_ac_abstract_declarator_AcAbsdeclDirdecl(_ac_pointer_option_1, _ac_direct_abstract_declarator_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcAbsdeclDirdecl)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcAbsdeclDirdecl)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_direct_abstract_declarator_option_Noac_direct_abstract_declarator* Noac_direct_abstract_declarator() { ac_direct_abstract_declarator_option kc_x = new impl_ac_direct_abstract_declarator_option_Noac_direct_abstract_declarator(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Noac_direct_abstract_declarator)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Noac_direct_abstract_declarator)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator* Yesac_direct_abstract_declarator(ac_direct_abstract_declarator _ac_direct_abstract_declarator_1) { assertPhylum(_ac_direct_abstract_declarator_1, phylum_ac_direct_abstract_declarator); ac_direct_abstract_declarator_option kc_x = new impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator(_ac_direct_abstract_declarator_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Yesac_direct_abstract_declarator)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Yesac_direct_abstract_declarator)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_direct_abstract_declarator_AcDirAbsdeclPack* AcDirAbsdeclPack(ac_abstract_declarator _ac_abstract_declarator_1) { assertPhylum(_ac_abstract_declarator_1, phylum_ac_abstract_declarator); ac_direct_abstract_declarator kc_x = new impl_ac_direct_abstract_declarator_AcDirAbsdeclPack(_ac_abstract_declarator_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcDirAbsdeclPack)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcDirAbsdeclPack)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_direct_abstract_declarator_AcDirAbsdeclArray* AcDirAbsdeclArray(ac_direct_abstract_declarator_option _ac_direct_abstract_declarator_option_1, ac_constant_expression_option _ac_constant_expression_option_1) { assertPhylum(_ac_direct_abstract_declarator_option_1, phylum_ac_direct_abstract_declarator_option); assertPhylum(_ac_constant_expression_option_1, phylum_ac_constant_expression_option); ac_direct_abstract_declarator kc_x = new impl_ac_direct_abstract_declarator_AcDirAbsdeclArray(_ac_direct_abstract_declarator_option_1, _ac_constant_expression_option_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcDirAbsdeclArray)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcDirAbsdeclArray)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_direct_abstract_declarator_AcDirAbsdeclFn* AcDirAbsdeclFn(ac_direct_abstract_declarator_option _ac_direct_abstract_declarator_option_1, ac_parameter_type_list _ac_parameter_type_list_1) { assertPhylum(_ac_direct_abstract_declarator_option_1, phylum_ac_direct_abstract_declarator_option); assertPhylum(_ac_parameter_type_list_1, phylum_ac_parameter_type_list); ac_direct_abstract_declarator kc_x = new impl_ac_direct_abstract_declarator_AcDirAbsdeclFn(_ac_direct_abstract_declarator_option_1, _ac_parameter_type_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcDirAbsdeclFn)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcDirAbsdeclFn)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_constant_expression_option_Yesac_constant_expression* Yesac_constant_expression(ac_constant_expression _ac_constant_expression_1) { assertPhylum(_ac_constant_expression_1, phylum_ac_constant_expression); ac_constant_expression_option kc_x = new impl_ac_constant_expression_option_Yesac_constant_expression(_ac_constant_expression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Yesac_constant_expression)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Yesac_constant_expression)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_constant_expression_option_Noac_constant_expression* Noac_constant_expression() { ac_constant_expression_option kc_x = new impl_ac_constant_expression_option_Noac_constant_expression(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Noac_constant_expression)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Noac_constant_expression)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_constant_expression_AcConstExpr* AcConstExpr(Cexpression _Cexpression_1) { assertPhylum(_Cexpression_1, phylum_Cexpression); ac_constant_expression kc_x = new impl_ac_constant_expression_AcConstExpr(_Cexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcConstExpr)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcConstExpr)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_constant_expression_list* Nilac_constant_expression_list() { ac_constant_expression_list kc_x = new impl_ac_constant_expression_list(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilac_constant_expression_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilac_constant_expression_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_constant_expression_list* Consac_constant_expression_list(ac_constant_expression _ac_constant_expression_1, ac_constant_expression_list _ac_constant_expression_list_1) { assertPhylum(_ac_constant_expression_1, phylum_ac_constant_expression); assertPhylum(_ac_constant_expression_list_1, phylum_ac_constant_expression_list); ac_constant_expression_list kc_x = new impl_ac_constant_expression_list(_ac_constant_expression_1, _ac_constant_expression_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consac_constant_expression_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consac_constant_expression_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_opt_base_init_list_AcNoBaseInit* AcNoBaseInit() { ac_opt_base_init_list kc_x = new impl_ac_opt_base_init_list_AcNoBaseInit(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcNoBaseInit)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcNoBaseInit)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_opt_base_init_list_AcYesBaseInit* AcYesBaseInit(ac_base_init_list _ac_base_init_list_1) { assertPhylum(_ac_base_init_list_1, phylum_ac_base_init_list); ac_opt_base_init_list kc_x = new impl_ac_opt_base_init_list_AcYesBaseInit(_ac_base_init_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcYesBaseInit)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcYesBaseInit)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_base_init_list* Nilac_base_init_list() { ac_base_init_list kc_x = new impl_ac_base_init_list(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilac_base_init_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilac_base_init_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_base_init_list* Consac_base_init_list(ac_base_init _ac_base_init_1, ac_base_init_list _ac_base_init_list_1) { assertPhylum(_ac_base_init_1, phylum_ac_base_init); assertPhylum(_ac_base_init_list_1, phylum_ac_base_init_list); ac_base_init_list kc_x = new impl_ac_base_init_list(_ac_base_init_1, _ac_base_init_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consac_base_init_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consac_base_init_list)); kc_x->post_create(); return static_cast(kc_x); } impl_ac_base_init_AcBaseInit* AcBaseInit(ID _ID_1, ac_constant_expression_list _ac_constant_expression_list_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_ac_constant_expression_list_1, phylum_ac_constant_expression_list); ac_base_init kc_x = new impl_ac_base_init_AcBaseInit(_ID_1, _ac_constant_expression_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AcBaseInit)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AcBaseInit)); kc_x->post_create(); return static_cast(kc_x); } impl_baseclass_declarations* Nilbaseclass_declarations() { baseclass_declarations kc_x = new impl_baseclass_declarations(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilbaseclass_declarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilbaseclass_declarations)); kc_x->post_create(); return static_cast(kc_x); } impl_baseclass_declarations* Consbaseclass_declarations(baseclass_decl _baseclass_decl_1, baseclass_declarations _baseclass_declarations_1) { assertPhylum(_baseclass_decl_1, phylum_baseclass_decl); assertPhylum(_baseclass_declarations_1, phylum_baseclass_declarations); baseclass_declarations kc_x = new impl_baseclass_declarations(_baseclass_decl_1, _baseclass_declarations_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consbaseclass_declarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consbaseclass_declarations)); kc_x->post_create(); return static_cast(kc_x); } impl_baseclass_decl_BaseClassDecl* BaseClassDecl(ID _ID_1, baseclass_list _baseclass_list_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_baseclass_list_1, phylum_baseclass_list); baseclass_decl kc_x = new impl_baseclass_decl_BaseClassDecl(_ID_1, _baseclass_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_BaseClassDecl)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_BaseClassDecl)); kc_x->post_create(); return static_cast(kc_x); } impl_baseclass_list* Nilbaseclass_list() { baseclass_list kc_x = new impl_baseclass_list(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilbaseclass_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilbaseclass_list)); kc_x->post_create(); return static_cast(kc_x); } impl_baseclass_list* Consbaseclass_list(ID _ID_1, baseclass_list _baseclass_list_1) { assertPhylum(_ID_1, phylum_ID); assertPhylum(_baseclass_list_1, phylum_baseclass_list); baseclass_list kc_x = new impl_baseclass_list(_ID_1, _baseclass_list_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consbaseclass_list)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consbaseclass_list)); kc_x->post_create(); return static_cast(kc_x); } impl_error_Fatal* Fatal(fileline _fileline_1, problem _problem_1) { assertPhylum(_fileline_1, phylum_fileline); assertPhylum(_problem_1, phylum_problem); error kc_x = new impl_error_Fatal(_fileline_1, _problem_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Fatal)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Fatal)); kc_x->post_create(); return static_cast(kc_x); } impl_error_NonFatal* NonFatal(fileline _fileline_1, problem _problem_1) { assertPhylum(_fileline_1, phylum_fileline); assertPhylum(_problem_1, phylum_problem); error kc_x = new impl_error_NonFatal(_fileline_1, _problem_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_NonFatal)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_NonFatal)); kc_x->post_create(); return static_cast(kc_x); } impl_error_Warning* Warning(fileline _fileline_1, problem _problem_1) { assertPhylum(_fileline_1, phylum_fileline); assertPhylum(_problem_1, phylum_problem); error kc_x = new impl_error_Warning(_fileline_1, _problem_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Warning)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Warning)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem1* Problem1(casestring _casestring_1) { assertPhylum(_casestring_1, phylum_casestring); problem kc_x = new impl_problem_Problem1(_casestring_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem1)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem1)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem1ID* Problem1ID(casestring _casestring_1, ID _ID_1) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_ID_1, phylum_ID); problem kc_x = new impl_problem_Problem1ID(_casestring_1, _ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem1ID)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem1ID)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem1tID* Problem1tID(casestring _casestring_1, ID _ID_1) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_ID_1, phylum_ID); problem kc_x = new impl_problem_Problem1tID(_casestring_1, _ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem1tID)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem1tID)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem1we* Problem1we(casestring _casestring_1, withexpression _withexpression_1) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_withexpression_1, phylum_withexpression); problem kc_x = new impl_problem_Problem1we(_casestring_1, _withexpression_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem1we)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem1we)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem1ID1ID* Problem1ID1ID(casestring _casestring_1, ID _ID_1, casestring _casestring_2, ID _ID_2) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_ID_1, phylum_ID); assertPhylum(_casestring_2, phylum_casestring); assertPhylum(_ID_2, phylum_ID); problem kc_x = new impl_problem_Problem1ID1ID(_casestring_1, _ID_1, _casestring_2, _ID_2); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem1ID1ID)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem1ID1ID)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem1t1ID* Problem1t1ID(casestring _casestring_1, IDtype _IDtype_1, casestring _casestring_2, ID _ID_1) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_IDtype_1, phylum_IDtype); assertPhylum(_casestring_2, phylum_casestring); assertPhylum(_ID_1, phylum_ID); problem kc_x = new impl_problem_Problem1t1ID(_casestring_1, _IDtype_1, _casestring_2, _ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem1t1ID)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem1t1ID)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem1INT* Problem1INT(casestring _casestring_1, INT _INT_1) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_INT_1, phylum_INT); problem kc_x = new impl_problem_Problem1INT(_casestring_1, _INT_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem1INT)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem1INT)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem1int1* Problem1int1(casestring _casestring_1, integer _integer_1, casestring _casestring_2) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_integer_1, phylum_integer); assertPhylum(_casestring_2, phylum_casestring); problem kc_x = new impl_problem_Problem1int1(_casestring_1, _integer_1, _casestring_2); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem1int1)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem1int1)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem1INT1ID* Problem1INT1ID(casestring _casestring_1, INT _INT_1, casestring _casestring_2, ID _ID_1) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_INT_1, phylum_INT); assertPhylum(_casestring_2, phylum_casestring); assertPhylum(_ID_1, phylum_ID); problem kc_x = new impl_problem_Problem1INT1ID(_casestring_1, _INT_1, _casestring_2, _ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem1INT1ID)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem1INT1ID)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem1ID1ID1ID* Problem1ID1ID1ID(casestring _casestring_1, ID _ID_1, casestring _casestring_2, ID _ID_2, casestring _casestring_3, ID _ID_3) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_ID_1, phylum_ID); assertPhylum(_casestring_2, phylum_casestring); assertPhylum(_ID_2, phylum_ID); assertPhylum(_casestring_3, phylum_casestring); assertPhylum(_ID_3, phylum_ID); problem kc_x = new impl_problem_Problem1ID1ID1ID(_casestring_1, _ID_1, _casestring_2, _ID_2, _casestring_3, _ID_3); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem1ID1ID1ID)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem1ID1ID1ID)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem1INT1ID1ID* Problem1INT1ID1ID(casestring _casestring_1, INT _INT_1, casestring _casestring_2, ID _ID_1, casestring _casestring_3, ID _ID_2) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_INT_1, phylum_INT); assertPhylum(_casestring_2, phylum_casestring); assertPhylum(_ID_1, phylum_ID); assertPhylum(_casestring_3, phylum_casestring); assertPhylum(_ID_2, phylum_ID); problem kc_x = new impl_problem_Problem1INT1ID1ID(_casestring_1, _INT_1, _casestring_2, _ID_1, _casestring_3, _ID_2); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem1INT1ID1ID)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem1INT1ID1ID)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem1storageoption1ID* Problem1storageoption1ID(casestring _casestring_1, storageoption _storageoption_1, casestring _casestring_2, ID _ID_1) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_storageoption_1, phylum_storageoption); assertPhylum(_casestring_2, phylum_casestring); assertPhylum(_ID_1, phylum_ID); problem kc_x = new impl_problem_Problem1storageoption1ID(_casestring_1, _storageoption_1, _casestring_2, _ID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem1storageoption1ID)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem1storageoption1ID)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem2* Problem2(casestring _casestring_1, casestring _casestring_2) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_casestring_2, phylum_casestring); problem kc_x = new impl_problem_Problem2(_casestring_1, _casestring_2); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem2)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem2)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem3* Problem3(casestring _casestring_1, casestring _casestring_2, casestring _casestring_3) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_casestring_2, phylum_casestring); assertPhylum(_casestring_3, phylum_casestring); problem kc_x = new impl_problem_Problem3(_casestring_1, _casestring_2, _casestring_3); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem3)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem3)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem3int1* Problem3int1(casestring _casestring_1, casestring _casestring_2, casestring _casestring_3, integer _integer_1, casestring _casestring_4) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_casestring_2, phylum_casestring); assertPhylum(_casestring_3, phylum_casestring); assertPhylum(_integer_1, phylum_integer); assertPhylum(_casestring_4, phylum_casestring); problem kc_x = new impl_problem_Problem3int1(_casestring_1, _casestring_2, _casestring_3, _integer_1, _casestring_4); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem3int1)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem3int1)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem4* Problem4(casestring _casestring_1, casestring _casestring_2, casestring _casestring_3, casestring _casestring_4) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_casestring_2, phylum_casestring); assertPhylum(_casestring_3, phylum_casestring); assertPhylum(_casestring_4, phylum_casestring); problem kc_x = new impl_problem_Problem4(_casestring_1, _casestring_2, _casestring_3, _casestring_4); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem4)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem4)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem5* Problem5(casestring _casestring_1, casestring _casestring_2, casestring _casestring_3, casestring _casestring_4, casestring _casestring_5) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_casestring_2, phylum_casestring); assertPhylum(_casestring_3, phylum_casestring); assertPhylum(_casestring_4, phylum_casestring); assertPhylum(_casestring_5, phylum_casestring); problem kc_x = new impl_problem_Problem5(_casestring_1, _casestring_2, _casestring_3, _casestring_4, _casestring_5); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem5)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem5)); kc_x->post_create(); return static_cast(kc_x); } impl_problem_Problem6* Problem6(casestring _casestring_1, casestring _casestring_2, casestring _casestring_3, casestring _casestring_4, casestring _casestring_5, casestring _casestring_6) { assertPhylum(_casestring_1, phylum_casestring); assertPhylum(_casestring_2, phylum_casestring); assertPhylum(_casestring_3, phylum_casestring); assertPhylum(_casestring_4, phylum_casestring); assertPhylum(_casestring_5, phylum_casestring); assertPhylum(_casestring_6, phylum_casestring); problem kc_x = new impl_problem_Problem6(_casestring_1, _casestring_2, _casestring_3, _casestring_4, _casestring_5, _casestring_6); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Problem6)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Problem6)); kc_x->post_create(); return static_cast(kc_x); } impl_addedphylumdeclarations* Niladdedphylumdeclarations() { addedphylumdeclarations kc_x = new impl_addedphylumdeclarations(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Niladdedphylumdeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Niladdedphylumdeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_addedphylumdeclarations* Consaddedphylumdeclarations(addedphylumdeclaration _addedphylumdeclaration_1, addedphylumdeclarations _addedphylumdeclarations_1) { assertPhylum(_addedphylumdeclaration_1, phylum_addedphylumdeclaration); assertPhylum(_addedphylumdeclarations_1, phylum_addedphylumdeclarations); addedphylumdeclarations kc_x = new impl_addedphylumdeclarations(_addedphylumdeclaration_1, _addedphylumdeclarations_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consaddedphylumdeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consaddedphylumdeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_addedphylumdeclaration_AddedPhylumdeclaration* AddedPhylumdeclaration(uniqID _uniqID_1) { assertPhylum(_uniqID_1, phylum_uniqID); addedphylumdeclaration kc_x = new impl_addedphylumdeclaration_AddedPhylumdeclaration(_uniqID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_AddedPhylumdeclaration)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_AddedPhylumdeclaration)); kc_x->post_create(); kc_x = kc_initialize_addedphylumdeclaration(kc_x); return static_cast(kc_x); } impl_countedphylumdeclarations* Nilcountedphylumdeclarations() { countedphylumdeclarations kc_x = new impl_countedphylumdeclarations(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilcountedphylumdeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilcountedphylumdeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_countedphylumdeclarations* Conscountedphylumdeclarations(countedphylumdeclaration _countedphylumdeclaration_1, countedphylumdeclarations _countedphylumdeclarations_1) { assertPhylum(_countedphylumdeclaration_1, phylum_countedphylumdeclaration); assertPhylum(_countedphylumdeclarations_1, phylum_countedphylumdeclarations); countedphylumdeclarations kc_x = new impl_countedphylumdeclarations(_countedphylumdeclaration_1, _countedphylumdeclarations_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Conscountedphylumdeclarations)); KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Conscountedphylumdeclarations)); kc_x->post_create(); return static_cast(kc_x); } impl_countedphylumdeclaration_CountedPhylumdeclaration* CountedPhylumdeclaration(uniqID _uniqID_1) { assertPhylum(_uniqID_1, phylum_uniqID); countedphylumdeclaration kc_x=new impl_countedphylumdeclaration_CountedPhylumdeclaration(_uniqID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_CountedPhylumdeclaration)); countedphylumdeclaration unique_kc_x= hashtables[uniq]->ht_check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_CountedPhylumdeclaration)); kc_x->post_create(); kc_x = kc_initialize_countedphylumdeclaration(kc_x); } return static_cast(kc_x); } impl_charruns_Newlines* Newlines() { charruns kc_x=new impl_charruns_Newlines(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Newlines)); charruns unique_kc_x= hashtables[uniq]->ht_check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Newlines)); kc_x->post_create(); } return static_cast(kc_x); } impl_charruns_QuotedNewlines* QuotedNewlines() { charruns kc_x=new impl_charruns_QuotedNewlines(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_QuotedNewlines)); charruns unique_kc_x= hashtables[uniq]->ht_check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_QuotedNewlines)); kc_x->post_create(); } return static_cast(kc_x); } impl_charruns_Stars* Stars() { charruns kc_x=new impl_charruns_Stars(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Stars)); charruns unique_kc_x= hashtables[uniq]->ht_check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Stars)); kc_x->post_create(); } return static_cast(kc_x); } impl_bindingidmarks* Nilbindingidmarks() { bindingidmarks kc_x=new impl_bindingidmarks(); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Nilbindingidmarks)); bindingidmarks unique_kc_x= hashtables[uniq]->ht_check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Nilbindingidmarks)); kc_x->post_create(); } return static_cast(kc_x); } impl_bindingidmarks* Consbindingidmarks(bindingidmark _bindingidmark_1, bindingidmarks _bindingidmarks_1) { assertPhylum(_bindingidmark_1, phylum_bindingidmark); assertPhylum(_bindingidmarks_1, phylum_bindingidmarks); bindingidmarks kc_x=new impl_bindingidmarks(_bindingidmark_1, _bindingidmarks_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_Consbindingidmarks)); bindingidmarks unique_kc_x= hashtables[uniq]->ht_check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_Consbindingidmarks)); kc_x->post_create(); } return static_cast(kc_x); } impl_bindingidmark_BindingIdMark* BindingIdMark(uniqID _uniqID_1) { assertPhylum(_uniqID_1, phylum_uniqID); bindingidmark kc_x=new impl_bindingidmark_BindingIdMark(_uniqID_1); KC_COLLECT_STATS0(KC_CREATE_STATS(sel_BindingIdMark)); bindingidmark unique_kc_x= hashtables[uniq]->ht_check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } else { KC_COLLECT_STATS0(KC_EXISTINGNOTFOUND_STATS(sel_BindingIdMark)); kc_x->post_create(); kc_x = kc_initialize_bindingidmark(kc_x); } return static_cast(kc_x); } abstract_phylum kc_create(enum_operators createOp, abstract_phylum kc_p1, abstract_phylum kc_p2, abstract_phylum kc_p3, abstract_phylum kc_p4, abstract_phylum kc_p5, abstract_phylum kc_p6, abstract_phylum kc_p7) { switch(createOp) { case sel__VoidPtr: case sel__Int: case sel__Real: case sel__Str: case sel_NoCaseStr: assertionFailed("Cannot create this kind of phylum - predefined phyla must be handled seperately");break; case sel_BindingIdMark: return BindingIdMark(phylum_cast(kc_p1)); case sel_Consbindingidmarks: return Consbindingidmarks(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilbindingidmarks: return Nilbindingidmarks(); case sel_Stars: return Stars(); case sel_QuotedNewlines: return QuotedNewlines(); case sel_Newlines: return Newlines(); case sel_CountedPhylumdeclaration: return CountedPhylumdeclaration(phylum_cast(kc_p1)); case sel_Conscountedphylumdeclarations: return Conscountedphylumdeclarations(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilcountedphylumdeclarations: return Nilcountedphylumdeclarations(); case sel_AddedPhylumdeclaration: return AddedPhylumdeclaration(phylum_cast(kc_p1)); case sel_Consaddedphylumdeclarations: return Consaddedphylumdeclarations(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Niladdedphylumdeclarations: return Niladdedphylumdeclarations(); case sel_Problem6: return Problem6(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4), phylum_cast(kc_p5), phylum_cast(kc_p6)); case sel_Problem5: return Problem5(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4), phylum_cast(kc_p5)); case sel_Problem4: return Problem4(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4)); case sel_Problem3int1: return Problem3int1(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4), phylum_cast(kc_p5)); case sel_Problem3: return Problem3(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_Problem2: return Problem2(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Problem1storageoption1ID: return Problem1storageoption1ID(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4)); case sel_Problem1INT1ID1ID: return Problem1INT1ID1ID(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4), phylum_cast(kc_p5), phylum_cast(kc_p6)); case sel_Problem1ID1ID1ID: return Problem1ID1ID1ID(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4), phylum_cast(kc_p5), phylum_cast(kc_p6)); case sel_Problem1INT1ID: return Problem1INT1ID(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4)); case sel_Problem1int1: return Problem1int1(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_Problem1INT: return Problem1INT(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Problem1t1ID: return Problem1t1ID(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4)); case sel_Problem1ID1ID: return Problem1ID1ID(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4)); case sel_Problem1we: return Problem1we(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Problem1tID: return Problem1tID(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Problem1ID: return Problem1ID(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Problem1: return Problem1(phylum_cast(kc_p1)); case sel_Warning: return Warning(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_NonFatal: return NonFatal(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Fatal: return Fatal(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Consbaseclass_list: return Consbaseclass_list(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilbaseclass_list: return Nilbaseclass_list(); case sel_BaseClassDecl: return BaseClassDecl(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Consbaseclass_declarations: return Consbaseclass_declarations(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilbaseclass_declarations: return Nilbaseclass_declarations(); case sel_AcBaseInit: return AcBaseInit(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Consac_base_init_list: return Consac_base_init_list(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilac_base_init_list: return Nilac_base_init_list(); case sel_AcYesBaseInit: return AcYesBaseInit(phylum_cast(kc_p1)); case sel_AcNoBaseInit: return AcNoBaseInit(); case sel_Consac_constant_expression_list: return Consac_constant_expression_list(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilac_constant_expression_list: return Nilac_constant_expression_list(); case sel_AcConstExpr: return AcConstExpr(phylum_cast(kc_p1)); case sel_Noac_constant_expression: return Noac_constant_expression(); case sel_Yesac_constant_expression: return Yesac_constant_expression(phylum_cast(kc_p1)); case sel_AcDirAbsdeclFn: return AcDirAbsdeclFn(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_AcDirAbsdeclArray: return AcDirAbsdeclArray(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_AcDirAbsdeclPack: return AcDirAbsdeclPack(phylum_cast(kc_p1)); case sel_Yesac_direct_abstract_declarator: return Yesac_direct_abstract_declarator(phylum_cast(kc_p1)); case sel_Noac_direct_abstract_declarator: return Noac_direct_abstract_declarator(); case sel_AcAbsdeclDirdecl: return AcAbsdeclDirdecl(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_AcAbsdeclPointer: return AcAbsdeclPointer(phylum_cast(kc_p1)); case sel_Consac_identifier_list: return Consac_identifier_list(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilac_identifier_list: return Nilac_identifier_list(); case sel_AcParDeclAbsdecl: return AcParDeclAbsdecl(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_AcParDeclDecl: return AcParDeclDecl(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_Consac_parameter_list: return Consac_parameter_list(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilac_parameter_list: return Nilac_parameter_list(); case sel_AcParList3Dot: return AcParList3Dot(phylum_cast(kc_p1)); case sel_AcParList: return AcParList(phylum_cast(kc_p1)); case sel_Consac_type_qualifier_list: return Consac_type_qualifier_list(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilac_type_qualifier_list: return Nilac_type_qualifier_list(); case sel_Consac_class_qualifier_list: return Consac_class_qualifier_list(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilac_class_qualifier_list: return Nilac_class_qualifier_list(); case sel_Consac_class_qualifier_help_list: return Consac_class_qualifier_help_list(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilac_class_qualifier_help_list: return Nilac_class_qualifier_help_list(); case sel_AcOperatorName: return AcOperatorName(phylum_cast(kc_p1)); case sel_AcRef: return AcRef(); case sel_AcNoRef: return AcNoRef(); case sel_AcPointerCons: return AcPointerCons(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_AcPointerNil: return AcPointerNil(phylum_cast(kc_p1)); case sel_Yespointer: return Yespointer(phylum_cast(kc_p1)); case sel_Nopointer: return Nopointer(); case sel_AcOperatorDeclId: return AcOperatorDeclId(phylum_cast(kc_p1)); case sel_AcConvOperatorDecl: return AcConvOperatorDecl(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_AcMemberDecl: return AcMemberDecl(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_AcQualifiedDeclProto: return AcQualifiedDeclProto(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4)); case sel_AcDirectDeclProto: return AcDirectDeclProto(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_AcDirectDeclArray: return AcDirectDeclArray(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_AcDirectDeclPack: return AcDirectDeclPack(phylum_cast(kc_p1)); case sel_AcDirectDeclId: return AcDirectDeclId(phylum_cast(kc_p1)); case sel_AcDeclarator: return AcDeclarator(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_AcInitDecl: return AcInitDecl(phylum_cast(kc_p1)); case sel_Consac_init_declarator_list: return Consac_init_declarator_list(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilac_init_declarator_list: return Nilac_init_declarator_list(); case sel_AcNoQualifier: return AcNoQualifier(); case sel_AcUnsigned: return AcUnsigned(); case sel_AcVolatile: return AcVolatile(); case sel_AcConst: return AcConst(); case sel_AcTypeSpec: return AcTypeSpec(phylum_cast(kc_p1)); case sel_AcVirtual: return AcVirtual(); case sel_AcTypedef: return AcTypedef(); case sel_AcExtern: return AcExtern(); case sel_AcStatic: return AcStatic(); case sel_AcRegister: return AcRegister(); case sel_AcAuto: return AcAuto(); case sel_AcDeclSpecTypeQual: return AcDeclSpecTypeQual(phylum_cast(kc_p1)); case sel_AcDeclSpecTypeSpec: return AcDeclSpecTypeSpec(phylum_cast(kc_p1)); case sel_AcDeclSpecStorageSpec: return AcDeclSpecStorageSpec(phylum_cast(kc_p1)); case sel_Consac_declaration_specifiers: return Consac_declaration_specifiers(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilac_declaration_specifiers: return Nilac_declaration_specifiers(); case sel_Consac_declaration_list: return Consac_declaration_list(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilac_declaration_list: return Nilac_declaration_list(); case sel_AcDeclaration: return AcDeclaration(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Unparsedeclinfo: return Unparsedeclinfo(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_Consunparsedeclsinfo: return Consunparsedeclsinfo(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilunparsedeclsinfo: return Nilunparsedeclsinfo(); case sel_Unparseviewinfo: return Unparseviewinfo(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Consunparseviewsinfo: return Consunparseviewsinfo(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilunparseviewsinfo: return Nilunparseviewsinfo(); case sel_Rewriteviewinfo: return Rewriteviewinfo(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Consrewriteviewsinfo: return Consrewriteviewsinfo(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilrewriteviewsinfo: return Nilrewriteviewsinfo(); case sel_Withcaseinfo: return Withcaseinfo(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_Conswithcasesinfo: return Conswithcasesinfo(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilwithcasesinfo: return Nilwithcasesinfo(); case sel_Rewriteruleinfo: return Rewriteruleinfo(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_Consrewriterulesinfo: return Consrewriterulesinfo(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilrewriterulesinfo: return Nilrewriterulesinfo(); case sel_Consargsnumbers: return Consargsnumbers(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilargsnumbers: return Nilargsnumbers(); case sel_Conspaths: return Conspaths(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilpaths: return Nilpaths(); case sel_Conspath: return Conspath(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilpath: return Nilpath(); case sel_PRIntLiteral: return PRIntLiteral(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_PRStringLiteral: return PRStringLiteral(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_PRDefault: return PRDefault(); case sel_PRWildcard: return PRWildcard(phylum_cast(kc_p1)); case sel_PRNonLeafBinding: return PRNonLeafBinding(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_PRUserPredicate: return PRUserPredicate(phylum_cast(kc_p1)); case sel_PROperPredicate: return PROperPredicate(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_PRVarPredicate: return PRVarPredicate(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_PRBinding: return PRBinding(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Conspatternrepresentation: return Conspatternrepresentation(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilpatternrepresentation: return Nilpatternrepresentation(); case sel_Conspatternrepresentations: return Conspatternrepresentations(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilpatternrepresentations: return Nilpatternrepresentations(); case sel_Bigger: return Bigger(); case sel_Smaller: return Smaller(); case sel_Equal: return Equal(); case sel_DVDisallowed: return DVDisallowed(); case sel_DVAllowed: return DVAllowed(); case sel_Consvariables: return Consvariables(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilvariables: return Nilvariables(); case sel_Consphyla: return Consphyla(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilphyla: return Nilphyla(); case sel_Consoperators: return Consoperators(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Niloperators: return Niloperators(); case sel_ITLanguageName: return ITLanguageName(phylum_cast(kc_p1)); case sel_ITPatternVariable: return ITPatternVariable(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_ITUserFunction: return ITUserFunction(phylum_cast(kc_p1)); case sel_ITUserRView: return ITUserRView(); case sel_ITPredefinedRView: return ITPredefinedRView(); case sel_ITUViewVar: return ITUViewVar(); case sel_ITUserUView: return ITUserUView(); case sel_ITPredefinedUView: return ITPredefinedUView(); case sel_ITStorageClass: return ITStorageClass(); case sel_ITPredefinedStorageClass: return ITPredefinedStorageClass(); case sel_ITUserOperator: return ITUserOperator(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_ITPredefinedOperator: return ITPredefinedOperator(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_ITUserPhylum: return ITUserPhylum(phylum_cast(kc_p1)); case sel_ITPredefinedPhylum: return ITPredefinedPhylum(phylum_cast(kc_p1)); case sel_ITUnknown: return ITUnknown(); case sel_ScopeTypeFileLine: return ScopeTypeFileLine(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4)); case sel_Consscopetypefilelinestack: return Consscopetypefilelinestack(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilscopetypefilelinestack: return Nilscopetypefilelinestack(); case sel_PosNoFileLine: return PosNoFileLine(); case sel_NoFileLine: return NoFileLine(); case sel_FileLine: return FileLine(); case sel_Conslanguagenames: return Conslanguagenames(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nillanguagenames: return Nillanguagenames(); case sel_LanguageList: return LanguageList(phylum_cast(kc_p1)); case sel_NoLanguagename: return NoLanguagename(); case sel_YesViewname: return YesViewname(phylum_cast(kc_p1)); case sel_NoViewname: return NoViewname(); case sel_Consunpattributes: return Consunpattributes(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilunpattributes: return Nilunpattributes(); case sel_UnpCastedVariable: return UnpCastedVariable(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_UnpDollarvarAttr: return UnpDollarvarAttr(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_UnpSubAttr: return UnpSubAttr(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_UnpDollarvarTerm: return UnpDollarvarTerm(phylum_cast(kc_p1)); case sel_UnpSubTerm: return UnpSubTerm(phylum_cast(kc_p1)); case sel_UViewVarDecl: return UViewVarDecl(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_UnpBody: return UnpBody(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_UnpCtext: return UnpCtext(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_UnpSubexpr: return UnpSubexpr(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_UnpStr: return UnpStr(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_Consunparseitems: return Consunparseitems(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilunparseitems: return Nilunparseitems(); case sel_Consviewnames: return Consviewnames(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilviewnames: return Nilviewnames(); case sel_UnparseClause: return UnparseClause(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Consunparseclauses: return Consunparseclauses(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilunparseclauses: return Nilunparseclauses(); case sel_UnparseDeclaration: return UnparseDeclaration(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Consunparsedeclarations: return Consunparsedeclarations(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilunparsedeclarations: return Nilunparsedeclarations(); case sel_Withcase: return Withcase(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Conswithcases: return Conswithcases(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilwithcases: return Nilwithcases(); case sel_WECexpression: return WECexpression(phylum_cast(kc_p1)); case sel_WEVariable: return WEVariable(phylum_cast(kc_p1)); case sel_Conswithexpressions: return Conswithexpressions(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilwithexpressions: return Nilwithexpressions(); case sel_NotInForeachContext: return NotInForeachContext(); case sel_InForeachContext: return InForeachContext(phylum_cast(kc_p1)); case sel_ForeachAfter: return ForeachAfter(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4)); case sel_NoForeachAfter: return NoForeachAfter(); case sel_CTextWithexpression: return CTextWithexpression(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_CTextForeachexpression: return CTextForeachexpression(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4), phylum_cast(kc_p5)); case sel_CTextCbody: return CTextCbody(phylum_cast(kc_p1)); case sel_CTextCexpressionSQ: return CTextCexpressionSQ(phylum_cast(kc_p1)); case sel_CTextCexpressionDQ: return CTextCexpressionDQ(phylum_cast(kc_p1)); case sel_CTextNl: return CTextNl(phylum_cast(kc_p1)); case sel_CTextDollarVar: return CTextDollarVar(phylum_cast(kc_p1)); case sel_CTextLine: return CTextLine(phylum_cast(kc_p1)); case sel_ConsCtext: return ConsCtext(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_NilCtext: return NilCtext(); case sel_ConvOperatorFn: return ConvOperatorFn(); case sel_DestructorFn: return DestructorFn(); case sel_ConstructorFn: return ConstructorFn(); case sel_MemberFn: return MemberFn(); case sel_StaticFn: return StaticFn(phylum_cast(kc_p1)); case sel_GlobalFn: return GlobalFn(); case sel_AcMemberDeclaration: return AcMemberDeclaration(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4)); case sel_FnAcDeclaration: return FnAcDeclaration(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4), phylum_cast(kc_p5), phylum_cast(kc_p6), phylum_cast(kc_p7)); case sel_Consfndeclarations: return Consfndeclarations(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilfndeclarations: return Nilfndeclarations(); case sel_FnFile: return FnFile(phylum_cast(kc_p1)); case sel_Consfnfiles: return Consfnfiles(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilfnfiles: return Nilfnfiles(); case sel_Consterms: return Consterms(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilterms: return Nilterms(); case sel_TIntLiteral: return TIntLiteral(phylum_cast(kc_p1)); case sel_TStringLiteral: return TStringLiteral(phylum_cast(kc_p1)); case sel_TCTerm: return TCTerm(phylum_cast(kc_p1)); case sel_TMemberVarDot: return TMemberVarDot(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_TMemberVar: return TMemberVar(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_TMethodDot: return TMethodDot(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_TMethod: return TMethod(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_TOperator: return TOperator(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_TVariable: return TVariable(phylum_cast(kc_p1)); case sel_Conspatterns: return Conspatterns(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilpatterns: return Nilpatterns(); case sel_PIntLiteral: return PIntLiteral(phylum_cast(kc_p1)); case sel_PStringLiteral: return PStringLiteral(phylum_cast(kc_p1)); case sel_PWildcard: return PWildcard(); case sel_PNonLeafVariable: return PNonLeafVariable(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_POperator: return POperator(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_PVariable: return PVariable(phylum_cast(kc_p1)); case sel_OPDefault: return OPDefault(phylum_cast(kc_p1)); case sel_OPWildcard: return OPWildcard(phylum_cast(kc_p1)); case sel_OPNonLeafVariable: return OPNonLeafVariable(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_OPOperator: return OPOperator(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_OPOperatorWildcard: return OPOperatorWildcard(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_PatternchainitemDollarid: return PatternchainitemDollarid(phylum_cast(kc_p1)); case sel_PatternchainitemGroup: return PatternchainitemGroup(phylum_cast(kc_p1)); case sel_PatternchainitemOutmost: return PatternchainitemOutmost(phylum_cast(kc_p1)); case sel_Consoutmostpatterns: return Consoutmostpatterns(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Niloutmostpatterns: return Niloutmostpatterns(); case sel_Conspatternchain: return Conspatternchain(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilpatternchain: return Nilpatternchain(); case sel_Conspatternchains: return Conspatternchains(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilpatternchains: return Nilpatternchains(); case sel_RewriteClause: return RewriteClause(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Consrewriteclauses: return Consrewriteclauses(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilrewriteclauses: return Nilrewriteclauses(); case sel_RwDeclaration: return RwDeclaration(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Consrwdeclarations: return Consrwdeclarations(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilrwdeclarations: return Nilrwdeclarations(); case sel_IncludeDeclaration: return IncludeDeclaration(phylum_cast(kc_p1)); case sel_Consincludedeclarations: return Consincludedeclarations(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilincludedeclarations: return Nilincludedeclarations(); case sel_IncludeFile: return IncludeFile(phylum_cast(kc_p1)); case sel_Consincludefiles: return Consincludefiles(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilincludefiles: return Nilincludefiles(); case sel_ConsCtexts: return ConsCtexts(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_NilCtexts: return NilCtexts(); case sel_IdCexpression: return IdCexpression(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_ConsidCexpressions: return ConsidCexpressions(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_NilidCexpressions: return NilidCexpressions(); case sel_CExpressionSQNl: return CExpressionSQNl(); case sel_CExpressionSQPart: return CExpressionSQPart(phylum_cast(kc_p1)); case sel_ConsCexpressionSQ: return ConsCexpressionSQ(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_NilCexpressionSQ: return NilCexpressionSQ(); case sel_CExpressionDQNl: return CExpressionDQNl(); case sel_CExpressionDQPart: return CExpressionDQPart(phylum_cast(kc_p1)); case sel_ConsCexpressionDQ: return ConsCexpressionDQ(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_NilCexpressionDQ: return NilCexpressionDQ(); case sel_CExpressionArray: return CExpressionArray(phylum_cast(kc_p1)); case sel_CExpressionPack: return CExpressionPack(phylum_cast(kc_p1)); case sel_CExpressionSQ: return CExpressionSQ(phylum_cast(kc_p1)); case sel_CExpressionDQ: return CExpressionDQ(phylum_cast(kc_p1)); case sel_CExpressionNl: return CExpressionNl(); case sel_CExpressionDollarvar: return CExpressionDollarvar(phylum_cast(kc_p1)); case sel_CExpressionPart: return CExpressionPart(phylum_cast(kc_p1)); case sel_ConsCexpression: return ConsCexpression(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_NilCexpression: return NilCexpression(); case sel_Yesattribute_initialisation: return Yesattribute_initialisation(phylum_cast(kc_p1)); case sel_Noattribute_initialisation: return Noattribute_initialisation(); case sel_Attribute: return Attribute(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3)); case sel_Consattributes: return Consattributes(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilattributes: return Nilattributes(); case sel_CcodeOption: return CcodeOption(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Argument: return Argument(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Consarguments: return Consarguments(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilarguments: return Nilarguments(); case sel_Alternative: return Alternative(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Consalternatives: return Consalternatives(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilalternatives: return Nilalternatives(); case sel_PredefinedAlternatives: return PredefinedAlternatives(phylum_cast(kc_p1)); case sel_NonlistAlternatives: return NonlistAlternatives(phylum_cast(kc_p1)); case sel_ListAlternatives: return ListAlternatives(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Emptyproductionblock: return Emptyproductionblock(); case sel_Consstorageclasses: return Consstorageclasses(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilstorageclasses: return Nilstorageclasses(); case sel_PositiveStorageOption: return PositiveStorageOption(phylum_cast(kc_p1)); case sel_NegativeStorageOption: return NegativeStorageOption(phylum_cast(kc_p1)); case sel_NoStorageOption: return NoStorageOption(); case sel_PhylumDeclaration: return PhylumDeclaration(phylum_cast(kc_p1), phylum_cast(kc_p2), phylum_cast(kc_p3), phylum_cast(kc_p4)); case sel_Consphylumnames: return Consphylumnames(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilphylumnames: return Nilphylumnames(); case sel_Consphylumdeclarations: return Consphylumdeclarations(phylum_cast(kc_p1), phylum_cast(kc_p2)); case sel_Nilphylumdeclarations: return Nilphylumdeclarations(); case sel_PhylumDeclarations: return PhylumDeclarations(phylum_cast(kc_p1)); case sel_String: return String(phylum_cast(kc_p1)); case sel_Int: return Int(phylum_cast(kc_p1)); case sel_Id: return Id(phylum_cast(kc_p1)); case sel_Str: return Str(phylum_cast(kc_p1)); default: assertionFailed("Cannot create this kind of phylum - unkown operator id"); } NORETURN } abstract_phylum kc_create(enum_operators createOp, const std::vector& kc_ps) { if (kc_ps.size() < 7) { assertionFailed("Need vector of size of maximum subphylum count (which is 7)!"); } return kc_create(createOp, kc_ps[0], kc_ps[1], kc_ps[2], kc_ps[3], kc_ps[4], kc_ps[5], kc_ps[6]); } abstract_phylum& attributeOf(abstract_phylum kc_p, int no) { assertionFailed("Cannot select attribute for this kind of phylum - has no attributes"); NORETURN } abstract_phylum impl_abstract_phylum::subphylum(int) const { return 0; } void impl_abstract_phylum::set_subphylum(int,abstract_phylum) { } void impl_abstract_phylum::free(bool kc_rec) { KC_COLLECT_STATS0(KC_FREE_CALLED_STATS(prod_sel(), kc_rec)); if (!phylum_info[phylum()].uniq_stored) { if (kc_rec) { abstract_phylum son; for (int kc_i=0; (son = subphylum(kc_i)); kc_i++) { if (son!=0) son->free(kc_rec); son=0; } } KC_COLLECT_STATS0(KC_FREED_STATS(prod_sel(), kc_rec)); delete this; } } bool impl_abstract_phylum::eq(c_abstract_phylum kc_p2) const { if (this == kc_p2) return true; if (prod_sel() != kc_p2->prod_sel()) return false; int kc_st = phylum_info[phylum()].uniq_stored; if (kc_st && kc_storageclass_still_uniq[kc_st]) return false; c_abstract_phylum son1; for (int kc_i=0; (son1 = subphylum(kc_i)); kc_i++) { if (!son1->eq(kc_p2->subphylum(kc_i))) return false; } return true; } static string kc_indentation = ""; static const char *kc_printformat_not_nullary_open = "%s%s(\n"; static const char *kc_printformat_list_open = "%s%s\n"; static const char *kc_printformat_not_nullary_close = "%s)\n"; static const char *kc_printformat_nullary = "%s%s()\n"; void impl_abstract_phylum::fprint(FILE*kc_f) { int kc_i; if (!kc_f) kc_f = stdout; abstract_list al = dynamic_cast(this); if (al != 0 && !al->is_nil()) { fprintf(kc_f, kc_printformat_list_open, kc_indentation.c_str(), op_name()); kc_indentation+="| "; subphylum(0)->fprint(kc_f); kc_indentation=kc_indentation.substr(0, kc_indentation.length()-2); phylum_cast(subphylum(1))->fprint_list(kc_f); kc_indentation=kc_indentation.substr(0, kc_indentation.length()-2); } else // not list switch(phylum()) { case phylum_voidptr: fprintf(kc_f, "%s%p\n", kc_indentation.c_str(), static_cast(this)->pointer); break; case phylum_casestring: case phylum_nocasestring: fprintf(kc_f, "%s%s\n", kc_indentation.c_str(), static_cast(this)->name); break; case phylum_integer: fprintf(kc_f, "%s%i\n", kc_indentation.c_str(), static_cast(this)->value); break; case phylum_real: fprintf(kc_f, "%s%f\n", kc_indentation.c_str(), static_cast(this)->value); break; default: if (!subphylum(0)) { fprintf(kc_f, kc_printformat_nullary, kc_indentation.c_str(), op_name()); } else { fprintf(kc_f, kc_printformat_not_nullary_open, kc_indentation.c_str(), op_name()); kc_indentation+=" "; abstract_phylum son; for (kc_i=0; (son = subphylum(kc_i)); kc_i++) { son->fprint(kc_f); } kc_indentation=kc_indentation.substr(0, kc_indentation.length()-2); fprintf(kc_f, kc_printformat_not_nullary_close, kc_indentation.c_str()); } } } void impl_abstract_phylum::print() { fprint(stdout); } void impl_abstract_list::fprint_list(FILE*kc_f) { if (!kc_f) kc_f = stdout; if (this->is_nil()) { kc_indentation+="`-"; fprintf(kc_f, kc_printformat_nullary, kc_indentation.c_str(), op_name()); } else { kc_indentation+="|-"; fprintf(kc_f, kc_printformat_list_open, kc_indentation.c_str(), op_name()); kc_indentation=kc_indentation.substr(0, kc_indentation.length()-2); kc_indentation+="| "; subphylum(0)->fprint(kc_f); kc_indentation=kc_indentation.substr(0, kc_indentation.length()-2); phylum_cast(subphylum(1))->fprint_list(kc_f); } } int impl_abstract_list::length() const { int kc_length = 0; c_abstract_phylum kc_p = this; while((kc_p = kc_p->subphylum(1))) kc_length++; return kc_length; } void impl_abstract_list::freelist() { abstract_phylum kc_p = this, kc_tmp_p; do { kc_tmp_p=kc_p->subphylum(1); kc_p->free(false); kc_p=kc_tmp_p; } while(kc_p); } abstract_phylum impl_abstract_list::do_concat(c_abstract_phylum kc_p2, enum_operators mk) const { abstract_phylum next = subphylum(1); if(!next) return const_cast(kc_p2); return kc_create(mk, subphylum(0), static_cast(next)->do_concat(kc_p2, mk)); } abstract_phylum impl_abstract_list::do_reverse(c_abstract_phylum tail, enum_operators mk) const { for (impl_abstract_list const* iterator_ = this; iterator_->subphylum(1) != 0; iterator_ = static_cast(iterator_->subphylum(1)) ) tail = kc_create(mk, iterator_->subphylum(0), const_cast(tail)); return const_cast(tail); } abstract_phylum impl_abstract_list::last() const { c_abstract_phylum kc_p = this, next = subphylum(1), nextnext; #ifdef _AFX ASSERT(next); if(!next) return NULL; #else if(!next){ fflush(stdout); fprintf(stderr, "Internal Error: list::last was called with argument Nil%s\n", phylum_name()); exit(1); } #endif while ((nextnext = next->subphylum(1))) { kc_p = next; next = nextnext; } return const_cast(kc_p->subphylum(0));/* XXX remove cast */ } abstract_phylum impl_abstract_list::do_map(abstract_phylum (*kc_fp)(abstract_phylum), enum_operators mk) { abstract_phylum el = subphylum(0); if (!el) return this; abstract_list next = static_cast(subphylum(1)); return kc_create(mk, kc_fp(el), next->do_map(kc_fp, mk)); } abstract_phylum impl_abstract_list::do_filter(bool (*kc_fp)(abstract_phylum), enum_operators mk) { abstract_phylum el = subphylum(0); if (!el) return this; abstract_list next = static_cast(subphylum(1)); if ((*kc_fp)(el)) { return kc_create(mk, el, next->do_filter(kc_fp, mk)); } else { return next->do_filter(kc_fp, mk); } } abstract_list impl_abstract_list::do_append(abstract_phylum new_last, abstract_list eol) { abstract_list next = this; while (!next->is_nil()) next = phylum_cast(next->subphylum(1)); next->set_subphylum(0, new_last); next->set_subphylum(1, eol); return next; } abstract_phylum impl_abstract_list::do_merge(abstract_list second,abstract_phylum(*kc_fp)(abstract_phylum,abstract_phylum), enum_operators mk) { abstract_phylum el = subphylum(0); if (!el) return this; abstract_phylum el2 = second->subphylum(0); if (!el2) return el2; abstract_list next = static_cast(subphylum(1)); abstract_list next2 = static_cast(second->subphylum(1)); return kc_create(mk, kc_fp(el,el2), next->do_merge(next2, kc_fp, mk)); } abstract_phylum impl_abstract_list::do_reduce(abstract_phylum neutral, abstract_phylum(*kc_fp)(abstract_phylum,abstract_phylum)) { abstract_phylum el = subphylum(0); if (!el) return neutral; abstract_list next = static_cast(subphylum(1)); return kc_fp(el,next->do_reduce(neutral,kc_fp)); } extern const char* kc_storageclassnames[]; #ifdef KC_STATISTICS void do_print_operator_statistics(FILE * kc_f) { unsigned int kc_i; assertNonNull( kc_f ); fprintf(kc_f, "%-*s| %-*s| %-*s| %-*s| %-*s| %-*s| %-*s| %-*s| %-*s| %-*s\n", 38 , "Operator", 3, "Sz", 8, "#oper", 8, "#new", 8, "#exist", 8, "#frnrec", 8, "#frrec", 8, "#freed", 8, "#rem", 9, "total (bytes)"); fprintf(kc_f, "%-*s|%*s |%*d |%*d |%*d |%*d |%*d |%*d |%*d |%*d\n", 38, "case sensitive strings", 3, "-", 8, operator_statistics[sel__Str].created, 8, operator_statistics[sel__Str].existing_not_found, 8, operator_statistics[sel__Str].created-operator_statistics[sel__Str].existing_not_found, 8, 0, 8, 0, 8, 0, 8, 0, 9, kc_casestring_strlen); fprintf(kc_f, "%-*s|%*s |%*d |%*d |%*d |%*d |%*d |%*d |%*d |%*d\n", 38, "case insensitive strings", 3, "-", 8, operator_statistics[sel_NoCaseStr].created, 8, operator_statistics[sel_NoCaseStr].existing_not_found, 8, operator_statistics[sel_NoCaseStr].created-operator_statistics[sel_NoCaseStr].existing_not_found, 8, 0, 8, 0, 8, 0, 8, 0, 9, kc_nocasestring_strlen); for (kc_i = one_before_first_operator+1; kc_i < last_operator; kc_i++) { fprintf(kc_f, "%-*s|%*d |%*d |%*d |%*d |%*d |%*d |%*d |%*d |%*d\n", 38, operator_info[kc_i].name, 3, operator_info[kc_i].size, 8, operator_statistics[kc_i].created, 8, operator_statistics[kc_i].existing_not_found, 8, operator_statistics[kc_i].created-operator_statistics[kc_i].existing_not_found, 8, operator_statistics[kc_i].free_called[false], 8, operator_statistics[kc_i].free_called[true], 8, operator_statistics[kc_i].freed[false]+operator_statistics[kc_i].freed[true], 8, operator_statistics[kc_i].existing_not_found-(operator_statistics[kc_i].freed[false]+operator_statistics[kc_i].freed[true]), 9, operator_info[kc_i].size*(operator_statistics[kc_i].existing_not_found-(operator_statistics[kc_i].freed[false]+operator_statistics[kc_i].freed[true]))); } } #endif // KC_STATISTICS const char* phylumname_or_error(enum_phyla kc_phy) { if ((kc_phy <= one_before_first_phylum) || (kc_phy >= last_phylum)) { char *kc_strof_error; sprintf((kc_strof_error=new char[69]), "Internal Error: unknown phylum number: %d", kc_phy); return kc_strof_error; } else { return phylum_info[kc_phy].name; } } const char* kc_operatorname_or_error(enum_operators kc_operator) { if ((kc_operator <= one_before_first_operator) || (kc_operator >= last_operator)) { char *kc_strof_error; sprintf((kc_strof_error=new char[71]), "Internal Error: unknown operator number: %d", kc_operator); return kc_strof_error; } else { return operator_info[kc_operator].name; } } phylumdeclarations concat(c_phylumdeclarations kc_p1, c_phylumdeclarations kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consphylumdeclarations)); } phylumdeclarations impl_phylumdeclarations::reverse() const { return dynamic_cast(do_reverse(Nilphylumdeclarations(), sel_Consphylumdeclarations)); } phylumdeclaration impl_phylumdeclarations::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_phylumdeclarations::is_nil() const { return phylumdeclaration_1==0 && phylumdeclarations_1==0; } phylumdeclarations impl_phylumdeclarations::map(phylumdeclaration (*kc_fp)(phylumdeclaration)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consphylumdeclarations)); } phylumdeclarations impl_phylumdeclarations::filter(bool (*kc_fp)(phylumdeclaration)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consphylumdeclarations)); } phylumdeclarations impl_phylumdeclarations::append(phylumdeclaration new_last) { return dynamic_cast(do_append(new_last, Nilphylumdeclarations())); } phylumdeclarations impl_phylumdeclarations::merge( phylumdeclarations second, phylumdeclaration (*kc_fp)(phylumdeclaration, phylumdeclaration)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consphylumdeclarations)); } phylumdeclaration impl_phylumdeclarations::reduce( phylumdeclaration neutral, phylumdeclaration (*kc_fp)(phylumdeclaration, phylumdeclaration)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } phylumnames concat(c_phylumnames kc_p1, c_phylumnames kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consphylumnames)); } phylumnames impl_phylumnames::reverse() const { return dynamic_cast(do_reverse(Nilphylumnames(), sel_Consphylumnames)); } ID impl_phylumnames::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_phylumnames::is_nil() const { return ID_1==0 && phylumnames_1==0; } phylumnames impl_phylumnames::map(ID (*kc_fp)(ID)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consphylumnames)); } phylumnames impl_phylumnames::filter(bool (*kc_fp)(ID)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consphylumnames)); } phylumnames impl_phylumnames::append(ID new_last) { return dynamic_cast(do_append(new_last, Nilphylumnames())); } phylumnames impl_phylumnames::merge( phylumnames second, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consphylumnames)); } ID impl_phylumnames::reduce( ID neutral, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } storageclasses concat(c_storageclasses kc_p1, c_storageclasses kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consstorageclasses)); } storageclasses impl_storageclasses::reverse() const { return dynamic_cast(do_reverse(Nilstorageclasses(), sel_Consstorageclasses)); } ID impl_storageclasses::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_storageclasses::is_nil() const { return ID_1==0 && storageclasses_1==0; } storageclasses impl_storageclasses::map(ID (*kc_fp)(ID)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consstorageclasses)); } storageclasses impl_storageclasses::filter(bool (*kc_fp)(ID)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consstorageclasses)); } storageclasses impl_storageclasses::append(ID new_last) { return dynamic_cast(do_append(new_last, Nilstorageclasses())); } storageclasses impl_storageclasses::merge( storageclasses second, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consstorageclasses)); } ID impl_storageclasses::reduce( ID neutral, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } alternatives concat(c_alternatives kc_p1, c_alternatives kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consalternatives)); } alternatives impl_alternatives::reverse() const { return dynamic_cast(do_reverse(Nilalternatives(), sel_Consalternatives)); } alternative impl_alternatives::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_alternatives::is_nil() const { return alternative_1==0 && alternatives_1==0; } alternatives impl_alternatives::map(alternative (*kc_fp)(alternative)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consalternatives)); } alternatives impl_alternatives::filter(bool (*kc_fp)(alternative)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consalternatives)); } alternatives impl_alternatives::append(alternative new_last) { return dynamic_cast(do_append(new_last, Nilalternatives())); } alternatives impl_alternatives::merge( alternatives second, alternative (*kc_fp)(alternative, alternative)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consalternatives)); } alternative impl_alternatives::reduce( alternative neutral, alternative (*kc_fp)(alternative, alternative)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } arguments concat(c_arguments kc_p1, c_arguments kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consarguments)); } arguments impl_arguments::reverse() const { return dynamic_cast(do_reverse(Nilarguments(), sel_Consarguments)); } ID impl_arguments::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_arguments::is_nil() const { return ID_1==0 && arguments_1==0; } arguments impl_arguments::map(ID (*kc_fp)(ID)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consarguments)); } arguments impl_arguments::filter(bool (*kc_fp)(ID)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consarguments)); } arguments impl_arguments::append(ID new_last) { return dynamic_cast(do_append(new_last, Nilarguments())); } arguments impl_arguments::merge( arguments second, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consarguments)); } ID impl_arguments::reduce( ID neutral, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } attributes concat(c_attributes kc_p1, c_attributes kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consattributes)); } attributes impl_attributes::reverse() const { return dynamic_cast(do_reverse(Nilattributes(), sel_Consattributes)); } attribute impl_attributes::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_attributes::is_nil() const { return attribute_1==0 && attributes_1==0; } attributes impl_attributes::map(attribute (*kc_fp)(attribute)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consattributes)); } attributes impl_attributes::filter(bool (*kc_fp)(attribute)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consattributes)); } attributes impl_attributes::append(attribute new_last) { return dynamic_cast(do_append(new_last, Nilattributes())); } attributes impl_attributes::merge( attributes second, attribute (*kc_fp)(attribute, attribute)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consattributes)); } attribute impl_attributes::reduce( attribute neutral, attribute (*kc_fp)(attribute, attribute)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } Cexpression concat(c_Cexpression kc_p1, c_Cexpression kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_ConsCexpression)); } Cexpression impl_Cexpression::reverse() const { return dynamic_cast(do_reverse(NilCexpression(), sel_ConsCexpression)); } Cexpression_elem impl_Cexpression::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_Cexpression::is_nil() const { return Cexpression_elem_1==0 && Cexpression_1==0; } Cexpression impl_Cexpression::map(Cexpression_elem (*kc_fp)(Cexpression_elem)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_ConsCexpression)); } Cexpression impl_Cexpression::filter(bool (*kc_fp)(Cexpression_elem)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_ConsCexpression)); } Cexpression impl_Cexpression::append(Cexpression_elem new_last) { return dynamic_cast(do_append(new_last, NilCexpression())); } Cexpression impl_Cexpression::merge( Cexpression second, Cexpression_elem (*kc_fp)(Cexpression_elem, Cexpression_elem)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_ConsCexpression)); } Cexpression_elem impl_Cexpression::reduce( Cexpression_elem neutral, Cexpression_elem (*kc_fp)(Cexpression_elem, Cexpression_elem)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } CexpressionDQ concat(c_CexpressionDQ kc_p1, c_CexpressionDQ kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_ConsCexpressionDQ)); } CexpressionDQ impl_CexpressionDQ::reverse() const { return dynamic_cast(do_reverse(NilCexpressionDQ(), sel_ConsCexpressionDQ)); } CexpressionDQ_elem impl_CexpressionDQ::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_CexpressionDQ::is_nil() const { return CexpressionDQ_elem_1==0 && CexpressionDQ_1==0; } CexpressionDQ impl_CexpressionDQ::map(CexpressionDQ_elem (*kc_fp)(CexpressionDQ_elem)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_ConsCexpressionDQ)); } CexpressionDQ impl_CexpressionDQ::filter(bool (*kc_fp)(CexpressionDQ_elem)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_ConsCexpressionDQ)); } CexpressionDQ impl_CexpressionDQ::append(CexpressionDQ_elem new_last) { return dynamic_cast(do_append(new_last, NilCexpressionDQ())); } CexpressionDQ impl_CexpressionDQ::merge( CexpressionDQ second, CexpressionDQ_elem (*kc_fp)(CexpressionDQ_elem, CexpressionDQ_elem)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_ConsCexpressionDQ)); } CexpressionDQ_elem impl_CexpressionDQ::reduce( CexpressionDQ_elem neutral, CexpressionDQ_elem (*kc_fp)(CexpressionDQ_elem, CexpressionDQ_elem)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } CexpressionSQ concat(c_CexpressionSQ kc_p1, c_CexpressionSQ kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_ConsCexpressionSQ)); } CexpressionSQ impl_CexpressionSQ::reverse() const { return dynamic_cast(do_reverse(NilCexpressionSQ(), sel_ConsCexpressionSQ)); } CexpressionSQ_elem impl_CexpressionSQ::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_CexpressionSQ::is_nil() const { return CexpressionSQ_elem_1==0 && CexpressionSQ_1==0; } CexpressionSQ impl_CexpressionSQ::map(CexpressionSQ_elem (*kc_fp)(CexpressionSQ_elem)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_ConsCexpressionSQ)); } CexpressionSQ impl_CexpressionSQ::filter(bool (*kc_fp)(CexpressionSQ_elem)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_ConsCexpressionSQ)); } CexpressionSQ impl_CexpressionSQ::append(CexpressionSQ_elem new_last) { return dynamic_cast(do_append(new_last, NilCexpressionSQ())); } CexpressionSQ impl_CexpressionSQ::merge( CexpressionSQ second, CexpressionSQ_elem (*kc_fp)(CexpressionSQ_elem, CexpressionSQ_elem)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_ConsCexpressionSQ)); } CexpressionSQ_elem impl_CexpressionSQ::reduce( CexpressionSQ_elem neutral, CexpressionSQ_elem (*kc_fp)(CexpressionSQ_elem, CexpressionSQ_elem)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } idCexpressions concat(c_idCexpressions kc_p1, c_idCexpressions kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_ConsidCexpressions)); } idCexpressions impl_idCexpressions::reverse() const { return dynamic_cast(do_reverse(NilidCexpressions(), sel_ConsidCexpressions)); } idCexpression impl_idCexpressions::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_idCexpressions::is_nil() const { return idCexpression_1==0 && idCexpressions_1==0; } idCexpressions impl_idCexpressions::map(idCexpression (*kc_fp)(idCexpression)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_ConsidCexpressions)); } idCexpressions impl_idCexpressions::filter(bool (*kc_fp)(idCexpression)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_ConsidCexpressions)); } idCexpressions impl_idCexpressions::append(idCexpression new_last) { return dynamic_cast(do_append(new_last, NilidCexpressions())); } idCexpressions impl_idCexpressions::merge( idCexpressions second, idCexpression (*kc_fp)(idCexpression, idCexpression)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_ConsidCexpressions)); } idCexpression impl_idCexpressions::reduce( idCexpression neutral, idCexpression (*kc_fp)(idCexpression, idCexpression)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } Ctexts concat(c_Ctexts kc_p1, c_Ctexts kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_ConsCtexts)); } Ctexts impl_Ctexts::reverse() const { return dynamic_cast(do_reverse(NilCtexts(), sel_ConsCtexts)); } Ctext impl_Ctexts::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_Ctexts::is_nil() const { return Ctext_1==0 && Ctexts_1==0; } Ctexts impl_Ctexts::map(Ctext (*kc_fp)(Ctext)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_ConsCtexts)); } Ctexts impl_Ctexts::filter(bool (*kc_fp)(Ctext)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_ConsCtexts)); } Ctexts impl_Ctexts::append(Ctext new_last) { return dynamic_cast(do_append(new_last, NilCtexts())); } Ctexts impl_Ctexts::merge( Ctexts second, Ctext (*kc_fp)(Ctext, Ctext)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_ConsCtexts)); } Ctext impl_Ctexts::reduce( Ctext neutral, Ctext (*kc_fp)(Ctext, Ctext)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } includefiles concat(c_includefiles kc_p1, c_includefiles kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consincludefiles)); } includefiles impl_includefiles::reverse() const { return dynamic_cast(do_reverse(Nilincludefiles(), sel_Consincludefiles)); } includefile impl_includefiles::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_includefiles::is_nil() const { return includefile_1==0 && includefiles_1==0; } includefiles impl_includefiles::map(includefile (*kc_fp)(includefile)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consincludefiles)); } includefiles impl_includefiles::filter(bool (*kc_fp)(includefile)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consincludefiles)); } includefiles impl_includefiles::append(includefile new_last) { return dynamic_cast(do_append(new_last, Nilincludefiles())); } includefiles impl_includefiles::merge( includefiles second, includefile (*kc_fp)(includefile, includefile)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consincludefiles)); } includefile impl_includefiles::reduce( includefile neutral, includefile (*kc_fp)(includefile, includefile)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } includedeclarations concat(c_includedeclarations kc_p1, c_includedeclarations kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consincludedeclarations)); } includedeclarations impl_includedeclarations::reverse() const { return dynamic_cast(do_reverse(Nilincludedeclarations(), sel_Consincludedeclarations)); } includedeclaration impl_includedeclarations::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_includedeclarations::is_nil() const { return includedeclaration_1==0 && includedeclarations_1==0; } includedeclarations impl_includedeclarations::map(includedeclaration (*kc_fp)(includedeclaration)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consincludedeclarations)); } includedeclarations impl_includedeclarations::filter(bool (*kc_fp)(includedeclaration)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consincludedeclarations)); } includedeclarations impl_includedeclarations::append(includedeclaration new_last) { return dynamic_cast(do_append(new_last, Nilincludedeclarations())); } includedeclarations impl_includedeclarations::merge( includedeclarations second, includedeclaration (*kc_fp)(includedeclaration, includedeclaration)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consincludedeclarations)); } includedeclaration impl_includedeclarations::reduce( includedeclaration neutral, includedeclaration (*kc_fp)(includedeclaration, includedeclaration)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } rwdeclarations concat(c_rwdeclarations kc_p1, c_rwdeclarations kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consrwdeclarations)); } rwdeclarations impl_rwdeclarations::reverse() const { return dynamic_cast(do_reverse(Nilrwdeclarations(), sel_Consrwdeclarations)); } rwdeclaration impl_rwdeclarations::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_rwdeclarations::is_nil() const { return rwdeclaration_1==0 && rwdeclarations_1==0; } rwdeclarations impl_rwdeclarations::map(rwdeclaration (*kc_fp)(rwdeclaration)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consrwdeclarations)); } rwdeclarations impl_rwdeclarations::filter(bool (*kc_fp)(rwdeclaration)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consrwdeclarations)); } rwdeclarations impl_rwdeclarations::append(rwdeclaration new_last) { return dynamic_cast(do_append(new_last, Nilrwdeclarations())); } rwdeclarations impl_rwdeclarations::merge( rwdeclarations second, rwdeclaration (*kc_fp)(rwdeclaration, rwdeclaration)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consrwdeclarations)); } rwdeclaration impl_rwdeclarations::reduce( rwdeclaration neutral, rwdeclaration (*kc_fp)(rwdeclaration, rwdeclaration)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } rewriteclauses concat(c_rewriteclauses kc_p1, c_rewriteclauses kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consrewriteclauses)); } rewriteclauses impl_rewriteclauses::reverse() const { return dynamic_cast(do_reverse(Nilrewriteclauses(), sel_Consrewriteclauses)); } rewriteclause impl_rewriteclauses::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_rewriteclauses::is_nil() const { return rewriteclause_1==0 && rewriteclauses_1==0; } rewriteclauses impl_rewriteclauses::map(rewriteclause (*kc_fp)(rewriteclause)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consrewriteclauses)); } rewriteclauses impl_rewriteclauses::filter(bool (*kc_fp)(rewriteclause)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consrewriteclauses)); } rewriteclauses impl_rewriteclauses::append(rewriteclause new_last) { return dynamic_cast(do_append(new_last, Nilrewriteclauses())); } rewriteclauses impl_rewriteclauses::merge( rewriteclauses second, rewriteclause (*kc_fp)(rewriteclause, rewriteclause)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consrewriteclauses)); } rewriteclause impl_rewriteclauses::reduce( rewriteclause neutral, rewriteclause (*kc_fp)(rewriteclause, rewriteclause)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } patternchains concat(c_patternchains kc_p1, c_patternchains kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Conspatternchains)); } patternchains impl_patternchains::reverse() const { return dynamic_cast(do_reverse(Nilpatternchains(), sel_Conspatternchains)); } patternchain impl_patternchains::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_patternchains::is_nil() const { return patternchain_1==0 && patternchains_1==0; } patternchains impl_patternchains::map(patternchain (*kc_fp)(patternchain)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Conspatternchains)); } patternchains impl_patternchains::filter(bool (*kc_fp)(patternchain)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Conspatternchains)); } patternchains impl_patternchains::append(patternchain new_last) { return dynamic_cast(do_append(new_last, Nilpatternchains())); } patternchains impl_patternchains::merge( patternchains second, patternchain (*kc_fp)(patternchain, patternchain)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Conspatternchains)); } patternchain impl_patternchains::reduce( patternchain neutral, patternchain (*kc_fp)(patternchain, patternchain)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } patternchain concat(c_patternchain kc_p1, c_patternchain kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Conspatternchain)); } patternchain impl_patternchain::reverse() const { return dynamic_cast(do_reverse(Nilpatternchain(), sel_Conspatternchain)); } patternchainitem impl_patternchain::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_patternchain::is_nil() const { return patternchainitem_1==0 && patternchain_1==0; } patternchain impl_patternchain::map(patternchainitem (*kc_fp)(patternchainitem)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Conspatternchain)); } patternchain impl_patternchain::filter(bool (*kc_fp)(patternchainitem)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Conspatternchain)); } patternchain impl_patternchain::append(patternchainitem new_last) { return dynamic_cast(do_append(new_last, Nilpatternchain())); } patternchain impl_patternchain::merge( patternchain second, patternchainitem (*kc_fp)(patternchainitem, patternchainitem)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Conspatternchain)); } patternchainitem impl_patternchain::reduce( patternchainitem neutral, patternchainitem (*kc_fp)(patternchainitem, patternchainitem)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } outmostpatterns concat(c_outmostpatterns kc_p1, c_outmostpatterns kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consoutmostpatterns)); } outmostpatterns impl_outmostpatterns::reverse() const { return dynamic_cast(do_reverse(Niloutmostpatterns(), sel_Consoutmostpatterns)); } outmostpattern impl_outmostpatterns::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_outmostpatterns::is_nil() const { return outmostpattern_1==0 && outmostpatterns_1==0; } outmostpatterns impl_outmostpatterns::map(outmostpattern (*kc_fp)(outmostpattern)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consoutmostpatterns)); } outmostpatterns impl_outmostpatterns::filter(bool (*kc_fp)(outmostpattern)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consoutmostpatterns)); } outmostpatterns impl_outmostpatterns::append(outmostpattern new_last) { return dynamic_cast(do_append(new_last, Niloutmostpatterns())); } outmostpatterns impl_outmostpatterns::merge( outmostpatterns second, outmostpattern (*kc_fp)(outmostpattern, outmostpattern)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consoutmostpatterns)); } outmostpattern impl_outmostpatterns::reduce( outmostpattern neutral, outmostpattern (*kc_fp)(outmostpattern, outmostpattern)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } patterns concat(c_patterns kc_p1, c_patterns kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Conspatterns)); } patterns impl_patterns::reverse() const { return dynamic_cast(do_reverse(Nilpatterns(), sel_Conspatterns)); } pattern impl_patterns::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_patterns::is_nil() const { return pattern_1==0 && patterns_1==0; } patterns impl_patterns::map(pattern (*kc_fp)(pattern)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Conspatterns)); } patterns impl_patterns::filter(bool (*kc_fp)(pattern)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Conspatterns)); } patterns impl_patterns::append(pattern new_last) { return dynamic_cast(do_append(new_last, Nilpatterns())); } patterns impl_patterns::merge( patterns second, pattern (*kc_fp)(pattern, pattern)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Conspatterns)); } pattern impl_patterns::reduce( pattern neutral, pattern (*kc_fp)(pattern, pattern)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } terms concat(c_terms kc_p1, c_terms kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consterms)); } terms impl_terms::reverse() const { return dynamic_cast(do_reverse(Nilterms(), sel_Consterms)); } term impl_terms::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_terms::is_nil() const { return term_1==0 && terms_1==0; } terms impl_terms::map(term (*kc_fp)(term)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consterms)); } terms impl_terms::filter(bool (*kc_fp)(term)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consterms)); } terms impl_terms::append(term new_last) { return dynamic_cast(do_append(new_last, Nilterms())); } terms impl_terms::merge( terms second, term (*kc_fp)(term, term)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consterms)); } term impl_terms::reduce( term neutral, term (*kc_fp)(term, term)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } fnfiles concat(c_fnfiles kc_p1, c_fnfiles kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consfnfiles)); } fnfiles impl_fnfiles::reverse() const { return dynamic_cast(do_reverse(Nilfnfiles(), sel_Consfnfiles)); } fnfile impl_fnfiles::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_fnfiles::is_nil() const { return fnfile_1==0 && fnfiles_1==0; } fnfiles impl_fnfiles::map(fnfile (*kc_fp)(fnfile)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consfnfiles)); } fnfiles impl_fnfiles::filter(bool (*kc_fp)(fnfile)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consfnfiles)); } fnfiles impl_fnfiles::append(fnfile new_last) { return dynamic_cast(do_append(new_last, Nilfnfiles())); } fnfiles impl_fnfiles::merge( fnfiles second, fnfile (*kc_fp)(fnfile, fnfile)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consfnfiles)); } fnfile impl_fnfiles::reduce( fnfile neutral, fnfile (*kc_fp)(fnfile, fnfile)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } fndeclarations concat(c_fndeclarations kc_p1, c_fndeclarations kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consfndeclarations)); } fndeclarations impl_fndeclarations::reverse() const { return dynamic_cast(do_reverse(Nilfndeclarations(), sel_Consfndeclarations)); } fndeclaration impl_fndeclarations::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_fndeclarations::is_nil() const { return fndeclaration_1==0 && fndeclarations_1==0; } fndeclarations impl_fndeclarations::map(fndeclaration (*kc_fp)(fndeclaration)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consfndeclarations)); } fndeclarations impl_fndeclarations::filter(bool (*kc_fp)(fndeclaration)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consfndeclarations)); } fndeclarations impl_fndeclarations::append(fndeclaration new_last) { return dynamic_cast(do_append(new_last, Nilfndeclarations())); } fndeclarations impl_fndeclarations::merge( fndeclarations second, fndeclaration (*kc_fp)(fndeclaration, fndeclaration)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consfndeclarations)); } fndeclaration impl_fndeclarations::reduce( fndeclaration neutral, fndeclaration (*kc_fp)(fndeclaration, fndeclaration)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } Ctext concat(c_Ctext kc_p1, c_Ctext kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_ConsCtext)); } Ctext impl_Ctext::reverse() const { return dynamic_cast(do_reverse(NilCtext(), sel_ConsCtext)); } Ctext_elem impl_Ctext::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_Ctext::is_nil() const { return Ctext_elem_1==0 && Ctext_1==0; } Ctext impl_Ctext::map(Ctext_elem (*kc_fp)(Ctext_elem)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_ConsCtext)); } Ctext impl_Ctext::filter(bool (*kc_fp)(Ctext_elem)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_ConsCtext)); } Ctext impl_Ctext::append(Ctext_elem new_last) { return dynamic_cast(do_append(new_last, NilCtext())); } Ctext impl_Ctext::merge( Ctext second, Ctext_elem (*kc_fp)(Ctext_elem, Ctext_elem)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_ConsCtext)); } Ctext_elem impl_Ctext::reduce( Ctext_elem neutral, Ctext_elem (*kc_fp)(Ctext_elem, Ctext_elem)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } withexpressions concat(c_withexpressions kc_p1, c_withexpressions kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Conswithexpressions)); } withexpressions impl_withexpressions::reverse() const { return dynamic_cast(do_reverse(Nilwithexpressions(), sel_Conswithexpressions)); } withexpression impl_withexpressions::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_withexpressions::is_nil() const { return withexpression_1==0 && withexpressions_1==0; } withexpressions impl_withexpressions::map(withexpression (*kc_fp)(withexpression)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Conswithexpressions)); } withexpressions impl_withexpressions::filter(bool (*kc_fp)(withexpression)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Conswithexpressions)); } withexpressions impl_withexpressions::append(withexpression new_last) { return dynamic_cast(do_append(new_last, Nilwithexpressions())); } withexpressions impl_withexpressions::merge( withexpressions second, withexpression (*kc_fp)(withexpression, withexpression)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Conswithexpressions)); } withexpression impl_withexpressions::reduce( withexpression neutral, withexpression (*kc_fp)(withexpression, withexpression)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } withcases concat(c_withcases kc_p1, c_withcases kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Conswithcases)); } withcases impl_withcases::reverse() const { return dynamic_cast(do_reverse(Nilwithcases(), sel_Conswithcases)); } withcase impl_withcases::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_withcases::is_nil() const { return withcase_1==0 && withcases_1==0; } withcases impl_withcases::map(withcase (*kc_fp)(withcase)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Conswithcases)); } withcases impl_withcases::filter(bool (*kc_fp)(withcase)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Conswithcases)); } withcases impl_withcases::append(withcase new_last) { return dynamic_cast(do_append(new_last, Nilwithcases())); } withcases impl_withcases::merge( withcases second, withcase (*kc_fp)(withcase, withcase)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Conswithcases)); } withcase impl_withcases::reduce( withcase neutral, withcase (*kc_fp)(withcase, withcase)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } unparsedeclarations concat(c_unparsedeclarations kc_p1, c_unparsedeclarations kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consunparsedeclarations)); } unparsedeclarations impl_unparsedeclarations::reverse() const { return dynamic_cast(do_reverse(Nilunparsedeclarations(), sel_Consunparsedeclarations)); } unparsedeclaration impl_unparsedeclarations::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_unparsedeclarations::is_nil() const { return unparsedeclaration_1==0 && unparsedeclarations_1==0; } unparsedeclarations impl_unparsedeclarations::map(unparsedeclaration (*kc_fp)(unparsedeclaration)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consunparsedeclarations)); } unparsedeclarations impl_unparsedeclarations::filter(bool (*kc_fp)(unparsedeclaration)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consunparsedeclarations)); } unparsedeclarations impl_unparsedeclarations::append(unparsedeclaration new_last) { return dynamic_cast(do_append(new_last, Nilunparsedeclarations())); } unparsedeclarations impl_unparsedeclarations::merge( unparsedeclarations second, unparsedeclaration (*kc_fp)(unparsedeclaration, unparsedeclaration)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consunparsedeclarations)); } unparsedeclaration impl_unparsedeclarations::reduce( unparsedeclaration neutral, unparsedeclaration (*kc_fp)(unparsedeclaration, unparsedeclaration)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } unparseclauses concat(c_unparseclauses kc_p1, c_unparseclauses kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consunparseclauses)); } unparseclauses impl_unparseclauses::reverse() const { return dynamic_cast(do_reverse(Nilunparseclauses(), sel_Consunparseclauses)); } unparseclause impl_unparseclauses::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_unparseclauses::is_nil() const { return unparseclause_1==0 && unparseclauses_1==0; } unparseclauses impl_unparseclauses::map(unparseclause (*kc_fp)(unparseclause)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consunparseclauses)); } unparseclauses impl_unparseclauses::filter(bool (*kc_fp)(unparseclause)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consunparseclauses)); } unparseclauses impl_unparseclauses::append(unparseclause new_last) { return dynamic_cast(do_append(new_last, Nilunparseclauses())); } unparseclauses impl_unparseclauses::merge( unparseclauses second, unparseclause (*kc_fp)(unparseclause, unparseclause)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consunparseclauses)); } unparseclause impl_unparseclauses::reduce( unparseclause neutral, unparseclause (*kc_fp)(unparseclause, unparseclause)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } viewnames concat(c_viewnames kc_p1, c_viewnames kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consviewnames)); } viewnames impl_viewnames::reverse() const { return dynamic_cast(do_reverse(Nilviewnames(), sel_Consviewnames)); } ID impl_viewnames::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_viewnames::is_nil() const { return ID_1==0 && viewnames_1==0; } viewnames impl_viewnames::map(ID (*kc_fp)(ID)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consviewnames)); } viewnames impl_viewnames::filter(bool (*kc_fp)(ID)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consviewnames)); } viewnames impl_viewnames::append(ID new_last) { return dynamic_cast(do_append(new_last, Nilviewnames())); } viewnames impl_viewnames::merge( viewnames second, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consviewnames)); } ID impl_viewnames::reduce( ID neutral, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } unparseitems concat(c_unparseitems kc_p1, c_unparseitems kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consunparseitems)); } unparseitems impl_unparseitems::reverse() const { return dynamic_cast(do_reverse(Nilunparseitems(), sel_Consunparseitems)); } unparseitem impl_unparseitems::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_unparseitems::is_nil() const { return unparseitem_1==0 && unparseitems_1==0; } unparseitems impl_unparseitems::map(unparseitem (*kc_fp)(unparseitem)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consunparseitems)); } unparseitems impl_unparseitems::filter(bool (*kc_fp)(unparseitem)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consunparseitems)); } unparseitems impl_unparseitems::append(unparseitem new_last) { return dynamic_cast(do_append(new_last, Nilunparseitems())); } unparseitems impl_unparseitems::merge( unparseitems second, unparseitem (*kc_fp)(unparseitem, unparseitem)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consunparseitems)); } unparseitem impl_unparseitems::reduce( unparseitem neutral, unparseitem (*kc_fp)(unparseitem, unparseitem)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } unpattributes concat(c_unpattributes kc_p1, c_unpattributes kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consunpattributes)); } unpattributes impl_unpattributes::reverse() const { return dynamic_cast(do_reverse(Nilunpattributes(), sel_Consunpattributes)); } ID impl_unpattributes::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_unpattributes::is_nil() const { return ID_1==0 && unpattributes_1==0; } unpattributes impl_unpattributes::map(ID (*kc_fp)(ID)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consunpattributes)); } unpattributes impl_unpattributes::filter(bool (*kc_fp)(ID)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consunpattributes)); } unpattributes impl_unpattributes::append(ID new_last) { return dynamic_cast(do_append(new_last, Nilunpattributes())); } unpattributes impl_unpattributes::merge( unpattributes second, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consunpattributes)); } ID impl_unpattributes::reduce( ID neutral, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } languagenames concat(c_languagenames kc_p1, c_languagenames kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Conslanguagenames)); } languagenames impl_languagenames::reverse() const { return dynamic_cast(do_reverse(Nillanguagenames(), sel_Conslanguagenames)); } ID impl_languagenames::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_languagenames::is_nil() const { return ID_1==0 && languagenames_1==0; } languagenames impl_languagenames::map(ID (*kc_fp)(ID)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Conslanguagenames)); } languagenames impl_languagenames::filter(bool (*kc_fp)(ID)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Conslanguagenames)); } languagenames impl_languagenames::append(ID new_last) { return dynamic_cast(do_append(new_last, Nillanguagenames())); } languagenames impl_languagenames::merge( languagenames second, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Conslanguagenames)); } ID impl_languagenames::reduce( ID neutral, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } scopetypefilelinestack concat(c_scopetypefilelinestack kc_p1, c_scopetypefilelinestack kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consscopetypefilelinestack)); } scopetypefilelinestack impl_scopetypefilelinestack::reverse() const { return dynamic_cast(do_reverse(Nilscopetypefilelinestack(), sel_Consscopetypefilelinestack)); } scopetypefileline impl_scopetypefilelinestack::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_scopetypefilelinestack::is_nil() const { return scopetypefileline_1==0 && scopetypefilelinestack_1==0; } scopetypefilelinestack impl_scopetypefilelinestack::map(scopetypefileline (*kc_fp)(scopetypefileline)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consscopetypefilelinestack)); } scopetypefilelinestack impl_scopetypefilelinestack::filter(bool (*kc_fp)(scopetypefileline)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consscopetypefilelinestack)); } scopetypefilelinestack impl_scopetypefilelinestack::append(scopetypefileline new_last) { return dynamic_cast(do_append(new_last, Nilscopetypefilelinestack())); } scopetypefilelinestack impl_scopetypefilelinestack::merge( scopetypefilelinestack second, scopetypefileline (*kc_fp)(scopetypefileline, scopetypefileline)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consscopetypefilelinestack)); } scopetypefileline impl_scopetypefilelinestack::reduce( scopetypefileline neutral, scopetypefileline (*kc_fp)(scopetypefileline, scopetypefileline)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } operators concat(c_operators kc_p1, c_operators kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consoperators)); } operators impl_operators::reverse() const { return dynamic_cast(do_reverse(Niloperators(), sel_Consoperators)); } ID impl_operators::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_operators::is_nil() const { return ID_1==0 && operators_1==0; } operators impl_operators::map(ID (*kc_fp)(ID)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consoperators)); } operators impl_operators::filter(bool (*kc_fp)(ID)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consoperators)); } operators impl_operators::append(ID new_last) { return dynamic_cast(do_append(new_last, Niloperators())); } operators impl_operators::merge( operators second, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consoperators)); } ID impl_operators::reduce( ID neutral, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } phyla concat(c_phyla kc_p1, c_phyla kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consphyla)); } phyla impl_phyla::reverse() const { return dynamic_cast(do_reverse(Nilphyla(), sel_Consphyla)); } ID impl_phyla::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_phyla::is_nil() const { return ID_1==0 && phyla_1==0; } phyla impl_phyla::map(ID (*kc_fp)(ID)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consphyla)); } phyla impl_phyla::filter(bool (*kc_fp)(ID)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consphyla)); } phyla impl_phyla::append(ID new_last) { return dynamic_cast(do_append(new_last, Nilphyla())); } phyla impl_phyla::merge( phyla second, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consphyla)); } ID impl_phyla::reduce( ID neutral, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } variables concat(c_variables kc_p1, c_variables kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consvariables)); } variables impl_variables::reverse() const { return dynamic_cast(do_reverse(Nilvariables(), sel_Consvariables)); } ID impl_variables::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_variables::is_nil() const { return ID_1==0 && variables_1==0; } variables impl_variables::map(ID (*kc_fp)(ID)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consvariables)); } variables impl_variables::filter(bool (*kc_fp)(ID)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consvariables)); } variables impl_variables::append(ID new_last) { return dynamic_cast(do_append(new_last, Nilvariables())); } variables impl_variables::merge( variables second, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consvariables)); } ID impl_variables::reduce( ID neutral, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } patternrepresentations concat(c_patternrepresentations kc_p1, c_patternrepresentations kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Conspatternrepresentations)); } patternrepresentations impl_patternrepresentations::reverse() const { return dynamic_cast(do_reverse(Nilpatternrepresentations(), sel_Conspatternrepresentations)); } patternrepresentation impl_patternrepresentations::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_patternrepresentations::is_nil() const { return patternrepresentation_1==0 && patternrepresentations_1==0; } patternrepresentations impl_patternrepresentations::map(patternrepresentation (*kc_fp)(patternrepresentation)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Conspatternrepresentations)); } patternrepresentations impl_patternrepresentations::filter(bool (*kc_fp)(patternrepresentation)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Conspatternrepresentations)); } patternrepresentations impl_patternrepresentations::append(patternrepresentation new_last) { return dynamic_cast(do_append(new_last, Nilpatternrepresentations())); } patternrepresentations impl_patternrepresentations::merge( patternrepresentations second, patternrepresentation (*kc_fp)(patternrepresentation, patternrepresentation)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Conspatternrepresentations)); } patternrepresentation impl_patternrepresentations::reduce( patternrepresentation neutral, patternrepresentation (*kc_fp)(patternrepresentation, patternrepresentation)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } patternrepresentation concat(c_patternrepresentation kc_p1, c_patternrepresentation kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Conspatternrepresentation)); } patternrepresentation impl_patternrepresentation::reverse() const { return dynamic_cast(do_reverse(Nilpatternrepresentation(), sel_Conspatternrepresentation)); } elem_patternrepresentation impl_patternrepresentation::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_patternrepresentation::is_nil() const { return elem_patternrepresentation_1==0 && patternrepresentation_1==0; } patternrepresentation impl_patternrepresentation::map(elem_patternrepresentation (*kc_fp)(elem_patternrepresentation)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Conspatternrepresentation)); } patternrepresentation impl_patternrepresentation::filter(bool (*kc_fp)(elem_patternrepresentation)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Conspatternrepresentation)); } patternrepresentation impl_patternrepresentation::append(elem_patternrepresentation new_last) { return dynamic_cast(do_append(new_last, Nilpatternrepresentation())); } patternrepresentation impl_patternrepresentation::merge( patternrepresentation second, elem_patternrepresentation (*kc_fp)(elem_patternrepresentation, elem_patternrepresentation)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Conspatternrepresentation)); } elem_patternrepresentation impl_patternrepresentation::reduce( elem_patternrepresentation neutral, elem_patternrepresentation (*kc_fp)(elem_patternrepresentation, elem_patternrepresentation)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } path concat(c_path kc_p1, c_path kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Conspath)); } path impl_path::reverse() const { return dynamic_cast(do_reverse(Nilpath(), sel_Conspath)); } integer impl_path::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_path::is_nil() const { return integer_1==0 && path_1==0; } path impl_path::map(integer (*kc_fp)(integer)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Conspath)); } path impl_path::filter(bool (*kc_fp)(integer)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Conspath)); } path impl_path::append(integer new_last) { return dynamic_cast(do_append(new_last, Nilpath())); } path impl_path::merge( path second, integer (*kc_fp)(integer, integer)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Conspath)); } integer impl_path::reduce( integer neutral, integer (*kc_fp)(integer, integer)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } paths concat(c_paths kc_p1, c_paths kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Conspaths)); } paths impl_paths::reverse() const { return dynamic_cast(do_reverse(Nilpaths(), sel_Conspaths)); } path impl_paths::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_paths::is_nil() const { return path_1==0 && paths_1==0; } paths impl_paths::map(path (*kc_fp)(path)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Conspaths)); } paths impl_paths::filter(bool (*kc_fp)(path)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Conspaths)); } paths impl_paths::append(path new_last) { return dynamic_cast(do_append(new_last, Nilpaths())); } paths impl_paths::merge( paths second, path (*kc_fp)(path, path)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Conspaths)); } path impl_paths::reduce( path neutral, path (*kc_fp)(path, path)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } argsnumbers concat(c_argsnumbers kc_p1, c_argsnumbers kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consargsnumbers)); } argsnumbers impl_argsnumbers::reverse() const { return dynamic_cast(do_reverse(Nilargsnumbers(), sel_Consargsnumbers)); } integer impl_argsnumbers::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_argsnumbers::is_nil() const { return integer_1==0 && argsnumbers_1==0; } argsnumbers impl_argsnumbers::map(integer (*kc_fp)(integer)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consargsnumbers)); } argsnumbers impl_argsnumbers::filter(bool (*kc_fp)(integer)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consargsnumbers)); } argsnumbers impl_argsnumbers::append(integer new_last) { return dynamic_cast(do_append(new_last, Nilargsnumbers())); } argsnumbers impl_argsnumbers::merge( argsnumbers second, integer (*kc_fp)(integer, integer)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consargsnumbers)); } integer impl_argsnumbers::reduce( integer neutral, integer (*kc_fp)(integer, integer)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } rewriterulesinfo concat(c_rewriterulesinfo kc_p1, c_rewriterulesinfo kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consrewriterulesinfo)); } rewriterulesinfo impl_rewriterulesinfo::reverse() const { return dynamic_cast(do_reverse(Nilrewriterulesinfo(), sel_Consrewriterulesinfo)); } rewriteruleinfo impl_rewriterulesinfo::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_rewriterulesinfo::is_nil() const { return rewriteruleinfo_1==0 && rewriterulesinfo_1==0; } rewriterulesinfo impl_rewriterulesinfo::map(rewriteruleinfo (*kc_fp)(rewriteruleinfo)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consrewriterulesinfo)); } rewriterulesinfo impl_rewriterulesinfo::filter(bool (*kc_fp)(rewriteruleinfo)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consrewriterulesinfo)); } rewriterulesinfo impl_rewriterulesinfo::append(rewriteruleinfo new_last) { return dynamic_cast(do_append(new_last, Nilrewriterulesinfo())); } rewriterulesinfo impl_rewriterulesinfo::merge( rewriterulesinfo second, rewriteruleinfo (*kc_fp)(rewriteruleinfo, rewriteruleinfo)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consrewriterulesinfo)); } rewriteruleinfo impl_rewriterulesinfo::reduce( rewriteruleinfo neutral, rewriteruleinfo (*kc_fp)(rewriteruleinfo, rewriteruleinfo)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } withcasesinfo concat(c_withcasesinfo kc_p1, c_withcasesinfo kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Conswithcasesinfo)); } withcasesinfo impl_withcasesinfo::reverse() const { return dynamic_cast(do_reverse(Nilwithcasesinfo(), sel_Conswithcasesinfo)); } withcaseinfo impl_withcasesinfo::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_withcasesinfo::is_nil() const { return withcaseinfo_1==0 && withcasesinfo_1==0; } withcasesinfo impl_withcasesinfo::map(withcaseinfo (*kc_fp)(withcaseinfo)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Conswithcasesinfo)); } withcasesinfo impl_withcasesinfo::filter(bool (*kc_fp)(withcaseinfo)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Conswithcasesinfo)); } withcasesinfo impl_withcasesinfo::append(withcaseinfo new_last) { return dynamic_cast(do_append(new_last, Nilwithcasesinfo())); } withcasesinfo impl_withcasesinfo::merge( withcasesinfo second, withcaseinfo (*kc_fp)(withcaseinfo, withcaseinfo)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Conswithcasesinfo)); } withcaseinfo impl_withcasesinfo::reduce( withcaseinfo neutral, withcaseinfo (*kc_fp)(withcaseinfo, withcaseinfo)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } rewriteviewsinfo concat(c_rewriteviewsinfo kc_p1, c_rewriteviewsinfo kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consrewriteviewsinfo)); } rewriteviewsinfo impl_rewriteviewsinfo::reverse() const { return dynamic_cast(do_reverse(Nilrewriteviewsinfo(), sel_Consrewriteviewsinfo)); } rewriteviewinfo impl_rewriteviewsinfo::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_rewriteviewsinfo::is_nil() const { return rewriteviewinfo_1==0 && rewriteviewsinfo_1==0; } rewriteviewsinfo impl_rewriteviewsinfo::map(rewriteviewinfo (*kc_fp)(rewriteviewinfo)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consrewriteviewsinfo)); } rewriteviewsinfo impl_rewriteviewsinfo::filter(bool (*kc_fp)(rewriteviewinfo)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consrewriteviewsinfo)); } rewriteviewsinfo impl_rewriteviewsinfo::append(rewriteviewinfo new_last) { return dynamic_cast(do_append(new_last, Nilrewriteviewsinfo())); } rewriteviewsinfo impl_rewriteviewsinfo::merge( rewriteviewsinfo second, rewriteviewinfo (*kc_fp)(rewriteviewinfo, rewriteviewinfo)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consrewriteviewsinfo)); } rewriteviewinfo impl_rewriteviewsinfo::reduce( rewriteviewinfo neutral, rewriteviewinfo (*kc_fp)(rewriteviewinfo, rewriteviewinfo)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } unparseviewsinfo concat(c_unparseviewsinfo kc_p1, c_unparseviewsinfo kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consunparseviewsinfo)); } unparseviewsinfo impl_unparseviewsinfo::reverse() const { return dynamic_cast(do_reverse(Nilunparseviewsinfo(), sel_Consunparseviewsinfo)); } unparseviewinfo impl_unparseviewsinfo::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_unparseviewsinfo::is_nil() const { return unparseviewinfo_1==0 && unparseviewsinfo_1==0; } unparseviewsinfo impl_unparseviewsinfo::map(unparseviewinfo (*kc_fp)(unparseviewinfo)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consunparseviewsinfo)); } unparseviewsinfo impl_unparseviewsinfo::filter(bool (*kc_fp)(unparseviewinfo)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consunparseviewsinfo)); } unparseviewsinfo impl_unparseviewsinfo::append(unparseviewinfo new_last) { return dynamic_cast(do_append(new_last, Nilunparseviewsinfo())); } unparseviewsinfo impl_unparseviewsinfo::merge( unparseviewsinfo second, unparseviewinfo (*kc_fp)(unparseviewinfo, unparseviewinfo)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consunparseviewsinfo)); } unparseviewinfo impl_unparseviewsinfo::reduce( unparseviewinfo neutral, unparseviewinfo (*kc_fp)(unparseviewinfo, unparseviewinfo)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } unparsedeclsinfo concat(c_unparsedeclsinfo kc_p1, c_unparsedeclsinfo kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consunparsedeclsinfo)); } unparsedeclsinfo impl_unparsedeclsinfo::reverse() const { return dynamic_cast(do_reverse(Nilunparsedeclsinfo(), sel_Consunparsedeclsinfo)); } unparsedeclinfo impl_unparsedeclsinfo::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_unparsedeclsinfo::is_nil() const { return unparsedeclinfo_1==0 && unparsedeclsinfo_1==0; } unparsedeclsinfo impl_unparsedeclsinfo::map(unparsedeclinfo (*kc_fp)(unparsedeclinfo)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consunparsedeclsinfo)); } unparsedeclsinfo impl_unparsedeclsinfo::filter(bool (*kc_fp)(unparsedeclinfo)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consunparsedeclsinfo)); } unparsedeclsinfo impl_unparsedeclsinfo::append(unparsedeclinfo new_last) { return dynamic_cast(do_append(new_last, Nilunparsedeclsinfo())); } unparsedeclsinfo impl_unparsedeclsinfo::merge( unparsedeclsinfo second, unparsedeclinfo (*kc_fp)(unparsedeclinfo, unparsedeclinfo)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consunparsedeclsinfo)); } unparsedeclinfo impl_unparsedeclsinfo::reduce( unparsedeclinfo neutral, unparsedeclinfo (*kc_fp)(unparsedeclinfo, unparsedeclinfo)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } ac_declaration_list concat(c_ac_declaration_list kc_p1, c_ac_declaration_list kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consac_declaration_list)); } ac_declaration_list impl_ac_declaration_list::reverse() const { return dynamic_cast(do_reverse(Nilac_declaration_list(), sel_Consac_declaration_list)); } ac_declaration impl_ac_declaration_list::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_ac_declaration_list::is_nil() const { return ac_declaration_1==0 && ac_declaration_list_1==0; } ac_declaration_list impl_ac_declaration_list::map(ac_declaration (*kc_fp)(ac_declaration)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consac_declaration_list)); } ac_declaration_list impl_ac_declaration_list::filter(bool (*kc_fp)(ac_declaration)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consac_declaration_list)); } ac_declaration_list impl_ac_declaration_list::append(ac_declaration new_last) { return dynamic_cast(do_append(new_last, Nilac_declaration_list())); } ac_declaration_list impl_ac_declaration_list::merge( ac_declaration_list second, ac_declaration (*kc_fp)(ac_declaration, ac_declaration)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consac_declaration_list)); } ac_declaration impl_ac_declaration_list::reduce( ac_declaration neutral, ac_declaration (*kc_fp)(ac_declaration, ac_declaration)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } ac_declaration_specifiers concat(c_ac_declaration_specifiers kc_p1, c_ac_declaration_specifiers kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consac_declaration_specifiers)); } ac_declaration_specifiers impl_ac_declaration_specifiers::reverse() const { return dynamic_cast(do_reverse(Nilac_declaration_specifiers(), sel_Consac_declaration_specifiers)); } ac_declaration_specifier impl_ac_declaration_specifiers::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_ac_declaration_specifiers::is_nil() const { return ac_declaration_specifier_1==0 && ac_declaration_specifiers_1==0; } ac_declaration_specifiers impl_ac_declaration_specifiers::map(ac_declaration_specifier (*kc_fp)(ac_declaration_specifier)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consac_declaration_specifiers)); } ac_declaration_specifiers impl_ac_declaration_specifiers::filter(bool (*kc_fp)(ac_declaration_specifier)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consac_declaration_specifiers)); } ac_declaration_specifiers impl_ac_declaration_specifiers::append(ac_declaration_specifier new_last) { return dynamic_cast(do_append(new_last, Nilac_declaration_specifiers())); } ac_declaration_specifiers impl_ac_declaration_specifiers::merge( ac_declaration_specifiers second, ac_declaration_specifier (*kc_fp)(ac_declaration_specifier, ac_declaration_specifier)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consac_declaration_specifiers)); } ac_declaration_specifier impl_ac_declaration_specifiers::reduce( ac_declaration_specifier neutral, ac_declaration_specifier (*kc_fp)(ac_declaration_specifier, ac_declaration_specifier)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } ac_init_declarator_list concat(c_ac_init_declarator_list kc_p1, c_ac_init_declarator_list kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consac_init_declarator_list)); } ac_init_declarator_list impl_ac_init_declarator_list::reverse() const { return dynamic_cast(do_reverse(Nilac_init_declarator_list(), sel_Consac_init_declarator_list)); } ac_init_declarator impl_ac_init_declarator_list::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_ac_init_declarator_list::is_nil() const { return ac_init_declarator_1==0 && ac_init_declarator_list_1==0; } ac_init_declarator_list impl_ac_init_declarator_list::map(ac_init_declarator (*kc_fp)(ac_init_declarator)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consac_init_declarator_list)); } ac_init_declarator_list impl_ac_init_declarator_list::filter(bool (*kc_fp)(ac_init_declarator)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consac_init_declarator_list)); } ac_init_declarator_list impl_ac_init_declarator_list::append(ac_init_declarator new_last) { return dynamic_cast(do_append(new_last, Nilac_init_declarator_list())); } ac_init_declarator_list impl_ac_init_declarator_list::merge( ac_init_declarator_list second, ac_init_declarator (*kc_fp)(ac_init_declarator, ac_init_declarator)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consac_init_declarator_list)); } ac_init_declarator impl_ac_init_declarator_list::reduce( ac_init_declarator neutral, ac_init_declarator (*kc_fp)(ac_init_declarator, ac_init_declarator)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } ac_class_qualifier_help_list concat(c_ac_class_qualifier_help_list kc_p1, c_ac_class_qualifier_help_list kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consac_class_qualifier_help_list)); } ac_class_qualifier_help_list impl_ac_class_qualifier_help_list::reverse() const { return dynamic_cast(do_reverse(Nilac_class_qualifier_help_list(), sel_Consac_class_qualifier_help_list)); } ac_direct_declarator impl_ac_class_qualifier_help_list::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_ac_class_qualifier_help_list::is_nil() const { return ac_direct_declarator_1==0 && ac_class_qualifier_help_list_1==0; } ac_class_qualifier_help_list impl_ac_class_qualifier_help_list::map(ac_direct_declarator (*kc_fp)(ac_direct_declarator)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consac_class_qualifier_help_list)); } ac_class_qualifier_help_list impl_ac_class_qualifier_help_list::filter(bool (*kc_fp)(ac_direct_declarator)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consac_class_qualifier_help_list)); } ac_class_qualifier_help_list impl_ac_class_qualifier_help_list::append(ac_direct_declarator new_last) { return dynamic_cast(do_append(new_last, Nilac_class_qualifier_help_list())); } ac_class_qualifier_help_list impl_ac_class_qualifier_help_list::merge( ac_class_qualifier_help_list second, ac_direct_declarator (*kc_fp)(ac_direct_declarator, ac_direct_declarator)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consac_class_qualifier_help_list)); } ac_direct_declarator impl_ac_class_qualifier_help_list::reduce( ac_direct_declarator neutral, ac_direct_declarator (*kc_fp)(ac_direct_declarator, ac_direct_declarator)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } ac_class_qualifier_list concat(c_ac_class_qualifier_list kc_p1, c_ac_class_qualifier_list kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consac_class_qualifier_list)); } ac_class_qualifier_list impl_ac_class_qualifier_list::reverse() const { return dynamic_cast(do_reverse(Nilac_class_qualifier_list(), sel_Consac_class_qualifier_list)); } ID impl_ac_class_qualifier_list::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_ac_class_qualifier_list::is_nil() const { return ID_1==0 && ac_class_qualifier_list_1==0; } ac_class_qualifier_list impl_ac_class_qualifier_list::map(ID (*kc_fp)(ID)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consac_class_qualifier_list)); } ac_class_qualifier_list impl_ac_class_qualifier_list::filter(bool (*kc_fp)(ID)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consac_class_qualifier_list)); } ac_class_qualifier_list impl_ac_class_qualifier_list::append(ID new_last) { return dynamic_cast(do_append(new_last, Nilac_class_qualifier_list())); } ac_class_qualifier_list impl_ac_class_qualifier_list::merge( ac_class_qualifier_list second, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consac_class_qualifier_list)); } ID impl_ac_class_qualifier_list::reduce( ID neutral, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } ac_type_qualifier_list concat(c_ac_type_qualifier_list kc_p1, c_ac_type_qualifier_list kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consac_type_qualifier_list)); } ac_type_qualifier_list impl_ac_type_qualifier_list::reverse() const { return dynamic_cast(do_reverse(Nilac_type_qualifier_list(), sel_Consac_type_qualifier_list)); } ac_type_qualifier impl_ac_type_qualifier_list::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_ac_type_qualifier_list::is_nil() const { return ac_type_qualifier_1==0 && ac_type_qualifier_list_1==0; } ac_type_qualifier_list impl_ac_type_qualifier_list::map(ac_type_qualifier (*kc_fp)(ac_type_qualifier)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consac_type_qualifier_list)); } ac_type_qualifier_list impl_ac_type_qualifier_list::filter(bool (*kc_fp)(ac_type_qualifier)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consac_type_qualifier_list)); } ac_type_qualifier_list impl_ac_type_qualifier_list::append(ac_type_qualifier new_last) { return dynamic_cast(do_append(new_last, Nilac_type_qualifier_list())); } ac_type_qualifier_list impl_ac_type_qualifier_list::merge( ac_type_qualifier_list second, ac_type_qualifier (*kc_fp)(ac_type_qualifier, ac_type_qualifier)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consac_type_qualifier_list)); } ac_type_qualifier impl_ac_type_qualifier_list::reduce( ac_type_qualifier neutral, ac_type_qualifier (*kc_fp)(ac_type_qualifier, ac_type_qualifier)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } ac_parameter_list concat(c_ac_parameter_list kc_p1, c_ac_parameter_list kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consac_parameter_list)); } ac_parameter_list impl_ac_parameter_list::reverse() const { return dynamic_cast(do_reverse(Nilac_parameter_list(), sel_Consac_parameter_list)); } ac_parameter_declaration impl_ac_parameter_list::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_ac_parameter_list::is_nil() const { return ac_parameter_declaration_1==0 && ac_parameter_list_1==0; } ac_parameter_list impl_ac_parameter_list::map(ac_parameter_declaration (*kc_fp)(ac_parameter_declaration)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consac_parameter_list)); } ac_parameter_list impl_ac_parameter_list::filter(bool (*kc_fp)(ac_parameter_declaration)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consac_parameter_list)); } ac_parameter_list impl_ac_parameter_list::append(ac_parameter_declaration new_last) { return dynamic_cast(do_append(new_last, Nilac_parameter_list())); } ac_parameter_list impl_ac_parameter_list::merge( ac_parameter_list second, ac_parameter_declaration (*kc_fp)(ac_parameter_declaration, ac_parameter_declaration)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consac_parameter_list)); } ac_parameter_declaration impl_ac_parameter_list::reduce( ac_parameter_declaration neutral, ac_parameter_declaration (*kc_fp)(ac_parameter_declaration, ac_parameter_declaration)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } ac_identifier_list concat(c_ac_identifier_list kc_p1, c_ac_identifier_list kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consac_identifier_list)); } ac_identifier_list impl_ac_identifier_list::reverse() const { return dynamic_cast(do_reverse(Nilac_identifier_list(), sel_Consac_identifier_list)); } ID impl_ac_identifier_list::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_ac_identifier_list::is_nil() const { return ID_1==0 && ac_identifier_list_1==0; } ac_identifier_list impl_ac_identifier_list::map(ID (*kc_fp)(ID)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consac_identifier_list)); } ac_identifier_list impl_ac_identifier_list::filter(bool (*kc_fp)(ID)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consac_identifier_list)); } ac_identifier_list impl_ac_identifier_list::append(ID new_last) { return dynamic_cast(do_append(new_last, Nilac_identifier_list())); } ac_identifier_list impl_ac_identifier_list::merge( ac_identifier_list second, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consac_identifier_list)); } ID impl_ac_identifier_list::reduce( ID neutral, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } ac_constant_expression_list concat(c_ac_constant_expression_list kc_p1, c_ac_constant_expression_list kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consac_constant_expression_list)); } ac_constant_expression_list impl_ac_constant_expression_list::reverse() const { return dynamic_cast(do_reverse(Nilac_constant_expression_list(), sel_Consac_constant_expression_list)); } ac_constant_expression impl_ac_constant_expression_list::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_ac_constant_expression_list::is_nil() const { return ac_constant_expression_1==0 && ac_constant_expression_list_1==0; } ac_constant_expression_list impl_ac_constant_expression_list::map(ac_constant_expression (*kc_fp)(ac_constant_expression)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consac_constant_expression_list)); } ac_constant_expression_list impl_ac_constant_expression_list::filter(bool (*kc_fp)(ac_constant_expression)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consac_constant_expression_list)); } ac_constant_expression_list impl_ac_constant_expression_list::append(ac_constant_expression new_last) { return dynamic_cast(do_append(new_last, Nilac_constant_expression_list())); } ac_constant_expression_list impl_ac_constant_expression_list::merge( ac_constant_expression_list second, ac_constant_expression (*kc_fp)(ac_constant_expression, ac_constant_expression)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consac_constant_expression_list)); } ac_constant_expression impl_ac_constant_expression_list::reduce( ac_constant_expression neutral, ac_constant_expression (*kc_fp)(ac_constant_expression, ac_constant_expression)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } ac_base_init_list concat(c_ac_base_init_list kc_p1, c_ac_base_init_list kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consac_base_init_list)); } ac_base_init_list impl_ac_base_init_list::reverse() const { return dynamic_cast(do_reverse(Nilac_base_init_list(), sel_Consac_base_init_list)); } ac_base_init impl_ac_base_init_list::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_ac_base_init_list::is_nil() const { return ac_base_init_1==0 && ac_base_init_list_1==0; } ac_base_init_list impl_ac_base_init_list::map(ac_base_init (*kc_fp)(ac_base_init)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consac_base_init_list)); } ac_base_init_list impl_ac_base_init_list::filter(bool (*kc_fp)(ac_base_init)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consac_base_init_list)); } ac_base_init_list impl_ac_base_init_list::append(ac_base_init new_last) { return dynamic_cast(do_append(new_last, Nilac_base_init_list())); } ac_base_init_list impl_ac_base_init_list::merge( ac_base_init_list second, ac_base_init (*kc_fp)(ac_base_init, ac_base_init)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consac_base_init_list)); } ac_base_init impl_ac_base_init_list::reduce( ac_base_init neutral, ac_base_init (*kc_fp)(ac_base_init, ac_base_init)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } baseclass_declarations concat(c_baseclass_declarations kc_p1, c_baseclass_declarations kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consbaseclass_declarations)); } baseclass_declarations impl_baseclass_declarations::reverse() const { return dynamic_cast(do_reverse(Nilbaseclass_declarations(), sel_Consbaseclass_declarations)); } baseclass_decl impl_baseclass_declarations::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_baseclass_declarations::is_nil() const { return baseclass_decl_1==0 && baseclass_declarations_1==0; } baseclass_declarations impl_baseclass_declarations::map(baseclass_decl (*kc_fp)(baseclass_decl)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consbaseclass_declarations)); } baseclass_declarations impl_baseclass_declarations::filter(bool (*kc_fp)(baseclass_decl)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consbaseclass_declarations)); } baseclass_declarations impl_baseclass_declarations::append(baseclass_decl new_last) { return dynamic_cast(do_append(new_last, Nilbaseclass_declarations())); } baseclass_declarations impl_baseclass_declarations::merge( baseclass_declarations second, baseclass_decl (*kc_fp)(baseclass_decl, baseclass_decl)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consbaseclass_declarations)); } baseclass_decl impl_baseclass_declarations::reduce( baseclass_decl neutral, baseclass_decl (*kc_fp)(baseclass_decl, baseclass_decl)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } baseclass_list concat(c_baseclass_list kc_p1, c_baseclass_list kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consbaseclass_list)); } baseclass_list impl_baseclass_list::reverse() const { return dynamic_cast(do_reverse(Nilbaseclass_list(), sel_Consbaseclass_list)); } ID impl_baseclass_list::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_baseclass_list::is_nil() const { return ID_1==0 && baseclass_list_1==0; } baseclass_list impl_baseclass_list::map(ID (*kc_fp)(ID)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consbaseclass_list)); } baseclass_list impl_baseclass_list::filter(bool (*kc_fp)(ID)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consbaseclass_list)); } baseclass_list impl_baseclass_list::append(ID new_last) { return dynamic_cast(do_append(new_last, Nilbaseclass_list())); } baseclass_list impl_baseclass_list::merge( baseclass_list second, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consbaseclass_list)); } ID impl_baseclass_list::reduce( ID neutral, ID (*kc_fp)(ID, ID)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } addedphylumdeclarations concat(c_addedphylumdeclarations kc_p1, c_addedphylumdeclarations kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consaddedphylumdeclarations)); } addedphylumdeclarations impl_addedphylumdeclarations::reverse() const { return dynamic_cast(do_reverse(Niladdedphylumdeclarations(), sel_Consaddedphylumdeclarations)); } addedphylumdeclaration impl_addedphylumdeclarations::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_addedphylumdeclarations::is_nil() const { return addedphylumdeclaration_1==0 && addedphylumdeclarations_1==0; } addedphylumdeclarations impl_addedphylumdeclarations::map(addedphylumdeclaration (*kc_fp)(addedphylumdeclaration)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consaddedphylumdeclarations)); } addedphylumdeclarations impl_addedphylumdeclarations::filter(bool (*kc_fp)(addedphylumdeclaration)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consaddedphylumdeclarations)); } addedphylumdeclarations impl_addedphylumdeclarations::append(addedphylumdeclaration new_last) { return dynamic_cast(do_append(new_last, Niladdedphylumdeclarations())); } addedphylumdeclarations impl_addedphylumdeclarations::merge( addedphylumdeclarations second, addedphylumdeclaration (*kc_fp)(addedphylumdeclaration, addedphylumdeclaration)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consaddedphylumdeclarations)); } addedphylumdeclaration impl_addedphylumdeclarations::reduce( addedphylumdeclaration neutral, addedphylumdeclaration (*kc_fp)(addedphylumdeclaration, addedphylumdeclaration)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } countedphylumdeclarations concat(c_countedphylumdeclarations kc_p1, c_countedphylumdeclarations kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Conscountedphylumdeclarations)); } countedphylumdeclarations impl_countedphylumdeclarations::reverse() const { return dynamic_cast(do_reverse(Nilcountedphylumdeclarations(), sel_Conscountedphylumdeclarations)); } countedphylumdeclaration impl_countedphylumdeclarations::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_countedphylumdeclarations::is_nil() const { return countedphylumdeclaration_1==0 && countedphylumdeclarations_1==0; } countedphylumdeclarations impl_countedphylumdeclarations::map(countedphylumdeclaration (*kc_fp)(countedphylumdeclaration)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Conscountedphylumdeclarations)); } countedphylumdeclarations impl_countedphylumdeclarations::filter(bool (*kc_fp)(countedphylumdeclaration)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Conscountedphylumdeclarations)); } countedphylumdeclarations impl_countedphylumdeclarations::append(countedphylumdeclaration new_last) { return dynamic_cast(do_append(new_last, Nilcountedphylumdeclarations())); } countedphylumdeclarations impl_countedphylumdeclarations::merge( countedphylumdeclarations second, countedphylumdeclaration (*kc_fp)(countedphylumdeclaration, countedphylumdeclaration)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Conscountedphylumdeclarations)); } countedphylumdeclaration impl_countedphylumdeclarations::reduce( countedphylumdeclaration neutral, countedphylumdeclaration (*kc_fp)(countedphylumdeclaration, countedphylumdeclaration)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } bindingidmarks concat(c_bindingidmarks kc_p1, c_bindingidmarks kc_p2) { return dynamic_cast(kc_p1->do_concat(kc_p2, sel_Consbindingidmarks)); } bindingidmarks impl_bindingidmarks::reverse() const { return dynamic_cast(do_reverse(Nilbindingidmarks(), sel_Consbindingidmarks)); } bindingidmark impl_bindingidmarks::last() const { return dynamic_cast(impl_abstract_list::last()); } bool impl_bindingidmarks::is_nil() const { return bindingidmark_1==0 && bindingidmarks_1==0; } bindingidmarks impl_bindingidmarks::map(bindingidmark (*kc_fp)(bindingidmark)) { return dynamic_cast(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Consbindingidmarks)); } bindingidmarks impl_bindingidmarks::filter(bool (*kc_fp)(bindingidmark)) { return dynamic_cast(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Consbindingidmarks)); } bindingidmarks impl_bindingidmarks::append(bindingidmark new_last) { return dynamic_cast(do_append(new_last, Nilbindingidmarks())); } bindingidmarks impl_bindingidmarks::merge( bindingidmarks second, bindingidmark (*kc_fp)(bindingidmark, bindingidmark)) { return dynamic_cast(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Consbindingidmarks)); } bindingidmark impl_bindingidmarks::reduce( bindingidmark neutral, bindingidmark (*kc_fp)(bindingidmark, bindingidmark)) { return dynamic_cast(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } abstract_phylum impl_abstract_phylum::copy(bool kc_copy_attributes) const { enum_phyla kc_phy = phylum(); // XXX - implement special cases in subclasses - MvL KC_OPERATOR_INFO *kc_op_info = &operator_info[prod_sel()]; kc_storageclass_t kc_st = phylum_info[kc_op_info->phylum].uniq_stored; if (kc_st && kc_storageclass_still_uniq[kc_st]) return const_cast(this); abstract_phylum kc_answer=0; if (kc_phy == phylum_casestring) { kc_answer=mkcasestring((dynamic_cast(this))->name); } else if (kc_phy == phylum_nocasestring) { kc_answer=mknocasestring((dynamic_cast(this))->name); } else if (kc_phy == phylum_voidptr) { kc_answer=mkvoidptr((dynamic_cast(this))->pointer); } else if (kc_phy == phylum_integer) { kc_answer=mkinteger((dynamic_cast(this))->value); } else if (kc_phy == phylum_real) { kc_answer=mkreal((dynamic_cast(this))->value); } else { abstract_phylum kc_subtmp[7], child; for (int kc_i = 0; (child = subphylum(kc_i)); kc_i++) { kc_subtmp[kc_i] = child->copy(kc_copy_attributes); } switch(kc_op_info->no_sons) { case 0: kc_answer = kc_create(prod_sel()); break; case 1: kc_answer = kc_create(prod_sel(), kc_subtmp[0]); break; case 2: kc_answer = kc_create(prod_sel(), kc_subtmp[0], kc_subtmp[1]); break; case 3: kc_answer = kc_create(prod_sel(), kc_subtmp[0], kc_subtmp[1], kc_subtmp[2]); break; case 4: kc_answer = kc_create(prod_sel(), kc_subtmp[0], kc_subtmp[1], kc_subtmp[2], kc_subtmp[3]); break; case 5: kc_answer = kc_create(prod_sel(), kc_subtmp[0], kc_subtmp[1], kc_subtmp[2], kc_subtmp[3], kc_subtmp[4]); break; case 6: kc_answer = kc_create(prod_sel(), kc_subtmp[0], kc_subtmp[1], kc_subtmp[2], kc_subtmp[3], kc_subtmp[4], kc_subtmp[5]); break; case 7: kc_answer = kc_create(prod_sel(), kc_subtmp[0], kc_subtmp[1], kc_subtmp[2], kc_subtmp[3], kc_subtmp[4], kc_subtmp[5], kc_subtmp[6]); break; default: assertionFailed("unexpected number of sub-phyla"); } } if (kc_copy_attributes) copy_attributes(kc_phy, this, kc_answer); return kc_answer; } } // namespace kc kimwitu++-2.3.13/src/Gen.boot/gen.cc0000644000175000017500000001325711135163773015476 0ustar useruser/* translation of file "gen.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #define KC_FUNCTIONS_gen #include #include "k.h" #include "gen.h" namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // static char gen_kAccesSid[] = "@(#)$Id: gen.k,v 1.152 2008/02/06 20:28:58 piefel Exp $"; /* end included stuff */ namespace kc { #ifndef KC_TRACE_PROVIDED #define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND #endif enum_operators f_selofoperator(ID oid) { int kc_i, kc_end = one_before_first_operator; kc_i=kc_end; { phylumdeclarations kc_fe_selvar_1 = Thephylumdeclarations ; while( kc_fe_selvar_1->prod_sel() == sel_Consphylumdeclarations ) { phylumdeclaration kc_selvar_0_1 = kc_fe_selvar_1->phylumdeclaration_1; { { { const phylumdeclaration p = kc_selvar_0_1; { phylumdeclaration kc_selvar_1_1 = phylum_cast(p); if ((kc_selvar_1_1->prod_sel() == sel_PhylumDeclaration) && (phylum_cast(kc_selvar_1_1)->productionblock_1->prod_sel() == sel_ListAlternatives)) { const alternatives alts = phylum_cast(phylum_cast(kc_selvar_1_1)->productionblock_1)->alternatives_1; { alternatives kc_fe_selvar_1 = alts ; while( kc_fe_selvar_1->prod_sel() == sel_Consalternatives ) { alternative kc_selvar_2_1 = kc_fe_selvar_1->alternative_1; { { if ((kc_selvar_2_1->prod_sel() == sel_Alternative)) { const ID id = phylum_cast(kc_selvar_2_1)->ID_1; kc_end++; if (oid->eq(id)) kc_i=kc_end; } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->alternatives_1; } } } else if ((kc_selvar_1_1->prod_sel() == sel_PhylumDeclaration) && (phylum_cast(kc_selvar_1_1)->productionblock_1->prod_sel() == sel_NonlistAlternatives)) { const alternatives alts = phylum_cast(phylum_cast(kc_selvar_1_1)->productionblock_1)->alternatives_1; { alternatives kc_fe_selvar_1 = alts ; while( kc_fe_selvar_1->prod_sel() == sel_Consalternatives ) { alternative kc_selvar_2_1 = kc_fe_selvar_1->alternative_1; { { if ((kc_selvar_2_1->prod_sel() == sel_Alternative)) { const ID id = phylum_cast(kc_selvar_2_1)->ID_1; kc_end++; if (oid->eq(id)) kc_i=kc_end; } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->alternatives_1; } } } else if ((kc_selvar_1_1->prod_sel() == sel_PhylumDeclaration) && (phylum_cast(kc_selvar_1_1)->productionblock_1->prod_sel() == sel_PredefinedAlternatives)) { const alternatives alts = phylum_cast(phylum_cast(kc_selvar_1_1)->productionblock_1)->alternatives_1; { alternatives kc_fe_selvar_1 = alts ; while( kc_fe_selvar_1->prod_sel() == sel_Consalternatives ) { alternative kc_selvar_2_1 = kc_fe_selvar_1->alternative_1; { { if ((kc_selvar_2_1->prod_sel() == sel_Alternative)) { const ID id = phylum_cast(kc_selvar_2_1)->ID_1; kc_end++; if (oid->eq(id)) kc_i=kc_end; } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->alternatives_1; } } } else { kc_no_default_in_with( "f_selofoperator", __LINE__, __FILE__ ); return static_cast(0); } } } } } kc_fe_selvar_1 = kc_fe_selvar_1->phylumdeclarations_1; } } return static_cast(kc_end-kc_i+1); } void freespineandelements(unparseviewsinfo a_unparseviewsinfo) { abstract_phylum kc_p = a_unparseviewsinfo; while(kc_p) { if (kc_p->subphylum(0)) kc_p->subphylum(0)->free(false); kc_p = kc_p->subphylum(1); }; a_unparseviewsinfo->freelist(); } void freespineandelements(rewriteviewsinfo a_rewriteviewsinfo) { abstract_phylum kc_p = a_rewriteviewsinfo; while(kc_p) { if (kc_p->subphylum(0)) kc_p->subphylum(0)->free(false); kc_p = kc_p->subphylum(1); }; a_rewriteviewsinfo->freelist(); } } // namespace kc kimwitu++-2.3.13/src/Gen.boot/occur.h0000644000175000017500000000337411135163773015701 0ustar useruser/* translation of file "occur.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #ifndef KC_FUNCTIONS_occur_HEADER #define KC_FUNCTIONS_occur_HEADER #include "k.h" // in case a user forgets namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // /* end included stuff */ namespace kc { void v_defoccur (ID id, IDtype it); void v_extendoccur (ID id, IDtype it); void v_extendoccur_nowarning (ID id, IDtype it); bool f_useoccuroperator (ID id); bool f_warnifnotvariable (ID id); bool f_useoccurphylum (ID id); bool f_useoccurlistphylum (ID id); bool f_useoccuruviewname (ID id); bool f_useoccurrviewname (ID id); bool f_useoccurstorageclass (ID id); bool f_useoccurlanguagename (languagenames names); bool f_useoccurpatternvariable (ID id); } // namespace kc #endif // ! KC_FUNCTIONS_occur_HEADER kimwitu++-2.3.13/src/Gen.boot/unpk.h0000644000175000017500000011072511135163773015542 0ustar useruser/* translation of file(s) "abs.k" "main.k" "parse.k" "error.k" "occur.k" "util.k" "gen.k" "gutil.k" "pat.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #ifndef KC_UNPARSE_HEADER #define KC_UNPARSE_HEADER namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // /* end included stuff */ namespace kc { typedef enum { base_uview_enum, view_error_format_enum, view_filename_enum, view_error_enum, view_error_tID_enum, view_check_enum, view_check_count_enum, view_check_count1_enum, view_check_outmostopers_in_phylum_enum, view_set_type_enum, view_check_is_var_enum, view_gen_initializephyla_c_enum, view_check_u_enum, view_check_r_enum, view_check_viewnames_enum, view_check_uniq_enum, view_check_uniq1_enum, view_check_uniq2_enum, view_make_patternreps_enum, view_printer_outputfileline_enum, view_printer_reset_enum, view_no_of_printed_string_chars_reset_enum, view_open_namespace_enum, view_close_namespace_enum, view_gen_k_h_enum, view_gen_end_k_h_enum, view_gen_k_c_enum, view_gen_alloc_h_enum, view_gen_alloc_c_enum, view_gen_deprecated_enum, view_gen_enumphyla_h_enum, view_gen_enumoperators_h_enum, view_gen_operatormap_type_h_enum, view_gen_phylummap_c_enum, view_gen_operatormap_c_enum, view_count_args_enum, view_count_attrs_enum, view_count_nonstaticmembers_enum, view_gen_operatormap_subphyla_enum, view_gen_operatormap_attributes_enum, view_gen_uniqmap_c_enum, view_gen_uniqmap_c_1_enum, view_gen_uniqmap_c_2_enum, view_gen_nodetypedefs_h_enum, view_gen_nodetypes_h_enum, view_gen_yaccstacktype_h_enum, view_gen_noofoperators_h_enum, view_gen_assertmacros_h_enum, view_gen_assertmacros_c_enum, view_gen_operatordecls_h_enum, view_gen_operatorcast_h_enum, view_gen_operatordefs_c_enum, view_gen_operatordefs_c_0_enum, view_gen_operatordefs_c_1_enum, view_gen_operatordefs_c_2_enum, view_gen_initializephyla_whiletest_c_enum, view_gen_initializephyla_init_el_c_enum, view_gen_initializephyla_update_loop_c_enum, view_gen_operatordefs_nonhash_c_enum, view_gen_operatordefs_hash_c_enum, view_gen_access_functions_enum, view_gen_create_function_enum, view_gen_attributeOf_function_enum, view_gen_argseqnr_enum, view_gen_fnarg_asserts_enum, view_gen_fnarg_and_decls_enum, view_gen_fnarg_and_decls_predef_enum, view_gen_assignments_enum, view_gen_assignment_inis_enum, view_gen_user_assignment_inis_enum, view_gen_assignments_predef_enum, view_gen_assignments_predef_ini_enum, view_gen_test_enum, view_gen_error_decls_h_enum, view_gen_error_defs_c_enum, view_gen_printdotdecls_h_enum, view_gen_printdotdefs_c_enum, view_gen_printdotedges_c_enum, view_gen_listdecls_h_enum, view_gen_listdefs_c_enum, view_gen_includes_enum, view_do_gen_includes_enum, view_gen_csgio_start_h_enum, view_gen_csgio_end_h_enum, view_gen_csgio_h_enum, view_gen_csgio_start_c_enum, view_gen_csgio_c_enum, view_gen_copy_attributes_c_enum, view_gen_copydefs_c_enum, view_gen_rewritek_h_enum, view_gen_end_rewritek_h_enum, view_gen_rewritek_c_enum, view_gen_rewritedefs_c_enum, view_gen_rewritedefs_default_c_enum, view_gen_rewritedefs_other_c_enum, view_gen_rewritedefs_rewritearg_c_enum, view_gen_rewritedefs_nl_arg_c_enum, view_gen_rewritedefs_testarg_c_enum, view_gen_rewritedefs_dotestarg_c_enum, view_gen_rewritedefs_args_c_enum, view_gen_rewritedefs_body_c_enum, view_gen_withcases_and_default_enum, view_rw_predicates_enum, view_wc_predicates_enum, view_unp_predicates_enum, view_wc_bindings_enum, view_unp_bindings_enum, view_rw_bindings_enum, view_gen_fnk_h_enum, view_gen_fnkdecls_c_enum, view_gen_fnk_c_enum, view_gen_fn_pointer_name_enum, view_gen_fnkargs_enum, view_gen_fnkdecls_enum, view_gen_fns_start_h_enum, view_gen_fns_end_h_enum, view_gen_fns_start_c_enum, view_gen_fns_owninclude_c_enum, view_gen_unpk_h_enum, view_gen_unparsedecls_h_enum, view_gen_rewritedecls_h_enum, view_uview_def_enum, view_gen_end_unpk_h_enum, view_gen_unpk_c_enum, view_gen_default_types_unpk_c_enum, view_gen_unparsedefs_c_enum, view_gen_unparsedefs_default_c_enum, view_gen_unparsedefs_other_c_enum, view_gen_unpstr_c_enum, view_gen_user_predicates_enum, view_predicate_bindings_enum, view_checklanguagenames_enum, view_output_collection_enum, view_gen_classdecls1_h_enum, view_gen_classdecls2_h_enum, view_gen_classdefs_c_enum, view_gen_subphylumdefs_c_enum, view_gen_cast_enum, view_gen_hashtables_h_enum, view_gen_hashtables_c_enum, view_gen_yxx_union_h_enum, view_gen_member_dcl_h_enum, view_gen_set_subphylumdefs_c_enum, view_gen_viewvars_c_enum, view_gen_argseqnr_rec_enum, view_gen_opt_const_enum, view_uview_class_decl_enum, view_uview_class_def_enum, view_rview_class_decl_enum, view_rview_class_def_enum, view_collect_strings_enum, view_class_of_op_enum, view_class_of_phy_enum, view_gen_base_init_expression_list_enum, last_uview } uview_enum; struct impl_uviews { const char *name; uview_class *view; }; extern impl_uviews uviews[]; class uview_class { protected: // only used in derivations uview_class(uview_enum v): m_view(v) { } uview_class(c_uview): m_view(base_uview_enum) { /* do not copy m_view */ } public: const char* name() const { return uviews[m_view].name; } operator uview_enum() const { return m_view; } bool operator==(const uview_class& other) const { return m_view == other.m_view; } private: uview_enum m_view; }; class printer_functor_class { public: virtual void operator()(const kc_char_t*, uview) { } virtual ~printer_functor_class() { } }; class printer_functor_function_wrapper : public printer_functor_class { public: printer_functor_function_wrapper(const printer_function opf =0): m_old_printer(opf) { } virtual ~printer_functor_function_wrapper() { } virtual void operator()(const kc_char_t* s, uview v) { if(m_old_printer) m_old_printer(s, v); } private: printer_function m_old_printer; }; /* Use uviews instead extern char *kc_view_names[]; */ struct base_uview_class: uview_class { base_uview_class():uview_class(base_uview_enum){} }; extern base_uview_class base_uview; class view_error_format_baseclass: public uview_class { protected: view_error_format_baseclass():uview_class(view_error_format_enum){} }; // class view_error_format_class is defined externally struct view_filename_class: uview_class { view_filename_class():uview_class(view_filename_enum){} }; extern view_filename_class view_filename; struct view_error_class: uview_class { view_error_class():uview_class(view_error_enum){} }; extern view_error_class view_error; struct view_error_tID_class: uview_class { view_error_tID_class():uview_class(view_error_tID_enum){} }; extern view_error_tID_class view_error_tID; struct view_check_class: uview_class { view_check_class():uview_class(view_check_enum){} }; extern view_check_class view_check; struct view_check_count_class: uview_class { view_check_count_class():uview_class(view_check_count_enum){} }; extern view_check_count_class view_check_count; struct view_check_count1_class: uview_class { view_check_count1_class():uview_class(view_check_count1_enum){} }; extern view_check_count1_class view_check_count1; struct view_check_outmostopers_in_phylum_class: uview_class { view_check_outmostopers_in_phylum_class():uview_class(view_check_outmostopers_in_phylum_enum){} }; extern view_check_outmostopers_in_phylum_class view_check_outmostopers_in_phylum; struct view_set_type_class: uview_class { view_set_type_class():uview_class(view_set_type_enum){} }; extern view_set_type_class view_set_type; struct view_check_is_var_class: uview_class { view_check_is_var_class():uview_class(view_check_is_var_enum){} }; extern view_check_is_var_class view_check_is_var; struct view_gen_initializephyla_c_class: uview_class { view_gen_initializephyla_c_class():uview_class(view_gen_initializephyla_c_enum){} }; extern view_gen_initializephyla_c_class view_gen_initializephyla_c; struct view_check_u_class: uview_class { view_check_u_class():uview_class(view_check_u_enum){} }; extern view_check_u_class view_check_u; struct view_check_r_class: uview_class { view_check_r_class():uview_class(view_check_r_enum){} }; extern view_check_r_class view_check_r; struct view_check_viewnames_class: uview_class { view_check_viewnames_class():uview_class(view_check_viewnames_enum){} }; extern view_check_viewnames_class view_check_viewnames; struct view_check_uniq_class: uview_class { view_check_uniq_class():uview_class(view_check_uniq_enum){} }; extern view_check_uniq_class view_check_uniq; struct view_check_uniq1_class: uview_class { view_check_uniq1_class():uview_class(view_check_uniq1_enum){} }; extern view_check_uniq1_class view_check_uniq1; struct view_check_uniq2_class: uview_class { view_check_uniq2_class():uview_class(view_check_uniq2_enum){} }; extern view_check_uniq2_class view_check_uniq2; struct view_make_patternreps_class: uview_class { view_make_patternreps_class():uview_class(view_make_patternreps_enum){} }; extern view_make_patternreps_class view_make_patternreps; struct view_printer_outputfileline_class: uview_class { view_printer_outputfileline_class():uview_class(view_printer_outputfileline_enum){} }; extern view_printer_outputfileline_class view_printer_outputfileline; struct view_printer_reset_class: uview_class { view_printer_reset_class():uview_class(view_printer_reset_enum){} }; extern view_printer_reset_class view_printer_reset; struct view_no_of_printed_string_chars_reset_class: uview_class { view_no_of_printed_string_chars_reset_class():uview_class(view_no_of_printed_string_chars_reset_enum){} }; extern view_no_of_printed_string_chars_reset_class view_no_of_printed_string_chars_reset; struct view_open_namespace_class: uview_class { view_open_namespace_class():uview_class(view_open_namespace_enum){} }; extern view_open_namespace_class view_open_namespace; struct view_close_namespace_class: uview_class { view_close_namespace_class():uview_class(view_close_namespace_enum){} }; extern view_close_namespace_class view_close_namespace; struct view_gen_k_h_class: uview_class { view_gen_k_h_class():uview_class(view_gen_k_h_enum){} }; extern view_gen_k_h_class view_gen_k_h; struct view_gen_end_k_h_class: uview_class { view_gen_end_k_h_class():uview_class(view_gen_end_k_h_enum){} }; extern view_gen_end_k_h_class view_gen_end_k_h; struct view_gen_k_c_class: uview_class { view_gen_k_c_class():uview_class(view_gen_k_c_enum){} }; extern view_gen_k_c_class view_gen_k_c; struct view_gen_alloc_h_class: uview_class { view_gen_alloc_h_class():uview_class(view_gen_alloc_h_enum){} }; extern view_gen_alloc_h_class view_gen_alloc_h; struct view_gen_alloc_c_class: uview_class { view_gen_alloc_c_class():uview_class(view_gen_alloc_c_enum){} }; extern view_gen_alloc_c_class view_gen_alloc_c; struct view_gen_deprecated_class: uview_class { view_gen_deprecated_class():uview_class(view_gen_deprecated_enum){} }; extern view_gen_deprecated_class view_gen_deprecated; struct view_gen_enumphyla_h_class: uview_class { view_gen_enumphyla_h_class():uview_class(view_gen_enumphyla_h_enum){} }; extern view_gen_enumphyla_h_class view_gen_enumphyla_h; struct view_gen_enumoperators_h_class: uview_class { view_gen_enumoperators_h_class():uview_class(view_gen_enumoperators_h_enum){} }; extern view_gen_enumoperators_h_class view_gen_enumoperators_h; struct view_gen_operatormap_type_h_class: uview_class { view_gen_operatormap_type_h_class():uview_class(view_gen_operatormap_type_h_enum){} }; extern view_gen_operatormap_type_h_class view_gen_operatormap_type_h; struct view_gen_phylummap_c_class: uview_class { view_gen_phylummap_c_class():uview_class(view_gen_phylummap_c_enum){} }; extern view_gen_phylummap_c_class view_gen_phylummap_c; struct view_gen_operatormap_c_class: uview_class { view_gen_operatormap_c_class():uview_class(view_gen_operatormap_c_enum){} }; extern view_gen_operatormap_c_class view_gen_operatormap_c; struct view_count_args_class: uview_class { view_count_args_class():uview_class(view_count_args_enum){} }; extern view_count_args_class view_count_args; struct view_count_attrs_class: uview_class { view_count_attrs_class():uview_class(view_count_attrs_enum){} }; extern view_count_attrs_class view_count_attrs; struct view_count_nonstaticmembers_class: uview_class { view_count_nonstaticmembers_class():uview_class(view_count_nonstaticmembers_enum){} }; extern view_count_nonstaticmembers_class view_count_nonstaticmembers; struct view_gen_operatormap_subphyla_class: uview_class { view_gen_operatormap_subphyla_class():uview_class(view_gen_operatormap_subphyla_enum){} }; extern view_gen_operatormap_subphyla_class view_gen_operatormap_subphyla; struct view_gen_operatormap_attributes_class: uview_class { view_gen_operatormap_attributes_class():uview_class(view_gen_operatormap_attributes_enum){} }; extern view_gen_operatormap_attributes_class view_gen_operatormap_attributes; struct view_gen_uniqmap_c_class: uview_class { view_gen_uniqmap_c_class():uview_class(view_gen_uniqmap_c_enum){} }; extern view_gen_uniqmap_c_class view_gen_uniqmap_c; struct view_gen_uniqmap_c_1_class: uview_class { view_gen_uniqmap_c_1_class():uview_class(view_gen_uniqmap_c_1_enum){} }; extern view_gen_uniqmap_c_1_class view_gen_uniqmap_c_1; struct view_gen_uniqmap_c_2_class: uview_class { view_gen_uniqmap_c_2_class():uview_class(view_gen_uniqmap_c_2_enum){} }; extern view_gen_uniqmap_c_2_class view_gen_uniqmap_c_2; struct view_gen_nodetypedefs_h_class: uview_class { view_gen_nodetypedefs_h_class():uview_class(view_gen_nodetypedefs_h_enum){} }; extern view_gen_nodetypedefs_h_class view_gen_nodetypedefs_h; struct view_gen_nodetypes_h_class: uview_class { view_gen_nodetypes_h_class():uview_class(view_gen_nodetypes_h_enum){} }; extern view_gen_nodetypes_h_class view_gen_nodetypes_h; struct view_gen_yaccstacktype_h_class: uview_class { view_gen_yaccstacktype_h_class():uview_class(view_gen_yaccstacktype_h_enum){} }; extern view_gen_yaccstacktype_h_class view_gen_yaccstacktype_h; struct view_gen_noofoperators_h_class: uview_class { view_gen_noofoperators_h_class():uview_class(view_gen_noofoperators_h_enum){} }; extern view_gen_noofoperators_h_class view_gen_noofoperators_h; struct view_gen_assertmacros_h_class: uview_class { view_gen_assertmacros_h_class():uview_class(view_gen_assertmacros_h_enum){} }; extern view_gen_assertmacros_h_class view_gen_assertmacros_h; struct view_gen_assertmacros_c_class: uview_class { view_gen_assertmacros_c_class():uview_class(view_gen_assertmacros_c_enum){} }; extern view_gen_assertmacros_c_class view_gen_assertmacros_c; struct view_gen_operatordecls_h_class: uview_class { view_gen_operatordecls_h_class():uview_class(view_gen_operatordecls_h_enum){} }; extern view_gen_operatordecls_h_class view_gen_operatordecls_h; struct view_gen_operatorcast_h_class: uview_class { view_gen_operatorcast_h_class():uview_class(view_gen_operatorcast_h_enum){} }; extern view_gen_operatorcast_h_class view_gen_operatorcast_h; struct view_gen_operatordefs_c_class: uview_class { view_gen_operatordefs_c_class():uview_class(view_gen_operatordefs_c_enum){} }; extern view_gen_operatordefs_c_class view_gen_operatordefs_c; struct view_gen_operatordefs_c_0_class: uview_class { view_gen_operatordefs_c_0_class():uview_class(view_gen_operatordefs_c_0_enum){} }; extern view_gen_operatordefs_c_0_class view_gen_operatordefs_c_0; struct view_gen_operatordefs_c_1_class: uview_class { view_gen_operatordefs_c_1_class():uview_class(view_gen_operatordefs_c_1_enum){} }; extern view_gen_operatordefs_c_1_class view_gen_operatordefs_c_1; struct view_gen_operatordefs_c_2_class: uview_class { view_gen_operatordefs_c_2_class():uview_class(view_gen_operatordefs_c_2_enum){} }; extern view_gen_operatordefs_c_2_class view_gen_operatordefs_c_2; struct view_gen_initializephyla_whiletest_c_class: uview_class { view_gen_initializephyla_whiletest_c_class():uview_class(view_gen_initializephyla_whiletest_c_enum){} }; extern view_gen_initializephyla_whiletest_c_class view_gen_initializephyla_whiletest_c; struct view_gen_initializephyla_init_el_c_class: uview_class { view_gen_initializephyla_init_el_c_class():uview_class(view_gen_initializephyla_init_el_c_enum){} }; extern view_gen_initializephyla_init_el_c_class view_gen_initializephyla_init_el_c; struct view_gen_initializephyla_update_loop_c_class: uview_class { view_gen_initializephyla_update_loop_c_class():uview_class(view_gen_initializephyla_update_loop_c_enum){} }; extern view_gen_initializephyla_update_loop_c_class view_gen_initializephyla_update_loop_c; struct view_gen_operatordefs_nonhash_c_class: uview_class { view_gen_operatordefs_nonhash_c_class():uview_class(view_gen_operatordefs_nonhash_c_enum){} }; extern view_gen_operatordefs_nonhash_c_class view_gen_operatordefs_nonhash_c; struct view_gen_operatordefs_hash_c_class: uview_class { view_gen_operatordefs_hash_c_class():uview_class(view_gen_operatordefs_hash_c_enum){} }; extern view_gen_operatordefs_hash_c_class view_gen_operatordefs_hash_c; struct view_gen_access_functions_class: uview_class { view_gen_access_functions_class():uview_class(view_gen_access_functions_enum){} }; extern view_gen_access_functions_class view_gen_access_functions; struct view_gen_create_function_class: uview_class { view_gen_create_function_class():uview_class(view_gen_create_function_enum){} }; extern view_gen_create_function_class view_gen_create_function; struct view_gen_attributeOf_function_class: uview_class { view_gen_attributeOf_function_class():uview_class(view_gen_attributeOf_function_enum){} }; extern view_gen_attributeOf_function_class view_gen_attributeOf_function; struct view_gen_argseqnr_class: uview_class { view_gen_argseqnr_class():uview_class(view_gen_argseqnr_enum){} }; extern view_gen_argseqnr_class view_gen_argseqnr; struct view_gen_fnarg_asserts_class: uview_class { view_gen_fnarg_asserts_class():uview_class(view_gen_fnarg_asserts_enum){} }; extern view_gen_fnarg_asserts_class view_gen_fnarg_asserts; struct view_gen_fnarg_and_decls_class: uview_class { view_gen_fnarg_and_decls_class():uview_class(view_gen_fnarg_and_decls_enum){} }; extern view_gen_fnarg_and_decls_class view_gen_fnarg_and_decls; struct view_gen_fnarg_and_decls_predef_class: uview_class { view_gen_fnarg_and_decls_predef_class():uview_class(view_gen_fnarg_and_decls_predef_enum){} }; extern view_gen_fnarg_and_decls_predef_class view_gen_fnarg_and_decls_predef; struct view_gen_assignments_class: uview_class { view_gen_assignments_class():uview_class(view_gen_assignments_enum){} }; extern view_gen_assignments_class view_gen_assignments; struct view_gen_assignment_inis_class: uview_class { view_gen_assignment_inis_class():uview_class(view_gen_assignment_inis_enum){} }; extern view_gen_assignment_inis_class view_gen_assignment_inis; struct view_gen_user_assignment_inis_class: uview_class { view_gen_user_assignment_inis_class():uview_class(view_gen_user_assignment_inis_enum){} }; extern view_gen_user_assignment_inis_class view_gen_user_assignment_inis; struct view_gen_assignments_predef_class: uview_class { view_gen_assignments_predef_class():uview_class(view_gen_assignments_predef_enum){} }; extern view_gen_assignments_predef_class view_gen_assignments_predef; struct view_gen_assignments_predef_ini_class: uview_class { view_gen_assignments_predef_ini_class():uview_class(view_gen_assignments_predef_ini_enum){} }; extern view_gen_assignments_predef_ini_class view_gen_assignments_predef_ini; struct view_gen_test_class: uview_class { view_gen_test_class():uview_class(view_gen_test_enum){} }; extern view_gen_test_class view_gen_test; struct view_gen_error_decls_h_class: uview_class { view_gen_error_decls_h_class():uview_class(view_gen_error_decls_h_enum){} }; extern view_gen_error_decls_h_class view_gen_error_decls_h; struct view_gen_error_defs_c_class: uview_class { view_gen_error_defs_c_class():uview_class(view_gen_error_defs_c_enum){} }; extern view_gen_error_defs_c_class view_gen_error_defs_c; struct view_gen_printdotdecls_h_class: uview_class { view_gen_printdotdecls_h_class():uview_class(view_gen_printdotdecls_h_enum){} }; extern view_gen_printdotdecls_h_class view_gen_printdotdecls_h; struct view_gen_printdotdefs_c_class: uview_class { view_gen_printdotdefs_c_class():uview_class(view_gen_printdotdefs_c_enum){} }; extern view_gen_printdotdefs_c_class view_gen_printdotdefs_c; struct view_gen_printdotedges_c_class: uview_class { view_gen_printdotedges_c_class():uview_class(view_gen_printdotedges_c_enum){} }; extern view_gen_printdotedges_c_class view_gen_printdotedges_c; struct view_gen_listdecls_h_class: uview_class { view_gen_listdecls_h_class():uview_class(view_gen_listdecls_h_enum){} }; extern view_gen_listdecls_h_class view_gen_listdecls_h; struct view_gen_listdefs_c_class: uview_class { view_gen_listdefs_c_class():uview_class(view_gen_listdefs_c_enum){} }; extern view_gen_listdefs_c_class view_gen_listdefs_c; struct view_gen_includes_class: uview_class { view_gen_includes_class():uview_class(view_gen_includes_enum){} }; extern view_gen_includes_class view_gen_includes; struct view_do_gen_includes_class: uview_class { view_do_gen_includes_class():uview_class(view_do_gen_includes_enum){} }; extern view_do_gen_includes_class view_do_gen_includes; struct view_gen_csgio_start_h_class: uview_class { view_gen_csgio_start_h_class():uview_class(view_gen_csgio_start_h_enum){} }; extern view_gen_csgio_start_h_class view_gen_csgio_start_h; struct view_gen_csgio_end_h_class: uview_class { view_gen_csgio_end_h_class():uview_class(view_gen_csgio_end_h_enum){} }; extern view_gen_csgio_end_h_class view_gen_csgio_end_h; struct view_gen_csgio_h_class: uview_class { view_gen_csgio_h_class():uview_class(view_gen_csgio_h_enum){} }; extern view_gen_csgio_h_class view_gen_csgio_h; struct view_gen_csgio_start_c_class: uview_class { view_gen_csgio_start_c_class():uview_class(view_gen_csgio_start_c_enum){} }; extern view_gen_csgio_start_c_class view_gen_csgio_start_c; struct view_gen_csgio_c_class: uview_class { view_gen_csgio_c_class():uview_class(view_gen_csgio_c_enum){} }; extern view_gen_csgio_c_class view_gen_csgio_c; struct view_gen_copy_attributes_c_class: uview_class { view_gen_copy_attributes_c_class():uview_class(view_gen_copy_attributes_c_enum){} }; extern view_gen_copy_attributes_c_class view_gen_copy_attributes_c; struct view_gen_copydefs_c_class: uview_class { view_gen_copydefs_c_class():uview_class(view_gen_copydefs_c_enum){} }; extern view_gen_copydefs_c_class view_gen_copydefs_c; struct view_gen_rewritek_h_class: uview_class { view_gen_rewritek_h_class():uview_class(view_gen_rewritek_h_enum){} }; extern view_gen_rewritek_h_class view_gen_rewritek_h; struct view_gen_end_rewritek_h_class: uview_class { view_gen_end_rewritek_h_class():uview_class(view_gen_end_rewritek_h_enum){} }; extern view_gen_end_rewritek_h_class view_gen_end_rewritek_h; struct view_gen_rewritek_c_class: uview_class { view_gen_rewritek_c_class():uview_class(view_gen_rewritek_c_enum){} }; extern view_gen_rewritek_c_class view_gen_rewritek_c; struct view_gen_rewritedefs_c_class: uview_class { view_gen_rewritedefs_c_class():uview_class(view_gen_rewritedefs_c_enum){} }; extern view_gen_rewritedefs_c_class view_gen_rewritedefs_c; struct view_gen_rewritedefs_default_c_class: uview_class { view_gen_rewritedefs_default_c_class():uview_class(view_gen_rewritedefs_default_c_enum){} }; extern view_gen_rewritedefs_default_c_class view_gen_rewritedefs_default_c; struct view_gen_rewritedefs_other_c_class: uview_class { view_gen_rewritedefs_other_c_class():uview_class(view_gen_rewritedefs_other_c_enum){} }; extern view_gen_rewritedefs_other_c_class view_gen_rewritedefs_other_c; struct view_gen_rewritedefs_rewritearg_c_class: uview_class { view_gen_rewritedefs_rewritearg_c_class():uview_class(view_gen_rewritedefs_rewritearg_c_enum){} }; extern view_gen_rewritedefs_rewritearg_c_class view_gen_rewritedefs_rewritearg_c; struct view_gen_rewritedefs_nl_arg_c_class: uview_class { view_gen_rewritedefs_nl_arg_c_class():uview_class(view_gen_rewritedefs_nl_arg_c_enum){} }; extern view_gen_rewritedefs_nl_arg_c_class view_gen_rewritedefs_nl_arg_c; struct view_gen_rewritedefs_testarg_c_class: uview_class { view_gen_rewritedefs_testarg_c_class():uview_class(view_gen_rewritedefs_testarg_c_enum){} }; extern view_gen_rewritedefs_testarg_c_class view_gen_rewritedefs_testarg_c; struct view_gen_rewritedefs_dotestarg_c_class: uview_class { view_gen_rewritedefs_dotestarg_c_class():uview_class(view_gen_rewritedefs_dotestarg_c_enum){} }; extern view_gen_rewritedefs_dotestarg_c_class view_gen_rewritedefs_dotestarg_c; struct view_gen_rewritedefs_args_c_class: uview_class { view_gen_rewritedefs_args_c_class():uview_class(view_gen_rewritedefs_args_c_enum){} }; extern view_gen_rewritedefs_args_c_class view_gen_rewritedefs_args_c; struct view_gen_rewritedefs_body_c_class: uview_class { view_gen_rewritedefs_body_c_class():uview_class(view_gen_rewritedefs_body_c_enum){} }; extern view_gen_rewritedefs_body_c_class view_gen_rewritedefs_body_c; struct view_gen_withcases_and_default_class: uview_class { view_gen_withcases_and_default_class():uview_class(view_gen_withcases_and_default_enum){} }; extern view_gen_withcases_and_default_class view_gen_withcases_and_default; struct view_rw_predicates_class: uview_class { view_rw_predicates_class():uview_class(view_rw_predicates_enum){} }; extern view_rw_predicates_class view_rw_predicates; struct view_wc_predicates_class: uview_class { view_wc_predicates_class():uview_class(view_wc_predicates_enum){} }; extern view_wc_predicates_class view_wc_predicates; struct view_unp_predicates_class: uview_class { view_unp_predicates_class():uview_class(view_unp_predicates_enum){} }; extern view_unp_predicates_class view_unp_predicates; struct view_wc_bindings_class: uview_class { view_wc_bindings_class():uview_class(view_wc_bindings_enum){} }; extern view_wc_bindings_class view_wc_bindings; struct view_unp_bindings_class: uview_class { view_unp_bindings_class():uview_class(view_unp_bindings_enum){} }; extern view_unp_bindings_class view_unp_bindings; struct view_rw_bindings_class: uview_class { view_rw_bindings_class():uview_class(view_rw_bindings_enum){} }; extern view_rw_bindings_class view_rw_bindings; struct view_gen_fnk_h_class: uview_class { view_gen_fnk_h_class():uview_class(view_gen_fnk_h_enum){} }; extern view_gen_fnk_h_class view_gen_fnk_h; struct view_gen_fnkdecls_c_class: uview_class { view_gen_fnkdecls_c_class():uview_class(view_gen_fnkdecls_c_enum){} }; extern view_gen_fnkdecls_c_class view_gen_fnkdecls_c; struct view_gen_fnk_c_class: uview_class { view_gen_fnk_c_class():uview_class(view_gen_fnk_c_enum){} }; extern view_gen_fnk_c_class view_gen_fnk_c; struct view_gen_fn_pointer_name_class: uview_class { view_gen_fn_pointer_name_class():uview_class(view_gen_fn_pointer_name_enum){} }; extern view_gen_fn_pointer_name_class view_gen_fn_pointer_name; struct view_gen_fnkargs_class: uview_class { view_gen_fnkargs_class():uview_class(view_gen_fnkargs_enum){} }; extern view_gen_fnkargs_class view_gen_fnkargs; struct view_gen_fnkdecls_class: uview_class { view_gen_fnkdecls_class():uview_class(view_gen_fnkdecls_enum){} }; extern view_gen_fnkdecls_class view_gen_fnkdecls; struct view_gen_fns_start_h_class: uview_class { view_gen_fns_start_h_class():uview_class(view_gen_fns_start_h_enum){} }; extern view_gen_fns_start_h_class view_gen_fns_start_h; struct view_gen_fns_end_h_class: uview_class { view_gen_fns_end_h_class():uview_class(view_gen_fns_end_h_enum){} }; extern view_gen_fns_end_h_class view_gen_fns_end_h; struct view_gen_fns_start_c_class: uview_class { view_gen_fns_start_c_class():uview_class(view_gen_fns_start_c_enum){} }; extern view_gen_fns_start_c_class view_gen_fns_start_c; struct view_gen_fns_owninclude_c_class: uview_class { view_gen_fns_owninclude_c_class():uview_class(view_gen_fns_owninclude_c_enum){} }; extern view_gen_fns_owninclude_c_class view_gen_fns_owninclude_c; struct view_gen_unpk_h_class: uview_class { view_gen_unpk_h_class():uview_class(view_gen_unpk_h_enum){} }; extern view_gen_unpk_h_class view_gen_unpk_h; struct view_gen_unparsedecls_h_class: uview_class { view_gen_unparsedecls_h_class():uview_class(view_gen_unparsedecls_h_enum){} }; extern view_gen_unparsedecls_h_class view_gen_unparsedecls_h; struct view_gen_rewritedecls_h_class: uview_class { view_gen_rewritedecls_h_class():uview_class(view_gen_rewritedecls_h_enum){} }; extern view_gen_rewritedecls_h_class view_gen_rewritedecls_h; struct view_uview_def_class: uview_class { view_uview_def_class():uview_class(view_uview_def_enum){} }; extern view_uview_def_class view_uview_def; struct view_gen_end_unpk_h_class: uview_class { view_gen_end_unpk_h_class():uview_class(view_gen_end_unpk_h_enum){} }; extern view_gen_end_unpk_h_class view_gen_end_unpk_h; struct view_gen_unpk_c_class: uview_class { view_gen_unpk_c_class():uview_class(view_gen_unpk_c_enum){} }; extern view_gen_unpk_c_class view_gen_unpk_c; struct view_gen_default_types_unpk_c_class: uview_class { view_gen_default_types_unpk_c_class():uview_class(view_gen_default_types_unpk_c_enum){} }; extern view_gen_default_types_unpk_c_class view_gen_default_types_unpk_c; struct view_gen_unparsedefs_c_class: uview_class { view_gen_unparsedefs_c_class():uview_class(view_gen_unparsedefs_c_enum){} }; extern view_gen_unparsedefs_c_class view_gen_unparsedefs_c; class view_gen_unparsedefs_default_c_baseclass: public uview_class { protected: view_gen_unparsedefs_default_c_baseclass():uview_class(view_gen_unparsedefs_default_c_enum){} }; // class view_gen_unparsedefs_default_c_class is defined externally struct view_gen_unparsedefs_other_c_class: uview_class { view_gen_unparsedefs_other_c_class():uview_class(view_gen_unparsedefs_other_c_enum){} }; extern view_gen_unparsedefs_other_c_class view_gen_unparsedefs_other_c; struct view_gen_unpstr_c_class: uview_class { view_gen_unpstr_c_class():uview_class(view_gen_unpstr_c_enum){} }; extern view_gen_unpstr_c_class view_gen_unpstr_c; struct view_gen_user_predicates_class: uview_class { view_gen_user_predicates_class():uview_class(view_gen_user_predicates_enum){} }; extern view_gen_user_predicates_class view_gen_user_predicates; struct view_predicate_bindings_class: uview_class { view_predicate_bindings_class():uview_class(view_predicate_bindings_enum){} }; extern view_predicate_bindings_class view_predicate_bindings; struct view_checklanguagenames_class: uview_class { view_checklanguagenames_class():uview_class(view_checklanguagenames_enum){} }; extern view_checklanguagenames_class view_checklanguagenames; struct view_output_collection_class: uview_class { view_output_collection_class():uview_class(view_output_collection_enum){} }; extern view_output_collection_class view_output_collection; struct view_gen_classdecls1_h_class: uview_class { view_gen_classdecls1_h_class():uview_class(view_gen_classdecls1_h_enum){} }; extern view_gen_classdecls1_h_class view_gen_classdecls1_h; struct view_gen_classdecls2_h_class: uview_class { view_gen_classdecls2_h_class():uview_class(view_gen_classdecls2_h_enum){} }; extern view_gen_classdecls2_h_class view_gen_classdecls2_h; struct view_gen_classdefs_c_class: uview_class { view_gen_classdefs_c_class():uview_class(view_gen_classdefs_c_enum){} }; extern view_gen_classdefs_c_class view_gen_classdefs_c; struct view_gen_subphylumdefs_c_class: uview_class { view_gen_subphylumdefs_c_class():uview_class(view_gen_subphylumdefs_c_enum){} }; extern view_gen_subphylumdefs_c_class view_gen_subphylumdefs_c; struct view_gen_cast_class: uview_class { view_gen_cast_class():uview_class(view_gen_cast_enum){} }; extern view_gen_cast_class view_gen_cast; struct view_gen_hashtables_h_class: uview_class { view_gen_hashtables_h_class():uview_class(view_gen_hashtables_h_enum){} }; extern view_gen_hashtables_h_class view_gen_hashtables_h; struct view_gen_hashtables_c_class: uview_class { view_gen_hashtables_c_class():uview_class(view_gen_hashtables_c_enum){} }; extern view_gen_hashtables_c_class view_gen_hashtables_c; struct view_gen_yxx_union_h_class: uview_class { view_gen_yxx_union_h_class():uview_class(view_gen_yxx_union_h_enum){} }; extern view_gen_yxx_union_h_class view_gen_yxx_union_h; struct view_gen_member_dcl_h_class: uview_class { view_gen_member_dcl_h_class():uview_class(view_gen_member_dcl_h_enum){} }; extern view_gen_member_dcl_h_class view_gen_member_dcl_h; struct view_gen_set_subphylumdefs_c_class: uview_class { view_gen_set_subphylumdefs_c_class():uview_class(view_gen_set_subphylumdefs_c_enum){} }; extern view_gen_set_subphylumdefs_c_class view_gen_set_subphylumdefs_c; struct view_gen_viewvars_c_class: uview_class { view_gen_viewvars_c_class():uview_class(view_gen_viewvars_c_enum){} }; extern view_gen_viewvars_c_class view_gen_viewvars_c; struct view_gen_argseqnr_rec_class: uview_class { view_gen_argseqnr_rec_class():uview_class(view_gen_argseqnr_rec_enum){} }; extern view_gen_argseqnr_rec_class view_gen_argseqnr_rec; struct view_gen_opt_const_class: uview_class { view_gen_opt_const_class():uview_class(view_gen_opt_const_enum){} }; extern view_gen_opt_const_class view_gen_opt_const; struct view_uview_class_decl_class: uview_class { view_uview_class_decl_class():uview_class(view_uview_class_decl_enum){} }; extern view_uview_class_decl_class view_uview_class_decl; struct view_uview_class_def_class: uview_class { view_uview_class_def_class():uview_class(view_uview_class_def_enum){} }; extern view_uview_class_def_class view_uview_class_def; struct view_rview_class_decl_class: uview_class { view_rview_class_decl_class():uview_class(view_rview_class_decl_enum){} }; extern view_rview_class_decl_class view_rview_class_decl; struct view_rview_class_def_class: uview_class { view_rview_class_def_class():uview_class(view_rview_class_def_enum){} }; extern view_rview_class_def_class view_rview_class_def; struct view_collect_strings_class: uview_class { view_collect_strings_class():uview_class(view_collect_strings_enum){} }; extern view_collect_strings_class view_collect_strings; struct view_class_of_op_class: uview_class { view_class_of_op_class():uview_class(view_class_of_op_enum){} }; extern view_class_of_op_class view_class_of_op; struct view_class_of_phy_class: uview_class { view_class_of_phy_class():uview_class(view_class_of_phy_enum){} }; extern view_class_of_phy_class view_class_of_phy; struct view_gen_base_init_expression_list_class: uview_class { view_gen_base_init_expression_list_class():uview_class(view_gen_base_init_expression_list_enum){} }; extern view_gen_base_init_expression_list_class view_gen_base_init_expression_list; void unparse(abstract_phylum kc_p, printer_functor kc_printer, uview kc_current_view); void unparse(void *kc_p, printer_functor kc_printer, uview kc_current_view); void unparse(int kc_v, printer_functor kc_printer, uview kc_current_view); void unparse(double kc_v, printer_functor kc_printer, uview kc_current_view); void unparse(kc_char_t *kc_v, printer_functor kc_printer, uview kc_current_view); void unparse(kc_string_t kc_v, printer_functor kc_printer, uview kc_current_view); #define PRINT(string) kc_printer(string,kc_current_view) #define UNPARSE(node) node->unparse(kc_printer,kc_current_view) } // namespace kc #endif // KC_UNPARSE_HEADER kimwitu++-2.3.13/src/Gen.boot/yystype.h0000644000175000017500000001414011135163773016305 0ustar useruser#ifndef YYSTYPE_HEADER #define YYSTYPE_HEADER union KC_YYSTYPE { kc::nocasestring yt_nocasestring; kc::casestring yt_casestring; kc::real yt_real; kc::integer yt_integer; kc::voidptr yt_voidptr; kc::uniqID yt_uniqID; kc::ID yt_ID; kc::INT yt_INT; kc::STRING yt_STRING; kc::phylumdeclarationsroot yt_phylumdeclarationsroot; kc::phylumdeclarations yt_phylumdeclarations; kc::phylumnames yt_phylumnames; kc::phylumdeclaration yt_phylumdeclaration; kc::storageoption yt_storageoption; kc::storageclasses yt_storageclasses; kc::productionblock yt_productionblock; kc::alternatives yt_alternatives; kc::alternative yt_alternative; kc::arguments yt_arguments; kc::argument yt_argument; kc::Ccode_option yt_Ccode_option; kc::attributes yt_attributes; kc::attribute yt_attribute; kc::attribute_initialisation_option yt_attribute_initialisation_option; kc::Cexpression yt_Cexpression; kc::Cexpression_elem yt_Cexpression_elem; kc::CexpressionDQ yt_CexpressionDQ; kc::CexpressionDQ_elem yt_CexpressionDQ_elem; kc::CexpressionSQ yt_CexpressionSQ; kc::CexpressionSQ_elem yt_CexpressionSQ_elem; kc::idCexpressions yt_idCexpressions; kc::idCexpression yt_idCexpression; kc::Ctexts yt_Ctexts; kc::includefiles yt_includefiles; kc::includefile yt_includefile; kc::includedeclarations yt_includedeclarations; kc::includedeclaration yt_includedeclaration; kc::rwdeclarations yt_rwdeclarations; kc::rwdeclaration yt_rwdeclaration; kc::rewriteclauses yt_rewriteclauses; kc::rewriteclause yt_rewriteclause; kc::patternchains yt_patternchains; kc::patternchain yt_patternchain; kc::outmostpatterns yt_outmostpatterns; kc::patternchainitem yt_patternchainitem; kc::outmostpattern yt_outmostpattern; kc::pattern yt_pattern; kc::patterns yt_patterns; kc::term yt_term; kc::terms yt_terms; kc::fnfiles yt_fnfiles; kc::fnfile yt_fnfile; kc::fndeclarations yt_fndeclarations; kc::fndeclaration yt_fndeclaration; kc::fnclass yt_fnclass; kc::Ctext yt_Ctext; kc::Ctext_elem yt_Ctext_elem; kc::foreach_after yt_foreach_after; kc::contextinfo yt_contextinfo; kc::withexpressions yt_withexpressions; kc::withexpression yt_withexpression; kc::withcases yt_withcases; kc::withcase yt_withcase; kc::unparsedeclarations yt_unparsedeclarations; kc::unparsedeclaration yt_unparsedeclaration; kc::unparseclauses yt_unparseclauses; kc::unparseclause yt_unparseclause; kc::viewnames yt_viewnames; kc::unparseitems yt_unparseitems; kc::unparseitem yt_unparseitem; kc::unpsubterm yt_unpsubterm; kc::unpattributes yt_unpattributes; kc::viewnameoption yt_viewnameoption; kc::languageoption yt_languageoption; kc::languagenames yt_languagenames; kc::fileline yt_fileline; kc::scopetypefilelinestack yt_scopetypefilelinestack; kc::scopetypefileline yt_scopetypefileline; kc::IDtype yt_IDtype; kc::operators yt_operators; kc::phyla yt_phyla; kc::variables yt_variables; kc::dollarvarstatus yt_dollarvarstatus; kc::tribool yt_tribool; kc::patternrepresentations yt_patternrepresentations; kc::patternrepresentation yt_patternrepresentation; kc::elem_patternrepresentation yt_elem_patternrepresentation; kc::path yt_path; kc::paths yt_paths; kc::argsnumbers yt_argsnumbers; kc::rewriterulesinfo yt_rewriterulesinfo; kc::rewriteruleinfo yt_rewriteruleinfo; kc::withcasesinfo yt_withcasesinfo; kc::withcaseinfo yt_withcaseinfo; kc::rewriteviewsinfo yt_rewriteviewsinfo; kc::rewriteviewinfo yt_rewriteviewinfo; kc::unparseviewsinfo yt_unparseviewsinfo; kc::unparseviewinfo yt_unparseviewinfo; kc::unparsedeclsinfo yt_unparsedeclsinfo; kc::unparsedeclinfo yt_unparsedeclinfo; kc::ac_declaration yt_ac_declaration; kc::ac_declaration_list yt_ac_declaration_list; kc::ac_declaration_specifiers yt_ac_declaration_specifiers; kc::ac_declaration_specifier yt_ac_declaration_specifier; kc::ac_storage_class_specifier yt_ac_storage_class_specifier; kc::ac_type_specifier yt_ac_type_specifier; kc::ac_type_qualifier yt_ac_type_qualifier; kc::ac_init_declarator_list yt_ac_init_declarator_list; kc::ac_init_declarator yt_ac_init_declarator; kc::ac_declarator yt_ac_declarator; kc::ac_direct_declarator yt_ac_direct_declarator; kc::ac_pointer_option yt_ac_pointer_option; kc::ac_pointer yt_ac_pointer; kc::ac_ref_option yt_ac_ref_option; kc::ac_operator_name yt_ac_operator_name; kc::ac_class_qualifier_help_list yt_ac_class_qualifier_help_list; kc::ac_class_qualifier_list yt_ac_class_qualifier_list; kc::ac_type_qualifier_list yt_ac_type_qualifier_list; kc::ac_parameter_type_list yt_ac_parameter_type_list; kc::ac_parameter_list yt_ac_parameter_list; kc::ac_parameter_declaration yt_ac_parameter_declaration; kc::ac_identifier_list yt_ac_identifier_list; kc::ac_abstract_declarator yt_ac_abstract_declarator; kc::ac_direct_abstract_declarator_option yt_ac_direct_abstract_declarator_option; kc::ac_direct_abstract_declarator yt_ac_direct_abstract_declarator; kc::ac_constant_expression_option yt_ac_constant_expression_option; kc::ac_constant_expression yt_ac_constant_expression; kc::ac_constant_expression_list yt_ac_constant_expression_list; kc::ac_opt_base_init_list yt_ac_opt_base_init_list; kc::ac_base_init_list yt_ac_base_init_list; kc::ac_base_init yt_ac_base_init; kc::baseclass_declarations yt_baseclass_declarations; kc::baseclass_decl yt_baseclass_decl; kc::baseclass_list yt_baseclass_list; kc::error yt_error; kc::problem yt_problem; kc::addedphylumdeclarations yt_addedphylumdeclarations; kc::addedphylumdeclaration yt_addedphylumdeclaration; kc::countedphylumdeclarations yt_countedphylumdeclarations; kc::countedphylumdeclaration yt_countedphylumdeclaration; kc::charruns yt_charruns; kc::bindingidmarks yt_bindingidmarks; kc::bindingidmark yt_bindingidmark; }; #define YYSTYPE KC_YYSTYPE #endif // YYSTYPE_HEADER kimwitu++-2.3.13/src/Gen.boot/kimwl.cc0000644000175000017500000024301111135163773016041 0ustar useruser #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart(yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires * access to the local variable yy_act. Since yyless() is a macro, it would break * existing scanners that call yyless() from OUTSIDE yylex. * One obvious solution it to make yy_act a global. I tried that, and saw * a 5% performance hit in a non-yylineno scanner, because yy_act is * normally declared as a register variable-- so it is not worth it. */ #define YY_LESS_LINENO(n) \ do { \ int yyl;\ for ( yyl = n; yyl < yyleng; ++yyl )\ if ( yytext[yyl] == '\n' )\ --yylineno;\ }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart (FILE *input_file ); void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); void yy_delete_buffer (YY_BUFFER_STATE b ); void yy_flush_buffer (YY_BUFFER_STATE b ); void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); void yypop_buffer_state (void ); static void yyensure_buffer_stack (void ); static void yy_load_buffer_state (void ); static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); void yyfree (void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define yywrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; #define YY_FLEX_LEX_COMPAT extern int yylineno; int yylineno = 1; extern char yytext[]; static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ if ( yyleng + (yy_more_offset) >= YYLMAX ) \ YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ yy_flex_strncpy( &yytext[(yy_more_offset)], (yytext_ptr), yyleng + 1 ); \ yyleng += (yy_more_offset); \ (yy_prev_more_offset) = (yy_more_offset); \ (yy_more_offset) = 0; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 93 #define YY_END_OF_BUFFER 94 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_acclist[414] = { 0, 42, 42, 82, 82, 94, 81, 93, 93, 1, 81, 93, 1, 93, 54, 81, 93, 81, 93, 81, 93, 55, 81, 93, 81, 93, 81, 93, 81, 93, 23, 81, 93, 81, 93, 45, 81, 93, 45, 81, 93, 45, 81, 93, 45, 81, 93, 45, 81, 93, 45, 81, 93, 45, 81, 93, 45, 81, 93, 45, 81, 93, 45, 81, 93, 45, 81, 93, 45, 81, 93, 45, 81, 93, 81, 93, 13, 81, 93, 13, 93, 13, 81, 93, 11, 81, 93, 12, 93, 10, 81, 93, 46, 81, 93, 51, 93, 50, 81, 93, 58, 81, 93, 59, 81, 93, 57, 81, 93, 46, 81, 93, 56, 81, 93, 60, 81, 93, 52, 81, 93, 61, 81, 93, 62, 81, 93, 63, 81, 93, 52, 81, 93, 67, 81, 93, 65, 81, 93, 52, 81, 93, 76, 81, 93, 76, 81, 93, 51, 93, 73, 81, 93, 77, 81, 93, 75, 81, 93, 70, 81, 93, 75, 81, 93, 42, 81, 93, 42, 93, 43, 81, 93, 43, 81, 93, 43, 81, 93, 81, 93, 43, 81, 93, 43, 81, 93, 43, 81, 93, 43, 81, 93, 43, 81, 93, 43, 81, 93, 43, 81, 93, 43, 81, 93, 44, 81, 93, 81, 93, 43, 81, 93, 44, 81, 93, 44, 81, 93, 43, 81, 93, 92, 93, 82, 92, 93, 83, 93, 92, 93, 92, 93, 92, 93, 92, 93, 47, 48, 49, 23, 20, 17, 19, 41, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 9, 14, 10, 46, 16, 46, 18, 46, 53, 62, 64, 67, 66, 76, 76, 68, 73, 71, 72, 16, 18, 75, 69, 75, 42, 43, 43, 43, 43, 44, 44, 44, 82, 40, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 9, 14, 15, 75, 44, 43, 44, 26, 45, 45, 45, 45, 24, 45, 45, 45, 45, 45, 45, 45, 45, 45, 75, 44, 30, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 38, 39, 35, 36, 75, 44, 43, 45, 28, 45, 45, 45, 45, 25, 45, 45, 45, 45, 45, 4, 2, 75, 43, 44, 22, 45, 45, 45, 45, 29, 45, 45, 33, 45, 45, 37, 8, 75, 84, 34, 45, 21, 45, 27, 45, 32, 45, 31, 45, 75, 43, 85, 5, 3, 7, 78, 75, 75, 87, 86, 75, 88, 75,16458, 91, 6,16458, 80, 8266, 89, 90, 79 } ; static yyconst flex_int16_t yy_accept[439] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 8, 9, 12, 14, 17, 19, 21, 24, 26, 28, 30, 33, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 76, 79, 81, 84, 87, 89, 92, 95, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, 145, 148, 150, 153, 156, 159, 162, 165, 168, 170, 173, 176, 179, 181, 184, 187, 190, 193, 196, 199, 202, 205, 208, 210, 213, 216, 219, 222, 224, 227, 229, 231, 233, 235, 237, 238, 239, 240, 240, 240, 241, 242, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 260, 261, 261, 262, 263, 265, 267, 268, 269, 270, 271, 272, 273, 274, 274, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 292, 292, 292, 292, 292, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 307, 308, 308, 309, 309, 309, 309, 309, 309, 310, 311, 313, 313, 313, 313, 313, 313, 313, 315, 316, 317, 318, 320, 321, 322, 323, 324, 325, 326, 327, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 329, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 347, 348, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 350, 352, 353, 354, 355, 357, 358, 359, 360, 361, 361, 361, 361, 362, 362, 363, 363, 363, 363, 363, 364, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 368, 369, 370, 371, 373, 374, 376, 377, 377, 378, 379, 379, 379, 379, 379, 379, 380, 380, 380, 380, 380, 380, 380, 380, 380, 381, 381, 381, 383, 385, 387, 389, 391, 391, 391, 391, 391, 391, 391, 391, 392, 393, 394, 394, 394, 394, 394, 394, 394, 395, 396, 397, 397, 397, 398, 398, 398, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 400, 400, 400, 401, 402, 402, 402, 402, 402, 402, 402, 402, 403, 403, 404, 404, 404, 404, 404, 404, 404, 404, 406, 406, 406, 407, 408, 409, 409, 409, 410, 411, 412, 413, 414, 414 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 6, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 21, 22, 23, 24, 1, 1, 25, 26, 27, 28, 29, 26, 26, 30, 26, 26, 26, 26, 31, 32, 33, 34, 26, 35, 36, 37, 38, 26, 26, 26, 39, 26, 40, 41, 42, 43, 44, 1, 45, 46, 47, 48, 49, 50, 51, 52, 53, 26, 54, 55, 56, 57, 58, 59, 26, 60, 61, 62, 63, 64, 65, 66, 67, 26, 68, 69, 70, 71, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[72] = { 0, 1, 1, 2, 1, 1, 3, 4, 1, 1, 5, 6, 6, 1, 1, 6, 1, 1, 7, 8, 1, 6, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 6, 2, 6, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 1, 7, 1 } ; static yyconst flex_int16_t yy_base[453] = { 0, 846, 845, 0, 839, 843, 69, 77, 0, 146, 186, 159, 165, 167, 169, 228, 0, 299, 0, 148, 157, 845, 850, 850, 850, 850, 850, 155, 13, 850, 154, 827, 162, 824, 822, 0, 778, 782, 790, 772, 784, 777, 775, 785, 771, 765, 774, 123, 326, 850, 850, 114, 850, 850, 0, 0, 850, 811, 850, 850, 850, 172, 850, 850, 788, 850, 0, 850, 369, 0, 850, 153, 0, 374, 388, 376, 198, 0, 787, 777, 217, 394, 803, 802, 146, 812, 800, 189, 850, 377, 799, 52, 798, 356, 0, 778, 796, 769, 768, 362, 850, 814, 850, 757, 758, 764, 745, 792, 850, 850, 746, 745, 789, 850, 790, 850, 850, 850, 0, 744, 748, 754, 741, 741, 752, 742, 748, 753, 738, 735, 735, 739, 731, 747, 729, 728, 744, 739, 728, 722, 723, 720, 781, 780, 400, 0, 0, 0, 0, 850, 0, 850, 0, 850, 0, 402, 405, 731, 850, 761, 850, 850, 386, 850, 0, 850, 717, 409, 850, 765, 754, 753, 0, 720, 709, 771, 756, 726, 725, 708, 715, 714, 850, 708, 704, 719, 714, 700, 701, 696, 706, 696, 708, 703, 693, 709, 691, 691, 693, 692, 692, 692, 685, 693, 687, 691, 741, 740, 414, 850, 679, 419, 709, 706, 700, 688, 687, 695, 376, 674, 679, 670, 682, 681, 0, 667, 665, 667, 0, 681, 672, 663, 670, 674, 670, 657, 657, 658, 668, 656, 655, 663, 667, 659, 662, 650, 660, 659, 673, 669, 671, 644, 641, 660, 640, 655, 639, 649, 640, 634, 679, 627, 628, 627, 0, 636, 633, 627, 640, 625, 639, 636, 627, 638, 629, 850, 850, 850, 850, 618, 631, 621, 613, 632, 611, 615, 637, 638, 638, 621, 621, 850, 618, 607, 614, 601, 606, 648, 604, 603, 597, 596, 597, 0, 600, 608, 607, 0, 605, 605, 598, 597, 606, 590, 592, 584, 596, 582, 595, 605, 614, 607, 583, 600, 586, 586, 580, 576, 590, 575, 575, 583, 586, 573, 0, 556, 567, 554, 0, 565, 0, 558, 553, 850, 850, 547, 537, 189, 565, 560, 528, 545, 528, 460, 459, 467, 459, 460, 464, 850, 456, 455, 0, 0, 0, 0, 0, 465, 466, 452, 412, 493, 483, 473, 459, 850, 850, 462, 458, 443, 443, 450, 445, 850, 850, 850, 446, 451, 850, 469, 458, 448, 446, 433, 441, 440, 431, 425, 441, 440, 455, 164, 436, 427, 419, 850, 850, 418, 425, 393, 406, 424, 418, 430, 393, 393, 850, 385, 366, 363, 347, 425, 427, 199, 455, 138, 135, 850, 850, 0, 428, 136, 850, 850, 850, 850, 850, 850, 526, 535, 544, 553, 562, 571, 573, 575, 584, 593, 602, 611, 612, 614, 623 } ; static yyconst flex_int16_t yy_def[453] = { 0, 438, 438, 437, 3, 439, 439, 437, 7, 440, 440, 441, 441, 442, 442, 437, 15, 437, 17, 443, 443, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 437, 437, 437, 437, 437, 437, 445, 446, 437, 437, 437, 437, 437, 446, 437, 437, 437, 437, 447, 437, 437, 448, 437, 437, 449, 449, 437, 437, 437, 450, 437, 450, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 451, 437, 437, 451, 451, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 445, 446, 446, 446, 437, 447, 437, 448, 437, 449, 449, 437, 437, 437, 437, 437, 437, 437, 437, 450, 437, 450, 437, 437, 437, 437, 437, 451, 451, 451, 437, 437, 437, 437, 437, 437, 437, 437, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 450, 451, 451, 437, 437, 437, 437, 437, 437, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 450, 451, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 450, 451, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 450, 451, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 444, 444, 444, 444, 444, 444, 444, 444, 437, 437, 437, 437, 437, 437, 437, 437, 450, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 444, 444, 444, 444, 444, 437, 437, 437, 437, 437, 437, 437, 450, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 450, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 450, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 450, 437, 437, 437, 437, 437, 437, 437, 437, 437, 450, 437, 437, 437, 437, 452, 437, 437, 437, 437, 437, 437, 437, 0, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437 } ; static yyconst flex_int16_t yy_nxt[922] = { 0, 22, 24, 25, 24, 22, 26, 27, 28, 22, 29, 22, 22, 22, 22, 22, 30, 31, 32, 33, 34, 22, 22, 22, 22, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 22, 22, 22, 22, 35, 36, 35, 37, 38, 39, 35, 35, 35, 35, 35, 40, 35, 35, 41, 42, 43, 44, 45, 46, 47, 35, 35, 35, 22, 22, 22, 22, 50, 110, 170, 168, 111, 51, 22, 52, 53, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 32, 22, 22, 22, 22, 22, 22, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 22, 22, 22, 22, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 22, 22, 22, 22, 56, 101, 102, 26, 57, 436, 168, 29, 58, 59, 101, 102, 60, 56, 153, 61, 67, 412, 62, 56, 168, 56, 67, 56, 112, 107, 115, 130, 70, 113, 70, 116, 131, 143, 413, 144, 147, 63, 64, 65, 56, 148, 370, 26, 57, 149, 435, 29, 58, 59, 434, 68, 60, 371, 168, 61, 103, 68, 62, 71, 104, 71, 162, 168, 105, 103, 106, 163, 432, 104, 167, 167, 167, 105, 108, 106, 109, 63, 64, 65, 72, 73, 74, 73, 72, 26, 75, 72, 72, 29, 72, 72, 72, 72, 72, 72, 72, 76, 72, 72, 72, 72, 72, 72, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 72, 78, 72, 72, 77, 79, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 22, 72, 22, 72, 22, 80, 81, 80, 82, 22, 22, 83, 84, 22, 85, 22, 86, 87, 88, 89, 22, 90, 22, 22, 22, 91, 92, 93, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 95, 22, 22, 96, 94, 94, 94, 94, 97, 94, 94, 94, 94, 94, 94, 94, 94, 98, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 22, 99, 22, 88, 132, 133, 134, 135, 151, 155, 156, 155, 168, 171, 136, 137, 158, 138, 168, 139, 140, 211, 141, 156, 156, 156, 168, 142, 159, 167, 167, 167, 429, 168, 169, 208, 209, 155, 156, 155, 156, 156, 156, 149, 167, 167, 167, 370, 212, 208, 209, 213, 157, 412, 211, 214, 254, 428, 371, 427, 430, 255, 422, 430, 168, 422, 157, 426, 256, 257, 413, 431, 258, 423, 431, 425, 423, 160, 424, 161, 157, 212, 413, 157, 213, 421, 420, 419, 214, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 418, 433, 433, 433, 433, 433, 417, 416, 415, 414, 411, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 433, 433, 433, 433, 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, 433, 433, 433, 433, 22, 22, 22, 22, 22, 22, 22, 22, 22, 49, 49, 49, 49, 49, 49, 49, 49, 49, 55, 55, 55, 55, 55, 55, 55, 55, 55, 66, 66, 66, 66, 66, 66, 66, 66, 66, 69, 69, 69, 69, 69, 69, 69, 69, 69, 100, 100, 100, 100, 100, 100, 100, 100, 100, 118, 118, 145, 145, 146, 376, 375, 374, 373, 372, 146, 146, 146, 150, 369, 368, 150, 150, 150, 150, 150, 150, 152, 367, 152, 152, 366, 152, 152, 152, 152, 154, 365, 364, 363, 362, 154, 361, 154, 164, 164, 172, 172, 433, 433, 433, 433, 433, 433, 433, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 333, 345, 332, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 253, 252, 251, 250, 249, 248, 247, 207, 206, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 175, 217, 216, 168, 168, 168, 215, 159, 210, 207, 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 182, 112, 181, 180, 107, 179, 178, 177, 176, 175, 174, 173, 168, 168, 168, 168, 168, 168, 168, 168, 166, 165, 149, 107, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 117, 112, 114, 437, 50, 48, 23, 23, 21, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437 } ; static yyconst flex_int16_t yy_chk[922] = { 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 28, 91, 91, 28, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 19, 19, 9, 9, 431, 84, 9, 9, 9, 20, 20, 9, 11, 71, 9, 11, 401, 9, 12, 84, 13, 12, 14, 30, 27, 32, 47, 13, 30, 14, 32, 47, 51, 401, 51, 61, 9, 9, 9, 10, 61, 347, 10, 10, 71, 426, 10, 10, 10, 425, 11, 10, 347, 87, 10, 19, 12, 10, 13, 19, 14, 76, 87, 19, 20, 19, 76, 423, 20, 80, 80, 80, 20, 27, 20, 27, 10, 10, 10, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 48, 48, 48, 48, 68, 73, 73, 73, 93, 93, 48, 48, 75, 48, 99, 48, 48, 162, 48, 74, 74, 74, 89, 48, 75, 81, 81, 81, 420, 89, 89, 144, 144, 155, 155, 155, 156, 156, 156, 68, 167, 167, 167, 370, 162, 208, 208, 162, 73, 412, 211, 162, 218, 419, 370, 418, 421, 218, 422, 430, 99, 413, 74, 417, 218, 218, 412, 421, 218, 422, 430, 415, 413, 75, 414, 75, 155, 211, 413, 156, 211, 411, 410, 409, 211, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 408, 424, 424, 424, 424, 424, 407, 404, 403, 402, 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, 390, 424, 424, 424, 424, 389, 387, 386, 382, 381, 380, 379, 378, 377, 374, 373, 372, 371, 369, 368, 367, 361, 360, 358, 357, 356, 355, 354, 353, 424, 424, 424, 424, 438, 438, 438, 438, 438, 438, 438, 438, 438, 439, 439, 439, 439, 439, 439, 439, 439, 439, 440, 440, 440, 440, 440, 440, 440, 440, 440, 441, 441, 441, 441, 441, 441, 441, 441, 441, 442, 442, 442, 442, 442, 442, 442, 442, 442, 443, 443, 443, 443, 443, 443, 443, 443, 443, 444, 444, 445, 445, 446, 352, 351, 350, 349, 348, 446, 446, 446, 447, 346, 345, 447, 447, 447, 447, 447, 447, 448, 342, 448, 448, 341, 448, 448, 448, 448, 449, 339, 337, 336, 335, 449, 333, 449, 450, 450, 451, 451, 452, 452, 452, 452, 452, 452, 452, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 306, 305, 304, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 227, 226, 225, 223, 222, 221, 220, 219, 217, 216, 215, 214, 213, 212, 210, 207, 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 181, 180, 179, 178, 177, 176, 175, 174, 173, 171, 170, 169, 166, 159, 157, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 114, 112, 111, 110, 107, 106, 105, 104, 103, 101, 98, 97, 96, 95, 92, 90, 86, 85, 83, 82, 79, 78, 64, 57, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 34, 33, 31, 21, 5, 4, 2, 1, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437 } ; /* Table of booleans, true if rule could match eol. */ static yyconst flex_int32_t yy_rule_can_match_eol[94] = { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; extern int yy_flex_debug; int yy_flex_debug = 0; static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; static char *yy_full_match; static int yy_lp; static int yy_looking_for_trail_begin = 0; static int yy_full_lp; static int *yy_full_state; #define YY_TRAILING_MASK 0x2000 #define YY_TRAILING_HEAD_MASK 0x4000 #define REJECT \ { \ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \ yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ (yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \ (yy_state_ptr) = (yy_full_state); /* restore orig. state */ \ yy_current_state = *(yy_state_ptr); /* restore curr. state */ \ ++(yy_lp); \ goto find_rule; \ } static int yy_more_offset = 0; static int yy_prev_more_offset = 0; #define yymore() ((yy_more_offset) = yy_flex_strlen( yytext )) #define YY_NEED_STRLEN #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET \ { \ (yy_more_offset) = (yy_prev_more_offset); \ yyleng -= (yy_more_offset); \ } #ifndef YYLMAX #define YYLMAX 8192 #endif char yytext[YYLMAX]; char *yytext_ptr; // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // /* * kimwl.l */ static char kimwl_lAccesSid[] = "@(#)$Id: kimwl.l,v 1.41 2008/02/06 20:28:58 piefel Exp $"; /* For windows (NT at least) we need to redefine fileno */ #if defined(_WIN32) && ! defined (__GNUC__) # define fileno _fileno #endif /***************************************************************************/ /* * Name conventions: tokens and states are in CAPITALS * operators are capitalized * */ #include #include #include "k.h" #include "yystype.h" #include "kimwy.h" namespace { std::string cinclude(""); int cinit_paren_nesting =0; int cinit_array_nesting =0; void reset_nestcount(); int eat_comment(casestring); void eat_line_comment(); void count(bool = true); } // namespace #define INITIAL 0 #define NORMAL 1 #define INCL 2 #define INCLSTART 3 #define CEXPR 4 #define CEXPRDQ 5 #define CEXPRSQ 6 #define C 7 #define OPNAME 8 #define OPTION 9 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int yylex_destroy (void ); int yyget_debug (void ); void yyset_debug (int debug_flag ); YY_EXTRA_TYPE yyget_extra (void ); void yyset_extra (YY_EXTRA_TYPE user_defined ); FILE *yyget_in (void ); void yyset_in (FILE * in_str ); FILE *yyget_out (void ); void yyset_out (FILE * out_str ); int yyget_leng (void ); char *yyget_text (void ); int yyget_lineno (void ); void yyset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap (void ); #else extern int yywrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int yylex (void); #define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ if ( yyleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (yytext[yyleng - 1] == '\n'); \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif /* Create the reject buffer large enough to save one state per allowed character. */ if ( ! (yy_state_buf) ) (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE ); if ( ! (yy_state_buf) ) YY_FATAL_ERROR( "out of dynamic memory in yylex()" ); if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); (yy_state_ptr) = (yy_state_buf); *(yy_state_ptr)++ = yy_current_state; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 438 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *(yy_state_ptr)++ = yy_current_state; ++yy_cp; } while ( yy_current_state != 437 ); yy_find_action: yy_current_state = *--(yy_state_ptr); (yy_lp) = yy_accept[yy_current_state]; find_rule: /* we branch to this label when backing up */ for ( ; ; ) /* until we find what rule we matched */ { if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] ) { yy_act = yy_acclist[(yy_lp)]; if ( yy_act & YY_TRAILING_HEAD_MASK || (yy_looking_for_trail_begin) ) { if ( yy_act == (yy_looking_for_trail_begin) ) { (yy_looking_for_trail_begin) = 0; yy_act &= ~YY_TRAILING_HEAD_MASK; break; } } else if ( yy_act & YY_TRAILING_MASK ) { (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK; (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK; (yy_full_match) = yy_cp; (yy_full_state) = (yy_state_ptr); (yy_full_lp) = (yy_lp); } else { (yy_full_match) = yy_cp; (yy_full_state) = (yy_state_ptr); (yy_full_lp) = (yy_lp); break; } ++(yy_lp); goto find_rule; } --yy_cp; yy_current_state = *--(yy_state_ptr); (yy_lp) = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { int yyl; for ( yyl = (yy_prev_more_offset); yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) yylineno++; ; } do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 1: /* rule 1 can match eol */ YY_RULE_SETUP { count(false); } YY_BREAK case 2: YY_RULE_SETUP { count(); return T_PERCENTUVIEW; } YY_BREAK case 3: YY_RULE_SETUP { count(); return T_PERCENTUVIEWVAR; } YY_BREAK case 4: YY_RULE_SETUP { count(); return T_PERCENTRVIEW; } YY_BREAK case 5: YY_RULE_SETUP { count(); return T_PERCENTRVIEWVAR; } YY_BREAK case 6: YY_RULE_SETUP { count(); return T_PERCENTSTORAGECLASS; } YY_BREAK case 7: YY_RULE_SETUP { count(); return T_PERCENTLANGUAGE; } YY_BREAK case 8: YY_RULE_SETUP { count(); BEGIN OPTION; } YY_BREAK case 9: YY_RULE_SETUP { count(); BEGIN INCLSTART; return T_INCLUDESTART; } YY_BREAK case 10: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring(yytext); return T_ID; } YY_BREAK case 11: YY_RULE_SETUP { count(false); } YY_BREAK case 12: /* rule 12 can match eol */ YY_RULE_SETUP { count(); cinclude = ""; cinclude.reserve(1024); BEGIN INCL; return T_ENDOFINCLUDESTART; } YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP { count(); cinclude += yytext[0]; } YY_BREAK case 14: YY_RULE_SETUP { count(); v_report(Warning(FileLine(pg_filename, pg_lineno), Problem1S("Opening '%{' (nested C++ includes; preceding closing '%}' not found)"))); cinclude += yytext; } YY_BREAK case 15: /* rule 15 can match eol */ YY_RULE_SETUP { count(); BEGIN NORMAL; yylval.yt_casestring = mkcasestring(cinclude.c_str()); return T_INCLUDEEND; } YY_BREAK case 16: YY_RULE_SETUP { count(); yylval.yt_integer = mkinteger(eat_comment(pg_filename)); return T_CNEWLINES; } YY_BREAK case 17: YY_RULE_SETUP { count(); eat_comment(pg_filename); } YY_BREAK case 18: YY_RULE_SETUP { count(); eat_line_comment(); yylval.yt_integer = mkinteger(1); return T_CNEWLINES; } YY_BREAK case 19: YY_RULE_SETUP { count(); eat_line_comment(); } YY_BREAK case 20: YY_RULE_SETUP { count(); return T_ARROW; } YY_BREAK case 21: YY_RULE_SETUP { count(); return T_PROVIDED; } YY_BREAK case 22: YY_RULE_SETUP { count(); return T_DEFAULT; } YY_BREAK case 23: YY_RULE_SETUP { count(); yylval.yt_integer = mkinteger(atoi(yytext)); return T_INT; } YY_BREAK case 24: YY_RULE_SETUP { count(); return T_LIST; } YY_BREAK case 25: YY_RULE_SETUP { count(); return T_STATIC; } YY_BREAK case 26: YY_RULE_SETUP { count(); return T_AUTO; } YY_BREAK case 27: YY_RULE_SETUP { count(); return T_REGISTER; } YY_BREAK case 28: YY_RULE_SETUP { count(); return T_EXTERN; } YY_BREAK case 29: YY_RULE_SETUP { count(); return T_TYPEDEF; } YY_BREAK case 30: YY_RULE_SETUP { count(); return T_CONST; } YY_BREAK case 31: YY_RULE_SETUP { count(); return T_VOLATILE; } YY_BREAK case 32: YY_RULE_SETUP { count(); return T_UNSIGNED; } YY_BREAK case 33: YY_RULE_SETUP { count(); return T_VIRTUAL; } YY_BREAK case 34: YY_RULE_SETUP { count(); BEGIN OPNAME; return T_OPERATOR; } YY_BREAK case 35: YY_RULE_SETUP { count(); return T_CONSTRUCTOR; } YY_BREAK case 36: YY_RULE_SETUP { count(); return T_DESTRUCTOR; } YY_BREAK case 37: YY_RULE_SETUP { count(); return T_MEMBER; } YY_BREAK case 38: YY_RULE_SETUP { count(); return T_ATTR; } YY_BREAK case 39: YY_RULE_SETUP { count(); return T_BASECLASS; } YY_BREAK case 40: YY_RULE_SETUP { count(); return T_DOTDOTDOT; } YY_BREAK case 41: YY_RULE_SETUP { count(); return T_COLONCOLON; } YY_BREAK case 42: /* rule 42 can match eol */ YY_RULE_SETUP { count(false); } YY_BREAK case 43: YY_RULE_SETUP { count(); BEGIN NORMAL; yylval.yt_casestring = mkcasestring(yytext); return T_OPNAME ; } YY_BREAK case 44: YY_RULE_SETUP { count(); BEGIN NORMAL; yylval.yt_casestring = mkcasestring(yytext); return T_ID ; } YY_BREAK case 45: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring(yytext); return T_ID ; } YY_BREAK case 46: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CEXPRESSION; } YY_BREAK case 47: YY_RULE_SETUP { count(); yylval.yt_integer = mkinteger(atoi(yytext+1)); return T_DOLLARVAR; } YY_BREAK case 48: YY_RULE_SETUP { count(); return T_UNPBLOCKSTART; } YY_BREAK case 49: YY_RULE_SETUP { count(); return T_UNPBLOCKEND; } YY_BREAK case 50: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CEXPRESSION; } YY_BREAK case 51: /* rule 51 can match eol */ YY_RULE_SETUP { count(); return yytext[0]; } YY_BREAK case 52: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring("\\"); return T_CEXPRESSION; } YY_BREAK case 53: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring("\\\\"); return T_CEXPRESSION; } YY_BREAK case 54: YY_RULE_SETUP { count(); BEGIN CEXPRDQ; return yytext[0]; } YY_BREAK case 55: YY_RULE_SETUP { count(); BEGIN CEXPRSQ; return yytext[0]; } YY_BREAK case 56: YY_RULE_SETUP { count(); BEGIN NORMAL; reset_nestcount(); return yytext[0]; } YY_BREAK case 57: YY_RULE_SETUP { count(); return yytext[0]; } YY_BREAK case 58: YY_RULE_SETUP { count(); cinit_paren_nesting++; yylval.yt_casestring = mkcasestring("("); return yytext[0]; } YY_BREAK case 59: YY_RULE_SETUP { count(); if (cinit_paren_nesting == 0) { BEGIN NORMAL; reset_nestcount(); return yytext[0]; } else { cinit_paren_nesting--; yylval.yt_casestring = mkcasestring(")"); return yytext[0]; } } YY_BREAK case 60: YY_RULE_SETUP { count(); cinit_array_nesting++; yylval.yt_casestring = mkcasestring("["); return yytext[0]; } YY_BREAK case 61: YY_RULE_SETUP { count(); if (cinit_array_nesting == 0) { BEGIN NORMAL; reset_nestcount(); return yytext[0]; } else { cinit_array_nesting--; yylval.yt_casestring = mkcasestring("]"); return yytext[0]; } } YY_BREAK case 62: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CEXPRESSION; } YY_BREAK case 63: YY_RULE_SETUP { count(); BEGIN CEXPR; return yytext[0]; } YY_BREAK case 64: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring("\\\""); return T_CEXPRESSION; } YY_BREAK case 65: YY_RULE_SETUP { count(); BEGIN CEXPR; return yytext[0]; } YY_BREAK case 66: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring("\\'"); return T_CEXPRESSION; } YY_BREAK case 67: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CEXPRESSION; } YY_BREAK case 68: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring("$"); return T_CLINE; } YY_BREAK case 69: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring("\\\\"); return T_CLINE; } YY_BREAK case 70: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring("\\"); return T_CLINE ; } YY_BREAK case 71: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring("{"); /*WARNING-NO LONGER SUPPORTED*/ return T_CLINE ; } YY_BREAK case 72: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring("}"); /*WARNING-NO LONGER SUPPORTED*/ return T_CLINE ; } YY_BREAK case 73: YY_RULE_SETUP { count(); if (strcmp(yytext, "$") == 0) return yytext[0]; yylval.yt_integer = mkinteger(atoi(yytext+1)); return T_DOLLARVAR; } YY_BREAK case 74: /* rule 74 can match eol */ YY_RULE_SETUP { count(); return T_FOREACH_AFTER; } YY_BREAK case 75: YY_RULE_SETUP { count(); if (strcmp(yytext, "foreach") ==0) { return T_FOREACH; } else if (strcmp(yytext, "afterforeach") ==0) { return T_FOREACH_AFTER; } else if (strcmp(yytext, "with") ==0) { return T_WITH; } else { yylval.yt_casestring = mkcasestring(yytext); return T_CLINE ; } } YY_BREAK case 76: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CLINE; } YY_BREAK case 77: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CLINE; } YY_BREAK case 78: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CLINE; } YY_BREAK case 79: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CLINE; } YY_BREAK case 80: YY_RULE_SETUP { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CLINE; } YY_BREAK case 81: YY_RULE_SETUP { count(); return yytext[0]; } YY_BREAK case 82: YY_RULE_SETUP { count(false); } YY_BREAK case 83: /* rule 83 can match eol */ YY_RULE_SETUP { count(false); BEGIN NORMAL; } YY_BREAK case 84: YY_RULE_SETUP { count(); if (g_options.for_bison!="" && g_options.for_bison!="yystype.h") v_report(Warning(FileLine(pg_filename, pg_lineno), Problem2S("Name of yystype header is set to ", g_options.for_bison.c_str()))); else g_options.for_bison="yystype.h"; } YY_BREAK case 85: YY_RULE_SETUP { count(); g_options.no_csgio=true; } YY_BREAK case 86: YY_RULE_SETUP { count(); g_options.no_unparse=true; } YY_BREAK case 87: YY_RULE_SETUP { count(); g_options.no_rewrite=true; } YY_BREAK case 88: YY_RULE_SETUP { count(); g_options.no_printdot=true; } YY_BREAK case 89: YY_RULE_SETUP { count(); g_options.no_hashtables=true; } YY_BREAK case 90: YY_RULE_SETUP { count(); g_options.smart_pointer=true; } YY_BREAK case 91: YY_RULE_SETUP { count(); g_options.smart_pointer=true; g_options.weak_pointer=true; } YY_BREAK case 92: YY_RULE_SETUP { count(); return yytext[0]; } YY_BREAK case 93: YY_RULE_SETUP ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(NORMAL): case YY_STATE_EOF(INCL): case YY_STATE_EOF(INCLSTART): case YY_STATE_EOF(CEXPR): case YY_STATE_EOF(CEXPRDQ): case YY_STATE_EOF(CEXPRSQ): case YY_STATE_EOF(C): case YY_STATE_EOF(OPNAME): case YY_STATE_EOF(OPTION): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart(yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); (yy_state_ptr) = (yy_state_buf); *(yy_state_ptr)++ = yy_current_state; for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 438 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *(yy_state_ptr)++ = yy_current_state; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register YY_CHAR yy_c = 1; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 438 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 437); if ( ! yy_is_jam ) *(yy_state_ptr)++ = yy_current_state; return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; if ( c == '\n' ){ --yylineno; } (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart(yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol ) yylineno++; ; return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_init_buffer(YY_CURRENT_BUFFER,input_file ); yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree((void *) b->yy_ch_buf ); yyfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; yyensure_buffer_stack(); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void yyensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { return yy_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int yyget_lineno (void) { return yylineno; } /** Get the input stream. * */ FILE *yyget_in (void) { return yyin; } /** Get the output stream. * */ FILE *yyget_out (void) { return yyout; } /** Get the length of the current token. * */ int yyget_leng (void) { return yyleng; } /** Get the current token. * */ char *yyget_text (void) { return yytext; } /** Set the current line number. * @param line_number * */ void yyset_lineno (int line_number ) { yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see yy_switch_to_buffer */ void yyset_in (FILE * in_str ) { yyin = in_str ; } void yyset_out (FILE * out_str ) { yyout = out_str ; } int yyget_debug (void) { return yy_flex_debug; } void yyset_debug (int bdebug ) { yy_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ /* We do not touch yylineno unless the option is enabled. */ yylineno = 1; (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; (yy_state_buf) = 0; (yy_state_ptr) = 0; (yy_full_match) = 0; (yy_lp) = 0; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * yylex_init() */ return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; yyfree ( (yy_state_buf) ); (yy_state_buf) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size ) { return (void *) malloc( size ); } void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void yyfree (void * ptr ) { free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" void do_NORMAL() { BEGIN NORMAL; reset_nestcount(); } void do_CEXPR() { BEGIN CEXPR; } void do_CEXPRDQ() { BEGIN CEXPRDQ; } void do_CEXPRSQ() { BEGIN CEXPRSQ; } void do_C() { BEGIN C; } namespace { void reset_nestcount() { /* WARNING if these are not == 0 */ if (cinit_paren_nesting != 0) { v_report( NonFatal( PosNoFileLine(), Problem1S( "opening parenthesis '(' was not closed" ))); } if (cinit_array_nesting != 0) { v_report( NonFatal( PosNoFileLine(), Problem1S( "opening bracket '[' was not closed" ))); } cinit_paren_nesting = 0; cinit_array_nesting = 0; } int eat_comment(casestring start_filename) { char c1, c2; /* comment string */ int nest; int start_lineno = pg_lineno; for(nest=1, c2 = ' ';;){ c1 = c2; c2 = yyinput(); if (c2 == '\n') { pg_lineno++; pg_column = 0; pg_charpos ++; } else if (c2 == '\t') { pg_column += 8 - (pg_column % 8); pg_charpos += 8 - (pg_charpos % 8); } else if (c2 == 0) { v_report( Fatal( FileLine( start_filename, start_lineno ), Problem1S( "start of comment containing unexpected eof" ))); } else { pg_column++; pg_charpos ++; } if (c1 == '/' && c2 == '*') nest++; else if (c1 == '*' && c2 == '/') nest--; if (nest <= 0) break; } return pg_lineno - start_lineno; } void eat_line_comment() { while (yyinput()!='\n') ; pg_lineno++; pg_column = 0; pg_charpos++; } void count(bool notwhite) { register char *s; #ifdef MYLEXDEBUG if (notwhite) printf ("symbol found: %s\n", yytext); #endif for (s = yytext; *s; s++) if (*s == '\n') { pg_column = 0; pg_lineno++; pg_charpos++; } else if (*s == '\t') { pg_column += 8 - (pg_column % 8); pg_charpos += 8 - (pg_charpos % 8); } else { pg_column++; pg_charpos++; } } } // namespace // vim:sts=4:ts=8:cino=g0,t0,\:0 kimwitu++-2.3.13/src/Gen.boot/rk.cc0000644000175000017500000042065111135163773015341 0ustar useruser/* translation of file(s) "abs.k" "main.k" "parse.k" "error.k" "occur.k" "util.k" "gen.k" "gutil.k" "pat.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #define KC_REWRITE #include #include #include #include "k.h" #include "rk.h" namespace kc { base_rview_class base_rview; impl_rviews rviews[] = { {"base_rview",&base_rview}, {0,0} }; } // namespace kc namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // /* end included stuff */ namespace kc { #ifndef KC_TRACE_PROVIDED #define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND #endif #ifndef KC_TRACE_REWRITE_MATCH #define KC_TRACE_REWRITE_MATCH(VIEW,FILE,LINE,NODE) #endif #ifndef KC_TRACE_REWRITE_RESULT #define KC_TRACE_REWRITE_RESULT(VIEW,FILE,LINE,NODE) #endif uniqID impl_uniqID_Str::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1)) return this; else { impl_uniqID_Str* kc_result= Str(l_casestring_1); kc_result->rewrite_members(this); return kc_result; } } ID impl_ID_Id::rewrite(rview kc_current_view_base) { uniqID l_uniqID_1 = uniqID_1->rewrite(kc_current_view_base); if ((l_uniqID_1 == uniqID_1)) return this; else { impl_ID_Id* kc_result= Id(l_uniqID_1); kc_result->rewrite_members(this); return kc_result; } } INT impl_INT_Int::rewrite(rview kc_current_view_base) { integer l_integer_1 = integer_1->rewrite(kc_current_view_base); if ((l_integer_1 == integer_1)) return this; else { impl_INT_Int* kc_result= Int(l_integer_1); kc_result->rewrite_members(this); return kc_result; } } STRING impl_STRING_String::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1)) return this; else { impl_STRING_String* kc_result= String(l_casestring_1); kc_result->rewrite_members(this); return kc_result; } } phylumdeclarationsroot impl_phylumdeclarationsroot_PhylumDeclarations::rewrite(rview kc_current_view_base) { phylumdeclarations l_phylumdeclarations_1 = phylumdeclarations_1->rewrite(kc_current_view_base); if ((l_phylumdeclarations_1 == phylumdeclarations_1)) return this; else { impl_phylumdeclarationsroot_PhylumDeclarations* kc_result= PhylumDeclarations(l_phylumdeclarations_1); kc_result->rewrite_members(this); return kc_result; } } phylumdeclarations impl_phylumdeclarations::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons phylumdeclaration l_phylumdeclaration_1 = phylumdeclaration_1->rewrite(kc_current_view_base); phylumdeclarations l_phylumdeclarations_1 = phylumdeclarations_1->rewrite(kc_current_view_base); if ((l_phylumdeclaration_1 == phylumdeclaration_1) && (l_phylumdeclarations_1 == phylumdeclarations_1)) return this; else { impl_phylumdeclarations* kc_result= Consphylumdeclarations(l_phylumdeclaration_1, l_phylumdeclarations_1); kc_result->rewrite_members(this); return kc_result; } } } phylumnames impl_phylumnames::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ID l_ID_1 = ID_1->rewrite(kc_current_view_base); phylumnames l_phylumnames_1 = phylumnames_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_phylumnames_1 == phylumnames_1)) return this; else { impl_phylumnames* kc_result= Consphylumnames(l_ID_1, l_phylumnames_1); kc_result->rewrite_members(this); return kc_result; } } } phylumdeclaration impl_phylumdeclaration_PhylumDeclaration::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); storageoption l_storageoption_1 = storageoption_1->rewrite(kc_current_view_base); productionblock l_productionblock_1 = productionblock_1->rewrite(kc_current_view_base); Ccode_option l_Ccode_option_1 = Ccode_option_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_storageoption_1 == storageoption_1) && (l_productionblock_1 == productionblock_1) && (l_Ccode_option_1 == Ccode_option_1)) return this; else { impl_phylumdeclaration_PhylumDeclaration* kc_result= PhylumDeclaration(l_ID_1, l_storageoption_1, l_productionblock_1, l_Ccode_option_1); kc_result->rewrite_members(this); return kc_result; } } storageoption impl_storageoption_PositiveStorageOption::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1)) return this; else { impl_storageoption_PositiveStorageOption* kc_result= PositiveStorageOption(l_ID_1); kc_result->rewrite_members(this); return kc_result; } } storageoption impl_storageoption_NegativeStorageOption::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1)) return this; else { impl_storageoption_NegativeStorageOption* kc_result= NegativeStorageOption(l_ID_1); kc_result->rewrite_members(this); return kc_result; } } storageoption impl_storageoption_NoStorageOption::rewrite(rview kc_current_view_base) { return this; } storageclasses impl_storageclasses::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ID l_ID_1 = ID_1->rewrite(kc_current_view_base); storageclasses l_storageclasses_1 = storageclasses_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_storageclasses_1 == storageclasses_1)) return this; else { impl_storageclasses* kc_result= Consstorageclasses(l_ID_1, l_storageclasses_1); kc_result->rewrite_members(this); return kc_result; } } } productionblock impl_productionblock_PredefinedAlternatives::rewrite(rview kc_current_view_base) { alternatives l_alternatives_1 = alternatives_1->rewrite(kc_current_view_base); if ((l_alternatives_1 == alternatives_1)) return this; else { impl_productionblock_PredefinedAlternatives* kc_result= PredefinedAlternatives(l_alternatives_1); kc_result->rewrite_members(this); return kc_result; } } productionblock impl_productionblock_NonlistAlternatives::rewrite(rview kc_current_view_base) { alternatives l_alternatives_1 = alternatives_1->rewrite(kc_current_view_base); if ((l_alternatives_1 == alternatives_1)) return this; else { impl_productionblock_NonlistAlternatives* kc_result= NonlistAlternatives(l_alternatives_1); kc_result->rewrite_members(this); return kc_result; } } productionblock impl_productionblock_ListAlternatives::rewrite(rview kc_current_view_base) { alternatives l_alternatives_1 = alternatives_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_alternatives_1 == alternatives_1) && (l_ID_1 == ID_1)) return this; else { impl_productionblock_ListAlternatives* kc_result= ListAlternatives(l_alternatives_1, l_ID_1); kc_result->rewrite_members(this); return kc_result; } } productionblock impl_productionblock_Emptyproductionblock::rewrite(rview kc_current_view_base) { return this; } alternatives impl_alternatives::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons alternative l_alternative_1 = alternative_1->rewrite(kc_current_view_base); alternatives l_alternatives_1 = alternatives_1->rewrite(kc_current_view_base); if ((l_alternative_1 == alternative_1) && (l_alternatives_1 == alternatives_1)) return this; else { impl_alternatives* kc_result= Consalternatives(l_alternative_1, l_alternatives_1); kc_result->rewrite_members(this); return kc_result; } } } alternative impl_alternative_Alternative::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); arguments l_arguments_1 = arguments_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_arguments_1 == arguments_1)) return this; else { impl_alternative_Alternative* kc_result= Alternative(l_ID_1, l_arguments_1); kc_result->rewrite_members(this); return kc_result; } } arguments impl_arguments::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ID l_ID_1 = ID_1->rewrite(kc_current_view_base); arguments l_arguments_1 = arguments_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_arguments_1 == arguments_1)) return this; else { impl_arguments* kc_result= Consarguments(l_ID_1, l_arguments_1); kc_result->rewrite_members(this); return kc_result; } } } argument impl_argument_Argument::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); integer l_integer_1 = integer_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_integer_1 == integer_1)) return this; else { impl_argument_Argument* kc_result= Argument(l_ID_1, l_integer_1); kc_result->rewrite_members(this); return kc_result; } } Ccode_option impl_Ccode_option_CcodeOption::rewrite(rview kc_current_view_base) { attributes l_attributes_1 = attributes_1->rewrite(kc_current_view_base); Ctexts l_Ctexts_1 = Ctexts_1->rewrite(kc_current_view_base); if ((l_attributes_1 == attributes_1) && (l_Ctexts_1 == Ctexts_1)) return this; else { impl_Ccode_option_CcodeOption* kc_result= CcodeOption(l_attributes_1, l_Ctexts_1); kc_result->rewrite_members(this); return kc_result; } } attributes impl_attributes::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons attribute l_attribute_1 = attribute_1->rewrite(kc_current_view_base); attributes l_attributes_1 = attributes_1->rewrite(kc_current_view_base); if ((l_attribute_1 == attribute_1) && (l_attributes_1 == attributes_1)) return this; else { impl_attributes* kc_result= Consattributes(l_attribute_1, l_attributes_1); kc_result->rewrite_members(this); return kc_result; } } } attribute impl_attribute_Attribute::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); ID l_ID_2 = ID_2->rewrite(kc_current_view_base); attribute_initialisation_option l_attribute_initialisation_option_1 = attribute_initialisation_option_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_ID_2 == ID_2) && (l_attribute_initialisation_option_1 == attribute_initialisation_option_1)) return this; else { impl_attribute_Attribute* kc_result= Attribute(l_ID_1, l_ID_2, l_attribute_initialisation_option_1); kc_result->rewrite_members(this); return kc_result; } } attribute_initialisation_option impl_attribute_initialisation_option_Yesattribute_initialisation::rewrite(rview kc_current_view_base) { Cexpression l_Cexpression_1 = Cexpression_1->rewrite(kc_current_view_base); if ((l_Cexpression_1 == Cexpression_1)) return this; else { impl_attribute_initialisation_option_Yesattribute_initialisation* kc_result= Yesattribute_initialisation(l_Cexpression_1); kc_result->rewrite_members(this); return kc_result; } } attribute_initialisation_option impl_attribute_initialisation_option_Noattribute_initialisation::rewrite(rview kc_current_view_base) { return this; } Cexpression impl_Cexpression::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons Cexpression_elem l_Cexpression_elem_1 = Cexpression_elem_1->rewrite(kc_current_view_base); Cexpression l_Cexpression_1 = Cexpression_1->rewrite(kc_current_view_base); if ((l_Cexpression_elem_1 == Cexpression_elem_1) && (l_Cexpression_1 == Cexpression_1)) return this; else { impl_Cexpression* kc_result= ConsCexpression(l_Cexpression_elem_1, l_Cexpression_1); kc_result->rewrite_members(this); return kc_result; } } } Cexpression_elem impl_Cexpression_elem_CExpressionArray::rewrite(rview kc_current_view_base) { Cexpression l_Cexpression_1 = Cexpression_1->rewrite(kc_current_view_base); if ((l_Cexpression_1 == Cexpression_1)) return this; else { impl_Cexpression_elem_CExpressionArray* kc_result= CExpressionArray(l_Cexpression_1); kc_result->rewrite_members(this); return kc_result; } } Cexpression_elem impl_Cexpression_elem_CExpressionPack::rewrite(rview kc_current_view_base) { Cexpression l_Cexpression_1 = Cexpression_1->rewrite(kc_current_view_base); if ((l_Cexpression_1 == Cexpression_1)) return this; else { impl_Cexpression_elem_CExpressionPack* kc_result= CExpressionPack(l_Cexpression_1); kc_result->rewrite_members(this); return kc_result; } } Cexpression_elem impl_Cexpression_elem_CExpressionSQ::rewrite(rview kc_current_view_base) { CexpressionSQ l_CexpressionSQ_1 = CexpressionSQ_1->rewrite(kc_current_view_base); if ((l_CexpressionSQ_1 == CexpressionSQ_1)) return this; else { impl_Cexpression_elem_CExpressionSQ* kc_result= CExpressionSQ(l_CexpressionSQ_1); kc_result->rewrite_members(this); return kc_result; } } Cexpression_elem impl_Cexpression_elem_CExpressionDQ::rewrite(rview kc_current_view_base) { CexpressionDQ l_CexpressionDQ_1 = CexpressionDQ_1->rewrite(kc_current_view_base); if ((l_CexpressionDQ_1 == CexpressionDQ_1)) return this; else { impl_Cexpression_elem_CExpressionDQ* kc_result= CExpressionDQ(l_CexpressionDQ_1); kc_result->rewrite_members(this); return kc_result; } } Cexpression_elem impl_Cexpression_elem_CExpressionNl::rewrite(rview kc_current_view_base) { return this; } Cexpression_elem impl_Cexpression_elem_CExpressionDollarvar::rewrite(rview kc_current_view_base) { INT l_INT_1 = INT_1->rewrite(kc_current_view_base); if ((l_INT_1 == INT_1)) return this; else { impl_Cexpression_elem_CExpressionDollarvar* kc_result= CExpressionDollarvar(l_INT_1); kc_result->rewrite_members(this); return kc_result; } } Cexpression_elem impl_Cexpression_elem_CExpressionPart::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1)) return this; else { impl_Cexpression_elem_CExpressionPart* kc_result= CExpressionPart(l_casestring_1); kc_result->rewrite_members(this); return kc_result; } } CexpressionDQ impl_CexpressionDQ::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons CexpressionDQ_elem l_CexpressionDQ_elem_1 = CexpressionDQ_elem_1->rewrite(kc_current_view_base); CexpressionDQ l_CexpressionDQ_1 = CexpressionDQ_1->rewrite(kc_current_view_base); if ((l_CexpressionDQ_elem_1 == CexpressionDQ_elem_1) && (l_CexpressionDQ_1 == CexpressionDQ_1)) return this; else { impl_CexpressionDQ* kc_result= ConsCexpressionDQ(l_CexpressionDQ_elem_1, l_CexpressionDQ_1); kc_result->rewrite_members(this); return kc_result; } } } CexpressionDQ_elem impl_CexpressionDQ_elem_CExpressionDQNl::rewrite(rview kc_current_view_base) { return this; } CexpressionDQ_elem impl_CexpressionDQ_elem_CExpressionDQPart::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1)) return this; else { impl_CexpressionDQ_elem_CExpressionDQPart* kc_result= CExpressionDQPart(l_casestring_1); kc_result->rewrite_members(this); return kc_result; } } CexpressionSQ impl_CexpressionSQ::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons CexpressionSQ_elem l_CexpressionSQ_elem_1 = CexpressionSQ_elem_1->rewrite(kc_current_view_base); CexpressionSQ l_CexpressionSQ_1 = CexpressionSQ_1->rewrite(kc_current_view_base); if ((l_CexpressionSQ_elem_1 == CexpressionSQ_elem_1) && (l_CexpressionSQ_1 == CexpressionSQ_1)) return this; else { impl_CexpressionSQ* kc_result= ConsCexpressionSQ(l_CexpressionSQ_elem_1, l_CexpressionSQ_1); kc_result->rewrite_members(this); return kc_result; } } } CexpressionSQ_elem impl_CexpressionSQ_elem_CExpressionSQNl::rewrite(rview kc_current_view_base) { return this; } CexpressionSQ_elem impl_CexpressionSQ_elem_CExpressionSQPart::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1)) return this; else { impl_CexpressionSQ_elem_CExpressionSQPart* kc_result= CExpressionSQPart(l_casestring_1); kc_result->rewrite_members(this); return kc_result; } } idCexpressions impl_idCexpressions::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons idCexpression l_idCexpression_1 = idCexpression_1->rewrite(kc_current_view_base); idCexpressions l_idCexpressions_1 = idCexpressions_1->rewrite(kc_current_view_base); if ((l_idCexpression_1 == idCexpression_1) && (l_idCexpressions_1 == idCexpressions_1)) return this; else { impl_idCexpressions* kc_result= ConsidCexpressions(l_idCexpression_1, l_idCexpressions_1); kc_result->rewrite_members(this); return kc_result; } } } idCexpression impl_idCexpression_IdCexpression::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); Cexpression l_Cexpression_1 = Cexpression_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_Cexpression_1 == Cexpression_1)) return this; else { impl_idCexpression_IdCexpression* kc_result= IdCexpression(l_ID_1, l_Cexpression_1); kc_result->rewrite_members(this); return kc_result; } } Ctexts impl_Ctexts::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons Ctext l_Ctext_1 = Ctext_1->rewrite(kc_current_view_base); Ctexts l_Ctexts_1 = Ctexts_1->rewrite(kc_current_view_base); if ((l_Ctext_1 == Ctext_1) && (l_Ctexts_1 == Ctexts_1)) return this; else { impl_Ctexts* kc_result= ConsCtexts(l_Ctext_1, l_Ctexts_1); kc_result->rewrite_members(this); return kc_result; } } } includefiles impl_includefiles::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons includefile l_includefile_1 = includefile_1->rewrite(kc_current_view_base); includefiles l_includefiles_1 = includefiles_1->rewrite(kc_current_view_base); if ((l_includefile_1 == includefile_1) && (l_includefiles_1 == includefiles_1)) return this; else { impl_includefiles* kc_result= Consincludefiles(l_includefile_1, l_includefiles_1); kc_result->rewrite_members(this); return kc_result; } } } includefile impl_includefile_IncludeFile::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1)) return this; else { impl_includefile_IncludeFile* kc_result= IncludeFile(l_casestring_1); kc_result->rewrite_members(this); return kc_result; } } includedeclarations impl_includedeclarations::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons includedeclaration l_includedeclaration_1 = includedeclaration_1->rewrite(kc_current_view_base); includedeclarations l_includedeclarations_1 = includedeclarations_1->rewrite(kc_current_view_base); if ((l_includedeclaration_1 == includedeclaration_1) && (l_includedeclarations_1 == includedeclarations_1)) return this; else { impl_includedeclarations* kc_result= Consincludedeclarations(l_includedeclaration_1, l_includedeclarations_1); kc_result->rewrite_members(this); return kc_result; } } } includedeclaration impl_includedeclaration_IncludeDeclaration::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1)) return this; else { impl_includedeclaration_IncludeDeclaration* kc_result= IncludeDeclaration(l_casestring_1); kc_result->rewrite_members(this); return kc_result; } } rwdeclarations impl_rwdeclarations::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons rwdeclaration l_rwdeclaration_1 = rwdeclaration_1->rewrite(kc_current_view_base); rwdeclarations l_rwdeclarations_1 = rwdeclarations_1->rewrite(kc_current_view_base); if ((l_rwdeclaration_1 == rwdeclaration_1) && (l_rwdeclarations_1 == rwdeclarations_1)) return this; else { impl_rwdeclarations* kc_result= Consrwdeclarations(l_rwdeclaration_1, l_rwdeclarations_1); kc_result->rewrite_members(this); return kc_result; } } } rwdeclaration impl_rwdeclaration_RwDeclaration::rewrite(rview kc_current_view_base) { outmostpatterns l_outmostpatterns_1 = outmostpatterns_1->rewrite(kc_current_view_base); rewriteclauses l_rewriteclauses_1 = rewriteclauses_1->rewrite(kc_current_view_base); if ((l_outmostpatterns_1 == outmostpatterns_1) && (l_rewriteclauses_1 == rewriteclauses_1)) return this; else { impl_rwdeclaration_RwDeclaration* kc_result= RwDeclaration(l_outmostpatterns_1, l_rewriteclauses_1); kc_result->rewrite_members(this); return kc_result; } } rewriteclauses impl_rewriteclauses::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons rewriteclause l_rewriteclause_1 = rewriteclause_1->rewrite(kc_current_view_base); rewriteclauses l_rewriteclauses_1 = rewriteclauses_1->rewrite(kc_current_view_base); if ((l_rewriteclause_1 == rewriteclause_1) && (l_rewriteclauses_1 == rewriteclauses_1)) return this; else { impl_rewriteclauses* kc_result= Consrewriteclauses(l_rewriteclause_1, l_rewriteclauses_1); kc_result->rewrite_members(this); return kc_result; } } } rewriteclause impl_rewriteclause_RewriteClause::rewrite(rview kc_current_view_base) { viewnames l_viewnames_1 = viewnames_1->rewrite(kc_current_view_base); term l_term_1 = term_1->rewrite(kc_current_view_base); if ((l_viewnames_1 == viewnames_1) && (l_term_1 == term_1)) return this; else { impl_rewriteclause_RewriteClause* kc_result= RewriteClause(l_viewnames_1, l_term_1); kc_result->rewrite_members(this); return kc_result; } } patternchains impl_patternchains::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons patternchain l_patternchain_1 = patternchain_1->rewrite(kc_current_view_base); patternchains l_patternchains_1 = patternchains_1->rewrite(kc_current_view_base); switch(kc_current_view_base) { default: case base_rview_enum: { base_rview_class& kc_current_view=static_cast(kc_current_view_base); if ((l_patternchain_1->prod_sel() == sel_Conspatternchain) && ((l_patternchain_1)->patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && ((l_patternchain_1)->patternchain_1->prod_sel() == sel_Nilpatternchain) && (l_patternchains_1->prod_sel() == sel_Nilpatternchains)) { KC_TRACE_REWRITE_MATCH(kc_current_view, "util.k", 341, this); const patternchains P_pcs = phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1; patternchains kc_result = P_pcs; KC_TRACE_REWRITE_RESULT(kc_current_view,"util.k",342,kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); } else if ((l_patternchain_1->prod_sel() == sel_Conspatternchain) && ((l_patternchain_1)->patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && ((l_patternchain_1)->patternchain_1->prod_sel() == sel_Nilpatternchain) && (l_patternchains_1->prod_sel() == sel_Conspatternchains)) { KC_TRACE_REWRITE_MATCH(kc_current_view, "util.k", 352, this); const patternchains P_pcs = phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1; const patternchains Q_pcs = l_patternchains_1; patternchains kc_result = concat(P_pcs, Q_pcs); KC_TRACE_REWRITE_RESULT(kc_current_view,"util.k",353,kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); } else break; } } if ((l_patternchain_1 == patternchain_1) && (l_patternchains_1 == patternchains_1)) return this; else { impl_patternchains* kc_result= Conspatternchains(l_patternchain_1, l_patternchains_1); kc_result->rewrite_members(this); return kc_result; } } } patternchain impl_patternchain::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons patternchainitem l_patternchainitem_1 = patternchainitem_1->rewrite(kc_current_view_base); patternchain l_patternchain_1 = patternchain_1->rewrite(kc_current_view_base); switch(kc_current_view_base) { default: case base_rview_enum: { base_rview_class& kc_current_view=static_cast(kc_current_view_base); if ((l_patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && (phylum_cast(l_patternchainitem_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && (l_patternchain_1->prod_sel() == sel_Conspatternchain) && ((l_patternchain_1)->patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && (phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1)->patternchains_1->prod_sel() == sel_Nilpatternchains) && ((l_patternchain_1)->patternchain_1->prod_sel() == sel_Nilpatternchain)) { KC_TRACE_REWRITE_MATCH(kc_current_view, "util.k", 277, this); const patternchain h_pc = (phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchain_1; const patternchains T_pcs = (phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchains_1; const patternchain Y_pc = (phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1)->patternchain_1; patternchain kc_result = Conspatternchain(PatternchainitemGroup(Conspatternchains(concat(h_pc, Y_pc), Conspatternchains(Conspatternchain(PatternchainitemGroup(T_pcs), Y_pc), Nilpatternchains()))), Nilpatternchain()); KC_TRACE_REWRITE_RESULT(kc_current_view,"util.k",297,kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); } else if ((l_patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && (phylum_cast(l_patternchainitem_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && (l_patternchain_1->prod_sel() == sel_Conspatternchain) && ((l_patternchain_1)->patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && (phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((l_patternchain_1)->patternchain_1->prod_sel() == sel_Nilpatternchain)) { KC_TRACE_REWRITE_MATCH(kc_current_view, "util.k", 287, this); const patternchain h_pc = (phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchain_1; const patternchains T_pcs = (phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchains_1; const patternchain Y_pc = l_patternchain_1; patternchain kc_result = Conspatternchain(PatternchainitemGroup(Conspatternchains(concat(h_pc, Y_pc), Conspatternchains(Conspatternchain(PatternchainitemGroup(T_pcs), Y_pc), Nilpatternchains()))), Nilpatternchain()); KC_TRACE_REWRITE_RESULT(kc_current_view,"util.k",297,kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); } else if ((l_patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && (phylum_cast(l_patternchainitem_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchains_1->prod_sel() == sel_Nilpatternchains) && (l_patternchain_1->prod_sel() == sel_Conspatternchain) && ((l_patternchain_1)->patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && (phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1)->patternchains_1->prod_sel() == sel_Nilpatternchains) && ((l_patternchain_1)->patternchain_1->prod_sel() == sel_Nilpatternchain)) { KC_TRACE_REWRITE_MATCH(kc_current_view, "util.k", 365, this); const patternchain P_pc = (phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchain_1; const patternchain Q_pc = (phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1)->patternchain_1; patternchain kc_result = concat(P_pc, Q_pc); KC_TRACE_REWRITE_RESULT(kc_current_view,"util.k",366,kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); } else if ((l_patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && (phylum_cast(l_patternchainitem_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchains_1->prod_sel() == sel_Nilpatternchains) && (l_patternchain_1->prod_sel() == sel_Conspatternchain) && ((l_patternchain_1)->patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && (phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((l_patternchain_1)->patternchain_1->prod_sel() == sel_Nilpatternchain)) { KC_TRACE_REWRITE_MATCH(kc_current_view, "util.k", 377, this); const patternchain P_pc = (phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchain_1; const patternchain Q_pc = l_patternchain_1; patternchain kc_result = concat(P_pc, Q_pc); KC_TRACE_REWRITE_RESULT(kc_current_view,"util.k",378,kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); } else if ((l_patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && (phylum_cast(l_patternchainitem_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && (l_patternchain_1->prod_sel() == sel_Conspatternchain)) { KC_TRACE_REWRITE_MATCH(kc_current_view, "util.k", 283, this); const patternchain h_pc = (phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchain_1; const patternchains T_pcs = (phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchains_1; const patternchain Y_pc = l_patternchain_1; patternchain kc_result = Conspatternchain(PatternchainitemGroup(Conspatternchains(concat(h_pc, Y_pc), Conspatternchains(Conspatternchain(PatternchainitemGroup(T_pcs), Y_pc), Nilpatternchains()))), Nilpatternchain()); KC_TRACE_REWRITE_RESULT(kc_current_view,"util.k",297,kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); } else if ((l_patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && (phylum_cast(l_patternchainitem_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchains_1->prod_sel() == sel_Nilpatternchains) && (l_patternchain_1->prod_sel() == sel_Conspatternchain)) { KC_TRACE_REWRITE_MATCH(kc_current_view, "util.k", 373, this); const patternchain P_pc = (phylum_cast(l_patternchainitem_1)->patternchains_1)->patternchain_1; const patternchain Q_pc = l_patternchain_1; patternchain kc_result = concat(P_pc, Q_pc); KC_TRACE_REWRITE_RESULT(kc_current_view,"util.k",378,kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); } else if ((l_patternchain_1->prod_sel() == sel_Conspatternchain) && ((l_patternchain_1)->patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && (phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((l_patternchain_1)->patternchain_1->prod_sel() == sel_Nilpatternchain)) { KC_TRACE_REWRITE_MATCH(kc_current_view, "util.k", 306, this); const patternchainitem p = l_patternchainitem_1; const patternchain h_pc = (phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1)->patternchain_1; const patternchains T_pcs = (phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1)->patternchains_1; patternchain kc_result = Conspatternchain(PatternchainitemGroup(Conspatternchains(Conspatternchain(p, h_pc), Conspatternchains(Conspatternchain(p, Conspatternchain(PatternchainitemGroup(T_pcs), Nilpatternchain())), Nilpatternchains()))), Nilpatternchain()); KC_TRACE_REWRITE_RESULT(kc_current_view,"util.k",321,kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); } else if ((l_patternchain_1->prod_sel() == sel_Conspatternchain) && ((l_patternchain_1)->patternchainitem_1->prod_sel() == sel_PatternchainitemGroup) && (phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1->prod_sel() == sel_Conspatternchains) && ((phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1)->patternchains_1->prod_sel() == sel_Nilpatternchains) && ((l_patternchain_1)->patternchain_1->prod_sel() == sel_Nilpatternchain)) { KC_TRACE_REWRITE_MATCH(kc_current_view, "util.k", 387, this); const patternchainitem p = l_patternchainitem_1; const patternchain P_pc = (phylum_cast((l_patternchain_1)->patternchainitem_1)->patternchains_1)->patternchain_1; patternchain kc_result = Conspatternchain(p, P_pc); KC_TRACE_REWRITE_RESULT(kc_current_view,"util.k",388,kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); } else break; } } if ((l_patternchainitem_1 == patternchainitem_1) && (l_patternchain_1 == patternchain_1)) return this; else { impl_patternchain* kc_result= Conspatternchain(l_patternchainitem_1, l_patternchain_1); kc_result->rewrite_members(this); return kc_result; } } } outmostpatterns impl_outmostpatterns::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons outmostpattern l_outmostpattern_1 = outmostpattern_1->rewrite(kc_current_view_base); outmostpatterns l_outmostpatterns_1 = outmostpatterns_1->rewrite(kc_current_view_base); if ((l_outmostpattern_1 == outmostpattern_1) && (l_outmostpatterns_1 == outmostpatterns_1)) return this; else { impl_outmostpatterns* kc_result= Consoutmostpatterns(l_outmostpattern_1, l_outmostpatterns_1); kc_result->rewrite_members(this); return kc_result; } } } patternchainitem impl_patternchainitem_PatternchainitemDollarid::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1)) return this; else { impl_patternchainitem_PatternchainitemDollarid* kc_result= PatternchainitemDollarid(l_ID_1); kc_result->rewrite_members(this); return kc_result; } } patternchainitem impl_patternchainitem_PatternchainitemGroup::rewrite(rview kc_current_view_base) { patternchains l_patternchains_1 = patternchains_1->rewrite(kc_current_view_base); switch(kc_current_view_base) { default: case base_rview_enum: { base_rview_class& kc_current_view=static_cast(kc_current_view_base); if ((l_patternchains_1->prod_sel() == sel_Conspatternchains) && ((l_patternchains_1)->patternchain_1->prod_sel() == sel_Conspatternchain) && (((l_patternchains_1)->patternchain_1)->patternchain_1->prod_sel() == sel_Nilpatternchain) && ((l_patternchains_1)->patternchains_1->prod_sel() == sel_Nilpatternchains)) { KC_TRACE_REWRITE_MATCH(kc_current_view, "util.k", 330, this); const patternchainitem h_p = ((l_patternchains_1)->patternchain_1)->patternchainitem_1; patternchainitem kc_result = h_p; KC_TRACE_REWRITE_RESULT(kc_current_view,"util.k",331,kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); } else break; } } if ((l_patternchains_1 == patternchains_1)) return this; else { impl_patternchainitem_PatternchainitemGroup* kc_result= PatternchainitemGroup(l_patternchains_1); kc_result->rewrite_members(this); return kc_result; } } patternchainitem impl_patternchainitem_PatternchainitemOutmost::rewrite(rview kc_current_view_base) { outmostpattern l_outmostpattern_1 = outmostpattern_1->rewrite(kc_current_view_base); if ((l_outmostpattern_1 == outmostpattern_1)) return this; else { impl_patternchainitem_PatternchainitemOutmost* kc_result= PatternchainitemOutmost(l_outmostpattern_1); kc_result->rewrite_members(this); return kc_result; } } outmostpattern impl_outmostpattern_OPDefault::rewrite(rview kc_current_view_base) { Cexpression l_Cexpression_1 = Cexpression_1->rewrite(kc_current_view_base); if ((l_Cexpression_1 == Cexpression_1)) return this; else { impl_outmostpattern_OPDefault* kc_result= OPDefault(l_Cexpression_1); kc_result->rewrite_members(this); return kc_result; } } outmostpattern impl_outmostpattern_OPWildcard::rewrite(rview kc_current_view_base) { Cexpression l_Cexpression_1 = Cexpression_1->rewrite(kc_current_view_base); if ((l_Cexpression_1 == Cexpression_1)) return this; else { impl_outmostpattern_OPWildcard* kc_result= OPWildcard(l_Cexpression_1); kc_result->rewrite_members(this); return kc_result; } } outmostpattern impl_outmostpattern_OPNonLeafVariable::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); outmostpattern l_outmostpattern_1 = outmostpattern_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_outmostpattern_1 == outmostpattern_1)) return this; else { impl_outmostpattern_OPNonLeafVariable* kc_result= OPNonLeafVariable(l_ID_1, l_outmostpattern_1); kc_result->rewrite_members(this); return kc_result; } } outmostpattern impl_outmostpattern_OPOperator::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); patterns l_patterns_1 = patterns_1->rewrite(kc_current_view_base); Cexpression l_Cexpression_1 = Cexpression_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_patterns_1 == patterns_1) && (l_Cexpression_1 == Cexpression_1)) return this; else { impl_outmostpattern_OPOperator* kc_result= OPOperator(l_ID_1, l_patterns_1, l_Cexpression_1); kc_result->rewrite_members(this); return kc_result; } } outmostpattern impl_outmostpattern_OPOperatorWildcard::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); Cexpression l_Cexpression_1 = Cexpression_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_Cexpression_1 == Cexpression_1)) return this; else { impl_outmostpattern_OPOperatorWildcard* kc_result= OPOperatorWildcard(l_ID_1, l_Cexpression_1); kc_result->rewrite_members(this); return kc_result; } } pattern impl_pattern_PIntLiteral::rewrite(rview kc_current_view_base) { INT l_INT_1 = INT_1->rewrite(kc_current_view_base); if ((l_INT_1 == INT_1)) return this; else { impl_pattern_PIntLiteral* kc_result= PIntLiteral(l_INT_1); kc_result->rewrite_members(this); return kc_result; } } pattern impl_pattern_PStringLiteral::rewrite(rview kc_current_view_base) { CexpressionDQ l_CexpressionDQ_1 = CexpressionDQ_1->rewrite(kc_current_view_base); if ((l_CexpressionDQ_1 == CexpressionDQ_1)) return this; else { impl_pattern_PStringLiteral* kc_result= PStringLiteral(l_CexpressionDQ_1); kc_result->rewrite_members(this); return kc_result; } } pattern impl_pattern_PWildcard::rewrite(rview kc_current_view_base) { return this; } pattern impl_pattern_PNonLeafVariable::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); pattern l_pattern_1 = pattern_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_pattern_1 == pattern_1)) return this; else { impl_pattern_PNonLeafVariable* kc_result= PNonLeafVariable(l_ID_1, l_pattern_1); kc_result->rewrite_members(this); return kc_result; } } pattern impl_pattern_POperator::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); patterns l_patterns_1 = patterns_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_patterns_1 == patterns_1)) return this; else { impl_pattern_POperator* kc_result= POperator(l_ID_1, l_patterns_1); kc_result->rewrite_members(this); return kc_result; } } pattern impl_pattern_PVariable::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1)) return this; else { impl_pattern_PVariable* kc_result= PVariable(l_ID_1); kc_result->rewrite_members(this); return kc_result; } } patterns impl_patterns::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons pattern l_pattern_1 = pattern_1->rewrite(kc_current_view_base); patterns l_patterns_1 = patterns_1->rewrite(kc_current_view_base); if ((l_pattern_1 == pattern_1) && (l_patterns_1 == patterns_1)) return this; else { impl_patterns* kc_result= Conspatterns(l_pattern_1, l_patterns_1); kc_result->rewrite_members(this); return kc_result; } } } term impl_term_TIntLiteral::rewrite(rview kc_current_view_base) { INT l_INT_1 = INT_1->rewrite(kc_current_view_base); if ((l_INT_1 == INT_1)) return this; else { impl_term_TIntLiteral* kc_result= TIntLiteral(l_INT_1); kc_result->rewrite_members(this); return kc_result; } } term impl_term_TStringLiteral::rewrite(rview kc_current_view_base) { CexpressionDQ l_CexpressionDQ_1 = CexpressionDQ_1->rewrite(kc_current_view_base); if ((l_CexpressionDQ_1 == CexpressionDQ_1)) return this; else { impl_term_TStringLiteral* kc_result= TStringLiteral(l_CexpressionDQ_1); kc_result->rewrite_members(this); return kc_result; } } term impl_term_TCTerm::rewrite(rview kc_current_view_base) { CexpressionSQ l_CexpressionSQ_1 = CexpressionSQ_1->rewrite(kc_current_view_base); if ((l_CexpressionSQ_1 == CexpressionSQ_1)) return this; else { impl_term_TCTerm* kc_result= TCTerm(l_CexpressionSQ_1); kc_result->rewrite_members(this); return kc_result; } } term impl_term_TMemberVarDot::rewrite(rview kc_current_view_base) { term l_term_1 = term_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_term_1 == term_1) && (l_ID_1 == ID_1)) return this; else { impl_term_TMemberVarDot* kc_result= TMemberVarDot(l_term_1, l_ID_1); kc_result->rewrite_members(this); return kc_result; } } term impl_term_TMemberVar::rewrite(rview kc_current_view_base) { term l_term_1 = term_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_term_1 == term_1) && (l_ID_1 == ID_1)) return this; else { impl_term_TMemberVar* kc_result= TMemberVar(l_term_1, l_ID_1); kc_result->rewrite_members(this); return kc_result; } } term impl_term_TMethodDot::rewrite(rview kc_current_view_base) { term l_term_1 = term_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); terms l_terms_1 = terms_1->rewrite(kc_current_view_base); if ((l_term_1 == term_1) && (l_ID_1 == ID_1) && (l_terms_1 == terms_1)) return this; else { impl_term_TMethodDot* kc_result= TMethodDot(l_term_1, l_ID_1, l_terms_1); kc_result->rewrite_members(this); return kc_result; } } term impl_term_TMethod::rewrite(rview kc_current_view_base) { term l_term_1 = term_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); terms l_terms_1 = terms_1->rewrite(kc_current_view_base); if ((l_term_1 == term_1) && (l_ID_1 == ID_1) && (l_terms_1 == terms_1)) return this; else { impl_term_TMethod* kc_result= TMethod(l_term_1, l_ID_1, l_terms_1); kc_result->rewrite_members(this); return kc_result; } } term impl_term_TOperator::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); terms l_terms_1 = terms_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_terms_1 == terms_1)) return this; else { impl_term_TOperator* kc_result= TOperator(l_ID_1, l_terms_1); kc_result->rewrite_members(this); return kc_result; } } term impl_term_TVariable::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1)) return this; else { impl_term_TVariable* kc_result= TVariable(l_ID_1); kc_result->rewrite_members(this); return kc_result; } } terms impl_terms::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons term l_term_1 = term_1->rewrite(kc_current_view_base); terms l_terms_1 = terms_1->rewrite(kc_current_view_base); if ((l_term_1 == term_1) && (l_terms_1 == terms_1)) return this; else { impl_terms* kc_result= Consterms(l_term_1, l_terms_1); kc_result->rewrite_members(this); return kc_result; } } } fnfiles impl_fnfiles::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons fnfile l_fnfile_1 = fnfile_1->rewrite(kc_current_view_base); fnfiles l_fnfiles_1 = fnfiles_1->rewrite(kc_current_view_base); if ((l_fnfile_1 == fnfile_1) && (l_fnfiles_1 == fnfiles_1)) return this; else { impl_fnfiles* kc_result= Consfnfiles(l_fnfile_1, l_fnfiles_1); kc_result->rewrite_members(this); return kc_result; } } } fnfile impl_fnfile_FnFile::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1)) return this; else { impl_fnfile_FnFile* kc_result= FnFile(l_casestring_1); kc_result->rewrite_members(this); return kc_result; } } fndeclarations impl_fndeclarations::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons fndeclaration l_fndeclaration_1 = fndeclaration_1->rewrite(kc_current_view_base); fndeclarations l_fndeclarations_1 = fndeclarations_1->rewrite(kc_current_view_base); if ((l_fndeclaration_1 == fndeclaration_1) && (l_fndeclarations_1 == fndeclarations_1)) return this; else { impl_fndeclarations* kc_result= Consfndeclarations(l_fndeclaration_1, l_fndeclarations_1); kc_result->rewrite_members(this); return kc_result; } } } fndeclaration impl_fndeclaration_AcMemberDeclaration::rewrite(rview kc_current_view_base) { ac_declaration_specifiers l_ac_declaration_specifiers_1 = ac_declaration_specifiers_1->rewrite(kc_current_view_base); ac_declarator l_ac_declarator_1 = ac_declarator_1->rewrite(kc_current_view_base); ac_constant_expression_option l_ac_constant_expression_option_1 = ac_constant_expression_option_1->rewrite(kc_current_view_base); fnclass l_fnclass_1 = fnclass_1->rewrite(kc_current_view_base); if ((l_ac_declaration_specifiers_1 == ac_declaration_specifiers_1) && (l_ac_declarator_1 == ac_declarator_1) && (l_ac_constant_expression_option_1 == ac_constant_expression_option_1) && (l_fnclass_1 == fnclass_1)) return this; else { impl_fndeclaration_AcMemberDeclaration* kc_result= AcMemberDeclaration(l_ac_declaration_specifiers_1, l_ac_declarator_1, l_ac_constant_expression_option_1, l_fnclass_1); kc_result->rewrite_members(this); return kc_result; } } fndeclaration impl_fndeclaration_FnAcDeclaration::rewrite(rview kc_current_view_base) { ac_declaration_specifiers l_ac_declaration_specifiers_1 = ac_declaration_specifiers_1->rewrite(kc_current_view_base); ac_declarator l_ac_declarator_1 = ac_declarator_1->rewrite(kc_current_view_base); ac_declaration_list l_ac_declaration_list_1 = ac_declaration_list_1->rewrite(kc_current_view_base); ac_opt_base_init_list l_ac_opt_base_init_list_1 = ac_opt_base_init_list_1->rewrite(kc_current_view_base); Ctext l_Ctext_1 = Ctext_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); fnclass l_fnclass_1 = fnclass_1->rewrite(kc_current_view_base); if ((l_ac_declaration_specifiers_1 == ac_declaration_specifiers_1) && (l_ac_declarator_1 == ac_declarator_1) && (l_ac_declaration_list_1 == ac_declaration_list_1) && (l_ac_opt_base_init_list_1 == ac_opt_base_init_list_1) && (l_Ctext_1 == Ctext_1) && (l_ID_1 == ID_1) && (l_fnclass_1 == fnclass_1)) return this; else { impl_fndeclaration_FnAcDeclaration* kc_result= FnAcDeclaration(l_ac_declaration_specifiers_1, l_ac_declarator_1, l_ac_declaration_list_1, l_ac_opt_base_init_list_1, l_Ctext_1, l_ID_1, l_fnclass_1); kc_result->rewrite_members(this); return kc_result; } } fnclass impl_fnclass_ConvOperatorFn::rewrite(rview kc_current_view_base) { return this; } fnclass impl_fnclass_DestructorFn::rewrite(rview kc_current_view_base) { return this; } fnclass impl_fnclass_ConstructorFn::rewrite(rview kc_current_view_base) { return this; } fnclass impl_fnclass_MemberFn::rewrite(rview kc_current_view_base) { return this; } fnclass impl_fnclass_StaticFn::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1)) return this; else { impl_fnclass_StaticFn* kc_result= StaticFn(l_casestring_1); kc_result->rewrite_members(this); return kc_result; } } fnclass impl_fnclass_GlobalFn::rewrite(rview kc_current_view_base) { return this; } Ctext impl_Ctext::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons Ctext_elem l_Ctext_elem_1 = Ctext_elem_1->rewrite(kc_current_view_base); Ctext l_Ctext_1 = Ctext_1->rewrite(kc_current_view_base); if ((l_Ctext_elem_1 == Ctext_elem_1) && (l_Ctext_1 == Ctext_1)) return this; else { impl_Ctext* kc_result= ConsCtext(l_Ctext_elem_1, l_Ctext_1); kc_result->rewrite_members(this); return kc_result; } } } Ctext_elem impl_Ctext_elem_CTextWithexpression::rewrite(rview kc_current_view_base) { withexpressions l_withexpressions_1 = withexpressions_1->rewrite(kc_current_view_base); withcases l_withcases_1 = withcases_1->rewrite(kc_current_view_base); contextinfo l_contextinfo_1 = contextinfo_1->rewrite(kc_current_view_base); if ((l_withexpressions_1 == withexpressions_1) && (l_withcases_1 == withcases_1) && (l_contextinfo_1 == contextinfo_1)) return this; else { impl_Ctext_elem_CTextWithexpression* kc_result= CTextWithexpression(l_withexpressions_1, l_withcases_1, l_contextinfo_1); kc_result->rewrite_members(this); return kc_result; } } Ctext_elem impl_Ctext_elem_CTextForeachexpression::rewrite(rview kc_current_view_base) { patternchain l_patternchain_1 = patternchain_1->rewrite(kc_current_view_base); idCexpressions l_idCexpressions_1 = idCexpressions_1->rewrite(kc_current_view_base); withexpressions l_withexpressions_1 = withexpressions_1->rewrite(kc_current_view_base); Ctext l_Ctext_1 = Ctext_1->rewrite(kc_current_view_base); foreach_after l_foreach_after_1 = foreach_after_1->rewrite(kc_current_view_base); if ((l_patternchain_1 == patternchain_1) && (l_idCexpressions_1 == idCexpressions_1) && (l_withexpressions_1 == withexpressions_1) && (l_Ctext_1 == Ctext_1) && (l_foreach_after_1 == foreach_after_1)) return this; else { impl_Ctext_elem_CTextForeachexpression* kc_result= CTextForeachexpression(l_patternchain_1, l_idCexpressions_1, l_withexpressions_1, l_Ctext_1, l_foreach_after_1); kc_result->rewrite_members(this); return kc_result; } } Ctext_elem impl_Ctext_elem_CTextCbody::rewrite(rview kc_current_view_base) { Ctext l_Ctext_1 = Ctext_1->rewrite(kc_current_view_base); if ((l_Ctext_1 == Ctext_1)) return this; else { impl_Ctext_elem_CTextCbody* kc_result= CTextCbody(l_Ctext_1); kc_result->rewrite_members(this); return kc_result; } } Ctext_elem impl_Ctext_elem_CTextCexpressionSQ::rewrite(rview kc_current_view_base) { CexpressionSQ l_CexpressionSQ_1 = CexpressionSQ_1->rewrite(kc_current_view_base); if ((l_CexpressionSQ_1 == CexpressionSQ_1)) return this; else { impl_Ctext_elem_CTextCexpressionSQ* kc_result= CTextCexpressionSQ(l_CexpressionSQ_1); kc_result->rewrite_members(this); return kc_result; } } Ctext_elem impl_Ctext_elem_CTextCexpressionDQ::rewrite(rview kc_current_view_base) { CexpressionDQ l_CexpressionDQ_1 = CexpressionDQ_1->rewrite(kc_current_view_base); if ((l_CexpressionDQ_1 == CexpressionDQ_1)) return this; else { impl_Ctext_elem_CTextCexpressionDQ* kc_result= CTextCexpressionDQ(l_CexpressionDQ_1); kc_result->rewrite_members(this); return kc_result; } } Ctext_elem impl_Ctext_elem_CTextNl::rewrite(rview kc_current_view_base) { integer l_integer_1 = integer_1->rewrite(kc_current_view_base); if ((l_integer_1 == integer_1)) return this; else { impl_Ctext_elem_CTextNl* kc_result= CTextNl(l_integer_1); kc_result->rewrite_members(this); return kc_result; } } Ctext_elem impl_Ctext_elem_CTextDollarVar::rewrite(rview kc_current_view_base) { INT l_INT_1 = INT_1->rewrite(kc_current_view_base); if ((l_INT_1 == INT_1)) return this; else { impl_Ctext_elem_CTextDollarVar* kc_result= CTextDollarVar(l_INT_1); kc_result->rewrite_members(this); return kc_result; } } Ctext_elem impl_Ctext_elem_CTextLine::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1)) return this; else { impl_Ctext_elem_CTextLine* kc_result= CTextLine(l_casestring_1); kc_result->rewrite_members(this); return kc_result; } } foreach_after impl_foreach_after_ForeachAfter::rewrite(rview kc_current_view_base) { patternchain l_patternchain_1 = patternchain_1->rewrite(kc_current_view_base); idCexpressions l_idCexpressions_1 = idCexpressions_1->rewrite(kc_current_view_base); withexpressions l_withexpressions_1 = withexpressions_1->rewrite(kc_current_view_base); Ctext l_Ctext_1 = Ctext_1->rewrite(kc_current_view_base); if ((l_patternchain_1 == patternchain_1) && (l_idCexpressions_1 == idCexpressions_1) && (l_withexpressions_1 == withexpressions_1) && (l_Ctext_1 == Ctext_1)) return this; else { impl_foreach_after_ForeachAfter* kc_result= ForeachAfter(l_patternchain_1, l_idCexpressions_1, l_withexpressions_1, l_Ctext_1); kc_result->rewrite_members(this); return kc_result; } } foreach_after impl_foreach_after_NoForeachAfter::rewrite(rview kc_current_view_base) { return this; } contextinfo impl_contextinfo_NotInForeachContext::rewrite(rview kc_current_view_base) { return this; } contextinfo impl_contextinfo_InForeachContext::rewrite(rview kc_current_view_base) { patternchain l_patternchain_1 = patternchain_1->rewrite(kc_current_view_base); if ((l_patternchain_1 == patternchain_1)) return this; else { impl_contextinfo_InForeachContext* kc_result= InForeachContext(l_patternchain_1); kc_result->rewrite_members(this); return kc_result; } } withexpressions impl_withexpressions::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons withexpression l_withexpression_1 = withexpression_1->rewrite(kc_current_view_base); withexpressions l_withexpressions_1 = withexpressions_1->rewrite(kc_current_view_base); if ((l_withexpression_1 == withexpression_1) && (l_withexpressions_1 == withexpressions_1)) return this; else { impl_withexpressions* kc_result= Conswithexpressions(l_withexpression_1, l_withexpressions_1); kc_result->rewrite_members(this); return kc_result; } } } withexpression impl_withexpression_WECexpression::rewrite(rview kc_current_view_base) { Cexpression l_Cexpression_1 = Cexpression_1->rewrite(kc_current_view_base); if ((l_Cexpression_1 == Cexpression_1)) return this; else { impl_withexpression_WECexpression* kc_result= WECexpression(l_Cexpression_1); kc_result->rewrite_members(this); return kc_result; } } withexpression impl_withexpression_WEVariable::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1)) return this; else { impl_withexpression_WEVariable* kc_result= WEVariable(l_ID_1); kc_result->rewrite_members(this); return kc_result; } } withcases impl_withcases::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons withcase l_withcase_1 = withcase_1->rewrite(kc_current_view_base); withcases l_withcases_1 = withcases_1->rewrite(kc_current_view_base); if ((l_withcase_1 == withcase_1) && (l_withcases_1 == withcases_1)) return this; else { impl_withcases* kc_result= Conswithcases(l_withcase_1, l_withcases_1); kc_result->rewrite_members(this); return kc_result; } } } withcase impl_withcase_Withcase::rewrite(rview kc_current_view_base) { patternchains l_patternchains_1 = patternchains_1->rewrite(kc_current_view_base); Ctext l_Ctext_1 = Ctext_1->rewrite(kc_current_view_base); if ((l_patternchains_1 == patternchains_1) && (l_Ctext_1 == Ctext_1)) return this; else { impl_withcase_Withcase* kc_result= Withcase(l_patternchains_1, l_Ctext_1); kc_result->rewrite_members(this); return kc_result; } } unparsedeclarations impl_unparsedeclarations::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons unparsedeclaration l_unparsedeclaration_1 = unparsedeclaration_1->rewrite(kc_current_view_base); unparsedeclarations l_unparsedeclarations_1 = unparsedeclarations_1->rewrite(kc_current_view_base); if ((l_unparsedeclaration_1 == unparsedeclaration_1) && (l_unparsedeclarations_1 == unparsedeclarations_1)) return this; else { impl_unparsedeclarations* kc_result= Consunparsedeclarations(l_unparsedeclaration_1, l_unparsedeclarations_1); kc_result->rewrite_members(this); return kc_result; } } } unparsedeclaration impl_unparsedeclaration_UnparseDeclaration::rewrite(rview kc_current_view_base) { outmostpatterns l_outmostpatterns_1 = outmostpatterns_1->rewrite(kc_current_view_base); unparseclauses l_unparseclauses_1 = unparseclauses_1->rewrite(kc_current_view_base); if ((l_outmostpatterns_1 == outmostpatterns_1) && (l_unparseclauses_1 == unparseclauses_1)) return this; else { impl_unparsedeclaration_UnparseDeclaration* kc_result= UnparseDeclaration(l_outmostpatterns_1, l_unparseclauses_1); kc_result->rewrite_members(this); return kc_result; } } unparseclauses impl_unparseclauses::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons unparseclause l_unparseclause_1 = unparseclause_1->rewrite(kc_current_view_base); unparseclauses l_unparseclauses_1 = unparseclauses_1->rewrite(kc_current_view_base); if ((l_unparseclause_1 == unparseclause_1) && (l_unparseclauses_1 == unparseclauses_1)) return this; else { impl_unparseclauses* kc_result= Consunparseclauses(l_unparseclause_1, l_unparseclauses_1); kc_result->rewrite_members(this); return kc_result; } } } unparseclause impl_unparseclause_UnparseClause::rewrite(rview kc_current_view_base) { viewnames l_viewnames_1 = viewnames_1->rewrite(kc_current_view_base); unparseitems l_unparseitems_1 = unparseitems_1->rewrite(kc_current_view_base); if ((l_viewnames_1 == viewnames_1) && (l_unparseitems_1 == unparseitems_1)) return this; else { impl_unparseclause_UnparseClause* kc_result= UnparseClause(l_viewnames_1, l_unparseitems_1); kc_result->rewrite_members(this); return kc_result; } } viewnames impl_viewnames::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ID l_ID_1 = ID_1->rewrite(kc_current_view_base); viewnames l_viewnames_1 = viewnames_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_viewnames_1 == viewnames_1)) return this; else { impl_viewnames* kc_result= Consviewnames(l_ID_1, l_viewnames_1); kc_result->rewrite_members(this); return kc_result; } } } unparseitems impl_unparseitems::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons unparseitem l_unparseitem_1 = unparseitem_1->rewrite(kc_current_view_base); unparseitems l_unparseitems_1 = unparseitems_1->rewrite(kc_current_view_base); if ((l_unparseitem_1 == unparseitem_1) && (l_unparseitems_1 == unparseitems_1)) return this; else { impl_unparseitems* kc_result= Consunparseitems(l_unparseitem_1, l_unparseitems_1); kc_result->rewrite_members(this); return kc_result; } } } unparseitem impl_unparseitem_UViewVarDecl::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); ID l_ID_2 = ID_2->rewrite(kc_current_view_base); Cexpression l_Cexpression_1 = Cexpression_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_ID_2 == ID_2) && (l_Cexpression_1 == Cexpression_1)) return this; else { impl_unparseitem_UViewVarDecl* kc_result= UViewVarDecl(l_ID_1, l_ID_2, l_Cexpression_1); kc_result->rewrite_members(this); return kc_result; } } unparseitem impl_unparseitem_UnpBody::rewrite(rview kc_current_view_base) { languageoption l_languageoption_1 = languageoption_1->rewrite(kc_current_view_base); unparseitems l_unparseitems_1 = unparseitems_1->rewrite(kc_current_view_base); if ((l_languageoption_1 == languageoption_1) && (l_unparseitems_1 == unparseitems_1)) return this; else { impl_unparseitem_UnpBody* kc_result= UnpBody(l_languageoption_1, l_unparseitems_1); kc_result->rewrite_members(this); return kc_result; } } unparseitem impl_unparseitem_UnpCtext::rewrite(rview kc_current_view_base) { languageoption l_languageoption_1 = languageoption_1->rewrite(kc_current_view_base); Ctext l_Ctext_1 = Ctext_1->rewrite(kc_current_view_base); if ((l_languageoption_1 == languageoption_1) && (l_Ctext_1 == Ctext_1)) return this; else { impl_unparseitem_UnpCtext* kc_result= UnpCtext(l_languageoption_1, l_Ctext_1); kc_result->rewrite_members(this); return kc_result; } } unparseitem impl_unparseitem_UnpSubexpr::rewrite(rview kc_current_view_base) { languageoption l_languageoption_1 = languageoption_1->rewrite(kc_current_view_base); unpsubterm l_unpsubterm_1 = unpsubterm_1->rewrite(kc_current_view_base); viewnameoption l_viewnameoption_1 = viewnameoption_1->rewrite(kc_current_view_base); if ((l_languageoption_1 == languageoption_1) && (l_unpsubterm_1 == unpsubterm_1) && (l_viewnameoption_1 == viewnameoption_1)) return this; else { impl_unparseitem_UnpSubexpr* kc_result= UnpSubexpr(l_languageoption_1, l_unpsubterm_1, l_viewnameoption_1); kc_result->rewrite_members(this); return kc_result; } } unparseitem impl_unparseitem_UnpStr::rewrite(rview kc_current_view_base) { languageoption l_languageoption_1 = languageoption_1->rewrite(kc_current_view_base); CexpressionDQ l_CexpressionDQ_1 = CexpressionDQ_1->rewrite(kc_current_view_base); viewnameoption l_viewnameoption_1 = viewnameoption_1->rewrite(kc_current_view_base); if ((l_languageoption_1 == languageoption_1) && (l_CexpressionDQ_1 == CexpressionDQ_1) && (l_viewnameoption_1 == viewnameoption_1)) return this; else { impl_unparseitem_UnpStr* kc_result= UnpStr(l_languageoption_1, l_CexpressionDQ_1, l_viewnameoption_1); kc_result->rewrite_members(this); return kc_result; } } unpsubterm impl_unpsubterm_UnpCastedVariable::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); ID l_ID_2 = ID_2->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_ID_2 == ID_2)) return this; else { impl_unpsubterm_UnpCastedVariable* kc_result= UnpCastedVariable(l_ID_1, l_ID_2); kc_result->rewrite_members(this); return kc_result; } } unpsubterm impl_unpsubterm_UnpDollarvarAttr::rewrite(rview kc_current_view_base) { INT l_INT_1 = INT_1->rewrite(kc_current_view_base); unpattributes l_unpattributes_1 = unpattributes_1->rewrite(kc_current_view_base); if ((l_INT_1 == INT_1) && (l_unpattributes_1 == unpattributes_1)) return this; else { impl_unpsubterm_UnpDollarvarAttr* kc_result= UnpDollarvarAttr(l_INT_1, l_unpattributes_1); kc_result->rewrite_members(this); return kc_result; } } unpsubterm impl_unpsubterm_UnpSubAttr::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); unpattributes l_unpattributes_1 = unpattributes_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_unpattributes_1 == unpattributes_1)) return this; else { impl_unpsubterm_UnpSubAttr* kc_result= UnpSubAttr(l_ID_1, l_unpattributes_1); kc_result->rewrite_members(this); return kc_result; } } unpsubterm impl_unpsubterm_UnpDollarvarTerm::rewrite(rview kc_current_view_base) { INT l_INT_1 = INT_1->rewrite(kc_current_view_base); if ((l_INT_1 == INT_1)) return this; else { impl_unpsubterm_UnpDollarvarTerm* kc_result= UnpDollarvarTerm(l_INT_1); kc_result->rewrite_members(this); return kc_result; } } unpsubterm impl_unpsubterm_UnpSubTerm::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1)) return this; else { impl_unpsubterm_UnpSubTerm* kc_result= UnpSubTerm(l_ID_1); kc_result->rewrite_members(this); return kc_result; } } unpattributes impl_unpattributes::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ID l_ID_1 = ID_1->rewrite(kc_current_view_base); unpattributes l_unpattributes_1 = unpattributes_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_unpattributes_1 == unpattributes_1)) return this; else { impl_unpattributes* kc_result= Consunpattributes(l_ID_1, l_unpattributes_1); kc_result->rewrite_members(this); return kc_result; } } } viewnameoption impl_viewnameoption_YesViewname::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1)) return this; else { impl_viewnameoption_YesViewname* kc_result= YesViewname(l_ID_1); kc_result->rewrite_members(this); return kc_result; } } viewnameoption impl_viewnameoption_NoViewname::rewrite(rview kc_current_view_base) { return this; } languageoption impl_languageoption_LanguageList::rewrite(rview kc_current_view_base) { languagenames l_languagenames_1 = languagenames_1->rewrite(kc_current_view_base); if ((l_languagenames_1 == languagenames_1)) return this; else { impl_languageoption_LanguageList* kc_result= LanguageList(l_languagenames_1); kc_result->rewrite_members(this); return kc_result; } } languageoption impl_languageoption_NoLanguagename::rewrite(rview kc_current_view_base) { return this; } languagenames impl_languagenames::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ID l_ID_1 = ID_1->rewrite(kc_current_view_base); languagenames l_languagenames_1 = languagenames_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_languagenames_1 == languagenames_1)) return this; else { impl_languagenames* kc_result= Conslanguagenames(l_ID_1, l_languagenames_1); kc_result->rewrite_members(this); return kc_result; } } } fileline impl_fileline_PosNoFileLine::rewrite(rview kc_current_view_base) { return this; } fileline impl_fileline_NoFileLine::rewrite(rview kc_current_view_base) { return this; } fileline impl_fileline_FileLine::rewrite(rview kc_current_view_base) { return this; } scopetypefilelinestack impl_scopetypefilelinestack::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons scopetypefileline l_scopetypefileline_1 = scopetypefileline_1->rewrite(kc_current_view_base); scopetypefilelinestack l_scopetypefilelinestack_1 = scopetypefilelinestack_1->rewrite(kc_current_view_base); if ((l_scopetypefileline_1 == scopetypefileline_1) && (l_scopetypefilelinestack_1 == scopetypefilelinestack_1)) return this; else { impl_scopetypefilelinestack* kc_result= Consscopetypefilelinestack(l_scopetypefileline_1, l_scopetypefilelinestack_1); kc_result->rewrite_members(this); return kc_result; } } } scopetypefileline impl_scopetypefileline_ScopeTypeFileLine::rewrite(rview kc_current_view_base) { integer l_integer_1 = integer_1->rewrite(kc_current_view_base); IDtype l_IDtype_1 = IDtype_1->rewrite(kc_current_view_base); casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); integer l_integer_2 = integer_2->rewrite(kc_current_view_base); if ((l_integer_1 == integer_1) && (l_IDtype_1 == IDtype_1) && (l_casestring_1 == casestring_1) && (l_integer_2 == integer_2)) return this; else { impl_scopetypefileline_ScopeTypeFileLine* kc_result= ScopeTypeFileLine(l_integer_1, l_IDtype_1, l_casestring_1, l_integer_2); kc_result->rewrite_members(this); return kc_result; } } IDtype impl_IDtype_ITLanguageName::rewrite(rview kc_current_view_base) { integer l_integer_1 = integer_1->rewrite(kc_current_view_base); if ((l_integer_1 == integer_1)) return this; else { impl_IDtype_ITLanguageName* kc_result= ITLanguageName(l_integer_1); kc_result->rewrite_members(this); return kc_result; } } IDtype impl_IDtype_ITPatternVariable::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); integer l_integer_1 = integer_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_integer_1 == integer_1)) return this; else { impl_IDtype_ITPatternVariable* kc_result= ITPatternVariable(l_ID_1, l_integer_1); kc_result->rewrite_members(this); return kc_result; } } IDtype impl_IDtype_ITUserFunction::rewrite(rview kc_current_view_base) { fnclass l_fnclass_1 = fnclass_1->rewrite(kc_current_view_base); if ((l_fnclass_1 == fnclass_1)) return this; else { impl_IDtype_ITUserFunction* kc_result= ITUserFunction(l_fnclass_1); kc_result->rewrite_members(this); return kc_result; } } IDtype impl_IDtype_ITUserRView::rewrite(rview kc_current_view_base) { return this; } IDtype impl_IDtype_ITPredefinedRView::rewrite(rview kc_current_view_base) { return this; } IDtype impl_IDtype_ITUViewVar::rewrite(rview kc_current_view_base) { return this; } IDtype impl_IDtype_ITUserUView::rewrite(rview kc_current_view_base) { return this; } IDtype impl_IDtype_ITPredefinedUView::rewrite(rview kc_current_view_base) { return this; } IDtype impl_IDtype_ITStorageClass::rewrite(rview kc_current_view_base) { return this; } IDtype impl_IDtype_ITPredefinedStorageClass::rewrite(rview kc_current_view_base) { return this; } IDtype impl_IDtype_ITUserOperator::rewrite(rview kc_current_view_base) { alternative l_alternative_1 = alternative_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_alternative_1 == alternative_1) && (l_ID_1 == ID_1)) return this; else { impl_IDtype_ITUserOperator* kc_result= ITUserOperator(l_alternative_1, l_ID_1); kc_result->rewrite_members(this); return kc_result; } } IDtype impl_IDtype_ITPredefinedOperator::rewrite(rview kc_current_view_base) { alternative l_alternative_1 = alternative_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_alternative_1 == alternative_1) && (l_ID_1 == ID_1)) return this; else { impl_IDtype_ITPredefinedOperator* kc_result= ITPredefinedOperator(l_alternative_1, l_ID_1); kc_result->rewrite_members(this); return kc_result; } } IDtype impl_IDtype_ITUserPhylum::rewrite(rview kc_current_view_base) { phylumdeclaration l_phylumdeclaration_1 = phylumdeclaration_1->rewrite(kc_current_view_base); if ((l_phylumdeclaration_1 == phylumdeclaration_1)) return this; else { impl_IDtype_ITUserPhylum* kc_result= ITUserPhylum(l_phylumdeclaration_1); kc_result->rewrite_members(this); return kc_result; } } IDtype impl_IDtype_ITPredefinedPhylum::rewrite(rview kc_current_view_base) { phylumdeclaration l_phylumdeclaration_1 = phylumdeclaration_1->rewrite(kc_current_view_base); if ((l_phylumdeclaration_1 == phylumdeclaration_1)) return this; else { impl_IDtype_ITPredefinedPhylum* kc_result= ITPredefinedPhylum(l_phylumdeclaration_1); kc_result->rewrite_members(this); return kc_result; } } IDtype impl_IDtype_ITUnknown::rewrite(rview kc_current_view_base) { return this; } operators impl_operators::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ID l_ID_1 = ID_1->rewrite(kc_current_view_base); operators l_operators_1 = operators_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_operators_1 == operators_1)) return this; else { impl_operators* kc_result= Consoperators(l_ID_1, l_operators_1); kc_result->rewrite_members(this); return kc_result; } } } phyla impl_phyla::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ID l_ID_1 = ID_1->rewrite(kc_current_view_base); phyla l_phyla_1 = phyla_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_phyla_1 == phyla_1)) return this; else { impl_phyla* kc_result= Consphyla(l_ID_1, l_phyla_1); kc_result->rewrite_members(this); return kc_result; } } } variables impl_variables::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ID l_ID_1 = ID_1->rewrite(kc_current_view_base); variables l_variables_1 = variables_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_variables_1 == variables_1)) return this; else { impl_variables* kc_result= Consvariables(l_ID_1, l_variables_1); kc_result->rewrite_members(this); return kc_result; } } } dollarvarstatus impl_dollarvarstatus_DVDisallowed::rewrite(rview kc_current_view_base) { return this; } dollarvarstatus impl_dollarvarstatus_DVAllowed::rewrite(rview kc_current_view_base) { return this; } tribool impl_tribool_Bigger::rewrite(rview kc_current_view_base) { return this; } tribool impl_tribool_Smaller::rewrite(rview kc_current_view_base) { return this; } tribool impl_tribool_Equal::rewrite(rview kc_current_view_base) { return this; } patternrepresentations impl_patternrepresentations::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons patternrepresentation l_patternrepresentation_1 = patternrepresentation_1->rewrite(kc_current_view_base); patternrepresentations l_patternrepresentations_1 = patternrepresentations_1->rewrite(kc_current_view_base); if ((l_patternrepresentation_1 == patternrepresentation_1) && (l_patternrepresentations_1 == patternrepresentations_1)) return this; else { impl_patternrepresentations* kc_result= Conspatternrepresentations(l_patternrepresentation_1, l_patternrepresentations_1); kc_result->rewrite_members(this); return kc_result; } } } patternrepresentation impl_patternrepresentation::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons elem_patternrepresentation l_elem_patternrepresentation_1 = elem_patternrepresentation_1->rewrite(kc_current_view_base); patternrepresentation l_patternrepresentation_1 = patternrepresentation_1->rewrite(kc_current_view_base); switch(kc_current_view_base) { default: case base_rview_enum: { base_rview_class& kc_current_view=static_cast(kc_current_view_base); if ((l_elem_patternrepresentation_1->prod_sel() == sel_PRWildcard)) { KC_TRACE_REWRITE_MATCH(kc_current_view, "gutil.k", 706, this); const patternrepresentation r = l_patternrepresentation_1; patternrepresentation kc_result = r; KC_TRACE_REWRITE_RESULT(kc_current_view,"gutil.k",706,kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); } else if ((l_elem_patternrepresentation_1->prod_sel() == sel_PRDefault)) { KC_TRACE_REWRITE_MATCH(kc_current_view, "gutil.k", 707, this); const patternrepresentation r = l_patternrepresentation_1; patternrepresentation kc_result = r; KC_TRACE_REWRITE_RESULT(kc_current_view,"gutil.k",707,kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); } else break; } } if ((l_elem_patternrepresentation_1 == elem_patternrepresentation_1) && (l_patternrepresentation_1 == patternrepresentation_1)) return this; else { impl_patternrepresentation* kc_result= Conspatternrepresentation(l_elem_patternrepresentation_1, l_patternrepresentation_1); kc_result->rewrite_members(this); return kc_result; } } } elem_patternrepresentation impl_elem_patternrepresentation_PRIntLiteral::rewrite(rview kc_current_view_base) { path l_path_1 = path_1->rewrite(kc_current_view_base); INT l_INT_1 = INT_1->rewrite(kc_current_view_base); if ((l_path_1 == path_1) && (l_INT_1 == INT_1)) return this; else { impl_elem_patternrepresentation_PRIntLiteral* kc_result= PRIntLiteral(l_path_1, l_INT_1); kc_result->rewrite_members(this); return kc_result; } } elem_patternrepresentation impl_elem_patternrepresentation_PRStringLiteral::rewrite(rview kc_current_view_base) { path l_path_1 = path_1->rewrite(kc_current_view_base); CexpressionDQ l_CexpressionDQ_1 = CexpressionDQ_1->rewrite(kc_current_view_base); if ((l_path_1 == path_1) && (l_CexpressionDQ_1 == CexpressionDQ_1)) return this; else { impl_elem_patternrepresentation_PRStringLiteral* kc_result= PRStringLiteral(l_path_1, l_CexpressionDQ_1); kc_result->rewrite_members(this); return kc_result; } } elem_patternrepresentation impl_elem_patternrepresentation_PRDefault::rewrite(rview kc_current_view_base) { return this; } elem_patternrepresentation impl_elem_patternrepresentation_PRWildcard::rewrite(rview kc_current_view_base) { path l_path_1 = path_1->rewrite(kc_current_view_base); if ((l_path_1 == path_1)) return this; else { impl_elem_patternrepresentation_PRWildcard* kc_result= PRWildcard(l_path_1); kc_result->rewrite_members(this); return kc_result; } } elem_patternrepresentation impl_elem_patternrepresentation_PRNonLeafBinding::rewrite(rview kc_current_view_base) { path l_path_1 = path_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); patternrepresentation l_patternrepresentation_1 = patternrepresentation_1->rewrite(kc_current_view_base); if ((l_path_1 == path_1) && (l_ID_1 == ID_1) && (l_patternrepresentation_1 == patternrepresentation_1)) return this; else { impl_elem_patternrepresentation_PRNonLeafBinding* kc_result= PRNonLeafBinding(l_path_1, l_ID_1, l_patternrepresentation_1); kc_result->rewrite_members(this); return kc_result; } } elem_patternrepresentation impl_elem_patternrepresentation_PRUserPredicate::rewrite(rview kc_current_view_base) { Cexpression l_Cexpression_1 = Cexpression_1->rewrite(kc_current_view_base); if ((l_Cexpression_1 == Cexpression_1)) return this; else { impl_elem_patternrepresentation_PRUserPredicate* kc_result= PRUserPredicate(l_Cexpression_1); kc_result->rewrite_members(this); return kc_result; } } elem_patternrepresentation impl_elem_patternrepresentation_PROperPredicate::rewrite(rview kc_current_view_base) { path l_path_1 = path_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_path_1 == path_1) && (l_ID_1 == ID_1)) return this; else { impl_elem_patternrepresentation_PROperPredicate* kc_result= PROperPredicate(l_path_1, l_ID_1); kc_result->rewrite_members(this); return kc_result; } } elem_patternrepresentation impl_elem_patternrepresentation_PRVarPredicate::rewrite(rview kc_current_view_base) { paths l_paths_1 = paths_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); patternrepresentation l_patternrepresentation_1 = patternrepresentation_1->rewrite(kc_current_view_base); if ((l_paths_1 == paths_1) && (l_ID_1 == ID_1) && (l_patternrepresentation_1 == patternrepresentation_1)) return this; else { impl_elem_patternrepresentation_PRVarPredicate* kc_result= PRVarPredicate(l_paths_1, l_ID_1, l_patternrepresentation_1); kc_result->rewrite_members(this); return kc_result; } } elem_patternrepresentation impl_elem_patternrepresentation_PRBinding::rewrite(rview kc_current_view_base) { path l_path_1 = path_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_path_1 == path_1) && (l_ID_1 == ID_1)) return this; else { impl_elem_patternrepresentation_PRBinding* kc_result= PRBinding(l_path_1, l_ID_1); kc_result->rewrite_members(this); return kc_result; } } path impl_path::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons integer l_integer_1 = integer_1->rewrite(kc_current_view_base); path l_path_1 = path_1->rewrite(kc_current_view_base); if ((l_integer_1 == integer_1) && (l_path_1 == path_1)) return this; else { impl_path* kc_result= Conspath(l_integer_1, l_path_1); kc_result->rewrite_members(this); return kc_result; } } } paths impl_paths::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons path l_path_1 = path_1->rewrite(kc_current_view_base); paths l_paths_1 = paths_1->rewrite(kc_current_view_base); if ((l_path_1 == path_1) && (l_paths_1 == paths_1)) return this; else { impl_paths* kc_result= Conspaths(l_path_1, l_paths_1); kc_result->rewrite_members(this); return kc_result; } } } argsnumbers impl_argsnumbers::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons integer l_integer_1 = integer_1->rewrite(kc_current_view_base); argsnumbers l_argsnumbers_1 = argsnumbers_1->rewrite(kc_current_view_base); if ((l_integer_1 == integer_1) && (l_argsnumbers_1 == argsnumbers_1)) return this; else { impl_argsnumbers* kc_result= Consargsnumbers(l_integer_1, l_argsnumbers_1); kc_result->rewrite_members(this); return kc_result; } } } rewriterulesinfo impl_rewriterulesinfo::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons rewriteruleinfo l_rewriteruleinfo_1 = rewriteruleinfo_1->rewrite(kc_current_view_base); rewriterulesinfo l_rewriterulesinfo_1 = rewriterulesinfo_1->rewrite(kc_current_view_base); if ((l_rewriteruleinfo_1 == rewriteruleinfo_1) && (l_rewriterulesinfo_1 == rewriterulesinfo_1)) return this; else { impl_rewriterulesinfo* kc_result= Consrewriterulesinfo(l_rewriteruleinfo_1, l_rewriterulesinfo_1); kc_result->rewrite_members(this); return kc_result; } } } rewriteruleinfo impl_rewriteruleinfo_Rewriteruleinfo::rewrite(rview kc_current_view_base) { patternrepresentation l_patternrepresentation_1 = patternrepresentation_1->rewrite(kc_current_view_base); patternrepresentation l_patternrepresentation_2 = patternrepresentation_2->rewrite(kc_current_view_base); rewriteclause l_rewriteclause_1 = rewriteclause_1->rewrite(kc_current_view_base); if ((l_patternrepresentation_1 == patternrepresentation_1) && (l_patternrepresentation_2 == patternrepresentation_2) && (l_rewriteclause_1 == rewriteclause_1)) return this; else { impl_rewriteruleinfo_Rewriteruleinfo* kc_result= Rewriteruleinfo(l_patternrepresentation_1, l_patternrepresentation_2, l_rewriteclause_1); kc_result->rewrite_members(this); return kc_result; } } withcasesinfo impl_withcasesinfo::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons withcaseinfo l_withcaseinfo_1 = withcaseinfo_1->rewrite(kc_current_view_base); withcasesinfo l_withcasesinfo_1 = withcasesinfo_1->rewrite(kc_current_view_base); if ((l_withcaseinfo_1 == withcaseinfo_1) && (l_withcasesinfo_1 == withcasesinfo_1)) return this; else { impl_withcasesinfo* kc_result= Conswithcasesinfo(l_withcaseinfo_1, l_withcasesinfo_1); kc_result->rewrite_members(this); return kc_result; } } } withcaseinfo impl_withcaseinfo_Withcaseinfo::rewrite(rview kc_current_view_base) { patternrepresentation l_patternrepresentation_1 = patternrepresentation_1->rewrite(kc_current_view_base); patternrepresentation l_patternrepresentation_2 = patternrepresentation_2->rewrite(kc_current_view_base); Ctext l_Ctext_1 = Ctext_1->rewrite(kc_current_view_base); if ((l_patternrepresentation_1 == patternrepresentation_1) && (l_patternrepresentation_2 == patternrepresentation_2) && (l_Ctext_1 == Ctext_1)) return this; else { impl_withcaseinfo_Withcaseinfo* kc_result= Withcaseinfo(l_patternrepresentation_1, l_patternrepresentation_2, l_Ctext_1); kc_result->rewrite_members(this); return kc_result; } } rewriteviewsinfo impl_rewriteviewsinfo::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons rewriteviewinfo l_rewriteviewinfo_1 = rewriteviewinfo_1->rewrite(kc_current_view_base); rewriteviewsinfo l_rewriteviewsinfo_1 = rewriteviewsinfo_1->rewrite(kc_current_view_base); if ((l_rewriteviewinfo_1 == rewriteviewinfo_1) && (l_rewriteviewsinfo_1 == rewriteviewsinfo_1)) return this; else { impl_rewriteviewsinfo* kc_result= Consrewriteviewsinfo(l_rewriteviewinfo_1, l_rewriteviewsinfo_1); kc_result->rewrite_members(this); return kc_result; } } } rewriteviewinfo impl_rewriteviewinfo_Rewriteviewinfo::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); rewriterulesinfo l_rewriterulesinfo_1 = rewriterulesinfo_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_rewriterulesinfo_1 == rewriterulesinfo_1)) return this; else { impl_rewriteviewinfo_Rewriteviewinfo* kc_result= Rewriteviewinfo(l_ID_1, l_rewriterulesinfo_1); kc_result->rewrite_members(this); return kc_result; } } unparseviewsinfo impl_unparseviewsinfo::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons unparseviewinfo l_unparseviewinfo_1 = unparseviewinfo_1->rewrite(kc_current_view_base); unparseviewsinfo l_unparseviewsinfo_1 = unparseviewsinfo_1->rewrite(kc_current_view_base); if ((l_unparseviewinfo_1 == unparseviewinfo_1) && (l_unparseviewsinfo_1 == unparseviewsinfo_1)) return this; else { impl_unparseviewsinfo* kc_result= Consunparseviewsinfo(l_unparseviewinfo_1, l_unparseviewsinfo_1); kc_result->rewrite_members(this); return kc_result; } } } unparseviewinfo impl_unparseviewinfo_Unparseviewinfo::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); unparsedeclsinfo l_unparsedeclsinfo_1 = unparsedeclsinfo_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_unparsedeclsinfo_1 == unparsedeclsinfo_1)) return this; else { impl_unparseviewinfo_Unparseviewinfo* kc_result= Unparseviewinfo(l_ID_1, l_unparsedeclsinfo_1); kc_result->rewrite_members(this); return kc_result; } } unparsedeclsinfo impl_unparsedeclsinfo::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons unparsedeclinfo l_unparsedeclinfo_1 = unparsedeclinfo_1->rewrite(kc_current_view_base); unparsedeclsinfo l_unparsedeclsinfo_1 = unparsedeclsinfo_1->rewrite(kc_current_view_base); if ((l_unparsedeclinfo_1 == unparsedeclinfo_1) && (l_unparsedeclsinfo_1 == unparsedeclsinfo_1)) return this; else { impl_unparsedeclsinfo* kc_result= Consunparsedeclsinfo(l_unparsedeclinfo_1, l_unparsedeclsinfo_1); kc_result->rewrite_members(this); return kc_result; } } } unparsedeclinfo impl_unparsedeclinfo_Unparsedeclinfo::rewrite(rview kc_current_view_base) { patternrepresentation l_patternrepresentation_1 = patternrepresentation_1->rewrite(kc_current_view_base); patternrepresentation l_patternrepresentation_2 = patternrepresentation_2->rewrite(kc_current_view_base); unparseclause l_unparseclause_1 = unparseclause_1->rewrite(kc_current_view_base); if ((l_patternrepresentation_1 == patternrepresentation_1) && (l_patternrepresentation_2 == patternrepresentation_2) && (l_unparseclause_1 == unparseclause_1)) return this; else { impl_unparsedeclinfo_Unparsedeclinfo* kc_result= Unparsedeclinfo(l_patternrepresentation_1, l_patternrepresentation_2, l_unparseclause_1); kc_result->rewrite_members(this); return kc_result; } } ac_declaration impl_ac_declaration_AcDeclaration::rewrite(rview kc_current_view_base) { ac_declaration_specifiers l_ac_declaration_specifiers_1 = ac_declaration_specifiers_1->rewrite(kc_current_view_base); ac_init_declarator_list l_ac_init_declarator_list_1 = ac_init_declarator_list_1->rewrite(kc_current_view_base); if ((l_ac_declaration_specifiers_1 == ac_declaration_specifiers_1) && (l_ac_init_declarator_list_1 == ac_init_declarator_list_1)) return this; else { impl_ac_declaration_AcDeclaration* kc_result= AcDeclaration(l_ac_declaration_specifiers_1, l_ac_init_declarator_list_1); kc_result->rewrite_members(this); return kc_result; } } ac_declaration_list impl_ac_declaration_list::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ac_declaration l_ac_declaration_1 = ac_declaration_1->rewrite(kc_current_view_base); ac_declaration_list l_ac_declaration_list_1 = ac_declaration_list_1->rewrite(kc_current_view_base); if ((l_ac_declaration_1 == ac_declaration_1) && (l_ac_declaration_list_1 == ac_declaration_list_1)) return this; else { impl_ac_declaration_list* kc_result= Consac_declaration_list(l_ac_declaration_1, l_ac_declaration_list_1); kc_result->rewrite_members(this); return kc_result; } } } ac_declaration_specifiers impl_ac_declaration_specifiers::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ac_declaration_specifier l_ac_declaration_specifier_1 = ac_declaration_specifier_1->rewrite(kc_current_view_base); ac_declaration_specifiers l_ac_declaration_specifiers_1 = ac_declaration_specifiers_1->rewrite(kc_current_view_base); if ((l_ac_declaration_specifier_1 == ac_declaration_specifier_1) && (l_ac_declaration_specifiers_1 == ac_declaration_specifiers_1)) return this; else { impl_ac_declaration_specifiers* kc_result= Consac_declaration_specifiers(l_ac_declaration_specifier_1, l_ac_declaration_specifiers_1); kc_result->rewrite_members(this); return kc_result; } } } ac_declaration_specifier impl_ac_declaration_specifier_AcDeclSpecTypeQual::rewrite(rview kc_current_view_base) { ac_type_qualifier l_ac_type_qualifier_1 = ac_type_qualifier_1->rewrite(kc_current_view_base); if ((l_ac_type_qualifier_1 == ac_type_qualifier_1)) return this; else { impl_ac_declaration_specifier_AcDeclSpecTypeQual* kc_result= AcDeclSpecTypeQual(l_ac_type_qualifier_1); kc_result->rewrite_members(this); return kc_result; } } ac_declaration_specifier impl_ac_declaration_specifier_AcDeclSpecTypeSpec::rewrite(rview kc_current_view_base) { ac_type_specifier l_ac_type_specifier_1 = ac_type_specifier_1->rewrite(kc_current_view_base); if ((l_ac_type_specifier_1 == ac_type_specifier_1)) return this; else { impl_ac_declaration_specifier_AcDeclSpecTypeSpec* kc_result= AcDeclSpecTypeSpec(l_ac_type_specifier_1); kc_result->rewrite_members(this); return kc_result; } } ac_declaration_specifier impl_ac_declaration_specifier_AcDeclSpecStorageSpec::rewrite(rview kc_current_view_base) { ac_storage_class_specifier l_ac_storage_class_specifier_1 = ac_storage_class_specifier_1->rewrite(kc_current_view_base); if ((l_ac_storage_class_specifier_1 == ac_storage_class_specifier_1)) return this; else { impl_ac_declaration_specifier_AcDeclSpecStorageSpec* kc_result= AcDeclSpecStorageSpec(l_ac_storage_class_specifier_1); kc_result->rewrite_members(this); return kc_result; } } ac_storage_class_specifier impl_ac_storage_class_specifier_AcVirtual::rewrite(rview kc_current_view_base) { return this; } ac_storage_class_specifier impl_ac_storage_class_specifier_AcTypedef::rewrite(rview kc_current_view_base) { return this; } ac_storage_class_specifier impl_ac_storage_class_specifier_AcExtern::rewrite(rview kc_current_view_base) { return this; } ac_storage_class_specifier impl_ac_storage_class_specifier_AcStatic::rewrite(rview kc_current_view_base) { return this; } ac_storage_class_specifier impl_ac_storage_class_specifier_AcRegister::rewrite(rview kc_current_view_base) { return this; } ac_storage_class_specifier impl_ac_storage_class_specifier_AcAuto::rewrite(rview kc_current_view_base) { return this; } ac_type_specifier impl_ac_type_specifier_AcTypeSpec::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1)) return this; else { impl_ac_type_specifier_AcTypeSpec* kc_result= AcTypeSpec(l_ID_1); kc_result->rewrite_members(this); return kc_result; } } ac_type_qualifier impl_ac_type_qualifier_AcNoQualifier::rewrite(rview kc_current_view_base) { return this; } ac_type_qualifier impl_ac_type_qualifier_AcUnsigned::rewrite(rview kc_current_view_base) { return this; } ac_type_qualifier impl_ac_type_qualifier_AcVolatile::rewrite(rview kc_current_view_base) { return this; } ac_type_qualifier impl_ac_type_qualifier_AcConst::rewrite(rview kc_current_view_base) { return this; } ac_init_declarator_list impl_ac_init_declarator_list::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ac_init_declarator l_ac_init_declarator_1 = ac_init_declarator_1->rewrite(kc_current_view_base); ac_init_declarator_list l_ac_init_declarator_list_1 = ac_init_declarator_list_1->rewrite(kc_current_view_base); if ((l_ac_init_declarator_1 == ac_init_declarator_1) && (l_ac_init_declarator_list_1 == ac_init_declarator_list_1)) return this; else { impl_ac_init_declarator_list* kc_result= Consac_init_declarator_list(l_ac_init_declarator_1, l_ac_init_declarator_list_1); kc_result->rewrite_members(this); return kc_result; } } } ac_init_declarator impl_ac_init_declarator_AcInitDecl::rewrite(rview kc_current_view_base) { ac_declarator l_ac_declarator_1 = ac_declarator_1->rewrite(kc_current_view_base); if ((l_ac_declarator_1 == ac_declarator_1)) return this; else { impl_ac_init_declarator_AcInitDecl* kc_result= AcInitDecl(l_ac_declarator_1); kc_result->rewrite_members(this); return kc_result; } } ac_declarator impl_ac_declarator_AcDeclarator::rewrite(rview kc_current_view_base) { ac_pointer_option l_ac_pointer_option_1 = ac_pointer_option_1->rewrite(kc_current_view_base); ac_ref_option l_ac_ref_option_1 = ac_ref_option_1->rewrite(kc_current_view_base); ac_direct_declarator l_ac_direct_declarator_1 = ac_direct_declarator_1->rewrite(kc_current_view_base); if ((l_ac_pointer_option_1 == ac_pointer_option_1) && (l_ac_ref_option_1 == ac_ref_option_1) && (l_ac_direct_declarator_1 == ac_direct_declarator_1)) return this; else { impl_ac_declarator_AcDeclarator* kc_result= AcDeclarator(l_ac_pointer_option_1, l_ac_ref_option_1, l_ac_direct_declarator_1); kc_result->rewrite_members(this); return kc_result; } } ac_direct_declarator impl_ac_direct_declarator_AcOperatorDeclId::rewrite(rview kc_current_view_base) { ac_operator_name l_ac_operator_name_1 = ac_operator_name_1->rewrite(kc_current_view_base); if ((l_ac_operator_name_1 == ac_operator_name_1)) return this; else { impl_ac_direct_declarator_AcOperatorDeclId* kc_result= AcOperatorDeclId(l_ac_operator_name_1); kc_result->rewrite_members(this); return kc_result; } } ac_direct_declarator impl_ac_direct_declarator_AcConvOperatorDecl::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); ID l_ID_2 = ID_2->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_ID_2 == ID_2)) return this; else { impl_ac_direct_declarator_AcConvOperatorDecl* kc_result= AcConvOperatorDecl(l_ID_1, l_ID_2); kc_result->rewrite_members(this); return kc_result; } } ac_direct_declarator impl_ac_direct_declarator_AcMemberDecl::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); ID l_ID_2 = ID_2->rewrite(kc_current_view_base); ac_constant_expression_list l_ac_constant_expression_list_1 = ac_constant_expression_list_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_ID_2 == ID_2) && (l_ac_constant_expression_list_1 == ac_constant_expression_list_1)) return this; else { impl_ac_direct_declarator_AcMemberDecl* kc_result= AcMemberDecl(l_ID_1, l_ID_2, l_ac_constant_expression_list_1); kc_result->rewrite_members(this); return kc_result; } } ac_direct_declarator impl_ac_direct_declarator_AcQualifiedDeclProto::rewrite(rview kc_current_view_base) { ac_class_qualifier_list l_ac_class_qualifier_list_1 = ac_class_qualifier_list_1->rewrite(kc_current_view_base); ac_direct_declarator l_ac_direct_declarator_1 = ac_direct_declarator_1->rewrite(kc_current_view_base); ac_parameter_type_list l_ac_parameter_type_list_1 = ac_parameter_type_list_1->rewrite(kc_current_view_base); ac_type_qualifier l_ac_type_qualifier_1 = ac_type_qualifier_1->rewrite(kc_current_view_base); if ((l_ac_class_qualifier_list_1 == ac_class_qualifier_list_1) && (l_ac_direct_declarator_1 == ac_direct_declarator_1) && (l_ac_parameter_type_list_1 == ac_parameter_type_list_1) && (l_ac_type_qualifier_1 == ac_type_qualifier_1)) return this; else { impl_ac_direct_declarator_AcQualifiedDeclProto* kc_result= AcQualifiedDeclProto(l_ac_class_qualifier_list_1, l_ac_direct_declarator_1, l_ac_parameter_type_list_1, l_ac_type_qualifier_1); kc_result->rewrite_members(this); return kc_result; } } ac_direct_declarator impl_ac_direct_declarator_AcDirectDeclProto::rewrite(rview kc_current_view_base) { ac_direct_declarator l_ac_direct_declarator_1 = ac_direct_declarator_1->rewrite(kc_current_view_base); ac_parameter_type_list l_ac_parameter_type_list_1 = ac_parameter_type_list_1->rewrite(kc_current_view_base); if ((l_ac_direct_declarator_1 == ac_direct_declarator_1) && (l_ac_parameter_type_list_1 == ac_parameter_type_list_1)) return this; else { impl_ac_direct_declarator_AcDirectDeclProto* kc_result= AcDirectDeclProto(l_ac_direct_declarator_1, l_ac_parameter_type_list_1); kc_result->rewrite_members(this); return kc_result; } } ac_direct_declarator impl_ac_direct_declarator_AcDirectDeclArray::rewrite(rview kc_current_view_base) { ac_direct_declarator l_ac_direct_declarator_1 = ac_direct_declarator_1->rewrite(kc_current_view_base); ac_constant_expression_option l_ac_constant_expression_option_1 = ac_constant_expression_option_1->rewrite(kc_current_view_base); if ((l_ac_direct_declarator_1 == ac_direct_declarator_1) && (l_ac_constant_expression_option_1 == ac_constant_expression_option_1)) return this; else { impl_ac_direct_declarator_AcDirectDeclArray* kc_result= AcDirectDeclArray(l_ac_direct_declarator_1, l_ac_constant_expression_option_1); kc_result->rewrite_members(this); return kc_result; } } ac_direct_declarator impl_ac_direct_declarator_AcDirectDeclPack::rewrite(rview kc_current_view_base) { ac_declarator l_ac_declarator_1 = ac_declarator_1->rewrite(kc_current_view_base); if ((l_ac_declarator_1 == ac_declarator_1)) return this; else { impl_ac_direct_declarator_AcDirectDeclPack* kc_result= AcDirectDeclPack(l_ac_declarator_1); kc_result->rewrite_members(this); return kc_result; } } ac_direct_declarator impl_ac_direct_declarator_AcDirectDeclId::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1)) return this; else { impl_ac_direct_declarator_AcDirectDeclId* kc_result= AcDirectDeclId(l_ID_1); kc_result->rewrite_members(this); return kc_result; } } ac_pointer_option impl_ac_pointer_option_Yespointer::rewrite(rview kc_current_view_base) { ac_pointer l_ac_pointer_1 = ac_pointer_1->rewrite(kc_current_view_base); if ((l_ac_pointer_1 == ac_pointer_1)) return this; else { impl_ac_pointer_option_Yespointer* kc_result= Yespointer(l_ac_pointer_1); kc_result->rewrite_members(this); return kc_result; } } ac_pointer_option impl_ac_pointer_option_Nopointer::rewrite(rview kc_current_view_base) { return this; } ac_pointer impl_ac_pointer_AcPointerCons::rewrite(rview kc_current_view_base) { ac_type_qualifier_list l_ac_type_qualifier_list_1 = ac_type_qualifier_list_1->rewrite(kc_current_view_base); ac_pointer l_ac_pointer_1 = ac_pointer_1->rewrite(kc_current_view_base); if ((l_ac_type_qualifier_list_1 == ac_type_qualifier_list_1) && (l_ac_pointer_1 == ac_pointer_1)) return this; else { impl_ac_pointer_AcPointerCons* kc_result= AcPointerCons(l_ac_type_qualifier_list_1, l_ac_pointer_1); kc_result->rewrite_members(this); return kc_result; } } ac_pointer impl_ac_pointer_AcPointerNil::rewrite(rview kc_current_view_base) { ac_type_qualifier_list l_ac_type_qualifier_list_1 = ac_type_qualifier_list_1->rewrite(kc_current_view_base); if ((l_ac_type_qualifier_list_1 == ac_type_qualifier_list_1)) return this; else { impl_ac_pointer_AcPointerNil* kc_result= AcPointerNil(l_ac_type_qualifier_list_1); kc_result->rewrite_members(this); return kc_result; } } ac_ref_option impl_ac_ref_option_AcRef::rewrite(rview kc_current_view_base) { return this; } ac_ref_option impl_ac_ref_option_AcNoRef::rewrite(rview kc_current_view_base) { return this; } ac_operator_name impl_ac_operator_name_AcOperatorName::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1)) return this; else { impl_ac_operator_name_AcOperatorName* kc_result= AcOperatorName(l_casestring_1); kc_result->rewrite_members(this); return kc_result; } } ac_class_qualifier_help_list impl_ac_class_qualifier_help_list::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ac_direct_declarator l_ac_direct_declarator_1 = ac_direct_declarator_1->rewrite(kc_current_view_base); ac_class_qualifier_help_list l_ac_class_qualifier_help_list_1 = ac_class_qualifier_help_list_1->rewrite(kc_current_view_base); if ((l_ac_direct_declarator_1 == ac_direct_declarator_1) && (l_ac_class_qualifier_help_list_1 == ac_class_qualifier_help_list_1)) return this; else { impl_ac_class_qualifier_help_list* kc_result= Consac_class_qualifier_help_list(l_ac_direct_declarator_1, l_ac_class_qualifier_help_list_1); kc_result->rewrite_members(this); return kc_result; } } } ac_class_qualifier_list impl_ac_class_qualifier_list::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ID l_ID_1 = ID_1->rewrite(kc_current_view_base); ac_class_qualifier_list l_ac_class_qualifier_list_1 = ac_class_qualifier_list_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_ac_class_qualifier_list_1 == ac_class_qualifier_list_1)) return this; else { impl_ac_class_qualifier_list* kc_result= Consac_class_qualifier_list(l_ID_1, l_ac_class_qualifier_list_1); kc_result->rewrite_members(this); return kc_result; } } } ac_type_qualifier_list impl_ac_type_qualifier_list::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ac_type_qualifier l_ac_type_qualifier_1 = ac_type_qualifier_1->rewrite(kc_current_view_base); ac_type_qualifier_list l_ac_type_qualifier_list_1 = ac_type_qualifier_list_1->rewrite(kc_current_view_base); if ((l_ac_type_qualifier_1 == ac_type_qualifier_1) && (l_ac_type_qualifier_list_1 == ac_type_qualifier_list_1)) return this; else { impl_ac_type_qualifier_list* kc_result= Consac_type_qualifier_list(l_ac_type_qualifier_1, l_ac_type_qualifier_list_1); kc_result->rewrite_members(this); return kc_result; } } } ac_parameter_type_list impl_ac_parameter_type_list_AcParList3Dot::rewrite(rview kc_current_view_base) { ac_parameter_list l_ac_parameter_list_1 = ac_parameter_list_1->rewrite(kc_current_view_base); if ((l_ac_parameter_list_1 == ac_parameter_list_1)) return this; else { impl_ac_parameter_type_list_AcParList3Dot* kc_result= AcParList3Dot(l_ac_parameter_list_1); kc_result->rewrite_members(this); return kc_result; } } ac_parameter_type_list impl_ac_parameter_type_list_AcParList::rewrite(rview kc_current_view_base) { ac_parameter_list l_ac_parameter_list_1 = ac_parameter_list_1->rewrite(kc_current_view_base); if ((l_ac_parameter_list_1 == ac_parameter_list_1)) return this; else { impl_ac_parameter_type_list_AcParList* kc_result= AcParList(l_ac_parameter_list_1); kc_result->rewrite_members(this); return kc_result; } } ac_parameter_list impl_ac_parameter_list::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ac_parameter_declaration l_ac_parameter_declaration_1 = ac_parameter_declaration_1->rewrite(kc_current_view_base); ac_parameter_list l_ac_parameter_list_1 = ac_parameter_list_1->rewrite(kc_current_view_base); if ((l_ac_parameter_declaration_1 == ac_parameter_declaration_1) && (l_ac_parameter_list_1 == ac_parameter_list_1)) return this; else { impl_ac_parameter_list* kc_result= Consac_parameter_list(l_ac_parameter_declaration_1, l_ac_parameter_list_1); kc_result->rewrite_members(this); return kc_result; } } } ac_parameter_declaration impl_ac_parameter_declaration_AcParDeclAbsdecl::rewrite(rview kc_current_view_base) { ac_declaration_specifiers l_ac_declaration_specifiers_1 = ac_declaration_specifiers_1->rewrite(kc_current_view_base); ac_abstract_declarator l_ac_abstract_declarator_1 = ac_abstract_declarator_1->rewrite(kc_current_view_base); ac_constant_expression_option l_ac_constant_expression_option_1 = ac_constant_expression_option_1->rewrite(kc_current_view_base); if ((l_ac_declaration_specifiers_1 == ac_declaration_specifiers_1) && (l_ac_abstract_declarator_1 == ac_abstract_declarator_1) && (l_ac_constant_expression_option_1 == ac_constant_expression_option_1)) return this; else { impl_ac_parameter_declaration_AcParDeclAbsdecl* kc_result= AcParDeclAbsdecl(l_ac_declaration_specifiers_1, l_ac_abstract_declarator_1, l_ac_constant_expression_option_1); kc_result->rewrite_members(this); return kc_result; } } ac_parameter_declaration impl_ac_parameter_declaration_AcParDeclDecl::rewrite(rview kc_current_view_base) { ac_declaration_specifiers l_ac_declaration_specifiers_1 = ac_declaration_specifiers_1->rewrite(kc_current_view_base); ac_declarator l_ac_declarator_1 = ac_declarator_1->rewrite(kc_current_view_base); ac_constant_expression_option l_ac_constant_expression_option_1 = ac_constant_expression_option_1->rewrite(kc_current_view_base); if ((l_ac_declaration_specifiers_1 == ac_declaration_specifiers_1) && (l_ac_declarator_1 == ac_declarator_1) && (l_ac_constant_expression_option_1 == ac_constant_expression_option_1)) return this; else { impl_ac_parameter_declaration_AcParDeclDecl* kc_result= AcParDeclDecl(l_ac_declaration_specifiers_1, l_ac_declarator_1, l_ac_constant_expression_option_1); kc_result->rewrite_members(this); return kc_result; } } ac_identifier_list impl_ac_identifier_list::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ID l_ID_1 = ID_1->rewrite(kc_current_view_base); ac_identifier_list l_ac_identifier_list_1 = ac_identifier_list_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_ac_identifier_list_1 == ac_identifier_list_1)) return this; else { impl_ac_identifier_list* kc_result= Consac_identifier_list(l_ID_1, l_ac_identifier_list_1); kc_result->rewrite_members(this); return kc_result; } } } ac_abstract_declarator impl_ac_abstract_declarator_AcAbsdeclDirdecl::rewrite(rview kc_current_view_base) { ac_pointer_option l_ac_pointer_option_1 = ac_pointer_option_1->rewrite(kc_current_view_base); ac_direct_abstract_declarator l_ac_direct_abstract_declarator_1 = ac_direct_abstract_declarator_1->rewrite(kc_current_view_base); if ((l_ac_pointer_option_1 == ac_pointer_option_1) && (l_ac_direct_abstract_declarator_1 == ac_direct_abstract_declarator_1)) return this; else { impl_ac_abstract_declarator_AcAbsdeclDirdecl* kc_result= AcAbsdeclDirdecl(l_ac_pointer_option_1, l_ac_direct_abstract_declarator_1); kc_result->rewrite_members(this); return kc_result; } } ac_abstract_declarator impl_ac_abstract_declarator_AcAbsdeclPointer::rewrite(rview kc_current_view_base) { ac_pointer l_ac_pointer_1 = ac_pointer_1->rewrite(kc_current_view_base); if ((l_ac_pointer_1 == ac_pointer_1)) return this; else { impl_ac_abstract_declarator_AcAbsdeclPointer* kc_result= AcAbsdeclPointer(l_ac_pointer_1); kc_result->rewrite_members(this); return kc_result; } } ac_direct_abstract_declarator_option impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator::rewrite(rview kc_current_view_base) { ac_direct_abstract_declarator l_ac_direct_abstract_declarator_1 = ac_direct_abstract_declarator_1->rewrite(kc_current_view_base); if ((l_ac_direct_abstract_declarator_1 == ac_direct_abstract_declarator_1)) return this; else { impl_ac_direct_abstract_declarator_option_Yesac_direct_abstract_declarator* kc_result= Yesac_direct_abstract_declarator(l_ac_direct_abstract_declarator_1); kc_result->rewrite_members(this); return kc_result; } } ac_direct_abstract_declarator_option impl_ac_direct_abstract_declarator_option_Noac_direct_abstract_declarator::rewrite(rview kc_current_view_base) { return this; } ac_direct_abstract_declarator impl_ac_direct_abstract_declarator_AcDirAbsdeclFn::rewrite(rview kc_current_view_base) { ac_direct_abstract_declarator_option l_ac_direct_abstract_declarator_option_1 = ac_direct_abstract_declarator_option_1->rewrite(kc_current_view_base); ac_parameter_type_list l_ac_parameter_type_list_1 = ac_parameter_type_list_1->rewrite(kc_current_view_base); if ((l_ac_direct_abstract_declarator_option_1 == ac_direct_abstract_declarator_option_1) && (l_ac_parameter_type_list_1 == ac_parameter_type_list_1)) return this; else { impl_ac_direct_abstract_declarator_AcDirAbsdeclFn* kc_result= AcDirAbsdeclFn(l_ac_direct_abstract_declarator_option_1, l_ac_parameter_type_list_1); kc_result->rewrite_members(this); return kc_result; } } ac_direct_abstract_declarator impl_ac_direct_abstract_declarator_AcDirAbsdeclArray::rewrite(rview kc_current_view_base) { ac_direct_abstract_declarator_option l_ac_direct_abstract_declarator_option_1 = ac_direct_abstract_declarator_option_1->rewrite(kc_current_view_base); ac_constant_expression_option l_ac_constant_expression_option_1 = ac_constant_expression_option_1->rewrite(kc_current_view_base); if ((l_ac_direct_abstract_declarator_option_1 == ac_direct_abstract_declarator_option_1) && (l_ac_constant_expression_option_1 == ac_constant_expression_option_1)) return this; else { impl_ac_direct_abstract_declarator_AcDirAbsdeclArray* kc_result= AcDirAbsdeclArray(l_ac_direct_abstract_declarator_option_1, l_ac_constant_expression_option_1); kc_result->rewrite_members(this); return kc_result; } } ac_direct_abstract_declarator impl_ac_direct_abstract_declarator_AcDirAbsdeclPack::rewrite(rview kc_current_view_base) { ac_abstract_declarator l_ac_abstract_declarator_1 = ac_abstract_declarator_1->rewrite(kc_current_view_base); if ((l_ac_abstract_declarator_1 == ac_abstract_declarator_1)) return this; else { impl_ac_direct_abstract_declarator_AcDirAbsdeclPack* kc_result= AcDirAbsdeclPack(l_ac_abstract_declarator_1); kc_result->rewrite_members(this); return kc_result; } } ac_constant_expression_option impl_ac_constant_expression_option_Noac_constant_expression::rewrite(rview kc_current_view_base) { return this; } ac_constant_expression_option impl_ac_constant_expression_option_Yesac_constant_expression::rewrite(rview kc_current_view_base) { ac_constant_expression l_ac_constant_expression_1 = ac_constant_expression_1->rewrite(kc_current_view_base); if ((l_ac_constant_expression_1 == ac_constant_expression_1)) return this; else { impl_ac_constant_expression_option_Yesac_constant_expression* kc_result= Yesac_constant_expression(l_ac_constant_expression_1); kc_result->rewrite_members(this); return kc_result; } } ac_constant_expression impl_ac_constant_expression_AcConstExpr::rewrite(rview kc_current_view_base) { Cexpression l_Cexpression_1 = Cexpression_1->rewrite(kc_current_view_base); if ((l_Cexpression_1 == Cexpression_1)) return this; else { impl_ac_constant_expression_AcConstExpr* kc_result= AcConstExpr(l_Cexpression_1); kc_result->rewrite_members(this); return kc_result; } } ac_constant_expression_list impl_ac_constant_expression_list::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ac_constant_expression l_ac_constant_expression_1 = ac_constant_expression_1->rewrite(kc_current_view_base); ac_constant_expression_list l_ac_constant_expression_list_1 = ac_constant_expression_list_1->rewrite(kc_current_view_base); if ((l_ac_constant_expression_1 == ac_constant_expression_1) && (l_ac_constant_expression_list_1 == ac_constant_expression_list_1)) return this; else { impl_ac_constant_expression_list* kc_result= Consac_constant_expression_list(l_ac_constant_expression_1, l_ac_constant_expression_list_1); kc_result->rewrite_members(this); return kc_result; } } } ac_opt_base_init_list impl_ac_opt_base_init_list_AcYesBaseInit::rewrite(rview kc_current_view_base) { ac_base_init_list l_ac_base_init_list_1 = ac_base_init_list_1->rewrite(kc_current_view_base); if ((l_ac_base_init_list_1 == ac_base_init_list_1)) return this; else { impl_ac_opt_base_init_list_AcYesBaseInit* kc_result= AcYesBaseInit(l_ac_base_init_list_1); kc_result->rewrite_members(this); return kc_result; } } ac_opt_base_init_list impl_ac_opt_base_init_list_AcNoBaseInit::rewrite(rview kc_current_view_base) { return this; } ac_base_init_list impl_ac_base_init_list::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ac_base_init l_ac_base_init_1 = ac_base_init_1->rewrite(kc_current_view_base); ac_base_init_list l_ac_base_init_list_1 = ac_base_init_list_1->rewrite(kc_current_view_base); if ((l_ac_base_init_1 == ac_base_init_1) && (l_ac_base_init_list_1 == ac_base_init_list_1)) return this; else { impl_ac_base_init_list* kc_result= Consac_base_init_list(l_ac_base_init_1, l_ac_base_init_list_1); kc_result->rewrite_members(this); return kc_result; } } } ac_base_init impl_ac_base_init_AcBaseInit::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); ac_constant_expression_list l_ac_constant_expression_list_1 = ac_constant_expression_list_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_ac_constant_expression_list_1 == ac_constant_expression_list_1)) return this; else { impl_ac_base_init_AcBaseInit* kc_result= AcBaseInit(l_ID_1, l_ac_constant_expression_list_1); kc_result->rewrite_members(this); return kc_result; } } baseclass_declarations impl_baseclass_declarations::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons baseclass_decl l_baseclass_decl_1 = baseclass_decl_1->rewrite(kc_current_view_base); baseclass_declarations l_baseclass_declarations_1 = baseclass_declarations_1->rewrite(kc_current_view_base); if ((l_baseclass_decl_1 == baseclass_decl_1) && (l_baseclass_declarations_1 == baseclass_declarations_1)) return this; else { impl_baseclass_declarations* kc_result= Consbaseclass_declarations(l_baseclass_decl_1, l_baseclass_declarations_1); kc_result->rewrite_members(this); return kc_result; } } } baseclass_decl impl_baseclass_decl_BaseClassDecl::rewrite(rview kc_current_view_base) { ID l_ID_1 = ID_1->rewrite(kc_current_view_base); baseclass_list l_baseclass_list_1 = baseclass_list_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_baseclass_list_1 == baseclass_list_1)) return this; else { impl_baseclass_decl_BaseClassDecl* kc_result= BaseClassDecl(l_ID_1, l_baseclass_list_1); kc_result->rewrite_members(this); return kc_result; } } baseclass_list impl_baseclass_list::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons ID l_ID_1 = ID_1->rewrite(kc_current_view_base); baseclass_list l_baseclass_list_1 = baseclass_list_1->rewrite(kc_current_view_base); if ((l_ID_1 == ID_1) && (l_baseclass_list_1 == baseclass_list_1)) return this; else { impl_baseclass_list* kc_result= Consbaseclass_list(l_ID_1, l_baseclass_list_1); kc_result->rewrite_members(this); return kc_result; } } } error impl_error_Warning::rewrite(rview kc_current_view_base) { fileline l_fileline_1 = fileline_1->rewrite(kc_current_view_base); problem l_problem_1 = problem_1->rewrite(kc_current_view_base); if ((l_fileline_1 == fileline_1) && (l_problem_1 == problem_1)) return this; else { impl_error_Warning* kc_result= Warning(l_fileline_1, l_problem_1); kc_result->rewrite_members(this); return kc_result; } } error impl_error_NonFatal::rewrite(rview kc_current_view_base) { fileline l_fileline_1 = fileline_1->rewrite(kc_current_view_base); problem l_problem_1 = problem_1->rewrite(kc_current_view_base); if ((l_fileline_1 == fileline_1) && (l_problem_1 == problem_1)) return this; else { impl_error_NonFatal* kc_result= NonFatal(l_fileline_1, l_problem_1); kc_result->rewrite_members(this); return kc_result; } } error impl_error_Fatal::rewrite(rview kc_current_view_base) { fileline l_fileline_1 = fileline_1->rewrite(kc_current_view_base); problem l_problem_1 = problem_1->rewrite(kc_current_view_base); if ((l_fileline_1 == fileline_1) && (l_problem_1 == problem_1)) return this; else { impl_error_Fatal* kc_result= Fatal(l_fileline_1, l_problem_1); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem6::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); casestring l_casestring_2 = casestring_2->rewrite(kc_current_view_base); casestring l_casestring_3 = casestring_3->rewrite(kc_current_view_base); casestring l_casestring_4 = casestring_4->rewrite(kc_current_view_base); casestring l_casestring_5 = casestring_5->rewrite(kc_current_view_base); casestring l_casestring_6 = casestring_6->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_casestring_2 == casestring_2) && (l_casestring_3 == casestring_3) && (l_casestring_4 == casestring_4) && (l_casestring_5 == casestring_5) && (l_casestring_6 == casestring_6)) return this; else { impl_problem_Problem6* kc_result= Problem6(l_casestring_1, l_casestring_2, l_casestring_3, l_casestring_4, l_casestring_5, l_casestring_6); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem5::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); casestring l_casestring_2 = casestring_2->rewrite(kc_current_view_base); casestring l_casestring_3 = casestring_3->rewrite(kc_current_view_base); casestring l_casestring_4 = casestring_4->rewrite(kc_current_view_base); casestring l_casestring_5 = casestring_5->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_casestring_2 == casestring_2) && (l_casestring_3 == casestring_3) && (l_casestring_4 == casestring_4) && (l_casestring_5 == casestring_5)) return this; else { impl_problem_Problem5* kc_result= Problem5(l_casestring_1, l_casestring_2, l_casestring_3, l_casestring_4, l_casestring_5); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem4::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); casestring l_casestring_2 = casestring_2->rewrite(kc_current_view_base); casestring l_casestring_3 = casestring_3->rewrite(kc_current_view_base); casestring l_casestring_4 = casestring_4->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_casestring_2 == casestring_2) && (l_casestring_3 == casestring_3) && (l_casestring_4 == casestring_4)) return this; else { impl_problem_Problem4* kc_result= Problem4(l_casestring_1, l_casestring_2, l_casestring_3, l_casestring_4); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem3int1::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); casestring l_casestring_2 = casestring_2->rewrite(kc_current_view_base); casestring l_casestring_3 = casestring_3->rewrite(kc_current_view_base); integer l_integer_1 = integer_1->rewrite(kc_current_view_base); casestring l_casestring_4 = casestring_4->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_casestring_2 == casestring_2) && (l_casestring_3 == casestring_3) && (l_integer_1 == integer_1) && (l_casestring_4 == casestring_4)) return this; else { impl_problem_Problem3int1* kc_result= Problem3int1(l_casestring_1, l_casestring_2, l_casestring_3, l_integer_1, l_casestring_4); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem3::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); casestring l_casestring_2 = casestring_2->rewrite(kc_current_view_base); casestring l_casestring_3 = casestring_3->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_casestring_2 == casestring_2) && (l_casestring_3 == casestring_3)) return this; else { impl_problem_Problem3* kc_result= Problem3(l_casestring_1, l_casestring_2, l_casestring_3); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem2::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); casestring l_casestring_2 = casestring_2->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_casestring_2 == casestring_2)) return this; else { impl_problem_Problem2* kc_result= Problem2(l_casestring_1, l_casestring_2); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem1storageoption1ID::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); storageoption l_storageoption_1 = storageoption_1->rewrite(kc_current_view_base); casestring l_casestring_2 = casestring_2->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_storageoption_1 == storageoption_1) && (l_casestring_2 == casestring_2) && (l_ID_1 == ID_1)) return this; else { impl_problem_Problem1storageoption1ID* kc_result= Problem1storageoption1ID(l_casestring_1, l_storageoption_1, l_casestring_2, l_ID_1); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem1INT1ID1ID::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); INT l_INT_1 = INT_1->rewrite(kc_current_view_base); casestring l_casestring_2 = casestring_2->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); casestring l_casestring_3 = casestring_3->rewrite(kc_current_view_base); ID l_ID_2 = ID_2->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_INT_1 == INT_1) && (l_casestring_2 == casestring_2) && (l_ID_1 == ID_1) && (l_casestring_3 == casestring_3) && (l_ID_2 == ID_2)) return this; else { impl_problem_Problem1INT1ID1ID* kc_result= Problem1INT1ID1ID(l_casestring_1, l_INT_1, l_casestring_2, l_ID_1, l_casestring_3, l_ID_2); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem1ID1ID1ID::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); casestring l_casestring_2 = casestring_2->rewrite(kc_current_view_base); ID l_ID_2 = ID_2->rewrite(kc_current_view_base); casestring l_casestring_3 = casestring_3->rewrite(kc_current_view_base); ID l_ID_3 = ID_3->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_ID_1 == ID_1) && (l_casestring_2 == casestring_2) && (l_ID_2 == ID_2) && (l_casestring_3 == casestring_3) && (l_ID_3 == ID_3)) return this; else { impl_problem_Problem1ID1ID1ID* kc_result= Problem1ID1ID1ID(l_casestring_1, l_ID_1, l_casestring_2, l_ID_2, l_casestring_3, l_ID_3); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem1INT1ID::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); INT l_INT_1 = INT_1->rewrite(kc_current_view_base); casestring l_casestring_2 = casestring_2->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_INT_1 == INT_1) && (l_casestring_2 == casestring_2) && (l_ID_1 == ID_1)) return this; else { impl_problem_Problem1INT1ID* kc_result= Problem1INT1ID(l_casestring_1, l_INT_1, l_casestring_2, l_ID_1); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem1int1::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); integer l_integer_1 = integer_1->rewrite(kc_current_view_base); casestring l_casestring_2 = casestring_2->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_integer_1 == integer_1) && (l_casestring_2 == casestring_2)) return this; else { impl_problem_Problem1int1* kc_result= Problem1int1(l_casestring_1, l_integer_1, l_casestring_2); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem1INT::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); INT l_INT_1 = INT_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_INT_1 == INT_1)) return this; else { impl_problem_Problem1INT* kc_result= Problem1INT(l_casestring_1, l_INT_1); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem1t1ID::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); IDtype l_IDtype_1 = IDtype_1->rewrite(kc_current_view_base); casestring l_casestring_2 = casestring_2->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_IDtype_1 == IDtype_1) && (l_casestring_2 == casestring_2) && (l_ID_1 == ID_1)) return this; else { impl_problem_Problem1t1ID* kc_result= Problem1t1ID(l_casestring_1, l_IDtype_1, l_casestring_2, l_ID_1); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem1ID1ID::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); casestring l_casestring_2 = casestring_2->rewrite(kc_current_view_base); ID l_ID_2 = ID_2->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_ID_1 == ID_1) && (l_casestring_2 == casestring_2) && (l_ID_2 == ID_2)) return this; else { impl_problem_Problem1ID1ID* kc_result= Problem1ID1ID(l_casestring_1, l_ID_1, l_casestring_2, l_ID_2); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem1we::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); withexpression l_withexpression_1 = withexpression_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_withexpression_1 == withexpression_1)) return this; else { impl_problem_Problem1we* kc_result= Problem1we(l_casestring_1, l_withexpression_1); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem1tID::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_ID_1 == ID_1)) return this; else { impl_problem_Problem1tID* kc_result= Problem1tID(l_casestring_1, l_ID_1); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem1ID::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); ID l_ID_1 = ID_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1) && (l_ID_1 == ID_1)) return this; else { impl_problem_Problem1ID* kc_result= Problem1ID(l_casestring_1, l_ID_1); kc_result->rewrite_members(this); return kc_result; } } problem impl_problem_Problem1::rewrite(rview kc_current_view_base) { casestring l_casestring_1 = casestring_1->rewrite(kc_current_view_base); if ((l_casestring_1 == casestring_1)) return this; else { impl_problem_Problem1* kc_result= Problem1(l_casestring_1); kc_result->rewrite_members(this); return kc_result; } } addedphylumdeclarations impl_addedphylumdeclarations::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons addedphylumdeclaration l_addedphylumdeclaration_1 = addedphylumdeclaration_1->rewrite(kc_current_view_base); addedphylumdeclarations l_addedphylumdeclarations_1 = addedphylumdeclarations_1->rewrite(kc_current_view_base); if ((l_addedphylumdeclaration_1 == addedphylumdeclaration_1) && (l_addedphylumdeclarations_1 == addedphylumdeclarations_1)) return this; else { impl_addedphylumdeclarations* kc_result= Consaddedphylumdeclarations(l_addedphylumdeclaration_1, l_addedphylumdeclarations_1); kc_result->rewrite_members(this); return kc_result; } } } addedphylumdeclaration impl_addedphylumdeclaration_AddedPhylumdeclaration::rewrite(rview kc_current_view_base) { uniqID l_uniqID_1 = uniqID_1->rewrite(kc_current_view_base); if ((l_uniqID_1 == uniqID_1)) return this; else { impl_addedphylumdeclaration_AddedPhylumdeclaration* kc_result= AddedPhylumdeclaration(l_uniqID_1); kc_result->rewrite_members(this); return kc_result; } } countedphylumdeclarations impl_countedphylumdeclarations::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons countedphylumdeclaration l_countedphylumdeclaration_1 = countedphylumdeclaration_1->rewrite(kc_current_view_base); countedphylumdeclarations l_countedphylumdeclarations_1 = countedphylumdeclarations_1->rewrite(kc_current_view_base); if ((l_countedphylumdeclaration_1 == countedphylumdeclaration_1) && (l_countedphylumdeclarations_1 == countedphylumdeclarations_1)) return this; else { impl_countedphylumdeclarations* kc_result= Conscountedphylumdeclarations(l_countedphylumdeclaration_1, l_countedphylumdeclarations_1); kc_result->rewrite_members(this); return kc_result; } } } countedphylumdeclaration impl_countedphylumdeclaration_CountedPhylumdeclaration::rewrite(rview kc_current_view_base) { uniqID l_uniqID_1 = uniqID_1->rewrite(kc_current_view_base); if ((l_uniqID_1 == uniqID_1)) return this; else { impl_countedphylumdeclaration_CountedPhylumdeclaration* kc_result= CountedPhylumdeclaration(l_uniqID_1); kc_result->rewrite_members(this); return kc_result; } } charruns impl_charruns_Stars::rewrite(rview kc_current_view_base) { return this; } charruns impl_charruns_QuotedNewlines::rewrite(rview kc_current_view_base) { return this; } charruns impl_charruns_Newlines::rewrite(rview kc_current_view_base) { return this; } bindingidmarks impl_bindingidmarks::rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons bindingidmark l_bindingidmark_1 = bindingidmark_1->rewrite(kc_current_view_base); bindingidmarks l_bindingidmarks_1 = bindingidmarks_1->rewrite(kc_current_view_base); if ((l_bindingidmark_1 == bindingidmark_1) && (l_bindingidmarks_1 == bindingidmarks_1)) return this; else { impl_bindingidmarks* kc_result= Consbindingidmarks(l_bindingidmark_1, l_bindingidmarks_1); kc_result->rewrite_members(this); return kc_result; } } } bindingidmark impl_bindingidmark_BindingIdMark::rewrite(rview kc_current_view_base) { uniqID l_uniqID_1 = uniqID_1->rewrite(kc_current_view_base); if ((l_uniqID_1 == uniqID_1)) return this; else { impl_bindingidmark_BindingIdMark* kc_result= BindingIdMark(l_uniqID_1); kc_result->rewrite_members(this); return kc_result; } } } // namespace kc kimwitu++-2.3.13/src/Gen.boot/pat.h0000644000175000017500000000575411135163773015356 0ustar useruser/* translation of file "pat.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #ifndef KC_FUNCTIONS_pat_HEADER #define KC_FUNCTIONS_pat_HEADER #include "k.h" // in case a user forgets namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // /* end included stuff */ namespace kc { patternrepresentations syn_patternchains (patternchains a_patternchains); patternrepresentation syn_patternchain (patternchain a_patternchain, path a_path); patternrepresentation syn_patternchainitem (patternchainitem a_patternchainitem, path a_path); patternrepresentations syn_outmostpatterns (outmostpatterns a_outmostpatterns); void clone_TypeFileLine (elem_patternrepresentation tmp1, outmostpattern a_outmostpattern); bool f_bindingidmarked (ID id); void v_markbindingid (ID id); void v_resetbindingidmarks (); patternrepresentations add_predicates_to_patternrepresentations (patternrepresentations a_patternreps); void v_add_rewriterulesinfo_to_operator (patternrepresentations a_patternreps, rewriteclauses rc); withcasesinfo f_withcasesinfo (patternrepresentations a_patternreps, Ctext ct); void v_add_unparsedeclsinfo_to_operator (patternrepresentations a_patternreps, unparseclauses uc); withcasesinfo insertin_withcasesinfo (withcaseinfo new_case, withcasesinfo old_cases); bool lt_withcaseinfo (withcaseinfo a_withcaseinfo1, withcaseinfo a_withcaseinfo2); void warn_drop_identical_pattern (rewriteruleinfo rri); void warn_drop_identical_pattern (withcaseinfo wci); void warn_drop_identical_pattern (unparsedeclinfo udi); void warn_drop_identical_pattern (patternrepresentation pr); void check_rewrite_patterns (rewriterulesinfo rri); void check_with_patterns (withcasesinfo wcs); void check_unparse_patterns (unparsedeclsinfo udi); void check_patterns (patternrepresentations prs); patternrepresentation next (patternrepresentation p); elem_patternrepresentation elem (patternrepresentation p); void compare_patterns (patternrepresentation pr1, patternrepresentation pr2, patternrepresentations other_patterns); } // namespace kc #endif // ! KC_FUNCTIONS_pat_HEADER kimwitu++-2.3.13/src/Gen.boot/gutil.h0000644000175000017500000000713311135163773015707 0ustar useruser/* translation of file "gutil.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #ifndef KC_FUNCTIONS_gutil_HEADER #define KC_FUNCTIONS_gutil_HEADER #include "k.h" // in case a user forgets namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // extern phylumdeclaration The_abstract_phylum_decl; extern phylumdeclaration The_abstract_phylum_ref_decl; extern phylumdeclaration The_abstract_list_decl; /* end included stuff */ namespace kc { bool f_something_to_initialize (Ccode_option cco); bool f_something_to_initialize (alternative a); bool f_NilCtexts (Ctexts c); bool f_constructors_in_operatordecl (alternative op); bool f_constructors_in_phylumdecl (phylumdeclaration ph); bool f_destructors_in_operatordecl (alternative op); bool f_destructors_in_phylumdecl (phylumdeclaration ph); bool f_no_params (ac_parameter_type_list p); bool f_post_create_in_operatordecl (alternative op); bool f_post_create_in_phylumdecl (phylumdeclaration ph); bool f_rewrite_in_phylumdecl (phylumdeclaration ph); bool f_rewrite_in_operatordecl (alternative op); ID f_phylumofwithcasesinfo (withcasesinfo wcso); ID f_phylumofpatternrepresentation (patternrepresentation a_patrep); ac_parameter_type_list sort_extend_parameter_type_list (ac_declaration_list C_vardecls, ac_declarator decl); ac_parameter_list t_sort_extend_parameter_list (ac_declaration_list C_vardecls, ac_identifier_list fn_args, ac_parameter_list temp); void unparse (const char *s, printer_functor printer_fn, uview v); ID f_mkselvar (const char *prefix, int level); string f_mk_filename (casestring a_casestring, const string &suffix); string f_make_identifier_basename (string fn); rewriterulesinfo f_rewriterulesinfoofalternativeinview (alternative a_alternative, ID a_view); rewriteviewsinfo f_rewriteviewsinfo_of_alternative (alternative a_alternative, viewnames a_views); unparseviewsinfo f_unparseviewsinfo_of_alternative (alternative a_alternative, viewnames a_views); ID f_typeof (path a_path); ID f_operatorofpatternrepresentation (patternrepresentation a_patternrepresentation); ID f_typeofunpsubterm (unpsubterm a_unpsubterm, ID a_operator); elem_patternrepresentation f_outmost_nl_preds_in_rewriterulesinfo (rewriterulesinfo ri); elem_patternrepresentation f_outmost_nl_preds_in_unparsedeclsinfo (unparsedeclsinfo ri); bool f_is_known_ptr_type (ID id); withcasesinfo rewrite_withcasesinfo (withcasesinfo a_withcasesinfo); int pos_of_sole_dollar_or_pattern_in_patternchain (patternchain a_patternchain); int t_pos_of_sole_dollar_or_pattern_in_patternchain (patternchain a_patternchain, int tmp_result, int pos); string f_getidentfromstring (const char **c); } // namespace kc #endif // ! KC_FUNCTIONS_gutil_HEADER kimwitu++-2.3.13/src/Gen.boot/abs.cc0000644000175000017500000000305511135163773015465 0ustar useruser/* translation of file "abs.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #define KC_FUNCTIONS_abs #include #include "k.h" #include "abs.h" namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // static char abs_kAccesSid[] = "@(#)$Id: abs.k,v 1.36 2008/02/06 20:28:58 piefel Exp $"; /* end included stuff */ namespace kc { #ifndef KC_TRACE_PROVIDED #define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND #endif impl_fileline_FileLine::impl_fileline_FileLine(casestring _file, int _line) { file = (_file!=0) ? _file : mkcasestring(""); line=_line; } } // namespace kc kimwitu++-2.3.13/src/Gen.boot/util.cc0000644000175000017500000015117111135163773015700 0ustar useruser/* translation of file "util.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #define KC_FUNCTIONS_util #include #include "k.h" #include "util.h" namespace kc { } using namespace kc; /* included stuff */ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // static char util_kAccesSid[] = "@(#)$Id: util.k,v 1.54 2008/02/06 20:28:59 piefel Exp $"; addedphylumdeclarations pl_addedphylumdeclarations = 0; countedphylumdeclarations pl_countedphylumdeclarations = 0; #include /* for strcmp */ #include "parse.h" /* for f_lookupdecl */ static unparseitems** string_collection; static unparseitems The_Nilunparseitems; unparseitems The_current_unparseitems; /* end included stuff */ namespace kc { #ifndef KC_TRACE_PROVIDED #define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND #endif static ID f_do_check_unpattributes_in_phylum (unpattributes a, ID p); static void v_do_check_dollarvar_in_operators (INT i, operators o, ID p); static ID f_do_subphylum (arguments a, INT i, int a_i); static argument f_do_argument (arguments a, INT i, int a_i); static alternative f_do_alternative (alternatives a, int i, int a_i); static storageclasses do_add_to_storageclasses (ID v, ID p, storageclasses s, storageclasses all); bool f_added(ID id) { { ID kc_selvar_0_1 = phylum_cast( id ); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; return AddedPhylumdeclaration( uid )->added; } else { kc_no_default_in_with( "f_added", __LINE__, __FILE__ ); return static_cast(0); } } } void v_add(ID id) { { ID kc_selvar_0_1 = phylum_cast( id ); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; AddedPhylumdeclaration( uid )->added = true; } else kc_no_default_in_with( "v_add", __LINE__, __FILE__ ); } } void v_freeadded() { pl_addedphylumdeclarations->free( true ); pl_addedphylumdeclarations = 0; } int f_getcount(ID id) { { ID kc_selvar_0_1 = phylum_cast( id ); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; return ++(CountedPhylumdeclaration( uid ) -> count); } else { return 0; /* NOTREACHED */ } } } void v_resetcount() { if (pl_countedphylumdeclarations) { { countedphylumdeclarations kc_fe_selvar_1 = pl_countedphylumdeclarations ; while( kc_fe_selvar_1->prod_sel() == sel_Conscountedphylumdeclarations ) { countedphylumdeclaration kc_selvar_0_1 = kc_fe_selvar_1->countedphylumdeclaration_1; { { { const countedphylumdeclaration c = kc_selvar_0_1; c->count = 0; } } } kc_fe_selvar_1 = kc_fe_selvar_1->countedphylumdeclarations_1; } } } } void v_freecount() { if (pl_countedphylumdeclarations) { v_resetcount(); pl_countedphylumdeclarations->free( true ); pl_countedphylumdeclarations = 0; } } bool is_uview_var(ID id) { if(!The_current_unparseitems) return false; { unparseitems kc_fe_selvar_1 = The_current_unparseitems; while( kc_fe_selvar_1->prod_sel() == sel_Consunparseitems ) { unparseitem kc_selvar_0_1 = kc_fe_selvar_1->unparseitem_1; { { { const unparseitem item = kc_selvar_0_1; { unparseitem kc_selvar_1_1 = phylum_cast(item); if ((kc_selvar_1_1->prod_sel() == sel_UViewVarDecl)) { const ID var = phylum_cast(kc_selvar_1_1)->ID_2; if(var->eq(id)) { id->type=ITUViewVar(); return true; } } else { } } } } } kc_fe_selvar_1 = kc_fe_selvar_1->unparseitems_1; } } return false; } bool f_DvIsDisallowed(dollarvarstatus dvs) {{ dollarvarstatus kc_selvar_0_1 = phylum_cast(dvs); if ((kc_selvar_0_1->prod_sel() == sel_DVDisallowed)) { return true; } else if ((kc_selvar_0_1->prod_sel() == sel_DVAllowed)) { return false; } else { kc_no_default_in_with( "f_DvIsDisallowed", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_listelementphylum(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserPhylum)) { const phylumdeclaration pd = phylum_cast(kc_selvar_1_1)->phylumdeclaration_1; { phylumdeclaration kc_selvar_2_1 = phylum_cast( pd ); if ((kc_selvar_2_1->prod_sel() == sel_PhylumDeclaration) && (phylum_cast(kc_selvar_2_1)->productionblock_1->prod_sel() == sel_ListAlternatives)) { const ID i = phylum_cast(phylum_cast(kc_selvar_2_1)->productionblock_1)->ID_1; return i; } else { return f_emptyId(); } } } else { return f_emptyId(); } } } else { kc_no_default_in_with( "f_listelementphylum", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_listelementconsoperator(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserPhylum)) { const phylumdeclaration pd = phylum_cast(kc_selvar_1_1)->phylumdeclaration_1; { phylumdeclaration kc_selvar_2_1 = phylum_cast( pd ); if ((kc_selvar_2_1->prod_sel() == sel_PhylumDeclaration) && (phylum_cast(kc_selvar_2_1)->productionblock_1->prod_sel() == sel_ListAlternatives) && (phylum_cast(phylum_cast(kc_selvar_2_1)->productionblock_1)->alternatives_1->prod_sel() == sel_Consalternatives) && ((phylum_cast(phylum_cast(kc_selvar_2_1)->productionblock_1)->alternatives_1)->alternative_1->prod_sel() == sel_Alternative)) { const ID Cons_id = phylum_cast((phylum_cast(phylum_cast(kc_selvar_2_1)->productionblock_1)->alternatives_1)->alternative_1)->ID_1; return Cons_id; } else { return f_emptyId(); } } } else { return f_emptyId(); } } } else { kc_no_default_in_with( "f_listelementconsoperator", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_emptyId() { static ID emptyID = 0; if (! emptyID) { emptyID = Id (Str( mkcasestring( "" ))); } return emptyID; } bool f_operatorinphylum(ID oid, ID pid) {{ ID kc_selvar_0_1 = phylum_cast(oid); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserOperator)) { const ID id = phylum_cast(kc_selvar_1_1)->ID_1; return pid->eq( id ); } else { return false; } } } else { kc_no_default_in_with( "f_operatorinphylum", __LINE__, __FILE__ ); return static_cast(0); } } } bool f_isphylum(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserPhylum)) { return true; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedPhylum)) { return true; } else { return false; } } } else { kc_no_default_in_with( "f_isphylum", __LINE__, __FILE__ ); return static_cast(0); } } } phylumdeclaration f_phylumdeclofid(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserPhylum)) { const phylumdeclaration dcl = phylum_cast(kc_selvar_1_1)->phylumdeclaration_1; return dcl; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedPhylum)) { const phylumdeclaration dcl = phylum_cast(kc_selvar_1_1)->phylumdeclaration_1; return dcl; } else { return NULL; } } } else { kc_no_default_in_with( "f_phylumdeclofid", __LINE__, __FILE__ ); return static_cast(0); } } } bool f_ispredefinedphylum(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedPhylum)) { return true; } else { return false; } } } else { kc_no_default_in_with( "f_ispredefinedphylum", __LINE__, __FILE__ ); return static_cast(0); } } } alternative f_alternativeofoperator(ID oid) {{ ID kc_selvar_0_1 = phylum_cast(oid); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserOperator)) { const alternative a = phylum_cast(kc_selvar_1_1)->alternative_1; return a; } else { return 0; } } } else { kc_no_default_in_with( "f_alternativeofoperator", __LINE__, __FILE__ ); return static_cast(0); } } } arguments f_argumentsofoperator(ID oid) {{ ID kc_selvar_0_1 = phylum_cast(oid); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserOperator) && (phylum_cast(kc_selvar_1_1)->alternative_1->prod_sel() == sel_Alternative)) { const arguments args = phylum_cast(phylum_cast(kc_selvar_1_1)->alternative_1)->arguments_1; return args; } else { return Nilarguments(); } } } else { kc_no_default_in_with( "f_argumentsofoperator", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_phylumofoperator(ID oid) {{ ID kc_selvar_0_1 = phylum_cast(oid); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITUserOperator)) { const ID id = phylum_cast(kc_selvar_1_1)->ID_1; return id; } else if ((kc_selvar_1_1->prod_sel() == sel_ITPredefinedOperator)) { const ID id = phylum_cast(kc_selvar_1_1)->ID_1; return id; } else { return f_emptyId(); } } } else { kc_no_default_in_with( "f_phylumofoperator", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_phylumofpatternID(ID vid) { { IDtype kc_selvar_0_1 = phylum_cast( vid->type ); if ((kc_selvar_0_1->prod_sel() == sel_ITPatternVariable)) { const ID id = phylum_cast(kc_selvar_0_1)->ID_1; return id; } else { return f_emptyId(); } } } ID f_phylumofpatternvariable(ID vid) {{ ID kc_selvar_0_1 = phylum_cast(vid); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITPatternVariable)) { const ID id = phylum_cast(kc_selvar_1_1)->ID_1; return id; } else { return f_emptyId(); } } } else { kc_no_default_in_with( "f_phylumofpatternvariable", __LINE__, __FILE__ ); return static_cast(0); } } } void v_syn_type_attribute_ID(ID id) {{ ID kc_selvar_0_1 = phylum_cast(id); if ((kc_selvar_0_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_0_1)->uniqID_1; { IDtype kc_selvar_1_1 = phylum_cast( uid->type ); if ((kc_selvar_1_1->prod_sel() == sel_ITPatternVariable)) { id->type = uid->type; } else { /* EMPTY */ } } } else kc_no_default_in_with( "v_syn_type_attribute_ID", __LINE__, __FILE__ ); } } bool f_Nilarguments(arguments a) {{ arguments kc_selvar_0_1 = phylum_cast(a); if ((kc_selvar_0_1->prod_sel() == sel_Consarguments)) { return false; } else if ((kc_selvar_0_1->prod_sel() == sel_Nilarguments)) { return true; } else { kc_no_default_in_with( "f_Nilarguments", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_hd_arguments(arguments a) {{ arguments kc_selvar_0_1 = phylum_cast(a); if ((kc_selvar_0_1->prod_sel() == sel_Consarguments)) { const ID hd = (kc_selvar_0_1)->ID_1; return hd; } else if ((kc_selvar_0_1->prod_sel() == sel_Nilarguments)) { assertionFailed("Head of empty argument list requested"); return 0; } else { kc_no_default_in_with( "f_hd_arguments", __LINE__, __FILE__ ); return static_cast(0); } } } arguments f_tl_arguments(arguments a) {{ arguments kc_selvar_0_1 = phylum_cast(a); if ((kc_selvar_0_1->prod_sel() == sel_Consarguments)) { const arguments tl = (kc_selvar_0_1)->arguments_1; return tl; } else if ((kc_selvar_0_1->prod_sel() == sel_Nilarguments)) { assertionFailed("Tail of empty argument list requested"); return 0; } else { kc_no_default_in_with( "f_tl_arguments", __LINE__, __FILE__ ); return static_cast(0); } } } void v_check_dollarvar_attribute_in_operators(INT i, unpattributes a, operators o) {{ operators kc_selvar_0_1 = phylum_cast(o); if ((kc_selvar_0_1->prod_sel() == sel_Consoperators)) { const ID o_o = (kc_selvar_0_1)->ID_1; const operators o_os = (kc_selvar_0_1)->operators_1; ID phy = f_subphylumofoperator( o_o, i ); if (phy->eq(f_emptyId())) { v_report(NonFatal( FileLine( i->file, i->line ), Problem1S1INT1S1ID( "illegal dollar variable", i, "not that many subterms in operator", o_o ))); } else { f_check_unpattributes_in_phylum( a, phy ); v_do_check_dollarvar_in_operators( i, o_os, phy ); } } else if ((kc_selvar_0_1->prod_sel() == sel_Niloperators)) { /* EMPTY */ } else kc_no_default_in_with( "v_check_dollarvar_attribute_in_operators", __LINE__, __FILE__ ); } } ID f_check_unpattributes_in_phylum(unpattributes a, ID p) { ID tmp; unpattributes t = a->reverse(); tmp = f_do_check_unpattributes_in_phylum( t, p ); t->freelist(); return tmp; } static ID f_do_check_unpattributes_in_phylum(unpattributes a, ID p) {{ unpattributes kc_selvar_0_1 = phylum_cast(a); if ((kc_selvar_0_1->prod_sel() == sel_Consunpattributes)) { const ID a_id = (kc_selvar_0_1)->ID_1; const unpattributes r_a = (kc_selvar_0_1)->unpattributes_1; ID type = f_typeof_attribute_in_phylym( a_id, p ); if ( type->eq(f_emptyId() )) { v_report(NonFatal( FileLine( a_id->file, a_id->line ), Problem1S1ID1S1ID( "attribute", a_id, "not defined in phylum", p ))); return f_emptyId(); } else { return f_do_check_unpattributes_in_phylum( r_a, type ); } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilunpattributes)) { return p; } else { kc_no_default_in_with( "f_do_check_unpattributes_in_phylum", __LINE__, __FILE__ ); return static_cast(0); } } } static void v_do_check_dollarvar_in_operators(INT i, operators o, ID p) {{ operators kc_selvar_0_1 = phylum_cast(o); if ((kc_selvar_0_1->prod_sel() == sel_Consoperators)) { const ID o_o = (kc_selvar_0_1)->ID_1; const operators o_os = (kc_selvar_0_1)->operators_1; ID phy = f_subphylumofoperator( o_o, i ); if (phy->eq(f_emptyId())) { v_report(NonFatal( FileLine( i->file, i->line ), Problem1S1INT1S1ID( "illegal dollar variable", i, "not that many subterms in operator", o_o ))); } else if (! p->eq( phy )) { v_report(NonFatal( FileLine( i->file, i->line ), Problem1S1INT1S1ID1S1ID( " type mismatch for dollar varariable:", i, "; old type", p, "; new type", phy ))); } v_do_check_dollarvar_in_operators( i, o_os, p ); } else if ((kc_selvar_0_1->prod_sel() == sel_Niloperators)) { /* EMPTY */ } else kc_no_default_in_with( "v_do_check_dollarvar_in_operators", __LINE__, __FILE__ ); } } bool f_attribute_in_phylym(ID a, ID p) { return f_typeof_attribute_in_phylym(a, p)->eq(f_emptyId()) ? false : true; } ID f_typeof_attribute_in_phylym(ID a, ID p) { phylumdeclaration tmp = f_lookupdecl( p ); if ( tmp == 0 ) { v_report(NonFatal( FileLine( p->file, p->line ), Problem1S1ID( "internal error: could not find declaration of phylum:", p ))); return f_emptyId(); } { phylumdeclaration kc_selvar_0_1 = phylum_cast( tmp ); if ((kc_selvar_0_1->prod_sel() == sel_PhylumDeclaration) && (phylum_cast(kc_selvar_0_1)->Ccode_option_1->prod_sel() == sel_CcodeOption)) { const attributes attrs = phylum_cast(phylum_cast(kc_selvar_0_1)->Ccode_option_1)->attributes_1; { attributes kc_fe_selvar_1 = attrs ; while( kc_fe_selvar_1->prod_sel() == sel_Consattributes ) { attribute kc_selvar_1_1 = kc_fe_selvar_1->attribute_1; { { if ((kc_selvar_1_1->prod_sel() == sel_Attribute)) { const ID a_type = phylum_cast(kc_selvar_1_1)->ID_1; const ID a_id = phylum_cast(kc_selvar_1_1)->ID_2; if (a->eq(a_id)) return a_type; } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->attributes_1; } } { fndeclarations kc_fe_selvar_1 = kc_selvar_0_1->additional_members; while( kc_fe_selvar_1->prod_sel() == sel_Consfndeclarations ) { fndeclaration kc_selvar_1_1 = kc_fe_selvar_1->fndeclaration_1; { { if ((kc_selvar_1_1->prod_sel() == sel_AcMemberDeclaration) && (phylum_cast(kc_selvar_1_1)->ac_declaration_specifiers_1->prod_sel() == sel_Consac_declaration_specifiers) && ((phylum_cast(kc_selvar_1_1)->ac_declaration_specifiers_1)->ac_declaration_specifier_1->prod_sel() == sel_AcDeclSpecTypeSpec) && (phylum_cast((phylum_cast(kc_selvar_1_1)->ac_declaration_specifiers_1)->ac_declaration_specifier_1)->ac_type_specifier_1->prod_sel() == sel_AcTypeSpec) && (phylum_cast(kc_selvar_1_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcMemberDecl)) { const ID a_type = phylum_cast(phylum_cast((phylum_cast(kc_selvar_1_1)->ac_declaration_specifiers_1)->ac_declaration_specifier_1)->ac_type_specifier_1)->ID_1; const ID a_id = phylum_cast(phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1)->ID_2; if (a->eq(a_id)) return a_type; } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->fndeclarations_1; } } return f_emptyId(); } else { kc_no_default_in_with( "f_typeof_attribute_in_phylym", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_subphylumofoperator(ID o, INT i) {{ INT kc_selvar_0_1 = phylum_cast(i); if ((kc_selvar_0_1->prod_sel() == sel_Int)) { const integer ii = phylum_cast(kc_selvar_0_1)->integer_1; if (ii->value == 0) { return f_phylumofoperator( o ); } else { return f_subphylum( f_argumentsofoperator( o ), i ); } } else { kc_no_default_in_with( "f_subphylumofoperator", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_subphylum(arguments a, INT i) { return f_do_subphylum( a, i, a->length() ); } static ID f_do_subphylum(arguments a, INT i, int a_i) {{ arguments kc_selvar_0_1 = phylum_cast(a); if ((kc_selvar_0_1->prod_sel() == sel_Consarguments)) { const ID a_a = (kc_selvar_0_1)->ID_1; const arguments a_as = (kc_selvar_0_1)->arguments_1; { INT kc_selvar_1_1 = phylum_cast( i ); if ((kc_selvar_1_1->prod_sel() == sel_Int)) { const integer ii = phylum_cast(kc_selvar_1_1)->integer_1; if (ii->value == a_i) { return a_a; } else { return f_do_subphylum( a_as, i, a_i - 1 ); } } else { kc_no_default_in_with( "f_do_subphylum", __LINE__, __FILE__ ); return static_cast(0); } } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilarguments)) { return f_emptyId(); } else { kc_no_default_in_with( "f_do_subphylum", __LINE__, __FILE__ ); return static_cast(0); } } } argument f_argumentofoperator(ID o, INT i) {{ INT kc_selvar_0_1 = phylum_cast(i); if ((kc_selvar_0_1->prod_sel() == sel_Int)) { const integer ii = phylum_cast(kc_selvar_0_1)->integer_1; if (ii->value == 0) { return Argument( f_phylumofoperator( o ), mkinteger(0)); } else { return f_argument( f_argumentsofoperator( o ), i ); } } else { kc_no_default_in_with( "f_argumentofoperator", __LINE__, __FILE__ ); return static_cast(0); } } } argument f_argument(arguments a, INT i) { return f_do_argument( a, i, a->length() ); } static argument f_do_argument(arguments a, INT i, int a_i) {{ arguments kc_selvar_0_1 = phylum_cast(a); if ((kc_selvar_0_1->prod_sel() == sel_Consarguments)) { const ID a_a = (kc_selvar_0_1)->ID_1; const arguments a_as = (kc_selvar_0_1)->arguments_1; { INT kc_selvar_1_1 = phylum_cast( i ); if ((kc_selvar_1_1->prod_sel() == sel_Int)) { const integer ii = phylum_cast(kc_selvar_1_1)->integer_1; if (ii->value == a_i) { return Argument( a_a, mkinteger(a->seqnr) ); } else { return f_do_argument( a_as, i, a_i - 1 ); } } else { kc_no_default_in_with( "f_do_argument", __LINE__, __FILE__ ); return static_cast(0); } } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilarguments)) { return Argument(f_emptyId(), mkinteger(0)); } else { kc_no_default_in_with( "f_do_argument", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_phylumofoutmostpattern(outmostpattern p) {{ outmostpattern kc_selvar_0_1 = phylum_cast(p); if ((kc_selvar_0_1->prod_sel() == sel_OPWildcard)) { return f_emptyId(); } else if ((kc_selvar_0_1->prod_sel() == sel_OPDefault)) { return f_emptyId(); } else if ((kc_selvar_0_1->prod_sel() == sel_OPNonLeafVariable)) { const outmostpattern r_p = phylum_cast(kc_selvar_0_1)->outmostpattern_1; return f_phylumofoutmostpattern( r_p ); } else if ((kc_selvar_0_1->prod_sel() == sel_OPOperator)) { const ID o = phylum_cast(kc_selvar_0_1)->ID_1; return f_phylumofoperator( o ); } else if ((kc_selvar_0_1->prod_sel() == sel_OPOperatorWildcard)) { const ID o = phylum_cast(kc_selvar_0_1)->ID_1; return f_phylumofoperator( o ); } else { kc_no_default_in_with( "f_phylumofoutmostpattern", __LINE__, __FILE__ ); return static_cast(0); } } } ID f_operatorofphylum(ID p, int i) { phylumdeclaration tmp = f_lookupdecl( p ); if ( tmp == 0 ) { v_report(NonFatal( FileLine( p->file, p->line ), Problem1S1ID( "internal error: could not find declaration of phylum:", p ))); return f_emptyId(); } { phylumdeclaration kc_selvar_0_1 = phylum_cast( tmp ); if ((kc_selvar_0_1->prod_sel() == sel_PhylumDeclaration)) { const productionblock pb = phylum_cast(kc_selvar_0_1)->productionblock_1; { productionblock kc_selvar_1_1 = phylum_cast( pb ); if ((kc_selvar_1_1->prod_sel() == sel_PredefinedAlternatives)) { const alternatives a = phylum_cast(kc_selvar_1_1)->alternatives_1; alternative tmp_a = f_alternative( a, i ); if ( tmp_a == 0 ) { v_report(NonFatal( FileLine( p->file, p->line ), Problem1S1ID( "internal error: could not find operators of phylum:", p ))); return f_emptyId(); } { alternative kc_selvar_2_1 = phylum_cast( tmp_a ); if ((kc_selvar_2_1->prod_sel() == sel_Alternative)) { const ID id = phylum_cast(kc_selvar_2_1)->ID_1; return id; } else { kc_no_default_in_with( "f_operatorofphylum", __LINE__, __FILE__ ); return static_cast(0); } } } else if ((kc_selvar_1_1->prod_sel() == sel_NonlistAlternatives)) { const alternatives a = phylum_cast(kc_selvar_1_1)->alternatives_1; alternative tmp_a = f_alternative( a, i ); if ( tmp_a == 0 ) { v_report(NonFatal( FileLine( p->file, p->line ), Problem1S1ID( "internal error: could not find operators of phylum:", p ))); return f_emptyId(); } { alternative kc_selvar_2_1 = phylum_cast( tmp_a ); if ((kc_selvar_2_1->prod_sel() == sel_Alternative)) { const ID id = phylum_cast(kc_selvar_2_1)->ID_1; return id; } else { kc_no_default_in_with( "f_operatorofphylum", __LINE__, __FILE__ ); return static_cast(0); } } } else if ((kc_selvar_1_1->prod_sel() == sel_ListAlternatives)) { const alternatives a = phylum_cast(kc_selvar_1_1)->alternatives_1; alternative tmp_a = f_alternative( a, i ); if ( tmp_a == 0 ) { v_report(NonFatal( FileLine( p->file, p->line ), Problem1S1ID( "internal error: could not find operators of phylum:", p ))); return f_emptyId(); } { alternative kc_selvar_2_1 = phylum_cast( tmp_a ); if ((kc_selvar_2_1->prod_sel() == sel_Alternative)) { const ID id = phylum_cast(kc_selvar_2_1)->ID_1; return id; } else { kc_no_default_in_with( "f_operatorofphylum", __LINE__, __FILE__ ); return static_cast(0); } } } else if ((kc_selvar_1_1->prod_sel() == sel_Emptyproductionblock)) { return f_emptyId(); } else { kc_no_default_in_with( "f_operatorofphylum", __LINE__, __FILE__ ); return static_cast(0); } } } else { kc_no_default_in_with( "f_operatorofphylum", __LINE__, __FILE__ ); return static_cast(0); } } } alternative f_alternative(alternatives a, int i) { return f_do_alternative( a, i, a->length() ); } static alternative f_do_alternative(alternatives a, int i, int a_i) {{ alternatives kc_selvar_0_1 = phylum_cast(a); if ((kc_selvar_0_1->prod_sel() == sel_Consalternatives)) { const alternative a_a = (kc_selvar_0_1)->alternative_1; const alternatives a_as = (kc_selvar_0_1)->alternatives_1; if (i == a_i) { return a_a; } else { return f_do_alternative( a_as, i, a_i - 1 ); } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilalternatives)) { return 0; } else { kc_no_default_in_with( "f_do_alternative", __LINE__, __FILE__ ); return static_cast(0); } } } void v_reset_phylumdeclaration_marks() { { phylumdeclarations kc_fe_selvar_1 = Thephylumdeclarations ; while( kc_fe_selvar_1->prod_sel() == sel_Consphylumdeclarations ) { phylumdeclaration kc_selvar_0_1 = kc_fe_selvar_1->phylumdeclaration_1; { { { const phylumdeclaration p = kc_selvar_0_1; p->marked = 0; } } } kc_fe_selvar_1 = kc_fe_selvar_1->phylumdeclarations_1; } } } void v_reset_variables_type(variables v) { { variables kc_fe_selvar_1 = v ; while( kc_fe_selvar_1->prod_sel() == sel_Consvariables ) { ID kc_selvar_0_1 = kc_fe_selvar_1->ID_1; { { { const ID var = kc_selvar_0_1; { ID kc_selvar_1_1 = phylum_cast( var ); if ((kc_selvar_1_1->prod_sel() == sel_Id)) { const uniqID uid = phylum_cast(kc_selvar_1_1)->uniqID_1; { IDtype kc_selvar_2_1 = phylum_cast( uid->type ); if ((kc_selvar_2_1->prod_sel() == sel_ITPatternVariable)) { const integer uid_scope = phylum_cast(kc_selvar_2_1)->integer_1; { scopetypefilelinestack kc_selvar_3_1 = phylum_cast( uid->scopeinfo ); if ((kc_selvar_3_1->prod_sel() == sel_Consscopetypefilelinestack) && ((kc_selvar_3_1)->scopetypefileline_1->prod_sel() == sel_ScopeTypeFileLine)) { const integer s = phylum_cast((kc_selvar_3_1)->scopetypefileline_1)->integer_1; const IDtype t = phylum_cast((kc_selvar_3_1)->scopetypefileline_1)->IDtype_1; const casestring f = phylum_cast((kc_selvar_3_1)->scopetypefileline_1)->casestring_1; const integer l = phylum_cast((kc_selvar_3_1)->scopetypefileline_1)->integer_2; const scopetypefilelinestack r_scopeinfo = (kc_selvar_3_1)->scopetypefilelinestack_1; if (s == uid_scope) { uid->type = t; uid->file = f; uid->line = l->value; uid->scopeinfo = r_scopeinfo; } } else if ((kc_selvar_3_1->prod_sel() == sel_Nilscopetypefilelinestack)) { uid->type = ITUnknown(); uid->file = mkcasestring(""); uid->line = 0; } else kc_no_default_in_with( "v_reset_variables_type", __LINE__, __FILE__ ); } } else if ((kc_selvar_2_1->prod_sel() == sel_ITUserRView)) { /* EMPTY */ } else if ((kc_selvar_2_1->prod_sel() == sel_ITPredefinedRView)) { /* EMPTY */ } else if ((kc_selvar_2_1->prod_sel() == sel_ITUserUView)) { /* EMPTY */ } else if ((kc_selvar_2_1->prod_sel() == sel_ITPredefinedUView)) { /* EMPTY */ } else if ((kc_selvar_2_1->prod_sel() == sel_ITUserFunction)) { /* EMPTY */ } else if ((kc_selvar_2_1->prod_sel() == sel_ITStorageClass)) { /* EMPTY */ } else if ((kc_selvar_2_1->prod_sel() == sel_ITPredefinedStorageClass)) { /* EMPTY */ } else if ((kc_selvar_2_1->prod_sel() == sel_ITUserOperator)) { /* EMPTY */ } else if ((kc_selvar_2_1->prod_sel() == sel_ITPredefinedOperator)) { /* EMPTY */ } else if ((kc_selvar_2_1->prod_sel() == sel_ITUserPhylum)) { /* EMPTY */ } else if ((kc_selvar_2_1->prod_sel() == sel_ITPredefinedPhylum)) { /* EMPTY */ } else if ((kc_selvar_2_1->prod_sel() == sel_ITUnknown)) { /* EMPTY */ } else kc_no_default_in_with( "v_reset_variables_type", __LINE__, __FILE__ ); } } else kc_no_default_in_with( "v_reset_variables_type", __LINE__, __FILE__ ); } } } } kc_fe_selvar_1 = kc_fe_selvar_1->variables_1; } } } void v_add_to_uviewnames(ID v) { { viewnames kc_fe_selvar_1 = Theuviewnames ; while( kc_fe_selvar_1->prod_sel() == sel_Consviewnames ) { ID kc_selvar_0_1 = kc_fe_selvar_1->ID_1; { { { const ID vn = kc_selvar_0_1; if ( vn->eq( v )) return; } } } kc_fe_selvar_1 = kc_fe_selvar_1->viewnames_1; } } Theuviewnames = Consviewnames( v, Theuviewnames ); } void v_add_to_uviewnames_ext(ID v) { viewnames uviewnames=Theuviewnames; while(uviewnames) { { viewnames kc_selvar_0_1 = phylum_cast(uviewnames); if ((kc_selvar_0_1->prod_sel() == sel_Nilviewnames)) { uviewnames=0; } else if ((kc_selvar_0_1->prod_sel() == sel_Consviewnames)) { const viewnames node = kc_selvar_0_1; const ID vn = (kc_selvar_0_1)->ID_1; const viewnames tail = (kc_selvar_0_1)->viewnames_1; if(vn->eq(v)) { if(!node->is_extern) node->is_extern=true; return; } uviewnames=tail; } else kc_no_default_in_with( "v_add_to_uviewnames_ext", __LINE__, __FILE__ ); } } Theuviewnames = Consviewnames( v, Theuviewnames ); Theuviewnames->is_extern=true; } void v_add_to_rviewnames(ID v) { { viewnames kc_fe_selvar_1 = Therviewnames ; while( kc_fe_selvar_1->prod_sel() == sel_Consviewnames ) { ID kc_selvar_0_1 = kc_fe_selvar_1->ID_1; { { { const ID vn = kc_selvar_0_1; if ( vn->eq( v )) return; } } } kc_fe_selvar_1 = kc_fe_selvar_1->viewnames_1; } } Therviewnames = Consviewnames( v, Therviewnames ); } void v_add_to_rviewnames_ext(ID v) { viewnames rviewnames=Therviewnames; while(rviewnames) { { viewnames kc_selvar_0_1 = phylum_cast(rviewnames); if ((kc_selvar_0_1->prod_sel() == sel_Nilviewnames)) { rviewnames=0; } else if ((kc_selvar_0_1->prod_sel() == sel_Consviewnames)) { const viewnames node = kc_selvar_0_1; const ID vn = (kc_selvar_0_1)->ID_1; const viewnames tail = (kc_selvar_0_1)->viewnames_1; if(vn->eq(v)) { if(!node->is_extern) node->is_extern=true; return; } rviewnames=tail; } else kc_no_default_in_with( "v_add_to_rviewnames_ext", __LINE__, __FILE__ ); } } Therviewnames = Consviewnames( v, Therviewnames ); Therviewnames->is_extern=true; } void v_add_to_storageclasses(ID v, ID p) { Thestorageclasses = do_add_to_storageclasses( v, p, Thestorageclasses, Thestorageclasses ); } static storageclasses do_add_to_storageclasses(ID v, ID p, storageclasses s, storageclasses all) {{ storageclasses kc_selvar_0_1 = phylum_cast(s); if ((kc_selvar_0_1->prod_sel() == sel_Consstorageclasses)) { const ID sc = (kc_selvar_0_1)->ID_1; const storageclasses r_sc = (kc_selvar_0_1)->storageclasses_1; if ( sc->eq( v )) { if (! p->eq(f_emptyId())) { s->phyla = Consphylumnames( p, s->phyla ); } return all; } else { return do_add_to_storageclasses( v, p, r_sc, all ); } } else if ((kc_selvar_0_1->prod_sel() == sel_Nilstorageclasses)) { storageclasses tmp = Consstorageclasses( v, all ); tmp->phyla = Nilphylumnames(); if (! p->eq(f_emptyId())) { tmp->phyla = Consphylumnames( p, tmp->phyla ); } return tmp; } else { kc_no_default_in_with( "do_add_to_storageclasses", __LINE__, __FILE__ ); return static_cast(0); } } } void collect_strings() { long i; long ssize=last_text_nr()+1; int lsize=Thelanguages->length(); The_Nilunparseitems=Nilunparseitems(); string_collection=new unparseitems*[ssize]; for( i=0; iunparse(v_null_printer, view_collect_strings); } void add_string_to_collection(unparseitem s) {{ unparseitem kc_selvar_0_1 = phylum_cast(s); if ((kc_selvar_0_1->prod_sel() == sel_UnpStr) && (phylum_cast(kc_selvar_0_1)->languageoption_1->prod_sel() == sel_LanguageList)) { const languagenames langs = phylum_cast(phylum_cast(kc_selvar_0_1)->languageoption_1)->languagenames_1; long nr=s->text_nr; { languagenames kc_fe_selvar_1 = langs; while( kc_fe_selvar_1->prod_sel() == sel_Conslanguagenames ) { ID kc_selvar_1_1 = kc_fe_selvar_1->ID_1; { { if ((kc_selvar_1_1->prod_sel() == sel_Id)) { const uniqID u_id = phylum_cast(kc_selvar_1_1)->uniqID_1; { IDtype kc_selvar_2_1 = phylum_cast((IDtype)u_id->type); if ((kc_selvar_2_1->prod_sel() == sel_ITLanguageName)) { const integer l = phylum_cast(kc_selvar_2_1)->integer_1; unparseitems entry=string_collection[nr][l->value]; { unparseitems kc_selvar_3_1 = phylum_cast(entry); if ((kc_selvar_3_1->prod_sel() == sel_Consunparseitems) && ((kc_selvar_3_1)->unparseitem_1->prod_sel() == sel_UnpStr) && (phylum_cast((kc_selvar_3_1)->unparseitem_1)->languageoption_1->prod_sel() == sel_NoLanguagename) && ((kc_selvar_3_1)->unparseitems_1->prod_sel() == sel_Nilunparseitems)) { string_collection[nr][l->value]=Consunparseitems(s,The_Nilunparseitems); } else if ((kc_selvar_3_1->prod_sel() == sel_Nilunparseitems)) { string_collection[nr][l->value]=Consunparseitems(s,The_Nilunparseitems); } else { string_collection[nr][l->value]= Consunparseitems(s,entry); } } } else { /* EMPTY */ } } } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->languagenames_1; } } } else if ((kc_selvar_0_1->prod_sel() == sel_UnpStr) && (phylum_cast(kc_selvar_0_1)->languageoption_1->prod_sel() == sel_NoLanguagename)) { int lsize=Thelanguages->length(); long nr=s->text_nr; int i; for(i=0;ilength(); long ssize=last_text_nr()+1; { languagenames kc_fe_selvar_1 = Thelanguages; while( kc_fe_selvar_1->prod_sel() == sel_Conslanguagenames ) { ID kc_selvar_0_1 = kc_fe_selvar_1->ID_1; { { { const ID language = kc_selvar_0_1; long nr; l--; language->unparse(v_ccfile_printer,view_output_collection); for(nr=0;nrunparse(v_ccfile_printer,view_output_collection); v_ccfile_printer(",\n",base_uview); } v_ccfile_printer("};\n\n",base_uview); } } } kc_fe_selvar_1 = kc_fe_selvar_1->languagenames_1; } } v_ccfile_printer("char **kc_language=kc_language_",base_uview); { languagenames kc_selvar_0_1 = phylum_cast((languagenames)Thelanguages); if ((kc_selvar_0_1->prod_sel() == sel_Conslanguagenames)) { const ID l = (kc_selvar_0_1)->ID_1; l->unparse(v_ccfile_printer,base_uview); } else kc_no_default_in_with( "unparse_string_collection", __LINE__, __FILE__ ); } v_ccfile_printer(";\n\n",base_uview); } phylumnames f_phylumnames_foreachwith_vars(idCexpressions a_idCexpressions) { return t_f_phylumnames_foreachwith_vars(a_idCexpressions); } phylumnames t_f_phylumnames_foreachwith_vars(idCexpressions a_idCexpressions) {{ idCexpressions kc_selvar_0_1 = phylum_cast(a_idCexpressions); if ((kc_selvar_0_1->prod_sel() == sel_ConsidCexpressions) && ((kc_selvar_0_1)->idCexpression_1->prod_sel() == sel_IdCexpression)) { const ID id = phylum_cast((kc_selvar_0_1)->idCexpression_1)->ID_1; const idCexpressions t = (kc_selvar_0_1)->idCexpressions_1; return Consphylumnames( f_listelementphylum(id), t_f_phylumnames_foreachwith_vars( t )); } else if ((kc_selvar_0_1->prod_sel() == sel_NilidCexpressions)) { return Nilphylumnames(); } else { kc_no_default_in_with( "t_f_phylumnames_foreachwith_vars", __LINE__, __FILE__ ); return static_cast(0); } } } phylumnames f_phylumnames_foreachwith_listvars(idCexpressions a_idCexpressions) { return t_f_phylumnames_foreachwith_listvars(a_idCexpressions); } phylumnames t_f_phylumnames_foreachwith_listvars(idCexpressions a_idCexpressions) {{ idCexpressions kc_selvar_0_1 = phylum_cast(a_idCexpressions); if ((kc_selvar_0_1->prod_sel() == sel_ConsidCexpressions) && ((kc_selvar_0_1)->idCexpression_1->prod_sel() == sel_IdCexpression)) { const ID id = phylum_cast((kc_selvar_0_1)->idCexpression_1)->ID_1; const idCexpressions t = (kc_selvar_0_1)->idCexpressions_1; return Consphylumnames( id, t_f_phylumnames_foreachwith_listvars( t )); } else if ((kc_selvar_0_1->prod_sel() == sel_NilidCexpressions)) { return Nilphylumnames(); } else { kc_no_default_in_with( "t_f_phylumnames_foreachwith_listvars", __LINE__, __FILE__ ); return static_cast(0); } } } void f_collect_members(fndeclarations fns) { { fndeclarations kc_fe_selvar_1 = fns; while( kc_fe_selvar_1->prod_sel() == sel_Consfndeclarations ) { fndeclaration kc_selvar_0_1 = kc_fe_selvar_1->fndeclaration_1; { { { const fndeclaration fn = kc_selvar_0_1; { fndeclaration kc_selvar_1_1 = phylum_cast(fn); if ((kc_selvar_1_1->prod_sel() == sel_FnAcDeclaration) && (phylum_cast(kc_selvar_1_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_class_qualifier_list_1->prod_sel() == sel_Consac_class_qualifier_list) && ((phylum_cast(phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_class_qualifier_list_1)->ac_class_qualifier_list_1->prod_sel() == sel_Nilac_class_qualifier_list) && (phylum_cast(kc_selvar_1_1)->fnclass_1->prod_sel() == sel_MemberFn)) { const ID id = (phylum_cast(phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_class_qualifier_list_1)->ID_1; phylumdeclaration ph_decl=f_phylumdeclofid(id); alternative op=f_alternativeofoperator(id); if(ph_decl) ph_decl->additional_members=Consfndeclarations(fn, ph_decl->additional_members); else if(op) op->additional_members=Consfndeclarations(fn, op->additional_members); } else if ((kc_selvar_1_1->prod_sel() == sel_FnAcDeclaration) && (phylum_cast(kc_selvar_1_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId) && (phylum_cast(kc_selvar_1_1)->fnclass_1->prod_sel() == sel_DestructorFn)) { const ID id = phylum_cast(phylum_cast(phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1; phylumdeclaration ph_decl=f_phylumdeclofid(id); alternative op=f_alternativeofoperator(id); if(ph_decl) ph_decl->additional_members=Consfndeclarations(fn, ph_decl->additional_members); else if(op) op->additional_members=Consfndeclarations(fn, op->additional_members); } else if ((kc_selvar_1_1->prod_sel() == sel_FnAcDeclaration) && (phylum_cast(kc_selvar_1_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId) && (phylum_cast(kc_selvar_1_1)->fnclass_1->prod_sel() == sel_ConstructorFn)) { const ID id = phylum_cast(phylum_cast(phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1; phylumdeclaration ph_decl=f_phylumdeclofid(id); alternative op=f_alternativeofoperator(id); if(ph_decl) ph_decl->additional_members=Consfndeclarations(fn, ph_decl->additional_members); else if(op) op->additional_members=Consfndeclarations(fn, op->additional_members); } else if ((kc_selvar_1_1->prod_sel() == sel_FnAcDeclaration) && (phylum_cast(kc_selvar_1_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcConvOperatorDecl) && (phylum_cast(kc_selvar_1_1)->fnclass_1->prod_sel() == sel_ConvOperatorFn)) { const ID id = phylum_cast(phylum_cast(phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1; phylumdeclaration ph_decl=f_phylumdeclofid(id); alternative op=f_alternativeofoperator(id); if(ph_decl) ph_decl->additional_members=Consfndeclarations(fn, ph_decl->additional_members); else if(op) op->additional_members=Consfndeclarations(fn, op->additional_members); } else if ((kc_selvar_1_1->prod_sel() == sel_AcMemberDeclaration) && (phylum_cast(kc_selvar_1_1)->ac_declarator_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcMemberDecl)) { const ID id = phylum_cast(phylum_cast(phylum_cast(kc_selvar_1_1)->ac_declarator_1)->ac_direct_declarator_1)->ID_1; phylumdeclaration ph_decl=f_phylumdeclofid(id); alternative op=f_alternativeofoperator(id); if(ph_decl) ph_decl->additional_members=Consfndeclarations(fn, ph_decl->additional_members); else if(op) op->additional_members=Consfndeclarations(fn, op->additional_members); } else { } } } } } kc_fe_selvar_1 = kc_fe_selvar_1->fndeclarations_1; } } } ID f_id_of_ctor_dtor_decl(ac_declarator decl) {{ ac_declarator kc_selvar_0_1 = phylum_cast(decl); if ((kc_selvar_0_1->prod_sel() == sel_AcDeclarator) && (phylum_cast(kc_selvar_0_1)->ac_direct_declarator_1->prod_sel() == sel_AcQualifiedDeclProto) && (phylum_cast(phylum_cast(kc_selvar_0_1)->ac_direct_declarator_1)->ac_direct_declarator_1->prod_sel() == sel_AcDirectDeclId)) { const ID id = phylum_cast(phylum_cast(phylum_cast(kc_selvar_0_1)->ac_direct_declarator_1)->ac_direct_declarator_1)->ID_1; return id; } else { return NULL; } } } void prepare_base_classes(baseclass_declarations decls) { { baseclass_declarations kc_fe_selvar_1 = decls; while( kc_fe_selvar_1->prod_sel() == sel_Consbaseclass_declarations ) { baseclass_decl kc_selvar_0_1 = kc_fe_selvar_1->baseclass_decl_1; { { if ((kc_selvar_0_1->prod_sel() == sel_BaseClassDecl)) { const ID id = phylum_cast(kc_selvar_0_1)->ID_1; const baseclass_list bases = phylum_cast(kc_selvar_0_1)->baseclass_list_1; phylumdeclaration ph_decl=f_phylumdeclofid(id); alternative op=f_alternativeofoperator(id); if(ph_decl) ph_decl->base_classes=concat(bases, ph_decl->base_classes); else if(op) op->base_classes=concat(bases,op->base_classes); } else {/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} } } kc_fe_selvar_1 = kc_fe_selvar_1->baseclass_declarations_1; } } } } // namespace kc kimwitu++-2.3.13/src/Gen.boot/gen.h0000644000175000017500000000076311135163773015336 0ustar useruser/* translation of file "gen.k" */ /* generated by: * @(#)$Author: Kimwitu++ version 2.3.13 (C) 1998-2008 Humboldt-Universitaet zu Berlin $ */ #ifndef KC_FUNCTIONS_gen_HEADER #define KC_FUNCTIONS_gen_HEADER #include "k.h" // in case a user forgets namespace kc { enum_operators f_selofoperator (ID oid); void freespineandelements (unparseviewsinfo a_unparseviewsinfo); void freespineandelements (rewriteviewsinfo a_rewriteviewsinfo); } // namespace kc #endif // ! KC_FUNCTIONS_gen_HEADER kimwitu++-2.3.13/src/getopt.c0000644000175000017500000007300407720434033014400 0ustar useruser/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #ifdef HAVE_CONFIG_H # include #endif #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ # ifndef const # define const # endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 # include # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ # include # include #endif /* GNU C library. */ #ifdef VMS # include # if HAVE_STRING_H - 0 # include # endif #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ # ifdef HAVE_LIBINTL_H # include # define _(msgid) gettext (msgid) # else # define _(msgid) (msgid) # endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ int __getopt_initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ # include # define my_index strchr #else # if HAVE_STRING_H # include # else # include # endif /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv extern char *getenv (); #endif static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ # if (!defined __STDC__ || !__STDC__) && !defined strlen /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); # endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #ifdef _LIBC /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; static int nonoption_flags_max_len; static int nonoption_flags_len; static int original_argc; static char *const *original_argv; /* Make sure the environment variable bash 2.0 puts in the environment is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void __attribute__ ((unused)) store_args_and_env (int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ original_argc = argc; original_argv = argv; } # ifdef text_set_element text_set_element (__libc_subinit, store_args_and_env); # endif /* text_set_element */ # define SWAP_FLAGS(ch1, ch2) \ if (nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined __STDC__ && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #ifdef _LIBC /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) nonoption_flags_len = nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len), '\0', top + 1 - nonoption_flags_max_len); nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined __STDC__ && __STDC__ static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * _getopt_initialize (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; #ifdef _LIBC if (posixly_correct == NULL && argc == original_argc && argv == original_argv) { if (nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = nonoption_flags_max_len = strlen (orig_str); if (nonoption_flags_max_len < argc) nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', nonoption_flags_max_len - len); } } nonoption_flags_len = nonoption_flags_max_len; } else nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { int print_errors = opterr; if (optstring[0] == ':') print_errors = 0; optarg = NULL; if (optind == 0 || !__getopt_initialized) { if (optind == 0) optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring); __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #ifdef _LIBC # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && __getopt_nonoption_flags[optind] == '1')) #else # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option '%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); } nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option '%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (print_errors) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option '--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (print_errors) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) fprintf (stderr, _("\ %s: option '-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option '%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value '%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ kimwitu++-2.3.13/src/abs.k0000644000175000017500000004103310752414212013644 0ustar useruser%{ CODE HEADER // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // %} // // abs.k // %{ static char abs_kAccesSid[] = "@(#)$Id: abs.k,v 1.36 2008/02/06 20:28:58 piefel Exp $"; %} /***************************************************************************/ /* * Name conventions: atom phyla are in CAPITALS (like ID, INT) * other phyla are in lowercase * operators are capitalized * */ /***************************************************************************/ /* * ABSTRACT SYNTAX * * Phyla used only as attribute value follow below in a separate section */ uniqID { uniq }: Str( casestring ) { IDtype type = ITUnknown(); int line = 0; casestring file = mkcasestring(""); scopetypefilelinestack scopeinfo = Nilscopetypefilelinestack(); /* * in the scopeinfo we store the last (previous) typeinfo, * together with the _current_ scope, ie the same scope as * in the current typeinfo. * this scope is used to check whether we need to pop the * scopeinfo, or have to wait. This should handle things like: * void foo( v ) phylum v; { * with( v ) { * Operator( s1, x, y ): { * with( s1 ) { * Operator( s2, *, y ): { * with( s2 ) { * Operator( *, y, x ): { * etc. * ie. where we have 'holes' in the scopestack, for certain * variables, like 'x' in the example above */ }; ID: Id( uniqID ) { IDtype type = ITUnknown(); casestring named_subphylum = 0; int line = 0; casestring file = mkcasestring(""); }; INT: Int( integer ) { int line = 0; casestring file = mkcasestring(""); }; STRING: String( casestring ) { int line = 0; casestring file = mkcasestring(""); }; phylumdeclarationsroot: PhylumDeclarations( phylumdeclarations ) ; phylumdeclarations: list phylumdeclaration ; phylumnames: list ID ; phylumdeclaration: PhylumDeclaration( ID storageoption productionblock Ccode_option ) { int marked = 0; fndeclarations additional_members=Nilfndeclarations(); baseclass_list base_classes =Nilbaseclass_list(); }; storageoption: NoStorageOption() | NegativeStorageOption( ID ) | PositiveStorageOption( ID ) ; storageclasses: list ID { phylumnames phyla = Nilphylumnames(); } ; productionblock: Emptyproductionblock() | ListAlternatives( alternatives ID ) | NonlistAlternatives( alternatives ) | PredefinedAlternatives( alternatives ) ; alternatives: list alternative ; alternative: Alternative( ID arguments ) { rewriterulesinfo rewriteinfo = Nilrewriterulesinfo(); unparsedeclsinfo unparseinfo = Nilunparsedeclsinfo(); fndeclarations additional_members=Nilfndeclarations(); baseclass_list base_classes =Nilbaseclass_list(); } ; arguments: list ID { int seqnr; }; argument: Argument( ID /*seqnr*/integer ) ; Ccode_option: CcodeOption( attributes Ctexts ) ; attributes: list attribute ; attribute: Attribute( ID ID attribute_initialisation_option ) ; attribute_initialisation_option: Noattribute_initialisation() | Yesattribute_initialisation( Cexpression ) ; Cexpression: list Cexpression_elem { int line = 0; casestring file = mkcasestring(""); }; Cexpression_elem: CExpressionPart( casestring ) | CExpressionDollarvar( INT ) | CExpressionNl() | CExpressionDQ( CexpressionDQ ) | CExpressionSQ( CexpressionSQ ) | CExpressionPack( Cexpression ) | CExpressionArray( Cexpression ) ; CexpressionDQ: list CexpressionDQ_elem ; CexpressionDQ_elem: CExpressionDQPart( casestring ) | CExpressionDQNl() ; CexpressionSQ: list CexpressionSQ_elem ; CexpressionSQ_elem: CExpressionSQPart( casestring ) | CExpressionSQNl() ; idCexpressions: list idCexpression ; idCexpression: IdCexpression( ID Cexpression ) { ID id = f_emptyId(); } ; Ctexts: list Ctext ; %{ KC_TYPES_HEADER typedef enum {include_header =0, include_file =1, include_unknown, include_both} include_type; class twoIncludedeclarations { includedeclarations inc1, inc2; public: includedeclarations& operator[](int i) { return (i==0) ? inc1 : inc2; } }; %} includefiles: list includefile ; includefile {uniq}: IncludeFile( casestring ) { include_type inc_type = include_unknown; /* indexes in includes */ twoIncludedeclarations inc; { $0->inc[0] = Nilincludedeclarations(); $0->inc[1] = Nilincludedeclarations(); if (Theincludefiles == 0) { Theincludefiles = Consincludefiles( $0, Nilincludefiles()); } else { Theincludefiles = Consincludefiles( $0, Theincludefiles); } } }; includedeclarations: list includedeclaration ; includedeclaration: IncludeDeclaration( casestring ) { int line = 0; casestring file = mkcasestring(""); }; rwdeclarations: list rwdeclaration ; rwdeclaration: RwDeclaration( outmostpatterns rewriteclauses ) ; rewriteclauses: list rewriteclause ; rewriteclause: RewriteClause( viewnames term ) ; /* concrete syntax: patternchains = patternchain, patternchain,.... */ patternchains: list patternchain { int line = 0; casestring file = mkcasestring(""); } ; /* concrete syntax: patternchain = patternchainitem & patternchainitem & .... */ patternchain: list patternchainitem { int line = 0; casestring file = mkcasestring(""); } ; outmostpatterns: list outmostpattern ; patternchainitem: PatternchainitemOutmost( outmostpattern ) | PatternchainitemGroup( patternchains ) | PatternchainitemDollarid( ID ) { int line = 0; casestring file = mkcasestring(""); ID type = f_emptyId(); } ; outmostpattern: OPOperatorWildcard( ID Cexpression ) | OPOperator( ID patterns Cexpression ) | OPNonLeafVariable( ID outmostpattern ) | OPWildcard(Cexpression) | OPDefault(Cexpression) /* HACK!! */ /* MPi What does 'HACK' mean? How to do it better? */ { int line = 0; casestring file = mkcasestring(""); ID type = f_emptyId(); } ; pattern: PVariable( ID ) | POperator( ID patterns ) | PNonLeafVariable( ID pattern ) | PWildcard() | PStringLiteral( CexpressionDQ ) | PIntLiteral( INT ) ; patterns: list pattern ; term: TVariable( ID ) | TOperator( ID terms ) | TMethod( term ID terms ) | TMethodDot( term ID terms ) | TMemberVar( term ID ) | TMemberVarDot( term ID ) | TCTerm( CexpressionSQ ) | TStringLiteral( CexpressionDQ ) | TIntLiteral( INT ) { int line = 0; casestring file = mkcasestring(""); } ; terms: list term ; fnfiles: list fnfile ; fnfile {uniq}: FnFile( casestring ) { fndeclarations fns; { $0->fns = Nilfndeclarations(); if (Thefnfiles == 0) { Thefnfiles = Consfnfiles( $0, Nilfnfiles()); } else { Thefnfiles = Consfnfiles( $0, Thefnfiles); } } }; fndeclarations: list fndeclaration ; /* needed for sort_extend_parameter_type_list */ %{ KC_TYPES #include "gutil.h" %} fndeclaration: FnAcDeclaration( ac_declaration_specifiers ac_declarator ac_declaration_list ac_opt_base_init_list Ctext ID/*name*/ fnclass ) | AcMemberDeclaration( ac_declaration_specifiers ac_declarator ac_constant_expression_option fnclass ) { ac_parameter_type_list sorted; int last_line = 0; // line nr of _last_ line of body (contains close-brace) casestring file = mkcasestring(""); bool is_attr; // whether it's from %attr or %member { with($0) { FnAcDeclaration(*, fn_args, C_vardecls, *, *, *, *): { $0->sorted = sort_extend_parameter_type_list( C_vardecls, fn_args ); } default: { $0->sorted = AcParList( Nilac_parameter_list() ); } } } } ; fnclass: GlobalFn() | StaticFn( casestring/*filename*/ ) | MemberFn() | ConstructorFn() | DestructorFn() | ConvOperatorFn() ; Ctext: list Ctext_elem { int line = 0; casestring file = mkcasestring(""); } ; Ctext_elem: CTextLine( casestring ) | CTextDollarVar( INT ) | CTextNl( integer ) | CTextCexpressionDQ( CexpressionDQ ) | CTextCexpressionSQ( CexpressionSQ ) | CTextCbody( Ctext ) | CTextForeachexpression( patternchain idCexpressions withexpressions Ctext foreach_after ) | CTextWithexpression( withexpressions withcases contextinfo ) { int line = 0; casestring file = mkcasestring(""); } ; foreach_after: NoForeachAfter() | ForeachAfter( patternchain idCexpressions withexpressions Ctext ) { int line = 0; casestring file = mkcasestring(""); } ; contextinfo: InForeachContext( patternchain ) | NotInForeachContext() ; withexpressions: list withexpression { phylumnames type = 0; int line = 0; casestring file = mkcasestring(""); { with($0) { Nilwithexpressions(): { $0->type = Nilphylumnames(); } Conswithexpressions( h, t ): { $0->type = Consphylumnames( h->type, t->type ); $0->line = h->line; $0->file = h->file; } } } } ; withexpression: WEVariable( ID ) | WECexpression( Cexpression ) { ID type = f_emptyId(); int line = 0; casestring file = mkcasestring(""); { with($0) { WEVariable( id ): { $0->line = id->line; $0->file = id->file; } WECexpression( e ): { $0->line = e->line; $0->file = e->file; } } } } ; withcases: list withcase { withcasesinfo wcinfo; } ; withcase: Withcase( patternchains Ctext ) { withcasesinfo wcinfo; } ; unparsedeclarations: list unparsedeclaration ; unparsedeclaration: UnparseDeclaration( outmostpatterns unparseclauses ) { patternrepresentations patternreps; } ; unparseclauses: list unparseclause ; unparseclause: UnparseClause( viewnames unparseitems ) ; viewnames: list ID { bool is_extern=false; } ; unparseitems: list unparseitem ; unparseitem: UnpStr( languageoption CexpressionDQ viewnameoption ) | UnpSubexpr( languageoption unpsubterm viewnameoption ) | UnpCtext( languageoption Ctext ) | UnpBody( languageoption unparseitems ) | UViewVarDecl( ID ID Cexpression ) { int text_nr=0; } ; unpsubterm: UnpSubTerm( ID ) | UnpDollarvarTerm( INT ) | UnpSubAttr( ID unpattributes ) | UnpDollarvarAttr( INT unpattributes ) | UnpCastedVariable( ID ID ) ; unpattributes: list ID ; viewnameoption: NoViewname() | YesViewname( ID ) ; languageoption: NoLanguagename() | LanguageList( languagenames ) ; languagenames: list ID ; /***************************************************************************/ /* * ATTRIBUTE TYPES * */ fileline: FileLine() | NoFileLine() | PosNoFileLine() { casestring file; int line; } ; %ctor FileLine(casestring _file=0, int _line=0) { file = (_file!=0) ? _file : mkcasestring(""); line=_line; } scopetypefilelinestack: list scopetypefileline ; scopetypefileline: ScopeTypeFileLine( integer IDtype casestring integer ) ; IDtype: ITUnknown() | ITPredefinedPhylum( phylumdeclaration ) | ITUserPhylum( phylumdeclaration ) | ITPredefinedOperator( alternative /*phylum*/ID ) | ITUserOperator( alternative /*phylum*/ID ) | ITPredefinedStorageClass() | ITStorageClass() | ITPredefinedUView() | ITUserUView() | ITUViewVar() | ITPredefinedRView() | ITUserRView() | ITUserFunction( fnclass ) | ITPatternVariable( /*phylum*/ID /*scope*/ integer ) | ITLanguageName( integer ) { } ; operators: list ID ; phyla: list ID ; variables: list ID ; dollarvarstatus: DVAllowed() | DVDisallowed() ; /***************************************************************************/ /* * Stuff for patterns etc. */ tribool: Equal() | Smaller() | Bigger() ; patternrepresentations: list patternrepresentation ; patternrepresentation: list elem_patternrepresentation ; elem_patternrepresentation: PRBinding( path ID ) | PRVarPredicate( paths ID patternrepresentation ) | PROperPredicate( path ID ) | PRUserPredicate( Cexpression ) | PRNonLeafBinding( path ID patternrepresentation ) | PRWildcard( path ) | PRDefault() | PRStringLiteral( path CexpressionDQ ) | PRIntLiteral( path INT ) { int line = 0; casestring file = mkcasestring(""); ID type = f_emptyId(); }; path: list integer { ID op = f_emptyId(); ID id = f_emptyId(); /* we use this only to store info for OPNonLeafVariable */ } ; paths: list path ; /***************************************************************************/ argsnumbers: list integer ; /***************************************************************************/ rewriterulesinfo: list rewriteruleinfo ; rewriteruleinfo: Rewriteruleinfo( patternrepresentation/*predicates*/ patternrepresentation/*bindings*/ rewriteclause ) ; withcasesinfo: list withcaseinfo ; withcaseinfo: Withcaseinfo( patternrepresentation/*predicates*/ patternrepresentation/*bindings*/ Ctext ) ; rewriteviewsinfo: list rewriteviewinfo ; rewriteviewinfo: Rewriteviewinfo( ID rewriterulesinfo ) ; unparseviewsinfo: list unparseviewinfo ; unparseviewinfo: Unparseviewinfo( ID unparsedeclsinfo ) ; unparsedeclsinfo: list unparsedeclinfo ; unparsedeclinfo: Unparsedeclinfo( patternrepresentation/*predicates*/ patternrepresentation/*bindings*/ unparseclause ) ; ac_declaration: AcDeclaration( ac_declaration_specifiers ac_init_declarator_list ) ; ac_declaration_list: list ac_declaration ; ac_declaration_specifiers: list ac_declaration_specifier ; ac_declaration_specifier: AcDeclSpecStorageSpec( ac_storage_class_specifier ) | AcDeclSpecTypeSpec( ac_type_specifier ) | AcDeclSpecTypeQual( ac_type_qualifier ) ; ac_storage_class_specifier: AcAuto() | AcRegister() | AcStatic() | AcExtern() | AcTypedef() | AcVirtual() ; ac_type_specifier: AcTypeSpec( ID ) /* to simplify */ ; ac_type_qualifier: AcConst() | AcVolatile() | AcUnsigned() | AcNoQualifier() ; ac_init_declarator_list: list ac_init_declarator ; ac_init_declarator: AcInitDecl( ac_declarator ) /* this one commented out for simplification | ac_declarator '=' ac_initializer */ ; ac_declarator: AcDeclarator( ac_pointer_option ac_ref_option ac_direct_declarator ) ; ac_direct_declarator: AcDirectDeclId( ID ) | AcDirectDeclPack( ac_declarator ) | AcDirectDeclArray( ac_direct_declarator ac_constant_expression_option ) | AcDirectDeclProto(ac_direct_declarator ac_parameter_type_list ) | AcQualifiedDeclProto(ac_class_qualifier_list ac_direct_declarator ac_parameter_type_list ac_type_qualifier ) | AcMemberDecl( /*class*/ ID /*member*/ ID ac_constant_expression_list ) | AcConvOperatorDecl( /*class*/ ID /*member*/ ID ) | AcOperatorDeclId( ac_operator_name ) ; ac_pointer_option: Nopointer() | Yespointer( ac_pointer ) ; ac_pointer: AcPointerNil( ac_type_qualifier_list ) | AcPointerCons( ac_type_qualifier_list ac_pointer ) ; ac_ref_option: AcNoRef() | AcRef() ; ac_operator_name: AcOperatorName( casestring ) { int line = 0; casestring file = mkcasestring(""); } ; ac_class_qualifier_help_list: list ac_direct_declarator ; ac_class_qualifier_list: list ID ; ac_type_qualifier_list: list ac_type_qualifier ; ac_parameter_type_list: AcParList( ac_parameter_list ) | AcParList3Dot( ac_parameter_list ) ; ac_parameter_list: list ac_parameter_declaration ; ac_parameter_declaration: AcParDeclDecl( ac_declaration_specifiers ac_declarator ac_constant_expression_option ) | AcParDeclAbsdecl( ac_declaration_specifiers ac_abstract_declarator ac_constant_expression_option ) ; ac_identifier_list: list ID ; ac_abstract_declarator: AcAbsdeclPointer( ac_pointer ) | AcAbsdeclDirdecl( ac_pointer_option ac_direct_abstract_declarator ) ; ac_direct_abstract_declarator_option: Noac_direct_abstract_declarator() | Yesac_direct_abstract_declarator( ac_direct_abstract_declarator ) ; ac_direct_abstract_declarator: AcDirAbsdeclPack( ac_abstract_declarator ) | AcDirAbsdeclArray( ac_direct_abstract_declarator_option ac_constant_expression_option ) | AcDirAbsdeclFn( ac_direct_abstract_declarator_option ac_parameter_type_list ) ; /* we don't need a Noac_constant_expression here, because Cexpression * can be the empty string */ /* we need it for static class members */ ac_constant_expression_option: Yesac_constant_expression( ac_constant_expression ) | Noac_constant_expression() ; ac_constant_expression: AcConstExpr( Cexpression ) /* to make things easier, I hope... */ ; ac_constant_expression_list: list ac_constant_expression ; ac_opt_base_init_list: AcNoBaseInit() | AcYesBaseInit( ac_base_init_list ) ; ac_base_init_list: list ac_base_init ; ac_base_init: AcBaseInit( ID ac_constant_expression_list ) ; baseclass_declarations: list baseclass_decl ; baseclass_decl: BaseClassDecl( ID baseclass_list ) ; baseclass_list: list ID ; // vim:sts=4:ts=8:cino=g0,t0,\:0 kimwitu++-2.3.13/src/vc70000644000175000017500000001001207527426464013360 0ustar useruser kimwitu++-2.3.13/src/util.k0000644000175000017500000015420610752414213014064 0ustar useruser%{ CODE HEADER // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // %} // // util.k // %{ static char util_kAccesSid[] = "@(#)$Id: util.k,v 1.54 2008/02/06 20:28:59 piefel Exp $"; %} /***************************************************************************/ %{ addedphylumdeclarations pl_addedphylumdeclarations = 0; %} %{ KC_TYPES_HEADER extern addedphylumdeclarations pl_addedphylumdeclarations; %} addedphylumdeclarations : list addedphylumdeclaration ; addedphylumdeclaration : AddedPhylumdeclaration( uniqID ) { bool added = false; { if (!pl_addedphylumdeclarations) pl_addedphylumdeclarations = Consaddedphylumdeclarations( $0, Niladdedphylumdeclarations() ); else pl_addedphylumdeclarations = Consaddedphylumdeclarations( $0, pl_addedphylumdeclarations ); } } ; bool f_added(ID id) { with( id ) { Id( uid ): { return AddedPhylumdeclaration( uid )->added; } } } void v_add(ID id) { with( id ) { Id( uid ): { AddedPhylumdeclaration( uid )->added = true; } } } void v_freeadded() { pl_addedphylumdeclarations->free( true ); pl_addedphylumdeclarations = 0; } /***************************************************************************/ %{ countedphylumdeclarations pl_countedphylumdeclarations = 0; %} %{ KC_TYPES_HEADER extern countedphylumdeclarations pl_countedphylumdeclarations; %} uniqID {uniq}:; /* necessary because of the way it is used here */ countedphylumdeclarations : list countedphylumdeclaration ; countedphylumdeclaration {uniq} : CountedPhylumdeclaration( uniqID ) { int count = 0; { if (!pl_countedphylumdeclarations) pl_countedphylumdeclarations = Conscountedphylumdeclarations( $0, Nilcountedphylumdeclarations() ); else pl_countedphylumdeclarations = Conscountedphylumdeclarations( $0, pl_countedphylumdeclarations ); } } ; int f_getcount(ID id) { with( id ) { Id( uid ): { return ++(CountedPhylumdeclaration( uid ) -> count); } default : { return 0; /* NOTREACHED */ } } } void v_resetcount() { if (pl_countedphylumdeclarations) { foreach( c; countedphylumdeclarations pl_countedphylumdeclarations ) { c->count = 0; } } } void v_freecount() { if (pl_countedphylumdeclarations) { v_resetcount(); pl_countedphylumdeclarations->free( true ); pl_countedphylumdeclarations = 0; } } /***************************************************************************/ %{ KC_UNPARSE #include "util.h" #include "occur.h" static int cl_scope = 0; %} /* * check used occurences of phyla in the phylumdeclarations * and set the seqnr attribute of the arguments * and warn if a phylum has an empty production block * and check/collect the storage classes * use gl_phylum as defined in gutil.k */ Consphylumdeclarations( pd, pds ) -> [view_check: pds pd ]; Nilphylumdeclarations() -> [view_check: /* EMPTY */ ]; PhylumDeclaration( i, *, *, cco ) -> [view_check: { outmostoperators.push( Niloperators() ); dollarvarsallowed.push( DVAllowed() ); phylumstack.push( i ); } cco { outmostoperators.top()->freelist(); outmostoperators.pop(); dollarvarsallowed.pop(); phylumstack.pop(); } ]; CcodeOption( *, ct ) -> [view_check: ct ]; Consphylumdeclarations( *, * ) -> [view_check_count: $0:view_check_count1 { v_freecount(); } ]; Consphylumdeclarations( pd, rpds ) -> [view_check_count1: rpds pd]; Nilphylumdeclarations() -> [view_check_count1: /* EMPTY */ ]; PhylumDeclaration( id, stopt, pb, * ) -> [view_check_count1: { gl_phylum = id; } stopt { gl_phylum = 0; } pb ]; PhylumDeclaration( id, stopt, Emptyproductionblock(), * ) -> [view_check_count1: { gl_phylum = id; } stopt { gl_phylum = 0; } { v_report(NonFatal( NoFileLine(), Problem1S1ID( "no operators defined for phylum", id ))); } ]; NoStorageOption() -> [view_check_count1: /* EMPTY */ ]; NegativeStorageOption( sc ), PositiveStorageOption( sc ) -> [view_check_count1: { if (pg_storageclasseshavebeendefined) f_useoccurstorageclass( sc ); else v_extendoccur( sc, ITStorageClass() ); v_add_to_storageclasses( sc, gl_phylum ); } ]; ListAlternatives( alt, * ), NonlistAlternatives( alt ) -> [view_check_count1: alt ]; PredefinedAlternatives( * ) -> [view_check_count1: /* EMPTY */ ]; Consalternatives( alt = Alternative( id, args ), ralts ) -> [view_check_count1: ralts args { v_resetcount(); } ]; Nilalternatives() -> [view_check_count1: /* EMPTY */ ]; Consarguments( id, rargs ) -> [view_check_count1: rargs { f_useoccurphylum( id ); $0->seqnr = f_getcount( id ); } ]; Nilarguments() -> [view_check_count1: /* EMPTY */ ]; bool is_uview_var(ID id) { if(!The_current_unparseitems) return false; foreach($item; unparseitems The_current_unparseitems) { UViewVarDecl(*,var,*): { if(var->eq(id)) { id->type=ITUViewVar(); return true; } } default: {} } return false; } %{ #include /* for strcmp */ %} /***************************************************************************/ /* rewrite the patternchains to normal form. * this normal form consists of a list of patternchain, where * patternchainitem's do not contain PatternchainitemGroup's */ /* In the rules below, capitals represent lists, and lowercase letters * represent list elements. () represents empty list. * we use & and , for Cons * we use && and ,, for concat * * Expand: * (h_pc, T_pcs) & Y_pc => ( h_pc&&Y_pc , (T_pcs)&Y_pc, () ), () * p & (h_pc, T_pcs) & () => ( p&h_pc, p&(T_pcs)&(), () ) & () * * Simplify: * ( h_p&(), () ) => h_p * (P_pcs)&(), () => P_pcs * (P_pcs)&(), Q_pcs => P_pcs ,, Q_pcs * p & (P_pc,()) & () => p & P_pc * (P_pc,()) & Q_pc => P_pc&&Q_pc * * One step combinations: * (P_pc,()) & (Q_pc,()) & () => P_pc&&Q_pc * (h_pc, T_pcs) & (Y_pc,()) & () => ( h_pc&&Y_pc , (T_pcs)&Y_pc, () ), () */ /* rules for expansion (insertion of list elements in sublists */ // One step combination for the following pattern and a simplification // (h_pc, T_pcs) & (Y_pc,()) & () => ( h_pc&&Y_pc , (T_pcs)&Y_pc, () ), () Conspatternchain( PatternchainitemGroup( Conspatternchains( h_pc, T_pcs = Conspatternchains(*,*) ) ), Conspatternchain( PatternchainitemGroup( Conspatternchains( Y_pc, Nilpatternchains() )), Nilpatternchain() ) ), /* (h_pc, T_pcs) & Y_pc => ( h_pc&&Y_pc , (T_pcs)&Y_pc, () ), () */ Conspatternchain( PatternchainitemGroup( Conspatternchains( h_pc, T_pcs = Conspatternchains(*,*) ) ), Y_pc = Conspatternchain(*,*) ), Conspatternchain(PatternchainitemGroup(Conspatternchains( h_pc, T_pcs = Conspatternchains(*,*) )), Y_pc=Conspatternchain(PatternchainitemGroup(Conspatternchains( *, Conspatternchains(*,*) )), Nilpatternchain() ) ) // combination -> <: Conspatternchain( PatternchainitemGroup( Conspatternchains( concat( h_pc, Y_pc ), Conspatternchains( Conspatternchain( PatternchainitemGroup( T_pcs ), Y_pc ), Nilpatternchains() ) ) ), Nilpatternchain() ) >; /* p & (h_pc, T_pcs) & () => ( p&h_pc, p&(T_pcs)&(), () ) & () */ Conspatternchain( p, Conspatternchain( PatternchainitemGroup( Conspatternchains( h_pc, T_pcs = Conspatternchains(*,*) )), Nilpatternchain() ) ) -> <: Conspatternchain( PatternchainitemGroup( Conspatternchains( Conspatternchain( p, h_pc ), Conspatternchains( Conspatternchain( p, Conspatternchain( PatternchainitemGroup( T_pcs ), Nilpatternchain() ) ), Nilpatternchains() ) ) ), Nilpatternchain() ) >; /* symplifying the generated grouped lists of lists etc. */ /* ( h_p&(), () ) -> h_p */ PatternchainitemGroup( Conspatternchains( Conspatternchain( h_p, Nilpatternchain()), Nilpatternchains() ) ) -> <: h_p >; /* (P_pcs)&(), () -> P_pcs */ Conspatternchains( Conspatternchain( PatternchainitemGroup( P_pcs ), Nilpatternchain() ), Nilpatternchains() ) -> <: P_pcs >; /* (P_pcs)&(), Q_pcs -> P_pcs ,, Q_pcs */ Conspatternchains( Conspatternchain( PatternchainitemGroup( P_pcs ), Nilpatternchain() ), Q_pcs = Conspatternchains(*,*) ) -> <: concat( P_pcs, Q_pcs ) >; // One step combination for the following two patterns // (P_pc,()) & (Q_pc,()) & () => (P_pc,()) & Q_pc -> P_pc&&Q_pc Conspatternchain( PatternchainitemGroup( Conspatternchains( P_pc, Nilpatternchains() ) ), Conspatternchain( PatternchainitemGroup( Conspatternchains( Q_pc, Nilpatternchains() )), Nilpatternchain() ) ) -> <: concat( P_pc, Q_pc ) >; /* (P_pc,()) & Q_pc => P_pc&&Q_pc */ Conspatternchain( PatternchainitemGroup( Conspatternchains( P_pc, Nilpatternchains() ) ), Q_pc = Conspatternchain(*, *) ), Conspatternchain(PatternchainitemGroup(Conspatternchains( P_pc, Nilpatternchains() )), Q_pc=Conspatternchain(PatternchainitemGroup(Conspatternchains( *, Conspatternchains(*,*) )), Nilpatternchain() ) ) // combination -> <: concat( P_pc, Q_pc ) >; /* p & (P_pc,()) & () => p & P_pc */ Conspatternchain( p, Conspatternchain( PatternchainitemGroup( Conspatternchains( P_pc, Nilpatternchains() )), Nilpatternchain() ) ) -> <: Conspatternchain( p, P_pc ) >; /***************************************************************************/ /* * check used occurences of operators in the multi patterns (using the * existing code for checking (outmost)patterns * */ /***************************************************************************/ /* * check used occurences of operators in the (outmost)patterns * */ Consoutmostpatterns( p, rp ) -> [view_check: rp p ]; Niloutmostpatterns() -> [view_check: /* EMPTY */ ]; OPOperatorWildcard( o, * ) -> [view_check_outmostopers_in_phylum: { if (f_useoccuroperator( o )) { if ( phylumstack.top()->eq(f_emptyId() )) { phylumstack.pop(); phylumstack.push( f_phylumofoperator( o ) ); } if (! f_operatorinphylum( o, phylumstack.top())) { v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID1S1ID( "outermost operator", o, "not in expected phylum", phylumstack.top() ))); } else { operators tmp = Consoperators( o, outmostoperators.top() ); outmostoperators.pop(); outmostoperators.push( tmp ); } } } ]; OPOperatorWildcard( o, * ) -> [view_check: { if (f_useoccuroperator( o )) { if ( phylumstack.top()->eq( f_emptyId() )) { phylumstack.pop(); phylumstack.push( f_phylumofoperator( o ) ); } { operators tmp = Consoperators( o, outmostoperators.top() ); outmostoperators.pop(); outmostoperators.push( tmp ); } } } ]; OPOperator( o, p, * ) -> [view_check_outmostopers_in_phylum: { if (f_useoccuroperator( o )) } ${ { if ( phylumstack.top()->eq( f_emptyId() )) { phylumstack.pop(); phylumstack.push( f_phylumofoperator( o ) ); } } { if (f_operatorinphylum( o, phylumstack.top())) } ${ { operators tmp = Consoperators( o, outmostoperators.top() ); outmostoperators.pop(); outmostoperators.push( tmp ); argumentsstack.push( f_argumentsofoperator( o )->reverse()); operatorstack.push( o ); } p:view_check { if (! f_Nilarguments( argumentsstack.top() )) { v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID( "too few subpatterns for operator", o ))); } argumentsstack.pop(); operatorstack.pop(); } $} { else { v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID1S1ID( "outermost operator", o, "not in expected phylum", phylumstack.top() ))); } } $} ]; OPOperator( o, p, * ) -> [view_check: { if (f_useoccuroperator( o )) } ${ { if ( phylumstack.top()->eq( f_emptyId() )) { phylumstack.pop(); phylumstack.push( f_phylumofoperator( o ) ); } } ${ { operators tmp = Consoperators( o, outmostoperators.top() ); outmostoperators.pop(); outmostoperators.push( tmp ); argumentsstack.push( f_argumentsofoperator( o )->reverse()); operatorstack.push( o ); } p { if (! f_Nilarguments( argumentsstack.top() )) { v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID( "too few subpatterns for operator", o ))); } argumentsstack.pop(); operatorstack.pop(); } $} $} ]; OPNonLeafVariable( v, p ) -> [view_check: { variables tmp = Consvariables( v, variablesstack.top() ); variablesstack.pop(); variablesstack.push( tmp ); v_extendoccur( v, ITPatternVariable( f_phylumofoutmostpattern( p ), mkinteger(cl_scope))); } p ]; OPNonLeafVariable( v, p ) -> [view_check_outmostopers_in_phylum: { variables tmp = Consvariables( v, variablesstack.top() ); ID tmp_pid = f_phylumofoutmostpattern( p ); ID tmp_vid = f_phylumofpatternvariable( v ); ID tmp_resid = tmp_pid->eq(f_emptyId() ) ? tmp_vid : tmp_pid; if ( phylumstack.top()->eq(f_emptyId()) ) { phylumstack.pop(); phylumstack.push( tmp_resid ); } variablesstack.pop(); variablesstack.push( tmp ); v_extendoccur( v, ITPatternVariable( tmp_resid, mkinteger(cl_scope))); } p:view_check ]; OPDefault, OPWildcard -> [view_check: /* EMPTY */ ]; Conspatterns( p, rp ) -> [view_check: rp { if (f_Nilarguments( argumentsstack.top() )) { ID o = operatorstack.top(); v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID( "too many subpatterns for operator", o ))); } else } ${ { arguments tmp; } p { tmp = argumentsstack.top(); argumentsstack.pop(); argumentsstack.push( f_tl_arguments( tmp )); } $} ]; Nilpatterns() -> [view_check: /* EMPTY */ /* we don't test here, because at this point we are in front of the first element in the list */ ]; PVariable( v ) -> [view_check: { variables tmp = Consvariables( v, variablesstack.top() ); variablesstack.pop(); variablesstack.push( tmp ); v_extendoccur( v, ITPatternVariable( f_hd_arguments( argumentsstack.top() ), mkinteger(cl_scope) )); } ]; POperator( o, p ) -> [view_check: { if (f_useoccuroperator( o )) } ${ { if (f_Nilarguments( argumentsstack.top() )) { ID o = operatorstack.top(); v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID( "too many subpatterns for operator", o ))); } else if (f_operatorinphylum( o, f_hd_arguments( argumentsstack.top() ))) } ${ { argumentsstack.push( f_argumentsofoperator( o )->reverse()); operatorstack.push( o ); } p { if (! f_Nilarguments( argumentsstack.top() )) { v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID( "too few subpatterns for operator", o ))); } argumentsstack.pop(); operatorstack.pop(); } $} {else} ${ { v_report(NonFatal( FileLine( o->file, o->line ), Problem1S1ID1S1ID( "operator", o, "not in phylum", f_hd_arguments( argumentsstack.top() ) ))); } $} $} ]; PNonLeafVariable( v, p ) -> [view_check: { variables tmp = Consvariables( v, variablesstack.top() ); variablesstack.pop(); variablesstack.push( tmp ); v_extendoccur( v, ITPatternVariable( f_hd_arguments( argumentsstack.top() ), mkinteger(cl_scope) )); } p ]; PWildcard() -> [view_check: /* EMPTY */ ]; PStringLiteral( * ) -> [view_check: { if ( (! f_hd_arguments( argumentsstack.top() )->eq(Id( Str( mkcasestring( "casestring" ))))) && (! f_hd_arguments( argumentsstack.top() )->eq(Id( Str( mkcasestring( "nocasestring" )))))) { v_report(NonFatal( FileLine( operatorstack.top()->file, operatorstack.top()->line ), Problem1S( "unexpected string subterm" ))); } } ]; PIntLiteral( i ) -> [view_check: { if ((! f_hd_arguments( argumentsstack.top() )->eq(Id( Str( mkcasestring( "integer" ))))) && (! f_hd_arguments( argumentsstack.top() )->eq(Id( Str( mkcasestring( "real" ))))) ) { v_report(NonFatal( FileLine( i->file, i->line ), Problem1S( "unexpected int subterm" ))); } } ]; /* * check used occurences of operators in the rwdeclarations * */ /* * Basic idea: when we check a Ctext that is part of a withcase, we expect that we can find the type of the outmost-opers in stacktopphylum and the outmostoperators (a list of ID) in stacktopoperators */ Consrwdeclarations( rwd, rrwd ) -> [view_check: rrwd rwd ]; Nilrwdeclarations() -> [view_check: /* EMPTY */ ]; RwDeclaration( op, rc ) -> [view_check: { outmostoperators.push( Niloperators() ); dollarvarsallowed.push( DVAllowed() ); phylumstack.push( f_emptyId() ); variablesstack.push( Nilvariables()); cl_scope++; } op rc { outmostoperators.top()->freelist(); outmostoperators.pop(); phylumstack.pop(); dollarvarsallowed.pop(); v_reset_variables_type( variablesstack.top() ); cl_scope--; variablesstack.top()->freelist(); variablesstack.pop(); } ]; Consrewriteclauses( rc, rcs ) -> [view_check: rcs rc ]; Nilrewriteclauses() -> [view_check: /* EMPTY */ ]; RewriteClause( vn, * ) -> [view_check: vn:view_check_r ]; Consfndeclarations( fnd, fnds ) -> [view_check: fnds fnd]; Nilfndeclarations() -> [view_check: /* EMPTY */ ]; FnAcDeclaration( *, *, *, *, ct, *, * ) -> [view_check: ct ]; FnAcDeclaration( Nilac_declaration_specifiers(), AcDeclarator(Nopointer(), AcNoRef(), AcQualifiedDeclProto( Nilac_class_qualifier_list(), AcDirectDeclId(pid), *, AcNoQualifier())), Nilac_declaration_list(), *, ct, *, ConstructorFn()) -> [view_check: ct { with(pid) { Id( uid ): { with( uid->type ) { ITUnknown(): { v_report(Warning( FileLine(file, last_line), Problem1S1ID( "constructor does not belong to phylum or operator:", pid))); } default: { /* ALRIGHT */ } } } } } ]; FnAcDeclaration( *, AcDeclarator(Nopointer(), AcNoRef(), AcQualifiedDeclProto( Nilac_class_qualifier_list(), AcDirectDeclId(pid), AcParList( Nilac_parameter_list() ), AcNoQualifier())), Nilac_declaration_list(), AcNoBaseInit(), ct, *, DestructorFn()) -> [view_check: ct { with(pid) { Id( uid ): { with( uid->type ) { ITUnknown(): { v_report(Warning( FileLine(file, last_line), Problem1S1ID( "destructor does not belong to phylum or operator:", pid))); } default: { /* ALRIGHT */ } } } } } ]; AcMemberDeclaration( *, *, *, * ) -> [view_check: /* EMPTY */ ]; AcMemberDeclaration( *, AcDeclarator(*, *, AcMemberDecl(pid, aid, *)), *, StaticFn(*) ) provided (is_attr) -> [view_check: { v_report(NonFatal( FileLine(file, last_line) , Problem1S1ID1S1ID( "attribute", aid, "(with %attr) should not be static in phylum", pid))); } ]; AcMemberDeclaration( *, AcDeclarator(*, *, AcMemberDecl(pid, aid, *)), *, *) -> [view_check: { with(pid) { Id( uid ): { with( uid->type ) { ITUnknown(): { v_report(NonFatal( FileLine(file, last_line), Problem1S1ID1S1ID( "attribute", aid, "is not part of any phylum or operator; defined in", pid))); } default: { /* ALRIGHT */ } } } } } { if (f_ispredefinedphylum(pid) && strcmp(f_strofID(pid), "abstract_phylum")!=0 && strcmp(f_strofID(pid), "abstract_list")!=0) v_report(NonFatal( FileLine($0->file, $0->last_line) , Problem1S1ID1S1ID( "attribute", aid, "must not be defined in predefined phylum", pid))); } { if(!f_listelementphylum(f_phylumofoperator(pid))->eq(f_emptyId())) v_report(NonFatal( FileLine(file, last_line) , Problem1S1ID1S1ID( "attribute", aid, "must not be declared in list operator", pid))); } ]; CTextLine( * ) -> [view_check: /* EMPTY */ ]; CTextDollarVar( i = Int( iv ) ) -> [view_check: { if ( /*(i != 0) &&*/ f_DvIsDisallowed( dollarvarsallowed.top() )) { v_report(NonFatal( FileLine( i->file, i->line ), Problem1S1INT( "illegal dollar variable (not allowed in &-ed pattern context)", i ))); } else if (!outmostoperators.empty()) { v_check_dollarvar_attribute_in_operators( i, Nilunpattributes(), outmostoperators.top() ); } else if (iv->value != 0) { v_report(NonFatal( FileLine( i->file, i->line ), Problem1S1INT( "illegal dollar variable", i ))); } } ]; CTextNl( * ) -> [view_check: /* EMPTY */ ]; CTextCexpressionDQ( * ) -> [view_check: /* EMPTY */ ]; CTextCexpressionSQ( * ) -> [view_check: /* EMPTY */ ]; CTextCbody( ct ) -> [view_check: ct ]; /* for the patternchains, we check in the following way: * We have a list of types (on top of a stack of such lists), * and a list of patterns: the term we are unparsing. * Note that we first unparse tail, then head. * We start by taking the head and tail of the top-of-types-stack. * Just before we unparse the tail of the patterns list, * we pop the types list, and push the tail of the types list back. * Just before we unparse the head of the patterns list, * we push the head of the original type list to make it available * to the code that will check the pattern. * During checking, this type may be updated, eg. if it wasn't known * so far. Such an update will replace the value on top of the type stack. * After unparsing the head and the tail of the patterns list, we restore the * 'old' types list on top the stack, at the same time taking into account the * possible changes, by replacing the top of the type-list stack by the * prepending the top of the type stack (used/updated during checking the pattern head) * to the top of the types-stack (used/updated during checking the pattern tail). */ Nilpatternchains() -> [view_check view_set_type: /* EMPTY */ ]; Conspatternchains( h, t ) -> [view_check view_set_type: t h ]; p = Nilpatternchain() -> [view_check: { with( phylumnamesstack.top() ) { Consphylumnames( p_h, p_t ): { v_report(NonFatal( FileLine( p->file, p->line ), Problem1S( "fewer &-ed patterns than expressions"))); } Nilphylumnames(): { /* EMPTY */ } } } ]; p = Conspatternchain( h, t ) -> [view_check: { ID tmp_type = 0; phylumnames tmp_types = 0; with( phylumnamesstack.top() ) { Consphylumnames( p_h, p_t ): { tmp_type = p_h; tmp_types = p_t; } Nilphylumnames(): { tmp_type = f_emptyId(); tmp_types = Nilphylumnames(); v_report(NonFatal( FileLine( p->file, p->line ), Problem1S( "more &-ed patterns than expressions"))); } } phylumnamesstack.pop(); phylumnamesstack.push( tmp_types ); } t { tmp_types = phylumnamesstack.top(); phylumnamesstack.pop(); phylumstack.push( tmp_type ); } h { tmp_type = phylumstack.top(); phylumstack.pop(); phylumnamesstack.push( Consphylumnames( tmp_type, tmp_types ) ); } ]; Conspatternchain( PatternchainitemOutmost( OPDefault(*) ), Nilpatternchain() ) -> [view_check: /* EMPTY */ ]; Conspatternchain( p = PatternchainitemOutmost( OPDefault(*) ), Conspatternchain( PatternchainitemOutmost( OPDefault(*) ), * )), Conspatternchain( *, Conspatternchain( p = PatternchainitemOutmost( OPDefault(*) ), * )), Conspatternchain( p = PatternchainitemOutmost( OPDefault(*) ), Conspatternchain( *, * )) -> [view_check: { v_report(NonFatal( FileLine( p->file, p->line ), Problem1S( "'default' can not be &-ed with (other) patterns"))); } ]; mpg = PatternchainitemGroup( mp ) -> [view_check: { v_report( NonFatal( FileLine( mpg->file, mpg->line ), Problem1S( "Internal Error: PatternchainitemGroup was not handled correctly" ))); } ]; PatternchainitemOutmost( p ) -> [view_check: { if (inforeachcontext.top()!=0) } ${ p:view_check_is_var $} {else} ${ p:view_check_outmostopers_in_phylum $} ]; Nilpatternchain() -> [view_set_type: /* EMPTY */ ]; Conspatternchain( h, t ) -> [view_set_type: { ID tmp_type = 0; phylumnames tmp_types = 0; with( phylumnamesstack.top() ) { Consphylumnames( p_h, p_t ): { tmp_type = p_h; tmp_types = p_t; } Nilphylumnames(): { tmp_type = f_emptyId(); tmp_types = Nilphylumnames(); } } phylumnamesstack.pop(); phylumnamesstack.push( tmp_types ); } t { tmp_types = phylumnamesstack.top(); phylumnamesstack.pop(); phylumstack.push( tmp_type ); if (! phylumstack.top()->eq( f_emptyId() )) { h->type = phylumstack.top(); } } h { tmp_type = phylumstack.top(); phylumstack.pop(); phylumnamesstack.push( Consphylumnames( tmp_type, tmp_types ) ); } ]; PatternchainitemGroup( mp ) -> [view_set_type: /* EMPTY */ ]; PatternchainitemOutmost( p ) -> [view_set_type: { if (! phylumstack.top()->eq( f_emptyId() )) } ${ { p->type = phylumstack.top(); } $} ]; OPOperatorWildcard( i, * ) -> [view_check_is_var: { f_warnifnotvariable( i ); } ]; OPOperator( *, *, * ) -> [view_check_is_var: /* EMPTY */ ]; OPNonLeafVariable( *, * ) -> [view_check_is_var: /* EMPTY */ ]; OPDefault, OPWildcard -> [view_check_is_var: /* EMPTY */ ]; ConsidCexpressions( h, t ) -> [view_check: t h ]; IdCexpression( t, * ) -> [view_check: { f_useoccurlistphylum( t ); } ]; CTextForeachexpression( *, ide, *, ct, fa ) -> [view_check: { phylumnames tmp = f_phylumnames_foreachwith_vars( ide ); phylumnamesstack.push( tmp ); } ide ct { phylumnamesstack.pop(); /* free_phylumnames(tmp); ??? */ } fa ]; NoForeachAfter() -> [view_check: /* EMPTY */ ]; ForeachAfter( mp, ide, *, ct ) -> [view_check: { phylumnames tmp = f_phylumnames_foreachwith_listvars( ide ); phylumnamesstack.push( tmp ); } ct { phylumnamesstack.pop(); /* free_phylumnames(tmp); ??? */ } ]; CTextWithexpression( we, wc, in_foreach_context ) -> [view_check: { withexpressionsstack.push( we ); with(in_foreach_context) { InForeachContext(*): { inforeachcontext.push(1); } NotInForeachContext(): { inforeachcontext.push(0); phylumnamesstack.push( we->type ); } } if (we->length() == 1) { dollarvarsallowed.push( DVAllowed() ); } else { dollarvarsallowed.push( DVDisallowed() ); } } wc wc:view_set_type { we->type = phylumnamesstack.top(); withexpressionsstack.pop(); dollarvarsallowed.pop(); } we { if (! inforeachcontext.top() ) { phylumnamesstack.pop(); } inforeachcontext.pop(); } ]; Nilwithexpressions() -> [view_check: /* EMPTY */ ]; Conswithexpressions( h, t ) -> [view_check: { ID tmp_type = 0; phylumnames tmp_types = 0; t->type = phylumnamesstack.top(); with( t->type ) { Consphylumnames( p_h, p_t ): { tmp_type = p_h; tmp_types = p_t; } Nilphylumnames(): { tmp_type = f_emptyId(); tmp_types = Nilphylumnames(); } } phylumnamesstack.pop(); phylumnamesstack.push( tmp_types ); } t { h->type = tmp_type; if (tmp_type->eq( f_emptyId())) { v_report(NonFatal( FileLine( h->file, h->line ), Problem1S1we( "could not infer type of with-expression argument:", h ))); } } ]; Conswithcases( wc, wcs ) -> [view_check: wcs wc ]; Nilwithcases() -> [view_check: /* EMPTY */ ]; Withcase( mp, ct ) -> [view_check: { outmostoperators.push( Niloperators() ); variablesstack.push( Nilvariables()); cl_scope++; } /* the context (Ctext) has called phylumstack.push */ mp ct /* the context (Ctext) calls phylumstack.pop */ { outmostoperators.top()->freelist(); outmostoperators.pop(); v_reset_variables_type( variablesstack.top() ); cl_scope--; variablesstack.top()->freelist(); variablesstack.pop(); } ]; Conswithcases( wc, wcs ) -> [view_set_type: wcs wc ]; Nilwithcases() -> [view_set_type: /* EMPTY */ ]; Withcase( mp, * ) -> [view_set_type: mp ]; Consunparsedeclarations( ud, uds ) -> [view_check: uds ud ]; Nilunparsedeclarations() -> [view_check: /* EMPTY */ ]; UnparseDeclaration( op, uc ) -> [view_check: { outmostoperators.push( Niloperators() ); dollarvarsallowed.push( DVAllowed() ); phylumstack.push( f_emptyId() ); variablesstack.push( Nilvariables()); cl_scope++; } op uc { outmostoperators.top()->freelist(); outmostoperators.pop(); dollarvarsallowed.pop(); phylumstack.pop(); v_reset_variables_type( variablesstack.top() ); cl_scope--; variablesstack.top()->freelist(); variablesstack.pop(); } ]; Consunparseclauses( uc, ucs ) -> [view_check: ucs uc ]; Nilunparseclauses() -> [view_check: /* EMPTY */ ]; UnparseClause( vn, ui ) -> [view_check: vn:view_check_u ui ]; Consviewnames( vn, vns ) -> [view_check_u: vns { if (pg_uviewshavebeendefined) f_useoccuruviewname( vn ); else v_extendoccur_nowarning( vn, ITUserUView() ); v_add_to_uviewnames( vn ); } ]; Nilviewnames() -> [view_check_u: /* EMPTY */ ]; Consviewnames( vn, vns ) -> [view_check_r: vns { if (pg_rviewshavebeendefined) f_useoccurrviewname( vn ); else v_extendoccur_nowarning( vn, ITUserRView() ); v_add_to_rviewnames( vn ); } ]; Nilviewnames() -> [view_check_r: /* EMPTY */ ]; Consunparseitems( ui, uis ) -> [view_check: uis ui ]; Nilunparseitems() -> [view_check: /* EMPTY */ ]; UnpStr(*, *, * ) -> [view_check: /* EMPTY */ ]; UnpSubexpr(*, us, * ) -> [view_check: us ]; UnpCtext(*, ct ) -> [view_check: ct ]; UnpBody(*, ui ) -> [view_check: ui ]; UnpSubTerm( id ) -> [view_check: { // MPi TODO These checks are now disabled. They failed if the term to be unparsed // was not a pattern variable (and such its type could not be determined). As now // everything is just handed to the global unparse functions, the type is not of // any interest. The C++ compiler will find unknown identifiers. // f_useoccurpatternvariable( id ); // v_syn_type_attribute_ID( id ); } ]; UnpDollarvarTerm( i ) -> [view_check: { v_check_dollarvar_attribute_in_operators( i, Nilunpattributes(), outmostoperators.top() ); } ]; UnpSubAttr( v_id, unp_a ) -> [view_check: { ID p_id; if (f_useoccurpatternvariable( v_id ) && (p_id = f_phylumofpatternvariable( v_id))) f_check_unpattributes_in_phylum( unp_a, p_id ); v_syn_type_attribute_ID( v_id ); } ]; UnpDollarvarAttr( i, unp_a ) -> [view_check: { v_check_dollarvar_attribute_in_operators( i, unp_a, outmostoperators.top() ); } ]; UnpCastedVariable( *, * ) -> [view_check: /* EMPTY */ ]; Consunparsedeclarations( ud, uds ) -> [view_check_viewnames view_checklanguagenames: uds ud ]; Nilunparsedeclarations() -> [view_check_viewnames view_checklanguagenames: /* EMPTY */ ]; UnparseDeclaration( *, uc ) -> [view_check_viewnames view_checklanguagenames: uc ]; Consunparseclauses( uc, ucs ) -> [view_check_viewnames view_checklanguagenames: ucs uc ]; Nilunparseclauses() -> [view_check_viewnames view_checklanguagenames: /* EMPTY */ ]; UnparseClause( *, ui ) -> [view_checklanguagenames: ui]; UnparseClause( *, ui ) -> [view_check_viewnames: { The_current_unparseitems=ui; } ui { The_current_unparseitems=NULL; } ]; Consunparseitems( ui, uis ) -> [view_check_viewnames view_checklanguagenames: uis ui ]; Nilunparseitems() -> [view_check_viewnames view_checklanguagenames: /* EMPTY */ ]; UnpStr(*, *, vno ) -> [view_check_viewnames: vno ]; UnpSubexpr(*, *, vno ) -> [view_check_viewnames: vno ]; UViewVarDecl(vno, *, * ) -> [view_check_viewnames: vno ]; NoViewname() -> [view_check_viewnames: /* EMPTY */ ]; YesViewname( vn ) -> [view_check_viewnames: { if(!is_uview_var(vn)) f_useoccuruviewname( vn ); } ]; UnpStr(NoLanguagename(), *, * ) -> [view_checklanguagenames: /* EMPTY */ ]; UnpStr(LanguageList(qual), *, * ) -> [view_checklanguagenames: { f_useoccurlanguagename(qual); } ]; UnpSubexpr(NoLanguagename(), *, * ) -> [view_checklanguagenames: /* EMPTY */ ]; UnpSubexpr(LanguageList(qual), *, * ) -> [view_checklanguagenames: { f_useoccurlanguagename(qual); } ]; UnpCtext(NoLanguagename(), *) -> [view_checklanguagenames: /* EMPTY */ ]; UnpCtext(LanguageList(qual), *) -> [view_checklanguagenames: { f_useoccurlanguagename(qual); } ]; UnpBody( NoLanguagename(), items ) -> [view_checklanguagenames: items ]; UnpBody( LanguageList(qual), items ) -> [view_checklanguagenames: { f_useoccurlanguagename(qual); } items ]; %{ KC_UNPARSE #include static std::stack outmostoperators; static std::stack dollarvarsallowed; static std::stack inforeachcontext; static std::stack argumentsstack; static std::stack phylumstack; static std::stack phylumnamesstack; static std::stack withexpressionsstack; static std::stack operatorstack; static std::stack variablesstack; %} bool f_DvIsDisallowed(dollarvarstatus $dvs) { DVAllowed(): { return false; } DVDisallowed(): { return true; } } ID f_listelementphylum(ID $id) { Id( uid ): { with( uid->type ) { ITUserPhylum( pd ): { with( pd ) { PhylumDeclaration( *, *, ListAlternatives( *, i ), * ): { return i; } default: { return f_emptyId(); } } } default: { return f_emptyId(); } } } } ID f_listelementconsoperator(ID $id) { Id( uid ): { with( uid->type ) { ITUserPhylum( pd ): { with( pd ) { PhylumDeclaration( *, *, ListAlternatives( Consalternatives(Alternative( Cons_id, * ), * ), * ), * ): { return Cons_id; } default: { return f_emptyId(); } } } default: { return f_emptyId(); } } } } %{ KC_TYPES_HEADER namespace kc { ID f_emptyId(); } %} ID f_emptyId() { static ID emptyID = 0; if (! emptyID) { emptyID = Id (Str( mkcasestring( "" ))); } return emptyID; } bool f_operatorinphylum(ID $oid, ID pid) { Id( uid ): { with( uid->type ) { ITUserOperator( *, id ): { return pid->eq( id ); } default: { return false; } } } } bool f_isphylum(ID $id) { Id( uid ): { with( uid->type ) { ITPredefinedPhylum( * ), ITUserPhylum( * ): { return true; } default: { return false; } } } } phylumdeclaration f_phylumdeclofid(ID $id) { Id( uid ): { with( uid->type ) { ITPredefinedPhylum( dcl ), ITUserPhylum( dcl ): { return dcl; } default: { return NULL; } } } } bool f_ispredefinedphylum(ID $id) { Id( uid ): { with( uid->type ) { ITPredefinedPhylum( * ): { return true; } default: { return false; } } } } alternative f_alternativeofoperator(ID $oid) { Id( uid ): { with( uid->type ) { ITUserOperator( a, * ): { return a; } default: { return 0; } } } } arguments f_argumentsofoperator(ID $oid) { Id( uid ): { with( uid->type ) { ITUserOperator( Alternative( *, args ), * ): { return args; } default: { return Nilarguments(); } } } } ID f_phylumofoperator(ID $oid) { Id( uid ): { with( uid->type ) { ITPredefinedOperator( *, id ), ITUserOperator( *, id ): { return id; } default: { return f_emptyId(); } } } } ID f_phylumofpatternID(ID vid) { with( vid->type ) { ITPatternVariable( id, * ): { return id; } default: { return f_emptyId(); } } } ID f_phylumofpatternvariable(ID $vid) { Id( uid ): { with( uid->type ) { ITPatternVariable( id, * ): { return id; } default: { return f_emptyId(); } } } } void v_syn_type_attribute_ID(ID $id) { Id( uid ): { with( uid->type ) { ITPatternVariable( *, * ): { id->type = uid->type; } default: {/* EMPTY */} } } } bool f_Nilarguments(arguments $a) { Nilarguments(): { return true; } Consarguments( *, * ): { return false; } } ID f_hd_arguments(arguments $a) { Nilarguments(): { assertionFailed("Head of empty argument list requested"); /* shouldn't happen */ return 0; } Consarguments( hd, * ): { return hd; } } arguments f_tl_arguments(arguments $a) { Nilarguments(): { assertionFailed("Tail of empty argument list requested"); /* shouldn't happen */ return 0; } Consarguments( *, tl ): { return tl; } } void v_check_dollarvar_attribute_in_operators(INT i, unpattributes a, operators $o) { Niloperators(): { /* EMPTY */ } Consoperators( o_o, o_os ): { ID phy = f_subphylumofoperator( o_o, i ); if (phy->eq(f_emptyId())) { v_report(NonFatal( FileLine( i->file, i->line ), Problem1S1INT1S1ID( "illegal dollar variable", i, "not that many subterms in operator", o_o ))); } else { f_check_unpattributes_in_phylum( a, phy ); v_do_check_dollarvar_in_operators( i, o_os, phy ); } } } ID f_check_unpattributes_in_phylum(unpattributes a, ID p) { ID tmp; unpattributes t = a->reverse(); tmp = f_do_check_unpattributes_in_phylum( t, p ); t->freelist(); return tmp; } /* * WARNING: the routine below expects the unpattributes list to be in * 'normal' order: the tail contains attributes of the head * So: take care that the unpattributes as parsed are reversed.. * as v_check_unpattributes_in_phylum does for example * It returns the type of the attribute */ static ID f_do_check_unpattributes_in_phylum(unpattributes $a, ID p) { Nilunpattributes(): { return p; } Consunpattributes( a_id, r_a ): { ID type = f_typeof_attribute_in_phylym( a_id, p ); if ( type->eq(f_emptyId() )) { v_report(NonFatal( FileLine( a_id->file, a_id->line ), Problem1S1ID1S1ID( "attribute", a_id, "not defined in phylum", p ))); return f_emptyId(); } else { return f_do_check_unpattributes_in_phylum( r_a, type ); } } } static void v_do_check_dollarvar_in_operators(INT i, operators $o, ID p) { Niloperators(): {/* EMPTY */} Consoperators( o_o, o_os ): { ID phy = f_subphylumofoperator( o_o, i ); if (phy->eq(f_emptyId())) { v_report(NonFatal( FileLine( i->file, i->line ), Problem1S1INT1S1ID( "illegal dollar variable", i, "not that many subterms in operator", o_o ))); } else if (! p->eq( phy )) { v_report(NonFatal( FileLine( i->file, i->line ), Problem1S1INT1S1ID1S1ID( " type mismatch for dollar varariable:", i, "; old type", p, "; new type", phy ))); } v_do_check_dollarvar_in_operators( i, o_os, p ); } } %{ #include "parse.h" /* for f_lookupdecl */ %} bool f_attribute_in_phylym(ID a, ID p) { return f_typeof_attribute_in_phylym(a, p)->eq(f_emptyId()) ? false : true; } ID f_typeof_attribute_in_phylym(ID a, ID p) { phylumdeclaration tmp = f_lookupdecl( p ); if ( tmp == 0 ) { v_report(NonFatal( FileLine( p->file, p->line ), Problem1S1ID( "internal error: could not find declaration of phylum:", p ))); return f_emptyId(); } with( tmp ) { PhylumDeclaration( *, *, *, CcodeOption( attrs, * ) ): { foreach( Attribute( a_type, a_id, * ); attributes attrs ) { if (a->eq(a_id)) return a_type; } foreach( AcMemberDeclaration(Consac_declaration_specifiers( AcDeclSpecTypeSpec(AcTypeSpec(a_type)), *), AcDeclarator(*, *, AcMemberDecl(*, a_id, *)), *, *); fndeclarations $0->additional_members) { if (a->eq(a_id)) return a_type; } return f_emptyId(); } } } ID f_subphylumofoperator(ID o, INT $i) { Int( ii ): { if (ii->value == 0) { return f_phylumofoperator( o ); } else { return f_subphylum( f_argumentsofoperator( o ), i ); } } } /* we want to have the i-th element from the *end* of the list */ ID f_subphylum(arguments a, INT i) { return f_do_subphylum( a, i, a->length() ); } static ID f_do_subphylum(arguments $a, INT i, int a_i) { Nilarguments(): { /* internal error*/ return f_emptyId(); } Consarguments( a_a, a_as ): { with( i ) { Int( ii ): { if (ii->value == a_i) { return a_a; } else { return f_do_subphylum( a_as, i, a_i - 1 ); } } } } } argument f_argumentofoperator(ID o, INT $i) { Int( ii ): { if (ii->value == 0) { return Argument( f_phylumofoperator( o ), mkinteger(0)); } else { return f_argument( f_argumentsofoperator( o ), i ); } } } /* we want to have the i-th element from the *end* of the list */ argument f_argument(arguments a, INT i) { return f_do_argument( a, i, a->length() ); } static argument f_do_argument(arguments $a, INT i, int a_i) { Nilarguments(): { /* internal error*/ return Argument(f_emptyId(), mkinteger(0)); } Consarguments( a_a, a_as ): { with( i ) { Int( ii ): { if (ii->value == a_i) { return Argument( a_a, mkinteger(a->seqnr) ); } else { return f_do_argument( a_as, i, a_i - 1 ); } } } } } ID f_phylumofoutmostpattern(outmostpattern $p) { OPOperatorWildcard( o, * ): { return f_phylumofoperator( o ); } OPOperator( o, *, * ): { return f_phylumofoperator( o ); } OPNonLeafVariable( *, r_p ): { return f_phylumofoutmostpattern( r_p ); } OPDefault(*), OPWildcard(*): { return f_emptyId(); } } ID f_operatorofphylum(ID p, int i) { phylumdeclaration tmp = f_lookupdecl( p ); if ( tmp == 0 ) { v_report(NonFatal( FileLine( p->file, p->line ), Problem1S1ID( "internal error: could not find declaration of phylum:", p ))); return f_emptyId(); } with( tmp ) { PhylumDeclaration( *, *, pb, * ): { with( pb ) { Emptyproductionblock(): { return f_emptyId(); } ListAlternatives( a, * ), NonlistAlternatives( a ), PredefinedAlternatives( a ): { alternative tmp_a = f_alternative( a, i ); if ( tmp_a == 0 ) { v_report(NonFatal( FileLine( p->file, p->line ), Problem1S1ID( "internal error: could not find operators of phylum:", p ))); return f_emptyId(); } with( tmp_a ) { Alternative( id, * ): { return id; } } } } } } } /* we want to have the i-th element from the *end* of the list */ alternative f_alternative(alternatives a, int i) { return f_do_alternative( a, i, a->length() ); } static alternative f_do_alternative(alternatives $a, int i, int a_i) { Nilalternatives(): { /* internal error*/ return 0; } Consalternatives( a_a, a_as ): { if (i == a_i) { return a_a; } else { return f_do_alternative( a_as, i, a_i - 1 ); } } } /***************************************************************************/ %{ KC_UNPARSE #include "parse.h" static ID cl_uniqueID = 0; static ID cl_storageID = 0; %} Consphylumdeclarations( d, rpds ) -> [view_check_uniq: rpds d ]; Nilphylumdeclarations() -> [view_check_uniq: /* EMPTY */ ]; PhylumDeclaration( *, NoStorageOption(), pb, * ) -> [view_check_uniq: pb ]; PhylumDeclaration( *, NegativeStorageOption( * ), *, * ) -> [view_check_uniq: /* EMPTY */ ]; PhylumDeclaration( id, PositiveStorageOption( s_id ), pb, * ) -> [view_check_uniq: { $0->marked = 1; cl_uniqueID = id; cl_storageID = s_id; } pb:view_check_uniq1 { v_reset_phylumdeclaration_marks(); cl_uniqueID = 0; cl_storageID = 0; } ]; PhylumDeclaration( *, *, pb, * ) -> [view_check_uniq1: pb ]; Emptyproductionblock() -> [view_check_uniq1: /* EMPTY */ ]; ListAlternatives( alt, * ), NonlistAlternatives( alt ), PredefinedAlternatives( alt ) -> [view_check_uniq1: alt ]; Consalternatives( a, ralts ) -> [view_check_uniq1: ralts a ]; Nilalternatives() -> [view_check_uniq1: /* EMPTY */ ]; Alternative( *, args ) -> [view_check_uniq1: args ]; Consarguments( id, rargs ) -> [view_check_uniq1: { phylumdeclaration tmp = f_lookupdecl( id ); } rargs { if (tmp) } ${ tmp:view_check_uniq2 $} ]; PhylumDeclaration( *, PositiveStorageOption( * ), Emptyproductionblock(), *), PhylumDeclaration( *, PositiveStorageOption( * ), ListAlternatives(*,*), *), PhylumDeclaration( *, PositiveStorageOption( * ), NonlistAlternatives(*), *), PhylumDeclaration( *, PositiveStorageOption( * ), PredefinedAlternatives(*), *), PhylumDeclaration( *, *, Emptyproductionblock(), * ) -> [view_check_uniq2: /* EMPTY */ ]; PhylumDeclaration( id, *, ListAlternatives( *, * ), * ), PhylumDeclaration( id, *, NonlistAlternatives( * ), * ) -> [view_check_uniq2: { if (! $0->marked) } ${ { v_report(NonFatal( FileLine( cl_storageID->file, cl_storageID->line ), Problem1S1ID1S1ID( "'uniq' declared phylum:", cl_uniqueID, "has non 'uniq' (transitive) subterm:", id) )); ($0)->marked = 1; } $0:view_check_uniq1 $} ]; PhylumDeclaration( *, *, PredefinedAlternatives( * ), * ) -> [view_check_uniq2: /* EMPTY */ ]; Nilarguments() -> [view_check_uniq1: /* EMPTY */ ]; void v_reset_phylumdeclaration_marks() { foreach( p; phylumdeclarations Thephylumdeclarations ) { p->marked = 0; } } void v_reset_variables_type(variables v) { foreach( var; variables v ) { with( var ) { Id( uid ): { with( uid->type ) { ITUnknown(): {/* EMPTY */} ITPredefinedPhylum( * ): {/* EMPTY */} ITUserPhylum( * ): {/* EMPTY */} ITPredefinedOperator( *, * ): {/* EMPTY */} ITUserOperator( *, * ): {/* EMPTY */} ITPredefinedStorageClass(): {/* EMPTY */} ITStorageClass(): {/* EMPTY */} ITUserFunction( * ): {/* EMPTY */} ITPredefinedUView(): {/* EMPTY */} ITUserUView(): {/* EMPTY */} ITPredefinedRView(): {/* EMPTY */} ITUserRView(): {/* EMPTY */} ITPatternVariable( *, uid_scope ): { with( uid->scopeinfo ) { Nilscopetypefilelinestack(): { uid->type = ITUnknown(); uid->file = mkcasestring(""); uid->line = 0; } Consscopetypefilelinestack( ScopeTypeFileLine( s, t, f, l ), r_scopeinfo ): { if (s == uid_scope) { uid->type = t; uid->file = f; uid->line = l->value; uid->scopeinfo = r_scopeinfo; } } } } } } } } } /* code to test the pattern making routines */ %{ KC_UNPARSE #include "pat.h" /* for syn_outmostpatterns and v_resetbindingidmarks */ %} RwDeclaration( op, rc ) -> [view_make_patternreps: { v_resetbindingidmarks(); // Generate PatternRepresentation from Pattern v_add_rewriterulesinfo_to_operator( add_predicates_to_patternrepresentations( syn_outmostpatterns( op ) ), rc ); } ]; Nilfndeclarations() -> [view_make_patternreps: /* EMPTY */ ]; Consfndeclarations( a_fnd, r_fnd) -> [view_make_patternreps: r_fnd a_fnd ]; FnAcDeclaration( *, *, *, *, ct, *, * ) -> [view_make_patternreps: ct ]; AcMemberDeclaration( *, *, *, * ) -> [view_make_patternreps: /* EMPTY */ ]; CTextCbody( ct ) -> [view_make_patternreps: ct ]; CTextForeachexpression( *, *, *, ct, fa ) -> [view_make_patternreps: ct fa ]; NoForeachAfter() -> [view_make_patternreps: /* EMPTY */ ]; ForeachAfter( *, *, *, ct ) -> [view_make_patternreps: ct ]; CTextWithexpression( *, wc, * ) -> [view_make_patternreps: wc { check_with_patterns(wc->wcinfo); } ]; Nilwithcases() -> [view_make_patternreps: { $0->wcinfo = Nilwithcasesinfo(); } ]; Conswithcases( wc, r_wcs ) -> [view_make_patternreps: wc r_wcs /* the following can be done much more efficient, * because both wc->wcinfo and r_wcs->wcinfo are already sorted */ { $0->wcinfo = r_wcs->wcinfo; foreach( wci; withcasesinfo wc->wcinfo ) { $0->wcinfo = insertin_withcasesinfo( wci, $0->wcinfo ); } } ]; Withcase( mp, ct ) -> [view_make_patternreps: ct { v_resetbindingidmarks(); // Generate PatternRepresentation from Pattern $0->wcinfo = f_withcasesinfo( add_predicates_to_patternrepresentations( syn_patternchains( mp ) ), ct ); } ]; UnparseDeclaration( op, uc ) -> [view_make_patternreps: uc { v_resetbindingidmarks(); // Generate PatternRepresentation from Pattern $0->patternreps = syn_outmostpatterns( op ); $0->patternreps = add_predicates_to_patternrepresentations($0->patternreps); v_add_unparsedeclsinfo_to_operator( $0->patternreps, uc ); } ]; Nilunparseclauses() -> [view_make_patternreps: /* EMPTY */ ]; Consunparseclauses( a_uc, r_uc ) -> [view_make_patternreps: r_uc a_uc ]; UnparseClause( *, u_i ) -> [view_make_patternreps: u_i ]; Nilunparseitems() -> [view_make_patternreps: /* EMPTY */ ]; Consunparseitems( a_ui, r_ui ) -> [view_make_patternreps: r_ui a_ui ]; UnpCtext(*, ct ) -> [view_make_patternreps: ct ]; UnpBody(*, ui ) -> [view_make_patternreps: ui ]; void v_add_to_uviewnames(ID v) { foreach( vn; viewnames Theuviewnames ) { if ( vn->eq( v )) return; } Theuviewnames = Consviewnames( v, Theuviewnames ); } void v_add_to_uviewnames_ext(ID v) { viewnames uviewnames=Theuviewnames; while(uviewnames) { with(uviewnames) { node=Consviewnames(vn,tail): { if(vn->eq(v)) { if(!node->is_extern) node->is_extern=true; return; } uviewnames=tail; } Nilviewnames(): { uviewnames=0; } } } Theuviewnames = Consviewnames( v, Theuviewnames ); Theuviewnames->is_extern=true; } void v_add_to_rviewnames(ID v) { foreach( vn; viewnames Therviewnames ) { if ( vn->eq( v )) return; } Therviewnames = Consviewnames( v, Therviewnames ); } void v_add_to_rviewnames_ext(ID v) { viewnames rviewnames=Therviewnames; while(rviewnames) { with(rviewnames) { node=Consviewnames(vn,tail): { if(vn->eq(v)) { if(!node->is_extern) node->is_extern=true; return; } rviewnames=tail; } Nilviewnames(): { rviewnames=0; } } } Therviewnames = Consviewnames( v, Therviewnames ); Therviewnames->is_extern=true; } void v_add_to_storageclasses(ID v, ID p) { Thestorageclasses = do_add_to_storageclasses( v, p, Thestorageclasses, Thestorageclasses ); } static storageclasses do_add_to_storageclasses(ID v, ID p, storageclasses $s, storageclasses all) { Nilstorageclasses() : { storageclasses tmp = Consstorageclasses( v, all ); tmp->phyla = Nilphylumnames(); if (! p->eq(f_emptyId())) { tmp->phyla = Consphylumnames( p, tmp->phyla ); } return tmp; } Consstorageclasses( sc, r_sc ): { if ( sc->eq( v )) { if (! p->eq(f_emptyId())) { s->phyla = Consphylumnames( p, s->phyla ); } return all; } else { return do_add_to_storageclasses( v, p, r_sc, all ); } } } UnpStr(*, *, *) -> [ view_collect_strings: { add_string_to_collection($0); } ]; %{ static unparseitems** string_collection; static unparseitems The_Nilunparseitems; unparseitems The_current_unparseitems; %} %{ KC_UNPARSE extern unparseitems The_current_unparseitems; %} %{ KC_TYPES_HEADER namespace kc { void collect_strings(void); } %} void collect_strings() { long i; long ssize=last_text_nr()+1; int lsize=Thelanguages->length(); The_Nilunparseitems=Nilunparseitems(); string_collection=new unparseitems*[ssize]; for( i=0; iunparse(v_null_printer, view_collect_strings); } void add_string_to_collection(unparseitem $s) { UnpStr(NoLanguagename(),*,*): { int lsize=Thelanguages->length(); long nr=s->text_nr; int i; for(i=0;itext_nr; foreach( Id( u_id ); languagenames langs) { with((IDtype)u_id->type) { ITLanguageName( l ): { unparseitems entry=string_collection[nr][l->value]; with(entry) { Nilunparseitems(), Consunparseitems(UnpStr(NoLanguagename(),*,*), Nilunparseitems()): { string_collection[nr][l->value]=Consunparseitems(s,The_Nilunparseitems); } default: { string_collection[nr][l->value]= Consunparseitems(s,entry); } } } default: { /* EMPTY */ } } } } } %{ KC_TYPES_HEADER namespace kc { void unparse_string_collection(void); } %} void unparse_string_collection() { int l=Thelanguages->length(); long ssize=last_text_nr()+1; foreach( language; languagenames Thelanguages) { long nr; l--; language->unparse(v_ccfile_printer,view_output_collection); for(nr=0;nrunparse(v_ccfile_printer,view_output_collection); v_ccfile_printer(",\n",base_uview); } v_ccfile_printer("};\n\n",base_uview); } v_ccfile_printer("char **kc_language=kc_language_",base_uview); with((languagenames)Thelanguages) { Conslanguagenames( l,*): { l->unparse(v_ccfile_printer,base_uview); } } v_ccfile_printer(";\n\n",base_uview); } /***************************************************************************/ /* generate a list of types of the foreach variables generated for * the with-expression in a foreach context. */ phylumnames f_phylumnames_foreachwith_vars( idCexpressions a_idCexpressions ) { return t_f_phylumnames_foreachwith_vars(a_idCexpressions); } phylumnames t_f_phylumnames_foreachwith_vars( idCexpressions $a_idCexpressions ) { ConsidCexpressions( IdCexpression( id, * ), t ): { return Consphylumnames( f_listelementphylum(id), t_f_phylumnames_foreachwith_vars( t )); } NilidCexpressions(): { return Nilphylumnames(); } } phylumnames f_phylumnames_foreachwith_listvars( idCexpressions a_idCexpressions ) { return t_f_phylumnames_foreachwith_listvars(a_idCexpressions); } phylumnames t_f_phylumnames_foreachwith_listvars( idCexpressions $a_idCexpressions ) { ConsidCexpressions( IdCexpression( id, * ), t ): { return Consphylumnames( id, t_f_phylumnames_foreachwith_listvars( t )); } NilidCexpressions(): { return Nilphylumnames(); } } void f_collect_members(fndeclarations fns) { foreach($fn; fndeclarations fns) { FnAcDeclaration( *, AcDeclarator(*,*, AcQualifiedDeclProto( Consac_class_qualifier_list( id, Nilac_class_qualifier_list() ), *,*,* ) ), *,*,*,*, MemberFn() ), FnAcDeclaration( *, AcDeclarator(*,*, AcQualifiedDeclProto( *, AcConvOperatorDecl( id, * ), *,* ) ), *,*,*,*, ConvOperatorFn() ), FnAcDeclaration( *, AcDeclarator(*,*, AcQualifiedDeclProto( *, AcDirectDeclId( id ), *,* ) ), *,*,*,*, ConstructorFn() ), FnAcDeclaration( *, AcDeclarator(*,*, AcQualifiedDeclProto( *, AcDirectDeclId( id ), *,* ) ), *,*,*,*, DestructorFn() ), AcMemberDeclaration( *, AcDeclarator(*,*, AcMemberDecl(id, *, * )), *,* ): { phylumdeclaration ph_decl=f_phylumdeclofid(id); alternative op=f_alternativeofoperator(id); if(ph_decl) ph_decl->additional_members=Consfndeclarations(fn, ph_decl->additional_members); else if(op) op->additional_members=Consfndeclarations(fn, op->additional_members); } default: {} } } ID f_id_of_ctor_dtor_decl(ac_declarator $decl) { AcDeclarator(*,*, AcQualifiedDeclProto( *, AcDirectDeclId( id ), *,* ) ): { return id; } default: { return NULL; } } void prepare_base_classes(baseclass_declarations decls) { foreach(BaseClassDecl(id,bases);baseclass_declarations decls) { phylumdeclaration ph_decl=f_phylumdeclofid(id); alternative op=f_alternativeofoperator(id); if(ph_decl) ph_decl->base_classes=concat(bases, ph_decl->base_classes); else if(op) op->base_classes=concat(bases,op->base_classes); } } // vim:sts=4:ts=8:cino=g0,t0,\:0 kimwitu++-2.3.13/src/kimwl.l0000644000175000017500000002662410752414212014234 0ustar useruser%{ // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // %} %option noyywrap %option never-interactive %{ /* * kimwl.l */ static char kimwl_lAccesSid[] = "@(#)$Id: kimwl.l,v 1.41 2008/02/06 20:28:58 piefel Exp $"; /* For windows (NT at least) we need to redefine fileno */ #if defined(_WIN32) && ! defined (__GNUC__) # define fileno _fileno #endif /***************************************************************************/ /* * Name conventions: tokens and states are in CAPITALS * operators are capitalized * */ %} %start NORMAL INCL INCLSTART CEXPR CEXPRDQ CEXPRSQ C OPNAME %x OPTION %{ #include #include #include "k.h" #include "yystype.h" #include "kimwy.h" namespace { std::string cinclude(""); int cinit_paren_nesting =0; int cinit_array_nesting =0; void reset_nestcount(); int eat_comment(casestring); void eat_line_comment(); void count(bool = true); } // namespace %} special [\_] ident (([[:alpha:]]|{special})([[:alnum:]]|{special})*) nonident [^a-zA-Z0-9\_] int ([[:digit:]]+) exp ([Ee][-+]?[[:digit:]]+) float ([-+]?[[:digit:]]+\.?[[:digit:]]*) wsnl [\ \n\t\v\f] ws [\ \t] op_name (\+|-|\*|\/|%|^|&|\||~|!|=|<|>|\+=|-=|\*=|\/=|%=|^=|&=|\|=|<<|>>|<<=|>>=|==|!=|<=|>=|&&|\|\||\+\+|--|,|->\*|->) operator_name ({op_name}|new(\[\])?|delete(\[\])?|\[\]|\(\)) %% {wsnl} { count(false); } ^%uview { count(); return T_PERCENTUVIEW; } %uviewvar { count(); return T_PERCENTUVIEWVAR; } ^%rview { count(); return T_PERCENTRVIEW; } %rviewvar { count(); return T_PERCENTRVIEWVAR; } ^%storageclass { count(); return T_PERCENTSTORAGECLASS; } ^%language { count(); return T_PERCENTLANGUAGE; } ^%option { count(); BEGIN OPTION; } ^\%\{{ws}* { count(); BEGIN INCLSTART; return T_INCLUDESTART; } {ident} { count(); yylval.yt_casestring = mkcasestring(yytext); return T_ID; } {ws} { count(false); } \n { count(); cinclude = ""; cinclude.reserve(1024); BEGIN INCL; return T_ENDOFINCLUDESTART; } .|\n { count(); cinclude += yytext[0]; } ^\%\{{ws}* { count(); v_report(Warning(FileLine(pg_filename, pg_lineno), Problem1S("Opening '%{' (nested C++ includes; preceding closing '%}' not found)"))); cinclude += yytext; } ^\%\}{ws}*\n { count(); BEGIN NORMAL; yylval.yt_casestring = mkcasestring(cinclude.c_str()); return T_INCLUDEEND; } \/\* { count(); yylval.yt_integer = mkinteger(eat_comment(pg_filename)); return T_CNEWLINES; } \/\* { count(); eat_comment(pg_filename); } \/\/ { count(); eat_line_comment(); yylval.yt_integer = mkinteger(1); return T_CNEWLINES; } \/\/ { count(); eat_line_comment(); } \-\> { count(); return T_ARROW; } provided { count(); return T_PROVIDED; } default { count(); return T_DEFAULT; } \-?{int} { count(); yylval.yt_integer = mkinteger(atoi(yytext)); return T_INT; } list { count(); return T_LIST; } static { count(); return T_STATIC; } auto { count(); return T_AUTO; } register { count(); return T_REGISTER; } extern { count(); return T_EXTERN; } typedef { count(); return T_TYPEDEF; } const { count(); return T_CONST; } volatile { count(); return T_VOLATILE; } unsigned { count(); return T_UNSIGNED; } virtual { count(); return T_VIRTUAL; } operator { count(); BEGIN OPNAME; return T_OPERATOR; } ^%ctor { count(); return T_CONSTRUCTOR; } ^%dtor { count(); return T_DESTRUCTOR; } ^%member { count(); return T_MEMBER; } ^%attr { count(); return T_ATTR; } ^%base { count(); return T_BASECLASS; } \.\.\. { count(); return T_DOTDOTDOT; } :: { count(); return T_COLONCOLON; } {wsnl}* { count(false); } {operator_name} { count(); BEGIN NORMAL; yylval.yt_casestring = mkcasestring(yytext); return T_OPNAME ; } {ident} { count(); BEGIN NORMAL; yylval.yt_casestring = mkcasestring(yytext); return T_ID ; } {ident} { count(); yylval.yt_casestring = mkcasestring(yytext); return T_ID ; } [^\n\\"';,\(\)\[\]$]+ { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CEXPRESSION; } \${int} { count(); yylval.yt_integer = mkinteger(atoi(yytext+1)); return T_DOLLARVAR; } \$\{ { count(); return T_UNPBLOCKSTART; } \$\} { count(); return T_UNPBLOCKEND; } \$ { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CEXPRESSION; } \n { count(); return yytext[0]; } \\ { count(); yylval.yt_casestring = mkcasestring("\\"); return T_CEXPRESSION; } \\\\ { count(); yylval.yt_casestring = mkcasestring("\\\\"); return T_CEXPRESSION; } \" { count(); BEGIN CEXPRDQ; return yytext[0]; } ' { count(); BEGIN CEXPRSQ; return yytext[0]; } ; { count(); BEGIN NORMAL; reset_nestcount(); return yytext[0]; } \, { count(); return yytext[0]; } \( { count(); cinit_paren_nesting++; yylval.yt_casestring = mkcasestring("("); return yytext[0]; } \) { count(); if (cinit_paren_nesting == 0) { BEGIN NORMAL; reset_nestcount(); return yytext[0]; } else { cinit_paren_nesting--; yylval.yt_casestring = mkcasestring(")"); return yytext[0]; } } \[ { count(); cinit_array_nesting++; yylval.yt_casestring = mkcasestring("["); return yytext[0]; } \] { count(); if (cinit_array_nesting == 0) { BEGIN NORMAL; reset_nestcount(); return yytext[0]; } else { cinit_array_nesting--; yylval.yt_casestring = mkcasestring("]"); return yytext[0]; } } [^\n\\"]+ { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CEXPRESSION; } \" { count(); BEGIN CEXPR; return yytext[0]; } \\\" { count(); yylval.yt_casestring = mkcasestring("\\\""); return T_CEXPRESSION; } ' { count(); BEGIN CEXPR; return yytext[0]; } \\' { count(); yylval.yt_casestring = mkcasestring("\\'"); return T_CEXPRESSION; } [^\n\\']+ { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CEXPRESSION; } \$\$ { count(); yylval.yt_casestring = mkcasestring("$"); return T_CLINE; } \\\\ { count(); yylval.yt_casestring = mkcasestring("\\\\"); return T_CLINE; } \\ { count(); yylval.yt_casestring = mkcasestring("\\"); return T_CLINE ; } \$\{ { count(); yylval.yt_casestring = mkcasestring("{"); /*WARNING-NO LONGER SUPPORTED*/ return T_CLINE ; } \$\} { count(); yylval.yt_casestring = mkcasestring("}"); /*WARNING-NO LONGER SUPPORTED*/ return T_CLINE ; } \$[0-9]* { count(); if (strcmp(yytext, "$") == 0) return yytext[0]; yylval.yt_integer = mkinteger(atoi(yytext+1)); return T_DOLLARVAR; } {wsnl}*afterforeach/{nonident} { count(); return T_FOREACH_AFTER; } {ident} { count(); if (strcmp(yytext, "foreach") ==0) { return T_FOREACH; } else if (strcmp(yytext, "afterforeach") ==0) { return T_FOREACH_AFTER; } else if (strcmp(yytext, "with") ==0) { return T_WITH; } else { yylval.yt_casestring = mkcasestring(yytext); return T_CLINE ; } } [^\n{}w/"'a-zA-Z_\$\\]+ { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CLINE; } \/ { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CLINE; } \/\*[ \t]*EMPTY[ \t]*\*\/ { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CLINE; } \/\*[ \t]*NOTREACHED[ \t]*\*\/ { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CLINE; } \/\*[ \t]*SUPPRESS[ \t]*[0-9]+[ \t]*\*\/ { count(); yylval.yt_casestring = mkcasestring(yytext); return T_CLINE; } . { count(); return yytext[0]; }

(t()); } template const P phylum_cast(const phylum_ptr& t) { return static_cast(t()); } " $} // if(g_options.smart_pointer) " template P phylum_cast(T* t) { return static_cast

(t); } template const P phylum_cast(const T* t) { return static_cast(t); } " // This produces the forward declarations of the phylum classes pds " void kc_invalid_operator( const char *kc_func_prefix, enum_phyla kc_phy, int kc_line, const char *kc_file, enum_operators kc_oper ) __attribute__ ((noreturn)); typedef enum_phyla *enum_phyla_list; /* * make sure that the first 'real' storage class _always_ gets a value > 0 * and kc_not_uniq gets a value == 0 * (because then we can use it as a C boolean) */ enum kc_storageclass_t { " Thestorageclasses:view_gen_operatormap_type_h ", last_storageclass }; typedef struct { const char *name; // name of the phylum enum_operators first_operator; // index in operator_info[] enum_operators last_operator; // index in operator_info[] kc_storageclass_t uniq_stored; // storage class } KC_PHYLUM_INFO; typedef struct { const char *name; // name of the operator size_t no_sons; // number of sons bool atomicity; // atomic type or not enum_phyla phylum; // index in phylum_info[] enum_phyla_list subphylum; // indexes in phylum_info[] int no_attrs; // number of attributes enum_phyla_list attribute; // indexes in phylum_info[] size_t size; // size of operator (for statistics) } KC_OPERATOR_INFO; typedef enum_phyla_list KC_UNIQ_INFO; extern KC_OPERATOR_INFO operator_info[]; extern KC_PHYLUM_INFO phylum_info[]; extern KC_UNIQ_INFO kc_UniqInfo[]; #define KC_OP_NAME(op) (operator_info[op].name) #define KC_NO_SONS(prod) (operator_info[prod].no_sons) #define KC_ATOMICITY(prod) (operator_info[prod].atomicity) " ]; PhylumDeclarations( pds ) -> [view_gen_classdecls2_h: " //namespace Phylum {\r " " class " { if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } } "impl_abstract_phylum" { with(The_abstract_phylum_decl->base_classes) { Consbaseclass_list(*,*): { PRINT("\b :\b "); UNPARSE(The_abstract_phylum_decl->base_classes); } default: {} } } " { \rpublic:\v virtual enum_operators prod_sel() const =0; static const enum_phyla phylum_sel_; enum_phyla phylum() const; const char* phylum_name() const; const char* op_name() const; virtual abstract_phylum subphylum(int) const; virtual void set_subphylum(int, abstract_phylum); void free(bool recursive=true); bool eq(c_abstract_phylum) const; void print(); void fprint(FILE *); abstract_phylum copy(bool kc_copy_attributes) const;\n" { if(!g_options.no_unparse) } ${ " void unparse(printer_functor pf, uview uv) \v{ do_unparse(pf, uv); }\r void unparse(printer_function opf, uview uv);\n" $} { if(!g_options.no_printdot) } ${ " void printdot_add_edge (c_abstract_phylum, int, int*, kc_dotedgenode_t*, const char*) const; void do_printdot_id (FILE*, bool, c_abstract_phylum, int) const; void do_printdot (FILE*, bool, int*, kc_dotedgenode_t*, const char*, bool, bool, c_abstract_phylum, int) const; virtual void fprintdot(FILE *, const char *root_label_prefix, const char *edge_label_prefix, const char *edge_attributes, bool print_node_labels, bool use_context_when_sharing_leaves, bool print_prologue_and_epilogue) const =0; " $} { if(!g_options.no_csgio) } ${ " void CSGIOwrite(FILE *) const; " $} { if(!g_options.no_rewrite) } ${ { if(!g_options.rw_loop) } ${ " virtual abstract_phylum rewrite(rview v) { return do_rewrite(v); } " $} { else } ${ " abstract_phylum rewrite(rview v) { return rewrite_loop(v); } abstract_phylum rewrite_loop(rview v); " $} " virtual abstract_phylum do_rewrite(rview) { return this;} // called if a subphylum of an op is rewritten and a new op is created by default rule virtual void rewrite_members(abstract_phylum from) {} " $} { if(!f_post_create_in_phylumdecl(The_abstract_phylum_decl)) } ${ " virtual void post_create(){} " $} { fndeclarations tapam = The_abstract_phylum_decl->additional_members; } tapam:view_gen_member_dcl_h tapam:view_count_nonstaticmembers { if(g_options.smart_pointer) } ${ { if(!f_constructors_in_phylumdecl(The_abstract_phylum_decl)) } ${ " impl_abstract_phylum()" { if(gl_no_of_args!=0) } ${ ": " gl_members:view_gen_user_assignment_inis $} "\v { _ref=0; }\r " $} { if(!f_destructors_in_phylumdecl(The_abstract_phylum_decl)) } ${ " virtual ~impl_abstract_phylum() { if(_ref) _ref->reset_phylum(); } " $} " impl_abstract_phylum(const impl_abstract_phylum&) { _ref=0; } abstract_phylum_ref* get_ref() const { return _ref; } abstract_phylum_ref* add_ref() { if(!_ref) _ref=new_phylum_ref(); return _ref; } void set_ref(abstract_phylum_ref* r) { _ref=r; } virtual abstract_phylum_ref* new_phylum_ref()=0; abstract_phylum return_ptr() { if(get_ref()) get_ref()->lock(); return this; } \rprivate:\v abstract_phylum_ref*_ref; " $} { else } ${ // no smartpointers { if (!f_constructors_in_phylumdecl(The_abstract_phylum_decl) && gl_no_of_args!=0) } ${ "explicit impl_abstract_phylum()\v\n: " gl_members:view_gen_user_assignment_inis " { }\r\n" $} { if(!f_destructors_in_phylumdecl(The_abstract_phylum_decl)) } ${ " virtual ~impl_abstract_phylum() { } " $} $} // end smartpointers { if(!g_options.no_unparse) } ${ "\rprivate:\v virtual void do_unparse(printer_functor, uview) =0; \rprotected:\v virtual void default_unparse(printer_functor, uview);\n" $} "};\n\n" // End of impl_abstract_phylum // A specialisation of the smart pointer class for abstract_phylum { if(g_options.smart_pointer) } ${ "template <> class phylum_ptr { \rpublic:\v " { if(g_options.weak_pointer) } ${ " phylum_ptr(bool weak=false) { _ref=0; _weak=weak; } phylum_ptr(impl_abstract_phylum* t,bool weak=false) { _ref=0; _weak=weak; if(t) set_ref(t->add_ref()); } phylum_ptr(const phylum_ptr& p, bool weak=false) { _ref=0; _weak=weak; set_ref(p.get_ref()); } " $} { else } ${ " phylum_ptr() { _ref=0; } phylum_ptr(impl_abstract_phylum* t) { _ref=0; if(t) set_ref(t->add_ref()); } phylum_ptr(const phylum_ptr& p) { _ref=0; set_ref(p.get_ref()); } " $} // if(g_options.weak_pointer) " ~phylum_ptr() { set_ref(0); } template phylum_ptr& operator=(T* t) { if(t) set_ref(t->add_ref()); else set_ref(0); return *this; } template phylum_ptr& operator=(const phylum_ptr& p) { set_ref(p.get_ref()); return *this; } impl_abstract_phylum* get_phylum() const { return _ref?_ref->get_abstract_phylum():0; } operator impl_abstract_phylum*() const { return get_phylum(); } impl_abstract_phylum* operator()() const { return get_phylum(); } impl_abstract_phylum* operator->() const { return get_phylum(); } operator bool() const { return get_phylum()!=0; } bool operator!() const { return get_phylum()==0; } abstract_phylum return_ptr() { if(_ref) _ref->lock(); return get_phylum(); } bool operator==(int null) const { return null?false:(get_phylum()==0); } template bool operator==(const T* t) const { return get_phylum()==t; } template bool operator==(const phylum_ptr& t) const { return get_phylum()==t.get_phylum(); } bool operator!=(int null) const { return null?true:(get_phylum()!=0); } template bool operator!=(const T* t) const { return get_phylum()!=t; } template bool operator!=(const phylum_ptr& t) const { return get_phylum()!=t.get_phylum(); } abstract_phylum_ref* get_ref() const { return _ref; } \rprotected:\v " { if(g_options.weak_pointer) } ${ " void set_ref(abstract_phylum_ref* r) { if(_ref!=r) { if(_weak) { if(r) r->weak_ref(); if(_ref) _ref->weak_unref(); } else { if(r) r->ref(); if(_ref) _ref->unref(); } _ref=r; } } " $} { else } ${ " void set_ref(abstract_phylum_ref* r) { if(_ref!=r) { if(r) r->ref(); if(_ref) _ref->unref(); _ref=r; } } " $} // if(g_options.weak_pointer) " \rprivate:\v abstract_phylum_ref* _ref; " { if(g_options.weak_pointer) } ${ " bool _weak;\n" $} "};\n" $} // if(g_options.smart_pointer) " class " { if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } } "impl_abstract_list: " { with(The_abstract_list_decl->base_classes) { Consbaseclass_list(*,*): { UNPARSE(The_abstract_list_decl->base_classes); } default: { PRINT("public impl_abstract_phylum"); } } } "{ \rprivate:\v void fprint_list(FILE *); friend class impl_abstract_phylum; \rprotected:\v abstract_phylum do_concat(c_abstract_phylum other, enum_operators) const; abstract_phylum do_reverse(c_abstract_phylum tail, enum_operators) const; abstract_phylum do_map(abstract_phylum (*kc_fp)(abstract_phylum), enum_operators); abstract_phylum do_filter(bool (*kc_fp)(abstract_phylum), enum_operators); abstract_list do_append(abstract_phylum, abstract_list); abstract_phylum do_merge(abstract_list,abstract_phylum (*kc_fp)(abstract_phylum,abstract_phylum), enum_operators); abstract_phylum do_reduce(abstract_phylum neutral, abstract_phylum (*kc_fp)(abstract_phylum,abstract_phylum)); \rpublic:\v\n" { tapam = The_abstract_list_decl->additional_members; } tapam:view_count_nonstaticmembers { if (!f_constructors_in_phylumdecl(The_abstract_list_decl) && gl_no_of_args!=0) } ${ "explicit impl_abstract_list()\v\n: " gl_members:view_gen_user_assignment_inis " { }\r\n" $} " virtual bool is_nil() const =0; virtual abstract_list reverse() const =0; int length() const; abstract_phylum last() const; // Non-virtual, non-existing... Type must be known exactly anyway because // of the function given as a parameter //virtual abstract_list map( abstract_phylum (*)( abstract_phylum )) =0; //virtual abstract_list filter(bool (*)(abstract_phylum)) =0; void freelist(); " { if(g_options.smart_pointer) } ${ " impl_abstract_list* return_ptr() { if(get_ref()) get_ref()->lock(); return this; }\n" $} { The_abstract_list_decl->additional_members->unparse( kc_printer,view_gen_member_dcl_h); } "}; " pds " //} // namespace Phylum " ]; Consphylumdeclarations( pd, rpds ) -> [view_gen_classdecls1_h view_gen_classdecls2_h view_gen_classdefs_c: rpds pd ]; Nilphylumdeclarations() -> [view_gen_classdecls1_h view_gen_classdefs_c: /* EMPTY */ ]; Nilphylumdeclarations() -> [view_gen_classdecls2_h: " abstract_phylum kc_create(enum_operators createOp" { int j=Theargsnumbers->last()->value; if (j<2) j=2; /* lists (even abstract) need two subphyla */ for (int i = 1; i<=j; ++i) } ${ ", abstract_phylum=0" $} "); abstract_phylum kc_create(enum_operators createOp, const std::vector& kc_ps); abstract_phylum& attributeOf(abstract_phylum kc_p, int no); \n" ]; PhylumDeclaration( *, *, Emptyproductionblock(), * ) -> [view_gen_classdecls1_h view_gen_classdecls2_h view_gen_classdefs_c: /* EMPTY */ ]; PhylumDeclaration( id, *, PredefinedAlternatives(Consalternatives(Alternative(oid, *), *)), *) -> [view_gen_classdecls1_h: "class impl_" id "_" oid "; " { if(g_options.smart_pointer) } ${ "typedef phylum_ptr " id "_ptr; " $} { if(g_options.weak_pointer) } ${ "typedef weak_phylum_ptr weak_" id "_ptr; " $} ]; PhylumDeclaration( id, *, *, * ) -> [view_gen_classdecls1_h: "class impl_" id "; " { if(g_options.smart_pointer) } ${ "typedef phylum_ptr " id "_ptr; " $} { if(g_options.weak_pointer) } ${ "typedef weak_phylum_ptr weak_" id "_ptr; " $} ]; PhylumDeclaration( id, *, PredefinedAlternatives(alts= Consalternatives(Alternative(oid,*), *)), cco ) -> [view_gen_classdecls2_h: "class impl_" id "_" oid "; typedef impl_" id "_" oid " impl_" id "; " alts ]; ph_decl= PhylumDeclaration( id, *, alt, cco ) -> [view_gen_classdecls2_h: "class " { if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } } "impl_" id { with(ph_decl->base_classes) { Consbaseclass_list(*,*): { PRINT("\b :\b "); UNPARSE(ph_decl->base_classes); } default: { with (alt) { ListAlternatives( *, * ) : { PRINT(": public impl_abstract_list"); } default: { PRINT(": public impl_abstract_phylum"); } } } } } "{ \rpublic:\v\n" additional_members:view_count_nonstaticmembers { if (f_listelementphylum(id)->eq(f_emptyId()) && !f_constructors_in_phylumdecl($0) && gl_no_of_args!=0) } ${ "explicit impl_" id "()\v\n: " gl_members:view_gen_user_assignment_inis " { }\r\n" $} " static const enum_phyla phylum_sel_;\n" { if(!g_options.no_printdot) } ${ " void fprintdot( FILE*, const char*, const char*, const char*, bool, bool, bool ) const; " $} { if(!g_options.no_rewrite && g_options.rw_loop) } ${ " " id " rewrite(rview v) { return phylum_cast<" id ">(impl_abstract_phylum::rewrite(v)); } " $} { if(g_options.smart_pointer) } ${ " abstract_phylum_ref* new_phylum_ref() { return new phylum_ref(this); } impl_" id "& operator=(const impl_" id"& p) { phylum_ref* my_ref=static_cast*>(get_ref()); " id " self=this; if(my_ref) { abstract_phylum_ref* ref=p.get_ref(); self=const_cast<"id">(&p); if(ref) self=phylum_cast<"id">(self->copy(true)); my_ref->set_phylum(self); } return *self; } impl_" id "& operator=(const phylum_ref& r) { phylum_ref* my_ref=static_cast*>(get_ref()); " id " self=this; if(my_ref) { self=phylum_cast<" id">(r.get_phylum()?r.get_phylum()->copy(true):0); my_ref->set_phylum(self); } return *self; } impl_"id"* return_ptr() { if(get_ref()) get_ref()->lock(); return this; } " $} cco:view_gen_nodetypes_h additional_members:view_gen_member_dcl_h $0:view_gen_listdecls_h "}; " alt ]; NonlistAlternatives(alts) -> [view_gen_classdecls2_h view_gen_classdefs_c: alts ]; ListAlternatives(*, *), Nilalternatives() -> [view_gen_classdecls2_h view_gen_classdefs_c: /* EMPTY */ ]; Consalternatives(alt, ra) -> [view_gen_classdefs_c: alt ra ]; Consalternatives(alt=Alternative(oid, *), ra) -> [view_gen_classdecls2_h: alt alt:view_gen_nodetypes_h { ID pid = f_phylumofoperator(oid); if (f_ispredefinedphylum(pid)) ${ f_phylumdeclofid(pid)->additional_members->unparse(kc_printer, view_gen_member_dcl_h); $} } alt->additional_members:view_gen_member_dcl_h { gl_operator = 0; } { if(!g_options.no_unparse) } ${ "\rprivate:\v void do_unparse(printer_functor, uview);\n" $} "}; " ra ]; alt=Alternative(oid, args) -> [view_gen_classdecls2_h: { ID id = f_phylumofoperator(oid); gl_operator = oid; } "class " { if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } } "impl_" id "_" oid ":" { with(alt->base_classes) { Consbaseclass_list(*,*): { UNPARSE(alt->base_classes); } default: { if (f_ispredefinedphylum(id)) { PRINT("public impl_abstract_phylum"); } else { PRINT("public impl_"); UNPARSE(id); } } } } "{ \rpublic:\v enum_operators prod_sel() const \v{ return sel_" oid "; }\r " { if (f_ispredefinedphylum(id)) } ${ " static const enum_phyla phylum_sel_;\n" $} { enum_operators kc_i = f_selofoperator(gl_operator); if(kc_i!=sel_NoCaseStr && kc_i!=sel__Str) } ${ { if(!f_constructors_in_operatordecl(alt)) } ${ "explicit impl_" id "_" oid "(" { if (f_ispredefinedphylum(id)) } ${ args:view_gen_fnarg_and_decls_predef $} { else } ${ args:view_gen_operatordecls_h $} "); " $} $} { else } ${ "\rprivate:\v explicit impl_" id "_" oid "(const kc_char_t*); void make_own(int length); friend " id " mk" id "(const kc_char_t*, int); \rpublic:\v ~impl_" id "_" oid "() { #if defined (_MSC_VER) && _MSC_VER<1300 delete [] (kc_char_t*)name; #else delete [] name; #endif } " $} { if(args->length()!=0) } ${ " abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); " $} { if (!g_options.no_printdot && f_ispredefinedphylum(id)) } ${ "void fprintdot( FILE*, const char*, const char*, const char*, bool, bool, bool ) const;\n" $} { if (!g_options.no_rewrite) } ${ { if (!g_options.rw_loop) } ${ { if (!f_ispredefinedphylum(id)) { if(!f_rewrite_in_operatordecl(alt)) covariant_choice(id, " rewrite( rview );", "abstract_phylum rewrite( rview );", kc_printer, kc_current_view); else covariant_choice(id, " do_rewrite( rview );", "abstract_phylum do_rewrite( rview );", kc_printer, kc_current_view); } else } ${ { covariant_choice(id, " rewrite( rview )", "abstract_phylum rewrite( rview )", kc_printer, kc_current_view); } "\n\v{ return this; }\r" $} $} { else } ${ { if (!f_ispredefinedphylum(id)) } ${ "abstract_phylum do_rewrite( rview );" $} $} $} "\n" { if (g_options.smart_pointer) } ${ { if(f_ispredefinedphylum(id)) } ${ "abstract_phylum_ref* new_phylum_ref() { return new phylum_ref(this); } impl_" id "& operator=(const impl_" id"& p) { phylum_ref* my_ref=static_cast*>(get_ref()); " id " self=this; if(my_ref) { abstract_phylum_ref* ref=p.get_ref(); self=const_cast<"id">(&p); if(ref) self=phylum_cast<"id">(self->copy(true)); my_ref->set_phylum(self); } return *self; } " id:view_class_of_phy "& operator=(const phylum_ref<" id:view_class_of_phy ">& r) { phylum_ref<" id:view_class_of_phy ">* my_ref=static_cast*>(get_ref()); " id " self=this; if(my_ref) { self=phylum_cast<"id">(r.get_phylum()?r.get_phylum()->copy(true):0); my_ref->set_phylum(self); } return *self; } " $} { else } ${ // f_ispredefinedphylum id:view_class_of_phy "& operator=(const impl_" id"& p) { return " id:view_class_of_phy "::operator=(p); } impl_" id "& operator=(const phylum_ref& r) { return " id:view_class_of_phy "::operator=(r); } " $} // end f_ispredefinedphylum oid:view_class_of_op "* return_ptr() { if(get_ref()) get_ref()->lock(); return this; }\n" $} // end smartpointers ]; PhylumDeclaration( id, *, ListAlternatives( *, el ), * ) -> [view_gen_classdefs_c: "const enum_phyla " id:view_class_of_phy "::phylum_sel_ = phylum_" id ";\n" id:view_class_of_phy "::" id:view_class_of_phy "(" el " p1 , " id " p2) \v: " // Initialize all attributes of the phylum additional_members:view_count_nonstaticmembers { if (gl_no_of_args) } ${ gl_members:view_gen_user_assignment_inis ", " $} el "_1(p1), " id "_1(p2) { }\r " ]; PhylumDeclaration( id, *, alts, *) -> [ view_gen_classdefs_c: "const enum_phyla " id:view_class_of_phy "::phylum_sel_ = phylum_" id ";\n" { gl_phylum=id; } alts ]; alt=Alternative(oid, args) -> [ view_gen_classdefs_c: { gl_operator=oid; enum_operators kc_i = f_selofoperator(gl_operator); bool priorAssignments=false; if(kc_i!=sel_NoCaseStr && kc_i!=sel__Str) } ${ { if(!f_constructors_in_operatordecl(alt)) } ${ oid:view_class_of_op "::" oid:view_class_of_op "(" { if (f_ispredefinedphylum(gl_phylum)) } ${ args:view_gen_fnarg_and_decls_predef $} { else } ${ args:view_gen_fnarg_and_decls $} ")\n\v" // Initialize all subphyla { if (f_ispredefinedphylum(gl_phylum)) ${ PRINT(priorAssignments ? ", " : ": "); priorAssignments=true; } args:view_gen_assignments_predef_ini { $} else if (args->length()>0) ${ PRINT(priorAssignments ? ", " : ": "); priorAssignments=true; } args:view_gen_assignment_inis { $} } // Initialize all attributes of the operator additional_members:view_count_nonstaticmembers { if (gl_no_of_args) } ${ { PRINT(priorAssignments ? ", " : ": "); } gl_members:view_gen_user_assignment_inis $} " { }\r\n" $} $} ]; /***************************************************************************/ PhylumDeclaration( id, *, *, * ) -> [view_gen_listdecls_h: { if (g_options.covariant!='n') } ${ { if (g_options.covariant=='p') } ${ "#ifndef NO_COVARIANT_RETURN\n" $} { if(!g_options.no_rewrite && !g_options.rw_loop) } ${ id " rewrite(rview) =0;\n" $} { if (g_options.covariant=='p') } ${ "#endif // NO_COVARIANT_RETURN\n" $} $} ]; PhylumDeclaration( id, *, ListAlternatives( *, el ), * ) -> [view_gen_listdecls_h: " enum_operators prod_sel() const{ return is_nil() ? sel_Nil" id ": sel_Cons" id "; } explicit impl_" id "(" el " = 0, " id " = 0); abstract_phylum subphylum(int) const; void set_subphylum(int, abstract_phylum); friend " id " concat(c_" id ", c_" id ");\n" { if (g_options.covariant=='p') } ${ "#ifndef NO_COVARIANT_RETURN\n" $} { if (g_options.covariant!='n') } ${ id " reverse() const;\n" { if(!g_options.no_rewrite && !g_options.rw_loop) } ${ id " rewrite(rview); " $} $} { if (g_options.covariant=='p') } ${ "#else\n" $} { if (g_options.covariant!='y') } ${ " abstract_list reverse() const; " { if(!g_options.no_rewrite && !g_options.rw_loop) } ${ " abstract_phylum rewrite(rview); " $} $} { if (g_options.covariant=='p') } ${ "#endif // NO_COVARIANT_RETURN\n" $} { if(!g_options.no_rewrite && g_options.rw_loop) } ${ " abstract_phylum do_rewrite(rview); " $} el " last() const; " id " append(" el "); " id " map(" el " (*)(" el ")); " id " filter( bool (*)(" el ")); " id " merge( " id ", " el " (*)(" el ", " el ")); " el " reduce( " el ", " el " (*)(" el ", " el ")); bool is_nil() const; " { if(g_options.smart_pointer) } ${ el "_ptr " el "_1; " id "_ptr " id "_1; " $} { else } ${ el " " el "_1; " id " " id "_1; " $} "\rprivate:\v\n" { if(!g_options.no_rewrite && !g_options.rw_loop) } ${ { if (g_options.covariant=='p') } ${ "#ifndef NO_COVARIANT_RETURN\n" $} { if (g_options.covariant!='n') } ${ " impl_" id "* nil_rewrite(rview); impl_" id "* cons_rewrite(rview); " $} { if (g_options.covariant=='p') } ${ "#else\n" $} { if (g_options.covariant!='y') } ${ " impl_abstract_phylum* nil_rewrite(rview); impl_abstract_phylum* cons_rewrite(rview); " $} { if (g_options.covariant=='p') } ${ "#endif // NO_COVARIANT_RETURN\n" $} $} { if (!g_options.no_unparse) } ${ " void nil_do_unparse(printer_functor, uview); void do_unparse(printer_functor, uview); " $} ]; Alternative( oid, * ) -> [view_gen_listdecls_h: { ID id = f_phylumofoperator(oid); ID el = f_listelementphylum(id); if (!el->eq(f_emptyId())) ${ } // TODO: Is this code ever generated? "// TODO: Is this code ever generated?\n" id " map(" el " (*)(" el "));\n" id " filter( bool (*)(" el "));\n" id " merge( " id ", " el " (*)(" el ", " el "));\n" el " reduce( " id " neutral, " el " (*)(" el ", " el "));\n" { $} } ]; /***************************************************************************/ PhylumDeclarations( d ) -> [view_gen_nodetypedefs_h: { if(!g_options.no_printdot) } ${ "typedef class impl_kc_dotedgenode_t *kc_dotedgenode_t; " $} " " d " " ]; Consphylumdeclarations( pd, rpds ) -> [view_gen_nodetypedefs_h: rpds pd ]; Nilphylumdeclarations() -> [view_gen_nodetypedefs_h: /* EMPTY */ ]; PhylumDeclaration( *, *, Emptyproductionblock(), * ) -> [view_gen_nodetypedefs_h: /* EMPTY */ ]; PhylumDeclaration( id, *, PredefinedAlternatives(Consalternatives(Alternative(oid, *), *)), *) -> [view_gen_nodetypedefs_h: "typedef impl_" id "_" oid " *" id "; typedef const impl_" id "_" oid " *c_" id "; " ]; PhylumDeclaration( id, *, *, * ) -> [view_gen_nodetypedefs_h: "typedef impl_" id " *" id "; typedef const impl_" id " *c_" id "; " ]; /***************************************************************************/ PhylumDeclarations( d ) -> [view_gen_nodetypes_h: // MPi d not evaluated here, call below made from view_gen_classdecls1_h ]; Alternative( oid, Nilarguments() ) -> [view_gen_nodetypes_h: { if (f_ispredefinedphylum(f_phylumofoperator(oid))) ${ enum_operators kc_i = f_selofoperator(oid); } " " { PRINT(preDefTypeAndName[kc_i][0]); } " " { PRINT(preDefTypeAndName[kc_i][1]); } "; " { $} else } ${ /* EMPTY */ $} ]; Alternative( oid, args ) -> [view_gen_nodetypes_h: args ]; Consarguments( a, rargs ) -> [view_gen_nodetypes_h: rargs { if(g_options.smart_pointer) } ${ a "_ptr " $} { else } ${ " impl_" a "* " $} a "_" $0->seqnr ";\n" { if (a->named_subphylum) } ${ { if(g_options.smart_pointer) } ${ a "_ptr& " $} { else } ${ " impl_" a "*& " $} a->named_subphylum " /* = " a "_" $0->seqnr "*/;\n" $} ]; CcodeOption( a, * ) -> [view_gen_nodetypes_h: a ]; Nilattributes() -> [view_gen_nodetypes_h: /* EMPTY */ ]; Consattributes( Attribute( t, id, * ), ra ) -> [view_gen_nodetypes_h: ra " " t " " id "; " ]; /***************************************************************************/ PhylumDeclaration( *, *, PredefinedAlternatives(*), * ), PhylumDeclaration( *, *, Emptyproductionblock(), * ) -> [view_gen_subphylumdefs_c: /* EMPTY */ ]; PhylumDeclaration( id, *, ListAlternatives( *, el ), * ) -> [view_gen_subphylumdefs_c: "abstract_phylum impl_" id "::subphylum(int no) const { switch(no){ case 0: return " el "_1; case 1: return " id "_1; } return 0; } " ]; PhylumDeclaration( id, *, NonlistAlternatives( alt=* ), * ) -> [view_gen_subphylumdefs_c: alt ]; Consalternatives(Alternative( *, Nilarguments()), ra) -> [view_gen_subphylumdefs_c: ra ]; Consalternatives(Alternative( oid, args), ra) -> [view_gen_subphylumdefs_c: { ID id = f_phylumofoperator(oid); } "abstract_phylum impl_" id "_" oid "::subphylum(int no) const { switch(no){ " { gl_no_of_args = 0; } args " } return 0; } " ra ]; Consarguments( a, ra ) -> [view_gen_subphylumdefs_c: ra "case " gl_no_of_args ": return " a "_" $0->seqnr ";\n" { gl_no_of_args++; } ]; /***************************************************************************/ PhylumDeclaration( *, *, PredefinedAlternatives(*), * ), PhylumDeclaration( *, *, Emptyproductionblock(), * ) -> [view_gen_set_subphylumdefs_c: /* EMPTY */ ]; PhylumDeclaration( id, *, ListAlternatives( *, el ), * ) -> [view_gen_set_subphylumdefs_c: "void impl_" id "::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { case 0: newval = " el "_1 = dynamic_cast<" el ">(val);break; case 1: newval = " id "_1 = dynamic_cast<" id ">(val);break; } assertNonNull(newval); } " ]; PhylumDeclaration( id, *, NonlistAlternatives( alt=* ), * ) -> [view_gen_set_subphylumdefs_c: alt ]; Consalternatives(Alternative( *, Nilarguments()), ra) -> [view_gen_set_subphylumdefs_c: ra ]; Consalternatives(Alternative( oid, args), ra) -> [view_gen_set_subphylumdefs_c: { ID id = f_phylumofoperator(oid); } "void impl_" id "_" oid "::set_subphylum(int no, abstract_phylum val) { abstract_phylum newval=0; switch(no) { " { gl_no_of_args = 0; } args " } assertNonNull(newval); } " ra ]; Consarguments( a, ra ) -> [view_gen_set_subphylumdefs_c: ra "case " gl_no_of_args ": newval = " a "_" $0->seqnr " = dynamic_cast<" a ">(val);break;\n" { gl_no_of_args++; } ]; /***************************************************************************/ PhylumDeclarations( * ) -> [view_gen_printdotdecls_h: " void fprintdotprologue ( FILE* ); void fprintdotepilogue ( FILE* ); " ]; PhylumDeclarations( pds ) -> [view_gen_printdotdefs_c: " #ifndef KC_PRINTDOT_LABELSIZE # define KC_PRINTDOT_LABELSIZE 1023 #endif class impl_kc_dotedgenode_t { public: impl_kc_dotedgenode_t(c_abstract_phylum from,c_abstract_phylum to, int _son_nr): ptr_from(from), ptr_to(to), son_nr(_son_nr), label(0), lsize(0), next(0) { } c_abstract_phylum ptr_from; c_abstract_phylum ptr_to; int son_nr; char *label; int lsize; kc_dotedgenode_t next; }; static kc_dotedgenode_t kc_mkdotedgenode(struct kc_dotedge_ht*, c_abstract_phylum, c_abstract_phylum, int); static void kc_do_printdot_do_add_edge (c_abstract_phylum, c_abstract_phylum, int, int*, kc_dotedgenode_t*, const char*); static void kc_do_printdot_subgraph_prologue (FILE*, c_abstract_phylum, const char*, const char*, bool, bool); static void kc_do_printdot_subgraph_epilogue (FILE*); static void kc_do_printdot_genfields (FILE*, int, bool); static void kc_do_printdot_edges (FILE*, kc_dotedgenode_t, const char*, bool); static bool kc_dotedge_less(kc_dotedgenode_t p1, kc_dotedgenode_t p2) { if(p2==0) return false; if(p1==0) return true; if(p1->ptr_fromptr_from) return true; if(p1->ptr_from>p2->ptr_from) return false; if(p1->ptr_toptr_to) return true; if(p1->ptr_to>p2->ptr_to) return false; if(p1->son_nrson_nr) return true; // OPERATORHASH((unsigned) kc_phy_from); // OPERATORHASH((unsigned) kc_phy_to); return false; } template struct dotedge_less : std::binary_function { bool operator()(const T& X, const T& Y) const { return kc_dotedge_less(X,Y); } }; struct kc_dotedge_ht: public std::set > { ~kc_dotedge_ht() { for(iterator i=begin();i!=end();++i) delete const_cast(*i); clear(); } kc_dotedgenode_t check_insert(kc_dotedgenode_t t) { std::pair res=insert(t); return *res.first; } }; static kc_dotedge_ht* fprintdot_hashtable; " pds " kc_dotedgenode_t kc_mkdotedgenode(kc_dotedge_ht* kc_a_ht, c_abstract_phylum kc_s_from, c_abstract_phylum kc_s_to, int kc_son_nr) { kc_dotedgenode_t kc_x = new impl_kc_dotedgenode_t(kc_s_from,kc_s_to,kc_son_nr); kc_dotedgenode_t unique_kc_x=kc_a_ht->check_insert(kc_x); if(unique_kc_x!=kc_x) { delete kc_x; kc_x=unique_kc_x; } return kc_x; } void kc_do_printdot_subgraph_prologue(FILE *kc_f, c_abstract_phylum kc_p, const char *root_label_prefix, const char *edge_attributes, bool print_node_labels, bool use_context_when_sharing_leaves) { if (!kc_f) kc_f = stdout; fprintf(kc_f, \"/*subgraph*/ {\\n\"); if (root_label_prefix) { fprintf(kc_f, \"\\\"%s\\\" [shape=ellipse\", root_label_prefix); if (edge_attributes && (strlen(edge_attributes) > 0)) { fprintf(kc_f, \", %s\", edge_attributes); } if (print_node_labels) { fprintf(kc_f, \", label=\\\"%s\\\\n%s\\\"\", root_label_prefix, phylum_info[kc_p->phylum()].name); } fprintf(kc_f, \"];\\n\"); fprintf(kc_f, \"\\\"%s\\\" ->\", root_label_prefix); kc_p->do_printdot_id(kc_f, use_context_when_sharing_leaves, 0, 0); if (edge_attributes && (strlen(edge_attributes) > 0)) { fprintf(kc_f, \"[%s]\", edge_attributes); } fprintf(kc_f, \";\\n\"); } } void kc_do_printdot_subgraph_epilogue(FILE *kc_f) { if (!kc_f) kc_f = stdout; fprintf(kc_f, \"}\\n\"); } void fprintdotprologue(FILE *kc_f) { if (!kc_f) kc_f = stdout; fprintf(kc_f, \"digraph kc_output{\\n\"); fprintf(kc_f, \"node [shape=record, height=.1, fontname=Helvetica];\\n\"); } void fprintdotepilogue(FILE *kc_f) { if (!kc_f) kc_f = stdout; fprintf(kc_f, \"}\\n\"); } void kc_do_printdot_genfields(FILE *kc_f, int kc_prodsel, bool print_node_labels) { int kc_i = 1; KC_OPERATOR_INFO *kc_op_info = &operator_info[kc_prodsel]; if (kc_op_info->no_sons <= 0) return; if (!kc_f) kc_f = stdout; while(kc_i < kc_op_info->no_sons) { fprintf(kc_f, \"\", kc_i); if (print_node_labels) { fprintf(kc_f, \"%s\", phylum_info[kc_op_info->subphylum[kc_i-1]].name); } fprintf(kc_f, \"|\"); kc_i++; } fprintf(kc_f, \"\", kc_i); if (print_node_labels) { fprintf(kc_f, \"%s\", phylum_info[kc_op_info->subphylum[kc_i-1]].name); } } void impl_abstract_phylum::do_printdot_id(FILE *kc_f, bool use_context_when_sharing_leaves, c_abstract_phylum kc_ctxt, int kc_son_nr) const { // The casts only make unique ids, so reinterpret_cast is alright if (!kc_f) kc_f = stdout; enum_phyla kc_phy = phylum(); if (kc_phy == phylum_voidptr) { fprintf(kc_f, \"kcidp%x\", reinterpret_cast(this)); if (use_context_when_sharing_leaves) { fprintf(kc_f, \"_%x_%d\", reinterpret_cast(kc_ctxt), kc_son_nr); } } else if ((kc_phy == phylum_casestring) || (kc_phy == phylum_nocasestring)) { fprintf(kc_f, \"kcids%x\", reinterpret_cast(this)); if (use_context_when_sharing_leaves) { fprintf(kc_f, \"_%x_%d\", reinterpret_cast(kc_ctxt), kc_son_nr); } } else if (kc_phy == phylum_integer) { fprintf(kc_f, \"kcidi%x\", reinterpret_cast(this)); if (use_context_when_sharing_leaves) { fprintf(kc_f, \"_%x_%d\", reinterpret_cast(kc_ctxt), kc_son_nr); } } else if (kc_phy == phylum_real) { fprintf(kc_f, \"kcidf%x\", reinterpret_cast(this)); if (use_context_when_sharing_leaves) { fprintf(kc_f, \"_%x_%d\", reinterpret_cast(kc_ctxt), kc_son_nr); } } else { fprintf(kc_f, \"kcidx%x\", reinterpret_cast(this)); } } void kc_do_printdot_do_add_edge(c_abstract_phylum kc_p, c_abstract_phylum kc_sub_p, int kc_son_nr, int *kc_edge_nr, kc_dotedgenode_t *kc_edges, const char *edge_label_prefix) { kc_dotedgenode_t kc_hn; char kc_buf[30]; kc_hn = kc_mkdotedgenode(fprintdot_hashtable, kc_p, kc_sub_p, kc_son_nr); if (! kc_hn->label) { kc_hn->label = new char[(size_t)(KC_PRINTDOT_LABELSIZE+1)]; kc_hn->lsize = KC_PRINTDOT_LABELSIZE; strcpy(kc_hn->label, \"\"); kc_hn->next = *kc_edges; *kc_edges = kc_hn; } else { char kc_buf2[30]; sprintf(kc_buf2, \", \"); strncat(kc_hn->label, kc_buf2, kc_hn->lsize - strlen(kc_hn->label)); } if (edge_label_prefix) { strncat(kc_hn->label, edge_label_prefix, kc_hn->lsize - strlen(kc_hn->label)); } sprintf(kc_buf, \"%d\", *kc_edge_nr); strncat(kc_hn->label, kc_buf, kc_hn->lsize - strlen(kc_hn->label)); (*kc_edge_nr)++; } void impl_abstract_phylum::printdot_add_edge(c_abstract_phylum kc_sub_p, int kc_son_nr, int *kc_edge_nr, kc_dotedgenode_t *kc_edges, const char *edge_label_prefix) const { kc_do_printdot_do_add_edge(this, kc_sub_p, kc_son_nr, kc_edge_nr, kc_edges, edge_label_prefix); } void kc_do_printdot_edges(FILE *kc_f, kc_dotedgenode_t kc_edges, const char *edge_attributes, bool use_context_when_sharing_leaves) { kc_dotedgenode_t kc_p = kc_edges; if (!kc_f) kc_f = stdout; while(kc_p) { kc_p->ptr_from->do_printdot_id(kc_f, use_context_when_sharing_leaves, 0, 0); fprintf(kc_f, \":f%d -> \", kc_p->son_nr); kc_p->ptr_to->do_printdot_id(kc_f, use_context_when_sharing_leaves, kc_p->ptr_from, kc_p->son_nr); fprintf(kc_f, \" [label=\\\"%s\\\"\", kc_p->label); if (edge_attributes && (strlen(edge_attributes) > 0)) { fprintf(kc_f, \", %s\", edge_attributes); } fprintf(kc_f, \"];\\n\"); kc_p = kc_p->next; } } void impl_abstract_phylum::do_printdot(FILE *kc_f, bool kc_outmost, int *kc_edge_nr, kc_dotedgenode_t *kc_edges, const char *edge_label_prefix, bool print_node_labels, bool use_context_when_sharing_leaves, c_abstract_phylum kc_ctxt, int kc_son_nr) const { int kc_i; if (!kc_f) kc_f = stdout; switch(phylum()) { case phylum_voidptr: do_printdot_id(kc_f, use_context_when_sharing_leaves, kc_ctxt, kc_son_nr); fprintf(kc_f, \" [label=\\\"%p\\\", shape=ellipse];\\n\", dynamic_cast(this)->pointer); break; case phylum_casestring: case phylum_nocasestring: do_printdot_id(kc_f, use_context_when_sharing_leaves, kc_ctxt, kc_son_nr); #ifdef KC_UNICODE fprintf(kc_f, \" [label=\\\"%s\\\", shape=ellipse];\\n\", kc_to_cstring(static_cast(this)->name).c_str()); #else fprintf(kc_f, \" [label=\\\"%s\\\", shape=ellipse];\\n\", static_cast(this)->name); #endif break; case phylum_integer: do_printdot_id(kc_f, use_context_when_sharing_leaves, kc_ctxt, kc_son_nr); fprintf(kc_f, \" [label=\\\"%i\\\", shape=ellipse];\\n\", ((integer)this)->value); break; case phylum_real: do_printdot_id(kc_f, use_context_when_sharing_leaves, kc_ctxt, kc_son_nr); fprintf(kc_f, \" [label=\\\"%f\\\", shape=ellipse];\\n\", ((real)this)->value); break; default: if (!subphylum(0)) { do_printdot_id(kc_f, use_context_when_sharing_leaves, kc_ctxt, kc_son_nr); fprintf(kc_f, \" [label=\\\"%s\\\"];\\n\", op_name()); } else { do_printdot_id(kc_f, use_context_when_sharing_leaves, kc_ctxt, kc_son_nr); fprintf(kc_f, \" [label=\\\"{%s|{\", op_name()); kc_do_printdot_genfields(kc_f, prod_sel(), print_node_labels); fprintf(kc_f, \"}}\\\"];\\n\"); abstract_phylum child; for (kc_i=0; (child = subphylum(kc_i)); kc_i++) { printdot_add_edge(child, kc_i+1, kc_edge_nr, kc_edges, edge_label_prefix ); child->do_printdot( kc_f, false, kc_edge_nr, kc_edges, edge_label_prefix, print_node_labels, use_context_when_sharing_leaves, this, kc_i+1 ); } } } } " ]; Consphylumdeclarations( pd, rpds ) -> [view_gen_printdotdefs_c: rpds pd ]; Nilphylumdeclarations() -> [view_gen_printdotdefs_c: /* EMPTY */ ]; PhylumDeclaration( *, *, Emptyproductionblock(), * ) -> [view_gen_printdotdefs_c: /* EMPTY */ ]; PhylumDeclaration( id, *, PredefinedAlternatives( * ), * ), PhylumDeclaration( id, *, ListAlternatives( *, * ), * ), PhylumDeclaration( id, *, NonlistAlternatives( * ), * ) -> [view_gen_printdotdefs_c: "void impl_" id "::fprintdot(FILE *f, const char *root_label_prefix, const char *edge_label_prefix, const char *edge_attributes, bool print_node_labels, bool use_context_when_sharing_leaves, bool print_prologue_and_epilogue) const { int kc_edge_nr = 1; kc_dotedgenode_t kc_edges = 0; if (print_prologue_and_epilogue) fprintdotprologue(f); /*if (kc_outmost)*/ kc_do_printdot_subgraph_prologue(f, this, root_label_prefix, edge_attributes, print_node_labels, use_context_when_sharing_leaves); fprintdot_hashtable = new kc_dotedge_ht; do_printdot(f, true, &kc_edge_nr, &kc_edges, edge_label_prefix, print_node_labels, use_context_when_sharing_leaves, 0, 0); kc_do_printdot_edges(f, kc_edges, edge_attributes, use_context_when_sharing_leaves); delete fprintdot_hashtable; fprintdot_hashtable=0; /*if (kc_outmost)*/ kc_do_printdot_subgraph_epilogue(f); if (print_prologue_and_epilogue) fprintdotepilogue(f); } " ]; /* * * * * * * * * * * */ Nilphyla() -> [view_gen_printdotdefs_c: /* EMPTY */ ]; Consphyla( a_phy, r_phy ) -> [view_gen_printdotdefs_c: { // MPi 20020903 assertionFailed("Not used anymore"); } r_phy " assertReason(kc_phy != phylum_" a_phy ", \"kc_do_printdot_phylum called with phylum_" a_phy " argument\"); " ]; /* * * * * * * * * * * */ Nilphyla() -> [view_gen_printdotedges_c: /* EMPTY */ ]; Consphyla( a_phy, r_phy ) -> [view_gen_printdotedges_c: r_phy " case phylum_" a_phy ": { kc_do_printdot_id_of__" a_phy "(kc_f, kc_p->ptr_to.yt_" a_phy ", use_context_when_sharing_leaves, kc_p->ptr_from.yt_voidptr, kc_p->son_nr); break; } " ]; /***************************************************************************/ PhylumDeclarations( pds ) -> [view_gen_listdefs_c: pds ]; Consphylumdeclarations( pd, rpds ) -> [view_gen_listdefs_c: rpds pd ]; Nilphylumdeclarations() -> [view_gen_listdefs_c: /* EMPTY */ ]; PhylumDeclaration( *, *, *, * ) -> [view_gen_listdefs_c: /* EMPTY */ ]; PhylumDeclaration( id, *, ListAlternatives( *, el ), * ) -> [view_gen_listdefs_c: id " concat(c_" id " kc_p1, c_" id " kc_p2) { return dynamic_cast<" id ">(kc_p1->do_concat(kc_p2, sel_Cons" id ")); } " { covariant_choice(id, "\nimpl_", "::reverse() const", "abstract_list\nimpl_", "::reverse() const", kc_printer, kc_current_view); } "\n{ return dynamic_cast<" id ">(do_reverse(Nil" id "(), sel_Cons" id ")); } " el " impl_" id "::last() const { return dynamic_cast<" el ">(impl_abstract_list::last()); } bool impl_" id "::is_nil() const { return " el "_1==0 && " id "_1==0; } " id " impl_" id "::map(" el " (*kc_fp)(" el ")) { return dynamic_cast<" id ">(do_map((abstract_phylum (*)(abstract_phylum))kc_fp, sel_Cons" id ")); } " id " impl_" id "::filter(bool (*kc_fp)(" el ")) { return dynamic_cast<" id ">(do_filter((bool (*)(abstract_phylum))kc_fp, sel_Cons" id ")); } " id " impl_" id "::append(" el " new_last) { return dynamic_cast<" id ">(do_append(new_last, Nil" id "())); } " id " impl_" id "::merge( " id " second, " el " (*kc_fp)(" el ", " el ")) { return dynamic_cast<" id ">(do_merge(second,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp, sel_Cons" id ")); } " el " impl_" id "::reduce( " el " neutral, " el " (*kc_fp)(" el ", " el ")) { return dynamic_cast<" el ">(do_reduce(neutral,(abstract_phylum(*)(abstract_phylum,abstract_phylum))kc_fp)); } " ]; /***************************************************************************/ /* * Included code * */ Nilincludedeclarations() -> [view_gen_includes: /* EMPTY */ ]; Consincludedeclarations( *, * ) -> [view_gen_includes: "namespace kc { } using namespace kc; /* included stuff */ " $0:view_do_gen_includes "/* end included stuff */ " ]; Nilincludedeclarations() -> [view_do_gen_includes: /* EMPTY */ ]; Consincludedeclarations( e, l) -> [view_do_gen_includes: l e ]; IncludeDeclaration( i ) -> [view_do_gen_includes: { if(g_options.linedirec) } ${ pg_line $0->line " \"" { PRINT(g_options.dir_line.c_str()); } $0->file:view_filename "\"\n" $} i g_emptystring:view_printer_outputfileline ]; /***************************************************************************/ /* * CSGIO code */ PhylumDeclarations( * ) -> [view_gen_csgio_start_h: "/* translation of file(s)\n" Thefnfiles " */ /* generated by: * " kimwitu_copyright " */ #ifndef KC_CSGIO_HEADER #define KC_CSGIO_HEADER #include \"" { PRINT(g_options.prefix.c_str()); } "k.h\" // in case a user forgets " ]; PhylumDeclarations( * ) -> [view_gen_csgio_end_h: " #endif // KC_CSGIO_HEADER " ]; /***************************************************************************/ PhylumDeclarations( * ) -> [view_gen_csgio_start_c: "/* translation of file(s)\n" Thefnfiles " */ /* generated by: * " kimwitu_copyright " */ #define KC_CSGIO " { if(g_options.stdafx!="") { PRINT("#include \""); PRINT(g_options.stdafx.c_str()); PRINT("\"\n"); } } " #include #include #include #include #include #include #include \"" { PRINT(g_options.prefix.c_str()); } "k.h\" #include \"" { PRINT(g_options.prefix.c_str()); } "csgiok.h\" " ]; PhylumDeclarations( pds ) -> [view_gen_csgio_h: " extern const char *kc_csgio_err_reason; typedef enum { KC_CSGIOSTATUS_NO_ERR = 0, KC_CSGIOSTATUS_SCAN_ERR_1, KC_CSGIOSTATUS_SCAN_ERR_2, KC_CSGIOSTATUS_SCAN_ERR_3, KC_CSGIOSTATUS_SCAN_ERR_4, KC_CSGIOSTATUS_SCAN_ERR_5, KC_CSGIOSTATUS_GRAM_INCONSISTENT, KC_CSGIOSTATUS_ROK, KC_CSGIOSTATUS_ILLEGAL_OPTION, KC_CSGIOSTATUS_TOO_MANY_OPERATORS, KC_CSGIOSTATUS_WOK, KC_CSGIOSTATUS_TXT_FILE_INPUT, KC_CSGIOSTATUS_SYNTAX_ERROR, KC_CSGIOSTATUS_ILLEGAL_CONTEXT, KC_CSGIOSTATUS_PREMATURE_EOF, KC_CSGIOSTATUS_UNEXP_FATHER_MARK } KC_IO_STATUS; // XXX Needs to be extended struct IO_exception { IO_exception(KC_IO_STATUS _io_status, const char* _err_reason=kc_csgio_err_reason, int _line=0) : io_status(_io_status), err_reason(_err_reason), line(_line) { } KC_IO_STATUS io_status; const char *err_reason; int line; }; char* IO_exception2char(IO_exception); #if defined(__GNUC__) && __GNUC__<3 extern void CSGIOreadphylum(FILE*, abstract_phylum&, enum_phyla); #endif template void CSGIOread(FILE* kc_stream, P &kc_p) { abstract_phylum kc_value; #if !(defined(__GNUC__) && __GNUC__<3) extern void CSGIOreadphylum(FILE*, abstract_phylum&, enum_phyla); #endif CSGIOreadphylum( kc_stream, kc_value, kc_p->phylum_sel_ ); // Cast _could_ be static, but just to be completely sure if (dynamic_cast

(kc_value)==0) throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_5, \"Internal problem: Wrong phylum type created.\"); kc_p = dynamic_cast

(kc_value); } " ]; PhylumDeclarations( pds ) -> [view_gen_csgio_c: " namespace { // all local to this file \r /* macro that does the string concatenation */ #define kc_str_conc2(a,b) strcat(strcpy(new char[strlen(a) + strlen(b) +1], a), b) /* function that reads the integers */ inline void kc_do_get_int(int &c, int c_init, int &i, FILE *f) { c = c_init; i = 0; while (isdigit(c)){ i = (i*10) + (c-'0'); c = getc(f); } } char *kc_malloc_area = 0; size_t kc_sizeof_malloc_area = 0; int kc_node_count; int kc_node_count_base; char* kc_grow_malloc_area(size_t kc_s) { delete kc_malloc_area; kc_malloc_area = new char[kc_s]; kc_sizeof_malloc_area = kc_s; return kc_malloc_area; } inline char* KC_GETMALLOCAREA(size_t kc_s) { return kc_s > kc_sizeof_malloc_area ? kc_grow_malloc_area(kc_s) : kc_malloc_area; } /* global variables */ int kc_no_external_ops; const int KC_NOT_FOUND_OPERATOR = -1; int kc_file_offset_base; int kc_file_offset; /* Magic File descriptor(s) */ /* Magic descriptors of length up to KC_MAGIC_LENGTH-1 are supported. When changing * KC_MAGIC_LENGTH. change constant in MAGIC_READ_FORMAT to be one less than * KC_MAGIC_LENGTH. */ /* Every file is assumed to start with the magic file descriptor for asc_csg_v3 */ char kc_ascii_prefix_magic_v3[] = \"A#S#C#S#S#L#V#3\"; char kc_ascii_prefix_magic_hu[] = \"A#S#C#S#S#L#HUB\"; const int KC_MAGIC_LENGTH = 25; const char *KC_MAGIC_READ_FORMAT = \"%24s\\n\"; /* Operators with names of length upto OP_LENGTH-1 are supported. */ /* When changing OP_LENGTH, change constant in OP_READ_FOMAT to be one less */ const int KC_OP_LENGTH = 256; const char *KC_OP_READ_FORMAT = \"%255s\\n\"; //********************** // Error-string Routine const char* kc_CSGIOerrorstring(KC_IO_STATUS kc_io_status) { switch( kc_io_status ) { case KC_CSGIOSTATUS_NO_ERR: return( \"No errors\" ); case KC_CSGIOSTATUS_SCAN_ERR_1: return( \"Scan error(1)\" ); case KC_CSGIOSTATUS_SCAN_ERR_2: return( \"Scan error(2)\" ); case KC_CSGIOSTATUS_SCAN_ERR_3: return( \"Scan error(3)\" ); case KC_CSGIOSTATUS_SCAN_ERR_4: return( \"Scan error(4)\" ); case KC_CSGIOSTATUS_SCAN_ERR_5: return( \"Scan error(5)\" ); case KC_CSGIOSTATUS_GRAM_INCONSISTENT: return( \"Grammar is inconsistent\" ); case KC_CSGIOSTATUS_ROK: return( \"Read OK structure file\" ); case KC_CSGIOSTATUS_ILLEGAL_OPTION: return( \"Illegal option in write command\" ); case KC_CSGIOSTATUS_TOO_MANY_OPERATORS: return( \"Too many operators for binary format\" ); case KC_CSGIOSTATUS_WOK: return( \"Written OK\" ); case KC_CSGIOSTATUS_TXT_FILE_INPUT: return( \"Read OK Text-file\" ); case KC_CSGIOSTATUS_SYNTAX_ERROR: return( \"Syntax error\" ); case KC_CSGIOSTATUS_ILLEGAL_CONTEXT: return( \"Illegal context for operator\" ); case KC_CSGIOSTATUS_PREMATURE_EOF: return( \"Premature eof in file\" ); case KC_CSGIOSTATUS_UNEXP_FATHER_MARK: return( \"Unexpected FATHER MARKER\" ); default: return( \"Unknown error code\" ); } } struct csgio_info { int number; // number of node, or -1 if no number bool created; // whether the node is already written csgio_info():number(-1),created(false){} }; typedef std::map csgio_map; csgio_map kc_CSGIOhashtable; /* Maps */ typedef struct { int left; int right; } kc_OpToOpMap_tuple_t; kc_OpToOpMap_tuple_t kc_OpToOpMap[KC_NO_OF_OPERATORS]; const int KC_NOT_USED = -1; int kc_op_search(char *kc_s) { int kc_i; for ( kc_i=0; kc_i < KC_NO_OF_OPERATORS; kc_i++ ) { if ( strcmp( kc_s, operator_info[kc_i].name ) == 0 ) return( kc_i ); } return( KC_NOT_FOUND_OPERATOR ); } void kc_initializeOpToOpMap(int kc_v) { int kc_i; for ( kc_i=0; kc_i < KC_NO_OF_OPERATORS; kc_i++ ) { kc_OpToOpMap[kc_i].left = kc_i; kc_OpToOpMap[kc_i].right = kc_v; } } bool OpToOpMap_cmp_right(kc_OpToOpMap_tuple_t t1, kc_OpToOpMap_tuple_t t2) { // sort in DECREASING order return t1.right > t2.right; } bool OpToOpMap_cmp_left(kc_OpToOpMap_tuple_t t1, kc_OpToOpMap_tuple_t t2) { // sort in INCREASING order return t1.left < t2.left; } void kc_renumberOpToOpMap() { int kc_i, kc_j = 0; for ( kc_i=0; kc_i < KC_NO_OF_OPERATORS; kc_i++ ) { if (kc_OpToOpMap[kc_i].right > 0) { kc_OpToOpMap[kc_i].right = kc_j++; } else { kc_OpToOpMap[kc_i].right = KC_NOT_USED; } } } #define KC_MAKE_NEW_MAPPING(ext_op,int_op) kc_OpToOpMap[ext_op].right = int_op #define KC_MAKE_NEW_SCAN_MAPPING(ext_op) kc_OpToOpMap[ext_op].right++ #define KC_MAP(op) (kc_OpToOpMap[op].right) #define KC_IS_MAPPED(op) (kc_OpToOpMap[op].right != KC_NOT_USED) void kc_error_operator_not_in_phylum(int kc_op, int kc_phy) { const char *kc_error_message1 = \"operator not defined in phylum \"; const char *kc_error_message2 = \": \"; if ((kc_op <= one_before_first_operator) || (kc_op >= last_operator)) { char kc_value[30]; sprintf(kc_value, \"%d\",kc_op); kc_csgio_err_reason = kc_str_conc2(\"unknown operator number: \", kc_value); } else { kc_csgio_err_reason = (char*)strcat(strcat(strcat(strcpy(new char[(size_t)(strlen(kc_error_message1)+strlen(phylum_info[kc_phy].name)+strlen(kc_error_message2)+strlen(operator_info[kc_op].name)+1)], kc_error_message1), phylum_info[kc_phy].name), kc_error_message2), operator_info[kc_op].name); } throw IO_exception(KC_CSGIOSTATUS_ILLEGAL_CONTEXT); /*NOTREACHED*/ } } // anonymous namespace char* IO_exception2char(IO_exception kc_p) { char *kc_err_ret = 0; const char *kc_err_sep = \": \"; if (kc_p.io_status != KC_CSGIOSTATUS_ROK && kc_p.io_status != KC_CSGIOSTATUS_WOK) { const char *kc_io_err = kc_CSGIOerrorstring(kc_p.io_status); kc_err_ret = new char[strlen(kc_io_err)+strlen(kc_err_sep)+strlen(kc_p.err_reason)+1]; strcpy(kc_err_ret, kc_io_err); strcat(kc_err_ret, kc_err_sep); strcat(kc_err_ret, kc_p.err_reason); } return kc_err_ret; } const char *kc_csgio_err_reason = \"\"; #ifndef KC_NO_CSGIO_READ namespace { // all local to this file \r /* Base 64 numbers are written with the digits: : ; < = > ? @ A-Z [ \\ ] ^ _ ` a-y Base 10 numbers are written with the ordinary digits 0-9. Other characters are used in special circumstances: ! Indicates switch between reading attribute and unattributed nodes. # Indicates that the father is the next PROD_INSTANCE in the file. + Indicates that the following bytes are not a base 64 number * Indicates a line containing a (decimal) count of attributes. */ const char KC_B64_ZERO_CHAR = ':'; const char KC_ASCII_ZERO = '0'; const char KC_SWITCH_ATTR = '!'; const char KC_FATHER_MARKER = '#'; const char KC_NON_B64_CHAR = '+'; const char KC_ATTR_COUNT = '*'; const char KC_NULL_POINTER = '.'; inline bool KC_IS_B64(int c) { return c>=KC_B64_ZERO_CHAR && c=0 && off<=kc_node_count, \"base 64 offset out of range\"); kc_valptr = kc_offset_to_address_map[off]; return(KC_READ_EARLIER); } else { ungetc(kc_first_char, kc_stream); return(KC_NOT_READ_YET); } } KC_READ_STATUS kc_read_sharing_find_base(FILE *kc_stream, char const* &kc_valptr) { char kc_first_char; unsigned kc_offset; kc_first_char = getc(kc_stream); if (KC_IS_B64(kc_first_char)) { kc_offset = get_rest_of_b64(kc_stream, kc_first_char, '\\n'); int off=kc_file_offset_base - kc_offset; assertReason(off>=0 && off<=kc_node_count_base, \"base 64 offset out of range\"); kc_valptr = kc_offset_to_address_map_base[off]; return(KC_READ_EARLIER); } else { return(KC_NOT_READ_YET); } } #define kc_read_sharing_store(kc_ptr, kc_loc) \\ kc_offset_to_address_map[kc_loc] = kc_ptr #define kc_read_sharing_store_base(kc_ptr) \\ kc_offset_to_address_map_base[kc_file_offset_base++] = kc_ptr void kc_end_read_sharing() { delete kc_offset_to_address_map; delete kc_offset_to_address_map_base; } void kc_CSGIOdo_read_atom_denotation(FILE *kc_stream, char *kc_sbase, int kc_len) { char * kc_sptr = kc_sbase; register int kc_ch, kc_ch1; register char kc_test; register int kc_i; for (kc_i=0; kc_icopy(false); return kc_answer; } kc_do_get_int(kc_testing,getc(kc_stream),kc_ext_op,kc_stream); if ( kc_testing == EOF ) throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1); if ( kc_testing == KC_NULL_POINTER ) { kc_do_get_int(kc_testing,getc(kc_stream),kc_ext_op,kc_stream); if ( kc_testing != '\\n' ) throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1); return 0; } if ( kc_testing == KC_FATHER_MARKER ) throw IO_exception(KC_CSGIOSTATUS_UNEXP_FATHER_MARK); if ( kc_testing != '\\n' ) throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1); enum_operators kc_op(static_cast(KC_MAP( kc_ext_op ))); /* end get operator */ if (kc_opphylum_info[kc_phy].last_operator) kc_error_operator_not_in_phylum(kc_op,kc_phy); kc_location = kc_file_offset++; switch( kc_op ) {\r case sel__VoidPtr:\v // FATAL ERROR kc_do_get_int(kc_delim,getc(kc_stream),kc_len,kc_stream); if ( kc_delim == EOF ) throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1); kc_sbase = KC_GETMALLOCAREA(kc_len + 1); // +1 for '\\0' kc_CSGIOdo_read_atom_denotation(kc_stream, kc_sbase, kc_len); kc_answer = 0; break;\r case sel__Int:\v kc_do_get_int(kc_delim,getc(kc_stream),kc_len,kc_stream); if ( kc_delim == EOF ) throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1); kc_sbase = KC_GETMALLOCAREA(kc_len + 1); // +1 for '\\0' kc_CSGIOdo_read_atom_denotation(kc_stream, kc_sbase, kc_len); kc_answer = mkinteger(::atoi(kc_sbase)); break;\r case sel__Real:\v kc_do_get_int(kc_delim,getc(kc_stream),kc_len,kc_stream); if ( kc_delim == EOF ) throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1); kc_sbase = KC_GETMALLOCAREA(kc_len + 1); // +1 for '\\0' kc_CSGIOdo_read_atom_denotation(kc_stream, kc_sbase, kc_len); kc_answer = mkreal(::atof(kc_sbase)); break;\r case sel__Str:\v if (kc_read_sharing_find_base( kc_stream, c_kc_sbase ) == KC_NOT_READ_YET) { kc_not_read_yet = true; kc_do_get_int(kc_delim,getc(kc_stream),kc_len,kc_stream); if ( kc_delim == EOF ) throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1); kc_sbase = KC_GETMALLOCAREA(kc_len + 1); /* +1 for '\\0' */ kc_CSGIOdo_read_atom_denotation(kc_stream, kc_sbase, kc_len); c_kc_sbase=kc_sbase; } kc_answer = mkcasestring( c_kc_sbase ); if (kc_not_read_yet) { kc_read_sharing_store_base( phylum_cast(kc_answer)->name ); } break;\r case sel_NoCaseStr:\v if (kc_read_sharing_find_base( kc_stream, c_kc_sbase ) == KC_NOT_READ_YET) { kc_not_read_yet = true; kc_do_get_int(kc_delim,getc(kc_stream),kc_len,kc_stream); if ( kc_delim == EOF ) throw IO_exception(KC_CSGIOSTATUS_SCAN_ERR_1); kc_sbase = KC_GETMALLOCAREA(kc_len + 1); /* +1 for '\\0' */ kc_CSGIOdo_read_atom_denotation(kc_stream, kc_sbase, kc_len); c_kc_sbase=kc_sbase; } kc_answer = mknocasestring( c_kc_sbase ); if (kc_not_read_yet) { kc_read_sharing_store_base( phylum_cast(kc_answer)->name ); } break; default:\v abstract_phylum kc_subtmp[" { int i = Theargsnumbers->last()->value; if (i<=0) i = 1; } i "]; for (int kc_i = 0; kc_i < operator_info[kc_op].no_sons; ++kc_i) { kc_subtmp[kc_i] = CSGIOread2dft(kc_stream, operator_info[kc_op].subphylum[kc_i] ); assertReason(kc_subtmp[kc_i]!=0, \"shared phylum is not contained in file (reference is wrong)\"); } " " switch(operator_info[kc_op].no_sons) { " Theargsnumbers " default:\v assertionFailed(\"unexpected number of sub-phyla\"); break;\r }\r // Read attributes for (int kc_i=0; kc_i>= 6; } if (kc_value < 0) { putc('-', kc_f); } } putc('\\n', kc_f); } // realize sharing of strings in ouput file void kc_CSGIOscan(c_abstract_phylum kc_p) { if (kc_p==0) return; enum_operators kc_op = kc_p->prod_sel(); if (kc_CSGIOhashtable[kc_p].number == -1) { kc_CSGIOhashtable[kc_p].number = kc_node_count++; KC_MAKE_NEW_SCAN_MAPPING( kc_op ); switch(kc_op) { case sel__Str: case sel_NoCaseStr: { char const* s = static_cast(kc_p)->name; if (kc_CSGIOhashtable[s].number == -1)\v kc_CSGIOhashtable[s].number = kc_node_count_base++;\r break; } default: { abstract_phylum child; for (int i=0; (child = kc_p->subphylum(i)); ++i)\v kc_CSGIOscan(child);\r } } for (int i=0; i(kc_p), i));\r } } void kc_CSGIOwrite2structure(FILE *kc_stream, c_abstract_phylum kc_p) { if (kc_p==0) { fprintf( kc_stream, \"%c\\n\", KC_NULL_POINTER ); return; } char _kc_value[30]; char *kc_value = _kc_value; enum_operators kc_op = kc_p->prod_sel(); csgio_info &kc_hn = kc_CSGIOhashtable[kc_p]; if (kc_hn.created) { kc_print_b64_to_file( kc_stream, kc_file_offset - kc_hn.number ); } else { kc_hn.created = true; fprintf( kc_stream, \"%d\\n\", KC_MAP( kc_op ) ); kc_file_offset++; switch(kc_op) {\r case sel__VoidPtr:\v /* FATAL ERROR */ sprintf( kc_value, \"%p\", static_cast(kc_p)->pointer); kc_print_to_file( kc_stream, kc_value ); kc_file_offset_base++; break;\r case sel__Str: case sel_NoCaseStr:\v fprintf( kc_stream, \"%c\", KC_NON_B64_CHAR ); kc_print_to_file( kc_stream, static_cast(kc_p)->name); kc_file_offset_base++; break;\r case sel__Int:\v sprintf( kc_value, \"%d\", static_cast(kc_p)->value); kc_print_to_file( kc_stream, kc_value ); kc_file_offset_base++; break;\r case sel__Real:\v sprintf( kc_value, \"%.20f\", static_cast(kc_p)->value); kc_print_to_file( kc_stream, kc_value ); kc_file_offset_base++; break;\r default: abstract_phylum child; for (int kc_i=0; (child = kc_p->subphylum(kc_i)); ++kc_i)\v kc_CSGIOwrite2structure(kc_stream, child);\r // Write attributes for (int kc_i=0; kc_i(kc_p), kc_i));\r } } } void CSGIOwrite(FILE *kc_stream, c_abstract_phylum kc_p) { int kc_i; kc_csgio_err_reason = \"\"; /* write out the magic string and $operators string */ fprintf( kc_stream, \"%s\\n$operators \\n\", kc_ascii_prefix_magic_hu ); /* Initialize map from internal operators to external operators, */ /* initially empty */ kc_no_external_ops = 0; kc_node_count = 0; kc_node_count_base = 0; kc_initializeOpToOpMap(0); /* initialize to 0, not any other value */ // realize sharing kc_CSGIOscan(kc_p); /* sort the optoopmap on decreasing operator usage */ std::sort(&kc_OpToOpMap[0], &kc_OpToOpMap[KC_NO_OF_OPERATORS], OpToOpMap_cmp_right); kc_renumberOpToOpMap(); /* write out the _sorted_ operator table */ for(kc_i = 0; kc_i < KC_NO_OF_OPERATORS; kc_i++) { if (kc_OpToOpMap[kc_i].right != KC_NOT_USED) { fprintf( kc_stream, \"%s %d %d %d\\n\", KC_OP_NAME( kc_OpToOpMap[kc_i].left), KC_NO_SONS( kc_OpToOpMap[kc_i].left ), 0, KC_ATOMICITY( kc_OpToOpMap[kc_i].left ) ); } } /* sort the optoopmap increasing on the operator number */ std::sort(&kc_OpToOpMap[0], &kc_OpToOpMap[KC_NO_OF_OPERATORS], OpToOpMap_cmp_left); /* write out the grammar terminator string and the number of nodes */ fprintf( kc_stream, \"$object \\n%d %d\\n\", kc_node_count, kc_node_count_base ); /* write out the tree */ kc_file_offset = 0; kc_file_offset_base = 0; kc_CSGIOwrite2structure( kc_stream, kc_p); kc_CSGIOhashtable.clear(); } } // anonymous namespace void impl_abstract_phylum::CSGIOwrite(FILE *kc_stream) const { kc::CSGIOwrite(kc_stream, this); } #endif // ! KC_NO_CSGIO_WRITE " ]; Nilargsnumbers() -> [view_gen_csgio_c: /* EMPTY */ ]; Consargsnumbers( i, r ) -> [view_gen_csgio_c: " case " i ": kc_answer = kc_create(kc_op" { for (int j=0; jvalue; ++j) } ${ ", kc_subtmp[" j "]" $} "); break; " r ]; /***************************************************************************/ /* * attribute copy fnsdefs * */ PhylumDeclarations( pds ) -> [view_gen_copy_attributes_c: " void copy_attributes(enum_phyla copyPhy, c_abstract_phylum kc_p1, abstract_phylum kc_p2) { switch(copyPhy) {\r " pds " case one_before_first_phylum: // just to avoid a warning about missing case if empty default: \vbreak; // it's alright, no attributes to copy\r } enum_operators copyOp=kc_p1->prod_sel(); for (int i=operator_info[copyOp].no_attrs-1; i>=0; --i)\v attributeOf(kc_p2, i)=attributeOf(const_cast(kc_p1), i);\r } " ]; Consphylumdeclarations( pd, rpds ) -> [view_gen_copy_attributes_c: rpds pd ]; Nilphylumdeclarations() -> [view_gen_copy_attributes_c: /* EMPTY */ ]; PhylumDeclaration( id, *, *, CcodeOption( Nilattributes(), * )) -> [view_gen_copy_attributes_c: /* EMPTY */ ]; PhylumDeclaration( id, *, *, CcodeOption( a, * )) -> [view_gen_copy_attributes_c: " case phylum_" id ": { c_" id " p1 = dynamic_cast(kc_p1); " id " p2 = dynamic_cast<" id ">(kc_p2); " a " break; }\n" ]; Nilattributes() -> [view_gen_copy_attributes_c: /* EMPTY */ ]; Consattributes( Attribute( *, aid, * ), ra ) -> [view_gen_copy_attributes_c: ra " p2->" aid " = p1->" aid "; " ]; PhylumDeclaration( id, *, *, // A shortcut for single attributes CcodeOption( Consattributes( Attribute( *, aid, * ), Nilattributes() ), * )) -> [view_gen_copy_attributes_c: " case phylum_" id ":\v dynamic_cast<" id ">(kc_p2)->" aid " = dynamic_cast(kc_p1)->" aid "; break;\r\n" ]; /***************************************************************************/ /* * copy fnsdefs * */ PhylumDeclarations( pds ) -> [view_gen_copydefs_c: "abstract_phylum impl_abstract_phylum::copy(bool kc_copy_attributes) const { enum_phyla kc_phy = phylum(); // XXX - implement special cases in subclasses - MvL KC_OPERATOR_INFO *kc_op_info = &operator_info[prod_sel()]; kc_storageclass_t kc_st = phylum_info[kc_op_info->phylum].uniq_stored; if (kc_st && kc_storageclass_still_uniq[kc_st]) return const_cast(this); abstract_phylum kc_answer=0; if (kc_phy == phylum_casestring) { kc_answer=mkcasestring((dynamic_cast(this))->name); } else if (kc_phy == phylum_nocasestring) { kc_answer=mknocasestring((dynamic_cast(this))->name); } else if (kc_phy == phylum_voidptr) { kc_answer=mkvoidptr((dynamic_cast(this))->pointer); } else if (kc_phy == phylum_integer) { kc_answer=mkinteger((dynamic_cast(this))->value); } else if (kc_phy == phylum_real) { kc_answer=mkreal((dynamic_cast(this))->value); } else { abstract_phylum kc_subtmp[" { int i = Theargsnumbers->last()->value; if (i<=0) i = 1; } i "], child; for (int kc_i = 0; (child = subphylum(kc_i)); kc_i++) { kc_subtmp[kc_i] = child->copy(kc_copy_attributes); } switch(kc_op_info->no_sons) { " Theargsnumbers " default: assertionFailed(\"unexpected number of sub-phyla\"); } } if (kc_copy_attributes) copy_attributes(kc_phy, this, kc_answer); return kc_answer; } " ]; Nilargsnumbers() -> [view_gen_copydefs_c: /* EMPTY */ ]; Consargsnumbers( i, r ) -> [view_gen_copydefs_c: " case " i ": kc_answer = kc_create(prod_sel()" { for (int j=0; jvalue; ++j) } ${ ", kc_subtmp[" j "]" $} "); break; " r ]; /***************************************************************************/ PhylumDeclarations( * ) -> [view_gen_rewritek_h: "/* translation of file(s)\n" Thefnfiles " */ /* generated by: * " kimwitu_copyright " */ #ifndef KC_REWRITE_HEADER #define KC_REWRITE_HEADER " ]; PhylumDeclarations( pds ) -> [view_gen_rewritedecls_h: " /* Use rviews instead extern char *kc_rview_names[]; */ " Therviewnames:view_rview_class_def ]; PhylumDeclarations( * ) -> [view_gen_end_rewritek_h: "#endif // KC_REWRITE_HEADER\n" ]; node=Consviewnames( vn, r_vn) -> [view_rview_class_def: r_vn { if(!node->is_extern) } ${ "struct " { if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } } vn "_class: rview_class { "vn"_class():rview_class("vn"_enum){} }; extern "vn"_class "vn"; " $} { else } ${ "class " { if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } } vn "_baseclass: public rview_class { \rprotected:\v "vn"_baseclass():rview_class("vn"_enum){} }; // class " vn "_class is defined externally " $} ]; /***************************************************************************/ PhylumDeclarations( * ) -> [view_gen_rewritek_c: "/* translation of file(s)\n" Thefnfiles " */ /* generated by: * " kimwitu_copyright " */ #define KC_REWRITE " { if(g_options.stdafx!="") { PRINT("#include \""); PRINT(g_options.stdafx.c_str()); PRINT("\"\n"); } } " #include #include #include #include \"" { PRINT(g_options.prefix.c_str()); } "k.h\" #include \"" { PRINT(g_options.prefix.c_str()); } "rk.h\" " { if(g_options.rw_loop) } ${ "#include #include #include " $} $0:view_open_namespace Therviewnames:view_gen_viewvars_c " impl_rviews rviews[] = { " Therviewnames " {0,0} }; " { if(g_options.rw_loop) } ${ { string how_smart = ""; if(g_options.smart_pointer) how_smart="_ptr"; } " static inline int kc_sons(abstract_phylum ph) { return KC_NO_SONS(ph->prod_sel()); } static abstract_phylum kc_create_op(enum_operators kc_op, std::vector& sons, size_t no_of_sons) { size_t son_offset = sons.size()-no_of_sons; switch(no_of_sons) {\n" Theargsnumbers " default:\v assertionFailed(\"unexpected number of sub-phyla\");\r }\r } static void initialize_sons_stack(abstract_phylum" how_smart "& kc_p, bool& skip, std::stack& node_stack, std::stack& sons_todo, rview kc_current_view_base) { // Initialize stack for depth first rewrite assertCond(kc_p); size_t no_of_sons=kc_sons(kc_p); while(!skip && (no_of_sons>0)) { sons_todo.push(no_of_sons); abstract_phylum parent = kc_p; for(int i = no_of_sons-1; i>=0; --i) { node_stack.push(kc_p); kc_p = parent->subphylum(i); } kc_p = kc_current_view_base.pre_rewrite(kc_p, skip); assertCond(kc_p); no_of_sons = kc_sons(kc_p); } // The deepest first son is now in kc_p. // On the node_stack are the siblings and then the parent. } static bool sons_changed(abstract_phylum" how_smart " current_son, const std::vector& sons_done, size_t no_of_sons) { bool changed = false; for(int i=no_of_sons-1; i>=0; --i) { if(sons_done[sons_done.size()-no_of_sons+i] != current_son->subphylum(i)) { changed=true; break; } } return changed; } abstract_phylum impl_abstract_phylum::rewrite_loop(rview kc_current_view_base) { std::stack node_stack; std::stack sons_todo; std::vector sons_done; abstract_phylum" how_smart " current_son=this; do { bool skip=false; current_son = kc_current_view_base.pre_rewrite(current_son, skip); initialize_sons_stack(current_son, skip, node_stack, sons_todo, kc_current_view_base); bool changed=true; do { assertCond(current_son); abstract_phylum" how_smart " res=current_son; if(!skip) res=current_son->do_rewrite(kc_current_view_base); assertCond(res); changed=true; if(res==current_son) { // nothing has been changed, current_son is completely rewritten if(!skip) { // call post_rewrite if this node is not skipped bool again=false; current_son=kc_current_view_base.post_rewrite(current_son, again); assertCond(current_son); if(again) \vbreak;\r // starts the whole rewrite_loop for the post_rewritten node again } else skip=false; sons_done.push_back(current_son); // move this son to sons_done if(!node_stack.empty()) { // else all is done assertCond(!sons_todo.empty()); assertCond(sons_todo.top()>0); --sons_todo.top(); // one less to todo if(sons_todo.top()==0) { // all sons done sons_todo.pop(); // forget it current_son=node_stack.top(); // the parent of the original last done sons node_stack.pop(); // the last (rewritten) son of this parent is // on top of sons_done (sons_done[sons_done.size()-1]) size_t no_of_sons=kc_sons(current_son); assertCond(sons_done.size() >= no_of_sons); changed = sons_changed(current_son, sons_done, no_of_sons); if(changed) { // some sons are different -> \v\v// create a new operator and make it the current \r\rabstract_phylum" how_smart " new_son = \vkc_create_op(current_son->prod_sel(), sons_done, no_of_sons);\r new_son->rewrite_members(current_son); current_son = new_son; // the sons do not need to be rewritten again changed=false; } // The current node must still be rewritten, // but not its sons anymore (changed == false). // Those sons are in the current node, so no-one needs // them anymore and they are popped off the stack. sons_done.resize(sons_done.size() - no_of_sons); } else { // make the complete loop with the next son (changed == true) current_son = node_stack.top(); node_stack.pop(); } } else { current_son = 0; // terminates the loop } } else // something has been changed -> start rewrite with the changed node again current_son=res; } while(!changed); } while(current_son); assertCond(sons_todo.size()==0); assertCond(sons_done.size()==1); return sons_done[0]" { if(g_options.smart_pointer) } ${ ".return_ptr()" $} "; // done.top() } " $} ]; Nilargsnumbers() -> [view_gen_rewritek_c: /* EMPTY */ ]; Consargsnumbers( i, r ) -> [view_gen_rewritek_c: " case " i ": return kc_create(kc_op" { for (int j=0; jvalue; ++j) } ${ ", sons[son_offset" { if (j!=0) } ${ "+" j $} "]" $} "); " r ]; /***************************************************************************/ PhylumDeclarations( pds ) -> [view_gen_rewritedefs_c: " #ifndef KC_TRACE_PROVIDED #define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND #endif #ifndef KC_TRACE_REWRITE_MATCH #define KC_TRACE_REWRITE_MATCH(VIEW,FILE,LINE,NODE) #endif #ifndef KC_TRACE_REWRITE_RESULT #define KC_TRACE_REWRITE_RESULT(VIEW,FILE,LINE,NODE) #endif " pds ]; Consphylumdeclarations( pd, rpds ) -> [view_gen_rewritedefs_c: rpds pd ]; Nilphylumdeclarations() -> [view_gen_rewritedefs_c: /* EMPTY */ ]; PhylumDeclaration( *, *, Emptyproductionblock(), * ) -> [view_gen_rewritedefs_c: /* EMPTY */ ]; PhylumDeclaration( id, *, PredefinedAlternatives( * ), * ) -> [view_gen_rewritedefs_c: /* EMPTY */ // default routine: return this; ]; PhylumDeclaration( id, *, pb, * ) -> [view_gen_rewritedefs_c: { gl_phydecl = f_lookupdecl( id ); gl_phylum = id; if ( gl_phydecl == 0 ) { v_report(NonFatal( FileLine( gl_phylum->file, gl_phylum->line ), Problem1S1ID( "internal error: could not find declaration of phylum:", gl_phylum ))); } } pb { gl_phydecl = 0; gl_phylum = 0; } ]; NonlistAlternatives( a ) -> [view_gen_rewritedefs_c: a ]; /////////////////////////////////////////// // Generation of *::rewrite functions ListAlternatives( Consalternatives(consa=Alternative(oid,*),Consalternatives(nila=*,*)), * ) ->[ view_gen_rewritedefs_c: // For the tail, ie the recursion, it is critical not to call another function // to keep the stack smaller. This might also enable tail recursion elimination // for some very clever compiler. { gl_phylum = f_phylumofoperator(oid); } { if(!g_options.rw_loop) } ${ { covariant_choice(gl_phylum, "", "abstract_phylum", kc_printer, kc_current_view); } $} { else } ${ "abstract_phylum" $} " impl_" gl_phylum "::" { if(f_rewrite_in_operatordecl(consa) || g_options.rw_loop) } ${ "do_" $} "rewrite(rview kc_current_view_base) { if (is_nil()) { " nila:view_gen_rewritedefs_body_c " } else { // not Nil, Cons " consa:view_gen_rewritedefs_body_c " } } " { gl_phylum = 0; } ]; alt=Alternative(oid, args) -> [view_gen_rewritedefs_c: { gl_phylum = f_phylumofoperator(oid); } { if(!g_options.rw_loop) } ${ { covariant_choice(gl_phylum, "", "abstract_phylum", kc_printer, kc_current_view); } $} { else } ${ "abstract_phylum" $} " impl_" gl_phylum "_" oid "::" { if(f_rewrite_in_operatordecl(alt) || g_options.rw_loop) } ${ "do_" $} "rewrite(rview kc_current_view_base) { " $0:view_gen_rewritedefs_body_c " } " { gl_phylum = 0; } ]; alt= Alternative(oid, args) -> [view_gen_rewritedefs_body_c: { rewriteviewsinfo a_rewriteviewsinfo = f_rewriteviewsinfo_of_alternative( alt, Therviewnames ); gl_operator = oid; gl_alternative = alt; gl_rewrite_goto_used = false; args->unparse(kc_printer, view_gen_rewritedefs_rewritearg_c); // GK: avoid the generation of a useless switch (there are only (more the one) empty Rewriteviewinfo in the list) bool empty=true; foreach($rvi; rewriteviewsinfo a_rewriteviewsinfo) { Rewriteviewinfo(*, Nilrewriterulesinfo()) : { /* empty*/ } default: { empty=false; } } if(!empty) { PRINT(" switch(kc_current_view_base) {\n"); a_rewriteviewsinfo->unparse(kc_printer, view_gen_rewritedefs_c); PRINT(" }\n"); } } args:view_gen_rewritedefs_testarg_c { freespineandelements(a_rewriteviewsinfo); gl_operator = 0; gl_alternative = 0; } ]; Nilrewriteviewsinfo() -> [view_gen_rewritedefs_c: /* EMPTY */ ]; /* * IMPORTANT we unparse the viewsinfo in reverse order, to make sure that * the kc_unparsing_label is used before defined, ie. * the default view is the last in the switch * so that we can set a variable when we generate a goto, * so that we only generate the label if necessary */ Consrewriteviewsinfo( a_rvi, r_rvi ) -> [view_gen_rewritedefs_c: r_rvi a_rvi ]; Rewriteviewinfo( Id(Str(v)), rri ) -> [view_gen_rewritedefs_c: { gl_rewrite_rewriteinfo = rri; } { if ( strcmp(v->name, "base_rview" )==0 ) } ${ $0:view_gen_rewritedefs_default_c $} { else } ${ $0:view_gen_rewritedefs_other_c $} { gl_rewrite_rewriteinfo = 0; } ]; Rewriteviewinfo( *, Nilrewriterulesinfo() ) -> [view_gen_rewritedefs_default_c: { if (gl_rewrite_goto_used) } ${ " kc_rewrite_default: " $} " default:; " ]; Rewriteviewinfo( v, * ) -> [view_gen_rewritedefs_default_c: " default: " { if (gl_rewrite_goto_used) } ${ " kc_rewrite_default: " $} " case " v "_enum: { " v "_class& kc_current_view=static_cast<"v"_class&>(kc_current_view_base); " { gl_view = v; } gl_alternative { gl_view = 0; } " } " ]; Rewriteviewinfo( *, Nilrewriterulesinfo() ) -> [view_gen_rewritedefs_other_c: /* EMPTY */ ]; Rewriteviewinfo( v, * ) -> [view_gen_rewritedefs_other_c: " case " v "_enum: { " v "_class& kc_current_view=static_cast<"v"_class&>(kc_current_view_base); " { gl_view = v; } gl_alternative { gl_view = 0; } " } " // { gl_rewrite_goto_used = true; } ]; /***** vanaf hier volg de oude code ******/ Alternative( id, args ) -> [view_gen_rewritedefs_default_c: { gl_args=args; } gl_rewrite_rewriteinfo { gl_args = 0; } ]; Alternative( id, args ) -> [view_gen_rewritedefs_other_c: { if (! gl_rewrite_rewriteinfo->eq( Nilrewriterulesinfo())) } ${ { gl_args=args; } gl_rewrite_rewriteinfo { gl_args = 0; } $} ]; Nilarguments() -> [view_gen_rewritedefs_rewritearg_c: /* EMPTY */ ]; Consarguments( a_arg, r_args ) -> [view_gen_rewritedefs_rewritearg_c: r_args { if (!g_options.rw_loop) } ${ { if(g_options.smart_pointer) } ${ " " a_arg "_ptr l_" a_arg "_" $0->seqnr " =" $} { else } ${ " " a_arg " l_" a_arg "_" $0->seqnr " =" $} "\n" { if (g_options.covariant=='p') } ${ "#ifndef NO_COVARIANT_RETURN\n" $} { if (g_options.covariant!='n') } ${ "\v" a_arg "_" $0->seqnr "->rewrite(kc_current_view_base);\r\n" $} { if (g_options.covariant=='p') } ${ "#else\n" $} { if (g_options.covariant!='y') } ${ "\vstatic_cast<"a_arg">(" a_arg "_" $0->seqnr "->rewrite(kc_current_view_base));\r\n" $} { if (g_options.covariant=='p') } ${ "#endif // NO_COVARIANT_RETURN\n" $} $} ]; Nilarguments() -> [view_gen_rewritedefs_nl_arg_c: " " gl_phylum " kc_rp = this; " ]; Consarguments( *, * ) -> [view_gen_rewritedefs_nl_arg_c: " " gl_phylum " kc_rp = ((" $0:view_gen_rewritedefs_dotestarg_c ")) ? this : " gl_operator "(" $0:view_gen_rewritedefs_args_c "); " ]; Nilarguments() -> [view_gen_rewritedefs_testarg_c: " return this; " ]; Consarguments( *, * ) -> [view_gen_rewritedefs_testarg_c: { gl_phylum = f_phylumofoperator(gl_operator); } { if(!g_options.rw_loop) } ${ " if ((" $0:view_gen_rewritedefs_dotestarg_c ")) return this; else { impl_" gl_phylum {if(f_listelementphylum(gl_phylum)->eq(f_emptyId()))} ${ "_" gl_operator $} "* kc_result= " gl_operator "(" $0:view_gen_rewritedefs_args_c "); kc_result->rewrite_members(this); return kc_result; }" $} { else } ${ " return this;" $} { gl_phylum = 0; } ]; Nilarguments() -> [view_gen_rewritedefs_dotestarg_c: /* EMPTY */ ]; Consarguments( a_arg, Nilarguments() ) -> [view_gen_rewritedefs_dotestarg_c: "l_" a_arg "_" $0->seqnr " == " a_arg "_" $0->seqnr ]; Consarguments( a_arg, r_args ) -> [view_gen_rewritedefs_dotestarg_c: r_args ") && (l_" a_arg "_" $0->seqnr " == " a_arg "_" $0->seqnr ]; Nilarguments() -> [view_gen_rewritedefs_args_c: /* EMPTY */ ]; Consarguments( a_arg, Nilarguments() ) -> [view_gen_rewritedefs_args_c: { if (!g_options.rw_loop) } ${ "l_" $} a_arg "_" $0->seqnr ]; Consarguments( a_arg, r_args ) -> [view_gen_rewritedefs_args_c: r_args ", " { if (!g_options.rw_loop) } ${ "l_" $} a_arg "_" $0->seqnr ]; Nilrewriterulesinfo() -> [view_gen_rewritedefs_default_c: "break;" ]; Nilrewriterulesinfo() -> [view_gen_rewritedefs_other_c: "\vgoto kc_rewrite_default\r; " { gl_rewrite_goto_used = true; } ]; // MPi 20030926: This is the old new rule that doesn't apply anymore, I believe. // Consrewriterulesinfo( Rewriteruleinfo( Conspatternrepresentation( *, Conspatternrepresentation(rep=PRUserPredicate( NilCexpression() ), Nilpatternrepresentation())), bindings, RewriteClause( *, t) ), * ) // MPi: This is a very old rule that probably always functioned as a catch for // possibly empty patterns which should never happen (not before, not now). // Consrewriterulesinfo( Rewriteruleinfo( Nilpatternrepresentation(), bindings, RewriteClause( *, t) ), * ) -> [view_gen_rewritedefs_default_c view_gen_rewritedefs_other_c: { assertionFailed("Completely empty rewrite pattern not possible."); } ]; // we skip the first predicate, it will be for the outermost operator that // is already handled as we jumped to the right virtual function // MPi 20030926 matching Consrewriterulesinfo(Rewriteruleinfo(...)) instead of // just Rewriteruleinfo (and normal list unparse) is unnecessary except for the // "dropped pattern" stuff which is superseded by the overlap-detection. Consrewriterulesinfo( Rewriteruleinfo( Conspatternrepresentation(rep, Nilpatternrepresentation()), bindings, RewriteClause( *, t) ), r_rri ) // Very short predicate: no condition at all -> [view_gen_rewritedefs_default_c view_gen_rewritedefs_other_c: { if(g_options.linedirec) } ${ pg_line rep->line " \"" { PRINT(g_options.dir_line.c_str()); } rep->file:view_filename "\"\n" $} " { KC_TRACE_REWRITE_MATCH(kc_current_view, \"" rep->file "\", " rep->line ", this); " bindings:view_rw_bindings { if(g_options.linedirec) } ${ pg_line t->line " \"" { PRINT(g_options.dir_line.c_str()); } t->file:view_filename "\"\n" $} { if(g_options.rw_loop) } ${ " " gl_phylum " kc_result = " t "; " g_emptystring:view_printer_outputfileline " KC_TRACE_REWRITE_RESULT(kc_current_view,\"" t->file "\"," t->line ",kc_result); return kc_result; " $} { else } ${ { if(g_options.smart_pointer) } ${ " " gl_phylum "_ptr kc_result = " t "; " g_emptystring:view_printer_outputfileline " KC_TRACE_REWRITE_RESULT(kc_current_view,\"" t->file "\"," t->line ",kc_result); return (kc_result() == this ? this : kc_result->rewrite( kc_current_view_base ))->return_ptr(); " $} { else } ${ " " gl_phylum " kc_result = " t "; " g_emptystring:view_printer_outputfileline " KC_TRACE_REWRITE_RESULT(kc_current_view,\"" t->file "\"," t->line ",kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); " $} $} " } " // drop the tail, cannot match anyway // but warn if the rest is not empty { if (g_options.warn_drop_identical_patterns) with (r_rri) { Nilrewriterulesinfo(): { /* EMPTY - that's OK */ } Consrewriterulesinfo(*, *): { foreach(rri; rewriterulesinfo $0) { warn_drop_identical_pattern(rri); } } } } ]; Consrewriterulesinfo( Rewriteruleinfo( Conspatternrepresentation( rep, r_p ), bindings, RewriteClause( *, t) ), r_rri) -> [view_gen_rewritedefs_default_c view_gen_rewritedefs_other_c: { gl_bindings.clear(); } bindings:view_predicate_bindings { if(g_options.linedirec) } ${ pg_line rep->line " \"" { PRINT(g_options.dir_line.c_str()); } rep->file:view_filename "\"\n" $} " if ((" r_p:view_rw_predicates ")) { KC_TRACE_REWRITE_MATCH(kc_current_view, \"" rep->file "\", " rep->line ", this); " bindings:view_rw_bindings // g_emptystring:view_printer_outputfileline { if(g_options.linedirec) } ${ pg_line t->line " \"" { PRINT(g_options.dir_line.c_str()); } t->file:view_filename "\"\n" $} { if(g_options.rw_loop) } ${ " " gl_phylum " kc_result = " t "; " g_emptystring:view_printer_outputfileline " KC_TRACE_REWRITE_RESULT(kc_current_view,\"" t->file "\"," t->line ",kc_result); return kc_result; " $} { else } ${ { if(g_options.smart_pointer) } ${ " " gl_phylum "_ptr kc_result = " t "; " g_emptystring:view_printer_outputfileline " KC_TRACE_REWRITE_RESULT(kc_current_view,\"" t->file "\"," t->line ",kc_result); return (kc_result() == this ? this : kc_result->rewrite( kc_current_view_base ))->return_ptr(); " $} { else } ${ " " gl_phylum " kc_result = " t "; " g_emptystring:view_printer_outputfileline " KC_TRACE_REWRITE_RESULT(kc_current_view,\"" t->file "\"," t->line ",kc_result); return (const_cast(kc_result) == this) ? this : kc_result->rewrite( kc_current_view_base ); " $} $} " } else " r_rri ]; /* withcases stuff */ /* we do not skip the first predicate, because in first try we don't use a switch */ Nilwithcasesinfo() -> [view_gen_withcases_and_default: { if (inforeachcontext.top()) } ${ "{/* EMPTY */ /*skip: no matching pattern in foreach patterns*/} " $} { else if ( (strcmp( gl_return_type, "" ) == 0) || ((gl_star_count == 0) && (! f_isphylum( gl_return_ID )) && (! f_is_known_ptr_type( gl_return_ID )) ) ) } ${ "kc_no_default_in_with( \"" gl_function "\", __LINE__, __FILE__ ); " $} { else } ${ "{ kc_no_default_in_with( \"" gl_function "\", __LINE__, __FILE__ ); return static_cast<" gl_return_type { charruns star_string = Stars()->set(gl_star_count); } star_string ">(0); } " $} ]; Conswithcasesinfo( Withcaseinfo( Nilpatternrepresentation(), bindings, ct ), * ), /* special case for 'outermost wildcard' - shouldn't be triggered */ Conswithcasesinfo( Withcaseinfo( Conspatternrepresentation( PRDefault(), * ), bindings, ct ), * ), Conswithcasesinfo( Withcaseinfo( Conspatternrepresentation( PRUserPredicate( NilCexpression() ), * ), bindings, ct ), * ) -> [: "{ " { if(g_options.linedirec) } ${ pg_line ct->line " \"" { PRINT(g_options.dir_line.c_str()); } ct->file:view_filename "\"\n" $} bindings:view_wc_bindings { if(g_options.linedirec) } ${ pg_line ct->line " \"" { PRINT(g_options.dir_line.c_str()); } ct->file:view_filename "\"\n" $} ct:view_gen_initializephyla_c g_emptystring:view_printer_outputfileline "} " ]; Conswithcasesinfo( Withcaseinfo( p , bindings, ct ), r_rri) -> [: { gl_bindings.clear(); } bindings:view_predicate_bindings { if(g_options.linedirec) } ${ pg_line ct->line " \"" { PRINT(g_options.dir_line.c_str()); } ct->file:view_filename "\"\n" $} " if ((" p:view_wc_predicates ")) { " { if(g_options.linedirec) } ${ pg_line ct->line " \"" { PRINT(g_options.dir_line.c_str()); } ct->file:view_filename "\"\n" $} bindings:view_wc_bindings { operatorstack.push( f_operatorofpatternrepresentation( p ) ); } { if(g_options.linedirec) } ${ pg_line ct->line " \"" { PRINT(g_options.dir_line.c_str()); } ct->file:view_filename "\"\n" $} ct:view_gen_initializephyla_c { operatorstack.pop(); } g_emptystring:view_printer_outputfileline " } else " r_rri ]; /* pattern stuff */ Conspatternrepresentation( p, Nilpatternrepresentation() ) -> [view_rw_predicates view_wc_predicates view_unp_predicates: p ]; Conspatternrepresentation( p, r_p ) -> [view_rw_predicates view_wc_predicates view_unp_predicates: p ") && (" r_p ]; Conspatternrepresentation( PRUserPredicate( cexpr ), Nilpatternrepresentation() ) -> [view_rw_predicates view_wc_predicates view_unp_predicates: { gl_outer_view=kc_current_view; } "KC_TRACE_PROVIDED((" cexpr:view_gen_user_predicates "), \""cexpr->file"\", "cexpr->line", this)" ]; Conspatternrepresentation( PRUserPredicate( cexpr ), r_p ) -> [view_rw_predicates view_wc_predicates view_unp_predicates: { gl_outer_view=kc_current_view; } r_p ") && KC_TRACE_PROVIDED((" cexpr:view_gen_user_predicates "), \""cexpr->file"\", "cexpr->line", this" ]; PRNonLeafBinding( p, id, * ), PRBinding( p, id ) -> [: ${ { ID gl_type; if ($0->type->eq( f_emptyId())) { gl_type = f_typeof( p ); } else { gl_type = $0->type; } } { if(g_options.linedirec) } ${ pg_line id->line " \"" { PRINT(g_options.dir_line.c_str()); } id->file:view_filename "\"\n" $} " const " gl_type " " id " = " { with (p) { Nilpath(): { } Conspath(*, r_p): { r_p->unparse(kc_printer, view_gen_cast); } } } p "; " $} ]; PRNonLeafBinding( p, Id(Str(id)), * ), PRBinding( p, Id(Str(id)) ) -> [view_predicate_bindings: { gl_bindings[id->name]=p; } ]; Nilpath() -> [: /* EMPTY */ ]; /* special case for start of withcase pattern. because we do not skip the * first operator (no switch) we have to place the Nilpath in this place * Also, because the first Conspath contains the expression number, * we special-case this, such that we get 'selvar_exprnumber' as var name. */ Conspath( i, Nilpath() ) -> [view_wc_bindings view_wc_predicates: { ID selvar = cf_topselvar(); } selvar "_" i ]; Nilpath() -> [view_unp_bindings view_unp_predicates: "this/**/" ]; Conspath( i, r_p ) -> [view_gen_cast: { bool isnotlist = f_listelementphylum(f_phylumofoperator($0->op))->eq(f_emptyId()); if(isnotlist) } ${ "phylum_castop:view_class_of_op "*>" $} "(" r_p ]; Conspath( i, r_p=Nilpath() ) -> [view_unp_bindings view_unp_predicates: { argument gl_argument = f_argumentofoperator( r_p->op, Int( i )); } // "this->" usually is a no-op; sometimes scope contains locals of same name "this->" gl_argument { gl_argument->free(false); } ]; Conspath( i, r_p ) -> [: r_p ")->" { argument gl_argument = f_argumentofoperator( r_p->op, Int( i )); } gl_argument { gl_argument->free(false); } ]; // special case for start of rewrite path. because we skip the first operator that is in // the virtual function call we always have a Conspath in a rewrite pattern representation Nilpath() -> [view_rw_bindings view_rw_predicates: { if (gl_args->is_nil() || g_options.rw_loop) } ${ "this" $} { else } ${ "(((" gl_args:view_gen_rewritedefs_dotestarg_c ")) ? this : " gl_operator "(" gl_args:view_gen_rewritedefs_args_c "))" $} ]; Conspath( i, r_p=Nilpath() ) -> [view_rw_bindings view_rw_predicates: { argument gl_argument = f_argumentofoperator( r_p->op, Int( i )); } { if (!g_options.rw_loop) } ${ "l_" $} gl_argument { gl_argument->free(false); } ]; PRVarPredicate( ps, *, * ) -> [: ps ]; Nilpaths() -> [: /* EMPTY */ ]; Conspaths(*, Nilpaths()) -> [: /* EMPTY */ ]; Conspaths(p1=Conspath(*, r_p1), Conspaths(p2=Conspath(*, r_p2), Nilpaths())) -> [: r_p1:view_gen_cast p1"->eq(" r_p2:view_gen_cast p2 ")" ]; Conspaths(p1=Conspath(*, r_p1), pp1=Conspaths(p2=Conspath(*, r_p2), *)) -> [: r_p1:view_gen_cast p1"->eq(" r_p2:view_gen_cast p2 ")) && (" pp1 ]; /* strip leading/trailing 0 from the Oper path */ PROperPredicate( *, * ) -> [view_unp_predicates: " true " ]; PROperPredicate( Conspath( *, p=Conspath(*, r_p)), id ) -> [view_unp_predicates: r_p:view_gen_cast p "->prod_sel() == sel_" id ]; PROperPredicate( Nilpath(), * ) -> [view_unp_predicates: /* EMPTY */ ]; PROperPredicate( Conspath( *, p=Conspath(*, r_p)), id ) -> [: r_p:view_gen_cast p "->prod_sel() == sel_" id ]; PROperPredicate( Nilpath(), * ) -> [: /* EMPTY */ ]; PRDefault(), PRWildcard( * ) -> [: "1 /*default*/" ]; PRStringLiteral( p=Conspath(*, r_p), Cexprdq ) -> [: { if ((strcmp( f_strofID( f_typeof( p ) ), "casestring" ) == 0) || (strcmp( f_strofID( f_typeof( p ) ), "nocasestring" ) == 0)) ${ } "kc_strcmp(" r_p:view_gen_cast p "->name, kc_t(\"" Cexprdq "\"))==0" { $} else ${ /* internal error */ assertionFailed("String literal type neither casestring nor nocasestring"); $} } ]; PRIntLiteral( p=Conspath(*, r_p), i ) -> [: "(" r_p:view_gen_cast p ")->value == " i ]; TVariable( id ) -> [: id ]; TOperator( id, t ) -> [: id "(" t ")" ]; TMethod( t, id, ts) -> [: t "->" id "(" ts ")" ]; TMethodDot( t, id, ts) -> [: t "." id "(" ts ")" ]; TMemberVar( t, id) -> [: t "->" id ]; TMemberVarDot( t, id) -> [: t "." id ]; TCTerm( Cexpr ) -> [: Cexpr ]; TStringLiteral( str ) -> [: "\"" str "\"" ]; TIntLiteral( i ) -> [: i ]; Nilterms() -> [: /* EMPTY */ ]; Consterms( t, Nilterms() ) -> [: t ]; Consterms( t, r_t ) -> [: r_t ", " t ]; /***************************************************************************/ Consbaseclass_list( head, Nilbaseclass_list()) -> [: "public " head:view_gen_fn_pointer_name ]; Consbaseclass_list( head, tail) -> [: tail ", public " head:view_gen_fn_pointer_name ]; /***************************************************************************/ Nilfndeclarations() -> [view_gen_fnk_h: /* EMPTY */ ]; Consfndeclarations( fnd, r_fnds ) -> [view_gen_fnk_h: r_fnds fnd ]; /* All global functions except main processed */ FnAcDeclaration( fn_ds, fn_d, *, *, *, *, GlobalFn() ) -> [view_gen_fnk_h: fn_ds " " fn_d:view_gen_fn_pointer_name " (" $0->sorted "); " ]; /* All functions ignored, except global functions excluding "main" */ FnAcDeclaration( *, *, *, *, *, Id(Str("main")), GlobalFn() ), FnAcDeclaration( *, *, *, *, *, *, StaticFn( * ) ), FnAcDeclaration( *, *, *, *, *, *, MemberFn() ), FnAcDeclaration( *, *, *, *, *, *, ConstructorFn() ), FnAcDeclaration( *, *, *, *, *, *, DestructorFn() ), FnAcDeclaration( *, *, *, *, *, *, ConvOperatorFn() ) -> [view_gen_fnk_h: /* EMPTY */ ]; AcMemberDeclaration( *, *, *, *) -> [: /* EMPTY */ ]; /***************************************************************************/ Nilfndeclarations() -> [view_gen_fnkdecls_c: " #ifndef KC_TRACE_PROVIDED #define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND #endif " ]; Consfndeclarations( fnd, r_fnds ) -> [view_gen_fnkdecls_c: r_fnds fnd ]; /* All non-static functions ignored */ FnAcDeclaration( *, *, *, *, *, *, GlobalFn() ), FnAcDeclaration( *, *, *, *, *, *, MemberFn() ), FnAcDeclaration( *, *, *, *, *, *, ConstructorFn() ), FnAcDeclaration( *, *, *, *, *, *, DestructorFn() ), FnAcDeclaration( *, *, *, *, *, *, ConvOperatorFn() ) -> [view_gen_fnkdecls_c: /* EMPTY */ ]; /* All static functions processed */ FnAcDeclaration( fn_ds, fn_d, *, *, *, *, fn_c=StaticFn( * ) ) -> [view_gen_fnkdecls_c: fn_c fn_ds " " fn_d:view_gen_fn_pointer_name " (" $0->sorted "); " ]; Nilfndeclarations() -> [view_gen_fnk_c: /* EMPTY */ ]; Consfndeclarations( fnd, r_fnds ) -> [view_gen_fnk_c: r_fnds fnd ]; GlobalFn() -> [view_gen_fnk_c: /* EMPTY */ ]; StaticFn( * ) -> [: "static " ]; FnAcDeclaration( fn_ds, fn_d=AcDeclarator(*,*, AcQualifiedDeclProto(*,AcDirectDeclId(oid),params,*)), *, *, *, *, fnc=ConstructorFn() ), FnAcDeclaration( fn_ds, fn_d=AcDeclarator(*,*, AcQualifiedDeclProto(*,AcDirectDeclId(oid),params,*)), *, *, *, *, fnc=DestructorFn() ) -> [view_gen_member_dcl_h: { bool is_ctor=false; with(fnc) { ConstructorFn(): { is_ctor=true; } default: {} } } fn_ds " " { if(!is_ctor) PRINT("~"); } fn_d:view_gen_fn_pointer_name "(" { arguments args=f_argumentsofoperator(oid); if(is_ctor) } ${ args:view_count_args { if (f_ispredefinedphylum(f_phylumofoperator(oid))) } ${ args:view_gen_fnarg_and_decls_predef $} { else } ${ args:view_gen_fnarg_and_decls $} { if(gl_no_of_args && !f_no_params(params)) { PRINT(","); } } params:view_gen_fnk_h $} "); " ]; FnAcDeclaration( *, fn_d, *, *, *, *, ConvOperatorFn() ) -> [view_gen_member_dcl_h: fn_d ]; FnAcDeclaration( fn_ds, fn_d, *, *, *, *, * ) -> [view_gen_member_dcl_h: fn_ds " " fn_d ]; AcMemberDeclaration( fn_ds, fn_d, *, *) -> [view_gen_member_dcl_h: fn_ds " " fn_d "; " ]; AcMemberDecl( *, id, idxs ) -> [view_gen_member_dcl_h: id idxs ]; AcConvOperatorDecl( *, id ) -> [view_gen_member_dcl_h: "operator " id ]; Consac_constant_expression_list( head, Nilac_constant_expression_list() ) -> [view_gen_base_init_expression_list: head ]; Consac_constant_expression_list( head, tail ) -> [view_gen_base_init_expression_list: tail "," head ]; Consac_constant_expression_list( head, tail ) -> [: tail "[" head "]" ]; AcQualifiedDeclProto(*,id, args, opt_const) -> [view_gen_member_dcl_h: id "(" args ")" opt_const "; " ]; AcParDeclDecl( ds, d, Noac_constant_expression() ) -> [view_gen_member_dcl_h: ds " " d ]; AcParDeclDecl( ds, d, Yesac_constant_expression(expr) ) -> [view_gen_member_dcl_h: ds " " d "=" expr ]; AcParDeclAbsdecl( ds, ad, Noac_constant_expression() ) -> [view_gen_member_dcl_h: ds " " ad ]; AcParDeclAbsdecl( ds, ad, Yesac_constant_expression(expr) ) -> [view_gen_member_dcl_h: ds " " ad "=" expr ]; AcMemberDeclaration( fn_ds, fn_d, Noac_constant_expression() , StaticFn(*)) -> [view_gen_fnk_c: { if(g_options.linedirec) } ${ pg_line $0->last_line " \"" { PRINT(g_options.dir_line.c_str()); } $0->file:view_filename "\"\n" $} fn_ds " " fn_d "; " ]; AcMemberDeclaration( fn_ds, fn_d, Yesac_constant_expression( expr ) , StaticFn(*)) -> [view_gen_fnk_c: { if(g_options.linedirec) } ${ pg_line $0->last_line " \"" { PRINT(g_options.dir_line.c_str()); } $0->file:view_filename "\"\n" $} fn_ds " " fn_d "=" expr "; " ]; AcMemberDeclaration( *, *, Noac_constant_expression() , *) -> [view_gen_fnk_c: ]; AcMemberDecl( clid, id, idxs ) -> [view_gen_fnk_c view_gen_fn_pointer_name: clid:view_gen_fn_pointer_name "::" id idxs ]; AcConvOperatorDecl( clid, id ) -> [view_gen_fnk_c view_gen_fn_pointer_name: clid:view_gen_fn_pointer_name "::operator " id ]; FnAcDeclaration( fn_ds, fn_d, *, *, ct, fn_name, fnc ) -> [view_gen_fnk_c: { gl_return_ID = f_ID_of_ac_declaration_specifiers( fn_ds ); gl_return_type = f_strofID( gl_return_ID ); gl_star_count = f_stars_of_declarator( fn_d ); gl_function = f_strofID( fn_name ); if (strcmp(gl_function, "main")==0) PRINT("} // namespace kc\n"); } fnc fn_ds " " fn_d:view_gen_fn_pointer_name "(" $0->sorted ")" fn_d:view_gen_opt_const "\n" { if(g_options.linedirec) } ${ pg_line ct->line " \"" { PRINT(g_options.dir_line.c_str()); } ct->file:view_filename "\"\n" $} "{" ct:view_gen_initializephyla_c "\n" { if(g_options.linedirec) } ${ pg_line $0->last_line " \"" { PRINT(g_options.dir_line.c_str()); } $0->file:view_filename "\"\n" $} "}" g_emptystring:view_printer_outputfileline " " { gl_return_type = ""; gl_return_ID = 0; gl_star_count = 0; if (strcmp(gl_function, "main")==0) PRINT("namespace kc {\r\n"); gl_function = ""; } ]; FnAcDeclaration( fn_ds, fn_d, *, *, ct, fn_name, fnc=ConvOperatorFn() ) -> [view_gen_fnk_c: { gl_return_ID = 0; gl_return_type = ""; gl_star_count = f_stars_of_declarator( fn_d ); gl_function = f_strofID( fn_name ); } fn_d:view_gen_fn_pointer_name "()" fn_d:view_gen_opt_const "\n" { if(g_options.linedirec) } ${ pg_line ct->line " \"" { PRINT(g_options.dir_line.c_str()); } ct->file:view_filename "\"\n" $} "{" ct:view_gen_initializephyla_c "\n" { if(g_options.linedirec) } ${ pg_line $0->last_line " \"" { PRINT(g_options.dir_line.c_str()); } $0->file:view_filename "\"\n" $} "}" g_emptystring:view_printer_outputfileline " " { gl_return_type = ""; gl_return_ID = 0; gl_star_count = 0; gl_function = ""; } ]; FnAcDeclaration( fn_ds, fn_d=AcDeclarator(*,*, AcQualifiedDeclProto(*,AcDirectDeclId(oid),params,*)), *, base_init, ct, *, fnc=ConstructorFn() ), FnAcDeclaration( fn_ds, fn_d=AcDeclarator(*,*, AcQualifiedDeclProto(*,AcDirectDeclId(oid),params,*)), *, base_init, ct, *, fnc=DestructorFn() ) -> [view_gen_fnk_c: { gl_return_ID = 0; gl_return_type = ""; gl_star_count = f_stars_of_declarator( fn_d ); gl_function = f_strofID(f_id_of_ctor_dtor_decl(fn_d)); gl_operator=oid; bool is_ctor=false; with(fnc) { ConstructorFn(): { is_ctor=true; } default: {} } } fn_d:view_gen_fn_pointer_name "::" { if(!is_ctor) { PRINT("~"); } } fn_d:view_gen_fn_pointer_name "(" { arguments args=f_argumentsofoperator(oid); if(is_ctor) } ${ args:view_count_args { if (f_ispredefinedphylum(f_phylumofoperator(oid))) } ${ args:view_gen_fnarg_and_decls_predef $} { else } ${ args:view_gen_fnarg_and_decls $} { if(gl_no_of_args && !f_no_params(params)) { PRINT(","); } } $0->sorted $} ")" base_init "\n" { if(g_options.linedirec) } ${ pg_line ct->line " \"" { PRINT(g_options.dir_line.c_str()); } ct->file:view_filename "\"\n" $} "{" { if(is_ctor) } ${ { if (f_ispredefinedphylum(f_phylumofoperator(oid))) } ${ args:view_gen_assignments_predef $} { else if(The_abstract_phylum_decl->subphylum(0)->eq(oid)) } ${ { if(g_options.smart_pointer) } ${ "_ref=0; " $} $} { else } ${ args:view_gen_assignments $} $} ct:view_gen_initializephyla_c "\n" { if(g_options.linedirec) } ${ pg_line $0->last_line " \"" { PRINT(g_options.dir_line.c_str()); } $0->file:view_filename "\"\n" $} "}" g_emptystring:view_printer_outputfileline " " { gl_return_type = ""; gl_return_ID = 0; gl_star_count = 0; gl_function = ""; } ]; AcYesBaseInit( base_init_list ) -> [view_gen_fnk_c: ":" base_init_list ]; AcYesBaseInit( * ) -> [: ]; AcNoBaseInit() -> [: ]; Consac_base_init_list( head, Nilac_base_init_list() ) -> [view_gen_fnk_c: head ]; Consac_base_init_list( head, tail ) -> [view_gen_fnk_c: tail "," head ]; AcBaseInit( id, expr ) -> [view_gen_fnk_c: id:view_gen_fn_pointer_name "(" expr:view_gen_base_init_expression_list ")" ]; AcDeclaration( ds, idlo ) -> [: ds " " idlo "; " ]; Consac_declaration_list( h, t ) -> [: t h ]; Consac_declaration_specifiers( h, Nilac_declaration_specifiers() ) -> [: h ]; Consac_declaration_specifiers( h, t ) -> [: t " " h ]; AcAuto() -> [: "auto" ]; AcRegister() -> [: "register" ]; AcStatic() -> [view_gen_member_dcl_h: "static" ]; AcExtern() -> [: "extern" ]; AcTypedef() -> [: "typedef" ]; AcVirtual() -> [view_gen_fnk_c: ]; AcVirtual() -> [: "virtual" ]; AcTypeSpec( i ) -> [: i ]; AcConst() -> [: "const" ]; AcVolatile() -> [: "volatile" ]; AcUnsigned() -> [: "unsigned" ]; Consac_init_declarator_list( h , t ) -> [: t " " h ]; Consac_init_declarator_list( h, Nilac_init_declarator_list() ) -> [: h ]; AcInitDecl( d ) -> [: d ]; AcDeclarator( po, rr, dd ) -> [: po rr dd ]; AcDirectDeclId( i ) -> [: i ]; AcDirectDeclPack( d ) -> [: "(" d ")" ]; AcDirectDeclArray( dd, ceo ) -> [: dd "[" ceo "]" ]; AcDirectDeclProto( dd, ptl ) -> [: dd "(" ptl ")" ]; AcQualifiedDeclProto( qq, id, ptl , oc) -> [: qq id "(" ptl ")" oc ]; AcOperatorDeclId( id ) -> [: "operator " id ]; Consac_class_qualifier_list( head, tail ) -> [: tail head "::" ]; Nopointer() -> [: /* EMPTY */ ]; Yespointer( p ) -> [: p ]; AcPointerNil( Nilac_type_qualifier_list() ) -> [: "*" ]; AcPointerNil( tql ) -> [: "* " tql " " ]; AcPointerCons( Nilac_type_qualifier_list(), p ) -> [: "*" p ]; AcPointerCons( tql, p ) -> [: "* " tql " " p ]; AcRef() -> [: "&" ]; AcNoRef() -> [: /* EMPTY */ ]; Consac_type_qualifier_list( h, Nilac_type_qualifier_list() ) -> [: h ]; Consac_type_qualifier_list( h, t ) -> [: t " " h ]; AcParList( pl ) -> [: pl ]; /* AcParList( Nilac_parameter_list() ) -> [: "void" ]; */ AcParList3Dot( pl ) -> [: pl " ..." ]; Consac_parameter_list( h, Nilac_parameter_list() ) -> [: h ]; Consac_parameter_list( h, t ) -> [: t ", " h ]; AcParDeclDecl( ds, d, Noac_constant_expression() ) -> [view_gen_fnk_h view_gen_fnkdecls_c: ds " " d ]; AcParDeclDecl( ds, d, Yesac_constant_expression(expr) ) -> [view_gen_fnk_h view_gen_fnkdecls_c: ds " " d "=" expr]; AcParDeclDecl( ds, d, * ) -> [: ds " " d ]; AcParDeclAbsdecl( ds, ad, Noac_constant_expression() ) -> [view_gen_fnk_h view_gen_fnkdecls_c: ds " " ad ]; AcParDeclAbsdecl( ds, ad, Yesac_constant_expression(expr) ) -> [view_gen_fnk_h view_gen_fnkdecls_c: ds " " ad "=" expr]; AcParDeclAbsdecl( ds, ad, * ) -> [: ds " " ad ]; Consac_identifier_list( h, Nilac_identifier_list() ) -> [: h ]; Consac_identifier_list( h, t ) -> [: t ", " h ]; AcAbsdeclPointer( p ) -> [: p ]; AcAbsdeclDirdecl( po, dad ) -> [: po dad ]; Yesac_direct_abstract_declarator( dad ) -> [: dad ]; AcDirAbsdeclPack( ad ) -> [: "(" ad ")" ]; AcDirAbsdeclArray( dado, ceo ) -> [: dado "[" ceo "]" ]; AcDirAbsdeclFn( dado, ptl ) -> [: dado "(" ptl ")" ]; AcConstExpr( ce ) -> [: ce:view_gen_initializephyla_c ]; AcDeclarator( po, rr, dd ) -> [view_gen_fn_pointer_name: po rr dd ]; AcDirectDeclProto( dd, * ) -> [view_gen_fn_pointer_name: dd ]; AcQualifiedDeclProto( dd, id, *, * ) -> [view_gen_fn_pointer_name: dd id ]; id=Id( uniqId = Str(s) ) -> [view_gen_fn_pointer_name: { if(f_ispredefinedphylum(id) && strncmp(s->name, "abstract_", 9)!=0) } ${ "impl_" uniqId "_" { UNPARSE(f_operatorofphylum(id, 1)); } $} { else if(f_isphylum(id)) } ${ "impl_" uniqId $} { else if(f_alternativeofoperator(id)) } ${ { UNPARSE(f_phylumofoperator(id)); } "_" uniqId $} { else } ${ uniqId $} ]; AcDeclarator( *, *, dd ) -> [view_gen_opt_const: dd ]; AcDirectDeclProto( *, * ) -> [view_gen_opt_const: ]; AcQualifiedDeclProto( *, *, *, co ) -> [view_gen_opt_const: co ]; AcParList( Nilac_parameter_list() ) -> [view_gen_fnkargs: ]; AcParList3Dot( pl ) -> [view_gen_fnkargs: pl ]; AcParDeclDecl( *, d, * ) -> [view_gen_fnkargs: d ]; AcParDeclAbsdecl( *, ad, * ) -> [view_gen_fnkargs: ad ]; AcDeclarator( *, *, dd ) -> [view_gen_fnkargs: dd ]; AcDirectDeclPack( d ) -> [view_gen_fnkargs: d ]; AcDirectDeclArray( dd, * ) -> [view_gen_fnkargs: dd ]; AcDirectDeclProto( dd, * ) -> [view_gen_fnkargs: dd ]; AcAbsdeclPointer( * ) -> [view_gen_fnkargs: "kc_arg_missing" ]; AcAbsdeclDirdecl( *, dad ) -> [view_gen_fnkargs: dad ]; AcDirAbsdeclPack( ad ) -> [view_gen_fnkargs: ad ]; AcDirAbsdeclArray( dado, * ) -> [view_gen_fnkargs: dado ]; AcDirAbsdeclFn( dado, * ) -> [view_gen_fnkargs: dado ]; AcQualifiedDeclProto( *, dd, *, *) -> [view_gen_fnkargs: dd ]; AcParList( Nilac_parameter_list() ) -> [view_gen_fnkdecls: ]; AcParList3Dot( pl ) -> [view_gen_fnkdecls: pl ]; Consac_parameter_list( h, Nilac_parameter_list() ) -> [view_gen_fnkdecls: h ";" ]; Consac_parameter_list( h, t ) -> [view_gen_fnkdecls: t "\n" h ";" ]; AcParDeclDecl( ds, d, Noac_constant_expression() ) -> [view_gen_fnkdecls: ds " " d ]; AcParDeclDecl( ds, d, Yesac_constant_expression(expr) ) -> [view_gen_fnkdecls: ds " " d "=" expr]; AcParDeclAbsdecl( ds, ad, Noac_constant_expression() ) -> [view_gen_fnkdecls: ds " " ad ]; AcParDeclAbsdecl( ds, ad, Yesac_constant_expression(expr) ) -> [view_gen_fnkdecls: ds " " ad "=" expr]; AcDeclarator( po, rr, dd ) -> [view_gen_fnkdecls: po rr dd ]; AcDirectDeclId( i ) -> [view_gen_fnkdecls: i ]; AcDirectDeclPack( d ) -> [view_gen_fnkdecls: "(" d ")" ]; AcDirectDeclArray( dd, ceo ) -> [view_gen_fnkdecls: dd "[" ceo "]" ]; AcDirectDeclProto( dd, * ) -> [view_gen_fnkdecls: dd "()" ]; AcAbsdeclPointer( p ) -> [view_gen_fnkdecls: p " kc_arg_missing" ]; AcAbsdeclDirdecl( p, dad ) -> [view_gen_fnkdecls: p dad ]; AcQualifiedDeclProto( Nilac_class_qualifier_list(),dd, *, *) -> [view_gen_fnkdecls: dd "()" ]; AcQualifiedDeclProto( *, *, *, *) -> [view_gen_fnkdecls: ]; /***************************************************************************/ PhylumDeclarations( * ) -> [view_gen_fns_start_h: { string printablefilename = f_make_identifier_basename( g_options.hfilename ); } "/* translation of file \"" pg_filename "\" */ /* generated by: * " kimwitu_copyright " */ #ifndef KC_FUNCTIONS_" printablefilename "_HEADER #define KC_FUNCTIONS_" printablefilename "_HEADER #include \"" { PRINT(g_options.prefix.c_str()); } "k.h\" // in case a user forgets " ]; PhylumDeclarations( * ) -> [view_gen_fns_end_h: { string printablefilename = f_make_identifier_basename( g_options.hfilename ); } " #endif // ! KC_FUNCTIONS_" printablefilename "_HEADER " ]; /***************************************************************************/ PhylumDeclarations( * ) -> [view_gen_fns_start_c: { string printablefilename = f_make_identifier_basename( g_options.ccfilename ); } "/* translation of file \"" pg_filename "\" */ /* generated by: * " kimwitu_copyright " */ #define KC_FUNCTIONS_" printablefilename " " { if(g_options.stdafx!="") { PRINT("#include \""); PRINT(g_options.stdafx.c_str()); PRINT("\"\n"); } } " #include #include \"" { PRINT(g_options.prefix.c_str()); } "k.h\" " ]; PhylumDeclarations( * ) -> [view_gen_fns_owninclude_c: "#include \"" { PRINT(g_options.hfilename.c_str()); } "\" " ]; /***************************************************************************/ /***************************************************************************/ PhylumDeclarations( * ) -> [view_gen_unpk_h: "/* translation of file(s)\n" Thefnfiles " */ /* generated by: * " kimwitu_copyright " */ #ifndef KC_UNPARSE_HEADER #define KC_UNPARSE_HEADER " ]; PhylumDeclarations( pds ) -> [view_gen_unparsedecls_h: { if(pg_languageshavebeendefined) } ${ "\n" "#ifndef is_language\n" "#define is_language(L) kc_language==kc_language_##L\n" "#endif\n\n" "#ifndef set_language\n" "#define set_language(L) kc_language=kc_language_##L\n" "#endif\n\n" "extern char** kc_language;\n" Thelanguages $} " /* Use uviews instead extern char *kc_view_names[]; */ " Theuviewnames:view_uview_class_def " void unparse(abstract_phylum kc_p, printer_functor kc_printer, uview kc_current_view); void unparse(void *kc_p, printer_functor kc_printer, uview kc_current_view); void unparse(int kc_v, printer_functor kc_printer, uview kc_current_view); void unparse(double kc_v, printer_functor kc_printer, uview kc_current_view); void unparse(kc_char_t *kc_v, printer_functor kc_printer, uview kc_current_view); void unparse(kc_string_t kc_v, printer_functor kc_printer, uview kc_current_view); #define PRINT(string) kc_printer(string,kc_current_view) #define UNPARSE(node) node->unparse(kc_printer,kc_current_view) " ]; Nilviewnames() -> [view_gen_rewritek_h view_gen_unparsedecls_h view_uview_def: /* EMPTY */ ]; Consviewnames( vn, Nilviewnames()) -> [view_gen_unparsedecls_h: "\t" vn ]; Consviewnames( vn, r_vn) -> [view_gen_unparsedecls_h: r_vn ",\n\t" vn ]; Consviewnames( vn, r_vn) -> [view_gen_rewritek_h: r_vn vn "_enum" ",\n\t" ]; Consviewnames( vn, r_vn) -> [view_uview_def: r_vn vn "_enum" ",\n\t" ]; node=Consviewnames( vn, r_vn) -> [view_uview_class_def: r_vn { if(!node->is_extern) } ${ "struct " { if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } } vn "_class: uview_class { "vn"_class():uview_class("vn"_enum){} }; extern "vn"_class "vn"; " $} { else } ${ "class " { if(g_options.dllexports!="") { PRINT(g_options.dllexports.c_str()); PRINT(" "); } } vn "_baseclass: public uview_class { \rprotected:\v "vn"_baseclass():uview_class("vn"_enum){} }; // class " vn "_class is defined externally " $} ]; PhylumDeclarations( * ) -> [view_gen_end_unpk_h: "#endif // KC_UNPARSE_HEADER " ]; /***************************************************************************/ PhylumDeclarations( * ) -> [view_gen_unpk_c: "/* translation of file(s)\n" Thefnfiles " */ /* generated by: * " kimwitu_copyright " */ #define KC_UNPARSE " { if(g_options.stdafx!="") { PRINT("#include \""); PRINT(g_options.stdafx.c_str()); PRINT("\"\n"); } } " #include #include #include #include \"" { PRINT(g_options.prefix.c_str()); } "k.h\" #include \"" { PRINT(g_options.prefix.c_str()); } "unpk.h\" " $0:view_open_namespace Theuviewnames:view_gen_viewvars_c " impl_uviews uviews[] = { " Theuviewnames " {0,0} }; " { if(pg_languageshavebeendefined) } ${ "\n" "#ifndef LANG_TEXT\n" "#define LANG_TEXT(i) kc_language[i]\n" "#endif\n\n" $} ]; Nilviewnames() -> [view_gen_rewritek_c view_gen_unpk_c view_gen_viewvars_c: /* EMPTY */ ]; node=Consviewnames( vn, r_vn) -> [view_gen_unpk_c view_gen_rewritek_c: r_vn { if(!node->is_extern) } ${ "{\"" vn "\",&" vn "}, " $} {else} ${ "{\"" vn "\", 0}, " $} ]; node=Consviewnames( vn, Nilviewnames()) -> [view_gen_viewvars_c : { if(!node->is_extern) } ${ vn "_class " vn "; " $} ]; node=Consviewnames( vn, r_vn) -> [view_gen_viewvars_c : r_vn { if(!node->is_extern) } ${ vn "_class " vn "; " $} ]; /***************************************************************************/ PhylumDeclarations( * ) -> [view_gen_default_types_unpk_c: " #ifndef KC_TRACE_PROVIDED #define KC_TRACE_PROVIDED(COND,FILE,LINE,NODE) COND #endif void impl_abstract_phylum::unparse(printer_function opf, uview uv) { printer_functor_function_wrapper pf(opf); do_unparse(pf, uv); } // Everything given as a pointer is expected to have an unparse-method (we // believe it's a phylum), unless there's a specialisation for it void unparse(abstract_phylum kc_p, printer_functor kc_printer, uview kc_current_view) { kc_p->unparse(kc_printer, kc_current_view); } void unparse(void *kc_p, printer_functor kc_printer, uview kc_current_view) { // MPi: 20020628 there shouldn't be any left assertionFailed(\"Unparse called for untyped pointer\"); // MPi: cast should be unnecessary, but there are still void* reinterpret_cast(kc_p)->unparse(kc_printer, kc_current_view); } void unparse(int kc_v, printer_functor kc_printer, uview kc_current_view) { kc_char_t kc_string[200]; kc_print_integer(kc_string, kc_v); kc_printer(kc_string, kc_current_view); } void unparse(double kc_v, printer_functor kc_printer, uview kc_current_view) { kc_char_t kc_string[200]; kc_print_real(kc_string, kc_v); kc_printer(kc_string, kc_current_view); } void unparse(kc_char_t *kc_v, printer_functor kc_printer, uview kc_current_view) { kc_printer(kc_v, kc_current_view); } void unparse(kc_string_t kc_v, printer_functor kc_printer, uview kc_current_view) { kc_printer(kc_v.c_str(), kc_current_view); } " g_emptystring:view_printer_outputfileline { assertReason(!g_options.no_unparse, "shouldn't create unpk.cc when not even generating unparse stuff"); /* MPi 20021009 */ } { if (!g_options.no_unparse) } ${ "void impl_abstract_phylum::default_unparse(printer_functor kc_printer, uview kc_current_view) { register int no_sons = operator_info[prod_sel()].no_sons; for (int i=0; i < no_sons; i++) subphylum(i)->unparse(kc_printer, kc_current_view); } void impl_casestring__Str::do_unparse(printer_functor kc_printer, uview kc_current_view) { kc::unparse(name, kc_printer, kc_current_view); } void impl_nocasestring_NoCaseStr::do_unparse(printer_functor kc_printer, uview kc_current_view) { kc::unparse(name, kc_printer, kc_current_view); } void impl_integer__Int::do_unparse(printer_functor kc_printer, uview kc_current_view) { kc::unparse(value, kc_printer, kc_current_view); } void impl_real__Real::do_unparse(printer_functor kc_printer, uview kc_current_view) { kc::unparse(value, kc_printer, kc_current_view); } void impl_voidptr__VoidPtr::do_unparse(printer_functor kc_printer, uview kc_current_view) { kc::unparse(pointer, kc_printer, kc_current_view); } " $} ]; PhylumDeclarations( pds ) -> [view_gen_unparsedefs_c: pds ]; Consphylumdeclarations( pd, rpds ) -> [view_gen_unparsedefs_c: rpds pd ]; Nilphylumdeclarations() -> [view_gen_unparsedefs_c: /* EMPTY */ ]; PhylumDeclaration( *, *, PredefinedAlternatives( * ), * ), PhylumDeclaration( *, *, Emptyproductionblock(), * ) -> [view_gen_unparsedefs_c: /* EMPTY */ ]; PhylumDeclaration( id, *, pb, * ) -> [view_gen_unparsedefs_c: { ID selvar = Id(Str(mkcasestring("this"))); /*cf_pushselvar( selvar );*/ dollarvarstack.push( selvar ); dollarvarextstack.push( f_emptyId() ); gl_phylum = id; } pb { gl_phylum = 0; /*cf_popselvar();*/ dollarvarstack.pop(); dollarvarextstack.pop(); } ]; PredefinedAlternatives( * ) -> [view_gen_unparsedefs_c: /* EMPTY */ ]; NonlistAlternatives( a ) -> [view_gen_unparsedefs_c: a ]; /////////////////////////////////////////// // Generation of *::unparse functions ListAlternatives( Consalternatives(consa=Alternative(consid,*), Consalternatives(nila=Alternative(nilid,*), *)), * ) ->[ view_gen_unparsedefs_c: // For the tail, ie the recursion, it is critical not to call another function // to keep the stack smaller. This might also enable tail recursion elimination // for some very clever compiler. "void impl_" gl_phylum "::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { if(is_nil()) nil_do_unparse(kc_printer, kc_current_view_base); else switch(kc_current_view_base) { " { unparseviewsinfo a_unparseviewsinfo = f_unparseviewsinfo_of_alternative( consa, Theuviewnames ); gl_operator = consid; } a_unparseviewsinfo:view_gen_unparsedefs_c " } } void impl_" gl_phylum "::nil_do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { " { freespineandelements(a_unparseviewsinfo); a_unparseviewsinfo = f_unparseviewsinfo_of_alternative( nila, Theuviewnames ); gl_operator = nilid; } a_unparseviewsinfo:view_gen_unparsedefs_c " } } " { freespineandelements(a_unparseviewsinfo); } ]; Alternative(oid, *) -> [view_gen_unparsedefs_c: { unparseviewsinfo a_unparseviewsinfo = f_unparseviewsinfo_of_alternative( $0, Theuviewnames ); gl_phylum = f_phylumofoperator(oid); gl_operator = oid; gl_unparse_goto_used = false; } g_emptystring:view_printer_outputfileline "void impl_" gl_phylum "_" oid "::do_unparse(printer_functor kc_printer, uview kc_current_view_base) { switch(kc_current_view_base) { " a_unparseviewsinfo:view_gen_unparsedefs_c " } } " { freespineandelements(a_unparseviewsinfo); gl_phylum = 0; } ]; // This cleans out the list and its elements, but _not_ the subphyla // of all the elements (as a_unparseviewsinfo->free(true) would). void freespineandelements(unparseviewsinfo a_unparseviewsinfo) { abstract_phylum kc_p = a_unparseviewsinfo; while(kc_p) { if (kc_p->subphylum(0)) kc_p->subphylum(0)->free(false); kc_p = kc_p->subphylum(1); }; a_unparseviewsinfo->freelist(); } void freespineandelements(rewriteviewsinfo a_rewriteviewsinfo) { abstract_phylum kc_p = a_rewriteviewsinfo; while(kc_p) { if (kc_p->subphylum(0)) kc_p->subphylum(0)->free(false); kc_p = kc_p->subphylum(1); }; a_rewriteviewsinfo->freelist(); } %{ KC_UNPARSE // Definition of the view class for view_gen_unparsedefs_default_c; // it contains an additional var to indicate whether we are unparsing a list pylum // and another to show whether the user has supplied rules for the base view struct view_gen_unparsedefs_default_c_class :view_gen_unparsedefs_default_c_baseclass { bool isList; bool isOnlyDefault; view_gen_unparsedefs_default_c_class(bool LonL, bool oD): isList(LonL), isOnlyDefault(oD) { } }; view_gen_unparsedefs_default_c_class view_gen_unparsedefs_default_c(false, false); %} Nilunparseviewsinfo() -> [view_gen_unparsedefs_c: /* EMPTY */ ]; /* * IMPORTANT we unparse the viewsinfo in reverse order, to make sure that * the kc_unparsing_label is used before defined, ie. * the default view is the last in the switch * so that we can set a variable when we generate a goto, * so that we only generate the label if necessary */ Consunparseviewsinfo( a_uvi, r_uvi ) -> [view_gen_unparsedefs_c: r_uvi a_uvi ]; Unparseviewinfo( Id(Str(v)), * ) -> [view_gen_unparsedefs_c: { if ( strcmp(v->name, "base_uview" )==0 ) } ${ $0:view_gen_unparsedefs_default_c $} { else } ${ $0:view_gen_unparsedefs_other_c $} ]; Unparseviewinfo( v, udi ) -> [view_gen_unparsedefs_default_c: g_emptystring:view_printer_outputfileline " default: " { if (gl_unparse_goto_used) } ${ " kc_unparsing_default: " $} " case " v "_enum: { uview kc_current_view=kc_current_view_base; " // If the user has not supplied any rules for the base view, // it is possible to use a more efficient default later on { bool onlyDefault; with (udi) { Nilunparsedeclsinfo(): { onlyDefault = true; } default: { onlyDefault = false; } } } %uviewvar view_gen_unparsedefs_default_c vgudcD(/* is list ? */ false, onlyDefault); udi:vgudcD " break; } " ]; Unparseviewinfo( *, Nilunparsedeclsinfo() ) -> [view_gen_unparsedefs_other_c: /* EMPTY */ ]; Unparseviewinfo( v, udi ) -> [view_gen_unparsedefs_other_c: " case " v "_enum: { "v"_class& kc_current_view=static_cast<"v"_class&>(kc_current_view_base); " udi " break; } " ]; Nilunparsedeclsinfo() -> [view_gen_unparsedefs_other_c: "\vgoto kc_unparsing_default\r; " { gl_unparse_goto_used = true; } ]; Nilunparsedeclsinfo() -> [view_gen_unparsedefs_default_c: { phylumdeclaration phydecl = f_lookupdecl( gl_phylum ); if ( phydecl == 0 ) } ${ { v_report(NonFatal( FileLine( gl_phylum->file, gl_phylum->line ), Problem1S1ID( "internal error: could not find declaration of phylum:", gl_phylum ))); } $} { else } ${ phydecl $} ]; PhylumDeclaration( *, *, PredefinedAlternatives( * ), * ), PhylumDeclaration( *, *, Emptyproductionblock(), * ) -> [view_gen_unparsedefs_default_c: /* EMPTY */ ]; PhylumDeclaration( *, *, ListAlternatives( *, * ), * ) -> [view_gen_unparsedefs_default_c: { alternative a = f_alternativeofoperator(gl_operator); } %uviewvar view_gen_unparsedefs_default_c vgudcL(/* is list ? */ true, kc_current_view.isOnlyDefault); a:vgudcL ]; PhylumDeclaration( *, *, NonlistAlternatives( * ), * ) -> [view_gen_unparsedefs_default_c: { alternative a = f_alternativeofoperator(gl_operator); } a ]; Alternative( *, args ) -> [view_gen_unparsedefs_default_c: " { " args " } " ]; Consarguments( tail, Consarguments( head, Nilarguments())) provided (kc_current_view.isList && kc_current_view.isOnlyDefault) -> [view_gen_unparsedefs_default_c: // Unparsing lists can be done iteratively if the user has not provided // any rules for the base view - this is much better on resources (stack) " for (" tail " iterator_ = this; iterator_->" tail "_1 != 0; iterator_ = iterator_->" tail "_1) \viterator_->" head "_1->unparse(kc_printer, kc_current_view);\r " ]; Consarguments( a, rargs ) provided (kc_current_view.isList && !kc_current_view.isOnlyDefault) -> [view_gen_unparsedefs_default_c: // Whenever we want to unparse something which is the same operator as the one already // handled, we can call the private do_unparse method. That's particularly good when // unparsing lists, and incidentally that's also the only place where it happens. // (Only for lists can we be sure we are in the same operator (there's only one).) rargs " " a "_" $0->seqnr "->" { if (a->eq(f_phylumofoperator(gl_operator)) && kc_current_view.isList) } ${ "do_" $} "unparse(kc_printer, kc_current_view ); " ]; Consarguments -> [view_gen_unparsedefs_default_c: // Now for the non-list phyla. These can be extended with phylum-wide // unparse methods, therefore we call the appropriate virtual function. "default_unparse(kc_printer, kc_current_view ); " ]; // we skip the first predicate, it will be for the outermost operator that // is already handled as we jumped to the right virtual function // MPi 20030926 matching Consunparsedeclsinfo(Unparsedeclinfo(...)) instead of // just Unparsedeclinfo (and normal list unparse) is unnecessary except for the // "dropped pattern" stuff which is superseded by the overlap-detection. Consunparsedeclsinfo( Unparsedeclinfo( p=Conspatternrepresentation( *, Nilpatternrepresentation()), bindings, uc ), r_udi ) // Very short predicate: no condition at all -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: "{\n" bindings:view_unp_bindings { operatorstack.push( f_operatorofpatternrepresentation( p ) ); } uc { operatorstack.pop(); } "} " // drop the tail, cannot match anyway // but warn if the rest is not empty { if (g_options.warn_drop_identical_patterns) with (r_udi) { Nilunparsedeclsinfo(): { /* EMPTY - that's OK */ } Consunparsedeclsinfo(*, *): { foreach(udi; unparsedeclsinfo $0) { warn_drop_identical_pattern(udi); } } } } ]; Consunparsedeclsinfo( Unparsedeclinfo( p=Conspatternrepresentation( *, r_p ), bindings, uc ), r_udi) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: { gl_bindings.clear(); } bindings:view_predicate_bindings " if ((" r_p:view_unp_predicates ")) { " bindings:view_unp_bindings { operatorstack.push( f_operatorofpatternrepresentation( p ) ); } uc { operatorstack.pop(); } " } else " r_udi ]; UnparseClause( *, ui ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: ui ]; Nilunparseitems() -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: /* EMPTY */ ]; Consunparseitems( a_ui, r_ui ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: r_ui a_ui ]; NoViewname() -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: "kc_current_view" ]; YesViewname( v ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: v ]; UnpStr( *, a_CexpressionDQ, a_vnameopt ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: { ug_viewnameopt = a_vnameopt; } { if(pg_languageshavebeendefined) } ${ { static char buf[10]; static long last_nr=-1; sprintf(buf,"%d",$0->text_nr); } { if(last_nr!=$0->text_nr) } ${ { last_nr=$0->text_nr; } " { kc_printer(LANG_TEXT(" { kc_printer( buf, base_uview ); } "), " a_vnameopt "); }\n" $} $} { else } ${ { kc_printer( "", view_no_of_printed_string_chars_reset ); } " { kc_printer(kc_t(\"" a_CexpressionDQ:view_gen_unpstr_c "\"), " a_vnameopt "); } " $} { ug_viewnameopt = 0; } ]; ConsCexpressionDQ( cedqe, cedq ) -> [view_gen_unpstr_c view_output_collection: cedq cedqe ]; NilCexpressionDQ() -> [view_gen_unpstr_c: /* EMPTY */ ]; CExpressionDQPart( cs ) -> [view_gen_unpstr_c view_output_collection: cs ]; CExpressionDQNl() -> [view_gen_unpstr_c view_output_collection: "\\\n\\n"]; UnpSubexpr(lang, sub, a_vnameopt ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: { ID phy = f_typeofunpsubterm( sub, operatorstack.top() ); } lang "kc::unparse(" sub ", kc_printer, " a_vnameopt "); " ]; UnpSubTerm( st ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: st ]; UnpDollarvarTerm( * ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: $0:view_gen_initializephyla_c ]; UnpSubAttr( st, a_unpattributes ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: st a_unpattributes ]; UnpDollarvarAttr( *, a_unpattributes ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: $0:view_gen_initializephyla_c a_unpattributes ]; UnpCastedVariable( *, a_id ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: a_id ]; UnpCtext(lang, ct ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: lang { if(lang->prod_sel()==sel_LanguageList) } ${ "{\n" $} { if(g_options.linedirec) } ${ pg_line ct->line " \"" { PRINT(g_options.dir_line.c_str()); } ct->file:view_filename "\"\n" $} ct:view_gen_initializephyla_c g_emptystring:view_printer_outputfileline { if(lang->prod_sel()==sel_LanguageList) } ${ "}\n" $} ]; UnpBody(lang, a_unparseitems ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: lang "{ " a_unparseitems " } " ]; UViewVarDecl(type, name,NilCexpression()) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: "\t" type "_class " name "; " ]; UViewVarDecl(type, name, expr) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: "\t" type "_class " name expr:view_gen_initializephyla_c "; " ]; Nilunpattributes() -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: /* EMPTY */ ]; Consunpattributes( a_attr, r_attr ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: r_attr "->" a_attr ]; LanguageList( langs ) -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: "if(" langs ")\n " ]; NoLanguagename() -> [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: /* EMPTY */ ]; Conslanguagenames( id, tail ) -> [ view_gen_unparsedecls_h: tail "extern char* kc_language_" id "[];\n" ] [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: tail " || is_language(" id : base_uview ")" ]; Conslanguagenames( id, Nillanguagenames()) -> [ view_gen_unparsedecls_h: "extern char* kc_language_" id "[];\n" ] [view_gen_unparsedefs_other_c view_gen_unparsedefs_default_c: "is_language(" id : base_uview ")" ]; id=Id(*) -> [ view_output_collection: "char* kc_language_" id : base_uview " [] = {\n" ]; UnpStr(*, expr, *) -> [ view_output_collection: "\t\"" expr "\"" ]; /* this list is already in right order, do not turn */ Consunparseitems(head, tail) -> [ view_output_collection: head " " tail ]; Consunparseitems(head, Nilunparseitems()) -> [ view_output_collection: head ]; Nilunparseitems() -> [ view_output_collection: "\t\"\"" ]; %{ KC_UNPARSE // To avoid covariant return types for broken compilers, we want to have three choices: // Use them, don't use them, generate both and decide with preprocessor macros // extended version: typename also in function name void covariant_choice(ID yest, const char* yess1, const char* yess2, const char *no1, const char *no2, printer_functor kc_printer, uview kc_current_view) { kc_printer("\n", kc_current_view); if (g_options.covariant == 'p') kc_printer("#ifndef NO_COVARIANT_RETURN\n", kc_current_view); if (g_options.covariant != 'n') { yest->unparse(kc_printer, kc_current_view); kc_printer(yess1, kc_current_view); if (yess2!=0) { yest->unparse(kc_printer, kc_current_view); kc_printer(yess2, kc_current_view); } } if (g_options.covariant == 'p') kc_printer("\n#else\n", kc_current_view); if (g_options.covariant != 'y') { kc_printer(no1, kc_current_view); if (no2!=0) { yest->unparse(kc_printer, kc_current_view); kc_printer(no2, kc_current_view); } } if (g_options.covariant == 'p') kc_printer("\n#endif // NO_COVARIANT_RETURN\n", kc_current_view); } // short version: typename exactly once inline void covariant_choice(ID yest, const char* yess, const char *no, printer_functor kc_printer, uview kc_current_view) { covariant_choice(yest, yess, 0, no, 0, kc_printer, kc_current_view); } // This printer functor doesn't print, but instead counts each of // its invocations. Handy to find out whether a future unparsing // will produce any output at all. class count_printer: public printer_functor_class { int count; public: count_printer(): count(0) { } virtual void operator()(const char* s, uview v) { count++;} int operator()() { return count;} }; %} Id(oid) -> [view_class_of_op: { ID pid=f_phylumofoperator($0); if (f_listelementphylum(pid)->eq(f_emptyId())) } ${ pid:view_class_of_phy "_" oid $} { else } ${ pid:view_class_of_phy $} ]; Id(pid) -> [view_class_of_phy: "impl_" pid ]; // vim:sts=4:ts=8:cino=g0,t0,\:0 kimwitu++-2.3.13/src/pat.k0000644000175000017500000010113710753136632013675 0ustar useruser%{ CODE HEADER // // The Termprocessor Kimwitu++ // // Copyright © 1991 University of Twente, Dept TIOS. // Copyright © 1998-2008 Humboldt-Universität zu Berlin, Institute of Informatics // All rights reserved. // // Kimwitu++ 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. // // Kimwitu++ 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 Kimwitu++; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // %} // // pat.k // %{ static char pat_kAccesSid[] = "@(#)$Id: pat.k,v 1.36 2008/02/08 20:37:46 piefel Exp $"; %} /***************************************************************************/ /* * This file contains the code to build the pattern match structures * and generate the appropriate C code from the patterns */ %{ #include "util.h" #include "gutil.h" /* for f_operatorofpatternrepresentation() */ %} /* * NOTE: currently we use functions to construct the pattern internal * structure. We don't use attributes because we only once need to * compute this info (as a synthesized attribute of the outmostpattern) * In the future we may want to use an extended form of unparse rules * (that can handle synthesized attributes, maybe in a yacc-like syntax) * to implement this piece of code. */ /* * we collect two sorts of things: * - bindings of variables to positions in the pattern, * - predicates that tell the structure of the pattern, for matching. */ /* * representation of the patterns: * we represent each branch in the pattern with a list of numbers, * the numbers of the subtrees: 1 = first subtree, 2 = second subtree etc. * 0 = the node itself, used when the node must have a certain operator. * this list is build in reverse order, because it's easier to append in that * way. * attached to these numbers are the operator IDs (in attributes), for unparsing purposes. * In Path(i, rest) is i the i-th argument of rest->op. * We must make sure not to destroy this information (accidently) during copying * of paths (path::reverse most surely destroys this info, because the attributes * are not copied!) */ patternrepresentations syn_patternchains(patternchains $a_patternchains) { Nilpatternchains(): { return Nilpatternrepresentations(); } Conspatternchains( a_patternchain, r_patternchains ): { return Conspatternrepresentations( syn_patternchain( a_patternchain, Nilpath() ), syn_patternchains( r_patternchains ) ); } } patternrepresentation syn_patternchain(patternchain $a_patternchain, path a_path) { Nilpatternchain(): { return Nilpatternrepresentation(); } Conspatternchain( *, * ): { return t_syn_patternchain( a_patternchain, a_path, a_patternchain->length()); } } static patternrepresentation t_syn_patternchain(patternchain $a_patternchain, path a_path, int branch) { Nilpatternchain(): { return Nilpatternrepresentation(); } Conspatternchain( a_patternchainitem, r_patternchain ): { return concat( t_syn_patternchain( r_patternchain, a_path , branch-1 ), syn_patternchainitem( a_patternchainitem, Conspath( mkinteger(branch), a_path ) ) ); } } patternrepresentation syn_patternchainitem(patternchainitem $a_patternchainitem, path a_path) { PatternchainitemOutmost( a_outmostpattern ): { return syn_outmostpattern( a_outmostpattern, a_path ); } PatternchainitemGroup( * ): { v_report( NonFatal( FileLine( a_patternchainitem->file, a_patternchainitem->line ), Problem1S( "Internal Error: PatternchainitemGroup was not handled correctly" ))); return Nilpatternrepresentation(); } PatternchainitemDollarid( id ): { elem_patternrepresentation tmp = PRBinding( a_path, id ); tmp->type = a_patternchainitem->type; return Conspatternrepresentation( tmp, Nilpatternrepresentation() ); } } /* * build list of patternrepresentations in reverse order to get the references in the * same order as the subterms (with 0 for the operator, 1 for first subterm, 2 for second etc) * note that the path is in reverse order. */ patternrepresentations syn_outmostpatterns(outmostpatterns $a_outmostpatterns) { Niloutmostpatterns(): { return Nilpatternrepresentations(); } Consoutmostpatterns( a_outmostpattern, r_outmostpatterns ): { return Conspatternrepresentations( syn_outmostpattern( a_outmostpattern, Nilpath() ), syn_outmostpatterns( r_outmostpatterns ) ); } } void clone_TypeFileLine(elem_patternrepresentation tmp1, outmostpattern a_outmostpattern) { tmp1->type = a_outmostpattern->type; tmp1->file = a_outmostpattern->file; tmp1->line = a_outmostpattern->line; } static patternrepresentation syn_outmostpattern(outmostpattern a_outmostpattern, path a_path) { patternrepresentation result; Cexpression condition; with(a_outmostpattern) { OPOperatorWildcard( id, cond ): { condition = cond; /* added this case to be able to handle variables in foreach statements */ with( id ) { Id( uid ): { with( uid->type ) { ITPatternVariable( *, * ), ITUnknown(): { // generate a binding elem_patternrepresentation tmp1 = PRBinding( a_path, id ); clone_TypeFileLine(tmp1, a_outmostpattern); result = Conspatternrepresentation( tmp1, Nilpatternrepresentation() ); } default: { // generate a matching elem_patternrepresentation tmp1 = PROperPredicate( Conspath( mkinteger(0), a_path ), id ); clone_TypeFileLine(tmp1, a_outmostpattern); a_path->op = id; result = Conspatternrepresentation( tmp1, Nilpatternrepresentation() ); } } } } } OPOperator( id, r_patterns, cond ): { condition = cond; elem_patternrepresentation tmp1 = PROperPredicate( Conspath( mkinteger(0), a_path ), id ); clone_TypeFileLine(tmp1, a_outmostpattern); a_path->op = id; result = Conspatternrepresentation( tmp1, syn_patterns( r_patterns, a_path ) ); } OPNonLeafVariable( id, r_pattern ): { condition = NilCexpression(); /* NEED to set a_path-> op to something useful */ /* or, better alternative, 'patch' it later when we have done all? */ elem_patternrepresentation tmp1 = PRNonLeafBinding( a_path, id, syn_outmostpattern( r_pattern, Nilpath()) ); a_path->id = f_phylumofpatternID(id); clone_TypeFileLine(tmp1, a_outmostpattern); result = Conspatternrepresentation( tmp1, syn_outmostpattern( r_pattern, a_path ) ); } OPDefault( cond ): { condition = cond; elem_patternrepresentation tmp1 = PRDefault(); clone_TypeFileLine(tmp1, a_outmostpattern); result = Conspatternrepresentation( tmp1, Nilpatternrepresentation() ); } OPWildcard( cond ): { condition = cond; elem_patternrepresentation tmp1 = PRWildcard( a_path ); clone_TypeFileLine(tmp1, a_outmostpattern); result = Conspatternrepresentation( tmp1, Nilpatternrepresentation() ); } } if (!condition->is_nil()) result->append(PRUserPredicate(condition)); return result; } static patternrepresentation syn_pattern(pattern $a_pattern, path a_path) { PVariable( id ): { return Conspatternrepresentation( PRBinding( a_path, id ), Nilpatternrepresentation() ); } POperator( id, r_patterns ): { a_path->op = id; return Conspatternrepresentation( PROperPredicate( Conspath( mkinteger(0), a_path ), id ), syn_patterns( r_patterns, a_path ) ); } PNonLeafVariable( id, r_pattern ): { return Conspatternrepresentation( PRNonLeafBinding( a_path, id, syn_pattern( r_pattern, Nilpath()) ), syn_pattern( r_pattern, a_path ) ); } PWildcard(): { /* we don't add this to the patternreps; as a result, every * PRWildcard comes from an outermost default */ return Nilpatternrepresentation(); } PStringLiteral( cexprdq ): { return Conspatternrepresentation( PRStringLiteral( a_path, cexprdq ), Nilpatternrepresentation() ); } PIntLiteral( i ): { return Conspatternrepresentation( PRIntLiteral( a_path, i ), Nilpatternrepresentation() ); } } static patternrepresentation syn_patterns(patterns $a_patterns, path a_path) { Nilpatterns(): { return Nilpatternrepresentation(); } Conspatterns( *, * ): { return t_syn_patterns( a_patterns, a_path , a_patterns->length( ) ); } } static patternrepresentation t_syn_patterns(patterns $a_patterns, path a_path, int branch) { Nilpatterns(): { return Nilpatternrepresentation(); } Conspatterns( a_pattern, r_patterns ): { return concat( t_syn_patterns( r_patterns, a_path , branch-1 ), syn_pattern( a_pattern, Conspath( mkinteger(branch), a_path ) ) ); } } /* * the above code should build the list of bindings and predicates... * To this list additional predicates should be added for the * variables that occur in it more than once. * Then the list should be ordered, taking care of expanding thingsd like * * a * / \ * b O1 * | * O2 * | * b=O3 * | * c * * * This should be changed into * * a * / \ * O3=b O1 * | | * c O2 * | * b=O3 * | * c * * to be sure that we get the right order of matching... */ /* HOWEVER, WE DO NOT YET BOTHER ABOUT THIS PROBLEM RIGHT Now we only collect/create the binding_predicates for multiple occurrences of the same idenfier in a pattern */ /* * administration of binding marks */ %{ bindingidmarks Thebindingidmarks = 0; %} %{ KC_TYPES_HEADER extern bindingidmarks Thebindingidmarks; %} bindingidmarks {uniq}: list bindingidmark ; bindingidmark {uniq}: BindingIdMark( uniqID ) { bool marked = false; { if (! Thebindingidmarks) Thebindingidmarks = Consbindingidmarks( $0, Nilbindingidmarks() ); else Thebindingidmarks = Consbindingidmarks( $0, Thebindingidmarks ); } } ; bool f_bindingidmarked(ID $id) { Id( uid ): { return BindingIdMark( uid )->marked; } } void v_markbindingid(ID $id) { Id( uid ): { BindingIdMark( uid )->marked = true; } } void v_resetbindingidmarks() { if (Thebindingidmarks) { foreach( m; bindingidmarks Thebindingidmarks ) { m->marked = false; } } } /* code to create the predicates for multiple bindings of the same identifier */ /* * add_predicates and add_predicate * walks through the list of pattern_representations. * for each pattern representation: * if it is a Binding (leaf or non-leaf): * - if it is marked, * - if it isn't marked, mark it, start make_predicates for this variable and the rest of the list * go to next pattern_representation in the list */ patternrepresentations add_predicates_to_patternrepresentations(patternrepresentations $a_patternreps) { Nilpatternrepresentations(): { return Nilpatternrepresentations(); } Conspatternrepresentations( a_patternrep, r_patternreps ): { patternrepresentation tmp; v_resetbindingidmarks(); /* necessary! - or we generate wrong code */ tmp = add_predicates( a_patternrep ); return Conspatternrepresentations( concat( a_patternrep, tmp ), add_predicates_to_patternrepresentations( r_patternreps ) ); } } static patternrepresentation add_predicates(patternrepresentation $a_patternrep) { Nilpatternrepresentation(): { return Nilpatternrepresentation(); } Conspatternrepresentation( a_pattern_rep_elem, r_patternrep ): { patternrepresentation tmp_for_elem, tmp_for_rest; /* WARNING: the order of the next two statements is _very_ important! * (because of the side-effect: marking of identifiers. * If they are reversed, * the identifiers would get marked 'from the end of the list', * (i.e. in add_predicates) and then the add_predicate call * would not generate any predicate... * ) */ tmp_for_elem = add_predicate( a_pattern_rep_elem, r_patternrep ); tmp_for_rest = add_predicates( r_patternrep ); return concat( tmp_for_elem, tmp_for_rest ); } } static patternrepresentation add_predicate(elem_patternrepresentation $a_patternrep_elem, patternrepresentation a_patternrep) { PRBinding( *, id ), PRNonLeafBinding( *, id, * ): { if (! f_bindingidmarked( id )) { v_markbindingid( id ); return make_predicates( a_patternrep_elem, a_patternrep ); } else { return Nilpatternrepresentation(); } } default: { return Nilpatternrepresentation(); } } /* * t_make_predicates and make_predicates * create a PRVarPredicate for the variable (identifier) and the list of pattern_representations, * but only if the variable occurs more than once (ie. the pattern is not left_linear) * the left_linear parameter in t_make_predicates keeps track of this */ static patternrepresentation t_make_predicates(ID a_id, paths a_paths, patternrepresentation a_subpattern, patternrepresentation $a_patternrep, bool left_linear) { Nilpatternrepresentation(): { if (left_linear) { return Nilpatternrepresentation(); } else { elem_patternrepresentation pred = PRVarPredicate(a_paths, a_id, a_subpattern); pred->file = a_id->file, pred->line = a_id->line; return Conspatternrepresentation( pred, Nilpatternrepresentation() ); } } Conspatternrepresentation( aps_patternrep_elem, r_apatternrep ): { with( aps_patternrep_elem ) { PRBinding( aps_path, aps_id ): { if ( a_id->eq( aps_id )) { return t_make_predicates( a_id, Conspaths( aps_path, a_paths ), a_subpattern, r_apatternrep, false ); } else { return t_make_predicates( a_id, a_paths, a_subpattern, r_apatternrep, left_linear ); } } PRNonLeafBinding( aps_path, aps_id, aps_subpattern ): { if ( a_id->eq( aps_id )) { if ( test_matching_subpatterns( aps_subpattern, a_subpattern ) ) { return t_make_predicates( a_id, Conspaths( aps_path, a_paths ), concat( aps_subpattern, a_subpattern ), r_apatternrep, false ); } else { return t_make_predicates( a_id, a_paths, a_subpattern, r_apatternrep, false ); } } else { return t_make_predicates( a_id, a_paths, a_subpattern, r_apatternrep, left_linear ); } } /* other cases shouldn't happen */ default: { return t_make_predicates( a_id, a_paths, a_subpattern, r_apatternrep, left_linear ); } } } } static patternrepresentation make_predicates(elem_patternrepresentation $a_patternrep_elem, patternrepresentation a_patternrep) { PRBinding( a_path, a_id ): { return t_make_predicates( a_id, Conspaths( a_path, Nilpaths()), Nilpatternrepresentation(), a_patternrep, true ); } PRNonLeafBinding( a_path, a_id, a_subpattern ): { return t_make_predicates( a_id, Conspaths( a_path, Nilpaths()), a_subpattern, a_patternrep, true ); } /* other cases shouldn't happen */ } /* * routine that can be used to test for certain properties, eg. to * test if patterns that follow (are below) non-leaf variables are * 'identical' * We can use this later on. For now we don't use it... always return true */ static bool test_matching_subpatterns(patternrepresentation newp, patternrepresentation oldp) { return true; } void v_add_rewriterulesinfo_to_operator(patternrepresentations a_patternreps, rewriteclauses rc) { foreach( a_patternrep; patternrepresentations a_patternreps ) { ID op = f_operatorofpatternrepresentation( a_patternrep ); if (! op->eq( f_emptyId() )) { alternative a = f_alternativeofoperator(op); if (a) { foreach( r; rewriteclauses rc ) { /* maybe we want to use an insert function to keep the rewriterulesinfo sorted */ a->rewriteinfo = insertin_rewriterulesinfo( Rewriteruleinfo( f_get_predicates( a_patternrep ), f_get_bindings( a_patternrep ), r ), a->rewriteinfo ); } } } } } withcasesinfo f_withcasesinfo(patternrepresentations a_patternreps, Ctext ct) { withcasesinfo tmp = Nilwithcasesinfo(); foreach( a_patternrep; patternrepresentations a_patternreps ) { with( a_patternrep ) { Nilpatternrepresentation(): {/*EMPTY*/} Conspatternrepresentation( /*a_patternrep_elem*/ *, /*r_patternrep*/ * ): { tmp = insertin_withcasesinfo( Withcaseinfo( f_get_predicates( a_patternrep ), f_get_bindings( a_patternrep ), ct ), tmp ); } } } return tmp; } void v_add_unparsedeclsinfo_to_operator(patternrepresentations a_patternreps, unparseclauses uc) { foreach( a_patternrep; patternrepresentations a_patternreps ) { ID op = f_operatorofpatternrepresentation( a_patternrep ); if (! op->eq( f_emptyId() )) { alternative a = f_alternativeofoperator(op); if (a) { foreach( u; unparseclauses uc ) { /* maybe we want to use an insert function to keep the unparserulesinfo sorted */ a->unparseinfo = insertin_unparsedeclsinfo( Unparsedeclinfo( f_get_predicates( a_patternrep ), f_get_bindings( a_patternrep ), u ), a->unparseinfo ); } } } } } /* * these functions can be rewritten in a split_function that returns a tuple of predicates and * bindings so that we only once walk through the list */ static patternrepresentation f_get_predicates(patternrepresentation $a_patternrep) { Nilpatternrepresentation(): { return Nilpatternrepresentation(); } Conspatternrepresentation( a_patternrep_elem, r_patternrep ): { with( a_patternrep_elem ) { PRBinding( *, * ), PRNonLeafBinding( *, *, * ): { return f_get_predicates( r_patternrep ); } default: { return Conspatternrepresentation( a_patternrep_elem, f_get_predicates( r_patternrep ) ); } } } } static patternrepresentation f_get_bindings(patternrepresentation a_patternrep) { patternrepresentation p; v_resetbindingidmarks(); p = f_do_get_bindings( a_patternrep ); v_resetbindingidmarks(); return p; } static patternrepresentation f_do_get_bindings(patternrepresentation $a_patternrep) { Nilpatternrepresentation(): { return Nilpatternrepresentation(); } Conspatternrepresentation( a_patternrep_elem, r_patternrep ): { with( a_patternrep_elem ) { PRBinding( *, id ), PRNonLeafBinding( *, id, * ): { if (! f_bindingidmarked( id )) { v_markbindingid( id ); return Conspatternrepresentation( a_patternrep_elem, f_do_get_bindings( r_patternrep ) ); } else { return f_do_get_bindings( r_patternrep ); } } default: { return f_do_get_bindings( r_patternrep ); } } } } // // Insert new rewrite rule into list of existing rules // static rewriterulesinfo insertin_rewriterulesinfo(rewriteruleinfo new_rule, rewriterulesinfo $old_rules) { Nilrewriterulesinfo(): { return Consrewriterulesinfo( new_rule, old_rules ); } Consrewriterulesinfo( head_rule, rest_rules ): { if (lt_rewriteruleinfo( head_rule, new_rule )) { return Consrewriterulesinfo( head_rule, insertin_rewriterulesinfo( new_rule, rest_rules )); } else { return Consrewriterulesinfo( new_rule, old_rules ); } } } static bool lt_rewriteruleinfo(rewriteruleinfo $a_rwruleinfo1, rewriteruleinfo $a_rwruleinfo2) { Rewriteruleinfo( a_patternrep1, *, * ) & Rewriteruleinfo( a_patternrep2, *, * ): { return lt_patternrepresentation( a_patternrep1, a_patternrep2 ); } } // // Insert new with case into list of existing cases // withcasesinfo insertin_withcasesinfo(withcaseinfo new_case, withcasesinfo $old_cases) { Nilwithcasesinfo(): { return Conswithcasesinfo( new_case, old_cases ); } Conswithcasesinfo( head_case, rest_cases ): { if (lt_withcaseinfo( head_case, new_case )) { return Conswithcasesinfo( head_case, insertin_withcasesinfo( new_case, rest_cases )); } else { return Conswithcasesinfo( new_case, old_cases ); } } } bool lt_withcaseinfo(withcaseinfo $a_withcaseinfo1, withcaseinfo $a_withcaseinfo2) { Withcaseinfo( a_patternrep1, *, * ) & Withcaseinfo( a_patternrep2, *, * ): { return lt_patternrepresentation( a_patternrep1, a_patternrep2 ); } } // // Insert new unparse declaration into list of existing declarations // static unparsedeclsinfo insertin_unparsedeclsinfo(unparsedeclinfo new_decl, unparsedeclsinfo $old_decls) { Nilunparsedeclsinfo(): { return Consunparsedeclsinfo( new_decl, old_decls ); } Consunparsedeclsinfo( head_decl, rest_decls ): { if (lt_unparsedeclinfo( head_decl, new_decl )) { return Consunparsedeclsinfo( head_decl, insertin_unparsedeclsinfo( new_decl, rest_decls )); } else { return Consunparsedeclsinfo( new_decl, old_decls ); } } } static bool lt_unparsedeclinfo(unparsedeclinfo $a_unparsedeclinfo1, unparsedeclinfo $a_unparsedeclinfo2) { Unparsedeclinfo( a_patternrep1, *, * ) & Unparsedeclinfo( a_patternrep2, *, * ): { return lt_patternrepresentation( a_patternrep1, a_patternrep2 ); } } // // The bodies of some patterns are simply dropped when they cannot match. // ATM this happens only for some patterns without real conditions, and // all these are also diagnosed with the new pattern overlap code. void warn_drop_identical_pattern(rewriteruleinfo $rri) { Rewriteruleinfo(pr, *, *): { warn_drop_identical_pattern(pr); } } void warn_drop_identical_pattern(withcaseinfo $wci) { Withcaseinfo(pr, *, *): { warn_drop_identical_pattern(pr); } } void warn_drop_identical_pattern(unparsedeclinfo $udi) { Unparsedeclinfo(pr, *, *): { warn_drop_identical_pattern(pr); } } void warn_drop_identical_pattern(patternrepresentation $pr) { Conspatternrepresentation(epr, *): { v_report(Warning(FileLine( epr->file, epr->line ), Problem1S("Warning: dropped pattern"))); } default: { assertionFailed("Dropping empty pattern"); } } // // Compare two patterns // using their flattened patternrepresentation // static bool lt_patternrepresentation(patternrepresentation pr1, patternrepresentation pr2) { foreach(p1 & p2; patternrepresentation pr1, patternrepresentation pr2) { with( equal_elem_patternrepresentation(p1, p2) ) { Smaller(): { return true; } Bigger(): { return false; } default: { /* continue */ } } } afterforeach ($re1 & $re2) { // Both patterns are of the same specificity; not lt in this weak order Nilpatternrepresentation & Nilpatternrepresentation, Nilpatternrepresentation & *: { return false; } * & Nilpatternrepresentation(): { return true; } } } // Compare two elements of a pattern; Smaller means 'more specific' // // PRStringLiteral=PRIntLiteral=PROperPredicate < PRVarPredicate < all others static tribool equal_elem_patternrepresentation(elem_patternrepresentation $a_patternrep_elem1, elem_patternrepresentation $a_patternrep_elem2) { PRDefault() & PRDefault(), PRUserPredicate( * ) & PRUserPredicate( * ): { return Equal(); } PRVarPredicate( a_paths1, *, * ) & PRVarPredicate( a_paths2, *, * ): { return equal_paths( a_paths1, a_paths2 ); } PROperPredicate( a_path1, * ) & PROperPredicate( a_path2, * ), PRWildcard( a_path1 ) & PRWildcard( a_path2 ), PRBinding( a_path1, * ) & PRBinding( a_path2, * ), PRNonLeafBinding( a_path1, *, * ) & PRNonLeafBinding( a_path2, *, * ), PRStringLiteral( a_path1, * ) & PRStringLiteral( a_path2, * ), PRIntLiteral( a_path1, * ) & PRIntLiteral( a_path2, * ), PRStringLiteral( a_path1, * ) & PROperPredicate( a_path2, * ), PROperPredicate( a_path1, * ) & PRStringLiteral( a_path2, * ), PRIntLiteral( a_path1, * ) & PROperPredicate( a_path2, * ), PROperPredicate( a_path1, * ) & PRIntLiteral( a_path2, * ), PRStringLiteral( a_path1, * ) & PRIntLiteral( a_path2, * ), PRIntLiteral( a_path1, * ) & PRStringLiteral( a_path2, * ): { return equal_path( a_path1, a_path2 ); } PRStringLiteral( *, * ) & PRVarPredicate( *, *, * ): { return Smaller(); } PRVarPredicate( *, *, * ) & PRStringLiteral( *, * ): { return Bigger(); } PRIntLiteral( *, * ) & PRVarPredicate( *, *, * ): { return Smaller(); } PRVarPredicate( *, *, * ) & PRIntLiteral( *, * ): { return Bigger(); } PROperPredicate( *, * ) & PRVarPredicate( *, *, * ): { return Smaller(); } PRVarPredicate( *, *, * ) & PROperPredicate( *, * ): { return Bigger(); } PRWildcard( * ) & PRDefault(): { return Smaller(); } PRDefault() & PRWildcard( * ): { return Bigger(); } * & PRDefault(): { return Smaller(); } PRDefault() & *: { return Bigger(); } * & PRWildcard( * ): { return Smaller(); } PRWildcard( * ) & *: { return Bigger(); } * & PRBinding( *, * ): { return Smaller(); } PRBinding( *, * ) & *: { return Bigger(); } * & PRNonLeafBinding( *, *, * ): { return Smaller(); } PRNonLeafBinding( *, *, * ) & *: { return Bigger(); } * & PRUserPredicate( * ): { return Smaller(); } PRUserPredicate( * ) & *: { return Bigger(); } } static tribool equal_path(path a_path1, path a_path2) { path r_a_path1=a_path1->reverse(), r_a_path2=a_path2->reverse(); tribool ret; bool breakforeach = false; foreach(i1 & i2; path r_a_path1, path r_a_path2) { if (!breakforeach) { if ( i1->value < i2->value ) ret = Smaller(), breakforeach = true; else if (i1->value > i2->value ) ret = Bigger(), breakforeach = true; } } afterforeach ($re1 & $re2) { Nilpath & Nilpath: { ret = breakforeach ? ret : Equal(); } Conspath & Nilpath: { ret = breakforeach ? ret : Smaller(); } Nilpath & Conspath: { ret = breakforeach ? ret : Bigger(); } } r_a_path1->freelist(); r_a_path2->freelist(); return ret; } static tribool equal_paths(paths a_paths1, paths a_paths2) { foreach(path1 & path2; paths a_paths1, paths a_paths2) { with( equal_path( path1, path2 ) ) { Smaller: { return Smaller(); } Bigger: { return Bigger(); } default: { /* continue */ } } } afterforeach ($re1 & $re2) { Nilpaths & Nilpaths: { return Equal(); } Conspaths & Nilpaths: { return Smaller(); } Nilpaths & Conspaths: { return Bigger(); } } } void check_rewrite_patterns(rewriterulesinfo rri) { elem_patternrepresentation outmost_nl = f_outmost_nl_preds_in_rewriterulesinfo(rri); if (outmost_nl) v_report(Warning(FileLine( outmost_nl->file, outmost_nl->line ), Problem1S("Cannot handle outmost non-leaf predicates"))); patternrepresentations prs = Nilpatternrepresentations(); // Extract patterns from info; also turns list, but that doesn't matter foreach(Rewriteruleinfo(pr, *, *); rewriterulesinfo rri) { prs = Conspatternrepresentations(pr, prs); } check_patterns(prs); prs->freelist(); } void check_with_patterns(withcasesinfo wcs) { patternrepresentations prs = Nilpatternrepresentations(), prs_rev; // Extract patterns from info; also turns list, so we turn it back foreach(Withcaseinfo(pr, *, *); withcasesinfo wcs) { prs = Conspatternrepresentations(pr, prs); } prs_rev=prs->reverse(); check_patterns(prs_rev); prs->freelist(); prs_rev->freelist(); } void check_unparse_patterns(unparsedeclsinfo udi) { elem_patternrepresentation outmost_nl = f_outmost_nl_preds_in_unparsedeclsinfo(udi); if (outmost_nl) v_report(Warning(FileLine( outmost_nl->file, outmost_nl->line ), Problem1S("Cannot handle outmost non-leaf predicates"))); patternrepresentations prs = Nilpatternrepresentations(); // Extract patterns from info; also turns list, but that doesn't matter foreach(Unparsedeclinfo(pr, *, *); unparsedeclsinfo udi) { prs = Conspatternrepresentations(pr, prs); } check_patterns(prs); prs->freelist(); } // TODO This function could well use list iterators void check_patterns(patternrepresentations prs) { // No need to check if no or only one pattern if (prs->is_nil() || prs->patternrepresentations_1->is_nil()) return; patternrepresentations iterate = prs; // As long as at least two patterns remain in the list while (!prs->patternrepresentations_1->is_nil()) { foreach(pr2; patternrepresentations prs->patternrepresentations_1) { compare_patterns(prs->patternrepresentation_1, pr2, prs); } prs=prs->patternrepresentations_1; } // Sadly this line would test the whole matrix instead of only half it it // foreach(pr1; patternrepresentations prs) foreach(pr2; patternrepresentations prs) } // TODO This function could well use list iterators patternrepresentation next(patternrepresentation p) { return p->patternrepresentation_1; } elem_patternrepresentation elem(patternrepresentation p) { return p->elem_patternrepresentation_1; } // There are five states: // - two patterns do not intersect (good) // - one is more specific than the other (good, that's two states) // - two patterns are equivalent (bad) // - neither is more specific (bad, but perhaps there is another covering the intersection) void compare_patterns(patternrepresentation pr1, patternrepresentation pr2, patternrepresentations other_patterns) { bool pr1_isMoreSpecific = false, pr2_isMoreSpecific = false; elem_patternrepresentation epr1 = elem(pr1), epr2 = elem(pr2); patternrepresentation i1 = pr1, i2 = pr2, intersection = Nilpatternrepresentation(); while(!(i1->is_nil() || i2->is_nil())) { if (elem(i1)->eq(elem(i2))) { intersection->append(elem(i1)); i1=next(i1); i2=next(i2); } else { with (elem(i1), elem(i2)) { PROperPredicate( a_path1, * ) & PROperPredicate( a_path2, * ), //PRWildcard( a_path1 ) & PRWildcard( a_path2 ), //PRBinding( a_path1, * ) & PRBinding( a_path2, * ), //PRNonLeafBinding( a_path1, *, * ) & PRNonLeafBinding( a_path2, *, * ), PRStringLiteral( a_path1, * ) & PRStringLiteral( a_path2, * ), PRIntLiteral( a_path1, * ) & PRIntLiteral( a_path2, * ), PRStringLiteral( a_path1, * ) & PROperPredicate( a_path2, * ), PROperPredicate( a_path1, * ) & PRStringLiteral( a_path2, * ), PRIntLiteral( a_path1, * ) & PROperPredicate( a_path2, * ), PROperPredicate( a_path1, * ) & PRIntLiteral( a_path2, * ), PRStringLiteral( a_path1, * ) & PRIntLiteral( a_path2, * ), PRIntLiteral( a_path1, * ) & PRStringLiteral( a_path2, * ): { with(equal_path( a_path1, a_path2 )) { Equal(): { /* Great! Different things in same position, patterns don't intersect. */ return; } Smaller(): { // pr1 has something were pr2 hasn't, it's more specific pr1_isMoreSpecific=true; intersection->append(elem(i1)); i1=next(i1); } Bigger(): { // pr2 has something were pr1 hasn't, it's more specific pr2_isMoreSpecific=true; intersection->append(elem(i2)); i2=next(i2); } } } * & PRDefault, PRDefault & *: { /* The default is very unspecific */ return; } * & PRWildcard, PRWildcard & *: { /* An outermost wildcard in a with */ return; } PRDefault & PRDefault, PRWildcard & PRWildcard, default: { if(g_options.verbose) { printf("Don't know how to compare these yet:\n"); printf("%s:%d ", epr1->file->name, epr1->line); elem(i1)->print(); printf("%s:%d ", epr2->file->name, epr2->line); elem(i2)->print(); } return; } } } } // while // Test whether we used one list up earlier than the other if (!(i1->is_nil() && i2->is_nil())) { patternrepresentation new_intersect; if (i1->is_nil()) { new_intersect = concat(intersection, i2); pr2_isMoreSpecific = true; } else { new_intersect = concat(intersection, i1); pr1_isMoreSpecific = true; } intersection->freelist(); intersection=new_intersect; } if (!pr1_isMoreSpecific && !pr2_isMoreSpecific) { // Patterns equivalent if (g_options.warn_equivalent_patterns) v_report(Warning(FileLine( epr1->file, epr1->line ), Problem3S1int1S("pattern equivalent to", epr2->file->name, "line", epr2->line, "(will never match)") )); } else if (!pr1_isMoreSpecific || !pr2_isMoreSpecific) { // One is more specific than the other, that's OK return; } else { bool I_had_better = false; foreach(pr; patternrepresentations other_patterns) { if (pr->eq(intersection)) I_had_better = true; } if (!I_had_better && g_options.warn_overlapping_patterns) v_report(Warning(FileLine( epr1->file, epr1->line ), Problem3S1int1S("pattern overlaps", epr2->file->name, "line", epr2->line, "(which will match?)") )); } } // vim:sts=4:ts=8:cino=g0,t0,\:0 kimwitu++-2.3.13/src/errmsg.py0000755000175000017500000001022011135161573014576 0ustar useruser#! /usr/bin/env python # coding=UTF-8 # # The Termprocessor Kimwitu++ # # Copyright © 1998-2009 Humboldt-Universität zu Berlin, Institute of Informatics # All rights reserved. # # Kimwitu++ 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. # # Kimwitu++ 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 Kimwitu++; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # """ This program parses the verbose bison output in order to extract the states and their corresponding rules. For example, the snippet state 328 303 ac_declarator: ac_pointer ac_direct_declarator . 314 ac_direct_declarator: ac_direct_declarator . '[' ac_constant_expression_option ']' 315 | ac_direct_declarator . '(' ac_parameter_type_list ')' is translated to two C arrays int error_rules[][2], error_state[]; These arrays, can be used for error reporting in the generated bison parser. Using the arrays yyrhs and yyr1, the complete text of a rule can be reproduced. The only missing information is the association between (state, (rule number, position of the dot)); it is provided by the aforementioned arrays. error_state gives, for a state, the index into error_rules, which, starting at that index and terminated by {0,0} provides all rule numbers and dot positions. This program is invoked with the name of the bison output foo.output. It then generates a file foo-output.c The following assumptions are made about the input: - the individual state listings start at column 0 with "state" - the rules inside a state have a ":" and start with """ import sys,string,os,re def usage(): print "Usage:%s Y.OUTPUT ERRMSG.C" % sys.argv[0] sys.exit(1) args = sys.argv[1:] if len(args)!=2: print "too many arguments", args usage() base,ext=os.path.splitext(args[0]) if ext!=".output": print args[0],"does not end in .output" usage() states = {} curstate=None for l in open(args[0],"rt").readlines(): if l[:6]=="state " and l[6] in string.digits: curstate = int(l[6:]) states[curstate]=[] continue if curstate is None: # we have not seen state 0, yet continue if l.find(": ") == -1 and l.find("| ") == -1: # inside a state, but this line is not a rule continue if l.find("error")!=-1: # this is an error stabilization rule continue # Now we have a rule. Split off the rule l = l.strip() ruleno, l = int(l[:l.find(" ")]), l[l.find(" "):] # the rule might contain funny characters. Not all are supported, here. # Recent bison versions have correct C characters, but we need strings l=re.sub('"','\\"',l) l = l.split() # The first field may look like "rule:" or "|" now; # in both cases, we ignore it assert l[0] == "|" or l[0][-1:] == ":" l = l[1:] try: # A single character ' ' might have been split into two tokens pos = l.index("'") assert l[pos+1] == "'" # Don't really repair since we do not care for the actual value del l[pos] except ValueError: pass pos = 0 for token in l: if token == ".": break pos += 1 states[curstate].append((ruleno, pos)) out=open(args[1],"w") errstate = [] pos = 0 out.write("int const error_rules[][2]={\n") for i in xrange(0, max(states.keys())+1): errstate.append(pos) for r in states.get(i, [])+[(0,0)]: out.write(" {%4d, %2d}," % r) if pos % 6 == 5: out.write("\n") pos += 1 out.write(" { 0, 0}\n};\n\n") out.write("int error_state[]={\n") for i in range(len(errstate)): out.write("%5d," % errstate[i]) if i % 8 == 7: out.write("\n") out.write(" 0\n};\n") out.close() kimwitu++-2.3.13/INSTALL0000644000175000017500000000133310752407401013166 0ustar useruser =-------------- = = Installation instructions for the Term Processor Kimwitu++ = =-------------- Usually, all you have to do is just a plain ./configure make This will leave an executable kc++ in the top directory of the distribution. Since this is really all you need, there is no 'make install' and such. Just copy the file to a convenient location. There is also documentation in two places. In the directory 'man' you'll find a man page with an ultra-short description of how to invoke kc++, the Kimwitu++ 'compiler.' More documentation is in the doc directory, in DocBook (XML) format, which will be compiled via LaTeX. Do cd doc make to obtain a printable version. More info in the README file. kimwitu++-2.3.13/Makefile.in0000644000175000017500000001053310753334214014206 0ustar useruser# # The Termprocessor Kimwitu++ # # Copyright © 1991 University of Twente, Dept TIOS. # Copyright © 1999-2008 Humboldt-Universität zu Berlin, Institute of Informatics # All rights reserved. # # Kimwitu++ 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. # # Kimwitu++ 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 Kimwitu++; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # # This is the makefile for kc++. # # Usage: make boot [ GENDIR=yourgendirpath ] # will bootstrap kc++ in directory GENDIR, by default set to src/Gen # (when using relative paths, relative to src) # # Usage: make distribution # creates kimwitu*.tar.gz ready for distribution SHELL := /bin/sh prefix = @prefix@ exec_prefix = @exec_prefix@ DESTDIR = bindir = $(DESTDIR)@bindir@ mandir = $(DESTDIR)@mandir@ ARCH := @arch@ GENDIR := Gen @SET_MAKE@ INSTALL = @INSTALL@ UNIVERSAL_BINARY := .PHONY: all boot distribution all: @srcdir@/src/Gen.boot boot boot: cd src && \ $(MAKE) boot GENDIR=$(GENDIR) && \ cp $(GENDIR)/kc++ .. @srcdir@/src/Gen.boot: @echo "Gen.boot doesn't exist." @echo "This probably means you didn't unpack a Kimwitu++ distribution," @echo "but instead just got the source (from CVS, maybe). Please change into" @echo "the src dir and run make there. You will need a running copy of kc++." @false K_FILES := \ abs.X \ gen.X \ gutil.X \ error.X \ main.X \ occur.X \ parse.X \ pat.X \ util.X K_GENS = unpk.X k.X rk.X K_SOURCE := $(K_FILES:%X=%k) K_CFILES := $(K_FILES:%X=%cc) $(K_GENS:%X=%cc) K_HFILES := $(K_FILES:%X=%h) $(K_GENS:%X=%h) K_HFILES += yystype.h defs.h GETOPT_CFILES := getopt.h getopt.c getopt1.c FLEXBISONOUTPUT := kimwl.cc kimwy.cc kimwy.h kimwy.output errmsg.inc FLEXBISONFILES := kimwl.l kimwy.y ERRMSGFILES := errmsg.py AUXFILES := Makefile.in config.h.in TODO ChangeLog VC7FILES := config.h kc.sln kc.vcproj ROOTFILES := Makefile.in configure.ac configure README INSTALL LICENCE COPYING AUTHORS CHANGES install-sh MANDIR := man/man1 MANFILES := kc++.1 DOCDIR := doc DOCSUB := doc/figures doc/formatters DOCFILES := kpp-main.xml kpp-intro.xml kpp-manual.xml kpp-cook.xml kpp-rpn.xml fdl.xml \ formatters/docbook2html.sh formatters/docbook2tex.sh formatters/docbook2tex.xsl \ $(patsubst doc/%,%,$(wildcard doc/figures/*.png) $(wildcard doc/figures/*.fig)) \ developers-reference.xml kc2kc++.tex Makefile DISTDIR := @PACKAGE_TARNAME@-@PACKAGE_VERSION@ distribution dist: @cd src && $(MAKE) distribution @-rm -r $(DISTDIR) @mkdirhier $(DISTDIR)/$(MANDIR) @for i in $(MANFILES); do cp -p $(MANDIR)/$$i $(DISTDIR)/$(MANDIR)/$$i; done @for i in $(DOCSUB); do mkdirhier $(DISTDIR)/$$i; done @for i in $(DOCFILES); do cp -p $(DOCDIR)/$$i $(DISTDIR)/$(DOCDIR)/$$i; done @mkdirhier $(DISTDIR)/src/Gen.boot @for i in $(K_CFILES) $(K_HFILES) $(FLEXBISONOUTPUT); \ do grep -v '^#line' src/$(GENDIR)/$$i > $(DISTDIR)/src/Gen.boot/$$i; done @for i in $(K_SOURCE) $(FLEXBISONFILES) $(ERRMSGFILES) $(AUXFILES) $(GETOPT_CFILES); \ do cp -p src/$$i $(DISTDIR)/src; done @for i in $(VC7FILES); \ do cp -p src/vc7/$$i $(DISTDIR)/src/vc7; done @cp -p $(ROOTFILES) $(DISTDIR) @tar cf - $(DISTDIR) | gzip -9 -c > $(DISTDIR).tar.gz @echo $(DISTDIR).tar.gz created install: boot @INSTALL_PROGRAM@ kc++ $(bindir)/kc++ @INSTALL_DATA@ $(MANDIR)/kc++.1 $(mandir)/man1 maintainer-release: dist gpg -b --sign $(DISTDIR).tar.gz scp $(DISTDIR).tar.gz $(DISTDIR).tar.gz.sig piefel@dl.sv.nongnu.org:/releases/kimwitu-pp clean: cd src; \ $(MAKE) distclean -rm kc++ help: @echo "You may call make with the following targets:" @echo " boot (default) fresh from distribution" @echo " distribution make a tar.gz for release" @echo " install copy binary and man page to destination" @echo " clean quite clean" @echo @echo " maintainer-release put release on web site" @echo " maintainer-release-exe put .exe on web site" kimwitu++-2.3.13/README0000644000175000017500000000670410611647734013035 0ustar useruser =-------------- = = The Term Processor Kimwitu++ = =-------------- Kimwitu++ is a system that supports the construction of programs that use trees or terms as their main data structure. For the Kimwitu++ web site (including newest version) have a look at its homepage on http://www2.informatik.hu-berlin.de/sam/kimwitu++. Kimwitu++ is derived from Kimwitu 4.4, see http://purl.oclc.org/net/kimwitu. How is this distribution structured? Sources: src/* src/Gen.boot/* The Term Processor was made using itself. The src directory contains the `real' *.k (Kimwitu++ input) sources. The src/Gen.boot directory contains the *.{h,cc} kc++-generated files that you need to bootstrap it. A src/Gen directory will be created while kc++ is being made. It will contain (links to) the kc-generated files used for boot-strapping, the compiled .o files and the linked binary executable kc++. Manual: man/man/kc++.1 Tells you all you need to know to invoke kc++ (Kimwitu++). Documentation: doc/* The documentation is in DocBook format with a couple of scripts provided to convert it to LaTeX and HTML. Please consider the documentation for Kimwitu as well, using a short kc->kc++ transition guide. How do I install Kimwitu? Please refer to INSTALL. Which architectures are supported? Kimwitu++ just reads and writes text files, in principle it should run on any architecture you can think of. Development is done mainly on Solaris and GNU/Linux, these will be supported best. It runs also on Windows and MacOS X. Do I need a running Kimwitu++ to install Kimwitu++? No, you don't. src directory contains everything needed to bootstrap Kimwitu++. Why do you bother me with all this non-sense about bootstrapping and all? If you ever need to apply a patch, you will need to know how to change Kimwitu++, and you will need the `real' *.k sources of Kimwitu++, not the generated *.{h,cc} stuff in src. How do I make changes in Kimwitu++? You don't want to. You ask us to change Kimwitu++ if you find anything that needs to be changed. But, if you need to change anything in the sources of Kimwitu++, you should make your change in the src directory, *not* in the Gen.* directory, because the contents of that directory will be overwritten during the making of the new Kimwitu++. Note that in this case you will *need* a running Kimwitu++ to build the new one. After making your changes, execute `make' or `make s1' in the src directory. If everything is ok, you will find a new binary src/Gen.*/kc++_s1. Who should I contact if I find anything that needs to be changed? (Or have other questions related to Kimwitu++.) For original Kimwitu it is: Axel Belinfante tel. +31/53 4893774 You can contact me for any question related to Kimwitu. For Kimwitu++, please contact: Martin von Löwis or Michael Piefel , both from Humboldt-Universität zu Berlin What is the licence? This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the Licence, or (at your option) any later version. Please refer to the file GPL containing the GNU General Public License in version 2. The terms of the licence allow the development of commercial software with Kimwitu++. kimwitu++-2.3.13/LICENCE0000644000175000017500000000333510752413131013123 0ustar useruserKimwitu++, a system that supports the construction of programs that use trees or terms as their main data structure. Copyright © 1988-1997 Axel Belinfante, University of Twente Copyright © 1997-2008 Michael Piefel, Humboldt-Universität zu Berlin This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Kimwitu++ is based on Kimwitu. Output of Kimwitu (and of works based on Kimwitu) can be used without restriction (even though this output may contain fragments from the source code of Kimwitu (or of works based on Kimwitu)), with one nota- ble exception (because Kimwitu is built using itself): The output generated by Kimwitu (and by works based on Kimwitu) from the source code of Kimwitu (and from the source code of works based on Kimwitu) is covered by the GNU General Public License. The structure-file-io reading and writing code has been derived, in part, from The Synthesizer Generator (tm), a product of GrammaTech, Inc, copyright (C) 1991, GrammaTech, Inc. Used with permission. GrammaTech and Synthesizer Generator, are tradenames of GrammaTech, Inc., One Hopkins Place, Ithaca, NY 14850, (607) 273-7340. kimwitu++-2.3.13/COPYING0000644000175000017500000004314410557650724013211 0ustar useruser GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.