help-flex
[Top][All Lists]
Advanced

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

Re: [help-flex] yy_pop_state "unrecognized rule"


From: John Millaway
Subject: Re: [help-flex] yy_pop_state "unrecognized rule"
Date: Mon, 29 Jul 2002 10:51:33 -0700 (PDT)

--- "Aaron S. Hawley" <address@hidden> wrote:
> i'm an inexperienced flex trying to get states to work.  flex complains
> yy_pop_state() is an unrecognized rule.
> 
> behavoior seen in:
> flex 2.5.4 with gcc on AIX 5.1
> flex 2.5.10 with cc on AIX 4.3
> flex 2.5.10 with cc on AIX 5.1
> flex 2.5.10 with gcc on AIX 5.1
> 
> %> gmake LEX=flex CFLAGS=-lfl statestest
> flex  -t statestest.l > statestest.c
> statestest.l: 27: unrecognized rule
> statestest.l: 27: unrecognized rule
> statestest.l: 27: unrecognized rule
> 
> /* line 1 */
> %x FOO
> 
> %option stack
> %option main
> %%
> 
> <INITIAL>foo
> {
>       printf("Found foo\n");
>       BEGIN(FOO);
> }
> 
> <INITIAL>.|\n
> {
>       ECHO;
> }
> 
> <INITIAL><FOO>.+

The above line is the root of your problems: Change <FOO> to {FOO}

-John


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com



reply via email to

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