help-flex
[Top][All Lists]
Advanced

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

Re: %option stdinit


From: W. L. Estes
Subject: Re: %option stdinit
Date: Wed, 6 Mar 2002 11:00:58 -0500

Anyone have any thoughts on this?

[Note that in general, you may want to copy address@hidden for flex
problems to save this step. But thanks for writing.]

--Will

> Sender: address@hidden
> Cc: Osamu Aoki <address@hidden>, address@hidden
> From: Manoj Srivastava <address@hidden>
> User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1
>  (i386-debian-linux-gnu) (i386-debian-linux-gnu)
> Organization: The Debian Project
> Mail-Copies-To: nobody
> Date: Wed, 06 Mar 2002 09:17:01 -0600
> 
> Hi,
> 
>         [Please retain the CC to address@hidden  so
>         that the Debian bug tracking system has a record of your input]
> 
>       This problem has been reported by a Debian user. 
> 
> 
>  When flex is invoked with "%option stdinit", it should initializes
>  `yyin' and `yyout' to `stdin' and `stdout' according to info page. It
>  does not seem to work so. I can always use flex with default "nostdinit"
>  and initialize yyin and yyout in the statements in main().  It will be
>  nice to have this feature working.
> 
>  I encountered this problem when trying to compile ch1-05.l and ch1-05.y
>  in "lex & yacc" book example.  Following gives what happens:
> 
>  Flex creates a code as lex.yy.c with line 272:
> 
>  FILE *yyin = stdin, *yyout = stdout;
> 
>  When it is compiled with:
> 
>  $ cc -g -o prog lex.yy.c y.tab.c -lfl
> 
>  Compiler chokes by spitting out to stderr:
> 
>  lex.yy.c:272: initializer element is not constant
>  lex.yy.c:272: initializer element is not constant
> 
>       This is an issue with recent versions of the GNU libc.
> 
>       The Debian user had mad available a copy of a test suite where
>  this problem is demonstrated, and I have made a copy available at:
>  http://people.debian.org/%7Esrivasta/testflex.tar.gz
> 
>       Thanks for your consideration.
> 
>       manoj
> -- 
>  I am convinced that the truest act of courage is to sacrifice
>  ourselves for others in a totally nonviolent struggle for justice.
>  To be a man is to suffer for others. Cesar Chavez
> Manoj Srivastava   <address@hidden>  <http://www.debian.org/%7Esrivasta/>
> 1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
> 1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C
> 



reply via email to

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