When generating the flex man page, fix the program name in the SYNOPSIS
section to 'flex' and not 'stage1flex' or 'flex.exe'. This make it
possible to generate the man page deterministically with a recent enough
'help2man' tool (1.47.1 or later, which supports SOURCE_DATE_EPOCH that
eliminated the last nondeterministic information).
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Avoid the GNU Make specific "| order-only-prerequisite" syntax and use a
portable alternative of having doc/Makefile invoke src/Makefile before
generating the man page.
Note that 'flex.1' man page target does not depend on '$(FLEX)' program
directly - the direct dependency would confuse 'make' and it is a
limitation of the current "recursive makefile" structure.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
The proper way to use a pure parser since 2.7 (2012-12-12) is "%define
api.pure full". The proper way to pass params since 3.0 (2013-07-25)
is "%param".
Override the TEXI2DVI and TEXI2PDF automake variables to add an include directory so VPATH builds work.
I'm not thrilled with doing this. The right thing is probably to move the included examples to doc/ and do the
VPATH magic in examples/manual/ where LaTeX is better able to deal with it.
The tradeoff is a bit delicate here; yy_set_bol() did not strictly
speaking need to change. On the other hand, squeezing the underscores
out of YY_AT_BOL() but not yy_set_bol() would have been exactly the
kind of irregularity that people trip over and curse.
The underlying issue is of course languages like Go and Python with
validators that get upset by all caps and embedded underscores. On the
one hand, we want to not be churning the Flex API gratuitously. On
the other hand it is desirable if as few entry point names as possible
need to change in different target languages.
The approach I'm taking to deciding this question in individual cases
is this: if an entry point name is likely to appear in actions, and
must be recognized as magic by Flex itself in order to have a final
context argument added or an object reference prepended, then it must
be multilanguage-safe - not all-caps and no underscores.
Any name that does *not* need to be wired into Flex can be left
alone. Users may have to change it when they port.
...in the flex scanner. Presently this works for yyecho(), yyinput(),
yystart(), yybegin(), and yyunput(). These no longer need to be nacros.
A few more remain to be done, notably yyless() and yymore().
Along the way, deprecate YY_FATAL_ERROR and add a replacement option.
The quotes test is backend-independent and doesn't need
to be run anywhere but C.
Also, remove some debris from the C99 skeleton,
it injects noise into C output comparisons.