lexer/parser library for D
John Colvin
john.loughran.colvin at gmail.com
Sun Dec 29 11:56:47 PST 2013
On Sunday, 29 December 2013 at 19:25:46 UTC, Jonathan wrote:
> Are there any good lexer and parser libraries (like flex/bison)
> for D? If not, how much work would be involved in using flex
> and bison and wrapping it to D? How straightforward is it to
> pass a struct from C to D (the documentation
> http://dlang.org/struct.html just says that D structs go
> directly to C -- the other way holds too if the C side is
> written in a certain way, but gives no examples of what is
> needed on both sides)?
A POD struct in D is interchangeable with C structs, both ways.
You just have to make the declaration of the struct in both
languages.
Lexers/Parsers:
https://github.com/PhilippeSigaud/Pegged and
https://github.com/Hackerpilot/Dscanner
More information about the Digitalmars-d-learn
mailing list