Claudio Saavedra | 12 Feb 01:34
Picon

fprintf and sprintf: to infringe or not to infringe user namespace?

Hi,

In data/yacc.c, there's a simple pseudo-implementation of sprintf (line
695) used for the verbose error recovery mechanism. The motivation to
use it is to avoid infringing in the user namespace.

However, for the implementation of YYDPRINTF, YYFPRINTF and all the
other output macros, <stdio.h> is included and fprintf is used anyway.
So I wonder, is it really worth to maintain that bit of code?

In advance, thanks for clarifying,

Claudio

--

-- 
Claudio Saavedra <csaavedra <at> alumnos.utalca.cl>

Joel E. Denny | 16 Feb 06:15

Re: Difficulty trying to build distribution from CVS sources

On Mon, 21 Jan 2008, Juan Manuel Guerrero wrote:

> At a first glance all steps appeared to work except for the one to build
> the dist target.  That target produces the following output:
> 
>   make: build-aux/git-version-gen: Kommando nicht gefunden   (command not found)
>   INFO: rerunning autoconf for new version string: 
>   cat: .prev-version: Datei oder Verzeichnis nicht gefunden  (file or directory not found)
>   /bin/sh ./config.status --recheck
>   running CONFIG_SHELL=/bin/sh /bin/sh ./configure   --no-create --no-recursion
> [snip]
>   make: build-aux/git-version-gen: Kommando nicht gefunden
>   INFO: rerunning autoconf for new version string: 
>   cat: .prev-version: Datei oder Verzeichnis nicht gefunden
>   /bin/sh ./config.status --recheck
>   running CONFIG_SHELL=/bin/sh /bin/sh ./configure   --no-create --no-recursion
> [snip]
> 
> As can be seen it is a infinite loop.  After inspecting bison/build-aux/ I have
> seen that there is no git-version-gen

Juan, sorry for the very slow response.  I see the same infinite loop you 
do.

Paul, the problem goes away when I check out Bison from 2007-09-21 right 
before your changes to GNUmakefile but not after.  Could you look into 
this?  Thanks.

Joel E. Denny | 17 Feb 01:19

Re: Bison Files and Token Order

On Mon, 21 Jan 2008, Joel E. Denny wrote:

> On Tue, 22 Jan 2008, tim wrote:
> 
> > That looks OK. It used to work (putting token numbers on %left/%right/%
> > nonassoc), but bison has had a number of incompatible changes over past
> > years. 
> 
> Thanks for reporting this.  Yep, Open Group says Yacc requires it, and it 
> looks like Bison has been missing it since 1.50.

I committed this to fix it.

Index: ChangeLog
===================================================================
RCS file: /sources/bison/bison/ChangeLog,v
retrieving revision 1.1767
diff -p -u -r1.1767 ChangeLog
--- ChangeLog	6 Feb 2008 09:57:35 -0000	1.1767
+++ ChangeLog	17 Feb 2008 00:11:18 -0000
@@ -1,3 +1,21 @@
+2008-02-16  Joel E. Denny  <jdenny <at> ces.clemson.edu>
+
+	Accept a token number in a %left, %right, or %nonassoc for POSIX
+	conformance.  Reported by Tim Josling at
+	<http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
+	* NEWS (2.3a+): Mention.
+	* doc/bison.texinfo (Precedence Decl): Describe how literal strings
+	and code numbers are treated by precedence declarations.
+	* src/parse-gram.y (precedence_declaration): Use symbols.prec instead
(Continue reading)

Joel E. Denny | 17 Feb 03:48

Re: Bison Files and Token Order

On Tue, 22 Jan 2008, Tim Josling wrote:

> In my lisp skeleton it is still a problem because some things are still
> not escaped going into m4.

> In my case I apply m4 functions to the actions.
> 
> This means, in my case, that if the actions have embedded commas or
> mismatched parentheses, then the m4 step fails in an ugly way. There may
> be some m4 magic way around this but I haven't been able to find it.
> (please tell me if there is a way around this!).

If you can post a minimal skeleton and grammar file that demonstrates the 
problem, I'll try to find some time to take a look.

> --no-parser option was dropped in 2.3a - this should be mentioned in the
> NEWS file.

> It is mentioned in the NEWS file that TK_EOF can be specified. It gives
> an example where it is 0 (so EOF is zero?). But it is not mentioned in
> the manual anywhere I can find that using a token value of zero has
> these specific implications. The manual just says the token number must
> be an integer, that is: ... -2, -1, 0, +1, +2, ... .

Thanks.  I committed this.

Index: ChangeLog
===================================================================
RCS file: /sources/bison/bison/ChangeLog,v
retrieving revision 1.1768
(Continue reading)

