D1 -> D2

Walter Bright newshound2 at digitalmars.com
Fri Nov 19 20:17:09 PST 2010


Andrew Wiley wrote:
> On Fri, Nov 19, 2010 at 7:14 PM, Walter Bright 
> <newshound2 at digitalmars.com <mailto:newshound2 at digitalmars.com>> wrote:
> 
>     Andrew Wiley wrote:
> 
>         I'm a fan of parsing false version blocks, but it seems like
>         there should be some sort of exception for version blocks for a
>         different version of the language. Could they just be skipped
>         with a warning that an unknown version of the language is in
>         use? It's somewhat hackish, but to me, that seems better than
>         parsing it and giving an error because of syntax changes.
> 
> 
> 
>     How can it skip it without knowing the grammar?
> 
> 
> It's probably too much work for too little gain, but would it be 
> possible to basically just scan for matching braces until the version 
> block ends? If they always come in matching pairs (or at least they 
> *should*), you could scan for them and ignore everything else until you 
> find the end of the block.

It would still have to know about all the new tokens.


More information about the Digitalmars-d mailing list