Related articles |
---|
yyless and pattern matching mballen@NOSPAM_erols.com (Michael B. Allen) (2000-03-23) |
Re: yyless and pattern matching cfc@world.std.com (Chris F Clark) (2000-03-25) |
Re: yyless and pattern matching rkrayhawk@aol.com (2000-04-01) |
From: | Chris F Clark <cfc@world.std.com> |
Newsgroups: | comp.compilers |
Date: | 25 Mar 2000 02:35:13 -0500 |
Organization: | The World Public Access UNIX, Brookline, MA |
References: | 00-03-104 |
Keywords: | lex, comment |
My suspicion is that this is simply a bug (mis-feature). In the
versions of lex that I've read (which I believe includes flex but
can't say for certain), the ^ operator is handled by a variable that
keeps the previous character read. I bet yyless only pushes the
character back to the input that flex is reading and does not push it
into the variable used for newline checking. Or on a slight
permutation on that the newline checking character may need to be even
one character farther back and thus the yyless may need to push the
character before the character being pushed back (requiring two
characters of lookback). My apologies for the vagueness of this mail,
but I have not analyzed the code that deeply. Still, this might give
someone enough of a hint to fix the problem.
Hope this helps,
-Chris
*****************************************************************************
Chris Clark Internet : compres@world.std.com
Compiler Resources, Inc. Web Site : http://world.std.com/~compres
3 Proctor Street voice : (508) 435-5016
Hopkinton, MA 01748 USA fax : (508) 435-4847 (24 hours)
[I agree. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.