Official D Grammar
Johannes Pfau
nospam at example.com
Fri Jul 19 14:31:49 PDT 2013
Am Fri, 19 Jul 2013 22:49:25 +0200
schrieb "Brian Schott" <briancschott at gmail.com>:
> Status update:
>
> My parser is at a point where it can parse all of phobos (well,
> excluding c-style array declarations, which I'm convinced are
> broken and should be removed from the language).
>
> I've been updating the grammar definition as I worked on the
> parser. An HTML version is available for download here:
> https://raw.github.com/Hackerpilot/DGrammar/master/grammar.html
>
> Lexer, parser, and AST code is available here:
> https://github.com/Hackerpilot/Dscanner/tree/range-based-lexer/std/d.
> Bug reports and pull requests are welcome.
Nice work!
I guess you already tried druntime but did you also run your lexer and
or parser against the dmd test suite? The test suite probably has quite
some old legacy stuff like c-style array declarations so it might be a
pita to run those tests but it might show some real problems as well.
If you wanted to do more testing you could also run it on some
well-maintained big D projects (GTKd, derelict3, ...)
http://wiki.dlang.org/Libraries_and_Frameworks
http://wiki.dlang.org/Open_Source_Projects
It's also nice that we may finally get a correct and complete grammar.
BTW: I think it might be a good idea to start a new thread for this
update. This stuff is quite important for D/phobos and usually old
threads tend to be ignored or get less attention.
More information about the Digitalmars-d
mailing list