Parsing with tools.rd: idc.pad

Don nospam at nospam.com
Wed Sep 16 04:07:33 PDT 2009


downs wrote:
> L282: Not related to the parser but still, IMHO, insanely cool.
>     const string Table = `
>               | bool          | int         | string               | float
>       --------+---------------+-------------+----------------------+--------
>       Boolean | b             | b           | b?q{true}p:q{false}p | ø
>       Integer | i != 0        | i           | Format(i)            | i
>       String  | s == q{true}p | atoi(s)     | s                    | atof(s)
>       Float   | ø             | cast(int) f | Format(f)            | f`;
> 
> This table contains a conversion matrix for internal types to basic type. 

That's a very interesting DSL <g>.
Insanely cool, indeed.



More information about the Digitalmars-d mailing list