Starlink development wrote on :
>
> > You are encouraged to use Flex in your sources, since it is both
> > more pleasant to use than plain Lex and the C source it produces is
> > portable. In order to ensure portability, however, you must either
> > provide a function yywrap or, if you don't use it (e.g., your
> > scanner has no `#include'-like feature), simply include a
> > `%noyywrap' statement in the scanner's source. Once this done, the
> > scanner is portable (unless you felt free to use nonportable
> > constructs) and does not depend on any library. In this case, and
> > in this case only, it is suggested that you use this Autoconf
> > snippet:
>
> What the hell does all that mean!? And is it telling us we
> should or shouldn't use the given snippet? I'm not familiar
> enough with {f,}lex to be able to parse this confidently (I
> remember using lex ages ago and thinking it was nifty, but
> that was it). Mark's the lex expert -- Mark?
I going to admit that I once understood LEX (and YACC) as used in ICL to the
extent that I could maintain it - I HAVE fixed it and extended it in the
past! However this would have to be remembered again!
It makes sort of sense to me. Is it not saying:-
1) They prefer FLEX to LEX as the code may be portable between machines -
does LEX depend on some library?
2) If you have used FLEX (and not done something horrible to make the
portable parser non-portable again) use
these macros.
Brian
|