why scope(success)?

pragma pragma_member at pathlink.com
Tue May 9 16:45:01 PDT 2006


In article <e3qvhn$q3v$1 at digitaldaemon.com>, Ben Hinkle says...
>
>>
>> I'm considering using it for some code generation technqiues (parsers 
>> mostly).
>>
>> Being able to declare what happens at the tail-end of a scope *first*, 
>> rather
>> than last, means that you have to maintain less state (across nested 
>> scopes) in
>> your code generator.
>>
>> - EricAnderton at yahoo
>
>Ok. That sounds like an interesting application. If it comes on line 
>sometime soon let me know. 
>

Sure.  Although the use of scope() here is really just theoretical at this
point...  I have something that digests EBNF (w/some annotations) to build a
self-hosting parser frontend, but it makes heavy use of exceptions and anon
delegates.  I'm pretty sure that I can make some of the pass/fail semantics of
the various parse expressions more straightforward (almost as much as goto) by
way of scope(), but I haven't tried it yet.

// I'll let y'all know what's up when I get there, regardless. :)

- EricAnderton at yahoo



More information about the Digitalmars-d mailing list