diff options
-rw-r--r-- | Makefile.in | 73 | ||||
-rw-r--r-- | aclocal.m4 | 170 | ||||
-rwxr-xr-x | configure | 27 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/Makefile.am | 8 | ||||
-rw-r--r-- | src/Makefile.in | 81 | ||||
-rw-r--r-- | src/algebra/Makefile.in | 62 | ||||
-rw-r--r-- | src/include/dialect.H | 42 | ||||
-rw-r--r-- | src/include/storage.H (renamed from src/utils/storage.H) | 54 | ||||
-rw-r--r-- | src/io/Makefile.in | 61 | ||||
-rw-r--r-- | src/syntax/Makefile.in | 61 | ||||
-rw-r--r-- | src/utils/Makefile.in | 6 | ||||
-rw-r--r-- | src/utils/storage.cc | 27 |
14 files changed, 455 insertions, 225 deletions
diff --git a/Makefile.in b/Makefile.in index a982d0ef..04c9e45b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -57,23 +57,51 @@ # describe. This description is STILL IN WORK IN PROGRESS. Therefore # it is incorrekt, incomplet, and iNconSiStenT. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ esac; \ - test $$am__dry = yes; \ - } + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -559,13 +587,12 @@ distclean-libtool: # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.13.1 -*- Autoconf -*- +# generated automatically by aclocal 1.13.2 -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.13' 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.13.1], [], +m4_if([$1], [1.13.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,7 +51,7 @@ 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.13.1])dnl +[AM_AUTOMAKE_VERSION([1.13.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -373,7 +373,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the @@ -925,76 +925,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of '-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + AM_RUN_LOG([cat conftest.dir/file]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar <conftest.tar]) - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for OpenAxiom 1.5.0-2013-05-19. +# Generated by GNU Autoconf 2.69 for OpenAxiom 1.5.0-2013-06-21. # # Report bugs to <open-axiom-bugs@lists.sf.net>. # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='OpenAxiom' PACKAGE_TARNAME='openaxiom' -PACKAGE_VERSION='1.5.0-2013-05-19' -PACKAGE_STRING='OpenAxiom 1.5.0-2013-05-19' +PACKAGE_VERSION='1.5.0-2013-06-21' +PACKAGE_STRING='OpenAxiom 1.5.0-2013-06-21' PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net' PACKAGE_URL='' @@ -1392,7 +1392,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 OpenAxiom 1.5.0-2013-05-19 to adapt to many kinds of systems. +\`configure' configures OpenAxiom 1.5.0-2013-06-21 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1467,7 +1467,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of OpenAxiom 1.5.0-2013-05-19:";; + short | recursive ) echo "Configuration of OpenAxiom 1.5.0-2013-06-21:";; esac cat <<\_ACEOF @@ -1584,7 +1584,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -OpenAxiom configure 1.5.0-2013-05-19 +OpenAxiom configure 1.5.0-2013-06-21 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2585,7 +2585,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 OpenAxiom $as_me 1.5.0-2013-05-19, which was +It was created by OpenAxiom $as_me 1.5.0-2013-06-21, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3566,7 +3566,7 @@ fi # Define the identity of the package. PACKAGE='openaxiom' - VERSION='1.5.0-2013-05-19' + VERSION='1.5.0-2013-06-21' cat >>confdefs.h <<_ACEOF @@ -3606,6 +3606,10 @@ mkdir_p='$(MKDIR_P)' # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -3617,6 +3621,7 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + open_axiom_installdir=$libdir/open-axiom/$target/$PACKAGE_VERSION @@ -20412,7 +20417,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 OpenAxiom $as_me 1.5.0-2013-05-19, which was +This file was extended by OpenAxiom $as_me 1.5.0-2013-06-21, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20478,7 +20483,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="\\ -OpenAxiom config.status 1.5.0-2013-05-19 +OpenAxiom config.status 1.5.0-2013-06-21 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -21661,7 +21666,7 @@ $as_echo X"$mf" | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the diff --git a/configure.ac b/configure.ac index 34265cc3..74178462 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,7 @@ dnl Makefiles for building OpenAxiom interpreter, compiler, libraries, and dnl auxiliary tools where appropriate. dnl -AC_INIT([OpenAxiom], [1.5.0-2013-05-19], +AC_INIT([OpenAxiom], [1.5.0-2013-06-21], [open-axiom-bugs@lists.sf.net]) dnl Most of the macros used in this configure.ac are defined in files diff --git a/src/ChangeLog b/src/ChangeLog index 30e2eea7..fdc84220 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * include/dialect.H: New. + * include/diagnostics.H: Likewise. + * include/storage.H: Move from utils/. + 2013-06-20 Gabriel Dos Reis <gdr@integrable-solutions.net> * include/diagnostics.H: New. diff --git a/src/Makefile.am b/src/Makefile.am index 0758724c..9d4c9d10 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -51,8 +51,10 @@ oa_src_include_headers = \ defaults.H \ structure.H \ iterator.H \ + storage.H \ Input.H \ diagnostics.H \ + dialect.H \ token.H if OA_BUILD_SMAN @@ -91,10 +93,10 @@ stamp-subdirs: all-driver: all-utils all-lib cd driver && $(MAKE) $(AM_MAKEFLAGS) $@ -all-utils: stamp-subdirs +all-utils: stamp-subdirs all-headers cd utils && $(MAKE) $(AM_MAKEFLAGS) $@ -all-io: all-headers +all-io: all-utils cd io && $(MAKE) $(AM_MAKEFLAGS) $@ all-syntax: all-io @@ -119,7 +121,7 @@ all-share: all-doc: stamp-subdirs cd doc && $(MAKE) $(AM_MAKEFLAGS) $@ -all-lib: stamp-subdirs +all-lib: stamp-subdirs all-utils cd lib && $(MAKE) $(AM_MAKEFLAGS) $@ all-lisp: all-lib all-driver diff --git a/src/Makefile.in b/src/Makefile.in index f8d671ce..b4c117dc 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -46,23 +46,51 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ esac; \ - test $$am__dry = yes; \ - } + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -368,8 +396,10 @@ oa_src_include_headers = \ defaults.H \ structure.H \ iterator.H \ + storage.H \ Input.H \ diagnostics.H \ + dialect.H \ token.H @OA_BUILD_SMAN_TRUE@OA_SMAN_TARGETS = all-sman all-clef @@ -423,13 +453,12 @@ clean-libtool: # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ @@ -713,10 +742,10 @@ stamp-subdirs: all-driver: all-utils all-lib cd driver && $(MAKE) $(AM_MAKEFLAGS) $@ -all-utils: stamp-subdirs +all-utils: stamp-subdirs all-headers cd utils && $(MAKE) $(AM_MAKEFLAGS) $@ -all-io: all-headers +all-io: all-utils cd io && $(MAKE) $(AM_MAKEFLAGS) $@ all-syntax: all-io @@ -741,7 +770,7 @@ all-share: all-doc: stamp-subdirs cd doc && $(MAKE) $(AM_MAKEFLAGS) $@ -all-lib: stamp-subdirs +all-lib: stamp-subdirs all-utils cd lib && $(MAKE) $(AM_MAKEFLAGS) $@ all-lisp: all-lib all-driver diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index 7a245f7c..bc1ad529 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -86,23 +86,51 @@ # than a lattice. # VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -1313,7 +1341,7 @@ cscope cscopelist: $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not -# exand to empty, as could happen e.g. with make check TESTS=''. +# expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: diff --git a/src/include/dialect.H b/src/include/dialect.H new file mode 100644 index 00000000..a471981d --- /dev/null +++ b/src/include/dialect.H @@ -0,0 +1,42 @@ +// Copyright (C) 2013, Gabriel Dos Reis. +// All rights reserved. +// Written by Gabriel Dos Reis. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// - Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// +// - Neither the name of OpenAxiom. nor the names of its contributors +// may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef OPENAXIOM_DIALECT_included +#define OPENAXIOM_DIALECT_included + +namespace OpenAxiom { + enum class Language { + Spad, Boot + }; +} + +#endif // OPENAXIOM_DIALECT_included diff --git a/src/utils/storage.H b/src/include/storage.H index 72b9eb1e..b75ced9d 100644 --- a/src/utils/storage.H +++ b/src/include/storage.H @@ -1,5 +1,6 @@ -// Copyright (C) 2010-2011, Gabriel Dos Reis. +// Copyright (C) 2010-2013, Gabriel Dos Reis. // All rights reserved. +// Written by Gabriel Dos Reis. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -13,9 +14,9 @@ // the documentation and/or other materials provided with the // distribution. // -// - Neither the name of The Numerical Algorithms Group Ltd. nor the -// names of its contributors may be used to endorse or promote products -// derived from this software without specific prior written permission. +// - Neither the name of OpenAxiom. nor the names of its contributors +// may be used to endorse or promote products derived from this +// software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -35,16 +36,15 @@ // --% from the host OS. Provide random access read to // --% files through file mapping. -#ifndef OPENAXIOM_STORAGE_INCLUDED -#define OPENAXIOM_STORAGE_INCLUDED +#ifndef OPENAXIOM_STORAGE_included +#define OPENAXIOM_STORAGE_included +#include <open-axiom/config> #include <stddef.h> #include <new> #include <cmath> #include <string> -#include <open-axiom/config> - namespace OpenAxiom { // ----------------- // -- SystemError -- @@ -65,10 +65,10 @@ namespace OpenAxiom { namespace Memory { // Datatype for the unit of storage. - typedef unsigned char Byte; + using Byte = unsigned char; // Datatype for pointers to data. - typedef void* Pointer; + using Pointer = void*; // Precision of the host OS storage page unit in byte count size_t page_size(); @@ -217,7 +217,7 @@ namespace OpenAxiom { size_t Arena<T>::population() const { size_t n = 0; - for (Handle* h = store; h != 0; h = previous(h)) + for (Handle* h = store; h != nullptr; h = previous(h)) n += object_count(h); return n; } @@ -247,7 +247,7 @@ namespace OpenAxiom { Arena<T>::~Arena() { // Release storage in the reverse order of their // their allocation. - while (store != 0) { + while (store != nullptr) { Handle* current = store; store = BlockStorage::previous(store); BlockStorage::release(current); @@ -259,7 +259,7 @@ namespace OpenAxiom { // ------------- template<typename T> struct Factory : Arena<T> { - typedef typename Arena<T>::Handle Handle; + using Handler = typename Arena<T>::Handle; Factory() : Arena<T>(nominal_population()) { } ~Factory(); @@ -270,21 +270,9 @@ namespace OpenAxiom { } // Allocate storage and construct an object of type `T'. - template<typename U> - T* make(const U& u) { - return new(this->allocate(1)) T(u); - } - - // Allocate storage and construct an object of type `T'. - template<typename U, typename V> - T* make(const U& u, const V& v) { - return new(this->allocate(1)) T(u, v); - } - - // Allocate storage and construct an object of type `T'. - template<typename U, typename V, typename W> - T* make(const U& u, const V& v, const W& w) { - return new(this->allocate(1)) T(u, v, w); + template<typename... Args> + T* make(const Args&... args) { + return new(this->allocate(1)) T(args...); } private: @@ -300,7 +288,7 @@ namespace OpenAxiom { // Destroy objects in the reverse order of their construction. template<typename T> Factory<T>::~Factory() { - for (Handle* s = this->store; s != 0; s = Arena<T>::previous(s)) { + for (auto s = this->store; s != nullptr; s = Arena<T>::previous(s)) { T* last = Arena<T>::last_object(s); for (--last; last >= Arena<T>::first_object(s); --last) last->~T(); @@ -312,6 +300,7 @@ namespace OpenAxiom { // ----------------- struct FileMapping { explicit FileMapping(std::string); + FileMapping(FileMapping&&); ~FileMapping(); const char* begin() const { return static_cast<const char*>(start); } const char* end() const { return begin() + extent; } @@ -320,11 +309,12 @@ namespace OpenAxiom { Pointer start; // address at the mapped storage size_t extent; // length (in bytes) of the storage private: - FileMapping(const FileMapping&); // not implemented - FileMapping& operator=(const FileMapping&); // idem + FileMapping(const FileMapping&) = delete; + FileMapping& operator=(const FileMapping&) = delete; }; } } -#endif // OPENAXIOM_STORAGE_INCLUDED +#endif // OPENAXIOM_STORAGE_included + diff --git a/src/io/Makefile.in b/src/io/Makefile.in index 728286d7..1cbd8406 100644 --- a/src/io/Makefile.in +++ b/src/io/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -47,23 +47,51 @@ # VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ esac; \ - test $$am__dry = yes; \ - } + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -388,6 +416,7 @@ $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + libio.a: $(libio_a_OBJECTS) $(libio_a_DEPENDENCIES) $(EXTRA_libio_a_DEPENDENCIES) $(AM_V_at)-rm -f libio.a $(AM_V_AR)$(libio_a_AR) libio.a $(libio_a_OBJECTS) $(libio_a_LIBADD) diff --git a/src/syntax/Makefile.in b/src/syntax/Makefile.in index bab9086a..bba5226d 100644 --- a/src/syntax/Makefile.in +++ b/src/syntax/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -47,23 +47,51 @@ # VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ esac; \ - test $$am__dry = yes; \ - } + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -387,6 +415,7 @@ $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + libsyntax.a: $(libsyntax_a_OBJECTS) $(libsyntax_a_DEPENDENCIES) $(EXTRA_libsyntax_a_DEPENDENCIES) $(AM_V_at)-rm -f libsyntax.a $(AM_V_AR)$(libsyntax_a_AR) libsyntax.a $(libsyntax_a_OBJECTS) $(libsyntax_a_LIBADD) diff --git a/src/utils/Makefile.in b/src/utils/Makefile.in index e9734fd2..a3021748 100644 --- a/src/utils/Makefile.in +++ b/src/utils/Makefile.in @@ -1,4 +1,4 @@ -# Copyright (C) 2011, Gabriel Dos Reis. +# Copyright (C) 2013, Gabriel Dos Reis. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -36,14 +36,14 @@ hammer_SOURCES = hammer.cc hammer_OBJECTS = $(hammer_SOURCES:.cc=.lo) hammer_LDADD = -L. -lOpenAxiom -libOpenAxiom_HEADERS = storage.H hash-table.H string-pool.H sexpr.H vm.H +libOpenAxiom_HEADERS = hash-table.H string-pool.H sexpr.H vm.H libOpenAxiom_SOURCES = \ storage.cc string-pool.cc sexpr.cc command.cc \ filesystem.cc vm.cc libOpenAxiom_OBJECTS = $(libOpenAxiom_SOURCES:.cc=.lo) -oa_public_headers = storage hash-table string-pool sexpr vm +oa_public_headers = hash-table string-pool sexpr vm ## Where we store public header files oa_target_headerdir = $(oa_target_includedir)/open-axiom diff --git a/src/utils/storage.cc b/src/utils/storage.cc index 4f5fc67c..54d14761 100644 --- a/src/utils/storage.cc +++ b/src/utils/storage.cc @@ -31,8 +31,7 @@ // --%: Gabriel Dos Reis. -#include <open-axiom/config> - +#include <open-axiom/storage> #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif @@ -55,8 +54,6 @@ #include <errno.h> #include <stdlib.h> #include <string.h> -#include <new> // for placement new. -#include <open-axiom/storage> namespace OpenAxiom { // ---------------- @@ -111,7 +108,7 @@ namespace OpenAxiom { Pointer os_acquire_raw_memory(size_t nbytes) { Pointer p = os_allocate_read_write_raw_memory(nbytes); - if (p == 0) + if (p == nullptr) throw SystemError("cannot acquire more memory"); return memset(p, nbytes, 0); } @@ -206,8 +203,8 @@ namespace OpenAxiom { TwoWayLinkHeader* h = acquire_storage_with_header<TwoWayLinkHeader>(overhead + n); h->start = byte_address (h) + overhead; - h->previous = 0; - h->next = 0; + h->previous = nullptr; + h->next = nullptr; return h; } @@ -232,7 +229,7 @@ namespace OpenAxiom { h->available = byte_address(h) + overhead; // That is also where the actual object storage starts. h->start = h->available; - h->previous = 0; + h->previous = nullptr; return h; } @@ -293,14 +290,22 @@ namespace OpenAxiom { #endif // OPENAXIOM_MS_WINDOWS_HOST } + FileMapping::FileMapping(FileMapping&& f) + : start(f.start), extent(f.extent) { + f.start = nullptr; + f.extent = 0; + } + FileMapping::~FileMapping() { + if (start != nullptr) { #if defined(OPENAXIOM_MS_WINDOWS_HOST) - UnmapViewOfFile(start); + UnmapViewOfFile(start); #elif defined(HAVE_SYS_MMAN_H) - munmap(start, extent); + munmap(start, extent); #else # error "Don't know how to unmap a file on this platform" -#endif +#endif + } } } } |