bison-patches
[Top][All Lists]
Advanced

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

Re: RFC: %param


From: Akim Demaille
Subject: Re: RFC: %param
Date: Wed, 9 Sep 2009 16:32:26 +0200


Le 7 sept. 2009 à 20:26, Joel E. Denny a écrit :

- I like to keep related things close to each other. But sometimes it can
clutter the code.  Here, as often in my grammars, I have put together
everything related to %(lex-|parse-)?param management, but it disrupts the
reading of the grammar.  What do people prefer?  Currently, it reads:

I agree that the grammar does tend to become obfuscated when there are
large passages of other code mixed with it, so maybe the grammar should be
kept separate.  But I like the way you've kept related blocks of C
together with their union fields.  Whether those should come before or
after the grammar is not clear to me.  You could think of them as
belonging to the tokens, which are traditionally declared before the
grammar even in language standards documents.  On the other hand, in a
fully top-down grammar, it seems logical to declare tokens afterward.
Sorry, I'm not being much help.

I decided to put the definitions before the grammar. Here are the patches as I installed them in master. I still have to write the tests. I'm sorry to attach the patches here, but since some major system upgrade, my tool to send check-in mails is broken.


Attachment: 0001-param.txt
Description: Text document


Attachment: 0003-parse-support-several-arguments.txt
Description: Text document


Attachment: 0004-style-changes.txt
Description: Text document


Attachment: 0006-param-documentation.txt
Description: Text document



reply via email to

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