m4-patches
[Top][All Lists]
Advanced

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

Re: branch-1_4 off-by-one in line reporting


From: Gary V. Vaughan
Subject: Re: branch-1_4 off-by-one in line reporting
Date: Tue, 17 Oct 2006 23:28:25 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Eric,

On 17 Oct 2006, at 17:47, Eric Blake wrote:
Gary V. Vaughan <gary <at> gnu.org> writes:
On 12 Oct 2006, at 16:13, Eric Blake wrote:
I still want CVS head to follow Solaris' parsing precedence
rules (macros, then quotes, then comments), rather than the current
behavior (comments, macros, quotes).

Can you remind me why that is?

Hmm, in Solaris, when the prefix was ambiguous between quote and comment, it always chose quote when given a chance, even when quote was the shorter prefix. In GNU, on the other hand, the comment was always recognized first. If either implementation were a strictly greedy parser, then you would expect the longer start token to be recognized in preference to the shorter one.

Although it makes perfect sense the way it is (on Solaris) considering
that POSIX documents that a matched quote token should be taken in
preference to a not yet matched comment token.

If anything, the reason I am proposing delaying
the recognition of comments until after macro names and quote starts have been recognized is to match historical behavior, and so that GNU M4 parsing at least
follows the order that the three token types are mentioned in POSIX.

Thanks for the nice explanation.  Yes, I definitely agree with
you now; can you add it to the TODO list, please?

Cheers,
        Gary
- --
Gary V. Vaughan      ())_.  address@hidden
Research Scientist   ( '/   http://blog.azazil.net
GNU Hacker           / )=   http://www.gnu.org/software/{libtool,m4}
Technical Author   `(_~)_   http://sources.redhat.com/autobook




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFNa1tFRMICSmD1gYRAlWIAJ4w0JLovvM2bvMH8OZZ9jRvuHuJnQCgyB74
x8EvqYSfuuDL+bLvGejZAts=
=ffPz
-----END PGP SIGNATURE-----




reply via email to

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