|Regex -> DFA ->? Lex compiler email@example.com (Paul Johnston) (2000-02-05)|
|Re: Regex -> DFA ->? Lex compiler firstname.lastname@example.org (Armel) (2000-02-10)|
|Re: Regex -> DFA ->? Lex compiler email@example.com (Jonathan Barker) (2000-02-10)|
|Re: Regex -> DFA ->? Lex compiler firstname.lastname@example.org (2000-02-10)|
|From:||"Jonathan Barker" <email@example.com>|
|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 <firstname.lastname@example.org> 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.