[Top][All Lists]

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

Re: Push parsing for java...

From: Dennis Heimbigner
Subject: Re: Push parsing for java...
Date: Sun, 23 Sep 2012 13:01:00 -0600
User-agent: Thunderbird (Windows/20100228)

Did you work against a tarball version of Bison, or against
the git repository?
The tarball.

Note that I have extensively modified to remove the extraneous
m4 escaping. I think the result is
a much cleaner and more readable skeleton.
But your mileage may vary.

This is an unfortunate choice, as we used to be less quoted,
but it was decided to play it safe and consistent, and to
use quotation where we do not want macros to fire unexpectedly.

I think you are making a serious mistake in adding extraneous escapes.
As far as I can tell, there are only three things that need to be
handled with extra escaping and they all have simple solutions.

1. Array references (e.g. x[y]); this is easily handled where they occur
   by using extra escaping.
2. Commas in macro arguments; again a single level of escaping works fine.
3. Occurrences of e.g. $1 in test case .y files. This only occurs
   in test cases (e.g. java.m4). This is more easily handled with
   single escaping plus converting $1 => $[]1.

WRT #3, it seems to me that your tests cases like java.m4 are way too 
because of the way you chose to deal with embedded $1.  I may be missing 
but using $[]1 and single level escaping seems to work fine (see javapush.m4)
and is way less complicated.

I assume there must have been some specific situation that drove you to
adding the extra escapes. Can you describe that use case?

=Dennis Heimbigner

reply via email to

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