m4 and skeleton system

Tim Landscheidt <[email protected]> Tue, 01 Nov 2011 01:30:02 +0000
Newsgroups gmane.comp.lex.flex.general
Organization <URI:http://www.tim-landscheidt.de/>
Message-ID <[email protected]>
Hi,

I'm looking at adding support for PHP to flex, and it looks
generally feasible.

  What I don't quite understand is the reasoning behind
flex's skeleton system.  While Bison's is pretty straight
forward, - CMIIW - flex processes the skeleton with m4 to a
C array, then implements some "%if-..." control structures
of its own and processes the result again with m4 (offering
the user another set of control structures for his code).
The only technical advantage to Bison's that I can see from
a distance is that in this way the whole shebang is contain-
ed in one binary.

  So with regard to my goal, should I go for "%if-php-only",
or would a patch to streamline the skeleton system first be
met favourably?

TIA,
Tim