From d13d67a31c451ebd78ce708a4ef85803d429f158 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Fri, 24 Mar 2017 04:52:08 +0000 Subject: ragel-6.10 --- CREDITS | 2 +- ChangeLog | 18 +++ Makefile.in | 46 +++--- aapl/Makefile.in | 27 +++- aclocal.m4 | 65 +++++---- compile | 2 +- configure | 49 ++++--- configure.ac | 155 ++++++++++++++++++++ configure.in | 155 -------------------- contrib/Makefile.in | 25 +++- depcomp | 2 +- doc/Makefile.in | 27 +++- doc/ragel-guide.pdf | Bin 537069 -> 534414 bytes doc/ragel-guide.tex | 2 + examples/Makefile.in | 26 +++- examples/gotocallret.cpp | 18 ++- examples/mailbox.cpp | 10 +- examples/rlscan.cpp | 4 +- install-sh | 373 ++++++++++++++++++++++------------------------- missing | 2 +- ragel.vim | 2 +- ragel/Makefile.in | 27 +++- ragel/cdcodegen.cpp | 10 +- ragel/cdcodegen.h | 2 + ragel/cdflat.cpp | 52 ++++++- ragel/cdgoto.cpp | 56 +++++-- ragel/cdipgoto.cpp | 71 +++++++-- ragel/cdipgoto.h | 2 + ragel/cdtable.cpp | 54 +++++-- ragel/common.cpp | 87 ++++++----- ragel/common.h | 29 ++-- ragel/config.h.in | 2 +- ragel/cscodegen.cpp | 2 +- ragel/cstable.cpp | 41 ++++-- ragel/fsmgraph.h | 8 +- ragel/gendata.cpp | 7 + ragel/gendata.h | 1 + ragel/gocodegen.cpp | 2 +- ragel/javacodegen.cpp | 2 +- ragel/mlcodegen.cpp | 2 +- ragel/parsedata.cpp | 63 +++++--- ragel/parsetree.cpp | 2 - ragel/parsetree.h | 4 +- ragel/rbxgoto.cpp | 2 +- ragel/redfsm.cpp | 1 + ragel/redfsm.h | 2 + ragel/rubycodegen.cpp | 2 +- ragel/version.h | 4 +- test-driver | 15 +- test/Makefile.in | 29 +++- 50 files changed, 971 insertions(+), 620 deletions(-) create mode 100644 configure.ac delete mode 100644 configure.in diff --git a/CREDITS b/CREDITS index 67d1875..e91a677 100644 --- a/CREDITS +++ b/CREDITS @@ -47,4 +47,4 @@ missed. Ross Thomas, Mitchell Foral, John D. Mitchell, Diego 'Flameeyes' Pettenò, Jose Quinteiro, William Morgan, _why, Iñaki Baz Castillo, Attila Sztupák, Ismael Luceno, Josh Stern, Denis Naumov, Anton Ageev, Kamil Klimkiewicz, - Hesham Wahba + Hesham Wahba, Phil Carmody diff --git a/ChangeLog b/ChangeLog index 2d28e52..d55394e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +Ragel 6.10 - Mar 24, 2017 +========================= + -C codegen: test P vs PE in goto/call/ret statements in EOF actions, just + before re-entering. If at the end of the input block then the EOF check is + jumped to. This change prevents overrunning the buffer if control flow is + issued in an EOF action without fixing the input pointer first. If a program + properly issues an fhold before the control flow the program won't be + affected. + -Updated action label generation. The previous set of conditions for + generating the label didn't cover actions coming from the eofAction pointer + (eof trans covered since it points into the set of transitions). + -Use separate signed/unsigned values for host type min/max. Using separate + values avoids the need to type cast before the data goes into FsmCtx structs. + Keep it in native types until it is used. + -Optionally do not generate entry point variables. Adds noentry write option + for data. + -Various warning elimination and build updates. + Ragel 6.9 - Oct 13, 2014 ======================== -updated command-line synopsis diff --git a/Makefile.in b/Makefile.in index 7c0f717..a14c07f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -77,14 +87,12 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) $(dist_doc_DATA) \ - AUTHORS COPYING ChangeLog README TODO compile depcomp \ - install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(dist_doc_DATA) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -175,6 +183,8 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags CSCOPE = cscope +am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog \ + README TODO compile depcomp install-sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -311,6 +321,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -341,7 +352,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -572,15 +582,15 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -616,17 +626,17 @@ distcheck: dist esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=.. --prefix="$$dc_install_base" \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -804,6 +814,8 @@ uninstall-am: uninstall-dist_docDATA mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-am uninstall uninstall-am uninstall-dist_docDATA +.PRECIOUS: Makefile + # This file is checked for by the configure script and its existence causes the # parsers and the manual to not be built when the distribution is built. diff --git a/aapl/Makefile.in b/aapl/Makefile.in index 9b47901..879bebc 100644 --- a/aapl/Makefile.in +++ b/aapl/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -77,12 +87,12 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = aapl -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(noinst_HEADERS) COPYING README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/ragel/config.h CONFIG_CLEAN_FILES = @@ -126,6 +136,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in COPYING README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -221,6 +232,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -253,7 +265,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign aapl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign aapl/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -468,6 +479,8 @@ uninstall-am: mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/aclocal.m4 b/aclocal.m4 index 3a9a040..f3018f6 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.14' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.14.1], [], +m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.14.1])dnl +[AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -103,15 +103,14 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -142,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -333,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -409,7 +408,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -499,8 +498,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -573,7 +572,11 @@ to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi -fi]) +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further @@ -602,7 +605,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -613,7 +616,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -623,7 +626,7 @@ if test x"${install_sh}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -644,7 +647,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -694,7 +697,7 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -733,7 +736,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -762,7 +765,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -809,7 +812,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -828,7 +831,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -909,7 +912,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -969,7 +972,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -997,7 +1000,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1016,7 +1019,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/compile b/compile index 531136b..a85b723 100755 --- a/compile +++ b/compile @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify diff --git a/configure b/configure index da9a33c..5e98936 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ragel 6.9. +# Generated by GNU Autoconf 2.69 for ragel 6.10. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -576,8 +576,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ragel' PACKAGE_TARNAME='ragel' -PACKAGE_VERSION='6.9' -PACKAGE_STRING='ragel 6.9' +PACKAGE_VERSION='6.10' +PACKAGE_STRING='ragel 6.10' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -672,6 +672,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -747,6 +748,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -999,6 +1001,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1136,7 +1147,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1249,7 +1260,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ragel 6.9 to adapt to many kinds of systems. +\`configure' configures ragel 6.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1289,6 +1300,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1315,7 +1327,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ragel 6.9:";; + short | recursive ) echo "Configuration of ragel 6.10:";; esac cat <<\_ACEOF @@ -1408,7 +1420,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ragel configure 6.9 +ragel configure 6.10 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1501,7 +1513,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ragel $as_me 6.9, which was +It was created by ragel $as_me 6.10, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1849,9 +1861,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -PUBDATE="Oct 2014" +PUBDATE="March 2017" -am__api_version='1.14' +am__api_version='1.15' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2052,8 +2064,8 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -2072,7 +2084,7 @@ else $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -2366,7 +2378,7 @@ fi # Define the identity of the package. PACKAGE='ragel' - VERSION='6.9' + VERSION='6.10' cat >>confdefs.h <<_ACEOF @@ -2400,8 +2412,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -2459,6 +2471,7 @@ END fi fi + ac_config_headers="$ac_config_headers ragel/config.h" @@ -5125,7 +5138,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ragel $as_me 6.9, which was +This file was extended by ragel $as_me 6.10, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5191,7 +5204,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ragel config.status 6.9 +ragel config.status 6.10 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..b86da8c --- /dev/null +++ b/configure.ac @@ -0,0 +1,155 @@ +dnl +dnl Copyright 2001-2009 Adrian Thurston +dnl + +dnl This file is part of Ragel. +dnl +dnl Ragel is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl Ragel is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with Ragel; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +AC_INIT(ragel, 6.10) +PUBDATE="March 2017" + +AM_INIT_AUTOMAKE([foreign]) +AC_SUBST(PUBDATE) +AC_CONFIG_HEADER(ragel/config.h) + +dnl Choose defaults for the build_parsers and build_manual vars. If the dist +dnl file is present in the root then default to no, otherwise go for it. + +AS_IF([test -r $srcdir/DIST], [. $srcdir/DIST], [build_parsers=yes; + build_manual=yes]) + +dnl +dnl Enable arg to explicitly control the building of the manual +dnl +AC_ARG_ENABLE(manual, + [ --enable-manual do we want to build the manual?], + [ + if test "x$enableval" = "xyes"; then + build_manual=yes; + else + build_manual=no; + fi + ], +) + + +dnl Set to true if the build system should generate parsers from ragel and kelbt +dnl sources. Set to false if generated files are included and not to be built +dnl (production). +AM_CONDITIONAL(BUILD_PARSERS, [test "x$build_parsers" = "xyes"]) + +dnl Set to true if the manual should be built. +AM_CONDITIONAL(BUILD_MANUAL, [test "x$build_manual" = "xyes"]) + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_CXX +AC_CHECK_TOOL(AR, ar) +AC_PROG_RANLIB + +dnl Set test on c++ compiler. +AC_LANG_CPLUSPLUS + +dnl Check for definition of MAKE. +AC_PROG_MAKE_SET + +# Checks to carry out if we are building parsers. +if test "x$build_parsers" = "xyes"; then + +AC_CHECK_PROG(RAGEL, ragel, ragel) +if test -z "$RAGEL"; then + echo + echo "error: ragel is required to build the parsers" + echo + exit 1 +fi + +AC_CHECK_PROG(KELBT, kelbt, kelbt) +if test -z "$KELBT"; then + echo + echo "error: kelbt is required to build the parsers" + echo + exit 1 +fi + +fi + +# Checks to carry out if we are building the manual. +if test "x$build_manual" = "xyes"; then + +AC_CHECK_PROG(FIG2DEV, fig2dev, fig2dev) +if test -z "$FIG2DEV"; then + echo + echo "error: fig2dev is required to build the manual (maybe use --disable-manual)" + echo + exit 1 +fi + +AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex) +if test -z "$PDFLATEX"; then + echo + echo "error: pdflatex is required to build the manual (maybe use --disable-manual)" + echo + exit 1 +fi + +fi + +dnl Check for the D compiler +AC_CHECK_PROG(GDC, gdc, gdc) + +dnl Check for the Objective-C compiler +AC_MSG_CHECKING([for the Objective-C compiler]) +cat > conftest.m </dev/null; then + GOBJC="gcc -x objective-c" + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi +AC_SUBST(GOBJC) + +dnl Check for the Java compiler. +AC_CHECK_PROG(JAVAC, javac, javac) + +dnl Check for TXL. +AC_CHECK_PROG(TXL, txl, txl) + +dnl Check for Ruby. +AC_CHECK_PROG(RUBY, ruby, ruby) + +dnl Check for the C# compiler. +AC_CHECK_PROG(GMCS, gmcs, gmcs) + +dnl Check for the Go compiler. +AC_CHECK_PROG(GOBIN, go, go build) + +dnl write output files +AC_OUTPUT( + [ + Makefile ragel/Makefile aapl/Makefile + doc/Makefile doc/ragel.1 + contrib/Makefile + test/Makefile test/runtests + examples/Makefile + ], + [chmod +x test/runtests] +) + +echo "configuration of ragel complete" diff --git a/configure.in b/configure.in deleted file mode 100644 index 34a994a..0000000 --- a/configure.in +++ /dev/null @@ -1,155 +0,0 @@ -dnl -dnl Copyright 2001-2009 Adrian Thurston -dnl - -dnl This file is part of Ragel. -dnl -dnl Ragel is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl Ragel is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with Ragel; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -AC_INIT(ragel, 6.9) -PUBDATE="Oct 2014" - -AM_INIT_AUTOMAKE([foreign]) -AC_SUBST(PUBDATE) -AC_CONFIG_HEADER(ragel/config.h) - -dnl Choose defaults for the build_parsers and build_manual vars. If the dist -dnl file is present in the root then default to no, otherwise go for it. - -AS_IF([test -r $srcdir/DIST], [. $srcdir/DIST], [build_parsers=yes; - build_manual=yes]) - -dnl -dnl Enable arg to explicitly control the building of the manual -dnl -AC_ARG_ENABLE(manual, - [ --enable-manual do we want to build the manual?], - [ - if test "x$enableval" = "xyes"; then - build_manual=yes; - else - build_manual=no; - fi - ], -) - - -dnl Set to true if the build system should generate parsers from ragel and kelbt -dnl sources. Set to false if generated files are included and not to be built -dnl (production). -AM_CONDITIONAL(BUILD_PARSERS, [test "x$build_parsers" = "xyes"]) - -dnl Set to true if the manual should be built. -AM_CONDITIONAL(BUILD_MANUAL, [test "x$build_manual" = "xyes"]) - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_CXX -AC_CHECK_TOOL(AR, ar) -AC_PROG_RANLIB - -dnl Set test on c++ compiler. -AC_LANG_CPLUSPLUS - -dnl Check for definition of MAKE. -AC_PROG_MAKE_SET - -# Checks to carry out if we are building parsers. -if test "x$build_parsers" = "xyes"; then - -AC_CHECK_PROG(RAGEL, ragel, ragel) -if test -z "$RAGEL"; then - echo - echo "error: ragel is required to build the parsers" - echo - exit 1 -fi - -AC_CHECK_PROG(KELBT, kelbt, kelbt) -if test -z "$KELBT"; then - echo - echo "error: kelbt is required to build the parsers" - echo - exit 1 -fi - -fi - -# Checks to carry out if we are building the manual. -if test "x$build_manual" = "xyes"; then - -AC_CHECK_PROG(FIG2DEV, fig2dev, fig2dev) -if test -z "$FIG2DEV"; then - echo - echo "error: fig2dev is required to build the manual (maybe use --disable-manual)" - echo - exit 1 -fi - -AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex) -if test -z "$PDFLATEX"; then - echo - echo "error: pdflatex is required to build the manual (maybe use --disable-manual)" - echo - exit 1 -fi - -fi - -dnl Check for the D compiler -AC_CHECK_PROG(GDC, gdc, gdc) - -dnl Check for the Objective-C compiler -AC_MSG_CHECKING([for the Objective-C compiler]) -cat > conftest.m </dev/null; then - GOBJC="gcc -x objective-c" - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi -AC_SUBST(GOBJC) - -dnl Check for the Java compiler. -AC_CHECK_PROG(JAVAC, javac, javac) - -dnl Check for TXL. -AC_CHECK_PROG(TXL, txl, txl) - -dnl Check for Ruby. -AC_CHECK_PROG(RUBY, ruby, ruby) - -dnl Check for the C# compiler. -AC_CHECK_PROG(GMCS, gmcs, gmcs) - -dnl Check for the Go compiler. -AC_CHECK_PROG(GOBIN, go, go build) - -dnl write output files -AC_OUTPUT( - [ - Makefile ragel/Makefile aapl/Makefile - doc/Makefile doc/ragel.1 - contrib/Makefile - test/Makefile test/runtests - examples/Makefile - ], - [chmod +x test/runtests] -) - -echo "configuration of ragel complete" diff --git a/contrib/Makefile.in b/contrib/Makefile.in index 1dffb01..52c1e79 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -76,11 +86,11 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = contrib -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/ragel/config.h CONFIG_CLEAN_FILES = @@ -105,6 +115,7 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -200,6 +211,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -224,7 +236,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -392,6 +403,8 @@ uninstall-am: maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/depcomp b/depcomp index 4ebd5b3..fc98710 100755 --- a/depcomp +++ b/depcomp @@ -3,7 +3,7 @@ scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 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 diff --git a/doc/Makefile.in b/doc/Makefile.in index 163f9dd..dc90626 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,17 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -97,12 +107,12 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = doc -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(srcdir)/ragel.1.in $(am__dist_doc_DATA_DIST) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_doc_DATA_DIST) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/ragel/config.h CONFIG_CLEAN_FILES = ragel.1 @@ -160,6 +170,7 @@ MANS = $(man_MANS) am__dist_doc_DATA_DIST = ragel-guide.pdf DATA = $(dist_doc_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/ragel.1.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -255,6 +266,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -291,7 +303,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -532,6 +543,8 @@ uninstall-man: uninstall-man1 uninstall uninstall-am uninstall-dist_docDATA uninstall-man \ uninstall-man1 +.PRECIOUS: Makefile + @BUILD_MANUAL_TRUE@.fig.pdf: @BUILD_MANUAL_TRUE@ fig2dev -L pdf $< $@ diff --git a/doc/ragel-guide.pdf b/doc/ragel-guide.pdf index 38dae46..b640ada 100644 Binary files a/doc/ragel-guide.pdf and b/doc/ragel-guide.pdf differ diff --git a/doc/ragel-guide.tex b/doc/ragel-guide.tex index fab8a51..d24741b 100644 --- a/doc/ragel-guide.tex +++ b/doc/ragel-guide.tex @@ -2803,6 +2803,8 @@ Data generation has several options: id of the error state. \item \verb|nofinal | - Do not generate the integer variable that gives the id of the first final state. +\item \verb|noentry | - Do not generate the integer variables that give the +values of the entry points. \item \verb|noprefix | - Do not prefix the variable names with the name of the machine. \end{itemize} diff --git a/examples/Makefile.in b/examples/Makefile.in index 957d7e7..1eae6df 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,17 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -101,12 +111,11 @@ noinst_PROGRAMS = atoi$(EXEEXT) awkemu$(EXEEXT) clang$(EXEEXT) \ gotocallret$(EXEEXT) mailbox$(EXEEXT) params$(EXEEXT) \ pullscan$(EXEEXT) rlscan$(EXEEXT) statechart$(EXEEXT) subdir = examples -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/ragel/config.h CONFIG_CLEAN_FILES = @@ -221,6 +230,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -316,6 +326,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -358,7 +369,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -675,6 +685,8 @@ uninstall-am: mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + gotocallret.cpp: gotocallret.rl $(RAGEL) -G2 -o gotocallret.cpp gotocallret.rl diff --git a/examples/gotocallret.cpp b/examples/gotocallret.cpp index 18a9531..888110f 100644 --- a/examples/gotocallret.cpp +++ b/examples/gotocallret.cpp @@ -138,9 +138,9 @@ tr1: #line 42 "gotocallret.rl" { if ( comm >= 'a' ) - {stack[top++] = 2; goto st5;} + {stack[top++] = 2;goto st5;} else - {stack[top++] = 2; goto st6;} + {stack[top++] = 2;goto st6;} } goto st2; st2: @@ -238,18 +238,24 @@ case 10: switch ( cs ) { case 5: #line 38 "gotocallret.rl" - {p--;{cs = stack[--top];goto _again;}} + {p--;{cs = stack[--top]; if ( p == pe ) + goto _test_eof; +goto _again;}} break; case 6: #line 39 "gotocallret.rl" - {p--;{cs = stack[--top];goto _again;}} + {p--;{cs = stack[--top]; if ( p == pe ) + goto _test_eof; +goto _again;}} break; case 1: case 2: #line 56 "gotocallret.rl" - {p--;{goto st3;}} + {p--;{ if ( p == pe ) + goto _test_eof3; +goto st3;}} break; -#line 253 "gotocallret.cpp" +#line 259 "gotocallret.cpp" } } diff --git a/examples/mailbox.cpp b/examples/mailbox.cpp index 7e9c46e..40f8b55 100644 --- a/examples/mailbox.cpp +++ b/examples/mailbox.cpp @@ -588,11 +588,11 @@ tr88: * the contents. */ cout << headName.data << ":"; headName.clear(); - {stack[top++] = 34; goto st103;} + {stack[top++] = 34;goto st103;} } headName.clear(); - {stack[top++] = 34; goto st102;} + {stack[top++] = 34;goto st102;} } goto st34; st34: @@ -1496,10 +1496,12 @@ case 104: cout << headContent.data << endl; headContent.clear(); p--; - {cs = stack[--top];goto _again;} + {cs = stack[--top]; if ( p == pe ) + goto _test_eof; +goto _again;} } break; -#line 1503 "mailbox.cpp" +#line 1505 "mailbox.cpp" } } diff --git a/examples/rlscan.cpp b/examples/rlscan.cpp index 1c428f8..7e92211 100644 --- a/examples/rlscan.cpp +++ b/examples/rlscan.cpp @@ -252,7 +252,7 @@ tr50: #line 211 "rlscan.rl" {te = p+1;{ escapeXML( ts, te-ts ); - {stack[top++] = 24; goto st6;} + {stack[top++] = 24;goto st6;} }} goto st24; st24: @@ -462,7 +462,7 @@ tr58: #line 91 "rlscan.rl" {te = p+1;{ write( "/*" ); - {stack[top++] = 31; goto st6;} + {stack[top++] = 31;goto st6;} }} goto st31; st31: diff --git a/install-sh b/install-sh index 377bb86..59990a1 100755 --- a/install-sh +++ b/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-11-20.07; # UTC +scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dir_arg= dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ while test $# -ne 0; do -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -207,6 +203,15 @@ if test $# -eq 0; then exit 0 fi +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 @@ -223,16 +228,16 @@ if test -z "$dir_arg"; then *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -269,41 +274,15 @@ do # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi @@ -314,74 +293,81 @@ do if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # $RANDOM is not portable (e.g. dash); use it when possible to + # lower collision chance + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # As "mkdir -p" follows symlinks and we work in /tmp possibly; so + # create the $tmpdir first (and fail if unsuccessful) to make sure + # that nobody tries to guess the $tmpdir name. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -391,53 +377,51 @@ do # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -472,15 +456,12 @@ do # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -493,24 +474,24 @@ do # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff --git a/missing b/missing index db98974..f62bbae 100755 --- a/missing +++ b/missing @@ -3,7 +3,7 @@ scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff --git a/ragel.vim b/ragel.vim index f94ae0f..6c48890 100644 --- a/ragel.vim +++ b/ragel.vim @@ -114,7 +114,7 @@ syntax region rlCodeSemi matchgroup=Type start="\" start="\" syntax region rlWrite matchgroup=Type start="\" matchgroup=NONE end="[;)]" contained contains=rlWriteKeywords,rlWriteOptions syntax keyword rlWriteKeywords init data exec exports start error first_final contained -syntax keyword rlWriteOptions noerror nofinal noprefix noend nocs contained +syntax keyword rlWriteOptions noerror nofinal noentry noprefix noend nocs contained " " Sync at the start of machine specs. diff --git a/ragel/Makefile.in b/ragel/Makefile.in index 8760e48..5d3c8fb 100644 --- a/ragel/Makefile.in +++ b/ragel/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,12 +88,11 @@ PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = ragel$(EXEEXT) subdir = ragel -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(srcdir)/config.h.in $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = @@ -195,6 +204,8 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -290,6 +301,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -347,7 +359,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ragel/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign ragel/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1526,6 +1537,8 @@ uninstall-am: uninstall-binPROGRAMS mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS +.PRECIOUS: Makefile + version.h: Makefile echo '#define VERSION "$(PACKAGE_VERSION)"' > version.h diff --git a/ragel/cdcodegen.cpp b/ragel/cdcodegen.cpp index 3d7cafc..96d8501 100644 --- a/ragel/cdcodegen.cpp +++ b/ragel/cdcodegen.cpp @@ -361,6 +361,14 @@ string FsmCodeGen::WIDE_KEY( RedStateAp *state, Key key ) } } +void FsmCodeGen::EOF_CHECK( ostream &ret ) +{ + ret << + " if ( " << P() << " == " << PE() << " )\n" + " goto _test_eof;\n"; + + testEofUsed = true; +} void FsmCodeGen::EXEC( ostream &ret, GenInlineItem *item, int targState, int inFinish ) @@ -656,7 +664,7 @@ void FsmCodeGen::STATE_IDS() out << "\n"; - if ( entryPointNames.length() > 0 ) { + if ( !noEntry && entryPointNames.length() > 0 ) { for ( EntryNameVect::Iter en = entryPointNames; en.lte(); en++ ) { STATIC_VAR( "int", DATA_PREFIX() + "en_" + *en ) << " = " << entryPointIds[en.pos()] << ";\n"; diff --git a/ragel/cdcodegen.h b/ragel/cdcodegen.h index d8fe62d..b9a8490 100644 --- a/ragel/cdcodegen.h +++ b/ragel/cdcodegen.h @@ -131,6 +131,8 @@ protected: string FIRST_FINAL() { return DATA_PREFIX() + "first_final"; } string CTXDATA() { return DATA_PREFIX() + "ctxdata"; } + void EOF_CHECK( ostream &ret ); + void INLINE_LIST( ostream &ret, GenInlineList *inlineList, int targState, bool inFinish, bool csForced ); virtual void GOTO( ostream &ret, int gotoDest, bool inFinish ) = 0; diff --git a/ragel/cdflat.cpp b/ragel/cdflat.cpp index 6010f98..b28a95a 100644 --- a/ragel/cdflat.cpp +++ b/ragel/cdflat.cpp @@ -454,15 +454,32 @@ void FlatCodeGen::LOCATE_TRANS() void FlatCodeGen::GOTO( ostream &ret, int gotoDest, bool inFinish ) { - ret << "{" << vCS() << " = " << gotoDest << "; " << - CTRL_FLOW() << "goto _again;}"; + ret << "{"; + + ret << vCS() << " = " << gotoDest << ";"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void FlatCodeGen::GOTO_EXPR( ostream &ret, GenInlineItem *ilItem, bool inFinish ) { - ret << "{" << vCS() << " = ("; + ret << "{"; + + ret << vCS() << " = ("; INLINE_LIST( ret, ilItem->children, 0, inFinish, false ); - ret << "); " << CTRL_FLOW() << "goto _again;}"; + ret << "); "; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void FlatCodeGen::CURS( ostream &ret, bool inFinish ) @@ -494,8 +511,16 @@ void FlatCodeGen::CALL( ostream &ret, int callDest, int targState, bool inFinish INLINE_LIST( ret, prePushExpr, 0, false, false ); } - ret << "{" << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = " << - callDest << "; " << CTRL_FLOW() << "goto _again;}"; + ret << "{"; + + ret << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = " << callDest << ";"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; if ( prePushExpr != 0 ) ret << "}"; @@ -511,7 +536,13 @@ void FlatCodeGen::CALL_EXPR( ostream &ret, GenInlineItem *ilItem, int targState, ret << "{" << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = ("; INLINE_LIST( ret, ilItem->children, targState, inFinish, false ); - ret << "); " << CTRL_FLOW() << "goto _again;}"; + ret << ");"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + ret << "}"; if ( prePushExpr != 0 ) ret << "}"; @@ -528,7 +559,12 @@ void FlatCodeGen::RET( ostream &ret, bool inFinish ) ret << "}"; } - ret << CTRL_FLOW() << "goto _again;}"; + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void FlatCodeGen::BREAK( ostream &ret, int targState, bool csForced ) diff --git a/ragel/cdgoto.cpp b/ragel/cdgoto.cpp index e434143..86b3d23 100644 --- a/ragel/cdgoto.cpp +++ b/ragel/cdgoto.cpp @@ -543,15 +543,32 @@ std::ostream &GotoCodeGen::FINISH_CASES() void GotoCodeGen::GOTO( ostream &ret, int gotoDest, bool inFinish ) { - ret << "{" << vCS() << " = " << gotoDest << "; " << - CTRL_FLOW() << "goto _again;}"; + ret << "{"; + + ret << vCS() << " = " << gotoDest << ";"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void GotoCodeGen::GOTO_EXPR( ostream &ret, GenInlineItem *ilItem, bool inFinish ) { - ret << "{" << vCS() << " = ("; + ret << "{"; + + ret << vCS() << " = ("; INLINE_LIST( ret, ilItem->children, 0, inFinish, false ); - ret << "); " << CTRL_FLOW() << "goto _again;}"; + ret << ");"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void GotoCodeGen::CURS( ostream &ret, bool inFinish ) @@ -583,8 +600,16 @@ void GotoCodeGen::CALL( ostream &ret, int callDest, int targState, bool inFinish INLINE_LIST( ret, prePushExpr, 0, false, false ); } - ret << "{" << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = " << - callDest << "; " << CTRL_FLOW() << "goto _again;}"; + ret << "{"; + + ret << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = " << callDest << ";"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; if ( prePushExpr != 0 ) ret << "}"; @@ -597,9 +622,18 @@ void GotoCodeGen::CALL_EXPR( ostream &ret, GenInlineItem *ilItem, int targState, INLINE_LIST( ret, prePushExpr, 0, false, false ); } - ret << "{" << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = ("; + ret << "{"; + + ret << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = ("; INLINE_LIST( ret, ilItem->children, targState, inFinish, false ); - ret << "); " << CTRL_FLOW() << "goto _again;}"; + ret << ");"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; if ( prePushExpr != 0 ) ret << "}"; @@ -615,7 +649,11 @@ void GotoCodeGen::RET( ostream &ret, bool inFinish ) ret << "}"; } - ret << CTRL_FLOW() << "goto _again;}"; + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + ret << "}"; } void GotoCodeGen::BREAK( ostream &ret, int targState, bool csForced ) diff --git a/ragel/cdipgoto.cpp b/ragel/cdipgoto.cpp index 298bf36..05c9299 100644 --- a/ragel/cdipgoto.cpp +++ b/ragel/cdipgoto.cpp @@ -29,14 +29,30 @@ bool IpGotoCodeGen::useAgainLabel() { - return redFsm->anyRegActionRets() || - redFsm->anyRegActionByValControl() || + return redFsm->anyActionRets() || + redFsm->anyActionByValControl() || redFsm->anyRegNextStmt(); } +void IpGotoCodeGen::EOF_CHECK( ostream &ret, int gotoDest ) +{ + ret << + " if ( " << P() << " == " << PE() << " )\n" + " goto _test_eof" << gotoDest << ";\n"; + + testEofUsed = true; +} + void IpGotoCodeGen::GOTO( ostream &ret, int gotoDest, bool inFinish ) { - ret << "{" << CTRL_FLOW() << "goto st" << gotoDest << ";}"; + ret << "{"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret, gotoDest ); + + ret << CTRL_FLOW() << "goto st" << gotoDest << ";"; + + ret << "}"; } void IpGotoCodeGen::CALL( ostream &ret, int callDest, int targState, bool inFinish ) @@ -46,8 +62,14 @@ void IpGotoCodeGen::CALL( ostream &ret, int callDest, int targState, bool inFini INLINE_LIST( ret, prePushExpr, 0, false, false ); } - ret << "{" << STACK() << "[" << TOP() << "++] = " << targState << - "; " << CTRL_FLOW() << "goto st" << callDest << ";}"; + ret << "{" << STACK() << "[" << TOP() << "++] = " << targState << ";"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret, callDest ); + + ret << CTRL_FLOW() << "goto st" << callDest << ";"; + + ret << "}"; if ( prePushExpr != 0 ) ret << "}"; @@ -60,9 +82,18 @@ void IpGotoCodeGen::CALL_EXPR( ostream &ret, GenInlineItem *ilItem, int targStat INLINE_LIST( ret, prePushExpr, 0, false, false ); } - ret << "{" << STACK() << "[" << TOP() << "++] = " << targState << "; " << vCS() << " = ("; + ret << "{"; + + ret << STACK() << "[" << TOP() << "++] = " << targState << "; " << vCS() << " = ("; INLINE_LIST( ret, ilItem->children, 0, inFinish, false ); - ret << "); " << CTRL_FLOW() << "goto _again;}"; + ret << ");"; + + if ( inFinish && !noEnd ) + FsmCodeGen::EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; if ( prePushExpr != 0 ) ret << "}"; @@ -78,14 +109,27 @@ void IpGotoCodeGen::RET( ostream &ret, bool inFinish ) ret << "}"; } - ret << CTRL_FLOW() << "goto _again;}"; + if ( inFinish && !noEnd ) + FsmCodeGen::EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void IpGotoCodeGen::GOTO_EXPR( ostream &ret, GenInlineItem *ilItem, bool inFinish ) { - ret << "{" << vCS() << " = ("; + ret << "{"; + + ret << vCS() << " = ("; INLINE_LIST( ret, ilItem->children, 0, inFinish, false ); - ret << "); " << CTRL_FLOW() << "goto _again;}"; + ret << ");"; + + if ( inFinish && !noEnd ) + FsmCodeGen::EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + ret << "}"; } void IpGotoCodeGen::NEXT( ostream &ret, int nextDest, bool inFinish ) @@ -350,6 +394,13 @@ void IpGotoCodeGen::setLabelsNeeded() } } } + + for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { + if ( st->eofAction != 0 ) { + for ( GenActionTable::Iter item = st->eofAction->key; item.lte(); item++ ) + setLabelsNeeded( item->value->inlineList ); + } + } } if ( !noEnd ) { diff --git a/ragel/cdipgoto.h b/ragel/cdipgoto.h index c869e1f..4e92926 100644 --- a/ragel/cdipgoto.h +++ b/ragel/cdipgoto.h @@ -60,6 +60,8 @@ public: protected: bool useAgainLabel(); + void EOF_CHECK( ostream &ret, int gotoDest ); + /* Called from GotoCodeGen::STATE_GOTOS just before writing the gotos for * each state. */ bool IN_TRANS_ACTIONS( RedStateAp *state ); diff --git a/ragel/cdtable.cpp b/ragel/cdtable.cpp index 2218839..6bcb79e 100644 --- a/ragel/cdtable.cpp +++ b/ragel/cdtable.cpp @@ -666,15 +666,31 @@ void TabCodeGen::LOCATE_TRANS() void TabCodeGen::GOTO( ostream &ret, int gotoDest, bool inFinish ) { - ret << "{" << vCS() << " = " << gotoDest << "; " << - CTRL_FLOW() << "goto _again;}"; + ret << "{"; + + ret << vCS() << " = " << gotoDest << ";"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void TabCodeGen::GOTO_EXPR( ostream &ret, GenInlineItem *ilItem, bool inFinish ) { - ret << "{" << vCS() << " = ("; + ret << "{"; + ret << vCS() << " = ("; INLINE_LIST( ret, ilItem->children, 0, inFinish, false ); - ret << "); " << CTRL_FLOW() << "goto _again;}"; + ret << "); "; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void TabCodeGen::CURS( ostream &ret, bool inFinish ) @@ -706,8 +722,14 @@ void TabCodeGen::CALL( ostream &ret, int callDest, int targState, bool inFinish INLINE_LIST( ret, prePushExpr, 0, false, false ); } - ret << "{" << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = " << - callDest << "; " << CTRL_FLOW() << "goto _again;}"; + ret << "{" << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = " << callDest << ";"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; if ( prePushExpr != 0 ) ret << "}"; @@ -720,9 +742,18 @@ void TabCodeGen::CALL_EXPR( ostream &ret, GenInlineItem *ilItem, int targState, INLINE_LIST( ret, prePushExpr, 0, false, false ); } - ret << "{" << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = ("; + ret << "{"; + + ret << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = ("; INLINE_LIST( ret, ilItem->children, targState, inFinish, false ); - ret << "); " << CTRL_FLOW() << "goto _again;}"; + ret << ");"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; if ( prePushExpr != 0 ) ret << "}"; @@ -739,7 +770,12 @@ void TabCodeGen::RET( ostream &ret, bool inFinish ) ret << "}"; } - ret << CTRL_FLOW() << "goto _again;}"; + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void TabCodeGen::BREAK( ostream &ret, int targState, bool csForced ) diff --git a/ragel/common.cpp b/ragel/common.cpp index 3047e70..8e9f8ed 100644 --- a/ragel/common.cpp +++ b/ragel/common.cpp @@ -27,14 +27,14 @@ HostType hostTypesC[] = { - { "char", 0, "char", true, true, false, CHAR_MIN, CHAR_MAX, sizeof(char) }, - { "unsigned", "char", "uchar", false, true, false, 0, UCHAR_MAX, sizeof(unsigned char) }, - { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, sizeof(short) }, - { "unsigned", "short", "ushort", false, true, false, 0, USHRT_MAX, sizeof(unsigned short) }, - { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, sizeof(int) }, - { "unsigned", "int", "uint", false, true, false, 0, UINT_MAX, sizeof(unsigned int) }, - { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, sizeof(long) }, - { "unsigned", "long", "ulong", false, true, false, 0, ULONG_MAX, sizeof(unsigned long) } + { "char", 0, "char", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, sizeof(char) }, + { "unsigned", "char", "uchar", false, true, false, 0, 0, 0, UCHAR_MAX, sizeof(unsigned char) }, + { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, sizeof(short) }, + { "unsigned", "short", "ushort", false, true, false, 0, 0, 0, USHRT_MAX, sizeof(unsigned short) }, + { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, sizeof(int) }, + { "unsigned", "int", "uint", false, true, false, 0, 0, 0, UINT_MAX, sizeof(unsigned int) }, + { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, 0, 0, sizeof(long) }, + { "unsigned", "long", "ulong", false, true, false, 0, 0, 0, ULONG_MAX, sizeof(unsigned long) } }; #define S8BIT_MIN -128 @@ -66,63 +66,62 @@ HostType hostTypesC[] = HostType hostTypesD[] = { - { "byte", 0, "byte", true, true, false, CHAR_MIN, CHAR_MAX, 1 }, - { "ubyte", 0, "ubyte", false, true, false, 0, UCHAR_MAX, 1 }, - { "char", 0, "char", false, true, false, 0, UCHAR_MAX, 1 }, - { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 2 }, - { "ushort", 0, "ushort", false, true, false, 0, USHRT_MAX, 2 }, - { "wchar", 0, "wchar", false, true, false, 0, USHRT_MAX, 2 }, - { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 4 }, - { "uint", 0, "uint", false, true, false, 0, UINT_MAX, 4 }, - { "dchar", 0, "dchar", false, true, false, 0, UINT_MAX, 4 } + { "byte", 0, "byte", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, 1 }, + { "ubyte", 0, "ubyte", false, true, false, 0, 0, 0, UCHAR_MAX, 1 }, + { "char", 0, "char", false, true, false, 0, 0, 0, UCHAR_MAX, 1 }, + { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, 2 }, + { "ushort", 0, "ushort", false, true, false, 0, 0, 0, USHRT_MAX, 2 }, + { "wchar", 0, "wchar", false, true, false, 0, 0, 0, USHRT_MAX, 2 }, + { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, 4 }, + { "uint", 0, "uint", false, true, false, 0, 0, 0, UINT_MAX, 4 }, + { "dchar", 0, "dchar", false, true, false, 0, 0, 0, UINT_MAX, 4 } }; HostType hostTypesGo[] = { - { "byte", 0, "uint8", false, true, false, U8BIT_MIN, U8BIT_MAX, 1 }, - { "int8", 0, "int8", true, true, false, S8BIT_MIN, S8BIT_MAX, 1 }, - { "uint8", 0, "uint8", false, true, false, U8BIT_MIN, U8BIT_MAX, 1 }, - { "int16", 0, "int16", true, true, false, S16BIT_MIN, S16BIT_MAX, 2 }, - { "uint16", 0, "uint16", false, true, false, U16BIT_MIN, U16BIT_MAX, 2 }, - { "int32", 0, "int32", true, true, false, S32BIT_MIN, S32BIT_MAX, 4 }, - { "uint32", 0, "uint32", false, true, false, U32BIT_MIN, U32BIT_MAX, 4 }, - { "int64", 0, "int64", true, true, false, S64BIT_MIN, S64BIT_MAX, 8 }, - { "uint64", 0, "uint64", false, true, false, U64BIT_MIN, U64BIT_MAX, 8 }, - { "rune", 0, "int32", true, true, true, S32BIT_MIN, S32BIT_MAX, 4 } + { "byte", 0, "uint8", false, true, false, 0, 0, U8BIT_MIN, U8BIT_MAX, 1 }, + { "int8", 0, "int8", true, true, false, S8BIT_MIN, S8BIT_MAX, 0, 0, 1 }, + { "uint8", 0, "uint8", false, true, false, 0, 0, U8BIT_MIN, U8BIT_MAX, 1 }, + { "int16", 0, "int16", true, true, false, S16BIT_MIN, S16BIT_MAX, 0, 0, 2 }, + { "uint16", 0, "uint16", false, true, false, 0, 0, U16BIT_MIN, U16BIT_MAX, 2 }, + { "int32", 0, "int32", true, true, false, S32BIT_MIN, S32BIT_MAX, 0, 0, 4 }, + { "uint32", 0, "uint32", false, true, false, 0, 0, U32BIT_MIN, U32BIT_MAX, 4 }, + { "int64", 0, "int64", true, true, false, S64BIT_MIN, S64BIT_MAX, 0, 0, 8 }, + { "uint64", 0, "uint64", false, true, false, 0, 0, U64BIT_MIN, U64BIT_MAX, 8 }, + { "rune", 0, "int32", true, true, true, S32BIT_MIN, S32BIT_MAX, 0, 0, 4 } }; HostType hostTypesJava[] = { - { "byte", 0, "byte", true, true, false, CHAR_MIN, CHAR_MAX, 1 }, - { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 2 }, - { "char", 0, "char", false, true, false, 0, USHRT_MAX, 2 }, - { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 4 }, + { "byte", 0, "byte", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, 1 }, + { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, 2 }, + { "char", 0, "char", false, true, false, 0, 0, 0, USHRT_MAX, 2 }, + { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, 4 }, }; /* What are the appropriate types for ruby? */ HostType hostTypesRuby[] = { - { "char", 0, "char", true, true, false, CHAR_MIN, CHAR_MAX, 1 }, - { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 4 }, + { "char", 0, "char", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, 1 }, + { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, 4 }, }; HostType hostTypesCSharp[] = { - { "sbyte", 0, "sbyte", true, true, false, CHAR_MIN, CHAR_MAX, 1 }, - { "byte", 0, "byte", false, true, false, 0, UCHAR_MAX, 1 }, - { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 2 }, - { "ushort", 0, "ushort", false, true, false, 0, USHRT_MAX, 2 }, - { "char", 0, "char", false, true, true, 0, USHRT_MAX, 2 }, - { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 4 }, - { "uint", 0, "uint", false, true, false, 0, UINT_MAX, 4 }, - { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, 8 }, - { "ulong", 0, "ulong", false, true, false, 0, ULONG_MAX, 8 } + { "sbyte", 0, "sbyte", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, 1 }, + { "byte", 0, "byte", false, true, false, 0, 0, 0, UCHAR_MAX, 1 }, + { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, 2 }, + { "ushort", 0, "ushort", false, true, false, 0, 0, 0, USHRT_MAX, 2 }, + { "char", 0, "char", false, true, true, 0, 0, 0, USHRT_MAX, 2 }, + { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, 4 }, + { "uint", 0, "uint", false, true, false, 0, 0, 0, UINT_MAX, 4 }, + { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, 0, 0, 8 }, + { "ulong", 0, "ulong", false, true, false, 0, 0, 0, ULONG_MAX, 8 } }; HostType hostTypesOCaml[] = { -// { "char", 0, "char", false, true, false, 0, UCHAR_MAX, 1 }, - { "int", 0, "int", true, true, false, S31BIT_MIN, S31BIT_MAX, 4 }, + { "int", 0, "int", true, true, false, S31BIT_MIN, S31BIT_MAX, 0, 0, 4 }, }; HostLang hostLangC = { HostLang::C, hostTypesC, 8, hostTypesC+0, true }; diff --git a/ragel/common.h b/ragel/common.h index b26da68..3ee71d2 100644 --- a/ragel/common.h +++ b/ragel/common.h @@ -116,8 +116,10 @@ struct HostType bool isSigned; bool isOrd; bool isChar; - long long minVal; - long long maxVal; + long long sMinVal; + long long sMaxVal; + unsigned long long uMinVal; + unsigned long long uMaxVal; unsigned int size; }; @@ -174,12 +176,12 @@ struct KeyOps this->alphType = alphType; isSigned = alphType->isSigned; if ( isSigned ) { - minKey = (long) alphType->minVal; - maxKey = (long) alphType->maxVal; + minKey = (long) alphType->sMinVal; + maxKey = (long) alphType->sMaxVal; } else { - minKey = (long) (unsigned long) alphType->minVal; - maxKey = (long) (unsigned long) alphType->maxVal; + minKey = (long) (unsigned long) alphType->uMinVal; + maxKey = (long) (unsigned long) alphType->uMaxVal; } } @@ -200,18 +202,25 @@ struct KeyOps HostType *typeSubsumes( long long maxVal ) { + HostType *hostTypes = hostLang->hostTypes; + for ( int i = 0; i < hostLang->numHostTypes; i++ ) { - if ( maxVal <= hostLang->hostTypes[i].maxVal ) - return hostLang->hostTypes + i; + long long typeMaxVal = hostTypes[i].isSigned ? hostTypes[i].sMaxVal : hostTypes[i].uMaxVal; + if ( maxVal <= typeMaxVal ) + return &hostLang->hostTypes[i]; } + return 0; } HostType *typeSubsumes( bool isSigned, long long maxVal ) { + HostType *hostTypes = hostLang->hostTypes; + for ( int i = 0; i < hostLang->numHostTypes; i++ ) { - if ( ( ( isSigned && hostLang->hostTypes[i].isSigned ) || !isSigned ) && - maxVal <= hostLang->hostTypes[i].maxVal ) + long long typeMaxVal = hostTypes[i].isSigned ? hostTypes[i].sMaxVal : hostTypes[i].uMaxVal; + if ( ( ( isSigned && hostTypes[i].isSigned ) || !isSigned ) && + maxVal <= typeMaxVal ) return hostLang->hostTypes + i; } return 0; diff --git a/ragel/config.h.in b/ragel/config.h.in index 2dd9bdb..79d8e9c 100644 --- a/ragel/config.h.in +++ b/ragel/config.h.in @@ -1,4 +1,4 @@ -/* ragel/config.h.in. Generated from configure.in by autoheader. */ +/* ragel/config.h.in. Generated from configure.ac by autoheader. */ /* Name of package */ #undef PACKAGE diff --git a/ragel/cscodegen.cpp b/ragel/cscodegen.cpp index 6de1506..37eb521 100644 --- a/ragel/cscodegen.cpp +++ b/ragel/cscodegen.cpp @@ -635,7 +635,7 @@ void CSharpFsmCodeGen::STATE_IDS() out << "\n"; - if ( entryPointNames.length() > 0 ) { + if ( !noEntry && entryPointNames.length() > 0 ) { for ( EntryNameVect::Iter en = entryPointNames; en.lte(); en++ ) { STATIC_VAR( "int", DATA_PREFIX() + "en_" + *en ) << " = " << entryPointIds[en.pos()] << ";\n"; diff --git a/ragel/cstable.cpp b/ragel/cstable.cpp index 72df0a6..13c9e73 100644 --- a/ragel/cstable.cpp +++ b/ragel/cstable.cpp @@ -618,15 +618,22 @@ std::ostream &CSharpTabCodeGen::TRANS_ACTIONS_WI() void CSharpTabCodeGen::GOTO( ostream &ret, int gotoDest, bool inFinish ) { - ret << "{" << vCS() << " = " << gotoDest << "; " << - CTRL_FLOW() << "goto _again;}"; + ret << "{" << vCS() << " = " << gotoDest << ";"; + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void CSharpTabCodeGen::GOTO_EXPR( ostream &ret, GenInlineItem *ilItem, bool inFinish ) { ret << "{" << vCS() << " = ("; INLINE_LIST( ret, ilItem->children, 0, inFinish ); - ret << "); " << CTRL_FLOW() << "goto _again;}"; + ret << ");"; + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void CSharpTabCodeGen::CURS( ostream &ret, bool inFinish ) @@ -658,8 +665,13 @@ void CSharpTabCodeGen::CALL( ostream &ret, int callDest, int targState, bool inF INLINE_LIST( ret, prePushExpr, 0, false ); } - ret << "{" << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = " << - callDest << "; " << CTRL_FLOW() << "goto _again;}"; + ret << "{"; + + ret << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = " << callDest << ";"; + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; if ( prePushExpr != 0 ) ret << "}"; @@ -672,9 +684,15 @@ void CSharpTabCodeGen::CALL_EXPR( ostream &ret, GenInlineItem *ilItem, int targS INLINE_LIST( ret, prePushExpr, 0, false ); } - ret << "{" << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = ("; + ret << "{"; + + ret << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = ("; INLINE_LIST( ret, ilItem->children, targState, inFinish ); - ret << "); " << CTRL_FLOW() << "goto _again;}"; + ret << ");"; + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; if ( prePushExpr != 0 ) ret << "}"; @@ -682,8 +700,9 @@ void CSharpTabCodeGen::CALL_EXPR( ostream &ret, GenInlineItem *ilItem, int targS void CSharpTabCodeGen::RET( ostream &ret, bool inFinish ) { - ret << "{" << vCS() << " = " << STACK() << "[--" << - TOP() << "]; "; + ret << "{"; + + ret << vCS() << " = " << STACK() << "[--" << TOP() << "]; "; if ( postPopExpr != 0 ) { ret << "{"; @@ -691,7 +710,9 @@ void CSharpTabCodeGen::RET( ostream &ret, bool inFinish ) ret << "}"; } - ret << CTRL_FLOW() << "goto _again;}"; + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void CSharpTabCodeGen::BREAK( ostream &ret, int targState ) diff --git a/ragel/fsmgraph.h b/ragel/fsmgraph.h index 1b7d6f5..c7e676b 100644 --- a/ragel/fsmgraph.h +++ b/ragel/fsmgraph.h @@ -859,7 +859,7 @@ template PairIter::Pair #define CO_RETURN(label) \ itState = label; \ return; \ - entry##label: backIn = true + entry##label: {} /* Return and re-entry for the co-routine iterators. This should ALWAYS be * used inside of a block. */ @@ -867,16 +867,12 @@ template PairIter::Pair itState = label; \ userState = uState; \ return; \ - entry##label: backIn = true + entry##label: {} /* Advance to the next transition. When returns, trans points to the next * transition, unless there are no more, in which case end() returns true. */ template void PairIter::findNext() { - /* This variable is used in dummy statements that follow the entry - * goto labels. The compiler needs some statement to follow the label. */ - bool backIn; - /* Jump into the iterator routine base on the iterator state. */ switch ( itState ) { case Begin: goto entryBegin; diff --git a/ragel/gendata.cpp b/ragel/gendata.cpp index 65f0b52..737a53c 100644 --- a/ragel/gendata.cpp +++ b/ragel/gendata.cpp @@ -452,6 +452,7 @@ CodeGenData::CodeGenData( ostream &out ) noPrefix(false), noFinal(false), noError(false), + noEntry(false), noCS(false) {} @@ -837,6 +838,10 @@ void CodeGenData::analyzeAction( GenAction *act, GenInlineList *inlineList ) redFsm->bAnyActionCalls = true; else if ( item->type == GenInlineItem::Ret ) redFsm->bAnyActionRets = true; + + if ( item->type == GenInlineItem::CallExpr || item->type == GenInlineItem::GotoExpr ) + redFsm->bAnyActionByValControl = true; + } /* Check for various things in regular actions. */ @@ -1079,6 +1084,8 @@ bool CodeGenData::writeStatement( InputLoc &loc, int nargs, char **args ) noPrefix = true; else if ( strcmp( args[i], "nofinal" ) == 0 ) noFinal = true; + else if ( strcmp( args[i], "noentry" ) == 0 ) + noEntry = true; else write_option_error( loc, args[i] ); } diff --git a/ragel/gendata.h b/ragel/gendata.h index 071c601..6c3d385 100644 --- a/ragel/gendata.h +++ b/ragel/gendata.h @@ -129,6 +129,7 @@ struct CodeGenData bool noPrefix; bool noFinal; bool noError; + bool noEntry; bool noCS; void createMachine(); diff --git a/ragel/gocodegen.cpp b/ragel/gocodegen.cpp index 5ff44c1..d28f0f0 100644 --- a/ragel/gocodegen.cpp +++ b/ragel/gocodegen.cpp @@ -632,7 +632,7 @@ void GoCodeGen::STATE_IDS() out << endl; - if ( entryPointNames.length() > 0 ) { + if ( !noEntry && entryPointNames.length() > 0 ) { for ( EntryNameVect::Iter en = entryPointNames; en.lte(); en++ ) { CONST( "int", DATA_PREFIX() + "en_" + *en ) << " = " << entryPointIds[en.pos()] << endl; diff --git a/ragel/javacodegen.cpp b/ragel/javacodegen.cpp index ff2193c..8cc64f8 100644 --- a/ragel/javacodegen.cpp +++ b/ragel/javacodegen.cpp @@ -984,7 +984,7 @@ void JavaTabCodeGen::writeData() out << "\n"; - if ( entryPointNames.length() > 0 ) { + if ( !noEntry && entryPointNames.length() > 0 ) { for ( EntryNameVect::Iter en = entryPointNames; en.lte(); en++ ) { STATIC_VAR( "int", DATA_PREFIX() + "en_" + *en ) << " = " << entryPointIds[en.pos()] << ";\n"; diff --git a/ragel/mlcodegen.cpp b/ragel/mlcodegen.cpp index f8268d6..166e453 100644 --- a/ragel/mlcodegen.cpp +++ b/ragel/mlcodegen.cpp @@ -565,7 +565,7 @@ void OCamlCodeGen::STATE_IDS() out << "\n"; - if ( entryPointNames.length() > 0 ) { + if ( !noEntry && entryPointNames.length() > 0 ) { for ( EntryNameVect::Iter en = entryPointNames; en.lte(); en++ ) { STATIC_VAR( "int", DATA_PREFIX() + "en_" + *en ) << " = " << entryPointIds[en.pos()] << TOP_SEP(); diff --git a/ragel/parsedata.cpp b/ragel/parsedata.cpp index 8ce89db..d0bb361 100644 --- a/ragel/parsedata.cpp +++ b/ragel/parsedata.cpp @@ -122,29 +122,50 @@ Key makeFsmKeyHex( char *str, const InputLoc &loc, ParseData *pd ) Key makeFsmKeyDec( char *str, const InputLoc &loc, ParseData *pd ) { - /* Convert the number to a decimal. First reset errno so we can check - * for overflow or underflow. */ - errno = 0; - long long minVal = keyOps->alphType->minVal; - long long maxVal = keyOps->alphType->maxVal; - - long long ll = strtoll( str, 0, 10 ); - - /* Check for underflow. */ - if ( ( errno == ERANGE && ll < 0 ) || ll < minVal) { - error(loc) << "literal " << str << " underflows the alphabet type" << endl; - ll = minVal; + if ( keyOps->alphType->isSigned ) { + /* Convert the number to a decimal. First reset errno so we can check + * for overflow or underflow. */ + errno = 0; + long long minVal = keyOps->alphType->sMinVal; + long long maxVal = keyOps->alphType->sMaxVal; + + long long ll = strtoll( str, 0, 10 ); + + /* Check for underflow. */ + if ( ( errno == ERANGE && ll < 0 ) || ll < minVal) { + error(loc) << "literal " << str << " underflows the alphabet type" << endl; + ll = minVal; + } + /* Check for overflow. */ + else if ( ( errno == ERANGE && ll > 0 ) || ll > maxVal ) { + error(loc) << "literal " << str << " overflows the alphabet type" << endl; + ll = maxVal; + } + + return Key( (long)ll ); } - /* Check for overflow. */ - else if ( ( errno == ERANGE && ll > 0 ) || ll > maxVal ) { - error(loc) << "literal " << str << " overflows the alphabet type" << endl; - ll = maxVal; + else { + /* Convert the number to a decimal. First reset errno so we can check + * for overflow or underflow. */ + errno = 0; + unsigned long long minVal = keyOps->alphType->uMinVal; + unsigned long long maxVal = keyOps->alphType->uMaxVal; + + unsigned long long ull = strtoull( str, 0, 10 ); + + /* Check for underflow. */ + if ( ( errno == ERANGE && ull < 0 ) || ull < minVal) { + error(loc) << "literal " << str << " underflows the alphabet type" << endl; + ull = minVal; + } + /* Check for overflow. */ + else if ( ( errno == ERANGE && ull > 0 ) || ull > maxVal ) { + error(loc) << "literal " << str << " overflows the alphabet type" << endl; + ull = maxVal; + } + + return Key( (unsigned long)ull ); } - - if ( keyOps->alphType->isSigned ) - return Key( (long)ll ); - else - return Key( (unsigned long)ll ); } /* Make an fsm key in int format (what the fsm graph uses) from an alphabet diff --git a/ragel/parsetree.cpp b/ragel/parsetree.cpp index 3245a54..ff538aa 100644 --- a/ragel/parsetree.cpp +++ b/ragel/parsetree.cpp @@ -583,8 +583,6 @@ Join::Join( const InputLoc &loc, Expression *expr ) /* Construct with a location and the first expression. */ Join::Join( Expression *expr ) -: - loc(loc) { exprList.append( expr ); } diff --git a/ragel/parsetree.h b/ragel/parsetree.h index dd38678..954542e 100644 --- a/ragel/parsetree.h +++ b/ragel/parsetree.h @@ -385,11 +385,11 @@ struct Expression /* Construct with an expression on the left and a term on the right. */ Expression( Expression *expression, Term *term, Type type ) : expression(expression), term(term), - builtin(builtin), type(type), prev(this), next(this) { } + type(type), prev(this), next(this) { } /* Construct with only a term. */ Expression( Term *term ) : - expression(0), term(term), builtin(builtin), + expression(0), term(term), type(TermType) , prev(this), next(this) { } /* Construct with a builtin type. */ diff --git a/ragel/rbxgoto.cpp b/ragel/rbxgoto.cpp index c54cb00..932fdf3 100644 --- a/ragel/rbxgoto.cpp +++ b/ragel/rbxgoto.cpp @@ -658,7 +658,7 @@ void RbxGotoCodeGen::BREAK( ostream &ret, int targState ) out << " begin\n" " " << P() << " += 1\n" - " " << rbxGoto(ret, "_out") << "\n" + " "; rbxGoto(ret, "_out") << "\n" " end\n"; } diff --git a/ragel/redfsm.cpp b/ragel/redfsm.cpp index 9a58752..5b02d99 100644 --- a/ragel/redfsm.cpp +++ b/ragel/redfsm.cpp @@ -56,6 +56,7 @@ RedFsmAp::RedFsmAp() bAnyActionGotos(false), bAnyActionCalls(false), bAnyActionRets(false), + bAnyActionByValControl(false), bAnyRegActionRets(false), bAnyRegActionByValControl(false), bAnyRegNextStmt(false), diff --git a/ragel/redfsm.h b/ragel/redfsm.h index 2e7ad7c..badca23 100644 --- a/ragel/redfsm.h +++ b/ragel/redfsm.h @@ -421,6 +421,7 @@ struct RedFsmAp bool bAnyActionGotos; bool bAnyActionCalls; bool bAnyActionRets; + bool bAnyActionByValControl; bool bAnyRegActionRets; bool bAnyRegActionByValControl; bool bAnyRegNextStmt; @@ -456,6 +457,7 @@ struct RedFsmAp bool anyActionGotos() { return bAnyActionGotos; } bool anyActionCalls() { return bAnyActionCalls; } bool anyActionRets() { return bAnyActionRets; } + bool anyActionByValControl() { return bAnyActionByValControl; } bool anyRegActionRets() { return bAnyRegActionRets; } bool anyRegActionByValControl() { return bAnyRegActionByValControl; } bool anyRegNextStmt() { return bAnyRegNextStmt; } diff --git a/ragel/rubycodegen.cpp b/ragel/rubycodegen.cpp index ff25ada..ee68238 100644 --- a/ragel/rubycodegen.cpp +++ b/ragel/rubycodegen.cpp @@ -430,7 +430,7 @@ void RubyCodeGen::STATE_IDS() out << "\n"; - if ( entryPointNames.length() > 0 ) { + if ( !noEntry && entryPointNames.length() > 0 ) { for ( EntryNameVect::Iter en = entryPointNames; en.lte(); en++ ) { STATIC_VAR( "int", DATA_PREFIX() + "en_" + *en ) << " = " << entryPointIds[en.pos()] << ";\n"; diff --git a/ragel/version.h b/ragel/version.h index 87d9750..3b1233c 100644 --- a/ragel/version.h +++ b/ragel/version.h @@ -1,2 +1,2 @@ -#define VERSION "6.9" -#define PUBDATE "Oct 2014" +#define VERSION "6.10" +#define PUBDATE "March 2017" diff --git a/test-driver b/test-driver index d306056..8e575b0 100755 --- a/test-driver +++ b/test-driver @@ -3,7 +3,7 @@ scriptversion=2013-07-13.22; # UTC -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 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 @@ -106,11 +106,14 @@ trap "st=143; $do_exit" 15 # Test script is run here. "$@" >$log_file 2>&1 estatus=$? + if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 + tweaked_estatus=1 +else + tweaked_estatus=$estatus fi -case $estatus:$expect_failure in +case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; @@ -119,6 +122,12 @@ case $estatus:$expect_failure in *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + # Report outcome to console. echo "${col}${res}${std}: $test_name" diff --git a/test/Makefile.in b/test/Makefile.in index 77c3a38..dbf472d 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -34,7 +34,17 @@ # along with Ragel; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -96,12 +106,11 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = test -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(srcdir)/runtests.in $(top_srcdir)/test-driver README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/ragel/config.h CONFIG_CLEAN_FILES = runtests @@ -330,6 +339,8 @@ TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/runtests.in \ + $(top_srcdir)/test-driver README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -425,6 +436,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -474,7 +486,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign test/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -531,7 +542,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ - else \ + elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ @@ -812,6 +823,8 @@ uninstall-am: maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am recheck tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. -- cgit v1.2.1