bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch for many C- and M4-related quoting problems in Bison


From: Paul Eggert
Subject: Re: patch for many C- and M4-related quoting problems in Bison
Date: Tue, 12 Nov 2002 11:04:29 -0800 (PST)

> From: Akim Demaille <address@hidden>
> Date: 12 Nov 2002 10:45:38 +0100
> 
> |     * data/c.m4 (b4_copyright): Omit file name from comment, since
> |     the file name could contain "*/".
> 
> Do you really think this can happen?

Yes, it can.  I use Bison with "*/foo.y", which is a valid Unix file
name, and the old Bison generated a C file that could not be compiled.

I was too lazy to put in a test case for this.  If one of us has the
energy to do it, we could also add test cases for file names
containing @,$"'[]() space newline // /* etc.  Bison should be able to
handle any Unix file name.

> Do you really think Bison is more useful without this micro-feature
> (grammar file name) than with?

But the input file name is already present in the output, in the form
of #line directives, so there's not much extra utility to also putting
the input file name in a comment.  The #line directives are properly
escaped, so they should be OK.

I did toy with the idea of escaping */ as *//* in that context, but it
was extra work and I didn't get around to it.  I figured that fixing
the bug was enough for now.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]