|Converting regex to DFA - rule diagram email@example.com (1998-08-19)|
|Re: Converting regex to DFA - rule diagram firstname.lastname@example.org (Torben Mogensen) (1998-08-20)|
|From:||Torben Mogensen <email@example.com>|
|Date:||20 Aug 1998 13:55:31 -0400|
Peter Friend wrote:
> I am working on building a regex compiler, and I am using the rules
> from the "Dragon Book" to convert the parsed regex to a DFA. To help
> with this, I have copied the diagram from page 138 and expanded it a
> bit to include lastpos and followpos. I am still working on the
> followpos entry for the '?' operator.
There should be no entry. You can think of e? as a | \epsilon. From
this you can derive that firstpos of e? is firstpos of e and there
should be no followpos rule (as there are none for | or \epsilon).
BTW, you need to replace all references to firstpos(e_1) and
firstpos(e_2) in the lastpos column by lastpos(e_1) and lastpos(e_2).
Torben Mogensen (firstname.lastname@example.org)
Return to the
Search the comp.compilers archives again.