|
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 canclutter the code. Here, as often in my grammars, I have put togethereverything related to %(lex-|parse-)?param management, but it disrupts thereading of the grammar. What do people prefer? Currently, it reads:I agree that the grammar does tend to become obfuscated when there arelarge passages of other code mixed with it, so maybe the grammar should bekept 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.
0001-param.txt
Description: Text document
0003-parse-support-several-arguments.txt
Description: Text document
0004-style-changes.txt
Description: Text document
0006-param-documentation.txt
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |