|^/$ in lexical analyzers email@example.com (1993-06-27)|
|Re: ^/$ in lexical analyzers firstname.lastname@example.org (Tom Lord) (1993-06-28)|
|Magic (was Re: ^/$ in lexical analyzers) email@example.com (1993-06-30)|
|Re: ^/$ in lexical analyzers firstname.lastname@example.org (1993-06-30)|
|From:||email@example.com (Richard L. Goerwitz)|
|Keywords:||DFA, lex, question|
|Organization:||University of Chicago|
|Date:||Sun, 27 Jun 1993 20:03:24 GMT|
I can see how ^ and $ regexps would be implemented using a stream-based
lexical analyzer. One just uses lookaheads and left contexts based on the
newline. What about a standard regexp package, though - i.e. one where
the object being scan- ned is simply a line? Situations like ^a|b would
seem a bit ugly, since there are no left contexts. Does one prepend a
character to the input stream, and modify the pattern (e.g. \na|\n.*b)?
Or does one use some ad hoc method?
Perhaps this question has an obvious answer. I've browsed through
standard works like the "Dragon Book," and found no- thing that is much
help (only the usual +,*,?, etc. get cov- ered).
-Richard L. Goerwitz firstname.lastname@example.org
Return to the
Search the comp.compilers archives again.