D parsing
Brian Schott
briancschott at gmail.com
Mon Nov 4 23:27:06 PST 2013
On Monday, 4 November 2013 at 13:20:01 UTC, Timothee Cour wrote:
> for lexing there's already dscanner we could use (while we wait
> for perhaps
> a autogenerated lexer);
> so I think priority is on the autogenerated parser (dscanner
> has one but
> hand designed), where it's still unknown what will work well.
Yes, that tool has two properties:
1) It works now. Not Soon(tm). You can download it, compile it,
and use it to dump the AST of your D code in just a minute or two.
2) It wasn't built THE ONE TRUE WAY.
But we should take a step back first. Before we try to implement
a parser for D's grammar, we need to figure out what exactly D's
grammar is.
Seriously. We don't have a real grammar for D. We have the
language spec on dlang.org, but it isn't complete, consistent, or
updated when the language changes. Want examples? I have a
tracker for them here:
http://d.puremagic.com/issues/show_bug.cgi?id=10233
There's also my project here:
https://github.com/Hackerpilot/DGrammar, but it's not official
and I keep finding differences between it and the behavior of DMD.
Why am I the only one who thinks this is a problem?
More information about the Digitalmars-d
mailing list