if you look at the bison/flex, they both use switch/case - the parsers I use, both generate code like this, however they ended up using variable functions, as even the overhead of the function calls is faster than the large switch/case called repeatidly.. (this is ideally what dynamic goto's could replace)

re2c uses goto's with static addresses. - I doubt though it would be easy to modify the parser generators I have to do this..

No idea how lemon works?..

The other alternative would be to do some apc optimization on switch/case with integers...

Regards
Alan




Hartmut Holzgraefe wrote:

Alan Knowles wrote:


- compile time hooking (no dynamic goto targets)


That kind of makes them useless for writing parsers, which was one of the justifications of them.


How that? C doesn't have dynamic goto targets either
but still its used for parsing lot ...


-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to