help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC] parser states/stack


From: Axel Kittenberger
Subject: [RFC] parser states/stack
Date: Wed, 10 Jan 2001 11:05:16 +0100 (MET)

Hi,

Lastly I've tried to get a track of the bison algorithmn that is outputed.
Well it ain't to easy for me to understand :-)

However one question, Bison emmits a finite state machine.

Wouldn't it maybe produce a little faster code, when it would generate a 
seperate code section (or even function) for each state?

I donnot know if it would produce a better parser or if it is possible in
any kind with the current algorithmn. I've read some time ago that modern
parsers/interpreters use the natural calling stack instead of a seperate one.

Theoretically it could then emmit sperate code section for each possible
state, and only have to switch from there to all possible state which could
be produced by this (calling a sub function?)

Well really I've no idea if this in fact is faster, but it would break any
programmed stack limits (except of course the natural calling stack is also
limited somewhere), and second, func-calling / natural stack / and argument
handling is today most optimized by the compilers and processors.

(((Here is who has whispered these thoughts
http://www.etek.chalmers.se/~e8johan/altindex.html
)))

- Axel

-- 
Sent through GMX FreeMail - http://www.gmx.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]