Compile Time D Expression Parser?

d coder dlang.coder at gmail.com
Sun Mar 11 10:54:32 PDT 2012


Hello  Philippe

> OK, doing a bit of thread necromancy here (3 weeks, still acceptable here?)
>
You are more than welcome. I am still working on the stuff.


> Puneet, I might have something for you. IIUC, you want to parse
> expressions that are
>
> - an association of boolean expressions (&&, ||, !)
> - each boolean expression is an equation (=, <=, >, etc)
> - each equation lhs or rhs is an arithmetic expression (+, -, *, /)
> - atoms in an arithmetic expression can be numbers or variables
>
> Is that it?
>
That would be sufficient for a start. But later I would also like to parse
simple D style if-else conditionals and foreach loops.


> You do realize that any parse tree will for these constructs will be quite
> deep, right? I mean, 10-levels deep or somesuch.
>
10 levels would be good enough.

Regards
- Puneet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120311/1a91c997/attachment.html>


More information about the Digitalmars-d mailing list