Let's stop parser Hell

David Piepgrass qwertie256 at gmail.com
Wed Jul 11 14:55:01 PDT 2012


On Tuesday, 10 July 2012 at 23:49:58 UTC, Timon Gehr wrote:
> On 07/11/2012 01:16 AM, deadalnix wrote:
>> On 09/07/2012 10:14, Christophe Travert wrote:
>>> deadalnix , dans le message (digitalmars.D:171330), a écrit :
>>>> D isn't 100% CFG. But it is close.
>>> What makes D fail to be a CFG?
>> type[something] <= something can be a type or an expression.
>> typeid(somethning) <= same here
>> identifier!(something) <= again
>
> 'something' is context-free:
>
> something ::= type | expression.

I don't see how "type | expression" is context free. The input 
"Foo" could be a type or expression, you can't tell which without 
looking at the context.


More information about the Digitalmars-d mailing list