]> granicus.if.org Git - nethack/commit
sys/share/???_lex.c
authorPatR <rankin@nethack.org>
Sun, 6 Dec 2015 07:02:35 +0000 (23:02 -0800)
committerPatR <rankin@nethack.org>
Sun, 6 Dec 2015 07:02:35 +0000 (23:02 -0800)
commitc964ae023bb001e7e668e0bf4370301d2c84db20
treee27fb74853077ad290f24110f22d923ffd3d80e1
parentea6c2a49fe38e6a979140ac8a08c8ecbbb74ccc0
sys/share/???_lex.c

Generated with flex 2.6.0 and a new custom skeleton for that version
(which almost certainly won't work with any older or newer version of
flex, but that limitation has no effect on the usefulness of the
generated scanner code).

Function definitions are oldstyle:
  int foo(bar)
    char *bar;
  {...}
rather than ANSI, like nethack's core code.  Advance declarations use
FDECL for prototypes, so should also fit nethack, although the usage
'FDECL(, (arglist))' makes me feel a bit uneasy.  gcc doesn't mind the
omitted first argument but other compilers might not like it.

The system headers (stdlib.h and a few others) that flex has been
insisting on including are gone (with this skeleton).  It starts out
including "config.h" and that header has the responsibility for any
definitions and declarations necessary.  That shouldn't be a big deal
since config.h -> XXXconf.h -> system.h is what we're already relying
on for everything else, but it does need testing for any configuration
that uses sys/share/{dgn,lev}_{lex,yacc}.c.

I'll be checking the skeleton into the NHinternals repository after
adding some documentation, but I'm wondering whether it should really
become part of the source distribution.
sys/share/dgn_lex.c
sys/share/lev_lex.c