Tim Josling | 17 Feb 08:35
Picon
Favicon

Re: Bison Files and Token Order

On Sat, 2008-02-16 at 21:48 -0500, Joel E. Denny wrote:
> On Tue, 22 Jan 2008, Tim Josling wrote:
> 
> > In my lisp skeleton it is still a problem because some things are still
> > not escaped going into m4.
> 
> > In my case I apply m4 functions to the actions.
> > 
> > This means, in my case, that if the actions have embedded commas or
> > mismatched parentheses, then the m4 step fails in an ugly way. There may
> > be some m4 magic way around this but I haven't been able to find it.
> > (please tell me if there is a way around this!).
> 
> If you can post a minimal skeleton and grammar file that demonstrates the 
> problem, I'll try to find some time to take a look.

Joel,

Thanks for committing the fixes to the other issues I reported. 

Once my lisp parser is a little more battle hardened I will send in a
minimal test case for the escaping, or a patch to do the escaping with a
test case.

Regards.
Tim Josling

Joel E. Denny | 20 Feb 01:21

Re: building from CVS

On Tue, 19 Feb 2008, Bob Rossi wrote:

> I just ran these commands,
>   cvs -d ':pserver:anonymous <at> cvs.savannah.gnu.org:/sources/bison' co bison
>   cd bison/

A work-around is to do this at this point:

  cp data/yacc.c data/push.c

>   ./bootstrap
>   ./configure --prefix=$PWD/../prefix
>   make 
> 
> rm -f zh_TW.gmo && /usr/bin/msgfmt -c --statistics -o zh_TW.gmo zh_TW.po
> 115 translated messages, 22 fuzzy translations, 9 untranslated messages.
> make[2]: Leaving directory `/home/bob/rcs/cvs/bison/trunk/bison/po'
> touch stamp-po
> make[1]: Leaving directory `/home/bob/rcs/cvs/bison/trunk/bison/po'
> Making all in runtime-po
> make[1]: Entering directory `/home/bob/rcs/cvs/bison/trunk/bison/runtime-po'
> make bison-runtime.pot-update
> make[2]: Entering directory `/home/bob/rcs/cvs/bison/trunk/bison/runtime-po'
> make[2]: *** No rule to make target `../data/push.c', needed by `bison-runtime.pot-update'.  Stop.
> make[2]: Leaving directory `/home/bob/rcs/cvs/bison/trunk/bison/runtime-po'
> make[1]: *** [bison-runtime.pot] Error 2
> make[1]: Leaving directory `/home/bob/rcs/cvs/bison/trunk/bison/runtime-po'
> make: *** [all-recursive] Error 1

Obviously this is caused by my recent renaming of push.c to yacc.c, but I 
(Continue reading)

Claudio Saavedra | 20 Feb 01:38
Picon

Re: building from CVS


El mar, 19-02-2008 a las 19:21 -0500, Joel E. Denny escribió:
> 
> Obviously this is caused by my recent renaming of push.c to yacc.c,
> but I don't know what to do to update the translations.  Maybe we just
> have to wait for the translators to get to it?  I know very little
> about translations.

Removing data/push.c from runtime-po/POTFILES.in should help.

Claudio

--

-- 
Claudio Saavedra <csaavedra <at> alumnos.utalca.cl>

Joel E. Denny | 20 Feb 01:54

Re: building from CVS

On Tue, 19 Feb 2008, Claudio Saavedra wrote:

> El mar, 19-02-2008 a las 19:21 -0500, Joel E. Denny escribió:
> > 
> > Obviously this is caused by my recent renaming of push.c to yacc.c,
> > but I don't know what to do to update the translations.  Maybe we just
> > have to wait for the translators to get to it?  I know very little
> > about translations.
> 
> Removing data/push.c from runtime-po/POTFILES.in should help.

Thanks.  It seems I can't use grep correctly this week.

Index: ChangeLog
===================================================================
RCS file: /sources/bison/bison/ChangeLog,v
retrieving revision 1.1771
diff -p -u -r1.1771 ChangeLog
--- ChangeLog	17 Feb 2008 19:55:48 -0000	1.1771
+++ ChangeLog	20 Feb 2008 00:48:36 -0000
@@ -1,3 +1,7 @@
+2008-02-19  Joel E. Denny  <jdenny <at> ces.clemson.edu>
+
+	* runtime-po/POTFILES.in (push.c): Remove.
+
 2008-02-17  Joel E. Denny  <jdenny <at> ces.clemson.edu>

 	* data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
Index: runtime-po/POTFILES.in
===================================================================
(Continue reading)


Gmane