|Regex -> DFA ->? Lex compiler firstname.lastname@example.org (Paul Johnston) (2000-02-05)|
|Re: Regex -> DFA ->? Lex compiler email@example.com (Armel) (2000-02-10)|
|Re: Regex -> DFA ->? Lex compiler firstname.lastname@example.org (Jonathan Barker) (2000-02-10)|
|Re: Regex -> DFA ->? Lex compiler email@example.com (2000-02-10)|
|From:||"Jonathan Barker" <firstname.lastname@example.org>|
|Date:||10 Feb 2000 01:12:54 -0500|
|Organization:||Easynet Group plc|
If your expressions are E1,E2,...,En, construct the expression
e = (E1 #1) | (E2 #2) | ... | (En #n)
where #1,...,#n are unique symbols (not in the input alphabet).
Construct the DFA from this expression. Now any state of your DFA
which has a transition on #k (where k is one of 1,...,n) represents a
state in which a match of Ek has been seen.
You obviously enjoy figuring it out for yourself so I'll leave
out the rest of the details...
Paul Johnston <email@example.com> wrote
> The problem I have now is that I am failing to translate a *set* of
> regular expression into a lexical analyzer (rather than just one
> regular expression).
Return to the
Search the comp.compilers archives again.