bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Flex scanner stops when bison is calling


From: Robert Williamson
Subject: Flex scanner stops when bison is calling
Date: Sun, 25 May 2003 12:48:37 -0000

I am working with bison 1.75 and flex 2.5.4 on SunOS 5.7 (Solaris). I'm not
sure why, but when I generate a parser with my scanner, the scanner only
reports the first token. I'm sure the scanner is ok, because I have used it to
scan a variety of different inputs successfully. My best guess is that bison
only calls yylex once.

Running with bison generates the following output:

Starting parse
Entering state 0
Reducing via rule 3 (line 77),  -> DeclList
DeclList ->
state stack now 0
Entering state 2
Reading a token: --(end of buffer or a NUL)
--accepting rule at line 73 ("void main() {")
--accepting rule at line 95 ("void")
Next token is token T_Void ()
Shifting token 258 (T_Void), Entering state 4
Reducing via rule 16 (line 123), T_Void  -> Type
Type -> void

The problem seems to be the "--(end of buffer or a NUL)", which suggests to me
that the scanner has stopped processing the input.

Is this a common difficuly? I suspect there may be a simple solution to my
problem.

Any help appreciated.

Thanks!


____________________________________________________________________
   





reply via email to

[Prev in Thread] Current Thread [Next in Thread]