Official D Grammar
H. S. Teoh
hsteoh at quickfur.ath.cx
Fri Jul 19 13:55:39 PDT 2013
On Fri, Jul 19, 2013 at 10:49:25PM +0200, Brian Schott wrote:
> 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).
Really? Those still exist in Phobos? Shouldn't they be rewritten to the
"native" style?
> 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.
Wonderful! I'll have to look into this sometime. I've been dreaming
about writing a D pretty-printer, and this may be just the thing I need
to get it going. :)
(Well actually, I *wrote* a D pretty-printer, but I only got as far as
lexing, with some token-matching rules for the pretty-printing. Needless
to say, the results were rather underwhelming, since I didn't have an
AST to work with.)
T
--
Written on the window of a clothing store: No shirt, no shoes, no service.
More information about the Digitalmars-d
mailing list