ENH: replace flex-based wmkdep with ragel-based parser (issue #784)

This is similar to efforts (Feb 2010) but using ragel
  (https://en.wikipedia.org/wiki/Ragel) instead of the now defunct
  coco/r. The modified commit message from 2010:

ENH: add C++-based wmkdepend parser (uses ragel grammar).

- This avoids dependency on lex/flex and provides better encapsulation
  for buffer switching. As a result, the maximum number of open files
  only corresponds to the include depth.

--

Note that the flex source and rules are still available, but are not
deactivate (see wmake/rules/General/transform)
This commit is contained in:
Mark Olesen
2018-04-11 12:31:36 +02:00
parent 52cf2d68c4
commit 1676bd4003
5 changed files with 1371 additions and 3 deletions

View File

@ -0,0 +1,5 @@
SUFFIXES += .rl
rltoo = $E $(call QUIET_MESSAGE,ragel,$(<F)) \
$(WM_SCHEDULER) ragel -C -o$(@D)/$(<F).cpp -f $< $(AND) \
$(CC) $(c++FLAGS) $(c++LESSWARN) -c $(@D)/$(<F).cpp -o $@