diff -rc gnusql-0.7b5.2/ChangeLog gnusql-0.7b5.3/ChangeLog *** gnusql-0.7b5.2/ChangeLog Mon May 12 09:59:43 1997 --- gnusql-0.7b5.3/ChangeLog Sun Jun 8 17:09:15 1997 *************** *** 1,5 **** --- 1,12 ---- + Sun Jun 8 14:33:45 1997 Michael Kimelman + + * Makefile.in (install), etc/preserve, configure.in, make-util, etc : + configuration and installaton process fixed (plus some bugs). + Mon May 12 09:50:21 1997 Michael Kimelman + * patch (0.7b5.2) provided + * Makefile.in (test): added target to run test sequence * configure.in (rpcgen_output): fixed pattern for 'main' prototype diff -rc gnusql-0.7b5.2/Makefile.in gnusql-0.7b5.3/Makefile.in *** gnusql-0.7b5.2/Makefile.in Mon May 12 10:02:22 1997 --- gnusql-0.7b5.3/Makefile.in Thu Jun 12 16:41:04 1997 *************** *** 57,66 **** SERVBIN=$(SERVDIR)/bin CLNT=$(SERVDIR)/client C_INC=$(CLNT)/include ! TOUCH=@top_srcdir@/etc/Touch - MAKECLEAN=$(MAKE) -k REV=$(REV) clean MAKERT=$(MAKE) -k REV=$(REV) all : confs $(MAKERT) compile --- 57,66 ---- SERVBIN=$(SERVDIR)/bin CLNT=$(SERVDIR)/client C_INC=$(CLNT)/include ! TOUCH=etc/Touch MAKERT=$(MAKE) -k REV=$(REV) + MAKECLEAN=$(MAKERT) clean all : confs $(MAKERT) compile *************** *** 79,86 **** --- 79,90 ---- install-c : client.stamp install-s : server.stamp install : install-c install-s + @echo '======================================================' + @echo '======================================================' + @echo '======================================================' @echo 'BE CAREFUL: THIS IS THE BETA TEST. AND IT HAS BUGS!!!!' @echo 'type control-C now if you are not sure' + @echo '======================================================' sleep 10 @echo 'Installation started .....' # put docs in server dirs *************** *** 88,94 **** # put headers in server dirs test -d $(C_INC) || mkdir -p $(C_INC) ( cd $(srcdir)/src/include ; \ ! for f in sql.h dyn_funcs.h sql_type.def errors.h ; do \ test -f $(C_INC)/$$f && rm $(C_INC)/$$f ; \ $(INSTALL) -m 644 $$f $(C_INC)/$$f ; \ done \ --- 92,98 ---- # put headers in server dirs test -d $(C_INC) || mkdir -p $(C_INC) ( cd $(srcdir)/src/include ; \ ! for f in setup_os.h config.h sql.h dyn_funcs.h sql_type.def errors.h ; do \ test -f $(C_INC)/$$f && rm $(C_INC)/$$f ; \ $(INSTALL) -m 644 $$f $(C_INC)/$$f ; \ done \ *************** *** 103,110 **** # go to server and init it. ( cd $(SERVDIR); $(srcdir)/etc/boot >/dev/null ; bin/finadm /dev/null ; bin/finadm > test14.c" @@@@@ ! subquery returns more than one row ! Error in test 18 !!!!! ! ! 12. From time to time I get a ! makegr.c: Incorrect type '0' (or other values). ! I traced this down to tuple_break in the same file makegr.c. The ! macro get_length report this when an illegal (type) value is found. ! ! Specifically this happens on my machine when test15 is running. I ! hunted this down a bit further and found that when I run a ! select * from DEFINITION_SCHEMA.SYSCOLUMS; on the monitor program ! this query fails. It appears that something is corrupting this ! (important) table. ! ! I suspect this falls into the alignment category that I had earlier. ! On the hppa1.1-hp-hpux10.20 (at my work, needless to say...) it doesn't ! fail. ! ! It appears that the m68k-hp-hpux9.10 always aligns structures at 2 bytes ! while the rest of the systems (like hppa1.1-hp-hpux10.20) aligns at 4 bytes. ! I tried to make a gcc for the m68k that aligns to 4 bytes but then gsqsls ! core dumped faster that you could type it in. ! ! 13. I've defined a cursor ! ! SELECT OWNER,TABNAME,UNTABID ! FROM DEFINITION_SCHEMA.SYSTABLES ! ORDER BY OWNER,TABNAME; ! ! Due to the ORDER BY I get a SERVER CRASH during compilation -- !!! brackets ! cure it. ! (SELECT OWNER,TABNAME,UNTABID ! FROM DEFINITION_SCHEMA.SYSTABLES ! ) ! ORDER BY OWNER,TABNAME; ! 14. \ No newline at end of file diff -rc gnusql-0.7b5.2/README gnusql-0.7b5.3/README *** gnusql-0.7b5.2/README Mon May 12 10:01:44 1997 --- gnusql-0.7b5.3/README Thu Jun 12 16:40:23 1997 *************** *** 1,4 **** ! This directory tree holds version 0.7b5.2 of GNU SQL Server. This is the *first* beta test of the system. You may encounter bugs in this release. If you do, please report --- 1,4 ---- ! This directory tree holds version 0.7b5.3 of GNU SQL Server. This is the *first* beta test of the system. You may encounter bugs in this release. If you do, please report diff -rc gnusql-0.7b5.2/configure gnusql-0.7b5.3/configure *** gnusql-0.7b5.2/configure Mon May 12 10:00:07 1997 --- gnusql-0.7b5.3/configure Thu Jun 12 13:17:34 1997 *************** *** 1313,1319 **** YACC=bison YFLAGS="-d -v -t" else ! YACC='$(LIB)/preserve' YFLAGS="restore --bison" fi --- 1313,1319 ---- YACC=bison YFLAGS="-d -v -t" else ! YACC='$(ETC)/preserve' YFLAGS="restore --bison" fi *************** *** 1401,1407 **** #elif test "$LEX" = "lex" ; then # LFLAGS="-t" else ! LEX='$(LIB)/preserve' LFLAGS='restore --flex' fi --- 1401,1407 ---- #elif test "$LEX" = "lex" ; then # LFLAGS="-t" else ! LEX='$(ETC)/preserve' LFLAGS='restore --flex' fi *************** *** 1462,1468 **** ac_save_path="$PATH" ! PATH=/usr/local/bin:/usr/contrib/bin:/usr/bin:$PATH for ac_prog in gmake make do # Extract the first word of "$ac_prog", so it can be a program name with args. --- 1462,1468 ---- ac_save_path="$PATH" ! PATH=/usr/local/bin:/usr/contrib/bin:/opt/bin:/opt/gnu/bin:/usr/bin:$PATH for ac_prog in gmake make do # Extract the first word of "$ac_prog", so it can be a program name with args. *************** *** 3411,3417 **** ### and cook postconfigure RCS creation in subdirectories ### prepare makefiles templates ! configurables=`${srcdir}/etc/conf-templ create "${LN_S}" ${MAKE} $gss_cv_MAKE_includes` if test "x$configurables" = x ; then exit 1 fi --- 3411,3417 ---- ### and cook postconfigure RCS creation in subdirectories ### prepare makefiles templates ! configurables=`${srcdir}/etc/conf-templ create "${LN_S}" ${MAKE} $gss_cv_MAKE_includes ` if test "x$configurables" = x ; then exit 1 fi *************** *** 3446,3452 **** - trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure --- 3446,3451 ---- *************** *** 3824,3831 **** EOF cat >> $CONFIG_STATUS <<\EOF ! chmod a+x etc/dq ! echo timestamp > stamp-h ${top_srcdir}/etc/conf-templ postconfigure exit 0 --- 3823,3829 ---- EOF cat >> $CONFIG_STATUS <<\EOF ! echo timestamp > stamp-h ${top_srcdir}/etc/conf-templ postconfigure exit 0 diff -rc gnusql-0.7b5.2/configure.in gnusql-0.7b5.3/configure.in *** gnusql-0.7b5.2/configure.in Mon May 12 09:59:45 1997 --- gnusql-0.7b5.3/configure.in Thu Jun 12 13:16:37 1997 *************** *** 217,223 **** YACC=bison YFLAGS="-d -v -t" else ! YACC='$(LIB)/preserve' YFLAGS="restore --bison" fi --- 217,223 ---- YACC=bison YFLAGS="-d -v -t" else ! YACC='$(ETC)/preserve' YFLAGS="restore --bison" fi *************** *** 229,235 **** #elif test "$LEX" = "lex" ; then # LFLAGS="-t" else ! LEX='$(LIB)/preserve' LFLAGS='restore --flex' fi --- 229,235 ---- #elif test "$LEX" = "lex" ; then # LFLAGS="-t" else ! LEX='$(ETC)/preserve' LFLAGS='restore --flex' fi *************** *** 244,250 **** dnl choose the best make ac_save_path="$PATH" ! PATH=/usr/local/bin:/usr/contrib/bin:/usr/bin:$PATH AC_PATH_PROGS(MAKE, gmake make) PATH="$ac_save_path" --- 244,250 ---- dnl choose the best make ac_save_path="$PATH" ! PATH=/usr/local/bin:/usr/contrib/bin:/opt/bin:/opt/gnu/bin:/usr/bin:$PATH AC_PATH_PROGS(MAKE, gmake make) PATH="$ac_save_path" *************** *** 454,469 **** ### and cook postconfigure RCS creation in subdirectories ### prepare makefiles templates ! configurables=`${srcdir}/etc/conf-templ create "${LN_S}" ${MAKE} $gss_cv_MAKE_includes` if test "x$configurables" = x ; then exit 1 fi ! dnl Checks for system services ! dnl --------------------------------- ! ! dnl Specify what sort of things we''ll be editing into Makefile and config.h. ! dnl Use configuration here uncanonicalized to avoid exceeding size limits. AC_SUBST(srcdir) AC_SUBST(prefix) --- 454,466 ---- ### and cook postconfigure RCS creation in subdirectories ### prepare makefiles templates ! configurables=`${srcdir}/etc/conf-templ create "${LN_S}" ${MAKE} $gss_cv_MAKE_includes ` if test "x$configurables" = x ; then exit 1 fi ! dnl Configurables specification ! dnl --------------------------- AC_SUBST(srcdir) AC_SUBST(prefix) *************** *** 495,501 **** AC_SUBST(INT_SHELL) AC_OUTPUT( ${configurables} , - chmod a+x etc/dq echo timestamp > stamp-h ${top_srcdir}/etc/conf-templ postconfigure ) --- 492,497 ---- diff -rc gnusql-0.7b5.2/etc/MACHINES gnusql-0.7b5.3/etc/MACHINES *** gnusql-0.7b5.2/etc/MACHINES Mon Apr 28 21:52:01 1997 --- gnusql-0.7b5.3/etc/MACHINES Sun Jun 8 16:13:49 1997 *************** *** 21,37 **** will configure gss for the latest version it knows about. Sun Solaris 2.x (sparc-sun-solaris2.*) - i586 Linux 1.2.13 (ix86-*-linux*) - HP/700 HP_UX 9.0 (hppa1.1-hp-hpux9.07) - - GSS should be built with GNU gcc - In addition, you will probably need GNU make - - - Local variables: - mode: indented-text - fill-prefix: " " - End: --- 21,27 ---- will configure gss for the latest version it knows about. + Early beta test: Sun Solaris 2.x (sparc-sun-solaris2.*) i586 Linux 1.2.13 (ix86-*-linux*) HP/700 HP_UX 9.0 (hppa1.1-hp-hpux9.07) diff -rc gnusql-0.7b5.2/etc/Makefile.in gnusql-0.7b5.3/etc/Makefile.in *** gnusql-0.7b5.2/etc/Makefile.in Mon May 12 10:02:23 1997 --- gnusql-0.7b5.3/etc/Makefile.in Thu Jun 12 16:41:04 1997 *************** *** 28,31 **** $(DOC) : - [ -d $(DOC) ] || mkdir -p $(DOC) clean : ! $(srcdir)/make-util clean "make clean" --- 28,33 ---- $(DOC) : - [ -d $(DOC) ] || mkdir -p $(DOC) clean : ! make-util clean "make clean" ! distclean : ! make-util clean "make distclean" diff -rc gnusql-0.7b5.2/etc/Tdeps gnusql-0.7b5.3/etc/Tdeps *** gnusql-0.7b5.2/etc/Tdeps Mon Apr 28 21:52:02 1997 --- gnusql-0.7b5.3/etc/Tdeps Thu Jun 12 16:42:56 1997 *************** *** 1,4 **** ! #!/bin/sh ## ## Tdeps: refreshing dependencies at test directory. usefull if set of ## tests are changed --- 1,4 ---- ! #! /bin/sh ## ## Tdeps: refreshing dependencies at test directory. usefull if set of ## tests are changed Only in gnusql-0.7b5.3/etc: Tdeps.in diff -rc gnusql-0.7b5.2/etc/Touch gnusql-0.7b5.3/etc/Touch *** gnusql-0.7b5.2/etc/Touch Mon Apr 28 21:52:00 1997 --- gnusql-0.7b5.3/etc/Touch Sun May 18 22:54:30 1997 *************** *** 1,11 **** #!/bin/csh if ( ( -f $1 ) && ((-w $1 ) || ( -o $1 )) ) then ! if ( ! -w $1 ) then ! chmod u+w $1 touch $1 - chmod a-w $1 else touch $1 endif else if ( -f RCS/$1,v ) then --- 1,11 ---- #!/bin/csh if ( ( -f $1 ) && ((-w $1 ) || ( -o $1 )) ) then ! if ( -w $1 ) then touch $1 else + chmod u+w $1 touch $1 + chmod a-w $1 endif else if ( -f RCS/$1,v ) then diff -rc gnusql-0.7b5.2/etc/Touch.X gnusql-0.7b5.3/etc/Touch.X *** gnusql-0.7b5.2/etc/Touch.X Mon Apr 28 21:52:08 1997 --- gnusql-0.7b5.3/etc/Touch.X Thu Jun 12 15:12:54 1997 *************** *** 1,4 **** ! #!/bin/sh ## ## Touch: touch or check out file form RCS ## --- 1,4 ---- ! @INT_SHELL@ ## ## Touch: touch or check out file form RCS ## Only in gnusql-0.7b5.3/etc: ansi2knr-sh.in Only in gnusql-0.7b5.3/etc: arc.in Only in gnusql-0.7b5.3/etc: boot.in diff -rc gnusql-0.7b5.2/etc/conf-templ gnusql-0.7b5.3/etc/conf-templ *** gnusql-0.7b5.2/etc/conf-templ Mon Apr 28 21:52:03 1997 --- gnusql-0.7b5.3/etc/conf-templ Thu Jun 12 13:18:40 1997 *************** *** 1,4 **** ! #! /bin/sh # conf-templ : This script is an auxilary part of configure. # It is called by 'configure' and does # configure templates pre & post -processing. --- 1,4 ---- ! # conf-templ : This script is an auxilary part of configure. # It is called by 'configure' and does # configure templates pre & post -processing. *************** *** 216,222 **** filt_cmd="cat " fi ## prepare postconfiguration script header ! echo '#! /bin/sh ' >${postconfig} echo "# this file is generated automatically by $0 " >>${postconfig} echo "# DON'T EDIT THIS FILE " >>${postconfig} echo "# " >>${postconfig} --- 216,223 ---- filt_cmd="cat " fi ## prepare postconfiguration script header ! echo ' ' >${postconfig} ! echo ' ' >>${postconfig} echo "# this file is generated automatically by $0 " >>${postconfig} echo "# DON'T EDIT THIS FILE " >>${postconfig} echo "# " >>${postconfig} *************** *** 242,247 **** --- 243,251 ---- echo ' if [ ! -r ${sfn}.in ]; then ' >>${postconfig} echo ' ${LN_S} $tfn ${sfn}.in ' >>${postconfig} echo ' fi ' >>${postconfig} + echo ' if [ -x ${tfn} ]; then ' >>${postconfig} + echo ' chmod a+x ${sfn} ' >>${postconfig} + echo ' fi ' >>${postconfig} echo ' if [ ${RCS} != absent -a ! -d RCS ]; then' >>${postconfig} echo ' [ -r RCS ] || rm -f RCS ' >>${postconfig} echo ' ${LN_S} ${RCS} RCS ' >>${postconfig} *************** *** 304,309 **** --- 308,319 ---- ## put links to RCS and makefiles template into the target directories if [ -d ${template_dir} ] ; then [ ! -f ${template_dir}/${postconfig} ] || ${template_dir}/${postconfig} + ( + cd etc; + for fn in `ls` ; do + [ -x ${srcdir}/etc/$fn.in ] && chmod a+x $fn + done + ) ( cd ${template_dir} if [ `ls -1 | wc -l` -eq 1 -a -h RCS ]; then Only in gnusql-0.7b5.3/etc: dq diff -rc gnusql-0.7b5.2/etc/dq.in gnusql-0.7b5.3/etc/dq.in *** gnusql-0.7b5.2/etc/dq.in Mon Apr 28 21:52:05 1997 --- gnusql-0.7b5.3/etc/dq.in Sun Jun 8 16:11:13 1997 *************** *** 1,4 **** ! #! /bin/sh # # dq : delete shared resources - all shared memory and queues owned # by effective user id --- 1,4 ---- ! @INT_SHELL@ # # dq : delete shared resources - all shared memory and queues owned # by effective user id Only in gnusql-0.7b5.2/etc: make-util Only in gnusql-0.7b5.3/etc: make-util.in diff -rc gnusql-0.7b5.2/etc/move-if-change gnusql-0.7b5.3/etc/move-if-change *** gnusql-0.7b5.2/etc/move-if-change Mon Apr 28 21:52:04 1997 --- gnusql-0.7b5.3/etc/move-if-change Thu Jun 12 16:42:59 1997 *************** *** 1,4 **** ! #!/bin/sh # # move-if-change : # --- 1,4 ---- ! #! /bin/sh # # move-if-change : # Only in gnusql-0.7b5.3/etc: move-if-change.in diff -rc gnusql-0.7b5.2/etc/preserve gnusql-0.7b5.3/etc/preserve *** gnusql-0.7b5.2/etc/preserve Mon Apr 28 21:52:05 1997 --- gnusql-0.7b5.3/etc/preserve Thu Jun 12 16:42:58 1997 *************** *** 21,26 **** --- 21,27 ---- preserve=no fi fn=$3 + to_stdout=no case "$2" in --bison) extension="y" *************** *** 29,34 **** --- 30,39 ---- --flex) extension="l" subst_list=".c" + if [ "x$3" = "x-t" ]; then + fn="$4" + to_stdout=yes + fi ;; --rpcgen) extension="x" *************** *** 54,78 **** if [ $preserve = 'no' ] ; then ## file.preserve has to be in distribution if [ ! -f ${cfn}.preserve ] ; then ! echo "cant find file $cfn" exit 1 fi ! cp -p ${cfn}.preserve ${cfn} if [ $extension = "x" -a $tail = ".h" ] ; then ## rpcgen header `echo $0 | sed 's/preserve$/move-if-change/1'` mv ${cfn} ${incdir}/${cfn} fi else # let's preserve file ! if [ -f ${cfn}.preserve -a `ls -t ${cfn}.preserve ${fn} | head -1` = ${cfn}.preserve ]; then echo "$cfn has already preserved" elif [ -f ${cfn} ] ; then ! cat ${cfn} | sed 's/#line.*$//g' > ${cfn}.preserve if [ $extension = "l" ] ; then echo "int yywrap() { return 1; }" >>${cfn}.preserve fi elif [ $extension = "x" -a $tail = ".h" ] ; then ## it's possible in the case of rpcgen generated header file fn_only=`echo $fn_root | sed "s/[^/]*[/]//g"` ! cat `find . -name ${fn_only}${tail} -print | head -1` | sed "s/#line.*$//g" >${cfn}.preserve else echo "can\'t preserve file $cfn" fi --- 59,93 ---- if [ $preserve = 'no' ] ; then ## file.preserve has to be in distribution if [ ! -f ${cfn}.preserve ] ; then ! echo "cant find file $cfn" >&2 exit 1 fi ! if [ $to_stdout = "yes" ]; then ! cat ${cfn}.preserve ! else ! cp -p ${cfn}.preserve ${cfn} ! fi if [ $extension = "x" -a $tail = ".h" ] ; then ## rpcgen header `echo $0 | sed 's/preserve$/move-if-change/1'` mv ${cfn} ${incdir}/${cfn} fi else # let's preserve file ! DONE=no ! [ -f ${cfn}.preserve ] && [ `ls -t ${cfn}.preserve ${fn} | head -1` = ${cfn}.preserve ] && { ! DONE=yes ; } ! if [ $DONE = yes ] ; then echo "$cfn has already preserved" elif [ -f ${cfn} ] ; then ! cat ${cfn} | sed 's/^[ ]*#[ ]*line.*$//g' > ${cfn}.preserve if [ $extension = "l" ] ; then + echo "#ifndef yywrap " >>${cfn}.preserve echo "int yywrap() { return 1; }" >>${cfn}.preserve + echo "#endif " >>${cfn}.preserve + echo "/*end of ${cfn}.preserve*/" >>${cfn}.preserve fi elif [ $extension = "x" -a $tail = ".h" ] ; then ## it's possible in the case of rpcgen generated header file fn_only=`echo $fn_root | sed "s/[^/]*[/]//g"` ! cat `find . -name ${fn_only}${tail} -print | head -1` | sed "s/^[ ]*#[ ]*line.*$//g" >${cfn}.preserve else echo "can\'t preserve file $cfn" fi Only in gnusql-0.7b5.3/etc: preserve.in Only in gnusql-0.7b5.3/etc: rpcgen-sh.in diff -rc gnusql-0.7b5.2/make-dist gnusql-0.7b5.3/make-dist *** gnusql-0.7b5.2/make-dist Sat May 3 20:18:25 1997 --- gnusql-0.7b5.3/make-dist Thu Jun 12 14:43:38 1997 *************** *** 271,282 **** ln configure.in config.h.in acconfig.h aclocal.m4 ${tempdir} ln stamp-h stamp-h.in ${tempdir} if [ "${with_RCS}" != "yes" ]; then ! cp Makefile.in ${tempdir} fi ### Copy these files; they can be cross-filesystem symlinks. ! cp config.sub ${tempdir} ! cp config.guess ${tempdir} ! cp install-sh ${tempdir} echo "Updating version number in README." (cd ${tempdir} --- 271,282 ---- ln configure.in config.h.in acconfig.h aclocal.m4 ${tempdir} ln stamp-h stamp-h.in ${tempdir} if [ "${with_RCS}" != "yes" ]; then ! cp -p Makefile.in ${tempdir} fi ### Copy these files; they can be cross-filesystem symlinks. ! cp -p config.sub ${tempdir} ! cp -p config.guess ${tempdir} ! cp -p install-sh ${tempdir} echo "Updating version number in README." (cd ${tempdir} *************** *** 306,312 **** ;; Makefile.in | Makefile_h.in ) if [ "${with_RCS}" != "yes" ]; then ! cp $fn ${tempdir}/$fn fi ;; gnusql) ## nothing to do with it --- 306,312 ---- ;; Makefile.in | Makefile_h.in ) if [ "${with_RCS}" != "yes" ]; then ! cp -p $fn ${tempdir}/$fn fi ;; gnusql) ## nothing to do with it *************** *** 357,363 **** ( cd ${tempdir} ./configure ! make clean find . -name Makefile -exec rm -f {} \; rm src/Makefile_h ) --- 357,363 ---- ( cd ${tempdir} ./configure ! make distclean find . -name Makefile -exec rm -f {} \; rm src/Makefile_h ) *************** *** 401,407 **** extn1="" for ext in ".tgz" ".tz" ".gz" ".Z" ".tar" ; do case $arctail in ! *diff ) echo "diff file... skipped" arctail="" break --- 401,407 ---- extn1="" for ext in ".tgz" ".tz" ".gz" ".Z" ".tar" ; do case $arctail in ! *diff* ) echo "diff file... skipped" arctail="" break diff -rc gnusql-0.7b5.2/src/Makefile.in gnusql-0.7b5.3/src/Makefile.in *** gnusql-0.7b5.2/src/Makefile.in Mon May 12 10:02:28 1997 --- gnusql-0.7b5.3/src/Makefile.in Thu Jun 12 16:41:10 1997 *************** *** 89,94 **** ( cd ../test ; $(MAKE); ) TAGS: force ! etags */*.x */*.y */*.l */*.k */*.def */*.h */*/*.h make* */*.c */*/*.c clean:: [ ! -f TAGS ] || $(RM) TAGS --- 89,94 ---- ( cd ../test ; $(MAKE); ) TAGS: force ! etags */*.x */*.y */*.l */*.k */*.def */*.h */*/*.h */*.c */*/*.c `find . -name 'Makefile.in' -print` clean:: [ ! -f TAGS ] || $(RM) TAGS diff -rc gnusql-0.7b5.2/src/Makefile_h.in gnusql-0.7b5.3/src/Makefile_h.in *** gnusql-0.7b5.2/src/Makefile_h.in Mon May 12 10:02:28 1997 --- gnusql-0.7b5.3/src/Makefile_h.in Thu Jun 12 16:41:10 1997 *************** *** 37,43 **** #srcdir=@srcdir@ builddir=@builddir@ src_root=$(top_srcdir)/src ! ETC=$(top_srcdir)/etc LIB=$(builddir)/lib INC=$(src_root)/include --- 37,43 ---- #srcdir=@srcdir@ builddir=@builddir@ src_root=$(top_srcdir)/src ! ETC=$(builddir)/etc LIB=$(builddir)/lib INC=$(src_root)/include *************** *** 71,78 **** C=@U@c H=@U@h - MAKECLEAN=$(MAKE) -k REV=$(REV) clean MAKERT=$(MAKE) -k REV=$(REV) LIBSER=$(LIB)/libgss_ser.a LIBCLI=$(CLNT)/libgss.a --- 71,78 ---- C=@U@c H=@U@h MAKERT=$(MAKE) -k REV=$(REV) + MAKECLEAN=$(MAKERT) clean LIBSER=$(LIB)/libgss_ser.a LIBCLI=$(CLNT)/libgss.a *************** *** 159,165 **** maintarget : announce all clean:: announce ! $(ETC)/make-util clean "$(MAKECLEAN)" announce : echo "++ `pwd` processed" --- 159,167 ---- maintarget : announce all clean:: announce ! $(ETC)/make-util clean "$(MAKECLEAN)" ! distclean:: clean ! $(ETC)/make-util clean "$(MAKERT) distclean" announce : echo "++ `pwd` processed" diff -rc gnusql-0.7b5.2/src/engine/buf/bufdefs.h gnusql-0.7b5.3/src/engine/buf/bufdefs.h *** gnusql-0.7b5.2/src/engine/buf/bufdefs.h Mon Apr 28 21:52:35 1997 --- gnusql-0.7b5.3/src/engine/buf/bufdefs.h Sun Jun 8 14:29:16 1997 *************** *** 91,99 **** #define BUF_MOD 1 /* modifyed buffer */ #define BUF_NMOD 0 /* nonmodifyed buffer */ - #define GOOD 0 - #define BAD 1 /* answers */ - #define NO_SEGS 0 /* absense of segments */ #define NULL_CONN 0 /* absense of connection */ --- 91,96 ---- diff -rc gnusql-0.7b5.2/src/engine/buf/buflock.c gnusql-0.7b5.3/src/engine/buf/buflock.c *** gnusql-0.7b5.2/src/engine/buf/buflock.c Mon Apr 28 21:52:36 1997 --- gnusql-0.7b5.3/src/engine/buf/buflock.c Sun Jun 8 14:29:16 1997 *************** *** 144,151 **** page = find_page (segn, pn); if (page == NULL) ! PRINTF (("BUF.enforce: sn=%d,pn=%d, status = %d\n", ! segn,pn, page->p_status)); assert (page != NULL); if (page->p_status == 1) { /* if lock can be enforced immediately */ --- 144,150 ---- page = find_page (segn, pn); if (page == NULL) ! printf ("BUF.enforce: sn=%d,pn=%d, status = %d\n", segn,pn, page->p_status); assert (page != NULL); if (page->p_status == 1) { /* if lock can be enforced immediately */ *************** *** 177,183 **** BUFUPACK(p,pn); page = find_page (segn, pn); if (page == NULL) ! PRINTF (("BUF.unlock: sn=%d,lnum=%d,pn=%d,i=%d\n",segn,lnum,pn,i)); assert (page != NULL); switch(page->p_ltype) { --- 176,182 ---- BUFUPACK(p,pn); page = find_page (segn, pn); if (page == NULL) ! printf ("BUF.unlock: sn=%d,lnum=%d,pn=%d,i=%d\n",segn,lnum,pn,i); assert (page != NULL); switch(page->p_ltype) { *************** *** 203,209 **** buf_to_user (trnum, buf->b_seg->keyseg); } else ! user_p (trnum, GOOD); } /* else we just released one of the weak locks */ break; --- 202,208 ---- buf_to_user (trnum, buf->b_seg->keyseg); } else ! user_p (trnum, 0); } /* else we just released one of the weak locks */ break; diff -rc gnusql-0.7b5.2/src/engine/buf/queue.c gnusql-0.7b5.3/src/engine/buf/queue.c *** gnusql-0.7b5.2/src/engine/buf/queue.c Mon Apr 28 21:52:37 1997 --- gnusql-0.7b5.3/src/engine/buf/queue.c Sun Jun 8 14:29:16 1997 *************** *** 99,105 **** buf_to_user (trnum, buf->b_seg->keyseg); } else ! user_p (trnum, GOOD); } } --- 99,105 ---- buf_to_user (trnum, buf->b_seg->keyseg); } else ! user_p (trnum, 0); } } diff -rc gnusql-0.7b5.2/src/engine/trans/aggravg.c gnusql-0.7b5.3/src/engine/trans/aggravg.c *** gnusql-0.7b5.2/src/engine/trans/aggravg.c Mon Apr 28 21:52:50 1997 --- gnusql-0.7b5.3/src/engine/trans/aggravg.c Sun Jun 8 14:29:16 1997 *************** *** 168,174 **** struct des_field *df; struct des_trel *destrel; char *asp; ! i2_t ntob; i4_t n_avg = 0; double avg = 0; struct A pg; --- 168,174 ---- struct des_field *df; struct des_trel *destrel; char *asp; ! u2_t ntob; i4_t n_avg = 0; double avg = 0; struct A pg; diff -rc gnusql-0.7b5.2/src/engine/trans/aggrsfn.c gnusql-0.7b5.3/src/engine/trans/aggrsfn.c *** gnusql-0.7b5.2/src/engine/trans/aggrsfn.c Mon Apr 28 21:52:50 1997 --- gnusql-0.7b5.3/src/engine/trans/aggrsfn.c Sun Jun 8 14:29:16 1997 *************** *** 134,140 **** struct des_field *df; i4_t i = 0; char **agrl, *asp = NULL; - i2_t n; struct A pg; char *arrpnt[BD_PAGESIZE]; u2_t arrsz[BD_PAGESIZE]; --- 134,139 ---- *************** *** 143,156 **** if (sn == NRSNUM) { struct des_trel *destrel; ! n = pidrel->urn.obnum; ! if (n > desnseg.mtobnum) { ans->cotnxt = NIOB; return; } ! destrel = (struct des_trel *) * (desnseg.tobtab + n); if (destrel == NULL) { ans->cotnxt = NIOB; --- 142,156 ---- if (sn == NRSNUM) { struct des_trel *destrel; + u2_t tbl_id; ! tbl_id = pidrel->urn.obnum; ! if (tbl_id > desnseg.mtobnum) { ans->cotnxt = NIOB; return; } ! destrel = (struct des_trel *) * (desnseg.tobtab + tbl_id); if (destrel == NULL) { ans->cotnxt = NIOB; *************** *** 192,197 **** --- 192,198 ---- struct ldesscan *disc; u2_t size; i4_t rep; + u2_t tbl_id; if ((ans->cotnxt = contir (pidrel, &desrel)) != OK) return; *************** *** 203,209 **** if ((ans->cotnxt = synlsc (RSC, pidrel, sc, slsz, fn, NULL)) != OK) return; scind = rel_scan (sn, pidrel->urn.obnum, (char *) desrel, ! &n, 0, NULL, sc, slsz, 0, NULL); agrl = (char **) xmalloc (nf * sizeof (char *)); agrl_frm (agrl, df, nf, mnf, flaglist); disc = &scind->dessc; --- 204,210 ---- if ((ans->cotnxt = synlsc (RSC, pidrel, sc, slsz, fn, NULL)) != OK) return; scind = rel_scan (sn, pidrel->urn.obnum, (char *) desrel, ! &tbl_id, 0, NULL, sc, slsz, 0, NULL); agrl = (char **) xmalloc (nf * sizeof (char *)); agrl_frm (agrl, df, nf, mnf, flaglist); disc = &scind->dessc; *************** *** 224,230 **** } if (i == 1) xfree (disc->cur_key); ! delscan (n); } if (i == 1) distagr_frm (agrl, nf, flaglist); --- 225,231 ---- } if (i == 1) xfree (disc->cur_key); ! delscan (tbl_id); } if (i == 1) distagr_frm (agrl, nf, flaglist); Only in gnusql-0.7b5.2/src/engine: tsort diff -rc gnusql-0.7b5.2/src/kitty/kitty.c gnusql-0.7b5.3/src/kitty/kitty.c *** gnusql-0.7b5.2/src/kitty/kitty.c Mon Apr 28 21:53:25 1997 --- gnusql-0.7b5.3/src/kitty/kitty.c Sun Jun 8 14:29:16 1997 *************** *** 88,95 **** line_no ++; putc(c,yout); ! while ((*buf_ptr++ = c = getc (infile)) != EOF) { if (buf_ptr - buffer >=BUF_SIZE/2) break; if (c == '#' && !passed_d) --- 88,96 ---- line_no ++; putc(c,yout); ! while ((c = getc (infile)) != EOF) { + *buf_ptr++ = c; if (buf_ptr - buffer >=BUF_SIZE/2) break; if (c == '#' && !passed_d) *************** *** 102,112 **** else if ( c != '\t' && c != ' ') break; } - *(--buf_ptr)=0; - fputs(buffer,yout); #undef BUF_SIZE ! ungetc(c,infile); ! continue; } if (c == EOF) return c; --- 103,116 ---- else if ( c != '\t' && c != ' ') break; } #undef BUF_SIZE ! if (c != EOF) ! { ! *(--buf_ptr)=0; ! fputs(buffer,yout); ! ungetc(c,infile); ! continue; ! } } if (c == EOF) return c; diff -rc gnusql-0.7b5.2/src/main/gsqltrn.h.preserve gnusql-0.7b5.3/src/main/gsqltrn.h.preserve *** gnusql-0.7b5.2/src/main/gsqltrn.h.preserve Mon Apr 28 21:53:29 1997 --- gnusql-0.7b5.3/src/main/gsqltrn.h.preserve Thu Jun 12 16:41:03 1997 *************** *** 4,19 **** */ #ifndef _GSQLTRN_H_RPCGEN ! #define _GSQLTRN_H_RPCGEN #include typedef char *string_t; typedef struct { u_int init_params_t_len; string_t *init_params_t_val; } init_params_t; struct stmt_info_t { string_t stmt; --- 4,36 ---- */ #ifndef _GSQLTRN_H_RPCGEN ! #define _GSQLTRN_H_RPCGEN #include + typedef char *string_t; + #ifdef __cplusplus + extern "C" bool_t xdr_string_t(XDR *, string_t*); + #elif __STDC__ + extern bool_t xdr_string_t(XDR *, string_t*); + #else /* Old Style C */ + bool_t xdr_string_t(); + #endif /* Old Style C */ + typedef struct { u_int init_params_t_len; string_t *init_params_t_val; } init_params_t; + #ifdef __cplusplus + extern "C" bool_t xdr_init_params_t(XDR *, init_params_t*); + #elif __STDC__ + extern bool_t xdr_init_params_t(XDR *, init_params_t*); + #else /* Old Style C */ + bool_t xdr_init_params_t(); + #endif /* Old Style C */ + struct stmt_info_t { string_t stmt; *************** *** 22,27 **** --- 39,52 ---- struct stmt_info_t *next; }; typedef struct stmt_info_t stmt_info_t; + #ifdef __cplusplus + extern "C" bool_t xdr_stmt_info_t(XDR *, stmt_info_t*); + #elif __STDC__ + extern bool_t xdr_stmt_info_t(XDR *, stmt_info_t*); + #else /* Old Style C */ + bool_t xdr_stmt_info_t(); + #endif /* Old Style C */ + struct prep_elem_t { int type; *************** *** 32,42 **** --- 57,83 ---- int nullable; }; typedef struct prep_elem_t prep_elem_t; + #ifdef __cplusplus + extern "C" bool_t xdr_prep_elem_t(XDR *, prep_elem_t*); + #elif __STDC__ + extern bool_t xdr_prep_elem_t(XDR *, prep_elem_t*); + #else /* Old Style C */ + bool_t xdr_prep_elem_t(); + #endif /* Old Style C */ + typedef struct { u_int descr_t_len; prep_elem_t *descr_t_val; } descr_t; + #ifdef __cplusplus + extern "C" bool_t xdr_descr_t(XDR *, descr_t*); + #elif __STDC__ + extern bool_t xdr_descr_t(XDR *, descr_t*); + #else /* Old Style C */ + bool_t xdr_descr_t(); + #endif /* Old Style C */ + struct compiled_object_t { struct compiled_object_t *next; *************** *** 48,53 **** --- 89,102 ---- string_t table_owner; }; typedef struct compiled_object_t compiled_object_t; + #ifdef __cplusplus + extern "C" bool_t xdr_compiled_object_t(XDR *, compiled_object_t*); + #elif __STDC__ + extern bool_t xdr_compiled_object_t(XDR *, compiled_object_t*); + #else /* Old Style C */ + bool_t xdr_compiled_object_t(); + #endif /* Old Style C */ + struct call_subst_t { string_t proc_name; *************** *** 60,71 **** --- 109,136 ---- string_t jmp_on_eofscan; }; typedef struct call_subst_t call_subst_t; + #ifdef __cplusplus + extern "C" bool_t xdr_call_subst_t(XDR *, call_subst_t*); + #elif __STDC__ + extern bool_t xdr_call_subst_t(XDR *, call_subst_t*); + #else /* Old Style C */ + bool_t xdr_call_subst_t(); + #endif /* Old Style C */ + struct call_t { struct call_t *next; struct call_subst_t *subst; }; typedef struct call_t call_t; + #ifdef __cplusplus + extern "C" bool_t xdr_call_t(XDR *, call_t*); + #elif __STDC__ + extern bool_t xdr_call_t(XDR *, call_t*); + #else /* Old Style C */ + bool_t xdr_call_t(); + #endif /* Old Style C */ + struct file_buf_t { string_t ext; *************** *** 73,81 **** struct file_buf_t *next; }; typedef struct file_buf_t file_buf_t; ! #define COMP_STATIC 1 ! #define COMP_DYNAMIC_CURSOR 2 ! #define COMP_DYNAMIC_SIMPLE 3 struct comp_data_t { int comp_type; --- 138,154 ---- struct file_buf_t *next; }; typedef struct file_buf_t file_buf_t; ! #ifdef __cplusplus ! extern "C" bool_t xdr_file_buf_t(XDR *, file_buf_t*); ! #elif __STDC__ ! extern bool_t xdr_file_buf_t(XDR *, file_buf_t*); ! #else /* Old Style C */ ! bool_t xdr_file_buf_t(); ! #endif /* Old Style C */ ! ! #define COMP_STATIC 1 ! #define COMP_DYNAMIC_CURSOR 2 ! #define COMP_DYNAMIC_SIMPLE 3 struct comp_data_t { int comp_type; *************** *** 86,91 **** --- 159,172 ---- } comp_data_t_u; }; typedef struct comp_data_t comp_data_t; + #ifdef __cplusplus + extern "C" bool_t xdr_comp_data_t(XDR *, comp_data_t*); + #elif __STDC__ + extern bool_t xdr_comp_data_t(XDR *, comp_data_t*); + #else /* Old Style C */ + bool_t xdr_comp_data_t(); + #endif /* Old Style C */ + struct compiled_t { int errors; *************** *** 95,100 **** --- 176,189 ---- comp_data_t stored; }; typedef struct compiled_t compiled_t; + #ifdef __cplusplus + extern "C" bool_t xdr_compiled_t(XDR *, compiled_t*); + #elif __STDC__ + extern bool_t xdr_compiled_t(XDR *, compiled_t*); + #else /* Old Style C */ + bool_t xdr_compiled_t(); + #endif /* Old Style C */ + struct link_cursor_t { string_t cursor_name; *************** *** 102,107 **** --- 191,204 ---- int segment; }; typedef struct link_cursor_t link_cursor_t; + #ifdef __cplusplus + extern "C" bool_t xdr_link_cursor_t(XDR *, link_cursor_t*); + #elif __STDC__ + extern bool_t xdr_link_cursor_t(XDR *, link_cursor_t*); + #else /* Old Style C */ + bool_t xdr_link_cursor_t(); + #endif /* Old Style C */ + struct seg_del_t { int segment; *************** *** 111,116 **** --- 208,221 ---- } seg_vadr; }; typedef struct seg_del_t seg_del_t; + #ifdef __cplusplus + extern "C" bool_t xdr_seg_del_t(XDR *, seg_del_t*); + #elif __STDC__ + extern bool_t xdr_seg_del_t(XDR *, seg_del_t*); + #else /* Old Style C */ + bool_t xdr_seg_del_t(); + #endif /* Old Style C */ + struct data { int type; *************** *** 127,148 **** } data_u; }; typedef struct data data; struct parm_t { data value; int indicator; }; typedef struct parm_t parm_t; typedef struct { u_int parm_row_t_len; parm_t *parm_row_t_val; } parm_row_t; ! #define RET_COMP 1 ! #define RET_ROW 2 ! #define RET_TBL 3 ! #define RET_SEG 4 ! #define RET_VOID 0 struct return_data { int rett; --- 232,277 ---- } data_u; }; typedef struct data data; + #ifdef __cplusplus + extern "C" bool_t xdr_data(XDR *, data*); + #elif __STDC__ + extern bool_t xdr_data(XDR *, data*); + #else /* Old Style C */ + bool_t xdr_data(); + #endif /* Old Style C */ + struct parm_t { data value; int indicator; }; typedef struct parm_t parm_t; + #ifdef __cplusplus + extern "C" bool_t xdr_parm_t(XDR *, parm_t*); + #elif __STDC__ + extern bool_t xdr_parm_t(XDR *, parm_t*); + #else /* Old Style C */ + bool_t xdr_parm_t(); + #endif /* Old Style C */ + typedef struct { u_int parm_row_t_len; parm_t *parm_row_t_val; } parm_row_t; ! #ifdef __cplusplus ! extern "C" bool_t xdr_parm_row_t(XDR *, parm_row_t*); ! #elif __STDC__ ! extern bool_t xdr_parm_row_t(XDR *, parm_row_t*); ! #else /* Old Style C */ ! bool_t xdr_parm_row_t(); ! #endif /* Old Style C */ ! ! #define RET_COMP 1 ! #define RET_ROW 2 ! #define RET_TBL 3 ! #define RET_SEG 4 ! #define RET_VOID 0 struct return_data { int rett; *************** *** 157,168 **** --- 286,313 ---- } return_data_u; }; typedef struct return_data return_data; + #ifdef __cplusplus + extern "C" bool_t xdr_return_data(XDR *, return_data*); + #elif __STDC__ + extern bool_t xdr_return_data(XDR *, return_data*); + #else /* Old Style C */ + bool_t xdr_return_data(); + #endif /* Old Style C */ + struct result_t { int sqlcode; return_data info; }; typedef struct result_t result_t; + #ifdef __cplusplus + extern "C" bool_t xdr_result_t(XDR *, result_t*); + #elif __STDC__ + extern bool_t xdr_result_t(XDR *, result_t*); + #else /* Old Style C */ + bool_t xdr_result_t(); + #endif /* Old Style C */ + struct insn_t { int vadr_segm; *************** *** 173,221 **** struct insn_t *next; }; typedef struct insn_t insn_t; extern result_t gsqltrn_rc; ! #define GSQL_TRN ((unsigned long)(0x40000010)) ! #define BETA0 ((unsigned long)(1)) ! #define INIT_COMP ((unsigned long)(1)) extern result_t * init_comp_1(); ! #define COMPILE ((unsigned long)(2)) extern result_t * compile_1(); ! #define DEL_SEGMENT ((unsigned long)(3)) extern result_t * del_segment_1(); ! #define LINK_CURSOR ((unsigned long)(4)) extern result_t * link_cursor_1(); ! #define LOAD_MODULE ((unsigned long)(5)) extern result_t * load_module_1(); ! #define EXECUTE_STMT ((unsigned long)(6)) extern result_t * execute_stmt_1(); ! #define DB_CREATE ((unsigned long)(7)) extern result_t * db_create_1(); ! #define RETRY ((unsigned long)(8)) extern result_t * retry_1(); ! #define IS_RPC_READY ((unsigned long)(1000)) extern int * is_rpc_ready_1(); ! extern int gsql_trn_1_freeresult(); ! ! /* the xdr functions */ ! extern bool_t xdr_string_t(); ! extern bool_t xdr_init_params_t(); ! extern bool_t xdr_stmt_info_t(); ! extern bool_t xdr_prep_elem_t(); ! extern bool_t xdr_descr_t(); ! extern bool_t xdr_compiled_object_t(); ! extern bool_t xdr_call_subst_t(); ! extern bool_t xdr_call_t(); ! extern bool_t xdr_file_buf_t(); ! extern bool_t xdr_comp_data_t(); ! extern bool_t xdr_compiled_t(); ! extern bool_t xdr_link_cursor_t(); ! extern bool_t xdr_seg_del_t(); ! extern bool_t xdr_data(); ! extern bool_t xdr_parm_t(); ! extern bool_t xdr_parm_row_t(); ! extern bool_t xdr_return_data(); ! extern bool_t xdr_result_t(); ! extern bool_t xdr_insn_t(); #endif /* !_GSQLTRN_H_RPCGEN */ --- 318,422 ---- struct insn_t *next; }; typedef struct insn_t insn_t; + #ifdef __cplusplus + extern "C" bool_t xdr_insn_t(XDR *, insn_t*); + #elif __STDC__ + extern bool_t xdr_insn_t(XDR *, insn_t*); + #else /* Old Style C */ + bool_t xdr_insn_t(); + #endif /* Old Style C */ + extern result_t gsqltrn_rc; ! #define GSQL_TRN ((u_long)0x40000010) ! #define BETA0 ((u_long)1) ! ! #ifdef __cplusplus ! #define INIT_COMP ((u_long)1) ! extern "C" result_t * init_comp_1(init_params_t *, CLIENT *); ! extern "C" result_t * init_comp_1_svc(init_params_t *, struct svc_req *); ! #define COMPILE ((u_long)2) ! extern "C" result_t * compile_1(stmt_info_t *, CLIENT *); ! extern "C" result_t * compile_1_svc(stmt_info_t *, struct svc_req *); ! #define DEL_SEGMENT ((u_long)3) ! extern "C" result_t * del_segment_1(seg_del_t *, CLIENT *); ! extern "C" result_t * del_segment_1_svc(seg_del_t *, struct svc_req *); ! #define LINK_CURSOR ((u_long)4) ! extern "C" result_t * link_cursor_1(link_cursor_t *, CLIENT *); ! extern "C" result_t * link_cursor_1_svc(link_cursor_t *, struct svc_req *); ! #define LOAD_MODULE ((u_long)5) ! extern "C" result_t * load_module_1(string_t *, CLIENT *); ! extern "C" result_t * load_module_1_svc(string_t *, struct svc_req *); ! #define EXECUTE_STMT ((u_long)6) ! extern "C" result_t * execute_stmt_1(insn_t *, CLIENT *); ! extern "C" result_t * execute_stmt_1_svc(insn_t *, struct svc_req *); ! #define DB_CREATE ((u_long)7) ! extern "C" result_t * db_create_1(void *, CLIENT *); ! extern "C" result_t * db_create_1_svc(void *, struct svc_req *); ! #define RETRY ((u_long)8) ! extern "C" result_t * retry_1(void *, CLIENT *); ! extern "C" result_t * retry_1_svc(void *, struct svc_req *); ! #define IS_RPC_READY ((u_long)1000) ! extern "C" int * is_rpc_ready_1(void *, CLIENT *); ! extern "C" int * is_rpc_ready_1_svc(void *, struct svc_req *); ! ! #elif __STDC__ ! #define INIT_COMP ((u_long)1) ! extern result_t * init_comp_1(init_params_t *, CLIENT *); ! extern result_t * init_comp_1_svc(init_params_t *, struct svc_req *); ! #define COMPILE ((u_long)2) ! extern result_t * compile_1(stmt_info_t *, CLIENT *); ! extern result_t * compile_1_svc(stmt_info_t *, struct svc_req *); ! #define DEL_SEGMENT ((u_long)3) ! extern result_t * del_segment_1(seg_del_t *, CLIENT *); ! extern result_t * del_segment_1_svc(seg_del_t *, struct svc_req *); ! #define LINK_CURSOR ((u_long)4) ! extern result_t * link_cursor_1(link_cursor_t *, CLIENT *); ! extern result_t * link_cursor_1_svc(link_cursor_t *, struct svc_req *); ! #define LOAD_MODULE ((u_long)5) ! extern result_t * load_module_1(string_t *, CLIENT *); ! extern result_t * load_module_1_svc(string_t *, struct svc_req *); ! #define EXECUTE_STMT ((u_long)6) ! extern result_t * execute_stmt_1(insn_t *, CLIENT *); ! extern result_t * execute_stmt_1_svc(insn_t *, struct svc_req *); ! #define DB_CREATE ((u_long)7) ! extern result_t * db_create_1(void *, CLIENT *); ! extern result_t * db_create_1_svc(void *, struct svc_req *); ! #define RETRY ((u_long)8) ! extern result_t * retry_1(void *, CLIENT *); ! extern result_t * retry_1_svc(void *, struct svc_req *); ! #define IS_RPC_READY ((u_long)1000) ! extern int * is_rpc_ready_1(void *, CLIENT *); ! extern int * is_rpc_ready_1_svc(void *, struct svc_req *); ! ! #else /* Old Style C */ ! #define INIT_COMP ((u_long)1) extern result_t * init_comp_1(); ! extern result_t * init_comp_1_svc(); ! #define COMPILE ((u_long)2) extern result_t * compile_1(); ! extern result_t * compile_1_svc(); ! #define DEL_SEGMENT ((u_long)3) extern result_t * del_segment_1(); ! extern result_t * del_segment_1_svc(); ! #define LINK_CURSOR ((u_long)4) extern result_t * link_cursor_1(); ! extern result_t * link_cursor_1_svc(); ! #define LOAD_MODULE ((u_long)5) extern result_t * load_module_1(); ! extern result_t * load_module_1_svc(); ! #define EXECUTE_STMT ((u_long)6) extern result_t * execute_stmt_1(); ! extern result_t * execute_stmt_1_svc(); ! #define DB_CREATE ((u_long)7) extern result_t * db_create_1(); ! extern result_t * db_create_1_svc(); ! #define RETRY ((u_long)8) extern result_t * retry_1(); ! extern result_t * retry_1_svc(); ! #define IS_RPC_READY ((u_long)1000) extern int * is_rpc_ready_1(); ! extern int * is_rpc_ready_1_svc(); ! #endif /* Old Style C */ #endif /* !_GSQLTRN_H_RPCGEN */ diff -rc gnusql-0.7b5.2/src/main/gsqltrn_clnt.c.preserve gnusql-0.7b5.3/src/main/gsqltrn_clnt.c.preserve *** gnusql-0.7b5.2/src/main/gsqltrn_clnt.c.preserve Mon Apr 28 21:53:29 1997 --- gnusql-0.7b5.3/src/main/gsqltrn_clnt.c.preserve Thu Jun 12 16:41:03 1997 *************** *** 3,161 **** * It was generated using rpcgen. */ #include "gsqltrn.h" /* Default timeout can be changed using clnt_control() */ static struct timeval TIMEOUT = { 25, 0 }; result_t * ! init_comp_1(argp, clnt) ! init_params_t *argp; ! CLIENT *clnt; { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof (clnt_res)); ! if (clnt_call(clnt, INIT_COMP, ! (xdrproc_t) xdr_init_params_t, (caddr_t) argp, ! (xdrproc_t) xdr_result_t, (caddr_t) &clnt_res, ! TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! compile_1(argp, clnt) ! stmt_info_t *argp; ! CLIENT *clnt; { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof (clnt_res)); ! if (clnt_call(clnt, COMPILE, ! (xdrproc_t) xdr_stmt_info_t, (caddr_t) argp, ! (xdrproc_t) xdr_result_t, (caddr_t) &clnt_res, ! TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! del_segment_1(argp, clnt) ! seg_del_t *argp; ! CLIENT *clnt; { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof (clnt_res)); ! if (clnt_call(clnt, DEL_SEGMENT, ! (xdrproc_t) xdr_seg_del_t, (caddr_t) argp, ! (xdrproc_t) xdr_result_t, (caddr_t) &clnt_res, ! TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! link_cursor_1(argp, clnt) ! link_cursor_t *argp; ! CLIENT *clnt; { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof (clnt_res)); ! if (clnt_call(clnt, LINK_CURSOR, ! (xdrproc_t) xdr_link_cursor_t, (caddr_t) argp, ! (xdrproc_t) xdr_result_t, (caddr_t) &clnt_res, ! TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! load_module_1(argp, clnt) ! string_t *argp; ! CLIENT *clnt; { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof (clnt_res)); ! if (clnt_call(clnt, LOAD_MODULE, ! (xdrproc_t) xdr_string_t, (caddr_t) argp, ! (xdrproc_t) xdr_result_t, (caddr_t) &clnt_res, ! TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! execute_stmt_1(argp, clnt) ! insn_t *argp; ! CLIENT *clnt; { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof (clnt_res)); ! if (clnt_call(clnt, EXECUTE_STMT, ! (xdrproc_t) xdr_insn_t, (caddr_t) argp, ! (xdrproc_t) xdr_result_t, (caddr_t) &clnt_res, ! TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! db_create_1(argp, clnt) ! void *argp; ! CLIENT *clnt; { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof (clnt_res)); ! if (clnt_call(clnt, DB_CREATE, ! (xdrproc_t) xdr_void, (caddr_t) argp, ! (xdrproc_t) xdr_result_t, (caddr_t) &clnt_res, ! TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! retry_1(argp, clnt) ! void *argp; ! CLIENT *clnt; { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof (clnt_res)); ! if (clnt_call(clnt, RETRY, ! (xdrproc_t) xdr_void, (caddr_t) argp, ! (xdrproc_t) xdr_result_t, (caddr_t) &clnt_res, ! TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } int * ! is_rpc_ready_1(argp, clnt) ! void *argp; ! CLIENT *clnt; { static int clnt_res; ! memset((char *)&clnt_res, 0, sizeof (clnt_res)); ! if (clnt_call(clnt, IS_RPC_READY, ! (xdrproc_t) xdr_void, (caddr_t) argp, ! (xdrproc_t) xdr_int, (caddr_t) &clnt_res, ! TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); --- 3,117 ---- * It was generated using rpcgen. */ + #include /* for memset */ #include "gsqltrn.h" /* Default timeout can be changed using clnt_control() */ static struct timeval TIMEOUT = { 25, 0 }; result_t * ! init_comp_1(init_params_t *argp, CLIENT *clnt) { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof(clnt_res)); ! if (clnt_call(clnt, INIT_COMP, xdr_init_params_t, argp, xdr_result_t, &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! compile_1(stmt_info_t *argp, CLIENT *clnt) { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof(clnt_res)); ! if (clnt_call(clnt, COMPILE, xdr_stmt_info_t, argp, xdr_result_t, &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! del_segment_1(seg_del_t *argp, CLIENT *clnt) { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof(clnt_res)); ! if (clnt_call(clnt, DEL_SEGMENT, xdr_seg_del_t, argp, xdr_result_t, &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! link_cursor_1(link_cursor_t *argp, CLIENT *clnt) { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof(clnt_res)); ! if (clnt_call(clnt, LINK_CURSOR, xdr_link_cursor_t, argp, xdr_result_t, &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! load_module_1(string_t *argp, CLIENT *clnt) { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof(clnt_res)); ! if (clnt_call(clnt, LOAD_MODULE, xdr_string_t, argp, xdr_result_t, &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! execute_stmt_1(insn_t *argp, CLIENT *clnt) { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof(clnt_res)); ! if (clnt_call(clnt, EXECUTE_STMT, xdr_insn_t, argp, xdr_result_t, &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! db_create_1(void *argp, CLIENT *clnt) { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof(clnt_res)); ! if (clnt_call(clnt, DB_CREATE, xdr_void, argp, xdr_result_t, &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } result_t * ! retry_1(void *argp, CLIENT *clnt) { static result_t clnt_res; ! memset((char *)&clnt_res, 0, sizeof(clnt_res)); ! if (clnt_call(clnt, RETRY, xdr_void, argp, xdr_result_t, &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); } int * ! is_rpc_ready_1(void *argp, CLIENT *clnt) { static int clnt_res; ! memset((char *)&clnt_res, 0, sizeof(clnt_res)); ! if (clnt_call(clnt, IS_RPC_READY, xdr_void, argp, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&clnt_res); diff -rc gnusql-0.7b5.2/src/main/gsqltrn_svc.c.preserve gnusql-0.7b5.3/src/main/gsqltrn_svc.c.preserve *** gnusql-0.7b5.2/src/main/gsqltrn_svc.c.preserve Mon Apr 28 21:53:29 1997 --- gnusql-0.7b5.3/src/main/gsqltrn_svc.c.preserve Thu Jun 12 16:41:03 1997 *************** *** 5,90 **** #include "gsqltrn.h" #include ! #include /* getenv, exit */ ! #include ! #include #include ! #include ! #include ! #include /* rlimit */ ! #include ! #ifdef DEBUG ! #define RPC_SVC_FG #endif - - #define _RPCSVC_CLOSEDOWN 120 #define main run_server #define RPC_SVC_FG #undef GSQL_TRN #define GSQL_TRN rpc_program_id extern long rpc_program_id; - static int _rpcpmstart; /* Started by a port monitor ? */ - - /* States a server can be in wrt request */ - - #define _IDLE 0 - #define _SERVED 1 - - static int _rpcsvcstate = _IDLE; /* Set when a request is serviced */ - static int _rpcsvccount = 0; /* Number of requests being serviced */ - - static - void _msgout(msg) - char *msg; - { - #ifdef RPC_SVC_FG - if (_rpcpmstart) - syslog(LOG_ERR, msg); - else - (void) fprintf(stderr, "%s\n", msg); - #else - syslog(LOG_ERR, msg); - #endif - } static void ! closedown(sig) ! int sig; ! { ! if (_rpcsvcstate == _IDLE && _rpcsvccount == 0) { ! extern fd_set svc_fdset; ! static int size; ! int i, openfd; ! struct t_info tinfo; ! ! if (!t_getinfo(0, &tinfo) && (tinfo.servtype == T_CLTS)) ! exit(0); ! if (size == 0) { ! struct rlimit rl; ! ! rl.rlim_max = 0; ! getrlimit(RLIMIT_NOFILE, &rl); ! if ((size = rl.rlim_max) == 0) { ! return; ! } ! } ! for (i = 0, openfd = 0; i < size && openfd < 2; i++) ! if (FD_ISSET(i, &svc_fdset)) ! openfd++; ! if (openfd <= 1) ! exit(0); ! } else ! _rpcsvcstate = _IDLE; ! ! (void) signal(SIGALRM, (void(*)()) closedown); ! (void) alarm(_RPCSVC_CLOSEDOWN/2); ! } ! ! static void ! gsql_trn_1(rqstp, transp) ! struct svc_req *rqstp; ! register SVCXPRT *transp; { union { init_params_t init_comp_1_arg; --- 5,28 ---- #include "gsqltrn.h" #include ! #include /* getenv, exit */ ! #include /* for pmap_unset */ ! #include /* strcmp */ #include ! #include ! #include ! #ifdef __STDC__ ! #define SIG_PF void(*)(int) #endif #define main run_server #define RPC_SVC_FG #undef GSQL_TRN #define GSQL_TRN rpc_program_id extern long rpc_program_id; static void ! gsql_trn_1(struct svc_req *rqstp, register SVCXPRT *transp) { union { init_params_t init_comp_1_arg; *************** *** 95,273 **** insn_t execute_stmt_1_arg; } argument; char *result; ! bool_t (*xdr_argument)(), (*xdr_result)(); ! char *(*local)(); - _rpcsvccount++; switch (rqstp->rq_proc) { case NULLPROC: ! (void) svc_sendreply(transp, xdr_void, ! (char *)NULL); ! _rpcsvccount--; ! _rpcsvcstate = _SERVED; return; case INIT_COMP: ! xdr_argument = xdr_init_params_t; ! xdr_result = xdr_result_t; ! local = (char *(*)()) init_comp_1; break; case COMPILE: ! xdr_argument = xdr_stmt_info_t; ! xdr_result = xdr_result_t; ! local = (char *(*)()) compile_1; break; case DEL_SEGMENT: ! xdr_argument = xdr_seg_del_t; ! xdr_result = xdr_result_t; ! local = (char *(*)()) del_segment_1; break; case LINK_CURSOR: ! xdr_argument = xdr_link_cursor_t; ! xdr_result = xdr_result_t; ! local = (char *(*)()) link_cursor_1; break; case LOAD_MODULE: ! xdr_argument = xdr_string_t; ! xdr_result = xdr_result_t; ! local = (char *(*)()) load_module_1; break; case EXECUTE_STMT: ! xdr_argument = xdr_insn_t; ! xdr_result = xdr_result_t; ! local = (char *(*)()) execute_stmt_1; break; case DB_CREATE: ! xdr_argument = xdr_void; ! xdr_result = xdr_result_t; ! local = (char *(*)()) db_create_1; break; case RETRY: ! xdr_argument = xdr_void; ! xdr_result = xdr_result_t; ! local = (char *(*)()) retry_1; break; case IS_RPC_READY: ! xdr_argument = xdr_void; ! xdr_result = xdr_int; ! local = (char *(*)()) is_rpc_ready_1; break; default: svcerr_noproc(transp); - _rpcsvccount--; - _rpcsvcstate = _SERVED; return; } (void) memset((char *)&argument, 0, sizeof (argument)); ! if (!svc_getargs(transp, xdr_argument, &argument)) { svcerr_decode(transp); - _rpcsvccount--; - _rpcsvcstate = _SERVED; return; } ! result = (*local)(&argument, rqstp); if (result != NULL && !svc_sendreply(transp, xdr_result, result)) { svcerr_systemerr(transp); } ! if (!svc_freeargs(transp, xdr_argument, &argument)) { ! _msgout("unable to free arguments"); exit(1); } - _rpcsvccount--; - _rpcsvcstate = _SERVED; return; } ! main() { ! pid_t pid; ! int i; ! char mname[FMNAMESZ + 1]; ! ! (void) sigset(SIGPIPE, SIG_IGN); ! ! if (!ioctl(0, I_LOOK, mname) && ! (!strcmp(mname, "sockmod") || !strcmp(mname, "timod"))) { ! char *netid; ! struct netconfig *nconf = NULL; ! SVCXPRT *transp; ! int pmclose; ! ! _rpcpmstart = 1; ! openlog("gsqltrn", LOG_PID, LOG_DAEMON); ! ! if ((netid = getenv("NLSPROVIDER")) == NULL) { ! /* started from inetd */ ! pmclose = 1; ! } else { ! if ((nconf = getnetconfigent(netid)) == NULL) ! _msgout("cannot get transport info"); ! ! pmclose = (t_getstate(0) != T_DATAXFER); ! } ! if (strcmp(mname, "sockmod") == 0) { ! if (ioctl(0, I_POP, 0) || ioctl(0, I_PUSH, "timod")) { ! _msgout("could not get the right module"); ! exit(1); ! } ! } ! if ((transp = svc_tli_create(0, nconf, NULL, 0, 0)) == NULL) { ! _msgout("cannot create server handle"); ! exit(1); ! } ! if (nconf) ! freenetconfigent(nconf); ! if (!svc_reg(transp, GSQL_TRN, BETA0, gsql_trn_1, 0)) { ! _msgout("unable to register (GSQL_TRN, BETA0)."); ! exit(1); ! } ! if (pmclose) { ! (void) signal(SIGALRM, (void(*)()) closedown); ! (void) alarm(_RPCSVC_CLOSEDOWN/2); ! } ! svc_run(); exit(1); - /* NOTREACHED */ - } else { - #ifndef RPC_SVC_FG - int size; - struct rlimit rl; - pid = fork(); - if (pid < 0) { - perror("cannot fork"); - exit(1); - } - if (pid) - exit(0); - rl.rlim_max = 0; - getrlimit(RLIMIT_NOFILE, &rl); - if ((size = rl.rlim_max) == 0) - exit(1); - for (i = 0; i < size; i++) - (void) close(i); - i = open("/dev/console", 2); - (void) dup2(i, 1); - (void) dup2(i, 2); - setsid(); - openlog("gsqltrn", LOG_PID, LOG_DAEMON); - #endif } ! if (!svc_create(gsql_trn_1, GSQL_TRN, BETA0, "netpath")) { ! _msgout("unable to create (GSQL_TRN, BETA0) for netpath."); exit(1); } svc_run(); ! _msgout("svc_run returned"); exit(1); /* NOTREACHED */ } --- 33,149 ---- insn_t execute_stmt_1_arg; } argument; char *result; ! xdrproc_t xdr_argument, xdr_result; ! char *(*local)(char *, struct svc_req *); switch (rqstp->rq_proc) { case NULLPROC: ! (void) svc_sendreply(transp, (xdrproc_t) xdr_void, (char *)NULL); return; case INIT_COMP: ! xdr_argument = (xdrproc_t) xdr_init_params_t; ! xdr_result = (xdrproc_t) xdr_result_t; ! local = (char *(*)(char *, struct svc_req *)) init_comp_1_svc; break; case COMPILE: ! xdr_argument = (xdrproc_t) xdr_stmt_info_t; ! xdr_result = (xdrproc_t) xdr_result_t; ! local = (char *(*)(char *, struct svc_req *)) compile_1_svc; break; case DEL_SEGMENT: ! xdr_argument = (xdrproc_t) xdr_seg_del_t; ! xdr_result = (xdrproc_t) xdr_result_t; ! local = (char *(*)(char *, struct svc_req *)) del_segment_1_svc; break; case LINK_CURSOR: ! xdr_argument = (xdrproc_t) xdr_link_cursor_t; ! xdr_result = (xdrproc_t) xdr_result_t; ! local = (char *(*)(char *, struct svc_req *)) link_cursor_1_svc; break; case LOAD_MODULE: ! xdr_argument = (xdrproc_t) xdr_string_t; ! xdr_result = (xdrproc_t) xdr_result_t; ! local = (char *(*)(char *, struct svc_req *)) load_module_1_svc; break; case EXECUTE_STMT: ! xdr_argument = (xdrproc_t) xdr_insn_t; ! xdr_result = (xdrproc_t) xdr_result_t; ! local = (char *(*)(char *, struct svc_req *)) execute_stmt_1_svc; break; case DB_CREATE: ! xdr_argument = (xdrproc_t) xdr_void; ! xdr_result = (xdrproc_t) xdr_result_t; ! local = (char *(*)(char *, struct svc_req *)) db_create_1_svc; break; case RETRY: ! xdr_argument = (xdrproc_t) xdr_void; ! xdr_result = (xdrproc_t) xdr_result_t; ! local = (char *(*)(char *, struct svc_req *)) retry_1_svc; break; case IS_RPC_READY: ! xdr_argument = (xdrproc_t) xdr_void; ! xdr_result = (xdrproc_t) xdr_int; ! local = (char *(*)(char *, struct svc_req *)) is_rpc_ready_1_svc; break; default: svcerr_noproc(transp); return; } (void) memset((char *)&argument, 0, sizeof (argument)); ! if (!svc_getargs(transp, xdr_argument, (caddr_t) &argument)) { svcerr_decode(transp); return; } ! result = (*local)((char *)&argument, rqstp); if (result != NULL && !svc_sendreply(transp, xdr_result, result)) { svcerr_systemerr(transp); } ! if (!svc_freeargs(transp, xdr_argument, (caddr_t) &argument)) { ! fprintf(stderr, "unable to free arguments"); exit(1); } return; } ! int ! main(int argc, char **argv) { ! register SVCXPRT *transp; ! ! (void) pmap_unset(GSQL_TRN, BETA0); ! ! transp = svcudp_create(RPC_ANYSOCK); ! if (transp == NULL) { ! fprintf(stderr, "cannot create udp service."); ! exit(1); ! } ! if (!svc_register(transp, GSQL_TRN, BETA0, gsql_trn_1, IPPROTO_UDP)) { ! fprintf(stderr, "unable to register (GSQL_TRN, BETA0, udp)."); ! exit(1); ! } ! ! transp = svctcp_create(RPC_ANYSOCK, 0, 0); ! if (transp == NULL) { ! fprintf(stderr, "cannot create tcp service."); exit(1); } ! if (!svc_register(transp, GSQL_TRN, BETA0, gsql_trn_1, IPPROTO_TCP)) { ! fprintf(stderr, "unable to register (GSQL_TRN, BETA0, tcp)."); exit(1); } svc_run(); ! fprintf(stderr, "svc_run returned"); exit(1); /* NOTREACHED */ } diff -rc gnusql-0.7b5.2/src/main/gsqltrn_xdr.c.preserve gnusql-0.7b5.3/src/main/gsqltrn_xdr.c.preserve *** gnusql-0.7b5.2/src/main/gsqltrn_xdr.c.preserve Mon Apr 28 21:53:30 1997 --- gnusql-0.7b5.3/src/main/gsqltrn_xdr.c.preserve Thu Jun 12 16:41:04 1997 *************** *** 6,393 **** #include "gsqltrn.h" bool_t ! xdr_string_t(xdrs, objp) ! register XDR *xdrs; ! string_t *objp; { ! register long *buf; ! if (!xdr_string(xdrs, objp, ~0)) ! return (FALSE); return (TRUE); } bool_t ! xdr_init_params_t(xdrs, objp) ! register XDR *xdrs; ! init_params_t *objp; { ! register long *buf; ! if (!xdr_array(xdrs, (char **)&objp->init_params_t_val, (u_int *) &objp->init_params_t_len, ~0, ! sizeof (string_t), (xdrproc_t) xdr_string_t)) ! return (FALSE); return (TRUE); } bool_t ! xdr_stmt_info_t(xdrs, objp) ! register XDR *xdrs; ! stmt_info_t *objp; { ! register long *buf; ! if (!xdr_string_t(xdrs, &objp->stmt)) ! return (FALSE); ! if (!xdr_string_t(xdrs, &objp->stmt_name)) ! return (FALSE); ! if (!xdr_int(xdrs, &objp->bline)) ! return (FALSE); ! if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof (stmt_info_t), (xdrproc_t) xdr_stmt_info_t)) ! return (FALSE); return (TRUE); } bool_t ! xdr_prep_elem_t(xdrs, objp) ! register XDR *xdrs; ! prep_elem_t *objp; { ! register long *buf; ! if (!xdr_int(xdrs, &objp->type)) ! return (FALSE); ! if (!xdr_int(xdrs, &objp->length)) ! return (FALSE); ! if (!xdr_int(xdrs, &objp->scale)) ! return (FALSE); ! if (!xdr_string_t(xdrs, &objp->name)) ! return (FALSE); ! if (!xdr_string_t(xdrs, &objp->ind_name)) ! return (FALSE); ! if (!xdr_int(xdrs, &objp->nullable)) ! return (FALSE); return (TRUE); } bool_t ! xdr_descr_t(xdrs, objp) ! register XDR *xdrs; ! descr_t *objp; { ! register long *buf; ! if (!xdr_array(xdrs, (char **)&objp->descr_t_val, (u_int *) &objp->descr_t_len, ~0, ! sizeof (prep_elem_t), (xdrproc_t) xdr_prep_elem_t)) ! return (FALSE); return (TRUE); } bool_t ! xdr_compiled_object_t(xdrs, objp) ! register XDR *xdrs; ! compiled_object_t *objp; { ! register long *buf; ! if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof (compiled_object_t), (xdrproc_t) xdr_compiled_object_t)) ! return (FALSE); ! if (!xdr_descr_t(xdrs, &objp->descr_in)) ! return (FALSE); ! if (!xdr_descr_t(xdrs, &objp->descr_out)) ! return (FALSE); ! if (!xdr_int(xdrs, &objp->object)) ! return (FALSE); ! if (!xdr_string_t(xdrs, &objp->cursor_name)) ! return (FALSE); ! if (!xdr_string_t(xdrs, &objp->table_name)) ! return (FALSE); ! if (!xdr_string_t(xdrs, &objp->table_owner)) ! return (FALSE); return (TRUE); } bool_t ! xdr_call_subst_t(xdrs, objp) ! register XDR *xdrs; ! call_subst_t *objp; { ! register long *buf; ! if (!xdr_string_t(xdrs, &objp->proc_name)) ! return (FALSE); ! if (!xdr_descr_t(xdrs, &objp->interface)) ! return (FALSE); ! if (!xdr_descr_t(xdrs, &objp->in_sql_parm)) ! return (FALSE); ! if (!xdr_descr_t(xdrs, &objp->out_sql_parm)) ! return (FALSE); ! if (!xdr_int(xdrs, &objp->object)) ! return (FALSE); ! if (!xdr_int(xdrs, &objp->method)) ! return (FALSE); ! if (!xdr_string_t(xdrs, &objp->jmp_on_error)) ! return (FALSE); ! if (!xdr_string_t(xdrs, &objp->jmp_on_eofscan)) ! return (FALSE); return (TRUE); } bool_t ! xdr_call_t(xdrs, objp) ! register XDR *xdrs; ! call_t *objp; { ! register long *buf; ! if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof (call_t), (xdrproc_t) xdr_call_t)) ! return (FALSE); ! if (!xdr_pointer(xdrs, (char **)&objp->subst, sizeof (call_subst_t), (xdrproc_t) xdr_call_subst_t)) ! return (FALSE); return (TRUE); } bool_t ! xdr_file_buf_t(xdrs, objp) ! register XDR *xdrs; ! file_buf_t *objp; { ! register long *buf; ! if (!xdr_string_t(xdrs, &objp->ext)) ! return (FALSE); ! if (!xdr_string_t(xdrs, &objp->text)) ! return (FALSE); ! if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof (file_buf_t), (xdrproc_t) xdr_file_buf_t)) ! return (FALSE); return (TRUE); } bool_t ! xdr_comp_data_t(xdrs, objp) ! register XDR *xdrs; ! comp_data_t *objp; { ! register long *buf; ! if (!xdr_int(xdrs, &objp->comp_type)) ! return (FALSE); switch (objp->comp_type) { case COMP_STATIC: ! if (!xdr_string_t(xdrs, &objp->comp_data_t_u.module)) ! return (FALSE); break; case COMP_DYNAMIC_CURSOR: ! if (!xdr_int(xdrs, &objp->comp_data_t_u.seg_ptr)) ! return (FALSE); break; case COMP_DYNAMIC_SIMPLE: ! if (!xdr_int(xdrs, &objp->comp_data_t_u.segm)) ! return (FALSE); break; } return (TRUE); } bool_t ! xdr_compiled_t(xdrs, objp) ! register XDR *xdrs; ! compiled_t *objp; { ! register long *buf; ! if (!xdr_int(xdrs, &objp->errors)) ! return (FALSE); ! if (!xdr_pointer(xdrs, (char **)&objp->bufs, sizeof (file_buf_t), (xdrproc_t) xdr_file_buf_t)) ! return (FALSE); ! if (!xdr_pointer(xdrs, (char **)&objp->objects, sizeof (compiled_object_t), (xdrproc_t) xdr_compiled_object_t)) ! return (FALSE); ! if (!xdr_pointer(xdrs, (char **)&objp->calls, sizeof (call_t), (xdrproc_t) xdr_call_t)) ! return (FALSE); ! if (!xdr_comp_data_t(xdrs, &objp->stored)) ! return (FALSE); return (TRUE); } bool_t ! xdr_link_cursor_t(xdrs, objp) ! register XDR *xdrs; ! link_cursor_t *objp; { ! register long *buf; ! if (!xdr_string_t(xdrs, &objp->cursor_name)) ! return (FALSE); ! if (!xdr_string_t(xdrs, &objp->stmt_name)) ! return (FALSE); ! if (!xdr_int(xdrs, &objp->segment)) ! return (FALSE); return (TRUE); } bool_t ! xdr_seg_del_t(xdrs, objp) ! register XDR *xdrs; ! seg_del_t *objp; { ! register long *buf; ! if (!xdr_int(xdrs, &objp->segment)) ! return (FALSE); ! if (!xdr_array(xdrs, (char **)&objp->seg_vadr.seg_vadr_val, (u_int *) &objp->seg_vadr.seg_vadr_len, ~0, ! sizeof (int), (xdrproc_t) xdr_int)) ! return (FALSE); return (TRUE); } #include "sql_type.h" bool_t ! xdr_data(xdrs, objp) ! register XDR *xdrs; ! data *objp; { ! register long *buf; ! if (!xdr_int(xdrs, &objp->type)) ! return (FALSE); switch (objp->type) { case SQLType_Char: ! if (!xdr_bytes(xdrs, (char **)&objp->data_u.Str.Str_val, (u_int *) &objp->data_u.Str.Str_len, ~0)) ! return (FALSE); break; case SQLType_Short: ! if (!xdr_short(xdrs, &objp->data_u.Shrt)) ! return (FALSE); break; case SQLType_Int: ! if (!xdr_int(xdrs, &objp->data_u.Int)) ! return (FALSE); break; case SQLType_Long: ! if (!xdr_int(xdrs, &objp->data_u.Lng)) ! return (FALSE); break; case SQLType_Real: ! if (!xdr_float(xdrs, &objp->data_u.Flt)) ! return (FALSE); break; case SQLType_Double: ! if (!xdr_double(xdrs, &objp->data_u.Dbl)) ! return (FALSE); break; } return (TRUE); } bool_t ! xdr_parm_t(xdrs, objp) ! register XDR *xdrs; ! parm_t *objp; { ! register long *buf; ! if (!xdr_data(xdrs, &objp->value)) ! return (FALSE); ! if (!xdr_int(xdrs, &objp->indicator)) ! return (FALSE); return (TRUE); } bool_t ! xdr_parm_row_t(xdrs, objp) ! register XDR *xdrs; ! parm_row_t *objp; { ! register long *buf; ! if (!xdr_array(xdrs, (char **)&objp->parm_row_t_val, (u_int *) &objp->parm_row_t_len, ~0, ! sizeof (parm_t), (xdrproc_t) xdr_parm_t)) ! return (FALSE); return (TRUE); } bool_t ! xdr_return_data(xdrs, objp) ! register XDR *xdrs; ! return_data *objp; { ! register long *buf; ! if (!xdr_int(xdrs, &objp->rett)) ! return (FALSE); switch (objp->rett) { case RET_COMP: ! if (!xdr_compiled_t(xdrs, &objp->return_data_u.comp_ret)) ! return (FALSE); break; case RET_ROW: ! if (!xdr_parm_row_t(xdrs, &objp->return_data_u.row)) ! return (FALSE); break; case RET_TBL: ! if (!xdr_array(xdrs, (char **)&objp->return_data_u.tbl.tbl_val, (u_int *) &objp->return_data_u.tbl.tbl_len, ~0, ! sizeof (parm_row_t), (xdrproc_t) xdr_parm_row_t)) ! return (FALSE); break; case RET_SEG: ! if (!xdr_int(xdrs, &objp->return_data_u.segid)) ! return (FALSE); break; } return (TRUE); } bool_t ! xdr_result_t(xdrs, objp) ! register XDR *xdrs; ! result_t *objp; { ! register long *buf; ! ! if (!xdr_int(xdrs, &objp->sqlcode)) ! return (FALSE); ! if (!xdr_return_data(xdrs, &objp->info)) ! return (FALSE); ! return (TRUE); ! } ! ! bool_t ! xdr_insn_t(xdrs, objp) ! register XDR *xdrs; ! insn_t *objp; ! { ! register long *buf; ! if (!xdr_int(xdrs, &objp->vadr_segm)) ! return (FALSE); ! if (!xdr_int(xdrs, &objp->sectnum)) ! return (FALSE); ! if (!xdr_int(xdrs, &objp->command)) ! return (FALSE); ! if (!xdr_int(xdrs, &objp->options)) ! return (FALSE); ! if (!xdr_parm_row_t(xdrs, &objp->parms)) ! return (FALSE); ! if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof (insn_t), (xdrproc_t) xdr_insn_t)) ! return (FALSE); return (TRUE); } --- 6,552 ---- #include "gsqltrn.h" bool_t ! xdr_string_t(XDR *xdrs, string_t *objp) { ! register long *buf; ! if (!xdr_string(xdrs, objp, ~0)) { ! return (FALSE); ! } return (TRUE); } bool_t ! xdr_init_params_t(XDR *xdrs, init_params_t *objp) { ! register long *buf; ! if (!xdr_array(xdrs, (char **)&objp->init_params_t_val, (u_int *)&objp->init_params_t_len, ~0, sizeof(string_t), (xdrproc_t)xdr_string_t)) { ! return (FALSE); ! } return (TRUE); } bool_t ! xdr_stmt_info_t(XDR *xdrs, stmt_info_t *objp) { ! register long *buf; ! if (!xdr_string_t(xdrs, &objp->stmt)) { ! return (FALSE); ! } ! if (!xdr_string_t(xdrs, &objp->stmt_name)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->bline)) { ! return (FALSE); ! } ! if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof(stmt_info_t), (xdrproc_t)xdr_stmt_info_t)) { ! return (FALSE); ! } return (TRUE); } bool_t ! xdr_prep_elem_t(XDR *xdrs, prep_elem_t *objp) { ! register long *buf; ! ! if (xdrs->x_op == XDR_ENCODE) { ! buf = XDR_INLINE(xdrs,3 * BYTES_PER_XDR_UNIT); ! if (buf == NULL) { ! if (!xdr_int(xdrs, &objp->type)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->length)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->scale)) { ! return (FALSE); ! } ! ! } ! else { ! IXDR_PUT_LONG(buf,objp->type); ! IXDR_PUT_LONG(buf,objp->length); ! IXDR_PUT_LONG(buf,objp->scale); ! } ! if (!xdr_string_t(xdrs, &objp->name)) { ! return (FALSE); ! } ! if (!xdr_string_t(xdrs, &objp->ind_name)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->nullable)) { ! return (FALSE); ! } ! ! return (TRUE); ! } else if (xdrs->x_op == XDR_DECODE) { ! buf = XDR_INLINE(xdrs,3 * BYTES_PER_XDR_UNIT); ! if (buf == NULL) { ! if (!xdr_int(xdrs, &objp->type)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->length)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->scale)) { ! return (FALSE); ! } ! ! } ! else { ! objp->type = IXDR_GET_LONG(buf); ! objp->length = IXDR_GET_LONG(buf); ! objp->scale = IXDR_GET_LONG(buf); ! } ! if (!xdr_string_t(xdrs, &objp->name)) { ! return (FALSE); ! } ! if (!xdr_string_t(xdrs, &objp->ind_name)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->nullable)) { ! return (FALSE); ! } ! return(TRUE); ! } ! ! if (!xdr_int(xdrs, &objp->type)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->length)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->scale)) { ! return (FALSE); ! } ! if (!xdr_string_t(xdrs, &objp->name)) { ! return (FALSE); ! } ! if (!xdr_string_t(xdrs, &objp->ind_name)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->nullable)) { ! return (FALSE); ! } return (TRUE); } bool_t ! xdr_descr_t(XDR *xdrs, descr_t *objp) { ! register long *buf; ! if (!xdr_array(xdrs, (char **)&objp->descr_t_val, (u_int *)&objp->descr_t_len, ~0, sizeof(prep_elem_t), (xdrproc_t)xdr_prep_elem_t)) { ! return (FALSE); ! } return (TRUE); } bool_t ! xdr_compiled_object_t(XDR *xdrs, compiled_object_t *objp) { ! register long *buf; ! if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof(compiled_object_t), (xdrproc_t)xdr_compiled_object_t)) { ! return (FALSE); ! } ! if (!xdr_descr_t(xdrs, &objp->descr_in)) { ! return (FALSE); ! } ! if (!xdr_descr_t(xdrs, &objp->descr_out)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->object)) { ! return (FALSE); ! } ! if (!xdr_string_t(xdrs, &objp->cursor_name)) { ! return (FALSE); ! } ! if (!xdr_string_t(xdrs, &objp->table_name)) { ! return (FALSE); ! } ! if (!xdr_string_t(xdrs, &objp->table_owner)) { ! return (FALSE); ! } return (TRUE); } bool_t ! xdr_call_subst_t(XDR *xdrs, call_subst_t *objp) { ! register long *buf; ! if (!xdr_string_t(xdrs, &objp->proc_name)) { ! return (FALSE); ! } ! if (!xdr_descr_t(xdrs, &objp->interface)) { ! return (FALSE); ! } ! if (!xdr_descr_t(xdrs, &objp->in_sql_parm)) { ! return (FALSE); ! } ! if (!xdr_descr_t(xdrs, &objp->out_sql_parm)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->object)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->method)) { ! return (FALSE); ! } ! if (!xdr_string_t(xdrs, &objp->jmp_on_error)) { ! return (FALSE); ! } ! if (!xdr_string_t(xdrs, &objp->jmp_on_eofscan)) { ! return (FALSE); ! } return (TRUE); } bool_t ! xdr_call_t(XDR *xdrs, call_t *objp) { ! register long *buf; ! if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof(call_t), (xdrproc_t)xdr_call_t)) { ! return (FALSE); ! } ! if (!xdr_pointer(xdrs, (char **)&objp->subst, sizeof(call_subst_t), (xdrproc_t)xdr_call_subst_t)) { ! return (FALSE); ! } return (TRUE); } bool_t ! xdr_file_buf_t(XDR *xdrs, file_buf_t *objp) { ! register long *buf; ! if (!xdr_string_t(xdrs, &objp->ext)) { ! return (FALSE); ! } ! if (!xdr_string_t(xdrs, &objp->text)) { ! return (FALSE); ! } ! if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof(file_buf_t), (xdrproc_t)xdr_file_buf_t)) { ! return (FALSE); ! } return (TRUE); } bool_t ! xdr_comp_data_t(XDR *xdrs, comp_data_t *objp) { ! register long *buf; ! if (!xdr_int(xdrs, &objp->comp_type)) { ! return (FALSE); ! } switch (objp->comp_type) { case COMP_STATIC: ! if (!xdr_string_t(xdrs, &objp->comp_data_t_u.module)) { ! return (FALSE); ! } break; case COMP_DYNAMIC_CURSOR: ! if (!xdr_int(xdrs, &objp->comp_data_t_u.seg_ptr)) { ! return (FALSE); ! } break; case COMP_DYNAMIC_SIMPLE: ! if (!xdr_int(xdrs, &objp->comp_data_t_u.segm)) { ! return (FALSE); ! } ! break; ! default: break; } return (TRUE); } bool_t ! xdr_compiled_t(XDR *xdrs, compiled_t *objp) { ! register long *buf; ! if (!xdr_int(xdrs, &objp->errors)) { ! return (FALSE); ! } ! if (!xdr_pointer(xdrs, (char **)&objp->bufs, sizeof(file_buf_t), (xdrproc_t)xdr_file_buf_t)) { ! return (FALSE); ! } ! if (!xdr_pointer(xdrs, (char **)&objp->objects, sizeof(compiled_object_t), (xdrproc_t)xdr_compiled_object_t)) { ! return (FALSE); ! } ! if (!xdr_pointer(xdrs, (char **)&objp->calls, sizeof(call_t), (xdrproc_t)xdr_call_t)) { ! return (FALSE); ! } ! if (!xdr_comp_data_t(xdrs, &objp->stored)) { ! return (FALSE); ! } return (TRUE); } bool_t ! xdr_link_cursor_t(XDR *xdrs, link_cursor_t *objp) { ! register long *buf; ! if (!xdr_string_t(xdrs, &objp->cursor_name)) { ! return (FALSE); ! } ! if (!xdr_string_t(xdrs, &objp->stmt_name)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->segment)) { ! return (FALSE); ! } return (TRUE); } bool_t ! xdr_seg_del_t(XDR *xdrs, seg_del_t *objp) { ! register long *buf; ! if (!xdr_int(xdrs, &objp->segment)) { ! return (FALSE); ! } ! if (!xdr_array(xdrs, (char **)&objp->seg_vadr.seg_vadr_val, (u_int *)&objp->seg_vadr.seg_vadr_len, ~0, sizeof(int), (xdrproc_t)xdr_int)) { ! return (FALSE); ! } return (TRUE); } #include "sql_type.h" bool_t ! xdr_data(XDR *xdrs, data *objp) { ! register long *buf; ! if (!xdr_int(xdrs, &objp->type)) { ! return (FALSE); ! } switch (objp->type) { case SQLType_Char: ! if (!xdr_bytes(xdrs, (char **)&objp->data_u.Str.Str_val, (u_int *)&objp->data_u.Str.Str_len, ~0)) { ! return (FALSE); ! } break; case SQLType_Short: ! if (!xdr_short(xdrs, &objp->data_u.Shrt)) { ! return (FALSE); ! } break; case SQLType_Int: ! if (!xdr_int(xdrs, &objp->data_u.Int)) { ! return (FALSE); ! } break; case SQLType_Long: ! if (!xdr_int(xdrs, &objp->data_u.Lng)) { ! return (FALSE); ! } break; case SQLType_Real: ! if (!xdr_float(xdrs, &objp->data_u.Flt)) { ! return (FALSE); ! } break; case SQLType_Double: ! if (!xdr_double(xdrs, &objp->data_u.Dbl)) { ! return (FALSE); ! } ! break; ! default: break; } return (TRUE); } bool_t ! xdr_parm_t(XDR *xdrs, parm_t *objp) { ! register long *buf; ! if (!xdr_data(xdrs, &objp->value)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->indicator)) { ! return (FALSE); ! } return (TRUE); } bool_t ! xdr_parm_row_t(XDR *xdrs, parm_row_t *objp) { ! register long *buf; ! if (!xdr_array(xdrs, (char **)&objp->parm_row_t_val, (u_int *)&objp->parm_row_t_len, ~0, sizeof(parm_t), (xdrproc_t)xdr_parm_t)) { ! return (FALSE); ! } return (TRUE); } bool_t ! xdr_return_data(XDR *xdrs, return_data *objp) { ! register long *buf; ! if (!xdr_int(xdrs, &objp->rett)) { ! return (FALSE); ! } switch (objp->rett) { case RET_COMP: ! if (!xdr_compiled_t(xdrs, &objp->return_data_u.comp_ret)) { ! return (FALSE); ! } break; case RET_ROW: ! if (!xdr_parm_row_t(xdrs, &objp->return_data_u.row)) { ! return (FALSE); ! } break; case RET_TBL: ! if (!xdr_array(xdrs, (char **)&objp->return_data_u.tbl.tbl_val, (u_int *)&objp->return_data_u.tbl.tbl_len, ~0, sizeof(parm_row_t), (xdrproc_t)xdr_parm_row_t)) { ! return (FALSE); ! } break; case RET_SEG: ! if (!xdr_int(xdrs, &objp->return_data_u.segid)) { ! return (FALSE); ! } ! break; ! default: break; } return (TRUE); } bool_t ! xdr_result_t(XDR *xdrs, result_t *objp) { ! register long *buf; ! if (!xdr_int(xdrs, &objp->sqlcode)) { ! return (FALSE); ! } ! if (!xdr_return_data(xdrs, &objp->info)) { ! return (FALSE); ! } ! return (TRUE); ! } ! ! bool_t ! xdr_insn_t(XDR *xdrs, insn_t *objp) ! { ! ! register long *buf; ! ! ! if (xdrs->x_op == XDR_ENCODE) { ! buf = XDR_INLINE(xdrs,4 * BYTES_PER_XDR_UNIT); ! if (buf == NULL) { ! if (!xdr_int(xdrs, &objp->vadr_segm)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->sectnum)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->command)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->options)) { ! return (FALSE); ! } ! ! } ! else { ! IXDR_PUT_LONG(buf,objp->vadr_segm); ! IXDR_PUT_LONG(buf,objp->sectnum); ! IXDR_PUT_LONG(buf,objp->command); ! IXDR_PUT_LONG(buf,objp->options); ! } ! if (!xdr_parm_row_t(xdrs, &objp->parms)) { ! return (FALSE); ! } ! if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof(insn_t), (xdrproc_t)xdr_insn_t)) { ! return (FALSE); ! } ! ! return (TRUE); ! } else if (xdrs->x_op == XDR_DECODE) { ! buf = XDR_INLINE(xdrs,4 * BYTES_PER_XDR_UNIT); ! if (buf == NULL) { ! if (!xdr_int(xdrs, &objp->vadr_segm)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->sectnum)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->command)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->options)) { ! return (FALSE); ! } ! ! } ! else { ! objp->vadr_segm = IXDR_GET_LONG(buf); ! objp->sectnum = IXDR_GET_LONG(buf); ! objp->command = IXDR_GET_LONG(buf); ! objp->options = IXDR_GET_LONG(buf); ! } ! if (!xdr_parm_row_t(xdrs, &objp->parms)) { ! return (FALSE); ! } ! if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof(insn_t), (xdrproc_t)xdr_insn_t)) { ! return (FALSE); ! } ! return(TRUE); ! } ! if (!xdr_int(xdrs, &objp->vadr_segm)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->sectnum)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->command)) { ! return (FALSE); ! } ! if (!xdr_int(xdrs, &objp->options)) { ! return (FALSE); ! } ! if (!xdr_parm_row_t(xdrs, &objp->parms)) { ! return (FALSE); ! } ! if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof(insn_t), (xdrproc_t)xdr_insn_t)) { ! return (FALSE); ! } return (TRUE); } diff -rc gnusql-0.7b5.2/src/other/a2k_p1.c.preserve gnusql-0.7b5.3/src/other/a2k_p1.c.preserve *** gnusql-0.7b5.2/src/other/a2k_p1.c.preserve Mon Apr 28 21:53:37 1997 --- gnusql-0.7b5.3/src/other/a2k_p1.c.preserve Thu Jun 12 16:41:00 1997 *************** *** 1,10 **** /* A lexical scanner generated by flex */ ! /* scanner skeleton version: ! * $Header: /home/horse/u0/vern/flex/RCS/flex.skel,v 2.16 90/08/03 14:09:36 vern Exp Locker: vern $ */ #define FLEX_SCANNER #include --- 1,12 ---- /* A lexical scanner generated by flex */ ! /* Scanner skeleton version: ! * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $ */ #define FLEX_SCANNER + #define YY_FLEX_MAJOR_VERSION 2 + #define YY_FLEX_MINOR_VERSION 5 #include *************** *** 20,44 **** #ifdef __cplusplus #include ! #include ! /* use prototypes in function declarations */ #define YY_USE_PROTOS ! /* the "const" storage-class-modifier is valid */ #define YY_USE_CONST #else /* ! __cplusplus */ ! #ifdef __STDC__ ! ! #ifdef __GNUC__ ! #include ! void *malloc( size_t ); ! void free( void* ); ! #else ! #include ! #endif /* __GNUC__ */ #define YY_USE_PROTOS #define YY_USE_CONST --- 22,38 ---- #ifdef __cplusplus #include ! #include ! /* Use prototypes in function declarations. */ #define YY_USE_PROTOS ! /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ ! #if __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST *************** *** 46,59 **** #endif /* __STDC__ */ #endif /* ! __cplusplus */ - #ifdef __TURBOC__ #define YY_USE_CONST #endif ! ! #ifndef YY_USE_CONST ! #define const #endif --- 40,58 ---- #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use + #include + #include #define YY_USE_CONST + #define YY_USE_PROTOS #endif ! #ifdef YY_USE_CONST ! #define yyconst const ! #else ! #define yyconst #endif *************** *** 61,295 **** #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () - /* we can't get here if it's an ANSI C compiler, or a C++ compiler, - * so it's got to be a K&R compiler, and therefore there's no standard - * place from which to include these definitions - */ - char *malloc(); - int free(); - int read(); - #endif - - - /* amount of stuff to slurp up with each read */ - #ifndef YY_READ_BUF_SIZE - #define YY_READ_BUF_SIZE 8192 #endif ! /* returned upon end-of-file */ ! #define YY_END_TOK 0 ! ! /* copy whatever the last rule matched to the standard output */ ! /* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */ ! /* this used to be an fputs(), but since the string might contain NUL's, ! * we now use fwrite() */ ! #define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout ) ! /* gets input and stuffs it into "buf". number of characters read, or YY_NULL, ! * is returned in "result". */ ! #define YY_INPUT(buf,result,max_size) \ ! if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ ! YY_FATAL_ERROR( "read() in flex scanner failed" ); ! #define YY_NULL 0 ! /* 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. */ ! #define yyterminate() return ( YY_NULL ) ! /* report a fatal error */ ! /* The funky do-while is used to turn this macro definition into ! * a single C statement (which needs a semi-colon terminator). ! * This avoids problems with code like: * ! * if ( something_happens ) ! * YY_FATAL_ERROR( "oops, the something happened" ); * else ! * everything_okay(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all ! * done when it reached the ';' after the YY_FATAL_ERROR() call. */ ! #define YY_FATAL_ERROR(msg) \ do \ { \ ! (void) fputs( msg, stderr ); \ ! (void) putc( '\n', stderr ); \ ! exit( 1 ); \ } \ while ( 0 ) ! /* default yywrap function - always treat EOF as an EOF */ ! #define yywrap() 1 ! /* 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 * - /* 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 \ ! do \ ! { \ ! yy_init_buffer( yy_current_buffer, yyin ); \ ! yy_load_buffer_state(); \ ! } \ ! while ( 0 ) ! /* default declaration of generated scanner - a define so the user can ! * easily add parameters ! */ ! #define YY_DECL int yylex YY_PROTO(( void )) ! /* code executed at the end of each rule */ ! #define YY_BREAK break; ! #define YY_END_OF_BUFFER_CHAR 0 ! #ifndef YY_BUF_SIZE ! #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */ ! #endif ! typedef struct yy_buffer_state *YY_BUFFER_STATE; ! #define FLEX_DEBUG ! #define YY_CHAR unsigned char ! # line 1 "a2k_p1.l" ! #define INITIAL 0 ! # line 2 "a2k_p1.l" ! /* ! * a2k_p1.l - ansi 2 knr processing ! * ! * This file is a part of GNU SQL Server ! * ! * Copyright (c) 1996, 1997, Free Software Foundation, Inc ! * Developed at the Institute of System Programming ! * This file is written by Michael Kimelman. ! * ! * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! * ! * Contact: gss@ispras.ru ! * ! */ ! #include ! /* $Id: a2k_p1.l,v 1.245 1997/03/31 03:46:38 kml Exp $ */ ! #define C_str 1 ! #define C_str1 2 ! #define Skip 3 ! # line 46 "a2k_p1.l" ! /* done after the current pattern has been matched and before the ! * corresponding action - sets up yytext */ ! #define YY_DO_BEFORE_ACTION \ ! yytext = yy_bp; \ ! yyleng = yy_cp - yy_bp; \ ! yy_hold_char = *yy_cp; \ ! *yy_cp = '\0'; \ ! yy_c_buf_p = yy_cp; ! ! #define EOB_ACT_CONTINUE_SCAN 0 ! #define EOB_ACT_END_OF_FILE 1 ! #define EOB_ACT_LAST_MATCH 2 ! ! /* return all but the first 'n' matched characters back to the input stream */ ! #define yyless(n) \ ! do \ ! { \ ! /* undo effects of setting up yytext */ \ ! *yy_cp = yy_hold_char; \ ! yy_c_buf_p = yy_cp = yy_bp + n; \ ! YY_DO_BEFORE_ACTION; /* set up yytext again */ \ ! } \ ! while ( 0 ) - #define unput(c) yyunput( c, yytext ) ! struct yy_buffer_state ! { ! FILE *yy_input_file; - YY_CHAR *yy_ch_buf; /* input buffer */ - YY_CHAR *yy_buf_pos; /* current position in input buffer */ ! /* size of input buffer in bytes, not including room for EOB characters */ ! int yy_buf_size; ! /* number of characters read into yy_ch_buf, not including EOB characters */ ! int yy_n_chars; ! int yy_eof_status; /* whether we've seen an EOF on this buffer */ ! #define EOF_NOT_SEEN 0 ! /* "pending" happens when the EOF has been seen but there's still ! * some text process ! */ ! #define EOF_PENDING 1 ! #define EOF_DONE 2 ! }; ! static YY_BUFFER_STATE yy_current_buffer; ! /* 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" ! */ ! #define YY_CURRENT_BUFFER yy_current_buffer ! /* yy_hold_char holds the character lost when yytext is formed */ ! static YY_CHAR yy_hold_char; ! static int yy_n_chars; /* number of characters read into yy_ch_buf */ - #ifndef YY_USER_ACTION - #define YY_USER_ACTION - #endif ! #ifndef YY_USER_INIT ! #define YY_USER_INIT ! #endif ! extern YY_CHAR *yytext; ! extern int yyleng; ! extern FILE *yyin, *yyout; ! YY_CHAR *yytext; ! int yyleng; ! FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; #define YY_END_OF_BUFFER 42 ! typedef int yy_state_type; ! static const short int yy_accept[189] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 23, --- 60,293 ---- #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #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. */ ! #define YY_BUF_SIZE 16384 ! ! typedef struct yy_buffer_state *YY_BUFFER_STATE; ! ! 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 ! /* The funky do-while in the following #define is used to turn the definition ! * int a single C statement (which needs a semi-colon terminator). This ! * avoids problems with code like: * ! * if ( condition_holds ) ! * yyless( 5 ); * else ! * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all ! * done when it reached the ';' after the yyless() call. */ ! /* Return all but the first 'n' matched characters back to the input stream. */ ! ! #define yyless(n) \ do \ { \ ! /* Undo effects of setting up yytext. */ \ ! *yy_cp = yy_hold_char; \ ! yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ ! YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) ! #define unput(c) yyunput( c, yytext_ptr ) ! /* The following is because we cannot portably get our hands on size_t ! * (without autoconf's help, which isn't available because we want ! * flex-generated scanners to compile on their own). */ ! typedef unsigned int yy_size_t; ! 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; ! /* 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 ! }; ! static YY_BUFFER_STATE yy_current_buffer = 0; ! /* 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". */ ! #define YY_CURRENT_BUFFER yy_current_buffer + /* 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 = 1; /* 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 YY_PROTO(( FILE *input_file )); ! void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); ! void yy_load_buffer_state YY_PROTO(( void )); ! YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); ! void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); ! void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); ! void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); ! #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); + YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str )); + YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + + static void *yy_flex_alloc YY_PROTO(( yy_size_t )); + static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); + static void yy_flex_free YY_PROTO(( void * )); ! #define yy_new_buffer yy_create_buffer ! #define yy_set_interactive(is_interactive) \ ! { \ ! if ( ! yy_current_buffer ) \ ! yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ ! yy_current_buffer->yy_is_interactive = is_interactive; \ ! } + #define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) ! #define FLEX_DEBUG ! typedef unsigned char YY_CHAR; ! FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; ! typedef int yy_state_type; ! #define FLEX_DEBUG ! extern char *yytext; ! #define yytext_ptr yytext ! static yy_state_type yy_get_previous_state YY_PROTO(( void )); ! static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); ! static int yy_get_next_buffer YY_PROTO(( void )); ! static void yy_fatal_error YY_PROTO(( 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 = (int) (yy_cp - yy_bp); \ ! yy_hold_char = *yy_cp; \ ! *yy_cp = '\0'; \ ! yy_c_buf_p = yy_cp; + #define YY_NUM_RULES 41 #define YY_END_OF_BUFFER 42 ! static yyconst short int yy_accept[189] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 23, *************** *** 313,319 **** 35, 14, 32, 0, 35, 34, 34, 0 } ; ! static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, --- 311,317 ---- 35, 14, 32, 0, 35, 34, 34, 0 } ; ! static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, *************** *** 345,358 **** 1, 1, 1, 1, 1 } ; ! static const YY_CHAR yy_meta[28] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 } ; ! static const short int yy_base[202] = { 0, 0, 9, 17, 19, 30, 39, 255, 254, 256, 259, 43, 259, 250, 252, 259, 251, 244, 49, 54, 259, --- 343,356 ---- 1, 1, 1, 1, 1 } ; ! static yyconst int yy_meta[28] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 } ; ! static yyconst short int yy_base[202] = { 0, 0, 9, 17, 19, 30, 39, 255, 254, 256, 259, 43, 259, 250, 252, 259, 251, 244, 49, 54, 259, *************** *** 379,385 **** 158 } ; ! static const short int yy_def[202] = { 0, 189, 189, 190, 190, 191, 191, 192, 192, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, --- 377,383 ---- 158 } ; ! static yyconst short int yy_def[202] = { 0, 189, 189, 190, 190, 191, 191, 192, 192, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, *************** *** 406,412 **** 188 } ; ! static const short int yy_nxt[287] = { 0, 188, 11, 55, 12, 13, 14, 15, 188, 16, 17, 18, 188, 12, 19, 14, 15, 187, 16, 17, 21, --- 404,410 ---- 188 } ; ! static yyconst short int yy_nxt[287] = { 0, 188, 11, 55, 12, 13, 14, 15, 188, 16, 17, 18, 188, 12, 19, 14, 15, 187, 16, 17, 21, *************** *** 441,447 **** 188, 188, 188, 188, 188, 188 } ; ! static const short int yy_chk[287] = { 0, 0, 1, 194, 1, 1, 1, 1, 0, 1, 1, 2, 0, 2, 2, 2, 2, 184, 2, 2, 3, --- 439,445 ---- 188, 188, 188, 188, 188, 188 } ; ! static yyconst short int yy_chk[287] = { 0, 0, 1, 194, 1, 1, 1, 1, 0, 1, 1, 2, 0, 2, 2, 2, 2, 184, 2, 2, 3, *************** *** 477,488 **** } ; static yy_state_type yy_last_accepting_state; ! static YY_CHAR *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 1; ! static const short int yy_rule_linenum[41] = { 0, 51, 52, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 77, --- 475,486 ---- } ; static yy_state_type yy_last_accepting_state; ! static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 1; ! static yyconst short int yy_rule_linenum[41] = { 0, 51, 52, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 77, *************** *** 490,1135 **** 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 } ; ! /* the intent behind this definition is that it'll catch ! * any uses of REJECT which flex missed */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 ! /* these variables are all declared out here so that section 3 code can ! * manipulate them */ - /* points to current character in buffer */ - static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0; - static int yy_init = 1; /* 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; ! static yy_state_type yy_get_previous_state YY_PROTO(( void )); ! static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); ! static int yy_get_next_buffer YY_PROTO(( void )); ! static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr )); ! void yyrestart YY_PROTO(( FILE *input_file )); ! void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); ! void yy_load_buffer_state YY_PROTO(( void )); ! YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); ! void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); ! void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); ! #define yy_new_buffer yy_create_buffer #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif ! YY_DECL ! { ! register yy_state_type yy_current_state; ! register YY_CHAR *yy_cp, *yy_bp; ! register int yy_act; ! ! /********************************************* ! * C lexics * ! *********************************************/ ! if ( yy_init ) ! { ! YY_USER_INIT; ! if ( ! yy_start ) ! yy_start = 1; /* first start state */ ! if ( ! yyin ) ! yyin = stdin; ! if ( ! yyout ) ! yyout = stdout; ! if ( yy_current_buffer ) ! yy_init_buffer( yy_current_buffer, yyin ); ! else ! yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); ! yy_load_buffer_state(); ! yy_init = 0; ! } ! 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; ! if ( yy_bp[-1] == '\n' ) ! ++yy_current_state; ! yy_match: ! do ! { ! register YY_CHAR yy_c = yy_ec[*yy_cp]; ! if ( yy_accept[yy_current_state] ) { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { ! yy_current_state = yy_def[yy_current_state]; ! if ( yy_current_state >= 189 ) ! yy_c = yy_meta[yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ! ++yy_cp; ! } ! while ( yy_current_state != 188 ); ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; yy_find_action: ! yy_act = yy_accept[yy_current_state]; - YY_DO_BEFORE_ACTION; - YY_USER_ACTION; ! do_action: /* this label is used only to access EOF actions */ ! if ( yy_flex_debug ) ! { ! if ( yy_act == 0 ) ! fprintf( stderr, "--scanner backtracking\n" ); ! else if ( yy_act < 41 ) ! fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", ! yy_rule_linenum[yy_act], yytext ); ! else if ( yy_act == 41 ) ! fprintf( stderr, "--accepting default rule (\"%s\")\n", ! yytext ); ! else if ( yy_act == 42 ) ! fprintf( stderr, "--(end of buffer or a NUL)\n" ); ! else ! fprintf( stderr, "--EOF\n" ); ! } ! ! switch ( yy_act ) ! { ! case 0: /* must backtrack */ ! /* undo the effects of YY_DO_BEFORE_ACTION */ ! *yy_cp = yy_hold_char; ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! goto yy_find_action; case 1: ! # line 51 "a2k_p1.l" ECHO; YY_BREAK case 2: ! # line 52 "a2k_p1.l" { ECHO; BEGIN(C_str); } YY_BREAK case 3: ! # line 56 "a2k_p1.l" ECHO; YY_BREAK case 4: ! # line 57 "a2k_p1.l" fputs("/**/",yyout); /* ## --> comments in macro */ YY_BREAK case 5: ! # line 58 "a2k_p1.l" fputs(",",yyout); /* condence spaces in calls */ YY_BREAK case 6: ! # line 59 "a2k_p1.l" fputs("(",yyout); /* ---- // ---- */ YY_BREAK case 7: ! # line 60 "a2k_p1.l" fputs(")",yyout); /* ---- // ---- */ YY_BREAK ! /* adjust cpp directives */ case 8: ! # line 62 "a2k_p1.l" fputs("#if",yyout); YY_BREAK case 9: ! # line 63 "a2k_p1.l" fputs("#ifdef",yyout); YY_BREAK case 10: ! # line 64 "a2k_p1.l" fputs("#else",yyout); YY_BREAK case 11: ! # line 65 "a2k_p1.l" fputs("#endif",yyout); YY_BREAK case 12: ! # line 66 "a2k_p1.l" fputs("#define",yyout); YY_BREAK case 13: ! # line 67 "a2k_p1.l" fputs("#undef",yyout); YY_BREAK case 14: ! # line 68 "a2k_p1.l" { fputs("#include",yyout); BEGIN(Skip); } YY_BREAK case 15: ! # line 69 "a2k_p1.l" { fputs("#pragma",yyout); BEGIN(Skip); } YY_BREAK case 16: ! # line 70 "a2k_p1.l" ! { fputs(" YY_BREAK case 17: ! # line 71 "a2k_p1.l" fputs("#",yyout); YY_BREAK case 18: ! # line 72 "a2k_p1.l" { fprintf(yyout,"\"%s",yytext+1); BEGIN(C_str); } YY_BREAK case 19: ! # line 73 "a2k_p1.l" { ECHO; BEGIN(INITIAL); } YY_BREAK ! /********************************************* * C string recognizer * *********************************************/ case 20: ! # line 77 "a2k_p1.l" { ECHO; } YY_BREAK case 21: ! # line 78 "a2k_p1.l" { ECHO; } YY_BREAK case 22: ! # line 79 "a2k_p1.l" { BEGIN(C_str1); } YY_BREAK case 23: ! # line 80 "a2k_p1.l" { ECHO; } YY_BREAK case 24: ! # line 81 "a2k_p1.l" ; /* waiting */ YY_BREAK case 25: ! # line 82 "a2k_p1.l" ; /* waiting */ YY_BREAK case 26: ! # line 83 "a2k_p1.l" ; /* waiting */ YY_BREAK case 27: ! # line 84 "a2k_p1.l" { BEGIN(C_str); } /* clip strings */ YY_BREAK case 28: ! # line 85 "a2k_p1.l" { fputs("\"\n#if",yyout); BEGIN(INITIAL); } YY_BREAK case 29: ! # line 86 "a2k_p1.l" { fputs("\"\n#ifdef",yyout); BEGIN(INITIAL); } YY_BREAK case 30: ! # line 87 "a2k_p1.l" { fputs("\"\n#else",yyout); BEGIN(INITIAL); } YY_BREAK case 31: ! # line 88 "a2k_p1.l" { fputs("\"\n#endif",yyout); BEGIN(INITIAL); } YY_BREAK case 32: ! # line 89 "a2k_p1.l" { fputs("\"\n#define",yyout); BEGIN(INITIAL); } YY_BREAK case 33: ! # line 90 "a2k_p1.l" { fputs("\"\n#undef",yyout); BEGIN(INITIAL); } YY_BREAK case 34: ! # line 91 "a2k_p1.l" { fputs("\"\n#include",yyout); BEGIN(Skip); } YY_BREAK case 35: ! # line 92 "a2k_p1.l" { fputs("\"\n#pragma",yyout); BEGIN(Skip); } YY_BREAK case 36: ! # line 93 "a2k_p1.l" ! { fputs("\"\n YY_BREAK case 37: ! # line 94 "a2k_p1.l" { fputs("\"\n#",yyout); BEGIN(INITIAL); } YY_BREAK case 38: ! # line 95 "a2k_p1.l" fputs(yytext+1,yyout); /* threw away # and leave name inside string */ YY_BREAK case 39: ! # line 96 "a2k_p1.l" { fputs("\",",yyout); BEGIN(INITIAL); } YY_BREAK case 40: ! # line 97 "a2k_p1.l" { fprintf(yyout,"\"%s",yytext); BEGIN(INITIAL); } YY_BREAK case 41: ! # line 98 "a2k_p1.l" ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(C_str): case YY_STATE_EOF(C_str1): case YY_STATE_EOF(Skip): ! yyterminate(); ! case YY_END_OF_BUFFER: { ! /* amount of text matched not including the EOB char */ ! int yy_amount_of_matched_text = yy_cp - yytext - 1; ! /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; ! /* 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 yyinput(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) ! /* this was really a NUL */ ! { ! yy_state_type yy_next_state; ! ! yy_c_buf_p = yytext + 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 + 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_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! 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 + YY_MORE_ADJ; ! ! yy_act = YY_STATE_EOF((yy_start - 1) / 2); ! 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 + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext + YY_MORE_ADJ; - goto yy_find_action; - } break; } ! default: ! #ifdef FLEX_DEBUG ! printf( "action # %d\n", yy_act ); ! #endif YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); ! } ! } ! } /* yy_get_next_buffer - try to read in a new buffer * ! * synopsis ! * int yy_get_next_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() ! { ! register YY_CHAR *dest = yy_current_buffer->yy_ch_buf; ! register YY_CHAR *source = yytext - 1; /* copy prev. char, too */ ! register int number_to_move, i; ! int ret_val; ! ! if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) ! YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); ! /* try to read more data */ ! /* first move last chars to start of buffer */ ! number_to_move = yy_c_buf_p - yytext; ! for ( i = 0; i < number_to_move; ++i ) ! *(dest++) = *(source++); ! if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN ) ! /* don't do the read, it's not guaranteed to return an EOF, ! * just force an EOF ! */ ! yy_n_chars = 0; ! else ! { ! int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; ! if ( num_to_read > YY_READ_BUF_SIZE ) ! num_to_read = YY_READ_BUF_SIZE; ! else if ( num_to_read <= 0 ) ! YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); ! /* read in more data */ ! YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), ! yy_n_chars, num_to_read ); ! } ! if ( yy_n_chars == 0 ) ! { ! if ( number_to_move - YY_MORE_ADJ == 1 ) ! { ! ret_val = EOB_ACT_END_OF_FILE; ! yy_current_buffer->yy_eof_status = EOF_DONE; ! } ! else ! { ! ret_val = EOB_ACT_LAST_MATCH; ! yy_current_buffer->yy_eof_status = EOF_PENDING; ! } ! } ! else ! ret_val = EOB_ACT_CONTINUE_SCAN; ! yy_n_chars += number_to_move; ! yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; ! yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; ! /* yytext begins at the second character in yy_ch_buf; the first ! * character is the one which preceded it before reading in the latest ! * buffer; it needs to be kept around in case it's a newline, so ! * yy_get_previous_state() will have with '^' rules active ! */ ! yytext = &yy_current_buffer->yy_ch_buf[1]; ! return ( ret_val ); ! } ! /* yy_get_previous_state - get the state just before the EOB char was reached ! * ! * synopsis ! * yy_state_type yy_get_previous_state(); ! */ ! static yy_state_type yy_get_previous_state() ! { ! register yy_state_type yy_current_state; ! register YY_CHAR *yy_cp; ! register YY_CHAR *yy_bp = yytext; ! yy_current_state = yy_start; ! if ( yy_bp[-1] == '\n' ) ! ++yy_current_state; ! for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) ! { ! register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1); ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = yy_def[yy_current_state]; ! if ( yy_current_state >= 189 ) ! yy_c = yy_meta[yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } ! return ( yy_current_state ); ! } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis ! * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS ! static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) ! register yy_state_type yy_current_state; #endif ! { ! register int yy_is_jam; ! register YY_CHAR *yy_cp = yy_c_buf_p; ! register YY_CHAR yy_c = 1; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = yy_def[yy_current_state]; - if ( yy_current_state >= 189 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 188); - - return ( yy_is_jam ? 0 : yy_current_state ); - } #ifdef YY_USE_PROTOS ! static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp ) #else static void yyunput( c, yy_bp ) ! YY_CHAR c; ! register YY_CHAR *yy_bp; #endif ! { ! register YY_CHAR *yy_cp = yy_c_buf_p; ! ! /* undo effects of setting up yytext */ ! *yy_cp = yy_hold_char; ! ! if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) ! { /* need to shift things up to make room */ ! register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */ ! register YY_CHAR *dest = ! &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2]; ! register YY_CHAR *source = ! &yy_current_buffer->yy_ch_buf[number_to_move]; ! ! while ( source > yy_current_buffer->yy_ch_buf ) ! *--dest = *--source; ! ! yy_cp += dest - source; ! yy_bp += dest - source; ! yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) ! YY_FATAL_ERROR( "flex scanner push-back overflow" ); ! } ! if ( yy_cp > yy_bp && yy_cp[-1] == '\n' ) ! yy_cp[-2] = '\n'; ! *--yy_cp = c; ! /* note: the formal parameter *must* be called "yy_bp" for this ! * macro to now work correctly ! */ ! YY_DO_BEFORE_ACTION; /* set up yytext again */ ! } #ifdef __cplusplus --- 488,1382 ---- 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 } ; ! /* The intent behind this definition is that it'll catch ! * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 + char *yytext; ! #define INITIAL 0 ! ! /* ! * a2k_p1.l - ansi 2 knr processing ! * ! * This file is a part of GNU SQL Server ! * ! * Copyright (c) 1996, 1997, Free Software Foundation, Inc ! * Developed at the Institute of System Programming ! * This file is written by Michael Kimelman. ! * ! * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! * ! * Contact: gss@ispras.ru ! * */ ! #include ! ! /* $Id: a2k_p1.l,v 1.245 1997/03/31 03:46:38 kml Exp $ */ ! ! #define C_str 1 ! #define C_str1 2 ! #define Skip 3 ! ! ! /* Macros after this point can all be overridden by user definitions in ! * section 1. */ ! #ifndef YY_SKIP_YYWRAP ! #ifdef __cplusplus ! extern "C" int yywrap YY_PROTO(( void )); ! #else ! extern int yywrap YY_PROTO(( void )); ! #endif ! #endif ! #ifndef YY_NO_UNPUT ! static void yyunput YY_PROTO(( int c, char *buf_ptr )); ! #endif ! ! #ifndef yytext_ptr ! static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); ! #endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif + #endif ! #if YY_STACK_USED ! static int yy_start_stack_ptr = 0; ! static int yy_start_stack_depth = 0; ! static int *yy_start_stack = 0; ! #ifndef YY_NO_PUSH_STATE ! static void yy_push_state YY_PROTO(( int new_state )); ! #endif ! #ifndef YY_NO_POP_STATE ! static void yy_pop_state YY_PROTO(( void )); ! #endif ! #ifndef YY_NO_TOP_STATE ! static int yy_top_state YY_PROTO(( void )); ! #endif + #else + #define YY_NO_PUSH_STATE 1 + #define YY_NO_POP_STATE 1 + #define YY_NO_TOP_STATE 1 + #endif ! #ifdef YY_MALLOC_DECL ! YY_MALLOC_DECL ! #else ! #if __STDC__ ! #ifndef __cplusplus ! #include ! #endif ! #else ! /* Just try to get by without declaring the routines. This will fail ! * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) ! * or sizeof(void*) != sizeof(int). ! */ ! #endif ! #endif ! /* Amount of stuff to slurp up with each read. */ ! #ifndef YY_READ_BUF_SIZE ! #define YY_READ_BUF_SIZE 8192 ! #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 (void) fwrite( yytext, yyleng, 1, yyout ) ! #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->yy_is_interactive ) \ ! { \ ! int c = '*', 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 if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ ! && ferror( yyin ) ) \ ! YY_FATAL_ERROR( "input in flex scanner failed" ); ! #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 ! /* Default declaration of generated scanner - a define so the user can ! * easily add parameters. ! */ ! #ifndef YY_DECL ! #define YY_DECL int yylex YY_PROTO(( void )) ! #endif ! /* 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->yy_at_bol = \ ! (yytext[yyleng - 1] == '\n'); \ ! YY_USER_ACTION ! ! YY_DECL ! { ! register yy_state_type yy_current_state; ! register char *yy_cp, *yy_bp; ! register int yy_act; ! ! ! ! ! /********************************************* ! * C lexics * ! *********************************************/ ! ! if ( yy_init ) { ! yy_init = 0; ! ! #ifdef YY_USER_INIT ! YY_USER_INIT; ! #endif ! ! if ( ! yy_start ) ! yy_start = 1; /* first start state */ ! ! if ( ! yyin ) ! yyin = stdin; ! ! if ( ! yyout ) ! yyout = stdout; ! ! if ( ! yy_current_buffer ) ! yy_current_buffer = ! 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_match: ! do ! { ! register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = (int) yy_def[yy_current_state]; ! if ( yy_current_state >= 189 ) ! yy_c = yy_meta[(unsigned int) yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ! ++yy_cp; ! } ! while ( yy_base[yy_current_state] != 259 ); yy_find_action: ! yy_act = yy_accept[yy_current_state]; ! if ( yy_act == 0 ) ! { /* have to back up */ ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! yy_act = yy_accept[yy_current_state]; ! } ! ! YY_DO_BEFORE_ACTION; ! do_action: /* This label is used only to access EOF actions. */ ! ! if ( yy_flex_debug ) ! { ! if ( yy_act == 0 ) ! fprintf( stderr, "--scanner backing up\n" ); ! else if ( yy_act < 41 ) ! fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", ! yy_rule_linenum[yy_act], yytext ); ! else if ( yy_act == 41 ) ! fprintf( stderr, "--accepting default rule (\"%s\")\n", ! yytext ); ! else if ( yy_act == 42 ) ! fprintf( stderr, "--(end of buffer or a NUL)\n" ); ! else ! fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); ! } ! switch ( yy_act ) ! { /* beginning of action switch */ ! case 0: /* must back up */ ! /* undo the effects of YY_DO_BEFORE_ACTION */ ! *yy_cp = yy_hold_char; ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! goto yy_find_action; case 1: ! YY_RULE_SETUP ! ECHO; YY_BREAK case 2: ! YY_RULE_SETUP ! { ECHO; BEGIN(C_str); } YY_BREAK case 3: ! YY_RULE_SETUP ! ECHO; YY_BREAK case 4: ! YY_RULE_SETUP ! fputs("/**/",yyout); /* ## --> comments in macro */ YY_BREAK case 5: ! YY_RULE_SETUP ! fputs(",",yyout); /* condence spaces in calls */ YY_BREAK case 6: ! YY_RULE_SETUP ! fputs("(",yyout); /* ---- // ---- */ YY_BREAK case 7: ! YY_RULE_SETUP ! fputs(")",yyout); /* ---- // ---- */ YY_BREAK ! /* adjust cpp directives */ case 8: ! YY_RULE_SETUP ! fputs("#if",yyout); YY_BREAK case 9: ! YY_RULE_SETUP ! fputs("#ifdef",yyout); YY_BREAK case 10: ! YY_RULE_SETUP ! fputs("#else",yyout); YY_BREAK case 11: ! YY_RULE_SETUP ! fputs("#endif",yyout); YY_BREAK case 12: ! YY_RULE_SETUP ! fputs("#define",yyout); YY_BREAK case 13: ! YY_RULE_SETUP ! fputs("#undef",yyout); YY_BREAK case 14: ! YY_RULE_SETUP ! { fputs("#include",yyout); BEGIN(Skip); } YY_BREAK case 15: ! YY_RULE_SETUP ! { fputs("#pragma",yyout); BEGIN(Skip); } YY_BREAK case 16: ! YY_RULE_SETUP ! ! { fputs("#line",yyout); BEGIN(Skip); } YY_BREAK case 17: ! YY_RULE_SETUP ! fputs("#",yyout); YY_BREAK case 18: ! YY_RULE_SETUP ! { fprintf(yyout,"\"%s",yytext+1); BEGIN(C_str); } YY_BREAK case 19: ! YY_RULE_SETUP ! { ECHO; BEGIN(INITIAL); } YY_BREAK ! /********************************************* * C string recognizer * *********************************************/ case 20: ! YY_RULE_SETUP ! { ECHO; } YY_BREAK case 21: ! YY_RULE_SETUP ! { ECHO; } YY_BREAK case 22: ! YY_RULE_SETUP ! { BEGIN(C_str1); } YY_BREAK case 23: ! YY_RULE_SETUP ! { ECHO; } YY_BREAK case 24: ! YY_RULE_SETUP ! ; /* waiting */ YY_BREAK case 25: ! YY_RULE_SETUP ! ; /* waiting */ YY_BREAK case 26: ! YY_RULE_SETUP ! ; /* waiting */ YY_BREAK case 27: ! YY_RULE_SETUP ! { BEGIN(C_str); } /* clip strings */ YY_BREAK case 28: ! YY_RULE_SETUP ! { fputs("\"\n#if",yyout); BEGIN(INITIAL); } YY_BREAK case 29: ! YY_RULE_SETUP ! { fputs("\"\n#ifdef",yyout); BEGIN(INITIAL); } YY_BREAK case 30: ! YY_RULE_SETUP ! { fputs("\"\n#else",yyout); BEGIN(INITIAL); } YY_BREAK case 31: ! YY_RULE_SETUP ! { fputs("\"\n#endif",yyout); BEGIN(INITIAL); } YY_BREAK case 32: ! YY_RULE_SETUP ! { fputs("\"\n#define",yyout); BEGIN(INITIAL); } YY_BREAK case 33: ! YY_RULE_SETUP ! { fputs("\"\n#undef",yyout); BEGIN(INITIAL); } YY_BREAK case 34: ! YY_RULE_SETUP ! { fputs("\"\n#include",yyout); BEGIN(Skip); } YY_BREAK case 35: ! YY_RULE_SETUP ! { fputs("\"\n#pragma",yyout); BEGIN(Skip); } YY_BREAK case 36: ! YY_RULE_SETUP ! ! { fputs("\"\n#line",yyout); BEGIN(Skip); } YY_BREAK case 37: ! YY_RULE_SETUP ! { fputs("\"\n#",yyout); BEGIN(INITIAL); } YY_BREAK case 38: ! YY_RULE_SETUP ! fputs(yytext+1,yyout); /* threw away # and leave name inside string */ YY_BREAK case 39: ! YY_RULE_SETUP ! { fputs("\",",yyout); BEGIN(INITIAL); } YY_BREAK case 40: ! YY_RULE_SETUP ! { fprintf(yyout,"\"%s",yytext); BEGIN(INITIAL); } YY_BREAK case 41: ! YY_RULE_SETUP ! ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(C_str): case YY_STATE_EOF(C_str1): case YY_STATE_EOF(Skip): ! 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; ! if ( yy_current_buffer->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->yy_n_chars; ! yy_current_buffer->yy_input_file = yyin; ! yy_current_buffer->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->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->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() + { + register char *dest = yy_current_buffer->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->yy_ch_buf[yy_n_chars + 1] ) ! YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); ! if ( yy_current_buffer->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 singled characater, 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->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_n_chars = 0; ! else ! { ! int num_to_read = ! yy_current_buffer->yy_buf_size - number_to_move - 1; ! while ( num_to_read <= 0 ) ! { /* Not enough room in the buffer - grow it. */ ! #ifdef YY_USES_REJECT ! YY_FATAL_ERROR( ! "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); ! #else ! /* just a shorter name for the current buffer */ ! YY_BUFFER_STATE b = yy_current_buffer; ! int yy_c_buf_p_offset = ! (int) (yy_c_buf_p - b->yy_ch_buf); ! if ( b->yy_is_our_buffer ) ! { ! int new_size = b->yy_buf_size * 2; ! ! if ( new_size <= 0 ) ! b->yy_buf_size += b->yy_buf_size / 8; ! else ! b->yy_buf_size *= 2; ! ! b->yy_ch_buf = (char *) ! /* Include room in for 2 EOB chars. */ ! yy_flex_realloc( (void *) b->yy_ch_buf, ! b->yy_buf_size + 2 ); ! } ! else ! /* Can't grow it, we don't own it. */ ! b->yy_ch_buf = 0; ! if ( ! b->yy_ch_buf ) ! YY_FATAL_ERROR( ! "fatal error - scanner input buffer overflow" ); ! yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; ! num_to_read = yy_current_buffer->yy_buf_size - ! number_to_move - 1; ! #endif ! } ! if ( num_to_read > YY_READ_BUF_SIZE ) ! num_to_read = YY_READ_BUF_SIZE; + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + } ! 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->yy_buffer_status = ! YY_BUFFER_EOF_PENDING; ! } ! } ! else ! ret_val = EOB_ACT_CONTINUE_SCAN; ! yy_n_chars += number_to_move; ! yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; ! yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; ! yytext_ptr = &yy_current_buffer->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() ! { ! register yy_state_type yy_current_state; ! register char *yy_cp; ! ! yy_current_state = yy_start; ! yy_current_state += YY_AT_BOL(); ! ! for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) ! { ! register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = (int) yy_def[yy_current_state]; ! if ( yy_current_state >= 189 ) ! yy_c = yy_meta[(unsigned int) yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ! } ! ! return yy_current_state; ! } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis ! * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS ! static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) ! yy_state_type yy_current_state; #endif + { + register int yy_is_jam; + register char *yy_cp = yy_c_buf_p; ! register YY_CHAR yy_c = 1; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = (int) yy_def[yy_current_state]; ! if ( yy_current_state >= 189 ) ! 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 == 188); ! return yy_is_jam ? 0 : yy_current_state; } + #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS ! static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) ! int c; ! register char *yy_bp; #endif + { + register char *yy_cp = yy_c_buf_p; ! /* undo effects of setting up yytext */ ! *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->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->yy_ch_buf[ ! yy_current_buffer->yy_buf_size + 2]; ! register char *source = ! &yy_current_buffer->yy_ch_buf[number_to_move]; ! ! while ( source > yy_current_buffer->yy_ch_buf ) ! *--dest = *--source; ! ! yy_cp += (int) (dest - source); ! yy_bp += (int) (dest - source); ! yy_n_chars = yy_current_buffer->yy_buf_size; ! if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) ! YY_FATAL_ERROR( "flex scanner push-back overflow" ); ! } ! *--yy_cp = (char) c; ! ! yytext_ptr = yy_bp; ! yy_hold_char = *yy_cp; ! yy_c_buf_p = yy_cp; ! } ! #endif /* ifndef YY_NO_UNPUT */ #ifdef __cplusplus *************** *** 1137,1203 **** #else static int input() #endif - - { - int c; - YY_CHAR *yy_cp = yy_c_buf_p; - - *yy_cp = 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->yy_ch_buf[yy_n_chars] ) ! /* this was really a NUL */ ! *yy_c_buf_p = '\0'; ! else ! { /* need more input */ ! yytext = yy_c_buf_p; ! ++yy_c_buf_p; ! switch ( yy_get_next_buffer() ) { ! case EOB_ACT_END_OF_FILE: ! { ! if ( yywrap() ) ! { ! yy_c_buf_p = yytext + YY_MORE_ADJ; ! return ( EOF ); ! } ! ! YY_NEW_FILE; #ifdef __cplusplus ! return ( yyinput() ); #else ! return ( input() ); #endif ! } ! break; ! case EOB_ACT_CONTINUE_SCAN: ! yy_c_buf_p = yytext + YY_MORE_ADJ; ! break; ! case EOB_ACT_LAST_MATCH: #ifdef __cplusplus ! YY_FATAL_ERROR( "unexpected last match in yyinput()" ); #else ! YY_FATAL_ERROR( "unexpected last match in input()" ); #endif } - } - } ! c = *yy_c_buf_p; ! yy_hold_char = *++yy_c_buf_p; ! return ( c ); ! } #ifdef YY_USE_PROTOS --- 1384,1453 ---- #else static int input() #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->yy_ch_buf[yy_n_chars] ) ! /* This was really a NUL. */ ! *yy_c_buf_p = '\0'; ! ! else ! { /* need more input */ ! yytext_ptr = yy_c_buf_p; ! ++yy_c_buf_p; ! ! switch ( yy_get_next_buffer() ) ! { ! case EOB_ACT_END_OF_FILE: ! { ! if ( yywrap() ) ! { ! yy_c_buf_p = ! yytext_ptr + YY_MORE_ADJ; ! 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 + YY_MORE_ADJ; ! break; ! case EOB_ACT_LAST_MATCH: #ifdef __cplusplus ! YY_FATAL_ERROR( ! "unexpected last match in yyinput()" ); #else ! YY_FATAL_ERROR( ! "unexpected last match in input()" ); #endif + } + } } ! 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->yy_at_bol = (c == '\n'); ! ! return c; ! } #ifdef YY_USE_PROTOS *************** *** 1206,1216 **** void yyrestart( input_file ) FILE *input_file; #endif ! { ! yy_init_buffer( yy_current_buffer, input_file ); ! yy_load_buffer_state(); ! } #ifdef YY_USE_PROTOS --- 1456,1468 ---- void yyrestart( input_file ) FILE *input_file; #endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); ! yy_init_buffer( yy_current_buffer, input_file ); ! yy_load_buffer_state(); ! } #ifdef YY_USE_PROTOS *************** *** 1219,1247 **** void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif - - { - 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->yy_buf_pos = yy_c_buf_p; ! yy_current_buffer->yy_n_chars = yy_n_chars; ! } ! yy_current_buffer = 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; ! } #ifdef YY_USE_PROTOS --- 1471,1498 ---- void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { ! 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->yy_buf_pos = yy_c_buf_p; ! yy_current_buffer->yy_n_chars = yy_n_chars; ! } ! yy_current_buffer = 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; ! } #ifdef YY_USE_PROTOS *************** *** 1249,1261 **** #else void yy_load_buffer_state() #endif ! ! { ! yy_n_chars = yy_current_buffer->yy_n_chars; ! yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos; ! yyin = yy_current_buffer->yy_input_file; ! yy_hold_char = *yy_c_buf_p; ! } #ifdef YY_USE_PROTOS --- 1500,1511 ---- #else void yy_load_buffer_state() #endif ! { ! yy_n_chars = yy_current_buffer->yy_n_chars; ! yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; ! yyin = yy_current_buffer->yy_input_file; ! yy_hold_char = *yy_c_buf_p; ! } #ifdef YY_USE_PROTOS *************** *** 1265,1293 **** FILE *file; int size; #endif ! { ! YY_BUFFER_STATE b; ! ! b = (YY_BUFFER_STATE) malloc( 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 = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) ); ! if ( ! b->yy_ch_buf ) ! YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); ! yy_init_buffer( b, file ); ! return ( b ); ! } #ifdef YY_USE_PROTOS --- 1515,1542 ---- FILE *file; int size; #endif + { + YY_BUFFER_STATE b; ! b = (YY_BUFFER_STATE) yy_flex_alloc( 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 *) yy_flex_alloc( 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; ! } #ifdef YY_USE_PROTOS *************** *** 1296,1311 **** void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif ! { ! if ( b == yy_current_buffer ) ! yy_current_buffer = (YY_BUFFER_STATE) 0; ! free( (char *) b->yy_ch_buf ); ! free( (char *) b ); ! } #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else --- 1545,1570 ---- void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif + { + if ( ! b ) + return; ! if ( b == yy_current_buffer ) ! yy_current_buffer = (YY_BUFFER_STATE) 0; ! if ( b->yy_is_our_buffer ) ! yy_flex_free( (void *) b->yy_ch_buf ); ! ! yy_flex_free( (void *) b ); ! } + #ifndef YY_ALWAYS_INTERACTIVE + #ifndef YY_NEVER_INTERACTIVE + extern int isatty YY_PROTO(( int )); + #endif + #endif + #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else *************** *** 1314,1341 **** FILE *file; #endif - { - b->yy_input_file = file; ! /* we put in the '\n' and start reading from [1] so that an ! * initial match-at-newline will be true. ! */ ! b->yy_ch_buf[0] = '\n'; ! b->yy_n_chars = 1; ! /* 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[1] = YY_END_OF_BUFFER_CHAR; ! b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[1]; ! b->yy_eof_status = EOF_NOT_SEEN; ! } ! # line 98 "a2k_p1.l" --- 1573,1868 ---- FILE *file; #endif ! { ! yy_flush_buffer( b ); ! b->yy_input_file = file; ! b->yy_fill_buffer = 1; ! #if YY_ALWAYS_INTERACTIVE ! b->yy_is_interactive = 1; ! #else ! #if YY_NEVER_INTERACTIVE ! b->yy_is_interactive = 0; ! #else ! b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; ! #endif ! #endif ! } ! #ifdef YY_USE_PROTOS ! void yy_flush_buffer( YY_BUFFER_STATE b ) ! #else ! void yy_flush_buffer( b ) ! YY_BUFFER_STATE b; ! #endif ! ! { ! 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(); ! } ! ! ! #ifndef YY_NO_SCAN_BUFFER ! #ifdef YY_USE_PROTOS ! YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) ! #else ! YY_BUFFER_STATE yy_scan_buffer( base, size ) ! char *base; ! yy_size_t size; ! #endif ! { ! 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) yy_flex_alloc( 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; ! } ! #endif ! ! ! #ifndef YY_NO_SCAN_STRING ! #ifdef YY_USE_PROTOS ! YY_BUFFER_STATE yy_scan_string( yyconst char *str ) ! #else ! YY_BUFFER_STATE yy_scan_string( str ) ! yyconst char *str; ! #endif ! { ! int len; ! for ( len = 0; str[len]; ++len ) ! ; ! ! return yy_scan_bytes( str, len ); ! } ! #endif ! ! ! #ifndef YY_NO_SCAN_BYTES ! #ifdef YY_USE_PROTOS ! YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) ! #else ! YY_BUFFER_STATE yy_scan_bytes( bytes, len ) ! yyconst char *bytes; ! int len; ! #endif ! { ! YY_BUFFER_STATE b; ! char *buf; ! yy_size_t n; ! int i; ! ! /* Get memory for full buffer, including space for trailing EOB's. */ ! n = len + 2; ! buf = (char *) yy_flex_alloc( n ); ! if ( ! buf ) ! YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); ! ! for ( i = 0; i < len; ++i ) ! buf[i] = bytes[i]; ! ! buf[len] = buf[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; ! } ! #endif ! ! ! #ifndef YY_NO_PUSH_STATE ! #ifdef YY_USE_PROTOS ! static void yy_push_state( int new_state ) ! #else ! static void yy_push_state( new_state ) ! int new_state; ! #endif ! { ! if ( yy_start_stack_ptr >= yy_start_stack_depth ) ! { ! yy_size_t new_size; ! ! yy_start_stack_depth += YY_START_STACK_INCR; ! new_size = yy_start_stack_depth * sizeof( int ); ! ! if ( ! yy_start_stack ) ! yy_start_stack = (int *) yy_flex_alloc( new_size ); ! ! else ! yy_start_stack = (int *) yy_flex_realloc( ! (void *) yy_start_stack, new_size ); ! ! if ( ! yy_start_stack ) ! YY_FATAL_ERROR( ! "out of memory expanding start-condition stack" ); ! } ! ! yy_start_stack[yy_start_stack_ptr++] = YY_START; ! ! BEGIN(new_state); ! } ! #endif ! ! ! #ifndef YY_NO_POP_STATE ! static void yy_pop_state() ! { ! if ( --yy_start_stack_ptr < 0 ) ! YY_FATAL_ERROR( "start-condition stack underflow" ); ! ! BEGIN(yy_start_stack[yy_start_stack_ptr]); ! } ! #endif ! ! ! #ifndef YY_NO_TOP_STATE ! static int yy_top_state() ! { ! return yy_start_stack[yy_start_stack_ptr - 1]; ! } ! #endif ! ! #ifndef YY_EXIT_FAILURE ! #define YY_EXIT_FAILURE 2 ! #endif ! ! #ifdef YY_USE_PROTOS ! static void yy_fatal_error( yyconst char msg[] ) ! #else ! static void yy_fatal_error( msg ) ! char msg[]; ! #endif ! { ! (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. */ \ ! yytext[yyleng] = yy_hold_char; \ ! yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ ! yy_hold_char = *yy_c_buf_p; \ ! *yy_c_buf_p = '\0'; \ ! yyleng = n; \ ! } \ ! while ( 0 ) ! ! ! /* Internal utility routines. */ ! ! #ifndef yytext_ptr ! #ifdef YY_USE_PROTOS ! static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) ! #else ! static void yy_flex_strncpy( s1, s2, n ) ! char *s1; ! yyconst char *s2; ! int n; ! #endif ! { ! register int i; ! for ( i = 0; i < n; ++i ) ! s1[i] = s2[i]; ! } ! #endif ! ! ! #ifdef YY_USE_PROTOS ! static void *yy_flex_alloc( yy_size_t size ) ! #else ! static void *yy_flex_alloc( size ) ! yy_size_t size; ! #endif ! { ! return (void *) malloc( size ); ! } ! ! #ifdef YY_USE_PROTOS ! static void *yy_flex_realloc( void *ptr, yy_size_t size ) ! #else ! static void *yy_flex_realloc( ptr, size ) ! void *ptr; ! yy_size_t size; ! #endif ! { ! /* 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 ); ! } ! ! #ifdef YY_USE_PROTOS ! static void yy_flex_free( void *ptr ) ! #else ! static void yy_flex_free( ptr ) ! void *ptr; ! #endif ! { ! free( ptr ); ! } ! ! #if YY_MAIN ! int main() ! { ! yylex(); ! return 0; ! } ! #endif ! *************** *** 1365,1368 **** --- 1892,1898 ---- fclose(yyout); return 0; } + #ifndef yywrap int yywrap() { return 1; } + #endif + /*end of make-dist.tmp.447/gnusql-0.7b5.3/src/other/a2k_p1.c.preserve*/ diff -rc gnusql-0.7b5.2/src/other/vmemory.c gnusql-0.7b5.3/src/other/vmemory.c *** gnusql-0.7b5.2/src/other/vmemory.c Mon Apr 28 21:53:34 1997 --- gnusql-0.7b5.3/src/other/vmemory.c Sun Jun 8 14:29:17 1997 *************** *** 34,42 **** 1. User interface Simululated virtual memory looks from the user point of ! view as a set of VM segments, each of them assotiated with independently compiled or used piece of interpretator code or ! compiler tree (just like object modules in ordinary OS). User can create, link, unlink and store out segments during the program execution. Virtual space is shared by all linked segments and each of them assotiated with it's own range of virtual --- 34,42 ---- 1. User interface Simululated virtual memory looks from the user point of ! view as a set of VM segments, each of them associated with independently compiled or used piece of interpretator code or ! compiler tree (just like object modules in regular OS). User can create, link, unlink and store out segments during the program execution. Virtual space is shared by all linked segments and each of them assotiated with it's own range of virtual diff -rc gnusql-0.7b5.2/src/parse/monitor.c.preserve gnusql-0.7b5.3/src/parse/monitor.c.preserve *** gnusql-0.7b5.2/src/parse/monitor.c.preserve Mon Apr 28 21:53:40 1997 --- gnusql-0.7b5.3/src/parse/monitor.c.preserve Thu Jun 12 16:41:02 1997 *************** *** 1,10 **** /* A lexical scanner generated by flex */ ! /* scanner skeleton version: ! * $Header: /home/horse/u0/vern/flex/RCS/flex.skel,v 2.16 90/08/03 14:09:36 vern Exp Locker: vern $ */ #define FLEX_SCANNER #include --- 1,12 ---- /* A lexical scanner generated by flex */ ! /* Scanner skeleton version: ! * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $ */ #define FLEX_SCANNER + #define YY_FLEX_MAJOR_VERSION 2 + #define YY_FLEX_MINOR_VERSION 5 #include *************** *** 20,44 **** #ifdef __cplusplus #include ! #include ! /* use prototypes in function declarations */ #define YY_USE_PROTOS ! /* the "const" storage-class-modifier is valid */ #define YY_USE_CONST #else /* ! __cplusplus */ ! #ifdef __STDC__ ! ! #ifdef __GNUC__ ! #include ! void *malloc( size_t ); ! void free( void* ); ! #else ! #include ! #endif /* __GNUC__ */ #define YY_USE_PROTOS #define YY_USE_CONST --- 22,38 ---- #ifdef __cplusplus #include ! #include ! /* Use prototypes in function declarations. */ #define YY_USE_PROTOS ! /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ ! #if __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST *************** *** 46,59 **** #endif /* __STDC__ */ #endif /* ! __cplusplus */ - #ifdef __TURBOC__ #define YY_USE_CONST #endif ! ! #ifndef YY_USE_CONST ! #define const #endif --- 40,58 ---- #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use + #include + #include #define YY_USE_CONST + #define YY_USE_PROTOS #endif ! #ifdef YY_USE_CONST ! #define yyconst const ! #else ! #define yyconst #endif *************** *** 61,341 **** #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () - /* we can't get here if it's an ANSI C compiler, or a C++ compiler, - * so it's got to be a K&R compiler, and therefore there's no standard - * place from which to include these definitions - */ - char *malloc(); - int free(); - int read(); - #endif - - - /* amount of stuff to slurp up with each read */ - #ifndef YY_READ_BUF_SIZE - #define YY_READ_BUF_SIZE 8192 #endif ! /* returned upon end-of-file */ ! #define YY_END_TOK 0 ! ! /* copy whatever the last rule matched to the standard output */ ! /* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */ ! /* this used to be an fputs(), but since the string might contain NUL's, ! * we now use fwrite() */ ! #define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout ) ! /* gets input and stuffs it into "buf". number of characters read, or YY_NULL, ! * is returned in "result". */ ! #define YY_INPUT(buf,result,max_size) \ ! if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ ! YY_FATAL_ERROR( "read() in flex scanner failed" ); ! #define YY_NULL 0 ! /* 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. */ ! #define yyterminate() return ( YY_NULL ) ! /* report a fatal error */ ! /* The funky do-while is used to turn this macro definition into ! * a single C statement (which needs a semi-colon terminator). ! * This avoids problems with code like: * ! * if ( something_happens ) ! * YY_FATAL_ERROR( "oops, the something happened" ); * else ! * everything_okay(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all ! * done when it reached the ';' after the YY_FATAL_ERROR() call. ! */ ! ! #define YY_FATAL_ERROR(msg) \ ! do \ ! { \ ! (void) fputs( msg, stderr ); \ ! (void) putc( '\n', stderr ); \ ! exit( 1 ); \ ! } \ ! while ( 0 ) ! ! /* default yywrap function - always treat EOF as an EOF */ ! #define yywrap() 1 ! ! /* 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 * ! /* 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 \ do \ { \ ! yy_init_buffer( yy_current_buffer, yyin ); \ ! yy_load_buffer_state(); \ } \ while ( 0 ) ! /* default declaration of generated scanner - a define so the user can ! * easily add parameters ! */ ! #define YY_DECL int yylex YY_PROTO(( void )) ! ! /* code executed at the end of each rule */ ! #define YY_BREAK break; ! ! #define YY_END_OF_BUFFER_CHAR 0 ! ! #ifndef YY_BUF_SIZE ! #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */ ! #endif ! ! typedef struct yy_buffer_state *YY_BUFFER_STATE; ! #define FLEX_DEBUG ! #define YY_CHAR unsigned char ! # line 1 "monitor.l" ! #define INITIAL 0 ! # line 2 "monitor.l" ! /* ! * monitor.l - DB line monitor ! * ! * $Id: monitor.l,v 1.248 1997/04/03 14:36:10 kml Exp $ ! * ! * This file is a part of GNU SQL Server ! * ! * Copyright (c) 1996, 1997, Free Software Foundation, Inc ! * Developed at the Institute of System Programming, Russia ! * This file is written by Michael Kimelman. ! * ! * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! * ! * Contact: gss@ispras.ru ! * */ ! ! #include "xmem.h" ! #include "sql_decl.h" ! #include "sql.h" ! #include "dyn_funcs.h" ! #include ! - #define SWITCH_COND(cond) { save_condition();BEGIN(cond);} - #define REST_COND rest_condition(); ! #define SCANNER_NAME yylex_extractor ! #ifdef YY_DECL ! # undef YY_DECL ! #endif ! #define YY_DECL i4_t SCANNER_NAME(void) ! YY_DECL; ! #define SQL_PROC(code) if(code){return code;} ! static str_buf c_scanner_buffer={0,0,NULL}; ! #define sql_str(s,l) buffer_string(&c_scanner_buffer,s,l) ! static void save_condition(YY_PROTO(void)); ! static void rest_condition(YY_PROTO(void)); ! static char *statement_scanner_buffer=NULL; ! #define APPEND_BUFFER { sql_str(yytext,yyleng);} ! #define POP_BUFFER pop_cl_buffer() ! #define NEW_LINE {\ ! if (smth_done) fprintf(stderr,"(:%d)>",++line_num);\ ! else fprintf(stderr,"FreeSQL(:%d)>",++line_num); } ! void pop_cl_buffer(void) ! { ! register char *b=sql_str(NULL,0); ! statement_scanner_buffer= (b?savestring(b):NULL); ! } ! #define SQL_str 1 ! #define SQL_comment 2 ! #define Start 3 ! # line 84 "monitor.l" ! /* done after the current pattern has been matched and before the ! * corresponding action - sets up yytext */ ! #define YY_DO_BEFORE_ACTION \ ! yytext = yy_bp; \ ! yyleng = yy_cp - yy_bp; \ ! yy_hold_char = *yy_cp; \ ! *yy_cp = '\0'; \ ! yy_c_buf_p = yy_cp; ! ! #define EOB_ACT_CONTINUE_SCAN 0 ! #define EOB_ACT_END_OF_FILE 1 ! #define EOB_ACT_LAST_MATCH 2 ! ! /* return all but the first 'n' matched characters back to the input stream */ ! #define yyless(n) \ ! do \ ! { \ ! /* undo effects of setting up yytext */ \ ! *yy_cp = yy_hold_char; \ ! yy_c_buf_p = yy_cp = yy_bp + n; \ ! YY_DO_BEFORE_ACTION; /* set up yytext again */ \ ! } \ ! while ( 0 ) - #define unput(c) yyunput( c, yytext ) ! struct yy_buffer_state ! { ! FILE *yy_input_file; - YY_CHAR *yy_ch_buf; /* input buffer */ - YY_CHAR *yy_buf_pos; /* current position in input buffer */ ! /* size of input buffer in bytes, not including room for EOB characters */ ! int yy_buf_size; ! /* number of characters read into yy_ch_buf, not including EOB characters */ ! int yy_n_chars; ! int yy_eof_status; /* whether we've seen an EOF on this buffer */ ! #define EOF_NOT_SEEN 0 ! /* "pending" happens when the EOF has been seen but there's still ! * some text process ! */ ! #define EOF_PENDING 1 ! #define EOF_DONE 2 ! }; ! static YY_BUFFER_STATE yy_current_buffer; ! /* 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" ! */ ! #define YY_CURRENT_BUFFER yy_current_buffer ! /* yy_hold_char holds the character lost when yytext is formed */ ! static YY_CHAR yy_hold_char; ! static int yy_n_chars; /* number of characters read into yy_ch_buf */ - #ifndef YY_USER_ACTION - #define YY_USER_ACTION - #endif ! #ifndef YY_USER_INIT ! #define YY_USER_INIT ! #endif ! extern YY_CHAR *yytext; ! extern int yyleng; ! extern FILE *yyin, *yyout; ! YY_CHAR *yytext; ! int yyleng; ! FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; #define YY_END_OF_BUFFER 17 ! typedef int yy_state_type; ! static const short int yy_accept[29] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 7, 2, 6, 4, 3, 7, 1, 10, 9, 12, 13, 14, 15, 2, 5, 10, 11, 8, 0 } ; ! static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, --- 60,300 ---- #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #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. */ ! #define YY_BUF_SIZE 16384 ! ! typedef struct yy_buffer_state *YY_BUFFER_STATE; ! ! 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 ! /* The funky do-while in the following #define is used to turn the definition ! * int a single C statement (which needs a semi-colon terminator). This ! * avoids problems with code like: * ! * if ( condition_holds ) ! * yyless( 5 ); * else ! * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all ! * done when it reached the ';' after the yyless() call. */ ! /* Return all but the first 'n' matched characters back to the input stream. */ ! #define yyless(n) \ do \ { \ ! /* Undo effects of setting up yytext. */ \ ! *yy_cp = yy_hold_char; \ ! yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ ! YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) ! #define unput(c) yyunput( c, yytext_ptr ) ! /* The following is because we cannot portably get our hands on size_t ! * (without autoconf's help, which isn't available because we want ! * flex-generated scanners to compile on their own). */ ! typedef unsigned int yy_size_t; ! 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; ! /* 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 ! }; ! static YY_BUFFER_STATE yy_current_buffer = 0; ! /* 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". */ ! #define YY_CURRENT_BUFFER yy_current_buffer + /* 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 = 1; /* 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 YY_PROTO(( FILE *input_file )); ! void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); ! void yy_load_buffer_state YY_PROTO(( void )); ! YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); ! void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); ! void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); ! void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); ! #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); + YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str )); + YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + + static void *yy_flex_alloc YY_PROTO(( yy_size_t )); + static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); + static void yy_flex_free YY_PROTO(( void * )); ! #define yy_new_buffer yy_create_buffer ! #define yy_set_interactive(is_interactive) \ ! { \ ! if ( ! yy_current_buffer ) \ ! yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ ! yy_current_buffer->yy_is_interactive = is_interactive; \ ! } + #define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) ! #define FLEX_DEBUG ! typedef unsigned char YY_CHAR; ! FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; ! typedef int yy_state_type; ! #define FLEX_DEBUG ! extern char *yytext; ! #define yytext_ptr yytext ! static yy_state_type yy_get_previous_state YY_PROTO(( void )); ! static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); ! static int yy_get_next_buffer YY_PROTO(( void )); ! static void yy_fatal_error YY_PROTO(( 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 = (int) (yy_cp - yy_bp); \ ! yy_hold_char = *yy_cp; \ ! *yy_cp = '\0'; \ ! yy_c_buf_p = yy_cp; + #define YY_NUM_RULES 16 #define YY_END_OF_BUFFER 17 ! static yyconst short int yy_accept[29] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 7, 2, 6, 4, 3, 7, 1, 10, 9, 12, 13, 14, 15, 2, 5, 10, 11, 8, 0 } ; ! static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, *************** *** 367,392 **** 1, 1, 1, 1, 1 } ; ! static const YY_CHAR yy_meta[8] = { 0, 1, 1, 2, 2, 2, 1, 1 } ; ! static const short int yy_base[31] = { 0, 0, 0, 7, 0, 22, 21, 0, 0, 23, 26, 20, 26, 26, 26, 15, 26, 0, 26, 16, 14, 26, 26, 16, 26, 0, 26, 26, 26, 14, 16 } ; ! static const short int yy_def[31] = { 0, 28, 1, 28, 3, 29, 29, 1, 1, 28, 28, 28, 28, 28, 28, 28, 28, 30, 28, 28, 28, 28, 28, 28, 28, 30, 28, 28, 0, 28, 28 } ; ! static const short int yy_nxt[34] = { 0, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 19, 20, 17, 17, 21, 21, 25, 23, 27, 26, --- 326,351 ---- 1, 1, 1, 1, 1 } ; ! static yyconst int yy_meta[8] = { 0, 1, 1, 2, 2, 2, 1, 1 } ; ! static yyconst short int yy_base[31] = { 0, 0, 0, 7, 0, 22, 21, 0, 0, 23, 26, 20, 26, 26, 26, 15, 26, 0, 26, 16, 14, 26, 26, 16, 26, 0, 26, 26, 26, 14, 16 } ; ! static yyconst short int yy_def[31] = { 0, 28, 1, 28, 3, 29, 29, 1, 1, 28, 28, 28, 28, 28, 28, 28, 28, 30, 28, 28, 28, 28, 28, 28, 28, 30, 28, 28, 0, 28, 28 } ; ! static yyconst short int yy_nxt[34] = { 0, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 19, 20, 17, 17, 21, 21, 25, 23, 27, 26, *************** *** 394,400 **** 28, 28, 28 } ; ! static const short int yy_chk[34] = { 0, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 29, 29, 30, 23, 20, 19, --- 353,359 ---- 28, 28, 28 } ; ! static yyconst short int yy_chk[34] = { 0, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 29, 29, 30, 23, 20, 19, *************** *** 403,463 **** } ; static yy_state_type yy_last_accepting_state; ! static YY_CHAR *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 1; ! static const short int yy_rule_linenum[16] = { 0, 93, 97, 98, 103, 109, 112, 119, 126, 127, 132, 133, 134, 142, 152, 153 } ; ! /* the intent behind this definition is that it'll catch ! * any uses of REJECT which flex missed */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 ! /* these variables are all declared out here so that section 3 code can ! * manipulate them ! */ ! /* points to current character in buffer */ ! static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0; ! static int yy_init = 1; /* 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; ! static yy_state_type yy_get_previous_state YY_PROTO(( void )); ! static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); ! static int yy_get_next_buffer YY_PROTO(( void )); ! static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr )); ! void yyrestart YY_PROTO(( FILE *input_file )); ! void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); ! void yy_load_buffer_state YY_PROTO(( void )); ! YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); ! void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); ! void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); ! #define yy_new_buffer yy_create_buffer ! #ifdef __cplusplus ! static int yyinput YY_PROTO(( void )); ! #else ! static int input YY_PROTO(( void )); #endif - YY_DECL - { - register yy_state_type yy_current_state; - register YY_CHAR *yy_cp, *yy_bp; - register int yy_act; i4_t sql_str_d_quote=0; --- 362,609 ---- } ; static yy_state_type yy_last_accepting_state; ! static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 1; ! static yyconst short int yy_rule_linenum[16] = { 0, 93, 97, 98, 103, 109, 112, 119, 126, 127, 132, 133, 134, 142, 152, 153 } ; ! /* The intent behind this definition is that it'll catch ! * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 + char *yytext; ! #define INITIAL 0 ! /* ! * monitor.l - DB line monitor ! * ! * $Id: monitor.l,v 1.248 1997/04/03 14:36:10 kml Exp $ ! * ! * This file is a part of GNU SQL Server ! * ! * Copyright (c) 1996, 1997, Free Software Foundation, Inc ! * Developed at the Institute of System Programming, Russia ! * This file is written by Michael Kimelman. ! * ! * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! * ! * Contact: gss@ispras.ru ! * */ ! ! #include "xmem.h" ! #include "sql_decl.h" ! #include "sql.h" ! #include "dyn_funcs.h" ! #include ! ! #define SWITCH_COND(cond) { save_condition();BEGIN(cond);} ! #define REST_COND rest_condition(); ! #define SCANNER_NAME yylex_extractor ! #ifdef YY_DECL ! # undef YY_DECL #endif + #define YY_DECL i4_t SCANNER_NAME(void) + + YY_DECL; + + #define SQL_PROC(code) if(code){return code;} + + static str_buf c_scanner_buffer={0,0,NULL}; + #define sql_str(s,l) buffer_string(&c_scanner_buffer,s,l) + + static void save_condition(YY_PROTO(void)); + static void rest_condition(YY_PROTO(void)); + + static char *statement_scanner_buffer=NULL; + + #define APPEND_BUFFER { sql_str(yytext,yyleng);} + #define POP_BUFFER pop_cl_buffer() + #define NEW_LINE {\ + if (smth_done) fprintf(stderr,"(:%d)>",++line_num);\ + else fprintf(stderr,"FreeSQL(:%d)>",++line_num); } + + void pop_cl_buffer(void) + { + register char *b=sql_str(NULL,0); + statement_scanner_buffer= (b?savestring(b):NULL); + } + + #define SQL_str 1 + #define SQL_comment 2 + + #define Start 3 + + + /* Macros after this point can all be overridden by user definitions in + * section 1. + */ + + #ifndef YY_SKIP_YYWRAP + #ifdef __cplusplus + extern "C" int yywrap YY_PROTO(( void )); + #else + extern int yywrap YY_PROTO(( void )); + #endif + #endif + + #ifndef YY_NO_UNPUT + static void yyunput YY_PROTO(( int c, char *buf_ptr )); + #endif + + #ifndef yytext_ptr + static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); + #endif + + #ifndef YY_NO_INPUT + #ifdef __cplusplus + static int yyinput YY_PROTO(( void )); + #else + static int input YY_PROTO(( void )); + #endif + #endif + + #if YY_STACK_USED + static int yy_start_stack_ptr = 0; + static int yy_start_stack_depth = 0; + static int *yy_start_stack = 0; + #ifndef YY_NO_PUSH_STATE + static void yy_push_state YY_PROTO(( int new_state )); + #endif + #ifndef YY_NO_POP_STATE + static void yy_pop_state YY_PROTO(( void )); + #endif + #ifndef YY_NO_TOP_STATE + static int yy_top_state YY_PROTO(( void )); + #endif + + #else + #define YY_NO_PUSH_STATE 1 + #define YY_NO_POP_STATE 1 + #define YY_NO_TOP_STATE 1 + #endif + + #ifdef YY_MALLOC_DECL + YY_MALLOC_DECL + #else + #if __STDC__ + #ifndef __cplusplus + #include + #endif + #else + /* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ + #endif + #endif + + /* Amount of stuff to slurp up with each read. */ + #ifndef YY_READ_BUF_SIZE + #define YY_READ_BUF_SIZE 8192 + #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 (void) fwrite( yytext, yyleng, 1, yyout ) + #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->yy_is_interactive ) \ + { \ + int c = '*', 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 if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); + #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 + + /* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ + #ifndef YY_DECL + #define YY_DECL int yylex YY_PROTO(( void )) + #endif + + /* 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 \ + YY_USER_ACTION + + YY_DECL + { + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; i4_t sql_str_d_quote=0; *************** *** 469,578 **** * lexics of embedded SQL in C * *********************************************/ ! if ( yy_init ) ! { ! YY_USER_INIT; ! if ( ! yy_start ) ! yy_start = 1; /* first start state */ ! if ( ! yyin ) ! yyin = stdin; ! if ( ! yyout ) ! yyout = stdout; ! if ( yy_current_buffer ) ! yy_init_buffer( yy_current_buffer, yyin ); ! else ! yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); ! yy_load_buffer_state(); ! yy_init = 0; ! } ! 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_match: ! do ! { ! register YY_CHAR yy_c = yy_ec[*yy_cp]; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = yy_def[yy_current_state]; ! if ( yy_current_state >= 29 ) ! yy_c = yy_meta[yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ! ++yy_cp; ! } ! while ( yy_current_state != 28 ); ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; yy_find_action: ! yy_act = yy_accept[yy_current_state]; - YY_DO_BEFORE_ACTION; - YY_USER_ACTION; ! do_action: /* this label is used only to access EOF actions */ ! if ( yy_flex_debug ) ! { ! if ( yy_act == 0 ) ! fprintf( stderr, "--scanner backtracking\n" ); ! else if ( yy_act < 16 ) ! fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", ! yy_rule_linenum[yy_act], yytext ); ! else if ( yy_act == 16 ) ! fprintf( stderr, "--accepting default rule (\"%s\")\n", ! yytext ); ! else if ( yy_act == 17 ) ! fprintf( stderr, "--(end of buffer or a NUL)\n" ); ! else ! fprintf( stderr, "--EOF\n" ); ! } ! ! switch ( yy_act ) ! { ! case 0: /* must backtrack */ ! /* undo the effects of YY_DO_BEFORE_ACTION */ ! *yy_cp = yy_hold_char; ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! goto yy_find_action; case 1: ! # line 93 "monitor.l" { POP_BUFFER; SQL_PROC(1); } YY_BREAK case 2: ! # line 97 "monitor.l" { if(smth_done) { APPEND_BUFFER; } } YY_BREAK case 3: ! # line 98 "monitor.l" { APPEND_BUFFER; smth_done = 1; --- 615,732 ---- * lexics of embedded SQL in C * *********************************************/ ! if ( yy_init ) ! { ! yy_init = 0; ! #ifdef YY_USER_INIT ! YY_USER_INIT; ! #endif ! if ( ! yy_start ) ! yy_start = 1; /* first start state */ ! if ( ! yyin ) ! yyin = stdin; ! if ( ! yyout ) ! yyout = stdout; ! if ( ! yy_current_buffer ) ! yy_current_buffer = ! 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_match: ! do ! { ! register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = (int) yy_def[yy_current_state]; ! if ( yy_current_state >= 29 ) ! yy_c = yy_meta[(unsigned int) yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ! ++yy_cp; ! } ! while ( yy_base[yy_current_state] != 26 ); yy_find_action: ! yy_act = yy_accept[yy_current_state]; ! if ( yy_act == 0 ) ! { /* have to back up */ ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! yy_act = yy_accept[yy_current_state]; ! } ! ! YY_DO_BEFORE_ACTION; ! do_action: /* This label is used only to access EOF actions. */ ! if ( yy_flex_debug ) ! { ! if ( yy_act == 0 ) ! fprintf( stderr, "--scanner backing up\n" ); ! else if ( yy_act < 16 ) ! fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", ! yy_rule_linenum[yy_act], yytext ); ! else if ( yy_act == 16 ) ! fprintf( stderr, "--accepting default rule (\"%s\")\n", ! yytext ); ! else if ( yy_act == 17 ) ! fprintf( stderr, "--(end of buffer or a NUL)\n" ); ! else ! fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); ! } ! ! switch ( yy_act ) ! { /* beginning of action switch */ ! case 0: /* must back up */ ! /* undo the effects of YY_DO_BEFORE_ACTION */ ! *yy_cp = yy_hold_char; ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! goto yy_find_action; case 1: ! YY_RULE_SETUP ! { POP_BUFFER; SQL_PROC(1); } YY_BREAK case 2: ! YY_RULE_SETUP ! { if(smth_done) { APPEND_BUFFER; } } YY_BREAK case 3: ! YY_RULE_SETUP ! { APPEND_BUFFER; smth_done = 1; *************** *** 580,586 **** } YY_BREAK case 4: ! # line 103 "monitor.l" { APPEND_BUFFER; smth_done = 1; --- 734,741 ---- } YY_BREAK case 4: ! YY_RULE_SETUP ! { APPEND_BUFFER; smth_done = 1; *************** *** 589,601 **** } YY_BREAK case 5: ! # line 109 "monitor.l" { SWITCH_COND(SQL_comment); } YY_BREAK case 6: ! # line 112 "monitor.l" { if (smth_done) { --- 744,758 ---- } YY_BREAK case 5: ! YY_RULE_SETUP ! { SWITCH_COND(SQL_comment); } YY_BREAK case 6: ! YY_RULE_SETUP ! { if (smth_done) { *************** *** 605,625 **** } YY_BREAK case 7: ! # line 119 "monitor.l" { APPEND_BUFFER; smth_done = 1; } YY_BREAK ! /********************************************* * SQL string recognizer * *********************************************/ case 8: ! # line 126 "monitor.l" { APPEND_BUFFER; } YY_BREAK case 9: ! # line 127 "monitor.l" { yyerror(" Unterminated SQL string "); NEW_LINE; --- 762,785 ---- } YY_BREAK case 7: ! YY_RULE_SETUP ! { APPEND_BUFFER; smth_done = 1; } YY_BREAK ! /********************************************* * SQL string recognizer * *********************************************/ case 8: ! YY_RULE_SETUP ! { APPEND_BUFFER; } YY_BREAK case 9: ! YY_RULE_SETUP ! { yyerror(" Unterminated SQL string "); NEW_LINE; *************** *** 627,641 **** } YY_BREAK case 10: ! # line 132 "monitor.l" { APPEND_BUFFER; } YY_BREAK case 11: ! # line 133 "monitor.l" { APPEND_BUFFER; } YY_BREAK case 12: ! # line 134 "monitor.l" { APPEND_BUFFER ; if(sql_str_d_quote) --- 787,804 ---- } YY_BREAK case 10: ! YY_RULE_SETUP ! { APPEND_BUFFER; } YY_BREAK case 11: ! YY_RULE_SETUP ! { APPEND_BUFFER; } YY_BREAK case 12: ! YY_RULE_SETUP ! { APPEND_BUFFER ; if(sql_str_d_quote) *************** *** 646,652 **** } YY_BREAK case 13: ! # line 142 "monitor.l" { APPEND_BUFFER; if(!sql_str_d_quote) --- 809,816 ---- } YY_BREAK case 13: ! YY_RULE_SETUP ! { APPEND_BUFFER; if(!sql_str_d_quote) *************** *** 655,999 **** } } YY_BREAK ! /********************************************* * SQL comment recognizer * *********************************************/ case 14: ! # line 152 "monitor.l" /* do nothing */; YY_BREAK case 15: ! # line 153 "monitor.l" { NEW_LINE; REST_COND; } YY_BREAK case 16: ! # line 157 "monitor.l" ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(SQL_str): case YY_STATE_EOF(SQL_comment): case YY_STATE_EOF(Start): ! yyterminate(); ! case YY_END_OF_BUFFER: { ! /* amount of text matched not including the EOB char */ ! int yy_amount_of_matched_text = yy_cp - yytext - 1; ! /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; ! /* 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 yyinput(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) ! /* this was really a NUL */ ! { ! yy_state_type yy_next_state; ! yy_c_buf_p = yytext + 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 + 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_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! 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 + YY_MORE_ADJ; ! ! yy_act = YY_STATE_EOF((yy_start - 1) / 2); ! 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 + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext + YY_MORE_ADJ; - goto yy_find_action; - } break; } ! default: ! #ifdef FLEX_DEBUG ! printf( "action # %d\n", yy_act ); ! #endif YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); ! } ! } ! } /* yy_get_next_buffer - try to read in a new buffer * ! * synopsis ! * int yy_get_next_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() ! { ! register YY_CHAR *dest = yy_current_buffer->yy_ch_buf; ! register YY_CHAR *source = yytext - 1; /* copy prev. char, too */ ! register int number_to_move, i; ! int ret_val; ! ! if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) ! YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); ! /* try to read more data */ ! /* first move last chars to start of buffer */ ! number_to_move = yy_c_buf_p - yytext; ! for ( i = 0; i < number_to_move; ++i ) ! *(dest++) = *(source++); ! if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN ) ! /* don't do the read, it's not guaranteed to return an EOF, ! * just force an EOF ! */ ! yy_n_chars = 0; ! else ! { ! int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; ! if ( num_to_read > YY_READ_BUF_SIZE ) ! num_to_read = YY_READ_BUF_SIZE; ! else if ( num_to_read <= 0 ) ! YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); ! /* read in more data */ ! YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), ! yy_n_chars, num_to_read ); ! } ! if ( yy_n_chars == 0 ) ! { ! if ( number_to_move - YY_MORE_ADJ == 1 ) ! { ! ret_val = EOB_ACT_END_OF_FILE; ! yy_current_buffer->yy_eof_status = EOF_DONE; ! } ! else ! { ! ret_val = EOB_ACT_LAST_MATCH; ! yy_current_buffer->yy_eof_status = EOF_PENDING; ! } ! } ! else ! ret_val = EOB_ACT_CONTINUE_SCAN; ! yy_n_chars += number_to_move; ! yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; ! yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; ! /* yytext begins at the second character in yy_ch_buf; the first ! * character is the one which preceded it before reading in the latest ! * buffer; it needs to be kept around in case it's a newline, so ! * yy_get_previous_state() will have with '^' rules active ! */ ! yytext = &yy_current_buffer->yy_ch_buf[1]; ! return ( ret_val ); ! } ! /* yy_get_previous_state - get the state just before the EOB char was reached ! * ! * synopsis ! * yy_state_type yy_get_previous_state(); ! */ ! static yy_state_type yy_get_previous_state() ! { ! register yy_state_type yy_current_state; ! register YY_CHAR *yy_cp; ! yy_current_state = yy_start; ! for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) ! { ! register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1); ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = yy_def[yy_current_state]; ! if ( yy_current_state >= 29 ) ! yy_c = yy_meta[yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } ! return ( yy_current_state ); ! } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis ! * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS ! static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) ! register yy_state_type yy_current_state; #endif ! { ! register int yy_is_jam; ! register YY_CHAR *yy_cp = yy_c_buf_p; ! register YY_CHAR yy_c = 1; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = yy_def[yy_current_state]; - if ( yy_current_state >= 29 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 28); - - return ( yy_is_jam ? 0 : yy_current_state ); - } #ifdef YY_USE_PROTOS ! static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp ) #else static void yyunput( c, yy_bp ) ! YY_CHAR c; ! register YY_CHAR *yy_bp; #endif ! { ! register YY_CHAR *yy_cp = yy_c_buf_p; ! ! /* undo effects of setting up yytext */ ! *yy_cp = yy_hold_char; ! ! if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) ! { /* need to shift things up to make room */ ! register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */ ! register YY_CHAR *dest = ! &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2]; ! register YY_CHAR *source = ! &yy_current_buffer->yy_ch_buf[number_to_move]; ! ! while ( source > yy_current_buffer->yy_ch_buf ) ! *--dest = *--source; ! ! yy_cp += dest - source; ! yy_bp += dest - source; ! yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) ! YY_FATAL_ERROR( "flex scanner push-back overflow" ); ! } ! if ( yy_cp > yy_bp && yy_cp[-1] == '\n' ) ! yy_cp[-2] = '\n'; - *--yy_cp = c; ! /* note: the formal parameter *must* be called "yy_bp" for this ! * macro to now work correctly ! */ ! YY_DO_BEFORE_ACTION; /* set up yytext again */ ! } #ifdef __cplusplus --- 819,1223 ---- } } YY_BREAK ! /********************************************* * SQL comment recognizer * *********************************************/ case 14: ! YY_RULE_SETUP ! /* do nothing */; YY_BREAK case 15: ! YY_RULE_SETUP ! { NEW_LINE; REST_COND; } YY_BREAK case 16: ! YY_RULE_SETUP ! ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(SQL_str): case YY_STATE_EOF(SQL_comment): case YY_STATE_EOF(Start): ! 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; ! if ( yy_current_buffer->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->yy_n_chars; ! yy_current_buffer->yy_input_file = yyin; ! yy_current_buffer->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->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->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() + { + register char *dest = yy_current_buffer->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->yy_ch_buf[yy_n_chars + 1] ) ! YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); ! if ( yy_current_buffer->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 singled characater, 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->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_n_chars = 0; ! else ! { ! int num_to_read = ! yy_current_buffer->yy_buf_size - number_to_move - 1; ! while ( num_to_read <= 0 ) ! { /* Not enough room in the buffer - grow it. */ ! #ifdef YY_USES_REJECT ! YY_FATAL_ERROR( ! "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); ! #else ! /* just a shorter name for the current buffer */ ! YY_BUFFER_STATE b = yy_current_buffer; ! int yy_c_buf_p_offset = ! (int) (yy_c_buf_p - b->yy_ch_buf); ! if ( b->yy_is_our_buffer ) ! { ! int new_size = b->yy_buf_size * 2; ! ! if ( new_size <= 0 ) ! b->yy_buf_size += b->yy_buf_size / 8; ! else ! b->yy_buf_size *= 2; ! ! b->yy_ch_buf = (char *) ! /* Include room in for 2 EOB chars. */ ! yy_flex_realloc( (void *) b->yy_ch_buf, ! b->yy_buf_size + 2 ); ! } ! else ! /* Can't grow it, we don't own it. */ ! b->yy_ch_buf = 0; ! if ( ! b->yy_ch_buf ) ! YY_FATAL_ERROR( ! "fatal error - scanner input buffer overflow" ); ! yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; ! num_to_read = yy_current_buffer->yy_buf_size - ! number_to_move - 1; ! #endif ! } ! if ( num_to_read > YY_READ_BUF_SIZE ) ! num_to_read = YY_READ_BUF_SIZE; + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + } ! 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->yy_buffer_status = ! YY_BUFFER_EOF_PENDING; ! } ! } ! else ! ret_val = EOB_ACT_CONTINUE_SCAN; ! yy_n_chars += number_to_move; ! yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; ! yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; ! yytext_ptr = &yy_current_buffer->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() ! { ! register yy_state_type yy_current_state; ! register char *yy_cp; ! ! yy_current_state = yy_start; ! ! 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); ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = (int) yy_def[yy_current_state]; ! if ( yy_current_state >= 29 ) ! yy_c = yy_meta[(unsigned int) yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ! } ! ! return yy_current_state; ! } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis ! * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS ! static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) ! yy_state_type yy_current_state; #endif + { + register int yy_is_jam; + register char *yy_cp = yy_c_buf_p; ! register YY_CHAR yy_c = 1; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = (int) yy_def[yy_current_state]; ! if ( yy_current_state >= 29 ) ! 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 == 28); ! return yy_is_jam ? 0 : yy_current_state; } + #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS ! static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) ! int c; ! register char *yy_bp; #endif + { + register char *yy_cp = yy_c_buf_p; ! /* undo effects of setting up yytext */ ! *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->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->yy_ch_buf[ ! yy_current_buffer->yy_buf_size + 2]; ! register char *source = ! &yy_current_buffer->yy_ch_buf[number_to_move]; ! ! while ( source > yy_current_buffer->yy_ch_buf ) ! *--dest = *--source; ! ! yy_cp += (int) (dest - source); ! yy_bp += (int) (dest - source); ! yy_n_chars = yy_current_buffer->yy_buf_size; ! ! if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) ! YY_FATAL_ERROR( "flex scanner push-back overflow" ); ! } ! *--yy_cp = (char) c; ! yytext_ptr = yy_bp; ! yy_hold_char = *yy_cp; ! yy_c_buf_p = yy_cp; ! } ! #endif /* ifndef YY_NO_UNPUT */ #ifdef __cplusplus *************** *** 1001,1067 **** #else static int input() #endif - - { - int c; - YY_CHAR *yy_cp = yy_c_buf_p; - - *yy_cp = 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->yy_ch_buf[yy_n_chars] ) ! /* this was really a NUL */ ! *yy_c_buf_p = '\0'; ! else ! { /* need more input */ ! yytext = yy_c_buf_p; ! ++yy_c_buf_p; ! switch ( yy_get_next_buffer() ) { ! case EOB_ACT_END_OF_FILE: ! { ! if ( yywrap() ) ! { ! yy_c_buf_p = yytext + YY_MORE_ADJ; ! return ( EOF ); ! } ! ! YY_NEW_FILE; #ifdef __cplusplus ! return ( yyinput() ); #else ! return ( input() ); #endif ! } ! break; ! case EOB_ACT_CONTINUE_SCAN: ! yy_c_buf_p = yytext + YY_MORE_ADJ; ! break; ! case EOB_ACT_LAST_MATCH: #ifdef __cplusplus ! YY_FATAL_ERROR( "unexpected last match in yyinput()" ); #else ! YY_FATAL_ERROR( "unexpected last match in input()" ); #endif } - } - } ! c = *yy_c_buf_p; ! yy_hold_char = *++yy_c_buf_p; ! return ( c ); ! } #ifdef YY_USE_PROTOS --- 1225,1293 ---- #else static int input() #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->yy_ch_buf[yy_n_chars] ) ! /* This was really a NUL. */ ! *yy_c_buf_p = '\0'; ! ! else ! { /* need more input */ ! yytext_ptr = yy_c_buf_p; ! ++yy_c_buf_p; ! ! switch ( yy_get_next_buffer() ) ! { ! case EOB_ACT_END_OF_FILE: ! { ! if ( yywrap() ) ! { ! yy_c_buf_p = ! yytext_ptr + YY_MORE_ADJ; ! 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 + YY_MORE_ADJ; ! break; ! case EOB_ACT_LAST_MATCH: #ifdef __cplusplus ! YY_FATAL_ERROR( ! "unexpected last match in yyinput()" ); #else ! YY_FATAL_ERROR( ! "unexpected last match in input()" ); #endif + } + } } ! c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ ! *yy_c_buf_p = '\0'; /* preserve yytext */ ! yy_hold_char = *++yy_c_buf_p; ! ! return c; ! } #ifdef YY_USE_PROTOS *************** *** 1070,1080 **** void yyrestart( input_file ) FILE *input_file; #endif ! { ! yy_init_buffer( yy_current_buffer, input_file ); ! yy_load_buffer_state(); ! } #ifdef YY_USE_PROTOS --- 1296,1308 ---- void yyrestart( input_file ) FILE *input_file; #endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); ! yy_init_buffer( yy_current_buffer, input_file ); ! yy_load_buffer_state(); ! } #ifdef YY_USE_PROTOS *************** *** 1083,1111 **** void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif - - { - 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->yy_buf_pos = yy_c_buf_p; ! yy_current_buffer->yy_n_chars = yy_n_chars; ! } ! yy_current_buffer = 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; ! } #ifdef YY_USE_PROTOS --- 1311,1338 ---- void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { ! 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->yy_buf_pos = yy_c_buf_p; ! yy_current_buffer->yy_n_chars = yy_n_chars; ! } ! yy_current_buffer = 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; ! } #ifdef YY_USE_PROTOS *************** *** 1113,1125 **** #else void yy_load_buffer_state() #endif ! ! { ! yy_n_chars = yy_current_buffer->yy_n_chars; ! yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos; ! yyin = yy_current_buffer->yy_input_file; ! yy_hold_char = *yy_c_buf_p; ! } #ifdef YY_USE_PROTOS --- 1340,1351 ---- #else void yy_load_buffer_state() #endif ! { ! yy_n_chars = yy_current_buffer->yy_n_chars; ! yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; ! yyin = yy_current_buffer->yy_input_file; ! yy_hold_char = *yy_c_buf_p; ! } #ifdef YY_USE_PROTOS *************** *** 1129,1157 **** FILE *file; int size; #endif ! { ! YY_BUFFER_STATE b; ! ! b = (YY_BUFFER_STATE) malloc( 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 = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) ); ! if ( ! b->yy_ch_buf ) ! YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); ! yy_init_buffer( b, file ); ! return ( b ); ! } #ifdef YY_USE_PROTOS --- 1355,1382 ---- FILE *file; int size; #endif + { + YY_BUFFER_STATE b; ! b = (YY_BUFFER_STATE) yy_flex_alloc( 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 *) yy_flex_alloc( 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; ! } #ifdef YY_USE_PROTOS *************** *** 1160,1174 **** void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif ! { ! if ( b == yy_current_buffer ) ! yy_current_buffer = (YY_BUFFER_STATE) 0; - free( (char *) b->yy_ch_buf ); - free( (char *) b ); - } #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) --- 1385,1409 ---- void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif + { + if ( ! b ) + return; ! if ( b == yy_current_buffer ) ! yy_current_buffer = (YY_BUFFER_STATE) 0; ! ! if ( b->yy_is_our_buffer ) ! yy_flex_free( (void *) b->yy_ch_buf ); ! ! yy_flex_free( (void *) b ); ! } + #ifndef YY_ALWAYS_INTERACTIVE + #ifndef YY_NEVER_INTERACTIVE + extern int isatty YY_PROTO(( int )); + #endif + #endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) *************** *** 1178,1205 **** FILE *file; #endif - { - b->yy_input_file = file; ! /* we put in the '\n' and start reading from [1] so that an ! * initial match-at-newline will be true. ! */ ! b->yy_ch_buf[0] = '\n'; ! b->yy_n_chars = 1; ! /* 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[1] = YY_END_OF_BUFFER_CHAR; ! b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[1]; ! b->yy_eof_status = EOF_NOT_SEEN; ! } ! # line 157 "monitor.l" typedef struct save_yy_cond { --- 1413,1708 ---- FILE *file; #endif ! { ! yy_flush_buffer( b ); ! b->yy_input_file = file; ! b->yy_fill_buffer = 1; ! #if YY_ALWAYS_INTERACTIVE ! b->yy_is_interactive = 1; ! #else ! #if YY_NEVER_INTERACTIVE ! b->yy_is_interactive = 0; ! #else ! b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; ! #endif ! #endif ! } ! #ifdef YY_USE_PROTOS ! void yy_flush_buffer( YY_BUFFER_STATE b ) ! #else ! void yy_flush_buffer( b ) ! YY_BUFFER_STATE b; ! #endif ! ! { ! 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(); ! } ! ! ! #ifndef YY_NO_SCAN_BUFFER ! #ifdef YY_USE_PROTOS ! YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) ! #else ! YY_BUFFER_STATE yy_scan_buffer( base, size ) ! char *base; ! yy_size_t size; ! #endif ! { ! 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) yy_flex_alloc( 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; ! } ! #endif ! ! ! #ifndef YY_NO_SCAN_STRING ! #ifdef YY_USE_PROTOS ! YY_BUFFER_STATE yy_scan_string( yyconst char *str ) ! #else ! YY_BUFFER_STATE yy_scan_string( str ) ! yyconst char *str; ! #endif ! { ! int len; ! for ( len = 0; str[len]; ++len ) ! ; ! ! return yy_scan_bytes( str, len ); ! } ! #endif ! ! ! #ifndef YY_NO_SCAN_BYTES ! #ifdef YY_USE_PROTOS ! YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) ! #else ! YY_BUFFER_STATE yy_scan_bytes( bytes, len ) ! yyconst char *bytes; ! int len; ! #endif ! { ! YY_BUFFER_STATE b; ! char *buf; ! yy_size_t n; ! int i; ! ! /* Get memory for full buffer, including space for trailing EOB's. */ ! n = len + 2; ! buf = (char *) yy_flex_alloc( n ); ! if ( ! buf ) ! YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); ! ! for ( i = 0; i < len; ++i ) ! buf[i] = bytes[i]; ! ! buf[len] = buf[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; ! } ! #endif ! ! ! #ifndef YY_NO_PUSH_STATE ! #ifdef YY_USE_PROTOS ! static void yy_push_state( int new_state ) ! #else ! static void yy_push_state( new_state ) ! int new_state; ! #endif ! { ! if ( yy_start_stack_ptr >= yy_start_stack_depth ) ! { ! yy_size_t new_size; ! ! yy_start_stack_depth += YY_START_STACK_INCR; ! new_size = yy_start_stack_depth * sizeof( int ); ! ! if ( ! yy_start_stack ) ! yy_start_stack = (int *) yy_flex_alloc( new_size ); ! ! else ! yy_start_stack = (int *) yy_flex_realloc( ! (void *) yy_start_stack, new_size ); ! ! if ( ! yy_start_stack ) ! YY_FATAL_ERROR( ! "out of memory expanding start-condition stack" ); ! } ! ! yy_start_stack[yy_start_stack_ptr++] = YY_START; ! ! BEGIN(new_state); ! } ! #endif ! ! ! #ifndef YY_NO_POP_STATE ! static void yy_pop_state() ! { ! if ( --yy_start_stack_ptr < 0 ) ! YY_FATAL_ERROR( "start-condition stack underflow" ); ! ! BEGIN(yy_start_stack[yy_start_stack_ptr]); ! } ! #endif ! ! ! #ifndef YY_NO_TOP_STATE ! static int yy_top_state() ! { ! return yy_start_stack[yy_start_stack_ptr - 1]; ! } ! #endif ! ! #ifndef YY_EXIT_FAILURE ! #define YY_EXIT_FAILURE 2 ! #endif ! ! #ifdef YY_USE_PROTOS ! static void yy_fatal_error( yyconst char msg[] ) ! #else ! static void yy_fatal_error( msg ) ! char msg[]; ! #endif ! { ! (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. */ \ ! yytext[yyleng] = yy_hold_char; \ ! yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ ! yy_hold_char = *yy_c_buf_p; \ ! *yy_c_buf_p = '\0'; \ ! yyleng = n; \ ! } \ ! while ( 0 ) ! ! ! /* Internal utility routines. */ ! ! #ifndef yytext_ptr ! #ifdef YY_USE_PROTOS ! static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) ! #else ! static void yy_flex_strncpy( s1, s2, n ) ! char *s1; ! yyconst char *s2; ! int n; ! #endif ! { ! register int i; ! for ( i = 0; i < n; ++i ) ! s1[i] = s2[i]; ! } ! #endif ! ! ! #ifdef YY_USE_PROTOS ! static void *yy_flex_alloc( yy_size_t size ) ! #else ! static void *yy_flex_alloc( size ) ! yy_size_t size; ! #endif ! { ! return (void *) malloc( size ); ! } ! ! #ifdef YY_USE_PROTOS ! static void *yy_flex_realloc( void *ptr, yy_size_t size ) ! #else ! static void *yy_flex_realloc( ptr, size ) ! void *ptr; ! yy_size_t size; ! #endif ! { ! /* 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 ); ! } ! ! #ifdef YY_USE_PROTOS ! static void yy_flex_free( void *ptr ) ! #else ! static void yy_flex_free( ptr ) ! void *ptr; ! #endif ! { ! free( ptr ); ! } ! ! #if YY_MAIN ! int main() ! { ! yylex(); ! return 0; ! } ! #endif ! typedef struct save_yy_cond { *************** *** 1443,1446 **** --- 1946,1952 ---- _SQL_commit(); return 0; } + #ifndef yywrap int yywrap() { return 1; } + #endif + /*end of make-dist.tmp.447/gnusql-0.7b5.3/src/parse/monitor.c.preserve*/ diff -rc gnusql-0.7b5.2/src/parse/parse.c.preserve gnusql-0.7b5.3/src/parse/parse.c.preserve *** gnusql-0.7b5.2/src/parse/parse.c.preserve Mon Apr 28 21:53:39 1997 --- gnusql-0.7b5.3/src/parse/parse.c.preserve Thu Jun 12 16:40:59 1997 *************** *** 1,5 **** ! /* A Bison parser, made from parse.y with Bison version GNU Bison version 1.21 */ #define YYBISON 1 /* Identify Bison output. */ --- 1,5 ---- ! /* A Bison parser, made from parse.y with Bison version GNU Bison version 1.24 */ #define YYBISON 1 /* Identify Bison output. */ *************** *** 416,452 **** #if YYDEBUG != 0 static const short yyrline[] = { 0, ! 242, 251, 258, 260, 262, 267, 269, 277, 278, 292, ! 293, 297, 314, 328, 337, 338, 339, 343, 345, 350, ! 360, 380, 382, 387, 388, 392, 401, 402, 407, 412, ! 414, 419, 421, 426, 428, 433, 435, 437, 439, 446, ! 473, 479, 489, 499, 500, 501, 505, 516, 517, 522, ! 526, 533, 544, 599, 600, 604, 606, 611, 647, 648, ! 652, 653, 657, 658, 662, 664, 666, 668, 670, 675, ! 676, 685, 686, 690, 703, 704, 708, 709, 713, 721, ! 722, 726, 727, 736, 738, 747, 749, 754, 768, 788, ! 818, 824, 829, 834, 839, 844, 852, 853, 858, 859, ! 863, 871, 877, 886, 887, 888, 893, 894, 898, 916, ! 943, 970, 971, 972, 973, 974, 975, 976, 977, 978, ! 982, 996, 1006, 1013, 1034, 1058, 1082, 1099, 1101, 1106, ! 1107, 1111, 1115, 1145, 1155, 1173, 1174, 1178, 1184, 1199, ! 1200, 1204, 1213, 1217, 1218, 1226, 1228, 1248, 1249, 1253, ! 1257, 1271, 1275, 1282, 1283, 1287, 1305, 1312, 1313, 1317, ! 1321, 1328, 1329, 1333, 1340, 1344, 1354, 1355, 1362, 1363, ! 1374, 1376, 1378, 1380, 1382, 1390, 1396, 1402, 1411, 1415, ! 1420, 1429, 1438, 1446, 1461, 1462, 1463, 1474, 1475, 1476, ! 1477, 1478, 1479, 1483, 1484, 1485, 1489, 1490, 1494, 1495, ! 1499, 1501, 1503, 1512, 1513, 1517, 1529, 1537, 1541, 1548, ! 1549, 1557, 1558, 1559, 1560, 1561, 1562, 1563, 1585, 1586, ! 1590, 1591, 1592, 1593, 1598, 1599, 1600, 1619, 1624, 1628, ! 1632, 1636, 1643, 1644, 1645, 1646, 1650, 1651, 1652, 1653, ! 1657, 1659, 1661, 1663, 1665, 1667, 1669, 1671, 1673, 1675, ! 1677, 1679, 1685, 1710, 1727, 1734, 1741, 1751, 1752, 1756, ! 1758, 1765, 1775, 1776, 1780, 1791, 1793, 1795, 1799, 1803, ! 1807, 1814, 1823, 1830, 1837, 1839, 1843, 1847, 1851 }; ! static const char * const yytname[] = { "$","error","$illegal.","TOK_ALL", "TOK_ALTER","TOK_ANY","TOK_AS","TOK_ASC","TOK_AUTHORIZATION","TOK_BEGIN","TOK_BETWEEN", "TOK_BY","TOK_CHECK","TOK_CLOSE","TOK_COBOL_LANG","TOK_C_LANG","TOK_COMMIT", "TOK_CONTINUE","TOK_CREATE","TOK_CURRENT","TOK_CURSOR","TOK_DECLARE","TOK_DEFAULT", --- 416,452 ---- #if YYDEBUG != 0 static const short yyrline[] = { 0, ! 244, 253, 260, 262, 264, 269, 271, 279, 280, 294, ! 295, 299, 316, 330, 339, 340, 341, 345, 347, 352, ! 362, 382, 384, 389, 390, 394, 403, 404, 409, 414, ! 416, 421, 423, 428, 430, 435, 437, 439, 441, 448, ! 475, 481, 491, 501, 502, 503, 507, 518, 519, 524, ! 528, 535, 546, 601, 602, 606, 608, 613, 649, 650, ! 654, 655, 659, 660, 664, 666, 668, 670, 672, 677, ! 678, 687, 688, 692, 705, 706, 710, 711, 715, 723, ! 724, 728, 729, 738, 740, 749, 751, 756, 770, 790, ! 820, 826, 831, 836, 841, 846, 854, 855, 860, 861, ! 865, 873, 879, 888, 889, 890, 895, 896, 900, 918, ! 945, 972, 973, 974, 975, 976, 977, 978, 979, 980, ! 984, 998, 1008, 1015, 1036, 1060, 1084, 1101, 1103, 1108, ! 1109, 1113, 1117, 1147, 1157, 1175, 1176, 1180, 1186, 1201, ! 1202, 1206, 1215, 1219, 1220, 1228, 1230, 1250, 1251, 1255, ! 1259, 1273, 1277, 1284, 1285, 1289, 1307, 1314, 1315, 1319, ! 1323, 1330, 1331, 1335, 1342, 1346, 1356, 1357, 1364, 1365, ! 1376, 1378, 1380, 1382, 1384, 1392, 1398, 1404, 1413, 1417, ! 1422, 1431, 1440, 1448, 1463, 1464, 1465, 1476, 1477, 1478, ! 1479, 1480, 1481, 1485, 1486, 1487, 1491, 1492, 1496, 1497, ! 1501, 1503, 1505, 1514, 1515, 1519, 1531, 1539, 1543, 1550, ! 1551, 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1587, 1588, ! 1592, 1593, 1594, 1595, 1600, 1601, 1602, 1621, 1626, 1630, ! 1634, 1638, 1645, 1646, 1647, 1648, 1652, 1653, 1654, 1655, ! 1659, 1661, 1663, 1665, 1667, 1669, 1671, 1673, 1675, 1677, ! 1679, 1681, 1687, 1712, 1729, 1736, 1743, 1753, 1754, 1758, ! 1760, 1767, 1777, 1778, 1782, 1793, 1795, 1797, 1801, 1805, ! 1809, 1816, 1825, 1832, 1839, 1841, 1845, 1849, 1853 }; ! static const char * const yytname[] = { "$","error","$undefined.","TOK_ALL", "TOK_ALTER","TOK_ANY","TOK_AS","TOK_ASC","TOK_AUTHORIZATION","TOK_BEGIN","TOK_BETWEEN", "TOK_BY","TOK_CHECK","TOK_CLOSE","TOK_COBOL_LANG","TOK_C_LANG","TOK_COMMIT", "TOK_CONTINUE","TOK_CREATE","TOK_CURRENT","TOK_CURSOR","TOK_DECLARE","TOK_DEFAULT", *************** *** 819,833 **** 413, 189, 264, 381, 151, 308, 263, 275, 165, 89, -1, 235, 198 }; ! /* -*-C-*- Note some compilers choke on comments on ` /* Skeleton output parser for bison, ! Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman 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 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, --- 819,833 ---- 413, 189, 264, 381, 151, 308, 263, 275, 165, 89, -1, 235, 198 }; ! /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ /* Skeleton output parser for bison, ! Copyright (C) 1984, 1989, 1990 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, *************** *** 839,844 **** --- 839,848 ---- along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + /* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ #ifndef alloca #ifdef __GNUC__ *************** *** 860,866 **** void *alloca (unsigned int); }; #else /* not __cplusplus */ ! void *alloca (unsigned int); #endif /* not __cplusplus */ #endif /* __hpux */ #endif /* not _AIX */ --- 864,870 ---- void *alloca (unsigned int); }; #else /* not __cplusplus */ ! void *alloca (); #endif /* not __cplusplus */ #endif /* __hpux */ #endif /* not _AIX */ *************** *** 912,921 **** --- 916,933 ---- #ifdef YYPURE #ifdef YYLSP_NEEDED + #ifdef YYLEX_PARAM + #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) + #else #define YYLEX yylex(&yylval, &yylloc) + #endif + #else /* not YYLSP_NEEDED */ + #ifdef YYLEX_PARAM + #define YYLEX yylex(&yylval, YYLEX_PARAM) #else #define YYLEX yylex(&yylval) #endif + #endif /* not YYLSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ *************** *** 963,976 **** #endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ ! #define __yy_bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void ! __yy_bcopy (from, to, count) char *from; char *to; int count; --- 975,988 ---- #endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ ! #define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void ! __yy_memcpy (from, to, count) char *from; char *to; int count; *************** *** 988,994 **** /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void ! __yy_bcopy (char *from, char *to, int count) { register char *f = from; register char *t = to; --- 1000,1006 ---- /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void ! __yy_memcpy (char *from, char *to, int count) { register char *f = from; register char *t = to; *************** *** 1002,1016 **** #endif int ! yyparse() { register int yystate; register int yyn; register short *yyssp; register YYSTYPE *yyvsp; int yyerrstatus; /* number of tokens to shift before error messages enabled */ ! int yychar1; /* lookahead token as an internal (translated) token number */ short yyssa[YYINITDEPTH]; /* the state stack */ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ --- 1014,1043 ---- #endif + + /* The user can define YYPARSE_PARAM as the name of an argument to be passed + into yyparse. The argument should have type void *. + It should actually point to an object. + Grammar actions can access the variable by casting it + to the proper pointer type. */ + + #ifdef YYPARSE_PARAM + #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; + #else + #define YYPARSE_PARAM + #define YYPARSE_PARAM_DECL + #endif + int ! yyparse(YYPARSE_PARAM) ! YYPARSE_PARAM_DECL { register int yystate; register int yyn; register short *yyssp; register YYSTYPE *yyvsp; int yyerrstatus; /* number of tokens to shift before error messages enabled */ ! int yychar1 = 0; /* lookahead token as an internal (translated) token number */ short yyssa[YYINITDEPTH]; /* the state stack */ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ *************** *** 1089,1101 **** #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), - #ifdef YYLSP_NEEDED &yyls1, size * sizeof (*yylsp), - #endif &yystacksize); yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED --- 1116,1135 ---- #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ + #ifdef YYLSP_NEEDED + /* This used to be a conditional around just the two extra args, + but that might be undefined if yyoverflow is a macro. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yyls1, size * sizeof (*yylsp), &yystacksize); + #else + yyoverflow("parser stack overflow", + &yyss1, size * sizeof (*yyssp), + &yyvs1, size * sizeof (*yyvsp), + &yystacksize); + #endif yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED *************** *** 1112,1123 **** if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); ! __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); ! __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); ! __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp)); #endif #endif /* no yyoverflow */ --- 1146,1157 ---- if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); ! __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); ! __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); ! __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp)); #endif #endif /* no yyoverflow */ *************** *** 1256,1262 **** /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; ! yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) --- 1290,1297 ---- /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; ! if (yylen > 0) ! yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) diff -rc gnusql-0.7b5.2/src/parse/parse.y gnusql-0.7b5.3/src/parse/parse.y *** gnusql-0.7b5.2/src/parse/parse.y Mon Apr 28 21:53:37 1997 --- gnusql-0.7b5.3/src/parse/parse.y Sun Jun 8 14:29:18 1997 *************** *** 91,96 **** --- 91,98 ---- %} + %expect 1 + %union { LTRLREF ltrp; TXTREF node; diff -rc gnusql-0.7b5.2/src/parse/scan_c.c.preserve gnusql-0.7b5.3/src/parse/scan_c.c.preserve *** gnusql-0.7b5.2/src/parse/scan_c.c.preserve Mon Apr 28 21:53:40 1997 --- gnusql-0.7b5.3/src/parse/scan_c.c.preserve Thu Jun 12 14:56:40 1997 *************** *** 1,10 **** /* A lexical scanner generated by flex */ ! /* scanner skeleton version: ! * $Header: /home/horse/u0/vern/flex/RCS/flex.skel,v 2.16 90/08/03 14:09:36 vern Exp Locker: vern $ */ #define FLEX_SCANNER #include --- 1,12 ---- /* A lexical scanner generated by flex */ ! /* Scanner skeleton version: ! * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $ */ #define FLEX_SCANNER + #define YY_FLEX_MAJOR_VERSION 2 + #define YY_FLEX_MINOR_VERSION 5 #include *************** *** 20,44 **** #ifdef __cplusplus #include ! #include ! /* use prototypes in function declarations */ #define YY_USE_PROTOS ! /* the "const" storage-class-modifier is valid */ #define YY_USE_CONST #else /* ! __cplusplus */ ! #ifdef __STDC__ ! ! #ifdef __GNUC__ ! #include ! void *malloc( size_t ); ! void free( void* ); ! #else ! #include ! #endif /* __GNUC__ */ #define YY_USE_PROTOS #define YY_USE_CONST --- 22,38 ---- #ifdef __cplusplus #include ! #include ! /* Use prototypes in function declarations. */ #define YY_USE_PROTOS ! /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ ! #if __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST *************** *** 46,59 **** #endif /* __STDC__ */ #endif /* ! __cplusplus */ - #ifdef __TURBOC__ #define YY_USE_CONST #endif ! ! #ifndef YY_USE_CONST ! #define const #endif --- 40,58 ---- #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use + #include + #include #define YY_USE_CONST + #define YY_USE_PROTOS #endif ! #ifdef YY_USE_CONST ! #define yyconst const ! #else ! #define yyconst #endif *************** *** 61,376 **** #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () - /* we can't get here if it's an ANSI C compiler, or a C++ compiler, - * so it's got to be a K&R compiler, and therefore there's no standard - * place from which to include these definitions - */ - char *malloc(); - int free(); - int read(); - #endif - - - /* amount of stuff to slurp up with each read */ - #ifndef YY_READ_BUF_SIZE - #define YY_READ_BUF_SIZE 8192 #endif ! /* returned upon end-of-file */ ! #define YY_END_TOK 0 ! ! /* copy whatever the last rule matched to the standard output */ ! ! /* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */ ! /* this used to be an fputs(), but since the string might contain NUL's, ! * we now use fwrite() ! */ ! #define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout ) ! ! /* gets input and stuffs it into "buf". number of characters read, or YY_NULL, ! * is returned in "result". ! */ ! #define YY_INPUT(buf,result,max_size) \ ! if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ ! YY_FATAL_ERROR( "read() in flex scanner failed" ); #define YY_NULL 0 ! /* 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. ! */ ! #define yyterminate() return ( YY_NULL ) ! ! /* report a fatal error */ ! ! /* The funky do-while is used to turn this macro definition into ! * a single C statement (which needs a semi-colon terminator). ! * This avoids problems with code like: ! * ! * if ( something_happens ) ! * YY_FATAL_ERROR( "oops, the something happened" ); ! * else ! * everything_okay(); ! * ! * Prior to using the do-while the compiler would get upset at the ! * "else" because it interpreted the "if" statement as being all ! * done when it reached the ';' after the YY_FATAL_ERROR() call. */ ! #define YY_FATAL_ERROR(msg) \ ! do \ ! { \ ! (void) fputs( msg, stderr ); \ ! (void) putc( '\n', stderr ); \ ! exit( 1 ); \ ! } \ ! while ( 0 ) ! ! /* default yywrap function - always treat EOF as an EOF */ ! #define yywrap() 1 ! ! /* 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 * ! /* 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 \ ! do \ ! { \ ! yy_init_buffer( yy_current_buffer, yyin ); \ ! yy_load_buffer_state(); \ ! } \ ! while ( 0 ) ! ! /* default declaration of generated scanner - a define so the user can ! * easily add parameters */ ! #define YY_DECL int yylex YY_PROTO(( void )) ! /* code executed at the end of each rule */ ! #define YY_BREAK break; #define YY_END_OF_BUFFER_CHAR 0 ! #ifndef YY_BUF_SIZE ! #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */ ! #endif typedef struct yy_buffer_state *YY_BUFFER_STATE; ! #define FLEX_DEBUG ! #define YY_CHAR unsigned char ! # line 1 "scan_c.l" ! #define INITIAL 0 ! # line 2 "scan_c.l" ! /* ! * scan_c.l - scanner-extractor of GNU SQL/C compiler ! * ! * This file is a part of GNU SQL Server ! * ! * Copyright (c) 1996, 1997, Free Software Foundation, Inc ! * Developed at the Institute of System Programming ! * This file is written by Michael Kimelman. ! * ! * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ! * Contact: gss@ispras.ru * */ ! /* $Id: scan_c.l,v 1.247 1997/04/21 14:26:13 kml Exp $ */ ! ! #include "xmem.h" ! #include "gsqltrn.h" ! #include "sql_decl.h" ! #include "procname.h" ! #include ! ! #define SWITCH_COND(cond) { save_condition();BEGIN(cond);} ! #define REST_COND rest_condition(); ! #define SCANNER_NAME yylex_extractor ! #ifdef YY_DECL ! # undef YY_DECL ! #endif ! #define YY_DECL int SCANNER_NAME(void) ! YY_DECL; - #define YY_USER_INIT { BEGIN(START_CONDITION); line_num=1; } - #define YY_USER_ACTION if(yy_flex_debug){ \ - fprintf(stderr,"\nCurrent lex state=%d\n",yy_start);} ! #define SQL_PROC(code) if(code){file_pos=line_num; return 1<yy_is_interactive = is_interactive; \ ! } + #define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) ! #define FLEX_DEBUG ! typedef unsigned char YY_CHAR; ! FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; ! typedef int yy_state_type; ! #define FLEX_DEBUG ! extern char *yytext; ! #define yytext_ptr yytext ! static yy_state_type yy_get_previous_state YY_PROTO(( void )); ! static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); ! static int yy_get_next_buffer YY_PROTO(( void )); ! static void yy_fatal_error YY_PROTO(( 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 = (int) (yy_cp - yy_bp); \ ! yy_hold_char = *yy_cp; \ ! *yy_cp = '\0'; \ ! yy_c_buf_p = yy_cp; ! #define YY_NUM_RULES 44 ! #define YY_END_OF_BUFFER 45 ! static yyconst short int yy_accept[158] = { 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 45, 43, 26, 6, 43, 43, 43, 43, ! 43, 26, 43, 43, 44, 3, 44, 5, 5, 3, 5, 5, 5, 12, 14, 13, 10, 11, 7, 10, ! 32, 27, 31, 29, 28, 32, 32, 17, 21, 32, ! 32, 32, 32, 32, 32, 32, 32, 32, 44, 44, ! 44, 44, 35, 34, 36, 38, 37, 40, 41, 42, ! 26, 30, 0, 0, 0, 0, 26, 0, 0, 4, 1, 0, 2, 0, 12, 13, 13, 15, 10, 9, ! 8, 27, 16, 0, 0, 0, 0, 0, 35, 33, ! 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 24, 0, 18, 0, 0, 0, 25, 19, 0, 0, 20, 0 } ; ! static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 4, 5, 1, 1, 1, 1, 1, 1, 1, *************** *** 402,408 **** 1, 1, 1, 1, 1 } ; ! static const YY_CHAR yy_meta[36] = { 0, 1, 1, 2, 1, 1, 3, 1, 4, 5, 1, 1, 6, 1, 1, 6, 6, 6, 6, 6, 6, --- 340,346 ---- 1, 1, 1, 1, 1 } ; ! static yyconst int yy_meta[36] = { 0, 1, 1, 2, 1, 1, 3, 1, 4, 5, 1, 1, 6, 1, 1, 6, 6, 6, 6, 6, 6, *************** *** 410,416 **** 6, 6, 6, 6, 6 } ; ! static const short int yy_base[180] = { 0, 0, 23, 2, 46, 3, 11, 15, 28, 63, 75, 76, 81, 98, 0, 20, 39, 20, 42, 16, 40, --- 348,354 ---- 6, 6, 6, 6, 6 } ; ! static yyconst short int yy_base[180] = { 0, 0, 23, 2, 46, 3, 11, 15, 28, 63, 75, 76, 81, 98, 0, 20, 39, 20, 42, 16, 40, *************** *** 433,439 **** 222, 228, 234, 239, 244, 249, 254, 259, 264 } ; ! static const short int yy_def[180] = { 0, 158, 158, 159, 160, 161, 161, 162, 162, 163, 163, 10, 10, 10, 13, 159, 159, 164, 164, 165, 165, --- 371,377 ---- 222, 228, 234, 239, 244, 249, 254, 259, 264 } ; ! static yyconst short int yy_def[180] = { 0, 158, 158, 159, 160, 161, 161, 162, 162, 163, 163, 10, 10, 10, 13, 159, 159, 164, 164, 165, 165, *************** *** 456,462 **** 157, 157, 157, 157, 157, 157, 157, 157, 157 } ; ! static const short int yy_nxt[357] = { 0, 157, 25, 26, 25, 26, 45, 81, 36, 81, 27, 157, 46, 37, 45, 28, 29, 30, 48, 77, 46, --- 394,400 ---- 157, 157, 157, 157, 157, 157, 157, 157, 157 } ; ! static yyconst short int yy_nxt[357] = { 0, 157, 25, 26, 25, 26, 45, 81, 36, 81, 27, 157, 46, 37, 45, 28, 29, 30, 48, 77, 46, *************** *** 499,505 **** 157, 157, 157, 157, 157, 157 } ; ! static const short int yy_chk[357] = { 0, 0, 1, 1, 1, 3, 5, 25, 3, 25, 1, 0, 5, 3, 6, 1, 1, 1, 7, 19, 6, --- 437,443 ---- 157, 157, 157, 157, 157, 157 } ; ! static yyconst short int yy_chk[357] = { 0, 0, 1, 1, 1, 3, 5, 25, 3, 25, 1, 0, 5, 3, 6, 1, 1, 1, 7, 19, 6, *************** *** 543,606 **** } ; static yy_state_type yy_last_accepting_state; ! static YY_CHAR *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 1; ! static const short int yy_rule_linenum[45] = { 0, 114, 119, 124, 128, 129, 130, 134, 135, 136, 137, 138, 146, 147, 148, 151, 161, 169, 178, 182, 187, ! 193, 207, 219, 223, 236, 236, 250, 251, 252, 256, ! 260, 263, 267, 273, 274, 279, 280, 287, 292, 293, ! 294, 301, 302, 306 } ; ! /* the intent behind this definition is that it'll catch ! * any uses of REJECT which flex missed */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 ! /* these variables are all declared out here so that section 3 code can ! * manipulate them ! */ ! /* points to current character in buffer */ ! static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0; ! static int yy_init = 1; /* 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; ! static yy_state_type yy_get_previous_state YY_PROTO(( void )); ! static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); ! static int yy_get_next_buffer YY_PROTO(( void )); ! static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr )); ! void yyrestart YY_PROTO(( FILE *input_file )); ! void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); ! void yy_load_buffer_state YY_PROTO(( void )); ! YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); ! void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); ! void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); ! #define yy_new_buffer yy_create_buffer #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif YY_DECL ! { ! register yy_state_type yy_current_state; ! register YY_CHAR *yy_cp, *yy_bp; ! register int yy_act; static int esql_caller = 0; --- 481,757 ---- } ; static yy_state_type yy_last_accepting_state; ! static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 1; ! static yyconst short int yy_rule_linenum[44] = { 0, 114, 119, 124, 128, 129, 130, 134, 135, 136, 137, 138, 146, 147, 148, 151, 161, 169, 178, 182, 187, ! 193, 207, 219, 223, 236, 250, 251, 252, 256, 260, ! 263, 267, 273, 274, 279, 280, 287, 292, 293, 294, ! 301, 302, 306 } ; ! /* The intent behind this definition is that it'll catch ! * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 + char *yytext; ! #define INITIAL 0 ! /* ! * scan_c.l - scanner-extractor of GNU SQL/C compiler ! * ! * This file is a part of GNU SQL Server ! * ! * Copyright (c) 1996, 1997, Free Software Foundation, Inc ! * Developed at the Institute of System Programming ! * This file is written by Michael Kimelman. ! * ! * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! * ! * Contact: gss@ispras.ru ! * */ ! /* $Id: scan_c.l,v 1.247 1997/04/21 14:26:13 kml Exp $ */ ! #include "xmem.h" ! #include "gsqltrn.h" ! #include "sql_decl.h" ! #include "procname.h" ! #include ! ! #define SWITCH_COND(cond) { save_condition();BEGIN(cond);} ! #define REST_COND rest_condition(); ! ! #define SCANNER_NAME yylex_extractor ! ! #ifdef YY_DECL ! # undef YY_DECL ! #endif ! #define YY_DECL int SCANNER_NAME(void) ! ! YY_DECL; ! ! #define YY_USER_INIT { BEGIN(START_CONDITION); line_num=1; } ! #define YY_USER_ACTION if(yy_flex_debug){ \ ! fprintf(stderr,"\nCurrent lex state=%d\n",yy_start);} ! ! #define SQL_PROC(code) if(code){file_pos=line_num; return 1< + #endif + #else + /* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ + #endif + #endif + + /* Amount of stuff to slurp up with each read. */ + #ifndef YY_READ_BUF_SIZE + #define YY_READ_BUF_SIZE 8192 + #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 (void) fwrite( yytext, yyleng, 1, yyout ) + #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->yy_is_interactive ) \ + { \ + int c = '*', 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 if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); + #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 + + /* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ + #ifndef YY_DECL + #define YY_DECL int yylex YY_PROTO(( void )) + #endif + + /* 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->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION YY_DECL ! { ! register yy_state_type yy_current_state; ! register char *yy_cp, *yy_bp; ! register int yy_act; ! static int esql_caller = 0; *************** *** 617,717 **** * C lexics * *********************************************/ ! if ( yy_init ) ! { ! YY_USER_INIT; ! if ( ! yy_start ) ! yy_start = 1; /* first start state */ ! if ( ! yyin ) ! yyin = stdin; ! if ( ! yyout ) ! yyout = stdout; ! if ( yy_current_buffer ) ! yy_init_buffer( yy_current_buffer, yyin ); ! else ! yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); ! yy_load_buffer_state(); ! yy_init = 0; ! } ! 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; ! if ( yy_bp[-1] == '\n' ) ! ++yy_current_state; yy_match: ! do ! { ! register YY_CHAR yy_c = yy_ec[*yy_cp]; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = yy_def[yy_current_state]; ! if ( yy_current_state >= 158 ) ! yy_c = yy_meta[yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ! ++yy_cp; ! } ! while ( yy_current_state != 157 ); ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; yy_find_action: ! yy_act = yy_accept[yy_current_state]; - YY_DO_BEFORE_ACTION; - YY_USER_ACTION; ! do_action: /* this label is used only to access EOF actions */ ! if ( yy_flex_debug ) ! { ! if ( yy_act == 0 ) ! fprintf( stderr, "--scanner backtracking\n" ); ! else if ( yy_act < 45 ) ! fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", ! yy_rule_linenum[yy_act], yytext ); ! else if ( yy_act == 45 ) ! fprintf( stderr, "--accepting default rule (\"%s\")\n", ! yytext ); ! else if ( yy_act == 46 ) ! fprintf( stderr, "--(end of buffer or a NUL)\n" ); ! else ! fprintf( stderr, "--EOF\n" ); ! } ! ! switch ( yy_act ) ! { ! case 0: /* must backtrack */ ! /* undo the effects of YY_DO_BEFORE_ACTION */ ! *yy_cp = yy_hold_char; ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! goto yy_find_action; case 1: ! # line 114 "scan_c.l" { esql_caller=C_lang; bline=line_num; --- 768,873 ---- * C lexics * *********************************************/ ! if ( yy_init ) ! { ! yy_init = 0; ! #ifdef YY_USER_INIT ! YY_USER_INIT; ! #endif ! if ( ! yy_start ) ! yy_start = 1; /* first start state */ ! if ( ! yyin ) ! yyin = stdin; ! if ( ! yyout ) ! yyout = stdout; ! if ( ! yy_current_buffer ) ! yy_current_buffer = ! 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_match: ! do ! { ! register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = (int) yy_def[yy_current_state]; ! if ( yy_current_state >= 158 ) ! yy_c = yy_meta[(unsigned int) yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ! ++yy_cp; ! } ! while ( yy_base[yy_current_state] != 321 ); yy_find_action: ! yy_act = yy_accept[yy_current_state]; ! if ( yy_act == 0 ) ! { /* have to back up */ ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! yy_act = yy_accept[yy_current_state]; ! } ! ! YY_DO_BEFORE_ACTION; ! do_action: /* This label is used only to access EOF actions. */ ! ! if ( yy_flex_debug ) ! { ! if ( yy_act == 0 ) ! fprintf( stderr, "--scanner backing up\n" ); ! else if ( yy_act < 44 ) ! fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", ! yy_rule_linenum[yy_act], yytext ); ! else if ( yy_act == 44 ) ! fprintf( stderr, "--accepting default rule (\"%s\")\n", ! yytext ); ! else if ( yy_act == 45 ) ! fprintf( stderr, "--(end of buffer or a NUL)\n" ); ! else ! fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); ! } ! switch ( yy_act ) ! { /* beginning of action switch */ ! case 0: /* must back up */ ! /* undo the effects of YY_DO_BEFORE_ACTION */ ! *yy_cp = yy_hold_char; ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! goto yy_find_action; case 1: ! YY_RULE_SETUP ! { esql_caller=C_lang; bline=line_num; *************** *** 719,725 **** } YY_BREAK case 2: ! # line 119 "scan_c.l" { ECHO; comment_caller=C_lang; --- 875,882 ---- } YY_BREAK case 2: ! YY_RULE_SETUP ! { ECHO; comment_caller=C_lang; *************** *** 727,794 **** } YY_BREAK case 3: ! # line 124 "scan_c.l" { ECHO; BEGIN_MODE(C_str); } YY_BREAK case 4: ! # line 129 "scan_c.l" case 5: ! # line 129 "scan_c.l" { ECHO; } YY_BREAK case 6: ! # line 130 "scan_c.l" { ECHO; line_num++; } YY_BREAK ! /********************************************* * C string recognizer * *********************************************/ case 7: ! # line 134 "scan_c.l" { ECHO; BEGIN_MODE(C_lang); } YY_BREAK case 8: ! # line 135 "scan_c.l" { ECHO; } YY_BREAK case 9: ! # line 136 "scan_c.l" { ECHO; ++line_num; } YY_BREAK case 10: ! # line 137 "scan_c.l" { ECHO; } YY_BREAK case 11: ! # line 138 "scan_c.l" { ECHO; yyerror("Unterminated C string"); BEGIN_MODE(C_lang); } YY_BREAK ! /********************************************* * C comment recornizer * *********************************************/ case 12: ! # line 146 "scan_c.l" { if (comment_caller == C_lang) { ECHO; } } YY_BREAK case 13: ! # line 147 "scan_c.l" { if (comment_caller == C_lang) { ECHO; } } YY_BREAK case 14: ! # line 148 "scan_c.l" { if (comment_caller == C_lang) { ECHO; } line_num++; } YY_BREAK case 15: ! # line 151 "scan_c.l" { if (comment_caller == C_lang) { ECHO; --- 884,963 ---- } YY_BREAK case 3: ! YY_RULE_SETUP ! { ECHO; BEGIN_MODE(C_str); } YY_BREAK case 4: ! case 5: ! YY_RULE_SETUP ! { ECHO; } YY_BREAK case 6: ! YY_RULE_SETUP ! { ECHO; line_num++; } YY_BREAK ! /********************************************* * C string recognizer * *********************************************/ case 7: ! YY_RULE_SETUP ! { ECHO; BEGIN_MODE(C_lang); } YY_BREAK case 8: ! YY_RULE_SETUP ! { ECHO; } YY_BREAK case 9: ! YY_RULE_SETUP ! { ECHO; ++line_num; } YY_BREAK case 10: ! YY_RULE_SETUP ! { ECHO; } YY_BREAK case 11: ! YY_RULE_SETUP ! { ECHO; yyerror("Unterminated C string"); BEGIN_MODE(C_lang); } YY_BREAK ! /********************************************* * C comment recornizer * *********************************************/ case 12: ! YY_RULE_SETUP ! { if (comment_caller == C_lang) { ECHO; } } YY_BREAK case 13: ! YY_RULE_SETUP ! { if (comment_caller == C_lang) { ECHO; } } YY_BREAK case 14: ! YY_RULE_SETUP ! { if (comment_caller == C_lang) { ECHO; } line_num++; } YY_BREAK case 15: ! YY_RULE_SETUP ! { if (comment_caller == C_lang) { ECHO; *************** *** 796,806 **** BEGIN_MODE(comment_caller); } YY_BREAK ! /********************************************* * lexics of embedded SQL in C * *********************************************/ case 16: ! # line 161 "scan_c.l" { if(esql_caller==C_lang) { comment_caller=ESQL; --- 965,976 ---- BEGIN_MODE(comment_caller); } YY_BREAK ! /********************************************* * lexics of embedded SQL in C * *********************************************/ case 16: ! YY_RULE_SETUP ! { if(esql_caller==C_lang) { comment_caller=ESQL; *************** *** 811,831 **** } YY_BREAK case 17: ! # line 169 "scan_c.l" { BEGIN_MODE(esql_caller); POP_BUFFER; SQL_PROC(ESQL); } YY_BREAK ! /********************************************* * embedded SQL lexics * *********************************************/ case 18: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 178 "scan_c.l" { BEGIN_MODE(MOD); APPEND_BUFFER; --- 981,1003 ---- } YY_BREAK case 17: ! YY_RULE_SETUP ! { BEGIN_MODE(esql_caller); POP_BUFFER; SQL_PROC(ESQL); } YY_BREAK ! /********************************************* * embedded SQL lexics * *********************************************/ case 18: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! { BEGIN_MODE(MOD); APPEND_BUFFER; *************** *** 835,841 **** *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 7; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 182 "scan_c.l" { POP_BUFFER; APPEND_BUFFER; --- 1007,1014 ---- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 7; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! { POP_BUFFER; APPEND_BUFFER; *************** *** 846,852 **** *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 9; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 187 "scan_c.l" { rout_title=1; POP_BUFFER; --- 1019,1026 ---- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 9; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! { rout_title=1; POP_BUFFER; *************** *** 855,861 **** } YY_BREAK case 21: ! # line 193 "scan_c.l" { APPEND_BUFFER; if(rout_title) --- 1029,1036 ---- } YY_BREAK case 21: ! YY_RULE_SETUP ! { APPEND_BUFFER; if(rout_title) *************** *** 867,880 **** } } YY_BREAK ! /********************************************* * clean SQL SCH lexic * *********************************************/ case 22: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 207 "scan_c.l" { { BEGIN_MODE(SCH); --- 1042,1056 ---- } } YY_BREAK ! /********************************************* * clean SQL SCH lexic * *********************************************/ case 22: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! { { BEGIN_MODE(SCH); *************** *** 892,898 **** *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 219 "scan_c.l" { APPEND_BUFFER; with_grant_options=1; --- 1068,1075 ---- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! { APPEND_BUFFER; with_grant_options=1; *************** *** 902,908 **** *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 223 "scan_c.l" { if(with_grant_options) { --- 1079,1086 ---- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! { if(with_grant_options) { *************** *** 921,927 **** *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 236 "scan_c.l" { POP_BUFFER; APPEND_BUFFER; --- 1099,1106 ---- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! { POP_BUFFER; APPEND_BUFFER; *************** *** 929,1060 **** } YY_BREAK case YY_STATE_EOF(SCH): ! # line 241 "scan_c.l" { POP_BUFFER; BEGIN(INITIAL); SQL_PROC(SCH); } YY_BREAK ! /********************************************* * common SQL keywords * *********************************************/ ! case 27: ! # line 250 "scan_c.l" /* do nothing */; YY_BREAK ! case 28: ! # line 251 "scan_c.l" { APPEND_BUFFER; } YY_BREAK ! case 29: ! # line 252 "scan_c.l" { APPEND_BUFFER; SWITCH_COND(SQL_str); } YY_BREAK ! case 30: ! # line 256 "scan_c.l" { APPEND_BUFFER; SWITCH_COND(SQL_ident); } YY_BREAK ! case 31: ! # line 260 "scan_c.l" { SWITCH_COND(SQL_comment); } YY_BREAK ! case 32: ! # line 263 "scan_c.l" { APPEND_BUFFER; line_num++; } YY_BREAK ! case 33: ! # line 267 "scan_c.l" { APPEND_BUFFER; } YY_BREAK ! /********************************************* * SQL string recognizer * *********************************************/ ! case 34: ! # line 273 "scan_c.l" { APPEND_BUFFER; } YY_BREAK ! case 35: ! # line 274 "scan_c.l" { yyerror(" Unterminated SQL string "); line_num++; REST_COND; } YY_BREAK ! case 36: ! # line 279 "scan_c.l" { APPEND_BUFFER; } YY_BREAK ! case 37: ! # line 280 "scan_c.l" { APPEND_BUFFER; REST_COND; } YY_BREAK ! /********************************************* * SQL string recognizer * *********************************************/ ! case 38: ! # line 287 "scan_c.l" { yyerror(" Unterminated SQL identifier "); line_num++; REST_COND; } YY_BREAK ! case 39: ! # line 292 "scan_c.l" { APPEND_BUFFER; } YY_BREAK ! case 40: ! # line 293 "scan_c.l" { APPEND_BUFFER; } YY_BREAK ! case 41: ! # line 294 "scan_c.l" { APPEND_BUFFER ; REST_COND; } YY_BREAK ! /********************************************* * SQL comment recognizer * *********************************************/ ! case 42: ! # line 301 "scan_c.l" /* do nothing */; YY_BREAK ! case 43: ! # line 302 "scan_c.l" { line_num++; REST_COND; } YY_BREAK ! case 44: ! # line 306 "scan_c.l" { ECHO; BEGIN_MODE(C_lang); } YY_BREAK ! case 45: ! # line 310 "scan_c.l" ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): --- 1108,1258 ---- } YY_BREAK case YY_STATE_EOF(SCH): ! { POP_BUFFER; BEGIN(INITIAL); SQL_PROC(SCH); } YY_BREAK ! /********************************************* * common SQL keywords * *********************************************/ ! case 26: ! YY_RULE_SETUP ! /* do nothing */; YY_BREAK ! case 27: ! YY_RULE_SETUP ! { APPEND_BUFFER; } YY_BREAK ! case 28: ! YY_RULE_SETUP ! { APPEND_BUFFER; SWITCH_COND(SQL_str); } YY_BREAK ! case 29: ! YY_RULE_SETUP ! { APPEND_BUFFER; SWITCH_COND(SQL_ident); } YY_BREAK ! case 30: ! YY_RULE_SETUP ! { SWITCH_COND(SQL_comment); } YY_BREAK ! case 31: ! YY_RULE_SETUP ! { APPEND_BUFFER; line_num++; } YY_BREAK ! case 32: ! YY_RULE_SETUP ! { APPEND_BUFFER; } YY_BREAK ! /********************************************* * SQL string recognizer * *********************************************/ ! case 33: ! YY_RULE_SETUP ! { APPEND_BUFFER; } YY_BREAK ! case 34: ! YY_RULE_SETUP ! { yyerror(" Unterminated SQL string "); line_num++; REST_COND; } YY_BREAK ! case 35: ! YY_RULE_SETUP ! { APPEND_BUFFER; } YY_BREAK ! case 36: ! YY_RULE_SETUP ! { APPEND_BUFFER; REST_COND; } YY_BREAK ! /********************************************* * SQL string recognizer * *********************************************/ ! case 37: ! YY_RULE_SETUP ! { yyerror(" Unterminated SQL identifier "); line_num++; REST_COND; } YY_BREAK ! case 38: ! YY_RULE_SETUP ! { APPEND_BUFFER; } YY_BREAK ! case 39: ! YY_RULE_SETUP ! { APPEND_BUFFER; } YY_BREAK ! case 40: ! YY_RULE_SETUP ! { APPEND_BUFFER ; REST_COND; } YY_BREAK ! /********************************************* * SQL comment recognizer * *********************************************/ ! case 41: ! YY_RULE_SETUP ! /* do nothing */; YY_BREAK ! case 42: ! YY_RULE_SETUP ! { line_num++; REST_COND; } YY_BREAK ! case 43: ! YY_RULE_SETUP ! { ECHO; BEGIN_MODE(C_lang); } YY_BREAK ! case 44: ! YY_RULE_SETUP ! ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): *************** *** 1067,1393 **** case YY_STATE_EOF(SQL_str): case YY_STATE_EOF(SQL_ident): case YY_STATE_EOF(SQL_comment): ! yyterminate(); ! case YY_END_OF_BUFFER: { ! /* amount of text matched not including the EOB char */ ! int yy_amount_of_matched_text = yy_cp - yytext - 1; ! /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; ! /* 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 yyinput(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) ! /* this was really a NUL */ ! { ! yy_state_type yy_next_state; ! yy_c_buf_p = yytext + 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 + 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_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! 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 + YY_MORE_ADJ; ! yy_act = YY_STATE_EOF((yy_start - 1) / 2); ! 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 + yy_amount_of_matched_text; ! yy_current_state = yy_get_previous_state(); ! yy_cp = yy_c_buf_p; ! yy_bp = yytext + YY_MORE_ADJ; ! goto yy_match; ! ! case EOB_ACT_LAST_MATCH: ! yy_c_buf_p = ! &yy_current_buffer->yy_ch_buf[yy_n_chars]; ! yy_current_state = yy_get_previous_state(); ! yy_cp = yy_c_buf_p; ! yy_bp = yytext + YY_MORE_ADJ; ! goto yy_find_action; ! } break; } ! default: ! #ifdef FLEX_DEBUG ! printf( "action # %d\n", yy_act ); ! #endif YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); ! } ! } ! } /* yy_get_next_buffer - try to read in a new buffer * ! * synopsis ! * int yy_get_next_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() ! { ! register YY_CHAR *dest = yy_current_buffer->yy_ch_buf; ! register YY_CHAR *source = yytext - 1; /* copy prev. char, too */ ! register int number_to_move, i; ! int ret_val; ! ! if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) ! YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); ! /* try to read more data */ ! /* first move last chars to start of buffer */ ! number_to_move = yy_c_buf_p - yytext; ! for ( i = 0; i < number_to_move; ++i ) ! *(dest++) = *(source++); ! if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN ) ! /* don't do the read, it's not guaranteed to return an EOF, ! * just force an EOF ! */ ! yy_n_chars = 0; ! else ! { ! int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; ! if ( num_to_read > YY_READ_BUF_SIZE ) ! num_to_read = YY_READ_BUF_SIZE; ! else if ( num_to_read <= 0 ) ! YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); ! /* read in more data */ ! YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), ! yy_n_chars, num_to_read ); ! } ! if ( yy_n_chars == 0 ) ! { ! if ( number_to_move - YY_MORE_ADJ == 1 ) ! { ! ret_val = EOB_ACT_END_OF_FILE; ! yy_current_buffer->yy_eof_status = EOF_DONE; ! } ! else ! { ! ret_val = EOB_ACT_LAST_MATCH; ! yy_current_buffer->yy_eof_status = EOF_PENDING; ! } ! } ! else ! ret_val = EOB_ACT_CONTINUE_SCAN; ! yy_n_chars += number_to_move; ! yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; ! yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; ! /* yytext begins at the second character in yy_ch_buf; the first ! * character is the one which preceded it before reading in the latest ! * buffer; it needs to be kept around in case it's a newline, so ! * yy_get_previous_state() will have with '^' rules active ! */ ! yytext = &yy_current_buffer->yy_ch_buf[1]; ! return ( ret_val ); ! } ! /* yy_get_previous_state - get the state just before the EOB char was reached ! * ! * synopsis ! * yy_state_type yy_get_previous_state(); ! */ ! static yy_state_type yy_get_previous_state() ! { ! register yy_state_type yy_current_state; ! register YY_CHAR *yy_cp; ! register YY_CHAR *yy_bp = yytext; ! yy_current_state = yy_start; ! if ( yy_bp[-1] == '\n' ) ! ++yy_current_state; ! for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) ! { ! register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1); ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = yy_def[yy_current_state]; ! if ( yy_current_state >= 158 ) ! yy_c = yy_meta[yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } ! return ( yy_current_state ); ! } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis ! * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS ! static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) ! register yy_state_type yy_current_state; #endif ! { ! register int yy_is_jam; ! register YY_CHAR *yy_cp = yy_c_buf_p; ! register YY_CHAR yy_c = 1; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = yy_def[yy_current_state]; - if ( yy_current_state >= 158 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 157); - - return ( yy_is_jam ? 0 : yy_current_state ); - } #ifdef YY_USE_PROTOS ! static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp ) #else static void yyunput( c, yy_bp ) ! YY_CHAR c; ! register YY_CHAR *yy_bp; #endif ! { ! register YY_CHAR *yy_cp = yy_c_buf_p; ! ! /* undo effects of setting up yytext */ ! *yy_cp = yy_hold_char; ! ! if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) ! { /* need to shift things up to make room */ ! register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */ ! register YY_CHAR *dest = ! &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2]; ! register YY_CHAR *source = ! &yy_current_buffer->yy_ch_buf[number_to_move]; ! ! while ( source > yy_current_buffer->yy_ch_buf ) ! *--dest = *--source; ! ! yy_cp += dest - source; ! yy_bp += dest - source; ! yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) ! YY_FATAL_ERROR( "flex scanner push-back overflow" ); ! } ! if ( yy_cp > yy_bp && yy_cp[-1] == '\n' ) ! yy_cp[-2] = '\n'; ! *--yy_cp = c; ! /* note: the formal parameter *must* be called "yy_bp" for this ! * macro to now work correctly ! */ ! YY_DO_BEFORE_ACTION; /* set up yytext again */ ! } #ifdef __cplusplus --- 1265,1645 ---- case YY_STATE_EOF(SQL_str): case YY_STATE_EOF(SQL_ident): case YY_STATE_EOF(SQL_comment): ! 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; ! if ( yy_current_buffer->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->yy_n_chars; ! yy_current_buffer->yy_input_file = yyin; ! yy_current_buffer->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->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->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() + { + register char *dest = yy_current_buffer->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->yy_ch_buf[yy_n_chars + 1] ) ! YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); ! if ( yy_current_buffer->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 singled characater, 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->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_n_chars = 0; ! else ! { ! int num_to_read = ! yy_current_buffer->yy_buf_size - number_to_move - 1; ! while ( num_to_read <= 0 ) ! { /* Not enough room in the buffer - grow it. */ ! #ifdef YY_USES_REJECT ! YY_FATAL_ERROR( ! "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); ! #else ! /* just a shorter name for the current buffer */ ! YY_BUFFER_STATE b = yy_current_buffer; ! int yy_c_buf_p_offset = ! (int) (yy_c_buf_p - b->yy_ch_buf); ! if ( b->yy_is_our_buffer ) ! { ! int new_size = b->yy_buf_size * 2; ! if ( new_size <= 0 ) ! b->yy_buf_size += b->yy_buf_size / 8; ! else ! b->yy_buf_size *= 2; ! ! b->yy_ch_buf = (char *) ! /* Include room in for 2 EOB chars. */ ! yy_flex_realloc( (void *) b->yy_ch_buf, ! b->yy_buf_size + 2 ); ! } ! else ! /* Can't grow it, we don't own it. */ ! b->yy_ch_buf = 0; ! if ( ! b->yy_ch_buf ) ! YY_FATAL_ERROR( ! "fatal error - scanner input buffer overflow" ); ! yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; ! num_to_read = yy_current_buffer->yy_buf_size - ! number_to_move - 1; ! #endif ! } + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; ! /* Read in more data. */ ! YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), ! yy_n_chars, num_to_read ); ! } ! 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->yy_buffer_status = ! YY_BUFFER_EOF_PENDING; ! } ! } ! else ! ret_val = EOB_ACT_CONTINUE_SCAN; ! yy_n_chars += number_to_move; ! yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; ! yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; ! yytext_ptr = &yy_current_buffer->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() ! { ! register yy_state_type yy_current_state; ! register char *yy_cp; ! ! yy_current_state = yy_start; ! yy_current_state += YY_AT_BOL(); ! ! for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) ! { ! register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = (int) yy_def[yy_current_state]; ! if ( yy_current_state >= 158 ) ! yy_c = yy_meta[(unsigned int) yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ! } ! ! return yy_current_state; ! } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis ! * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS ! static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) ! yy_state_type yy_current_state; #endif + { + register int yy_is_jam; + register char *yy_cp = yy_c_buf_p; ! register YY_CHAR yy_c = 1; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = (int) yy_def[yy_current_state]; ! if ( yy_current_state >= 158 ) ! 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 == 157); ! return yy_is_jam ? 0 : yy_current_state; } + #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS ! static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) ! int c; ! register char *yy_bp; #endif + { + register char *yy_cp = yy_c_buf_p; ! /* undo effects of setting up yytext */ ! *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->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->yy_ch_buf[ ! yy_current_buffer->yy_buf_size + 2]; ! register char *source = ! &yy_current_buffer->yy_ch_buf[number_to_move]; ! ! while ( source > yy_current_buffer->yy_ch_buf ) ! *--dest = *--source; ! ! yy_cp += (int) (dest - source); ! yy_bp += (int) (dest - source); ! yy_n_chars = yy_current_buffer->yy_buf_size; ! if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) ! YY_FATAL_ERROR( "flex scanner push-back overflow" ); ! } ! *--yy_cp = (char) c; ! ! yytext_ptr = yy_bp; ! yy_hold_char = *yy_cp; ! yy_c_buf_p = yy_cp; ! } ! #endif /* ifndef YY_NO_UNPUT */ #ifdef __cplusplus *************** *** 1395,1461 **** #else static int input() #endif - - { - int c; - YY_CHAR *yy_cp = yy_c_buf_p; - - *yy_cp = 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->yy_ch_buf[yy_n_chars] ) ! /* this was really a NUL */ ! *yy_c_buf_p = '\0'; ! else ! { /* need more input */ ! yytext = yy_c_buf_p; ! ++yy_c_buf_p; ! switch ( yy_get_next_buffer() ) { ! case EOB_ACT_END_OF_FILE: ! { ! if ( yywrap() ) ! { ! yy_c_buf_p = yytext + YY_MORE_ADJ; ! return ( EOF ); ! } ! YY_NEW_FILE; #ifdef __cplusplus ! return ( yyinput() ); #else ! return ( input() ); #endif ! } ! break; ! case EOB_ACT_CONTINUE_SCAN: ! yy_c_buf_p = yytext + YY_MORE_ADJ; ! break; ! case EOB_ACT_LAST_MATCH: #ifdef __cplusplus ! YY_FATAL_ERROR( "unexpected last match in yyinput()" ); #else ! YY_FATAL_ERROR( "unexpected last match in input()" ); #endif } - } - } ! c = *yy_c_buf_p; ! yy_hold_char = *++yy_c_buf_p; ! return ( c ); ! } #ifdef YY_USE_PROTOS --- 1647,1716 ---- #else static int input() #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->yy_ch_buf[yy_n_chars] ) ! /* This was really a NUL. */ ! *yy_c_buf_p = '\0'; ! ! else ! { /* need more input */ ! yytext_ptr = yy_c_buf_p; ! ++yy_c_buf_p; ! switch ( yy_get_next_buffer() ) ! { ! case EOB_ACT_END_OF_FILE: ! { ! if ( yywrap() ) ! { ! yy_c_buf_p = ! yytext_ptr + YY_MORE_ADJ; ! 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 + YY_MORE_ADJ; ! break; ! case EOB_ACT_LAST_MATCH: #ifdef __cplusplus ! YY_FATAL_ERROR( ! "unexpected last match in yyinput()" ); #else ! YY_FATAL_ERROR( ! "unexpected last match in input()" ); #endif + } + } } ! 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->yy_at_bol = (c == '\n'); ! ! return c; ! } #ifdef YY_USE_PROTOS *************** *** 1464,1474 **** void yyrestart( input_file ) FILE *input_file; #endif ! { ! yy_init_buffer( yy_current_buffer, input_file ); ! yy_load_buffer_state(); ! } #ifdef YY_USE_PROTOS --- 1719,1731 ---- void yyrestart( input_file ) FILE *input_file; #endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); ! yy_init_buffer( yy_current_buffer, input_file ); ! yy_load_buffer_state(); ! } #ifdef YY_USE_PROTOS *************** *** 1477,1505 **** void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif - - { - 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->yy_buf_pos = yy_c_buf_p; ! yy_current_buffer->yy_n_chars = yy_n_chars; ! } ! yy_current_buffer = 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; ! } #ifdef YY_USE_PROTOS --- 1734,1761 ---- void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { ! 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->yy_buf_pos = yy_c_buf_p; ! yy_current_buffer->yy_n_chars = yy_n_chars; ! } ! yy_current_buffer = 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; ! } #ifdef YY_USE_PROTOS *************** *** 1507,1519 **** #else void yy_load_buffer_state() #endif ! ! { ! yy_n_chars = yy_current_buffer->yy_n_chars; ! yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos; ! yyin = yy_current_buffer->yy_input_file; ! yy_hold_char = *yy_c_buf_p; ! } #ifdef YY_USE_PROTOS --- 1763,1774 ---- #else void yy_load_buffer_state() #endif ! { ! yy_n_chars = yy_current_buffer->yy_n_chars; ! yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; ! yyin = yy_current_buffer->yy_input_file; ! yy_hold_char = *yy_c_buf_p; ! } #ifdef YY_USE_PROTOS *************** *** 1523,1551 **** FILE *file; int size; #endif ! { ! YY_BUFFER_STATE b; ! ! b = (YY_BUFFER_STATE) malloc( 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 = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) ); ! if ( ! b->yy_ch_buf ) ! YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); ! yy_init_buffer( b, file ); ! return ( b ); ! } #ifdef YY_USE_PROTOS --- 1778,1805 ---- FILE *file; int size; #endif + { + YY_BUFFER_STATE b; ! b = (YY_BUFFER_STATE) yy_flex_alloc( 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 *) yy_flex_alloc( 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; ! } #ifdef YY_USE_PROTOS *************** *** 1554,1569 **** void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif ! { ! if ( b == yy_current_buffer ) ! yy_current_buffer = (YY_BUFFER_STATE) 0; ! free( (char *) b->yy_ch_buf ); ! free( (char *) b ); ! } #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else --- 1808,1833 ---- void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif + { + if ( ! b ) + return; ! if ( b == yy_current_buffer ) ! yy_current_buffer = (YY_BUFFER_STATE) 0; ! if ( b->yy_is_our_buffer ) ! yy_flex_free( (void *) b->yy_ch_buf ); ! ! yy_flex_free( (void *) b ); ! } + #ifndef YY_ALWAYS_INTERACTIVE + #ifndef YY_NEVER_INTERACTIVE + extern int isatty YY_PROTO(( int )); + #endif + #endif + #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else *************** *** 1572,1599 **** FILE *file; #endif - { - b->yy_input_file = file; ! /* we put in the '\n' and start reading from [1] so that an ! * initial match-at-newline will be true. ! */ ! b->yy_ch_buf[0] = '\n'; ! b->yy_n_chars = 1; ! /* 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[1] = YY_END_OF_BUFFER_CHAR; ! b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[1]; ! b->yy_eof_status = EOF_NOT_SEEN; ! } ! # line 310 "scan_c.l" typedef struct save_yy_cond { --- 1836,2131 ---- FILE *file; #endif ! { ! yy_flush_buffer( b ); ! b->yy_input_file = file; ! b->yy_fill_buffer = 1; ! #if YY_ALWAYS_INTERACTIVE ! b->yy_is_interactive = 1; ! #else ! #if YY_NEVER_INTERACTIVE ! b->yy_is_interactive = 0; ! #else ! b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; ! #endif ! #endif ! } ! #ifdef YY_USE_PROTOS ! void yy_flush_buffer( YY_BUFFER_STATE b ) ! #else ! void yy_flush_buffer( b ) ! YY_BUFFER_STATE b; ! #endif ! ! { ! 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(); ! } ! ! ! #ifndef YY_NO_SCAN_BUFFER ! #ifdef YY_USE_PROTOS ! YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) ! #else ! YY_BUFFER_STATE yy_scan_buffer( base, size ) ! char *base; ! yy_size_t size; ! #endif ! { ! 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) yy_flex_alloc( 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; ! } ! #endif ! ! ! #ifndef YY_NO_SCAN_STRING ! #ifdef YY_USE_PROTOS ! YY_BUFFER_STATE yy_scan_string( yyconst char *str ) ! #else ! YY_BUFFER_STATE yy_scan_string( str ) ! yyconst char *str; ! #endif ! { ! int len; ! for ( len = 0; str[len]; ++len ) ! ; ! ! return yy_scan_bytes( str, len ); ! } ! #endif ! ! ! #ifndef YY_NO_SCAN_BYTES ! #ifdef YY_USE_PROTOS ! YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) ! #else ! YY_BUFFER_STATE yy_scan_bytes( bytes, len ) ! yyconst char *bytes; ! int len; ! #endif ! { ! YY_BUFFER_STATE b; ! char *buf; ! yy_size_t n; ! int i; ! ! /* Get memory for full buffer, including space for trailing EOB's. */ ! n = len + 2; ! buf = (char *) yy_flex_alloc( n ); ! if ( ! buf ) ! YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); ! ! for ( i = 0; i < len; ++i ) ! buf[i] = bytes[i]; ! ! buf[len] = buf[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; ! } ! #endif ! ! ! #ifndef YY_NO_PUSH_STATE ! #ifdef YY_USE_PROTOS ! static void yy_push_state( int new_state ) ! #else ! static void yy_push_state( new_state ) ! int new_state; ! #endif ! { ! if ( yy_start_stack_ptr >= yy_start_stack_depth ) ! { ! yy_size_t new_size; ! ! yy_start_stack_depth += YY_START_STACK_INCR; ! new_size = yy_start_stack_depth * sizeof( int ); ! ! if ( ! yy_start_stack ) ! yy_start_stack = (int *) yy_flex_alloc( new_size ); ! ! else ! yy_start_stack = (int *) yy_flex_realloc( ! (void *) yy_start_stack, new_size ); ! ! if ( ! yy_start_stack ) ! YY_FATAL_ERROR( ! "out of memory expanding start-condition stack" ); ! } ! ! yy_start_stack[yy_start_stack_ptr++] = YY_START; ! ! BEGIN(new_state); ! } ! #endif ! ! ! #ifndef YY_NO_POP_STATE ! static void yy_pop_state() ! { ! if ( --yy_start_stack_ptr < 0 ) ! YY_FATAL_ERROR( "start-condition stack underflow" ); ! ! BEGIN(yy_start_stack[yy_start_stack_ptr]); ! } ! #endif ! ! ! #ifndef YY_NO_TOP_STATE ! static int yy_top_state() ! { ! return yy_start_stack[yy_start_stack_ptr - 1]; ! } ! #endif ! ! #ifndef YY_EXIT_FAILURE ! #define YY_EXIT_FAILURE 2 ! #endif ! ! #ifdef YY_USE_PROTOS ! static void yy_fatal_error( yyconst char msg[] ) ! #else ! static void yy_fatal_error( msg ) ! char msg[]; ! #endif ! { ! (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. */ \ ! yytext[yyleng] = yy_hold_char; \ ! yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ ! yy_hold_char = *yy_c_buf_p; \ ! *yy_c_buf_p = '\0'; \ ! yyleng = n; \ ! } \ ! while ( 0 ) ! ! ! /* Internal utility routines. */ ! ! #ifndef yytext_ptr ! #ifdef YY_USE_PROTOS ! static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) ! #else ! static void yy_flex_strncpy( s1, s2, n ) ! char *s1; ! yyconst char *s2; ! int n; ! #endif ! { ! register int i; ! for ( i = 0; i < n; ++i ) ! s1[i] = s2[i]; ! } ! #endif ! ! ! #ifdef YY_USE_PROTOS ! static void *yy_flex_alloc( yy_size_t size ) ! #else ! static void *yy_flex_alloc( size ) ! yy_size_t size; ! #endif ! { ! return (void *) malloc( size ); ! } ! ! #ifdef YY_USE_PROTOS ! static void *yy_flex_realloc( void *ptr, yy_size_t size ) ! #else ! static void *yy_flex_realloc( ptr, size ) ! void *ptr; ! yy_size_t size; ! #endif ! { ! /* 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 ); ! } ! ! #ifdef YY_USE_PROTOS ! static void yy_flex_free( void *ptr ) ! #else ! static void yy_flex_free( ptr ) ! void *ptr; ! #endif ! { ! free( ptr ); ! } ! ! #if YY_MAIN ! int main() ! { ! yylex(); ! return 0; ! } ! #endif ! typedef struct save_yy_cond { *************** *** 1665,1671 **** { char *p; if (ins_directives & 1) ! fprintf (yyout," progname_out); if (text) for (p = text; *p ; p++) --- 2197,2203 ---- { char *p; if (ins_directives & 1) ! fprintf (yyout,"#line %d \"%s\" \n", line_num + ( ++ io_diff), progname_out); if (text) for (p = text; *p ; p++) *************** *** 1691,1697 **** } if (ins_directives & 2) { ! fprintf(yyout," io_diff++; } } --- 2223,2229 ---- } if (ins_directives & 2) { ! fprintf(yyout,"#line %d \"%s\" \n",line_num,progname); io_diff++; } } *************** *** 1812,1815 **** --- 2344,2350 ---- fclose (yyout); return 1; } + #ifndef yywrap int yywrap() { return 1; } + #endif + /*end of scan_c.c.preserve*/ diff -rc gnusql-0.7b5.2/src/parse/scan_s.c.preserve gnusql-0.7b5.3/src/parse/scan_s.c.preserve *** gnusql-0.7b5.2/src/parse/scan_s.c.preserve Mon Apr 28 21:53:39 1997 --- gnusql-0.7b5.3/src/parse/scan_s.c.preserve Thu Jun 12 16:41:01 1997 *************** *** 1,10 **** /* A lexical scanner generated by flex */ ! /* scanner skeleton version: ! * $Header: /home/horse/u0/vern/flex/RCS/flex.skel,v 2.16 90/08/03 14:09:36 vern Exp Locker: vern $ */ #define FLEX_SCANNER #include --- 1,12 ---- /* A lexical scanner generated by flex */ ! /* Scanner skeleton version: ! * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $ */ #define FLEX_SCANNER + #define YY_FLEX_MAJOR_VERSION 2 + #define YY_FLEX_MINOR_VERSION 5 #include *************** *** 20,44 **** #ifdef __cplusplus #include ! #include ! /* use prototypes in function declarations */ #define YY_USE_PROTOS ! /* the "const" storage-class-modifier is valid */ #define YY_USE_CONST #else /* ! __cplusplus */ ! #ifdef __STDC__ ! ! #ifdef __GNUC__ ! #include ! void *malloc( size_t ); ! void free( void* ); ! #else ! #include ! #endif /* __GNUC__ */ #define YY_USE_PROTOS #define YY_USE_CONST --- 22,38 ---- #ifdef __cplusplus #include ! #include ! /* Use prototypes in function declarations. */ #define YY_USE_PROTOS ! /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ ! #if __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST *************** *** 46,59 **** #endif /* __STDC__ */ #endif /* ! __cplusplus */ - #ifdef __TURBOC__ #define YY_USE_CONST #endif ! ! #ifndef YY_USE_CONST ! #define const #endif --- 40,58 ---- #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use + #include + #include #define YY_USE_CONST + #define YY_USE_PROTOS #endif ! #ifdef YY_USE_CONST ! #define yyconst const ! #else ! #define yyconst #endif *************** *** 61,348 **** #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () - /* we can't get here if it's an ANSI C compiler, or a C++ compiler, - * so it's got to be a K&R compiler, and therefore there's no standard - * place from which to include these definitions - */ - char *malloc(); - int free(); - int read(); - #endif - - - /* amount of stuff to slurp up with each read */ - #ifndef YY_READ_BUF_SIZE - #define YY_READ_BUF_SIZE 8192 #endif ! /* returned upon end-of-file */ ! #define YY_END_TOK 0 ! ! /* copy whatever the last rule matched to the standard output */ ! /* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */ ! /* this used to be an fputs(), but since the string might contain NUL's, ! * we now use fwrite() */ ! #define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout ) ! /* gets input and stuffs it into "buf". number of characters read, or YY_NULL, ! * is returned in "result". */ ! #define YY_INPUT(buf,result,max_size) \ ! if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ ! YY_FATAL_ERROR( "read() in flex scanner failed" ); ! #define YY_NULL 0 ! /* 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. */ ! #define yyterminate() return ( YY_NULL ) ! /* report a fatal error */ ! /* The funky do-while is used to turn this macro definition into ! * a single C statement (which needs a semi-colon terminator). ! * This avoids problems with code like: * ! * if ( something_happens ) ! * YY_FATAL_ERROR( "oops, the something happened" ); * else ! * everything_okay(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all ! * done when it reached the ';' after the YY_FATAL_ERROR() call. ! */ ! ! #define YY_FATAL_ERROR(msg) \ ! do \ ! { \ ! (void) fputs( msg, stderr ); \ ! (void) putc( '\n', stderr ); \ ! exit( 1 ); \ ! } \ ! while ( 0 ) ! ! /* default yywrap function - always treat EOF as an EOF */ ! #define yywrap() 1 ! ! /* 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 * ! /* 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 \ do \ { \ ! yy_init_buffer( yy_current_buffer, yyin ); \ ! yy_load_buffer_state(); \ } \ while ( 0 ) ! /* default declaration of generated scanner - a define so the user can ! * easily add parameters ! */ ! #define YY_DECL int yylex YY_PROTO(( void )) ! ! /* code executed at the end of each rule */ ! #define YY_BREAK break; ! #define YY_END_OF_BUFFER_CHAR 0 - #ifndef YY_BUF_SIZE - #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */ - #endif ! typedef struct yy_buffer_state *YY_BUFFER_STATE; ! #define FLEX_DEBUG ! #define YY_CHAR unsigned char ! # line 1 "scan_s.l" ! #define INITIAL 0 ! # line 2 "scan_s.l" ! /* ! * scan_s.l - SQL scanner / server side. ! * ! * This file is a part of GNU SQL Server ! * ! * Copyright (c) 1996, 1997, Free Software Foundation, Inc ! * Developed at the Institute of System Programming ! * This file is written by Michael Kimelman ! * ! * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! * ! * Contact: gss@ispras.ru ! * ! */ ! /* $Id: scan_s.l,v 1.245 1997/03/31 03:46:38 kml Exp $ */ ! ! #include "xmem.h" ! #include "sql_decl.h" ! #include "trl.h" ! #include "parse.h" ! #include "const.h" ! ! ! #if defined(stderr) ! # undef stderr ! #endif ! #if defined(stdout) ! # undef stdout ! #endif ! #define stderr STDERR ! #define stdout STDOUT ! #define SQL_PROC(code) if(code) \ ! { \ ! yylloc.first_line=line_num; file_pos=yylloc.last_line=line_num; \ ! if (code==TOK_IDENTIFIER && !strcmp(STRING(yylval.ltrp),"DEFINITION_SCHEMA")) \ ! yylval.ltrp = ltr_rec(SYSADM); \ ! return code; \ ! } ! #undef YY_INPUT ! #define YY_INPUT(buf,result,max_size) serv_scan_buf_inp(buf,&result,max_size) ! extern YYLTYPE yylloc; ! static i4_t line_num=0; ! static char *bufstring=NULL; ! static void ! serv_scan_buf_inp(char *buf, i4_t *result, i4_t max_size) ! { ! register i4_t l = strlen (bufstring ); ! l= l > max_size ? max_size : l ; ! if(l) ! { ! bcopy (bufstring, buf, l); ! bufstring += l; ! *result = l; ! } ! else ! { ! *result = YY_NULL ; ! *buf = 0 ; ! } ! } ! /* void SAVESTR(char *s,LTRLREF d); */ ! #define SAVESTR(s,d) d=ltr_rec(s) ! static str_buf s_scanner_buffer={0,0,NULL}; ! #define sql_str(s,l) buffer_string(&s_scanner_buffer,s,l) ! #define SQL_str 1 ! #define SQL_comment 2 ! #define Identifier 3 ! # line 108 "scan_s.l" ! /* done after the current pattern has been matched and before the ! * corresponding action - sets up yytext */ ! #define YY_DO_BEFORE_ACTION \ ! yytext = yy_bp; \ ! yyleng = yy_cp - yy_bp; \ ! yy_hold_char = *yy_cp; \ ! *yy_cp = '\0'; \ ! yy_c_buf_p = yy_cp; ! ! #define EOB_ACT_CONTINUE_SCAN 0 ! #define EOB_ACT_END_OF_FILE 1 ! #define EOB_ACT_LAST_MATCH 2 ! ! /* return all but the first 'n' matched characters back to the input stream */ ! #define yyless(n) \ ! do \ ! { \ ! /* undo effects of setting up yytext */ \ ! *yy_cp = yy_hold_char; \ ! yy_c_buf_p = yy_cp = yy_bp + n; \ ! YY_DO_BEFORE_ACTION; /* set up yytext again */ \ ! } \ ! while ( 0 ) - #define unput(c) yyunput( c, yytext ) ! struct yy_buffer_state ! { ! FILE *yy_input_file; - YY_CHAR *yy_ch_buf; /* input buffer */ - YY_CHAR *yy_buf_pos; /* current position in input buffer */ ! /* size of input buffer in bytes, not including room for EOB characters */ ! int yy_buf_size; ! /* number of characters read into yy_ch_buf, not including EOB characters */ ! int yy_n_chars; ! int yy_eof_status; /* whether we've seen an EOF on this buffer */ ! #define EOF_NOT_SEEN 0 ! /* "pending" happens when the EOF has been seen but there's still ! * some text process ! */ ! #define EOF_PENDING 1 ! #define EOF_DONE 2 ! }; ! static YY_BUFFER_STATE yy_current_buffer; ! /* 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" ! */ ! #define YY_CURRENT_BUFFER yy_current_buffer ! /* yy_hold_char holds the character lost when yytext is formed */ ! static YY_CHAR yy_hold_char; ! static int yy_n_chars; /* number of characters read into yy_ch_buf */ - #ifndef YY_USER_ACTION - #define YY_USER_ACTION - #endif ! #ifndef YY_USER_INIT ! #define YY_USER_INIT ! #endif ! extern YY_CHAR *yytext; ! extern int yyleng; ! extern FILE *yyin, *yyout; ! YY_CHAR *yytext; ! int yyleng; ! FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; #define YY_END_OF_BUFFER 133 ! typedef int yy_state_type; ! static const short int yy_accept[471] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 133, 121, 116, 120, 118, 117, 107, 108, 99, 97, 109, 98, --- 60,293 ---- #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #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. */ ! #define YY_BUF_SIZE 16384 ! ! typedef struct yy_buffer_state *YY_BUFFER_STATE; ! ! 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 ! /* The funky do-while in the following #define is used to turn the definition ! * int a single C statement (which needs a semi-colon terminator). This ! * avoids problems with code like: * ! * if ( condition_holds ) ! * yyless( 5 ); * else ! * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all ! * done when it reached the ';' after the yyless() call. */ ! /* Return all but the first 'n' matched characters back to the input stream. */ ! #define yyless(n) \ do \ { \ ! /* Undo effects of setting up yytext. */ \ ! *yy_cp = yy_hold_char; \ ! yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ ! YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) ! #define unput(c) yyunput( c, yytext_ptr ) ! /* The following is because we cannot portably get our hands on size_t ! * (without autoconf's help, which isn't available because we want ! * flex-generated scanners to compile on their own). ! */ ! typedef unsigned int yy_size_t; ! 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; ! /* 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 ! }; ! static YY_BUFFER_STATE yy_current_buffer = 0; ! /* 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". */ ! #define YY_CURRENT_BUFFER yy_current_buffer + /* 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 = 1; /* 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 YY_PROTO(( FILE *input_file )); ! void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); ! void yy_load_buffer_state YY_PROTO(( void )); ! YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); ! void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); ! void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); ! void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); ! #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); + YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str )); + YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + + static void *yy_flex_alloc YY_PROTO(( yy_size_t )); + static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); + static void yy_flex_free YY_PROTO(( void * )); ! #define yy_new_buffer yy_create_buffer ! #define yy_set_interactive(is_interactive) \ ! { \ ! if ( ! yy_current_buffer ) \ ! yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ ! yy_current_buffer->yy_is_interactive = is_interactive; \ ! } + #define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) ! #define FLEX_DEBUG ! typedef unsigned char YY_CHAR; ! FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; ! typedef int yy_state_type; ! #define FLEX_DEBUG ! extern char *yytext; ! #define yytext_ptr yytext ! static yy_state_type yy_get_previous_state YY_PROTO(( void )); ! static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); ! static int yy_get_next_buffer YY_PROTO(( void )); ! static void yy_fatal_error YY_PROTO(( 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 = (int) (yy_cp - yy_bp); \ ! yy_hold_char = *yy_cp; \ ! *yy_cp = '\0'; \ ! yy_c_buf_p = yy_cp; + #define YY_NUM_RULES 132 #define YY_END_OF_BUFFER 133 ! static yyconst short int yy_accept[471] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 133, 121, 116, 120, 118, 117, 107, 108, 99, 97, 109, 98, *************** *** 397,403 **** 111, 84, 111, 88, 33, 35, 111, 111, 37, 0 } ; ! static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, --- 342,348 ---- 111, 84, 111, 88, 33, 35, 111, 111, 37, 0 } ; ! static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, *************** *** 429,435 **** 1, 1, 1, 1, 1 } ; ! static const YY_CHAR yy_meta[48] = { 0, 1, 1, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, --- 374,380 ---- 1, 1, 1, 1, 1 } ; ! static yyconst int yy_meta[48] = { 0, 1, 1, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, *************** *** 438,444 **** 6, 6, 6, 6, 6, 6, 6 } ; ! static const short int yy_base[479] = { 0, 0, 0, 45, 46, 1065, 1064, 49, 51, 1066, 1069, 1063, 1069, 1069, 1069, 1069, 1069, 1069, 1069, 1069, 1053, --- 383,389 ---- 6, 6, 6, 6, 6, 6, 6 } ; ! static yyconst short int yy_base[479] = { 0, 0, 0, 45, 46, 1065, 1064, 49, 51, 1066, 1069, 1063, 1069, 1069, 1069, 1069, 1069, 1069, 1069, 1069, 1053, *************** *** 494,500 **** 871, 877, 883, 59, 885, 891, 897, 899 } ; ! static const short int yy_def[479] = { 0, 470, 1, 471, 471, 472, 472, 473, 473, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, --- 439,445 ---- 871, 877, 883, 59, 885, 891, 897, 899 } ; ! static yyconst short int yy_def[479] = { 0, 470, 1, 471, 471, 472, 472, 473, 473, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, *************** *** 550,556 **** 470, 470, 470, 470, 470, 470, 470, 470 } ; ! static const short int yy_nxt[1117] = { 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, --- 495,501 ---- 470, 470, 470, 470, 470, 470, 470, 470 } ; ! static yyconst short int yy_nxt[1117] = { 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, *************** *** 677,683 **** 470, 470, 470, 470, 470, 470 } ; ! static const short int yy_chk[1117] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, --- 622,628 ---- 470, 470, 470, 470, 470, 470 } ; ! static yyconst short int yy_chk[1117] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, *************** *** 805,816 **** } ; static yy_state_type yy_last_accepting_state; ! static YY_CHAR *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 1; ! static const short int yy_rule_linenum[132] = { 0, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 130, 141, 142, 143, 144, 145, 150, 151, 152, 153, --- 750,761 ---- } ; static yy_state_type yy_last_accepting_state; ! static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 1; ! static yyconst short int yy_rule_linenum[132] = { 0, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 130, 141, 142, 143, 144, 145, 150, 151, 152, 153, *************** *** 829,878 **** 334 } ; ! /* the intent behind this definition is that it'll catch ! * any uses of REJECT which flex missed */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 ! /* these variables are all declared out here so that section 3 code can ! * manipulate them ! */ ! /* points to current character in buffer */ ! static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0; ! static int yy_init = 1; /* 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; ! static yy_state_type yy_get_previous_state YY_PROTO(( void )); ! static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); ! static int yy_get_next_buffer YY_PROTO(( void )); ! static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr )); ! void yyrestart YY_PROTO(( FILE *input_file )); ! void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); ! void yy_load_buffer_state YY_PROTO(( void )); ! YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); ! void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); ! void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); ! ! #define yy_new_buffer yy_create_buffer ! ! #ifdef __cplusplus ! static int yyinput YY_PROTO(( void )); ! #else ! static int input YY_PROTO(( void )); #endif ! YY_DECL { ! register yy_state_type yy_current_state; ! register YY_CHAR *yy_cp, *yy_bp; ! register int yy_act; yy_flex_debug=server_scanner_debug; --- 774,1023 ---- 334 } ; ! /* The intent behind this definition is that it'll catch ! * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 + char *yytext; ! #define INITIAL 0 ! /* ! * scan_s.l - SQL scanner / server side. ! * ! * This file is a part of GNU SQL Server ! * ! * Copyright (c) 1996, 1997, Free Software Foundation, Inc ! * Developed at the Institute of System Programming ! * This file is written by Michael Kimelman ! * ! * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! * ! * Contact: gss@ispras.ru ! * */ ! /* $Id: scan_s.l,v 1.245 1997/03/31 03:46:38 kml Exp $ */ ! ! #include "xmem.h" ! #include "sql_decl.h" ! #include "trl.h" ! #include "parse.h" ! #include "const.h" ! ! ! #if defined(stderr) ! # undef stderr ! #endif ! #if defined(stdout) ! # undef stdout #endif + #define stderr STDERR + #define stdout STDOUT ! #define SQL_PROC(code) if(code) \ ! { \ ! yylloc.first_line=line_num; file_pos=yylloc.last_line=line_num; \ ! if (code==TOK_IDENTIFIER && !strcmp(STRING(yylval.ltrp),"DEFINITION_SCHEMA")) \ ! yylval.ltrp = ltr_rec(SYSADM); \ ! return code; \ ! } ! ! #undef YY_INPUT ! #define YY_INPUT(buf,result,max_size) serv_scan_buf_inp(buf,&result,max_size) ! ! extern YYLTYPE yylloc; ! static i4_t line_num=0; ! static char *bufstring=NULL; ! ! static void ! serv_scan_buf_inp(char *buf, i4_t *result, i4_t max_size) ! { ! register i4_t l = strlen (bufstring ); ! l= l > max_size ? max_size : l ; ! if(l) ! { ! bcopy (bufstring, buf, l); ! bufstring += l; ! *result = l; ! } ! else { ! *result = YY_NULL ; ! *buf = 0 ; ! } ! } ! ! /* void SAVESTR(char *s,LTRLREF d); */ ! #define SAVESTR(s,d) d=ltr_rec(s) ! ! static str_buf s_scanner_buffer={0,0,NULL}; ! #define sql_str(s,l) buffer_string(&s_scanner_buffer,s,l) ! ! #define SQL_str 1 ! #define SQL_comment 2 ! #define Identifier 3 ! ! ! /* Macros after this point can all be overridden by user definitions in ! * section 1. ! */ ! ! #ifndef YY_SKIP_YYWRAP ! #ifdef __cplusplus ! extern "C" int yywrap YY_PROTO(( void )); ! #else ! extern int yywrap YY_PROTO(( void )); ! #endif ! #endif ! ! #ifndef YY_NO_UNPUT ! static void yyunput YY_PROTO(( int c, char *buf_ptr )); ! #endif ! ! #ifndef yytext_ptr ! static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); ! #endif ! ! #ifndef YY_NO_INPUT ! #ifdef __cplusplus ! static int yyinput YY_PROTO(( void )); ! #else ! static int input YY_PROTO(( void )); ! #endif ! #endif ! ! #if YY_STACK_USED ! static int yy_start_stack_ptr = 0; ! static int yy_start_stack_depth = 0; ! static int *yy_start_stack = 0; ! #ifndef YY_NO_PUSH_STATE ! static void yy_push_state YY_PROTO(( int new_state )); ! #endif ! #ifndef YY_NO_POP_STATE ! static void yy_pop_state YY_PROTO(( void )); ! #endif ! #ifndef YY_NO_TOP_STATE ! static int yy_top_state YY_PROTO(( void )); ! #endif ! ! #else ! #define YY_NO_PUSH_STATE 1 ! #define YY_NO_POP_STATE 1 ! #define YY_NO_TOP_STATE 1 ! #endif ! ! #ifdef YY_MALLOC_DECL ! YY_MALLOC_DECL ! #else ! #if __STDC__ ! #ifndef __cplusplus ! #include ! #endif ! #else ! /* Just try to get by without declaring the routines. This will fail ! * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) ! * or sizeof(void*) != sizeof(int). ! */ ! #endif ! #endif ! ! /* Amount of stuff to slurp up with each read. */ ! #ifndef YY_READ_BUF_SIZE ! #define YY_READ_BUF_SIZE 8192 ! #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 (void) fwrite( yytext, yyleng, 1, yyout ) ! #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->yy_is_interactive ) \ ! { \ ! int c = '*', 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 if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ ! && ferror( yyin ) ) \ ! YY_FATAL_ERROR( "input in flex scanner failed" ); ! #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 ! ! /* Default declaration of generated scanner - a define so the user can ! * easily add parameters. ! */ ! #ifndef YY_DECL ! #define YY_DECL int yylex YY_PROTO(( void )) ! #endif ! ! /* 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 \ ! YY_USER_ACTION ! ! YY_DECL ! { ! register yy_state_type yy_current_state; ! register char *yy_cp, *yy_bp; ! register int yy_act; ! yy_flex_debug=server_scanner_debug; *************** *** 880,1027 **** * embedded SQL lexics * *********************************************/ ! if ( yy_init ) ! { ! YY_USER_INIT; ! if ( ! yy_start ) ! yy_start = 1; /* first start state */ ! if ( ! yyin ) ! yyin = stdin; ! if ( ! yyout ) ! yyout = stdout; ! if ( yy_current_buffer ) ! yy_init_buffer( yy_current_buffer, yyin ); ! else ! yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); ! yy_load_buffer_state(); ! yy_init = 0; ! } ! 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_match: ! do ! { ! register YY_CHAR yy_c = yy_ec[*yy_cp]; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = yy_def[yy_current_state]; ! if ( yy_current_state >= 471 ) ! yy_c = yy_meta[yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ! ++yy_cp; ! } ! while ( yy_current_state != 470 ); ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; yy_find_action: ! yy_act = yy_accept[yy_current_state]; ! YY_DO_BEFORE_ACTION; ! YY_USER_ACTION; ! do_action: /* this label is used only to access EOF actions */ ! if ( yy_flex_debug ) ! { ! if ( yy_act == 0 ) ! fprintf( stderr, "--scanner backtracking\n" ); ! else if ( yy_act < 132 ) ! fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", ! yy_rule_linenum[yy_act], yytext ); ! else if ( yy_act == 132 ) ! fprintf( stderr, "--accepting default rule (\"%s\")\n", ! yytext ); ! else if ( yy_act == 133 ) ! fprintf( stderr, "--(end of buffer or a NUL)\n" ); ! else ! fprintf( stderr, "--EOF\n" ); ! } ! ! switch ( yy_act ) ! { ! case 0: /* must backtrack */ ! /* undo the effects of YY_DO_BEFORE_ACTION */ ! *yy_cp = yy_hold_char; ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! goto yy_find_action; case 1: ! # line 113 "scan_s.l" SQL_PROC(TOK_WHENEVER); YY_BREAK case 2: ! # line 114 "scan_s.l" SQL_PROC(TOK_FOUND ); YY_BREAK case 3: ! # line 115 "scan_s.l" SQL_PROC(TOK_SQLERROR); YY_BREAK case 4: ! # line 116 "scan_s.l" SQL_PROC(TOK_CONTINUE); YY_BREAK case 5: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 117 "scan_s.l" SQL_PROC(TOK_GOTO ); YY_BREAK case 6: ! # line 118 "scan_s.l" SQL_PROC(TOK_BEGIN ); YY_BREAK case 7: ! # line 119 "scan_s.l" SQL_PROC(TOK_END ); YY_BREAK case 8: ! # line 120 "scan_s.l" SQL_PROC(TOK_DECLARE ); YY_BREAK case 9: ! # line 121 "scan_s.l" SQL_PROC(TOK_SECTION ); YY_BREAK case 10: ! # line 122 "scan_s.l" { SAVESTR(yytext+1,yylval.ltrp); SQL_PROC(TOK_PARAM); } YY_BREAK ! /********************************************* * Dynamic SQL lexics * *********************************************/ case 11: ! # line 130 "scan_s.l" { static i4_t placeholders_counter = 0; char str[100]; --- 1025,1188 ---- * embedded SQL lexics * *********************************************/ ! if ( yy_init ) ! { ! yy_init = 0; ! #ifdef YY_USER_INIT ! YY_USER_INIT; ! #endif ! if ( ! yy_start ) ! yy_start = 1; /* first start state */ ! if ( ! yyin ) ! yyin = stdin; ! if ( ! yyout ) ! yyout = stdout; ! if ( ! yy_current_buffer ) ! yy_current_buffer = ! 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_match: ! do ! { ! register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = (int) yy_def[yy_current_state]; ! if ( yy_current_state >= 471 ) ! yy_c = yy_meta[(unsigned int) yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ! ++yy_cp; ! } ! while ( yy_base[yy_current_state] != 1069 ); yy_find_action: ! yy_act = yy_accept[yy_current_state]; ! if ( yy_act == 0 ) ! { /* have to back up */ ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! yy_act = yy_accept[yy_current_state]; ! } ! ! YY_DO_BEFORE_ACTION; ! ! do_action: /* This label is used only to access EOF actions. */ ! if ( yy_flex_debug ) ! { ! if ( yy_act == 0 ) ! fprintf( stderr, "--scanner backing up\n" ); ! else if ( yy_act < 132 ) ! fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", ! yy_rule_linenum[yy_act], yytext ); ! else if ( yy_act == 132 ) ! fprintf( stderr, "--accepting default rule (\"%s\")\n", ! yytext ); ! else if ( yy_act == 133 ) ! fprintf( stderr, "--(end of buffer or a NUL)\n" ); ! else ! fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); ! } ! switch ( yy_act ) ! { /* beginning of action switch */ ! case 0: /* must back up */ ! /* undo the effects of YY_DO_BEFORE_ACTION */ ! *yy_cp = yy_hold_char; ! yy_cp = yy_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! goto yy_find_action; case 1: ! YY_RULE_SETUP ! SQL_PROC(TOK_WHENEVER); YY_BREAK case 2: ! YY_RULE_SETUP ! SQL_PROC(TOK_FOUND ); YY_BREAK case 3: ! YY_RULE_SETUP ! SQL_PROC(TOK_SQLERROR); YY_BREAK case 4: ! YY_RULE_SETUP ! SQL_PROC(TOK_CONTINUE); YY_BREAK case 5: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_GOTO ); YY_BREAK case 6: ! YY_RULE_SETUP ! SQL_PROC(TOK_BEGIN ); YY_BREAK case 7: ! YY_RULE_SETUP ! SQL_PROC(TOK_END ); YY_BREAK case 8: ! YY_RULE_SETUP ! SQL_PROC(TOK_DECLARE ); YY_BREAK case 9: ! YY_RULE_SETUP ! SQL_PROC(TOK_SECTION ); YY_BREAK case 10: ! YY_RULE_SETUP ! { SAVESTR(yytext+1,yylval.ltrp); SQL_PROC(TOK_PARAM); } YY_BREAK ! /********************************************* * Dynamic SQL lexics * *********************************************/ case 11: ! YY_RULE_SETUP ! { static i4_t placeholders_counter = 0; char str[100]; *************** *** 1030,1564 **** SQL_PROC(TOK_PARAM); } YY_BREAK ! /********************************************* * clean SQL MODULE lexic * *********************************************/ case 12: ! # line 141 "scan_s.l" SQL_PROC(TOK_MODULE ); YY_BREAK case 13: ! # line 142 "scan_s.l" SQL_PROC(TOK_LANGUAGE ); YY_BREAK case 14: ! # line 143 "scan_s.l" SQL_PROC(TOK_PROCEDURE ); YY_BREAK case 15: ! # line 144 "scan_s.l" SQL_PROC(TOK_SQLCODE ); YY_BREAK case 16: ! # line 145 "scan_s.l" SQL_PROC(';' ); YY_BREAK ! /********************************************* * clean SQL SCHEMA lexic * *********************************************/ case 17: ! # line 150 "scan_s.l" SQL_PROC(TOK_CREATE ); YY_BREAK case 18: ! # line 151 "scan_s.l" SQL_PROC(TOK_DROP ); YY_BREAK case 19: ! # line 152 "scan_s.l" SQL_PROC(TOK_ALTER ); YY_BREAK case 20: ! # line 153 "scan_s.l" SQL_PROC(TOK_SCHEMA ); YY_BREAK case 21: ! # line 154 "scan_s.l" SQL_PROC(TOK_TABLE ); YY_BREAK case 22: ! # line 155 "scan_s.l" SQL_PROC(TOK_VIEW ); YY_BREAK case 23: ! # line 156 "scan_s.l" SQL_PROC(TOK_GRANT ); YY_BREAK case 24: ! # line 157 "scan_s.l" SQL_PROC(TOK_REVOKE ); YY_BREAK case 25: ! # line 158 "scan_s.l" SQL_PROC(TOK_CHECK ); YY_BREAK case 26: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 159 "scan_s.l" SQL_PROC(TOK_TO ); YY_BREAK case 27: ! # line 160 "scan_s.l" SQL_PROC(TOK_DEFAULT ); YY_BREAK case 28: ! # line 161 "scan_s.l" SQL_PROC(TOK_FOREIGN ); YY_BREAK case 29: ! # line 162 "scan_s.l" SQL_PROC(TOK_KEY ); YY_BREAK case 30: ! # line 163 "scan_s.l" SQL_PROC(TOK_PRIMARY ); YY_BREAK case 31: ! # line 164 "scan_s.l" SQL_PROC(TOK_INDEX ); YY_BREAK case 32: ! # line 165 "scan_s.l" SQL_PROC(TOK_OPTION ); YY_BREAK case 33: ! # line 166 "scan_s.l" SQL_PROC(TOK_PRIVILEGES); YY_BREAK case 34: ! # line 167 "scan_s.l" SQL_PROC(TOK_PUBLIC ); YY_BREAK case 35: ! # line 168 "scan_s.l" SQL_PROC(TOK_REFERENCES); YY_BREAK case 36: ! # line 169 "scan_s.l" SQL_PROC(TOK_UNIQUE ); YY_BREAK ! /********************************************* * clean SQL lexic * *********************************************/ case 37: ! # line 174 "scan_s.l" SQL_PROC(TOK_AUTHORIZATION); YY_BREAK ! /********************************************* * common SQL keywords * *********************************************/ case 38: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 179 "scan_s.l" SQL_PROC(TOK_ALL ); YY_BREAK case 39: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 180 "scan_s.l" SQL_PROC(TOK_ANY ); YY_BREAK case 40: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 181 "scan_s.l" SQL_PROC(TOK_AS ); YY_BREAK case 41: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 182 "scan_s.l" SQL_PROC(TOK_ASC ); YY_BREAK case 42: ! # line 183 "scan_s.l" SQL_PROC(TOK_BETWEEN ); YY_BREAK case 43: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 184 "scan_s.l" SQL_PROC(TOK_BY ); YY_BREAK case 44: ! # line 185 "scan_s.l" SQL_PROC(TOK_CLOSE ); YY_BREAK case 45: ! # line 186 "scan_s.l" SQL_PROC(TOK_COMMIT ); YY_BREAK case 46: ! # line 187 "scan_s.l" SQL_PROC(TOK_CURRENT ); YY_BREAK case 47: ! # line 188 "scan_s.l" SQL_PROC(TOK_CURSOR ); YY_BREAK case 48: ! # line 189 "scan_s.l" SQL_PROC(TOK_DELETE ); YY_BREAK case 49: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 190 "scan_s.l" SQL_PROC(TOK_DESC ); YY_BREAK case 50: ! # line 191 "scan_s.l" SQL_PROC(TOK_DISTINCT ); YY_BREAK case 51: ! # line 192 "scan_s.l" SQL_PROC(TOK_ESCAPE ); YY_BREAK case 52: ! # line 193 "scan_s.l" SQL_PROC(TOK_EXISTS ); YY_BREAK case 53: ! # line 194 "scan_s.l" SQL_PROC(TOK_FETCH ); YY_BREAK case 54: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 195 "scan_s.l" SQL_PROC(TOK_FOR ); YY_BREAK case 55: ! # line 196 "scan_s.l" SQL_PROC(TOK_FROM ); YY_BREAK case 56: ! # line 197 "scan_s.l" SQL_PROC(TOK_GROUP ); YY_BREAK case 57: ! # line 198 "scan_s.l" SQL_PROC(TOK_HAVING ); YY_BREAK case 58: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 199 "scan_s.l" SQL_PROC(TOK_IN ); YY_BREAK case 59: ! # line 200 "scan_s.l" SQL_PROC(TOK_INDICATOR ); YY_BREAK case 60: ! # line 201 "scan_s.l" SQL_PROC(TOK_INSERT ); YY_BREAK case 61: ! # line 202 "scan_s.l" SQL_PROC(TOK_INTO ); YY_BREAK case 62: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 203 "scan_s.l" SQL_PROC(TOK_IS ); YY_BREAK case 63: ! # line 204 "scan_s.l" SQL_PROC(TOK_LIKE ); YY_BREAK case 64: ! # line 205 "scan_s.l" SQL_PROC(TOK_NULL ); YY_BREAK case 65: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 206 "scan_s.l" SQL_PROC(TOK_OF ); YY_BREAK case 66: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 207 "scan_s.l" SQL_PROC(TOK_ON ); YY_BREAK case 67: ! # line 208 "scan_s.l" SQL_PROC(TOK_OPEN ); YY_BREAK case 68: ! # line 209 "scan_s.l" SQL_PROC(TOK_ORDER ); YY_BREAK case 69: ! # line 210 "scan_s.l" SQL_PROC(TOK_ROLLBACK ); YY_BREAK case 70: ! # line 211 "scan_s.l" SQL_PROC(TOK_SELECT ); YY_BREAK case 71: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 212 "scan_s.l" SQL_PROC(TOK_SET ); YY_BREAK case 72: ! # line 213 "scan_s.l" SQL_PROC(TOK_SOME ); YY_BREAK case 73: ! # line 214 "scan_s.l" SQL_PROC(TOK_UNION ); YY_BREAK case 74: ! # line 215 "scan_s.l" SQL_PROC(TOK_UPDATE ); YY_BREAK case 75: ! # line 216 "scan_s.l" SQL_PROC(TOK_USER ); YY_BREAK case 76: ! # line 217 "scan_s.l" SQL_PROC(TOK_VALUES ); YY_BREAK case 77: ! # line 218 "scan_s.l" SQL_PROC(TOK_WHERE ); YY_BREAK case 78: ! # line 219 "scan_s.l" SQL_PROC(TOK_WITH ); YY_BREAK case 79: ! # line 220 "scan_s.l" SQL_PROC(TOK_WORK ); YY_BREAK ! /****************************************** * common SQL keywords for data type * ******************************************/ case 80: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 225 "scan_s.l" SQL_PROC(TOK_T_CHAR); YY_BREAK case 81: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 7; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 226 "scan_s.l" SQL_PROC(TOK_T_NUM); YY_BREAK case 82: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 227 "scan_s.l" SQL_PROC(TOK_T_NUM); YY_BREAK case 83: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 228 "scan_s.l" SQL_PROC(TOK_T_INT); YY_BREAK case 84: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 8; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 229 "scan_s.l" SQL_PROC(TOK_T_SINT); YY_BREAK case 85: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 230 "scan_s.l" SQL_PROC(TOK_T_FLT); YY_BREAK case 86: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 231 "scan_s.l" SQL_PROC(TOK_T_REAL); YY_BREAK case 87: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 232 "scan_s.l" SQL_PROC(TOK_T_DOUBLE); YY_BREAK case 88: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 9; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 233 "scan_s.l" SQL_PROC(TOK_T_PRECISION); YY_BREAK ! /****************************************** * common SQL keywords for expression * ******************************************/ case 89: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 238 "scan_s.l" SQL_PROC(TOK_AND ); YY_BREAK case 90: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 239 "scan_s.l" SQL_PROC(TOK_OR ); YY_BREAK case 91: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 240 "scan_s.l" SQL_PROC(TOK_NOT ); YY_BREAK case 92: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 242 "scan_s.l" SQL_PROC(TOK_AVG ); YY_BREAK case 93: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 243 "scan_s.l" SQL_PROC(TOK_MAX ); YY_BREAK case 94: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 244 "scan_s.l" SQL_PROC(TOK_MIN ); YY_BREAK case 95: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 245 "scan_s.l" SQL_PROC(TOK_SUM ); YY_BREAK case 96: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! # line 246 "scan_s.l" SQL_PROC(TOK_COUNT ); YY_BREAK case 97: ! # line 248 "scan_s.l" SQL_PROC('+' ); YY_BREAK case 98: ! # line 249 "scan_s.l" SQL_PROC('-' ); YY_BREAK case 99: ! # line 250 "scan_s.l" SQL_PROC('*' ); YY_BREAK case 100: ! # line 251 "scan_s.l" SQL_PROC('/' ); YY_BREAK case 101: ! # line 253 "scan_s.l" SQL_PROC('=' ); YY_BREAK case 102: ! # line 254 "scan_s.l" SQL_PROC(TOK_NE); YY_BREAK case 103: ! # line 255 "scan_s.l" SQL_PROC('>' ); YY_BREAK case 104: ! # line 256 "scan_s.l" SQL_PROC('<' ); YY_BREAK case 105: ! # line 257 "scan_s.l" SQL_PROC(TOK_GE); YY_BREAK case 106: ! # line 258 "scan_s.l" SQL_PROC(TOK_LE); YY_BREAK case 107: ! # line 260 "scan_s.l" SQL_PROC('(' ); YY_BREAK case 108: ! # line 261 "scan_s.l" SQL_PROC(')' ); YY_BREAK case 109: ! # line 262 "scan_s.l" SQL_PROC(',' ); YY_BREAK case 110: ! # line 263 "scan_s.l" SQL_PROC('.' ); YY_BREAK case 111: ! # line 265 "scan_s.l" { SAVESTR(yytext,yylval.ltrp); SQL_PROC(TOK_IDENTIFIER);} YY_BREAK case 112: ! # line 268 "scan_s.l" { /* read decimal constant */ yylval.node=gen_const_node(SQLType_Int,yytext); SQL_PROC(TOK_INTEGER_CONST); } YY_BREAK case 113: ! # line 271 "scan_s.l" { /* read float constant */ yylval.node=gen_const_node(SQLType_Num,yytext); SQL_PROC(TOK_NUM_CONST); } YY_BREAK case 114: ! # line 274 "scan_s.l" { /* read float constant */ yylval.node=gen_const_node(SQLType_Real,yytext); SQL_PROC(TOK_REAL_CONST); } YY_BREAK case 115: ! # line 277 "scan_s.l" { /* read float constant with error in exponent */ yyerror("Lex: error format for floating constant"); sql_str(yytext,yyleng); --- 1191,1829 ---- SQL_PROC(TOK_PARAM); } YY_BREAK ! /********************************************* * clean SQL MODULE lexic * *********************************************/ case 12: ! YY_RULE_SETUP ! SQL_PROC(TOK_MODULE ); YY_BREAK case 13: ! YY_RULE_SETUP ! SQL_PROC(TOK_LANGUAGE ); YY_BREAK case 14: ! YY_RULE_SETUP ! SQL_PROC(TOK_PROCEDURE ); YY_BREAK case 15: ! YY_RULE_SETUP ! SQL_PROC(TOK_SQLCODE ); YY_BREAK case 16: ! YY_RULE_SETUP ! SQL_PROC(';' ); YY_BREAK ! /********************************************* * clean SQL SCHEMA lexic * *********************************************/ case 17: ! YY_RULE_SETUP ! SQL_PROC(TOK_CREATE ); YY_BREAK case 18: ! YY_RULE_SETUP ! SQL_PROC(TOK_DROP ); YY_BREAK case 19: ! YY_RULE_SETUP ! SQL_PROC(TOK_ALTER ); YY_BREAK case 20: ! YY_RULE_SETUP ! SQL_PROC(TOK_SCHEMA ); YY_BREAK case 21: ! YY_RULE_SETUP ! SQL_PROC(TOK_TABLE ); YY_BREAK case 22: ! YY_RULE_SETUP ! SQL_PROC(TOK_VIEW ); YY_BREAK case 23: ! YY_RULE_SETUP ! SQL_PROC(TOK_GRANT ); YY_BREAK case 24: ! YY_RULE_SETUP ! SQL_PROC(TOK_REVOKE ); YY_BREAK case 25: ! YY_RULE_SETUP ! SQL_PROC(TOK_CHECK ); YY_BREAK case 26: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_TO ); YY_BREAK case 27: ! YY_RULE_SETUP ! SQL_PROC(TOK_DEFAULT ); YY_BREAK case 28: ! YY_RULE_SETUP ! SQL_PROC(TOK_FOREIGN ); YY_BREAK case 29: ! YY_RULE_SETUP ! SQL_PROC(TOK_KEY ); YY_BREAK case 30: ! YY_RULE_SETUP ! SQL_PROC(TOK_PRIMARY ); YY_BREAK case 31: ! YY_RULE_SETUP ! SQL_PROC(TOK_INDEX ); YY_BREAK case 32: ! YY_RULE_SETUP ! SQL_PROC(TOK_OPTION ); YY_BREAK case 33: ! YY_RULE_SETUP ! SQL_PROC(TOK_PRIVILEGES); YY_BREAK case 34: ! YY_RULE_SETUP ! SQL_PROC(TOK_PUBLIC ); YY_BREAK case 35: ! YY_RULE_SETUP ! SQL_PROC(TOK_REFERENCES); YY_BREAK case 36: ! YY_RULE_SETUP ! SQL_PROC(TOK_UNIQUE ); YY_BREAK ! /********************************************* * clean SQL lexic * *********************************************/ case 37: ! YY_RULE_SETUP ! SQL_PROC(TOK_AUTHORIZATION); YY_BREAK ! /********************************************* * common SQL keywords * *********************************************/ case 38: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_ALL ); YY_BREAK case 39: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_ANY ); YY_BREAK case 40: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_AS ); YY_BREAK case 41: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_ASC ); YY_BREAK case 42: ! YY_RULE_SETUP ! SQL_PROC(TOK_BETWEEN ); YY_BREAK case 43: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_BY ); YY_BREAK case 44: ! YY_RULE_SETUP ! SQL_PROC(TOK_CLOSE ); YY_BREAK case 45: ! YY_RULE_SETUP ! SQL_PROC(TOK_COMMIT ); YY_BREAK case 46: ! YY_RULE_SETUP ! SQL_PROC(TOK_CURRENT ); YY_BREAK case 47: ! YY_RULE_SETUP ! SQL_PROC(TOK_CURSOR ); YY_BREAK case 48: ! YY_RULE_SETUP ! SQL_PROC(TOK_DELETE ); YY_BREAK case 49: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_DESC ); YY_BREAK case 50: ! YY_RULE_SETUP ! SQL_PROC(TOK_DISTINCT ); YY_BREAK case 51: ! YY_RULE_SETUP ! SQL_PROC(TOK_ESCAPE ); YY_BREAK case 52: ! YY_RULE_SETUP ! SQL_PROC(TOK_EXISTS ); YY_BREAK case 53: ! YY_RULE_SETUP ! SQL_PROC(TOK_FETCH ); YY_BREAK case 54: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_FOR ); YY_BREAK case 55: ! YY_RULE_SETUP ! SQL_PROC(TOK_FROM ); YY_BREAK case 56: ! YY_RULE_SETUP ! SQL_PROC(TOK_GROUP ); YY_BREAK case 57: ! YY_RULE_SETUP ! SQL_PROC(TOK_HAVING ); YY_BREAK case 58: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_IN ); YY_BREAK case 59: ! YY_RULE_SETUP ! SQL_PROC(TOK_INDICATOR ); YY_BREAK case 60: ! YY_RULE_SETUP ! SQL_PROC(TOK_INSERT ); YY_BREAK case 61: ! YY_RULE_SETUP ! SQL_PROC(TOK_INTO ); YY_BREAK case 62: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_IS ); YY_BREAK case 63: ! YY_RULE_SETUP ! SQL_PROC(TOK_LIKE ); YY_BREAK case 64: ! YY_RULE_SETUP ! SQL_PROC(TOK_NULL ); YY_BREAK case 65: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_OF ); YY_BREAK case 66: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_ON ); YY_BREAK case 67: ! YY_RULE_SETUP ! SQL_PROC(TOK_OPEN ); YY_BREAK case 68: ! YY_RULE_SETUP ! SQL_PROC(TOK_ORDER ); YY_BREAK case 69: ! YY_RULE_SETUP ! SQL_PROC(TOK_ROLLBACK ); YY_BREAK case 70: ! YY_RULE_SETUP ! SQL_PROC(TOK_SELECT ); YY_BREAK case 71: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_SET ); YY_BREAK case 72: ! YY_RULE_SETUP ! SQL_PROC(TOK_SOME ); YY_BREAK case 73: ! YY_RULE_SETUP ! SQL_PROC(TOK_UNION ); YY_BREAK case 74: ! YY_RULE_SETUP ! SQL_PROC(TOK_UPDATE ); YY_BREAK case 75: ! YY_RULE_SETUP ! SQL_PROC(TOK_USER ); YY_BREAK case 76: ! YY_RULE_SETUP ! SQL_PROC(TOK_VALUES ); YY_BREAK case 77: ! YY_RULE_SETUP ! SQL_PROC(TOK_WHERE ); YY_BREAK case 78: ! YY_RULE_SETUP ! SQL_PROC(TOK_WITH ); YY_BREAK case 79: ! YY_RULE_SETUP ! SQL_PROC(TOK_WORK ); YY_BREAK ! /****************************************** * common SQL keywords for data type * ******************************************/ case 80: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_T_CHAR); YY_BREAK case 81: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 7; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_T_NUM); YY_BREAK case 82: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_T_NUM); YY_BREAK case 83: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_T_INT); YY_BREAK case 84: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 8; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_T_SINT); YY_BREAK case 85: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_T_FLT); YY_BREAK case 86: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_T_REAL); YY_BREAK case 87: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_T_DOUBLE); YY_BREAK case 88: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 9; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_T_PRECISION); YY_BREAK ! /****************************************** * common SQL keywords for expression * ******************************************/ case 89: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_AND ); YY_BREAK case 90: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_OR ); YY_BREAK case 91: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_NOT ); YY_BREAK case 92: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_AVG ); YY_BREAK case 93: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_MAX ); YY_BREAK case 94: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_MIN ); YY_BREAK case 95: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_SUM ); YY_BREAK case 96: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ ! YY_RULE_SETUP ! SQL_PROC(TOK_COUNT ); YY_BREAK case 97: ! YY_RULE_SETUP ! SQL_PROC('+' ); YY_BREAK case 98: ! YY_RULE_SETUP ! SQL_PROC('-' ); YY_BREAK case 99: ! YY_RULE_SETUP ! SQL_PROC('*' ); YY_BREAK case 100: ! YY_RULE_SETUP ! SQL_PROC('/' ); YY_BREAK case 101: ! YY_RULE_SETUP ! SQL_PROC('=' ); YY_BREAK case 102: ! YY_RULE_SETUP ! SQL_PROC(TOK_NE); YY_BREAK case 103: ! YY_RULE_SETUP ! SQL_PROC('>' ); YY_BREAK case 104: ! YY_RULE_SETUP ! SQL_PROC('<' ); YY_BREAK case 105: ! YY_RULE_SETUP ! SQL_PROC(TOK_GE); YY_BREAK case 106: ! YY_RULE_SETUP ! SQL_PROC(TOK_LE); YY_BREAK case 107: ! YY_RULE_SETUP ! SQL_PROC('(' ); YY_BREAK case 108: ! YY_RULE_SETUP ! SQL_PROC(')' ); YY_BREAK case 109: ! YY_RULE_SETUP ! SQL_PROC(',' ); YY_BREAK case 110: ! YY_RULE_SETUP ! SQL_PROC('.' ); YY_BREAK case 111: ! YY_RULE_SETUP ! { SAVESTR(yytext,yylval.ltrp); SQL_PROC(TOK_IDENTIFIER);} YY_BREAK case 112: ! YY_RULE_SETUP ! { /* read decimal constant */ yylval.node=gen_const_node(SQLType_Int,yytext); SQL_PROC(TOK_INTEGER_CONST); } YY_BREAK case 113: ! YY_RULE_SETUP ! { /* read float constant */ yylval.node=gen_const_node(SQLType_Num,yytext); SQL_PROC(TOK_NUM_CONST); } YY_BREAK case 114: ! YY_RULE_SETUP ! { /* read float constant */ yylval.node=gen_const_node(SQLType_Real,yytext); SQL_PROC(TOK_REAL_CONST); } YY_BREAK case 115: ! YY_RULE_SETUP ! { /* read float constant with error in exponent */ yyerror("Lex: error format for floating constant"); sql_str(yytext,yyleng); *************** *** 1570,1596 **** SQL_PROC(TOK_REAL_CONST); } YY_BREAK case 116: ! # line 286 "scan_s.l" /* do nothing */ YY_BREAK case 117: ! # line 287 "scan_s.l" BEGIN(SQL_str); YY_BREAK case 118: ! # line 288 "scan_s.l" BEGIN(Identifier); YY_BREAK case 119: ! # line 289 "scan_s.l" BEGIN(SQL_comment); /* ? ? obsolete */ YY_BREAK case 120: ! # line 290 "scan_s.l" line_num++; YY_BREAK case 121: ! # line 291 "scan_s.l" { char strng[100]; file_pos=line_num; --- 1835,1867 ---- SQL_PROC(TOK_REAL_CONST); } YY_BREAK case 116: ! YY_RULE_SETUP ! /* do nothing */ YY_BREAK case 117: ! YY_RULE_SETUP ! BEGIN(SQL_str); YY_BREAK case 118: ! YY_RULE_SETUP ! BEGIN(Identifier); YY_BREAK case 119: ! YY_RULE_SETUP ! BEGIN(SQL_comment); /* ? ? obsolete */ YY_BREAK case 120: ! YY_RULE_SETUP ! line_num++; YY_BREAK case 121: ! YY_RULE_SETUP ! { char strng[100]; file_pos=line_num; *************** *** 1600,1614 **** yyerror(strng); } YY_BREAK ! /********************************************* * SQL string recognizer * *********************************************/ case 122: ! # line 302 "scan_s.l" sql_str("'",1); YY_BREAK case 123: ! # line 303 "scan_s.l" { yyerror(" Unterminated SQL string "); line_num++; --- 1871,1887 ---- yyerror(strng); } YY_BREAK ! /********************************************* * SQL string recognizer * *********************************************/ case 122: ! YY_RULE_SETUP ! sql_str("'",1); YY_BREAK case 123: ! YY_RULE_SETUP ! { yyerror(" Unterminated SQL string "); line_num++; *************** *** 1616,1626 **** } YY_BREAK case 124: ! # line 308 "scan_s.l" sql_str(yytext,yyleng); YY_BREAK case 125: ! # line 309 "scan_s.l" { char *ptr=sql_str(NULL,0); BEGIN(INITIAL); --- 1889,1901 ---- } YY_BREAK case 124: ! YY_RULE_SETUP ! sql_str(yytext,yyleng); YY_BREAK case 125: ! YY_RULE_SETUP ! { char *ptr=sql_str(NULL,0); BEGIN(INITIAL); *************** *** 1628,1642 **** SQL_PROC(TOK_STRING_CONST); } YY_BREAK ! /********************************************* * SQL quoted identifiers * *********************************************/ case 126: ! # line 318 "scan_s.l" sql_str("\"",1); YY_BREAK case 127: ! # line 319 "scan_s.l" { yyerror(" Unterminated quoted identifier "); line_num++; --- 1903,1919 ---- SQL_PROC(TOK_STRING_CONST); } YY_BREAK ! /********************************************* * SQL quoted identifiers * *********************************************/ case 126: ! YY_RULE_SETUP ! sql_str("\"",1); YY_BREAK case 127: ! YY_RULE_SETUP ! { yyerror(" Unterminated quoted identifier "); line_num++; *************** *** 1644,1996 **** } YY_BREAK case 128: ! # line 324 "scan_s.l" sql_str(yytext,yyleng); YY_BREAK case 129: ! # line 325 "scan_s.l" { BEGIN(INITIAL); SAVESTR(sql_str(NULL,0),yylval.ltrp); SQL_PROC(TOK_IDENTIFIER); } YY_BREAK ! /********************************************* * SQL comment recognizer * *********************************************/ case 130: ! # line 333 "scan_s.l" /* do nothing */; YY_BREAK case 131: ! # line 334 "scan_s.l" { line_num++; BEGIN(INITIAL); } YY_BREAK case 132: ! # line 336 "scan_s.l" ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(SQL_str): case YY_STATE_EOF(SQL_comment): case YY_STATE_EOF(Identifier): ! yyterminate(); ! case YY_END_OF_BUFFER: { ! /* amount of text matched not including the EOB char */ ! int yy_amount_of_matched_text = yy_cp - yytext - 1; ! /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; ! /* 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 yyinput(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) ! /* this was really a NUL */ ! { ! yy_state_type yy_next_state; ! ! yy_c_buf_p = yytext + 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 + 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_last_accepting_cpos; ! yy_current_state = yy_last_accepting_state; ! 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 + YY_MORE_ADJ; ! ! yy_act = YY_STATE_EOF((yy_start - 1) / 2); ! 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 + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext + YY_MORE_ADJ; - goto yy_find_action; - } break; } ! default: ! #ifdef FLEX_DEBUG ! printf( "action # %d\n", yy_act ); ! #endif YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); ! } ! } ! } /* yy_get_next_buffer - try to read in a new buffer * ! * synopsis ! * int yy_get_next_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() ! { ! register YY_CHAR *dest = yy_current_buffer->yy_ch_buf; ! register YY_CHAR *source = yytext - 1; /* copy prev. char, too */ ! register int number_to_move, i; ! int ret_val; ! ! if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) ! YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); ! /* try to read more data */ ! /* first move last chars to start of buffer */ ! number_to_move = yy_c_buf_p - yytext; ! for ( i = 0; i < number_to_move; ++i ) ! *(dest++) = *(source++); ! if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN ) ! /* don't do the read, it's not guaranteed to return an EOF, ! * just force an EOF ! */ ! yy_n_chars = 0; ! else ! { ! int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; ! if ( num_to_read > YY_READ_BUF_SIZE ) ! num_to_read = YY_READ_BUF_SIZE; ! else if ( num_to_read <= 0 ) ! YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); ! /* read in more data */ ! YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), ! yy_n_chars, num_to_read ); ! } ! if ( yy_n_chars == 0 ) ! { ! if ( number_to_move - YY_MORE_ADJ == 1 ) ! { ! ret_val = EOB_ACT_END_OF_FILE; ! yy_current_buffer->yy_eof_status = EOF_DONE; ! } ! else ! { ! ret_val = EOB_ACT_LAST_MATCH; ! yy_current_buffer->yy_eof_status = EOF_PENDING; ! } ! } ! else ! ret_val = EOB_ACT_CONTINUE_SCAN; ! yy_n_chars += number_to_move; ! yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; ! yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; ! /* yytext begins at the second character in yy_ch_buf; the first ! * character is the one which preceded it before reading in the latest ! * buffer; it needs to be kept around in case it's a newline, so ! * yy_get_previous_state() will have with '^' rules active ! */ ! yytext = &yy_current_buffer->yy_ch_buf[1]; ! return ( ret_val ); ! } ! /* yy_get_previous_state - get the state just before the EOB char was reached ! * ! * synopsis ! * yy_state_type yy_get_previous_state(); ! */ ! static yy_state_type yy_get_previous_state() ! { ! register yy_state_type yy_current_state; ! register YY_CHAR *yy_cp; - yy_current_state = yy_start; ! for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { ! register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1); ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = yy_def[yy_current_state]; ! if ( yy_current_state >= 471 ) ! yy_c = yy_meta[yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ! } ! return ( yy_current_state ); ! } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis ! * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS ! static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) ! register yy_state_type yy_current_state; #endif ! { ! register int yy_is_jam; ! register YY_CHAR *yy_cp = yy_c_buf_p; ! register YY_CHAR yy_c = 1; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = yy_def[yy_current_state]; - if ( yy_current_state >= 471 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 470); - - return ( yy_is_jam ? 0 : yy_current_state ); - } #ifdef YY_USE_PROTOS ! static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp ) #else static void yyunput( c, yy_bp ) ! YY_CHAR c; ! register YY_CHAR *yy_bp; #endif ! { ! register YY_CHAR *yy_cp = yy_c_buf_p; ! ! /* undo effects of setting up yytext */ ! *yy_cp = yy_hold_char; ! ! if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) ! { /* need to shift things up to make room */ ! register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */ ! register YY_CHAR *dest = ! &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2]; ! register YY_CHAR *source = ! &yy_current_buffer->yy_ch_buf[number_to_move]; ! ! while ( source > yy_current_buffer->yy_ch_buf ) ! *--dest = *--source; ! ! yy_cp += dest - source; ! yy_bp += dest - source; ! yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) ! YY_FATAL_ERROR( "flex scanner push-back overflow" ); ! } ! if ( yy_cp > yy_bp && yy_cp[-1] == '\n' ) ! yy_cp[-2] = '\n'; ! *--yy_cp = c; ! /* note: the formal parameter *must* be called "yy_bp" for this ! * macro to now work correctly ! */ ! YY_DO_BEFORE_ACTION; /* set up yytext again */ ! } #ifdef __cplusplus --- 1921,2335 ---- } YY_BREAK case 128: ! YY_RULE_SETUP ! sql_str(yytext,yyleng); YY_BREAK case 129: ! YY_RULE_SETUP ! { BEGIN(INITIAL); SAVESTR(sql_str(NULL,0),yylval.ltrp); SQL_PROC(TOK_IDENTIFIER); } YY_BREAK ! /********************************************* * SQL comment recognizer * *********************************************/ case 130: ! YY_RULE_SETUP ! /* do nothing */; YY_BREAK case 131: ! YY_RULE_SETUP ! { line_num++; BEGIN(INITIAL); } YY_BREAK case 132: ! YY_RULE_SETUP ! ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(SQL_str): case YY_STATE_EOF(SQL_comment): case YY_STATE_EOF(Identifier): ! 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; ! if ( yy_current_buffer->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->yy_n_chars; ! yy_current_buffer->yy_input_file = yyin; ! yy_current_buffer->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->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->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() + { + register char *dest = yy_current_buffer->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->yy_ch_buf[yy_n_chars + 1] ) ! YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); ! if ( yy_current_buffer->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 singled characater, 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->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_n_chars = 0; ! else ! { ! int num_to_read = ! yy_current_buffer->yy_buf_size - number_to_move - 1; ! while ( num_to_read <= 0 ) ! { /* Not enough room in the buffer - grow it. */ ! #ifdef YY_USES_REJECT ! YY_FATAL_ERROR( ! "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); ! #else ! /* just a shorter name for the current buffer */ ! YY_BUFFER_STATE b = yy_current_buffer; ! int yy_c_buf_p_offset = ! (int) (yy_c_buf_p - b->yy_ch_buf); ! if ( b->yy_is_our_buffer ) ! { ! int new_size = b->yy_buf_size * 2; ! ! if ( new_size <= 0 ) ! b->yy_buf_size += b->yy_buf_size / 8; ! else ! b->yy_buf_size *= 2; ! ! b->yy_ch_buf = (char *) ! /* Include room in for 2 EOB chars. */ ! yy_flex_realloc( (void *) b->yy_ch_buf, ! b->yy_buf_size + 2 ); ! } ! else ! /* Can't grow it, we don't own it. */ ! b->yy_ch_buf = 0; ! if ( ! b->yy_ch_buf ) ! YY_FATAL_ERROR( ! "fatal error - scanner input buffer overflow" ); ! yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; ! num_to_read = yy_current_buffer->yy_buf_size - ! number_to_move - 1; ! #endif ! } ! if ( num_to_read > YY_READ_BUF_SIZE ) ! num_to_read = YY_READ_BUF_SIZE; ! /* Read in more data. */ ! YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), ! yy_n_chars, num_to_read ); ! } ! 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->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } ! else ! ret_val = EOB_ACT_CONTINUE_SCAN; ! yy_n_chars += number_to_move; ! yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; ! yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; ! yytext_ptr = &yy_current_buffer->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() { ! register yy_state_type yy_current_state; ! register char *yy_cp; ! yy_current_state = yy_start; ! ! 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); ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = (int) yy_def[yy_current_state]; ! if ( yy_current_state >= 471 ) ! yy_c = yy_meta[(unsigned int) yy_c]; ! } ! yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ! } ! ! return yy_current_state; ! } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis ! * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS ! static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) ! yy_state_type yy_current_state; #endif + { + register int yy_is_jam; + register char *yy_cp = yy_c_buf_p; ! register YY_CHAR yy_c = 1; ! if ( yy_accept[yy_current_state] ) ! { ! yy_last_accepting_state = yy_current_state; ! yy_last_accepting_cpos = yy_cp; ! } ! while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) ! { ! yy_current_state = (int) yy_def[yy_current_state]; ! if ( yy_current_state >= 471 ) ! 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 == 470); ! return yy_is_jam ? 0 : yy_current_state; } + #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS ! static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) ! int c; ! register char *yy_bp; #endif + { + register char *yy_cp = yy_c_buf_p; ! /* undo effects of setting up yytext */ ! *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->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->yy_ch_buf[ ! yy_current_buffer->yy_buf_size + 2]; ! register char *source = ! &yy_current_buffer->yy_ch_buf[number_to_move]; ! ! while ( source > yy_current_buffer->yy_ch_buf ) ! *--dest = *--source; ! ! yy_cp += (int) (dest - source); ! yy_bp += (int) (dest - source); ! yy_n_chars = yy_current_buffer->yy_buf_size; ! if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) ! YY_FATAL_ERROR( "flex scanner push-back overflow" ); ! } ! *--yy_cp = (char) c; ! ! yytext_ptr = yy_bp; ! yy_hold_char = *yy_cp; ! yy_c_buf_p = yy_cp; ! } ! #endif /* ifndef YY_NO_UNPUT */ #ifdef __cplusplus *************** *** 1998,2064 **** #else static int input() #endif - - { - int c; - YY_CHAR *yy_cp = yy_c_buf_p; - - *yy_cp = 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->yy_ch_buf[yy_n_chars] ) ! /* this was really a NUL */ ! *yy_c_buf_p = '\0'; ! else ! { /* need more input */ ! yytext = yy_c_buf_p; ! ++yy_c_buf_p; ! switch ( yy_get_next_buffer() ) { ! case EOB_ACT_END_OF_FILE: ! { ! if ( yywrap() ) ! { ! yy_c_buf_p = yytext + YY_MORE_ADJ; ! return ( EOF ); ! } ! ! YY_NEW_FILE; #ifdef __cplusplus ! return ( yyinput() ); #else ! return ( input() ); #endif ! } ! break; ! case EOB_ACT_CONTINUE_SCAN: ! yy_c_buf_p = yytext + YY_MORE_ADJ; ! break; ! case EOB_ACT_LAST_MATCH: #ifdef __cplusplus ! YY_FATAL_ERROR( "unexpected last match in yyinput()" ); #else ! YY_FATAL_ERROR( "unexpected last match in input()" ); #endif } - } - } ! c = *yy_c_buf_p; ! yy_hold_char = *++yy_c_buf_p; ! return ( c ); ! } #ifdef YY_USE_PROTOS --- 2337,2405 ---- #else static int input() #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->yy_ch_buf[yy_n_chars] ) ! /* This was really a NUL. */ ! *yy_c_buf_p = '\0'; ! ! else ! { /* need more input */ ! yytext_ptr = yy_c_buf_p; ! ++yy_c_buf_p; ! ! switch ( yy_get_next_buffer() ) ! { ! case EOB_ACT_END_OF_FILE: ! { ! if ( yywrap() ) ! { ! yy_c_buf_p = ! yytext_ptr + YY_MORE_ADJ; ! 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 + YY_MORE_ADJ; ! break; ! case EOB_ACT_LAST_MATCH: #ifdef __cplusplus ! YY_FATAL_ERROR( ! "unexpected last match in yyinput()" ); #else ! YY_FATAL_ERROR( ! "unexpected last match in input()" ); #endif + } + } } ! c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ ! *yy_c_buf_p = '\0'; /* preserve yytext */ ! yy_hold_char = *++yy_c_buf_p; ! ! return c; ! } #ifdef YY_USE_PROTOS *************** *** 2067,2077 **** void yyrestart( input_file ) FILE *input_file; #endif ! { ! yy_init_buffer( yy_current_buffer, input_file ); ! yy_load_buffer_state(); ! } #ifdef YY_USE_PROTOS --- 2408,2420 ---- void yyrestart( input_file ) FILE *input_file; #endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); ! yy_init_buffer( yy_current_buffer, input_file ); ! yy_load_buffer_state(); ! } #ifdef YY_USE_PROTOS *************** *** 2080,2108 **** void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif - - { - 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->yy_buf_pos = yy_c_buf_p; ! yy_current_buffer->yy_n_chars = yy_n_chars; ! } ! yy_current_buffer = 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; ! } #ifdef YY_USE_PROTOS --- 2423,2450 ---- void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { ! 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->yy_buf_pos = yy_c_buf_p; ! yy_current_buffer->yy_n_chars = yy_n_chars; ! } ! yy_current_buffer = 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; ! } #ifdef YY_USE_PROTOS *************** *** 2110,2122 **** #else void yy_load_buffer_state() #endif ! ! { ! yy_n_chars = yy_current_buffer->yy_n_chars; ! yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos; ! yyin = yy_current_buffer->yy_input_file; ! yy_hold_char = *yy_c_buf_p; ! } #ifdef YY_USE_PROTOS --- 2452,2463 ---- #else void yy_load_buffer_state() #endif ! { ! yy_n_chars = yy_current_buffer->yy_n_chars; ! yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; ! yyin = yy_current_buffer->yy_input_file; ! yy_hold_char = *yy_c_buf_p; ! } #ifdef YY_USE_PROTOS *************** *** 2126,2154 **** FILE *file; int size; #endif ! { ! YY_BUFFER_STATE b; ! ! b = (YY_BUFFER_STATE) malloc( 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 = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) ); ! if ( ! b->yy_ch_buf ) ! YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); ! yy_init_buffer( b, file ); ! return ( b ); ! } #ifdef YY_USE_PROTOS --- 2467,2494 ---- FILE *file; int size; #endif + { + YY_BUFFER_STATE b; ! b = (YY_BUFFER_STATE) yy_flex_alloc( 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 *) yy_flex_alloc( 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; ! } #ifdef YY_USE_PROTOS *************** *** 2157,2171 **** void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif ! { ! if ( b == yy_current_buffer ) ! yy_current_buffer = (YY_BUFFER_STATE) 0; ! free( (char *) b->yy_ch_buf ); ! free( (char *) b ); ! } #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) --- 2497,2521 ---- void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif + { + if ( ! b ) + return; ! if ( b == yy_current_buffer ) ! yy_current_buffer = (YY_BUFFER_STATE) 0; ! if ( b->yy_is_our_buffer ) ! yy_flex_free( (void *) b->yy_ch_buf ); + yy_flex_free( (void *) b ); + } + + + #ifndef YY_ALWAYS_INTERACTIVE + #ifndef YY_NEVER_INTERACTIVE + extern int isatty YY_PROTO(( int )); + #endif + #endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) *************** *** 2175,2202 **** FILE *file; #endif - { - b->yy_input_file = file; ! /* we put in the '\n' and start reading from [1] so that an ! * initial match-at-newline will be true. ! */ ! b->yy_ch_buf[0] = '\n'; ! b->yy_n_chars = 1; ! /* 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[1] = YY_END_OF_BUFFER_CHAR; ! b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[1]; ! b->yy_eof_status = EOF_NOT_SEEN; ! } ! # line 336 "scan_s.l" void --- 2525,2820 ---- FILE *file; #endif ! { ! yy_flush_buffer( b ); ! b->yy_input_file = file; ! b->yy_fill_buffer = 1; ! #if YY_ALWAYS_INTERACTIVE ! b->yy_is_interactive = 1; ! #else ! #if YY_NEVER_INTERACTIVE ! b->yy_is_interactive = 0; ! #else ! b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; ! #endif ! #endif ! } ! #ifdef YY_USE_PROTOS ! void yy_flush_buffer( YY_BUFFER_STATE b ) ! #else ! void yy_flush_buffer( b ) ! YY_BUFFER_STATE b; ! #endif ! ! { ! 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(); ! } ! ! ! #ifndef YY_NO_SCAN_BUFFER ! #ifdef YY_USE_PROTOS ! YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) ! #else ! YY_BUFFER_STATE yy_scan_buffer( base, size ) ! char *base; ! yy_size_t size; ! #endif ! { ! 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) yy_flex_alloc( 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; ! } ! #endif ! ! ! #ifndef YY_NO_SCAN_STRING ! #ifdef YY_USE_PROTOS ! YY_BUFFER_STATE yy_scan_string( yyconst char *str ) ! #else ! YY_BUFFER_STATE yy_scan_string( str ) ! yyconst char *str; ! #endif ! { ! int len; ! for ( len = 0; str[len]; ++len ) ! ; ! ! return yy_scan_bytes( str, len ); ! } ! #endif ! ! ! #ifndef YY_NO_SCAN_BYTES ! #ifdef YY_USE_PROTOS ! YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) ! #else ! YY_BUFFER_STATE yy_scan_bytes( bytes, len ) ! yyconst char *bytes; ! int len; ! #endif ! { ! YY_BUFFER_STATE b; ! char *buf; ! yy_size_t n; ! int i; ! ! /* Get memory for full buffer, including space for trailing EOB's. */ ! n = len + 2; ! buf = (char *) yy_flex_alloc( n ); ! if ( ! buf ) ! YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); ! ! for ( i = 0; i < len; ++i ) ! buf[i] = bytes[i]; ! ! buf[len] = buf[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; ! } ! #endif ! ! ! #ifndef YY_NO_PUSH_STATE ! #ifdef YY_USE_PROTOS ! static void yy_push_state( int new_state ) ! #else ! static void yy_push_state( new_state ) ! int new_state; ! #endif ! { ! if ( yy_start_stack_ptr >= yy_start_stack_depth ) ! { ! yy_size_t new_size; ! ! yy_start_stack_depth += YY_START_STACK_INCR; ! new_size = yy_start_stack_depth * sizeof( int ); ! ! if ( ! yy_start_stack ) ! yy_start_stack = (int *) yy_flex_alloc( new_size ); ! ! else ! yy_start_stack = (int *) yy_flex_realloc( ! (void *) yy_start_stack, new_size ); ! ! if ( ! yy_start_stack ) ! YY_FATAL_ERROR( ! "out of memory expanding start-condition stack" ); ! } ! ! yy_start_stack[yy_start_stack_ptr++] = YY_START; ! ! BEGIN(new_state); ! } ! #endif ! ! ! #ifndef YY_NO_POP_STATE ! static void yy_pop_state() ! { ! if ( --yy_start_stack_ptr < 0 ) ! YY_FATAL_ERROR( "start-condition stack underflow" ); ! ! BEGIN(yy_start_stack[yy_start_stack_ptr]); ! } ! #endif ! ! ! #ifndef YY_NO_TOP_STATE ! static int yy_top_state() ! { ! return yy_start_stack[yy_start_stack_ptr - 1]; ! } ! #endif ! ! #ifndef YY_EXIT_FAILURE ! #define YY_EXIT_FAILURE 2 ! #endif ! ! #ifdef YY_USE_PROTOS ! static void yy_fatal_error( yyconst char msg[] ) ! #else ! static void yy_fatal_error( msg ) ! char msg[]; ! #endif ! { ! (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. */ \ ! yytext[yyleng] = yy_hold_char; \ ! yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ ! yy_hold_char = *yy_c_buf_p; \ ! *yy_c_buf_p = '\0'; \ ! yyleng = n; \ ! } \ ! while ( 0 ) ! ! ! /* Internal utility routines. */ ! ! #ifndef yytext_ptr ! #ifdef YY_USE_PROTOS ! static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) ! #else ! static void yy_flex_strncpy( s1, s2, n ) ! char *s1; ! yyconst char *s2; ! int n; ! #endif ! { ! register int i; ! for ( i = 0; i < n; ++i ) ! s1[i] = s2[i]; ! } ! #endif ! ! ! #ifdef YY_USE_PROTOS ! static void *yy_flex_alloc( yy_size_t size ) ! #else ! static void *yy_flex_alloc( size ) ! yy_size_t size; ! #endif ! { ! return (void *) malloc( size ); ! } ! ! #ifdef YY_USE_PROTOS ! static void *yy_flex_realloc( void *ptr, yy_size_t size ) ! #else ! static void *yy_flex_realloc( ptr, size ) ! void *ptr; ! yy_size_t size; ! #endif ! { ! /* 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 ); ! } ! ! #ifdef YY_USE_PROTOS ! static void yy_flex_free( void *ptr ) ! #else ! static void yy_flex_free( ptr ) ! void *ptr; ! #endif ! { ! free( ptr ); ! } ! ! #if YY_MAIN ! int main() ! { ! yylex(); ! return 0; ! } ! #endif ! void *************** *** 2206,2209 **** --- 2824,2830 ---- line_num=bline; bufstring=stmt; } + #ifndef yywrap int yywrap() { return 1; } + #endif + /*end of make-dist.tmp.447/gnusql-0.7b5.3/src/parse/scan_s.c.preserve*/ diff -rc gnusql-0.7b5.2/test/Makefile.in gnusql-0.7b5.3/test/Makefile.in *** gnusql-0.7b5.2/test/Makefile.in Mon May 12 10:02:23 1997 --- gnusql-0.7b5.3/test/Makefile.in Thu Jun 12 16:41:04 1997 *************** *** 27,33 **** srcdir=@srcdir@ VPATH=@srcdir@ SRC=$(srcdir)/../src ! ETC=@top_srcdir@/etc TOUCH=$(ETC)/Touch RM=rm -f --- 27,33 ---- srcdir=@srcdir@ VPATH=@srcdir@ SRC=$(srcdir)/../src ! ETC=../etc TOUCH=$(ETC)/Touch RM=rm -f *************** *** 70,80 **** $(ETC)/Tdeps clean : ! - $(RM) *~ \#*\# core aaa *.tmp d log - mkdir -p tmptest - cp -p *.ec *.sql *.txt *.h *.EC *.SQL tmptest ! - $(RM) test* dynlog.* ! - find . -size +100 -exec rm {} \; mv tmptest/* . - $(RM) -r tmptest --- 70,84 ---- $(ETC)/Tdeps clean : ! - $(RM) *~ \#*\# core aaa *.tmp d log dynlog.* *.exe ! - $(RM) *.Sc *.acc *.atr *.bin *.dmp *.opt *.par *.sq ! - find . -size +100 -exec rm {} \; ! make-util clean "make clean" ! distclean : clean ! make-util clean "make distclean" - mkdir -p tmptest - cp -p *.ec *.sql *.txt *.h *.EC *.SQL tmptest ! - $(RM) test* mv tmptest/* . - $(RM) -r tmptest Only in gnusql-0.7b5.3/test: test10.c Only in gnusql-0.7b5.3/test: test11.c Only in gnusql-0.7b5.3/test: test12.c Only in gnusql-0.7b5.3/test: test13.c Only in gnusql-0.7b5.3/test: test14.c Only in gnusql-0.7b5.3/test: test15.c Only in gnusql-0.7b5.3/test: test16.c Only in gnusql-0.7b5.3/test: test20.c Only in gnusql-0.7b5.3/test: test21.c Only in gnusql-0.7b5.3/test: test22.c Only in gnusql-0.7b5.3/test: test23.c Only in gnusql-0.7b5.3/test: test24.c Only in gnusql-0.7b5.3/test: test25.c Only in gnusql-0.7b5.3/test: test26.c Only in gnusql-0.7b5.3/test: test30.c Only in gnusql-0.7b5.3/test: test31.c Only in gnusql-0.7b5.3/test: test33.c Only in gnusql-0.7b5.3/test: test3a.c Only in gnusql-0.7b5.3/test: test3b.c Only in gnusql-0.7b5.3/test: test3c.c Only in gnusql-0.7b5.3/test: test40.c Only in gnusql-0.7b5.3/test: test41.c Only in gnusql-0.7b5.3/test: test42.c Only in gnusql-0.7b5.3/test: test50.c Only in gnusql-0.7b5.3/test: test51.c Only in gnusql-0.7b5.3/test: test60.c Only in gnusql-0.7b5.3/test: test70.c Only in gnusql-0.7b5.3/test: test80.c Only in gnusql-0.7b5.3/test: testA0.c Only in gnusql-0.7b5.3/test: testA1.c Only in gnusql-0.7b5.3/test: testFLdef.c Only in gnusql-0.7b5.3/test: testFLins.c Only in gnusql-0.7b5.3/test: testIS0.c Only in gnusql-0.7b5.3/test: testIS1.c Only in gnusql-0.7b5.3/test: testIS2.c Only in gnusql-0.7b5.3/test: testIS3.c Only in gnusql-0.7b5.3/test: testIS4.c Only in gnusql-0.7b5.3/test: testIS5.c Only in gnusql-0.7b5.3/test: testIS6.c Only in gnusql-0.7b5.3/test: testIS7.c Only in gnusql-0.7b5.3/test: testIS8.c Only in gnusql-0.7b5.3/test: testM0.c Only in gnusql-0.7b5.3/test: testM1.c Only in gnusql-0.7b5.3/test: testT0.c Only in gnusql-0.7b5.3/test: testTV.c Only in gnusql-0.7b5.3/test: testZ.c Only in gnusql-0.7b5.3/test: testd1.c Only in gnusql-0.7b5.3/test: tmptest diff -rc gnusql-0.7b5.2/version gnusql-0.7b5.3/version *** gnusql-0.7b5.2/version Mon May 12 10:01:44 1997 --- gnusql-0.7b5.3/version Thu Jun 12 16:40:24 1997 *************** *** 1 **** ! 0.7b5.2 --- 1 ---- ! 0.7b5.3