|Scanner generator design hints desired firstname.lastname@example.org (1994-02-16)|
|Scanner generator design hints desired email@example.com (James Kanze) (1994-02-17)|
|Re: Scanner generator design hints desired firstname.lastname@example.org (1994-04-17)|
|From:||email@example.com (Peter Bumbulis)|
|Organization:||University of Waterloo|
|Date:||Sun, 17 Apr 1994 15:03:17 GMT|
> Hello!! I'm working on a project to develop a scanner generator and was
> wondering if anyone could suggest a good data structure to hold the state
> table generated. A simple 2 dim array is not what I want.
On most systems executable code seems to give about twice the performance
of the best table driven strategy with little or no increase in size. (It
also has the added benefit of a more flexible runtime architecture.) If
your compiler generates decent code for switches (unfortunately there are
relatively few of these) then implementation is straight forward as well.
The trick to doing this is to check for buffer overflow directly (rather
than using the sentinel method). More details (and an implementation) can
be found in
and in an upcoming LOPLAS article ``RE2C -- A More Versatile Scanner
Generator'' (included in the above.)
Return to the
Search the comp.compilers archives again.