Let's stop parser Hell
Timon Gehr
timon.gehr at gmx.ch
Sat Jul 7 13:38:16 PDT 2012
On 07/07/2012 10:26 PM, Timon Gehr wrote:
> On 07/07/2012 08:55 PM, Chad J wrote:
>> ...
>>
>> The specifics will easily change.
>
> I'd suggest:
>
> AstOp!`
> Lower
> while ( boolExpr )
> {
> statements;
> }
>
> Into
> loopAgain:
> if ( !boolExpr ) {
> statements;
> } else goto exitLoop
> goto loopAgain
> exitLoop:
>
> `.run(syntaxNode);
>
Also, I'd like to point out that the transformation is not actually
valid, because there are break/continue.
More information about the Digitalmars-d
mailing list