iraf-v216 · Code · Issues (50) · Pull requests (81)
iraf.net pull request #79
Fix lex source files in xpp and generic
olebole merged 3 commits to iraf-community/iraf
olebole commented on 2017-05-28
The lex file unix/boot/spp/xpp/xpp.l
could not be processed by recent lex programs (f.e. flex), since the resulting lex.yy.c
files were patched, and the patch depended tightly on interna of the lex program originally used (which is not documented). Since “modern” (since ~30 years) flex programs have more flexibility, the patches are not needed anymore and can be replaced by appropriate standard conform solutions.
Similarly for unix/boot/generic/tok.l
; here is however the difficulty that it needs to re-read parts of the file to do loops. This is solved by explicitly counting chars read-in, see the discussion on stackoverflow.
There is one (or three, depending on how one counts it) more lex sources, pkg/*cl/grammar.l
, but much harder to solve: Here, not the system libc is used, but the (incomplete) IRAF libc. The generated lex.yy.c
depend f.e. on the existence of <string.h>
, which is not available in IRAF libc. So, we will leave the CL grammars as they are for the moment. Patches are welcome here however :-)
Commits
- Adjust lex processing in xpp [65069853]
- Adjust lex processing in generic for newer lex (flex & Co.). [0ff4449d]
- Block running
lex
with incompatible source code [44942b67]
Last updated on 2017-10-05