Re: Lex state table format

"Quinn Tyler Jackson" <>
29 Sep 1998 15:36:28 -0400

          From comp.compilers

Related articles
Lex state table format (Brad Fish) (1998-09-22)
Re: Lex state table format (1998-09-26)
Re: Lex state table format (Quinn Tyler Jackson) (1998-09-29)
| List of all articles for this month |

From: "Quinn Tyler Jackson" <>
Newsgroups: comp.compilers
Date: 29 Sep 1998 15:36:28 -0400
Organization: Compilers Central
Keywords: lex

>Can anyone give me a quick rundown on the Lex state table
>format? I'm looking to create my own scanner generator.
>I understand how Lex translates its input into a series of
>states, but what's the best way to storethose states?

I don't know about "best" -- but I wrote a fairly easy to follow FSA
table generator that generates a table that scans LPM clauses. The
FSA generator itself is available at:

The table it produces can be found in the file lpm_tbl.cpp, in the

the scan done using the table is found in the lpm_cm.cpp file in the
same archive.

Again, it's not the slickest thing in the world, but it is fairly easy
to follow. It produces a two dimensional state/shift type array which
has served me well enough.

Quinn Tyler Jackson


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.