D port of dmd: Lexer, Parser, AND CodeGenerator fully operational
Zach the Mystic
reachMINUSTHISzachgmail at dot.com
Wed Mar 7 23:34:58 PST 2012
On Thursday, 8 March 2012 at 05:41:46 UTC, dolive wrote:
> Great work !
>
> Ask a few questions :
> Is there documentation? can it parse dmd c source file ? (
> Auto- complete feature of the ide will involve dmd c source
> file ? )
>
> thank's
>
> Dolive
No documentation. Even the API is inconsistent between similar
parsing calls. The only one called from outside originally was
p.parseModule(), and that was after the buffer had been primed
with detectByteOrderMarkandConvertToAscii (still not
implemented), and #!ignoreFirstlineHashbang. Another downside is
that you currently have to prime each buffer you load with
p.nextToken() before calling p.parseXXX() to return what you
want. Most of the parsing calls are made internally by the parser
itself. It's going to take a little more effort to worked out a
reasonable API for it, but I suppose that will also be the ideal
time to document it.
As far as parsing C source files, I think you'll need a C
compiler for that!
More information about the Digitalmars-d-announce
mailing list