[fpc-devel] Patch for lexlib
Florian Klaempfl
florian at freepascal.org
Sun Mar 16 12:01:20 CET 2008
Felipe Monteiro de Carvalho schrieb:
> Hello,
>
> I am writing scanners using plex, and I found a problem with the
> current lexlib. It has a function called yywrap which will close the
> input and the output, and there is no way to prevent that. I would
> like to parse the same file several times, and simply closing the
> file, reopening it and reseting it somehow doesn't work. It soon
> crashes. If I prevent yywrap from closing the file (only possible
> changing lexlib), then everything works good.
>
> I searched how people solve this in C, and there there is some
> pre-processor magic which allows them declare their own yywrap
> function.
Wouldn't it be better to make yywrap a procedure variable with a default
value?
More information about the fpc-devel
mailing list