Article View: gnu.misc.discuss
Article #73474A Flex Bug?
From: Ajay Shah
Date: Sat, 14 Sep 1991 01:19
Date: Sat, 14 Sep 1991 01:19
36 lines
1610 bytes
1610 bytes
I have encountered what I think is a flex bug.
Consider this lex program:
---------------------------------------------------------------------------
%%
^[ \t]+ |
[ \t]+$ ;
---------------------------------------------------------------------------
It can be rewritten without a "|"; one would just say ";"
instead.
Both versions work fine with lex. The version with the ";" works
with flex but the version with a "|" fails with flex.
The test input which breaks the flex-| version is:
""
Just to be sure, here is od -cx testfile:
0000000 \t " " \n
0922 220a
0000004
What happens when this input is given to the generated scanner:
it hangs, while eating CPU.
Looks like a bug to me...
--
_______________________________________________________________________________
Ajay Shah, (213)734-3930, ajayshah@usc.edu
The more things change, the more they stay insane.
_______________________________________________________________________________
Technical Details
Message-ID:
<35863@usc.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!usc!alhena.usc.edu!ajayshahShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1025b4,3421b73751f98913,start X-Google-Attributes: gid1025b4,public X-Google-ArrivalTime: 1991-09-14 11:56:10 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!usc!alhena.usc.edu!ajayshah From: ajayshah@alhena.usc.edu (Ajay Shah) Newsgroups: gnu.misc.discuss Subject: A Flex Bug? Message-ID: <35863@usc.edu> Date: 14 Sep 91 01:19:44 GMT Sender: news@usc.edu Organization: University of Southern California, Los Angeles, CA Lines: 36 Nntp-Posting-Host: alhena.usc.edu Originator: ajayshah@alhena.usc.edu