help-bison
[Top][All Lists]
Advanced

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

Re: #line format


From: Akim Demaille
Subject: Re: #line format
Date: 11 Apr 2002 12:08:20 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

| > My problem with
| > 
| >         #line 45 "foo.c"
| > 
| > is that the name of the file is coded inside, which is very painful
| > when you mv the file.
| 
| Sorry, I'm a bit lost.  Why do you want the file to refer to itself?
| 
| Can't you solve the problem by having the #line directive refer
| instead to some template file like bison.simple, in a well-known
| location?  That's what Bison 1.35 does.

Does it?  I thought it was already changed!

This approach has several problems, all related to the fact that
bison.simple is independent from the parser file:

- it may not exist
- it may not be at the same location
- it may belong to a different version of Bison (worst case IMO).

I, for one, have always had problems with this `feature'.  Flex does
what 1.5x does, and in practice, it is much more convenient.  In
particular because you may have errors due to yourself which trigger
problems in the bison.simple section.  A bad YYSTYPE is an example.



reply via email to

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