help-flex
[Top][All Lists]
Advanced

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

Re: Bug: %option main overrides %option yywrap


From: W. L. Estes
Subject: Re: Bug: %option main overrides %option yywrap
Date: Wed, 25 Apr 2001 16:27:46 -0400

> I think I did that (which is documented in the manual, by the way) so that
> "%option main" would be a quick way to specify you want a bare-bones
> program for which you don't have to define any additional routines.
> I'd be disinclined to change it (though it's Will's call) because it's
> so easy to work around - just don't use "%option main", which is only
> saving you a few lines of code anyway.

Additionally, flex.1 says the following:

       main   directs  flex  to  provide a default main() program
              for the scanner, which simply calls yylex().   This
              option implies noyywrap (see below).

My sense is that Vern is correct: The right thing to do is to not use
%option main if you want yywrap() to be under your control.

Thanks,

--Will



reply via email to

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