* src/parse/asm-parse.yy.gen.py: Generate a `%defines' statement,
as requested by Bison.
---
ChangeLog | 7 +++++++
src/parse/asm-parse.yy.gen.py | 3 ++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ca9dfda..700eb94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-10-18 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Fix the generation of the parser.
+
+ * src/parse/asm-parse.yy.gen.py: Generate a `%defines' statement,
+ as requested by Bison.
+
2012-05-23 Roland Levillain <roland(a)lrde.epita.fr>
Do not use locale in misc::escape.
diff --git a/src/parse/asm-parse.yy.gen.py b/src/parse/asm-parse.yy.gen.py
index 46ec6e3..c85c33e 100755
--- a/src/parse/asm-parse.yy.gen.py
+++ b/src/parse/asm-parse.yy.gen.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
##
## This file is part of Nolimips, a MIPS simulator with unlimited registers
-## Copyright (C) 2003, 2004, 2006 Benoit Perrot <benoit(a)lrde.epita.fr>
+## Copyright (C) 2003, 2004, 2006, 2012 Benoit Perrot <benoit(a)lrde.epita.fr>
##
## Nolimips is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -58,6 +58,7 @@ using namespace inst;
%require "2.1a"
%skeleton "lalr1.cc"
%error-verbose
+%defines
%debug
%locations
--
1.7.2.5
Import from Vaucanson.
* build-aux/bin/bison++.in: No longer "cd", this produces
more accurate error message locations, which is nice when
compiling under Emacs.
* build-aux/bin/move-if-change: Beware that colordiff
might now hang on stdin.
Signed-off-by: Roland Levillain <roland(a)lrde.epita.fr>
---
ChangeLog | 12 ++++
build-aux/bin/bison++.in | 151 +++++++++++++++++++++---------------------
build-aux/bin/move-if-change | 2 +-
3 files changed, 88 insertions(+), 77 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index cd95139..63e9de1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2012-10-17 Akim Demaille <akim(a)lrde.epita.fr>
+
+ build-aux: update tools
+
+ Import from Vaucanson.
+
+ * build-aux/bin/bison++.in: No longer "cd", this produces
+ more accurate error message locations, which is nice when
+ compiling under Emacs.
+ * build-aux/bin/move-if-change: Beware that colordiff
+ might now hang on stdin.
+
2012-02-22 Roland Levillain <roland(a)lrde.epita.fr>
Distribute build-aux/bin/fuse-switch.
diff --git a/build-aux/bin/bison++.in b/build-aux/bin/bison++.in
index a22c7d2..733750b 100755
--- a/build-aux/bin/bison++.in
+++ b/build-aux/bin/bison++.in
@@ -1,13 +1,8 @@
#! /bin/sh
-# Exit status.
-status=0
-
# Any tool failure is a failure of the script.
set -e
-: ${BISON='@BISON@'}
-
stderr ()
{
local i
@@ -46,11 +41,6 @@ EOF
exit 0
}
-me=$(basename $0)
-fuse_switch='@abs_srcdir@/fuse-switch'
-move_if_change='@abs_srcdir@/move-if-change --color'
-verbose=false
-
## ---------------------- ##
## Command line parsing. ##
## ---------------------- ##
@@ -88,53 +78,10 @@ get_options ()
bisonflags="$@"
}
-
-## ------ ##
-## Main. ##
-## ------ ##
-
-get_options "$@"
-
-input_base=$(basename "$input")
-input_dir=$(dirname "$input")
-
-output_base=$(basename "$output")
-output_base_noext=$(echo "$output_base" | sed -e 's/\.[^.]*//')
-output_dir=$(dirname "$output")
-
-: ${location_dir=$output_dir}
-
-# The namespace we are in.
-# FIXME: We need $srcdir to be able to compute it.
-namespace=parse
-
-if $BISON --xml --version >/dev/null 2>&1; then
- bisonflags="$bisonflags --xml"
-fi
-
-# Alexandre Duret-Lutz also notes that in VPATH-builds $(srcdir) can
-# be an absolute path depending on how ./configure is called ...
-# In that case
-
-# bison $(srcdir)/parsetiger.yy [...]
-
-# will hard code the path in the maintainer's tree. Hence, do not use
-# paths with Bison, chdir there.
-
-# A tmp dir.
-tmp=$output_base_noext.dir
-rm -rf $tmp
-mkdir $tmp
-
-# Compile in this dir.
-# Don't use `ln -s' as its semantics of paths sucks.
-cp $input $tmp
-cd $tmp
-set +e
-$BISON $bisonflags $input_base -o $output_base
-status=$?
-set -e
-
+noext ()
+{
+ echo "$1" | sed -e 's/\.[^.]*$//'
+}
# fix_bison_output FILE
# ---------------------
@@ -142,26 +89,34 @@ set -e
fix_bison_output ()
{
local file="$1"
- local base
- base=$(basename "$file")
- local base_noext
- base_noext=$(echo "$file" | sed -e 's/\..*//')
- perl -pi -e "
-# Fix doxygen tags.
-s|\Q\\file $base\E\b|\\\\file $namespace/$base|g;
-
-# Fix sync lines for composite paths.
-s|(^#line.*)$base_noext|\$1$input_dir/$base_noext|g
- if '$input_dir' ne '$output_dir';
+ perl -pi \
+ -e "
+BEGIN
+{
+ \$location_prefix = '$location_prefix';
+ \$namespace = '$namespace';
+ \$output_dir = '$output_dir';
+ \$tmp = '$tmp';
+}" \
+ -e '
+BEGIN
+{
+ ($TMP = uc $tmp) =~ s/[^A-Z0-9]+/_/g;
+ ($OUTPUT_DIR = uc $output_dir) =~ s/[^A-Z0-9]+/_/g;
+}
+
+# We compiled in a tmp directory, remove references to it.
+s{$tmp/}{$output_dir/}g;
+s{$TMP}{$OUTPUT_DIR}g;
# In case position.hh and location.hh were moved.
s{include \"(position.hh|location.hh)\"}
{include <$location_prefix\$1>}g
- if '$location_prefix' ne '';
+ if $location_prefix ne "";
# Kill trailing blanks.
-s/[ \t]+\$//;
-" "$1"
+s/[ \t]+$//;
+' "$file"
# Fuse the switches of the parser.
case $file in
@@ -221,7 +176,7 @@ out ()
esac
}
-# out FILE
+# tmp FILE
# --------
# Return path name of FILE in the tmp directory.
tmp ()
@@ -243,13 +198,57 @@ install ()
$move_if_change "$(tmp "$1")" "$dest"
}
-# Go back to where we were and use relative paths instead of using
-# absolute file names. The messages look nicer.
-cd ..
+## ------ ##
+## Main. ##
+## ------ ##
+
+# Exit status.
+status=0
+
+: ${BISON='@BISON@'}
+
+me=$(basename $0)
+fuse_switch='@abs_srcdir@/fuse-switch'
+move_if_change='@abs_srcdir@/move-if-change --color'
+verbose=false
+
+get_options "$@"
+
+input_base=$(basename "$input")
+input_dir=$(dirname "$input")
+
+output_noext=$(noext "$output")
+output_base=$(basename "$output")
+output_base_noext=$(noext "$output_base")
+output_dir=$(dirname "$output")
+
+: ${location_dir=$output_dir}
+
+# The namespace we are in.
+# FIXME: We need $srcdir to be able to compute it.
+namespace=parse
+
+if $BISON --xml --version >/dev/null 2>&1; then
+ bisonflags="$bisonflags --xml"
+fi
+
+# A tmp dir.
+tmp=$output_noext.dir
+rm -rf $tmp
+mkdir -p $tmp
+
+# Compile in this dir.
+# Don't use `ln -s' as its semantics of paths sucks.
+set +e
+$BISON $bisonflags $input -o $tmp/$output_base
+status=$?
+set -e
+
for file in $tmp/*
do
+ test $file != "$tmp/*" ||
+ fatal "did not find any file in $tmp"
base=$(basename $file)
- base_noext=$(echo "$base" | sed -e 's/\.[^.]*//')
case $status:$base in
(*:$input_base)
# Leave it here.
diff --git a/build-aux/bin/move-if-change b/build-aux/bin/move-if-change
index 985fbb8..509801a 100755
--- a/build-aux/bin/move-if-change
+++ b/build-aux/bin/move-if-change
@@ -32,7 +32,7 @@ do
(-c|--color)
# The Emacs shell and compilation-mode are really bad at
# displaying colors.
- if (colordiff --version) >/dev/null 2>&1 \
+ if (colordiff /dev/null /dev/null) >/dev/null 2>&1 \
&& test -z "$INSIDE_EMACS"; then
diff=colordiff
fi
--
1.7.2.5
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Nolimips, a MIPS simulator with infinitely many registers".
The branch master has been updated
via 0703bb7c2526372c01f09e92709c768a961a51b6 (commit)
from 9c67b2b7ce8c81850145adb0bb1065e9556b210a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
0703bb7 Do not use locale in misc::escape.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
src/misc/escape.hh | 24 +++++++++++++++++++-----
2 files changed, 26 insertions(+), 5 deletions(-)
hooks/post-receive
--
Nolimips, a MIPS simulator with infinitely many registers
* src/misc/escape.hh (operator<<(std::ostream&, const escape&)):
Here.
---
ChangeLog | 7 +++++++
src/misc/escape.hh | 24 +++++++++++++++++++-----
2 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 448a49f..ca9dfda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-05-23 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Do not use locale in misc::escape.
+
+ * src/misc/escape.hh (operator<<(std::ostream&, const escape&)):
+ Here.
+
2012-05-22 Roland Levillain <roland(a)lrde.epita.fr>
Fix the handling of `.half' assembler directives.
diff --git a/src/misc/escape.hh b/src/misc/escape.hh
index cfa61f2..5ca2ffb 100644
--- a/src/misc/escape.hh
+++ b/src/misc/escape.hh
@@ -1,7 +1,7 @@
//
// escape.hh: escaping special characters for output
-// Copyright (C) 2003, 2004 Akim Demaille <akim(a)epita.fr> and
-// Benoit Perrot <benoit(a)lrde.epita.fr>
+// Copyright (C) 2003, 2004, 2012 Akim Demaille <akim(a)epita.fr> and
+// Benoit Perrot <benoit(a)lrde.epita.fr>
//
// This is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -24,7 +24,6 @@
# include <iostream>
# include <string>
# include <cctype>
-# include <locale>
class escape
{
@@ -39,7 +38,22 @@ public:
inline std::ostream&
operator<<(std::ostream& o, const escape& e)
{
- static std::locale locale ("");
+ /* For some reason, when we use std::locale on Mac OS X, the
+ following exception may be thrown:
+
+ terminate called after throwing an instance of 'std::runtime_error'
+ what(): locale::facet::_S_create_c_locale name not valid
+
+ A workaround is to unset the environment variable `LANG' prior to
+ using std::locale, but this is cumbersome.
+
+ So we use the C locale-agnostic version of isprint() from header
+ `cctype', instead of C++ isprint() from header `locale' taking a
+ locale as second argument.
+
+ See also
+ http://stackoverflow.com/questions/1745045/stdlocale-breakage-on-macos-10-6…
+ on this topic. */
std::ios_base::fmtflags flags = o.flags (std::ios_base::hex);
for (std::string::const_iterator p = e.s_.begin (); p != e.s_.end (); ++p)
switch (*p)
@@ -54,7 +68,7 @@ operator<<(std::ostream& o, const escape& e)
case '\\': o << "\\\\"; break;
case '\"': o << "\\\""; break;
default:
- if (std::isprint (*p, locale))
+ if (std::isprint (*p))
o << *p;
else
o << "\\x"
--
1.7.2.5
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Nolimips, a MIPS simulator with infinitely many registers".
The branch master has been updated
via 9c67b2b7ce8c81850145adb0bb1065e9556b210a (commit)
via 4a1885dc570285912eba128dde6403c67dd80424 (commit)
via 990adfef6501e7ffd92dae4a915b142932db9268 (commit)
from b1ba162c37f097ab33e1421ed5fd69155ccf9a3e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
9c67b2b Fix the handling of `.half' assembler directives.
4a1885d Fix the comparison of produced and expected tests outputs.
990adfe Get rid of mutable references, rejected by g++ since version 4.6.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 30 ++++++++++++++++++++++++++++++
src/inst/program_builder.hxx | 4 ++--
src/task/boolean_task.hh | 6 +++---
src/task/int_task.hh | 6 +++---
tests/good/Makefile.am | 3 ++-
tests/good/print-half.ref | 1 +
tests/good/print-half.s | 22 ++++++++++++++++++++++
tests/nolimips-check | 4 ++--
8 files changed, 65 insertions(+), 11 deletions(-)
create mode 100644 tests/good/print-half.ref
create mode 100644 tests/good/print-half.s
hooks/post-receive
--
Nolimips, a MIPS simulator with infinitely many registers
* tests/nolimips-check: Look for reference outputs in the source
directory, not the build directory.
Use the unified diff format.
---
ChangeLog | 8 ++++++++
tests/nolimips-check | 4 ++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 80e75ca..2c122cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-05-22 Roland Levillain <roland(a)lrde.epita.fr>
+ Fix the comparison of produced and expected tests outputs.
+
+ * tests/nolimips-check: Look for reference outputs in the source
+ directory, not the build directory.
+ Use the unified diff format.
+
+2012-05-22 Roland Levillain <roland(a)lrde.epita.fr>
+
Get rid of mutable references, rejected by g++ since version 4.6.
* src/task/boolean_task.hh (task::BooleanTask::flag_)
diff --git a/tests/nolimips-check b/tests/nolimips-check
index e20c2fb..24a0e71 100755
--- a/tests/nolimips-check
+++ b/tests/nolimips-check
@@ -24,7 +24,7 @@ SRCDIR=$top_srcdir/tests/$MODULE
for STDASM in $SRCDIR/*.s; do
ASM=`basename $STDASM`
- STDREF=$BUILDDIR/`echo $ASM | sed 's/\.s$/\.ref/g'`
+ STDREF=$SRCDIR/`echo $ASM | sed 's/\.s$/\.ref/g'`
STDOUT=$BUILDDIR/`echo $ASM | sed 's/\.s$/\.out/g'`
STDIN=$SRCDIR/`echo $ASM | sed 's/\.s$/\.in/g'`
if test ! -f $STDIN; then
@@ -39,7 +39,7 @@ for STDASM in $SRCDIR/*.s; do
fail
else
if test -f $STDREF; then
- diff $STDOUT $STDREF
+ diff -u $STDOUT $STDREF
if test $? -ne 0; then
fail
fi
--
1.7.2.5
* src/task/boolean_task.hh (task::BooleanTask::flag_)
* src/task/int_task.hh (task::IntTask::var_):
Here.
Reported by Theophile Ranquet <theophile.ranquet(a)epita.fr>.
---
ChangeLog | 9 +++++++++
src/task/boolean_task.hh | 6 +++---
src/task/int_task.hh | 6 +++---
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 305b7a8..80e75ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-05-22 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Get rid of mutable references, rejected by g++ since version 4.6.
+
+ * src/task/boolean_task.hh (task::BooleanTask::flag_)
+ * src/task/int_task.hh (task::IntTask::var_):
+ Here.
+ Reported by Theophile Ranquet <theophile.ranquet(a)epita.fr>.
+
2012-03-19 Roland Levillain <roland(a)lrde.epita.fr>
Update the address of the FSF in the text of the GNU FDL.
diff --git a/src/task/boolean_task.hh b/src/task/boolean_task.hh
index b86d0db..1afcfe8 100644
--- a/src/task/boolean_task.hh
+++ b/src/task/boolean_task.hh
@@ -1,7 +1,7 @@
//
// This file is part of Nolimips, a MIPS simulator with unlimited registers
-// Copyright (C) 2004, 2006 Akim Demaille <akim(a)epita.fr> and
-// Benoit Perrot <benoit(a)lrde.epita.fr>
+// Copyright (C) 2004, 2006, 2012 Akim Demaille <akim(a)epita.fr> and
+// Benoit Perrot <benoit(a)lrde.epita.fr>
//
// Nolimips is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ namespace task
virtual void execute() const;
private:
- mutable bool &flag_;
+ bool &flag_;
};
} // namespace task
diff --git a/src/task/int_task.hh b/src/task/int_task.hh
index 98e81ae..b8b6506 100644
--- a/src/task/int_task.hh
+++ b/src/task/int_task.hh
@@ -1,7 +1,7 @@
//
// This file is part of Nolimips, a MIPS simulator with unlimited registers
-// Copyright (C) 2004, 2006 Akim Demaille <akim(a)epita.fr> and
-// Benoit Perrot <benoit(a)lrde.epita.fr>
+// Copyright (C) 2004, 2006, 2012 Akim Demaille <akim(a)epita.fr> and
+// Benoit Perrot <benoit(a)lrde.epita.fr>
//
// Nolimips is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ namespace task
private:
mutable int value_;
- mutable int &var_;
+ int &var_;
int min_;
int max_;
};
--
1.7.2.5
* doc/fdl.texi: Here.
---
ChangeLog | 6 ++++++
doc/fdl.texi | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 01a8343..305b7a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2012-03-19 Roland Levillain <roland(a)lrde.epita.fr>
+ Update the address of the FSF in the text of the GNU FDL.
+
+ * doc/fdl.texi: Here.
+
+2012-03-19 Roland Levillain <roland(a)lrde.epita.fr>
+
Update the text of the project's license (GPL v2).
* COPYING: Here, using
diff --git a/doc/fdl.texi b/doc/fdl.texi
index f771fee..81a23e9 100644
--- a/doc/fdl.texi
+++ b/doc/fdl.texi
@@ -15,7 +15,7 @@
@display
Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
+51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
--
1.7.2.5