Complete D grammar
Rainer Schuetze
r.sagitario at gmx.de
Tue Mar 29 23:40:18 PDT 2011
Trass3r wrote:
> Rainer Schuetze Wrote:
>> I've set up a comparison with some notes here:
>>
>> http://www.dsource.org/projects/visuald/wiki/GrammarComparison
>
> Very nice comparison style.
> What would be an appropriate way to discuss grammar changes?
> I think many things should be simplified/clarified.
I'd welcome this. I see a few options, but none is currently perfect:
- in a wiki. both dsource and wiki4d don't seem to have discussion
pages, though. I'm not sure the comparison tables can be converted to
something maintainable - it's currently very verbose html.
- here on the newsgroup. this would probably have the widest audience,
but also might easily get lost. maybe with keeping track of
ideas/results in wiki4d.
- in bugzilla. this might get spread into multiple entries causing loss
of the overview of the overall grammar.
>
> For example, isn't AutoDeclaration already covered by Decl -> StorageClasses Decl and so on?
> Also there are 3 different instances of mixin: MixinExpression, MixinStatement and MixinDeclaration. Even though they all come down to the same thing.
> Modifiers like shared are repeated, e.g. in BasicType, Attribute, TypeSpecialization. Also your proposed TypeWithModifier somewhat replicates parts of BasicType (just without the parentheses)
I think, the different mixin variants are ok, because you might want to
generate different AST for these. But the confusion of
const/shared/immutable etc in Attribute,StorageClass,Types,etc causes a
lot of headaches.
More information about the Digitalmars-d
mailing list