158 Commits

Author SHA1 Message Date
Nikolaos Chatzikonstantinou
546d905feb Update flex.texi 2024-08-10 11:18:39 -04:00
Explorer09
2d08e2f469 build: Correct program path in doc/Makefile.am
Prevent help2man from invoking the flex program installed on the
builder's system to generate the man page.
2024-05-09 15:03:16 -04:00
Will Estes
3c70fb6932 fix(build): build man page, even when cross compiling, even on MSWindows 2024-05-09 10:02:08 -04:00
Explorer09
7e53fea7dc build(doc): Generate man page with fixed program name
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>
2024-04-30 16:55:57 -04:00
Explorer09
03b5af1572 build(doc): Portable 'flex.1' dependency expression
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>
2024-04-30 16:55:57 -04:00
Akim Demaille
ba1efdfa39
doc: modernize Bison snippets (#420)
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".
2024-03-29 10:54:03 -04:00
zmajeed
7c053dac96 typo 2023-12-16 09:36:31 -06:00
zmajeed
52eb5570b9 Fix wrong example regexes for C and C++ comments 2023-12-16 09:34:21 -06:00
zmajeed
1a313b3fb8 Fix wrong example regexes for C and C++ comments 2023-12-16 09:29:05 -06:00
zmajeed
c47ca061c6 C++ lexer header file is FlexLexer.h not yyFlexLexer.h 2023-11-02 11:25:13 -04:00
musvaage
d7d1c54362 typos 2023-08-22 11:35:15 -04:00
winter.loo
541645a888 doc: fix typo 2023-07-11 16:40:23 -04:00
Martin Joerg
a97872a311 Fix pattern documentation for case-insensitive ranges 2023-06-05 10:29:18 -04:00
Will Estes
d30bdf45a8 fix(build): build man page when cross compiling
fixes #560
2023-04-07 10:05:10 -04:00
Will Estes
e1a5285cbf
Merge pull request #529 from ggujjula/issue_369
Add documentation about option '--yymore'
2022-06-17 07:54:37 -04:00
ggujjula
e0e7091dc7
Add anchors and refs to areas relevant to '--yymore' 2022-05-31 01:19:47 -05:00
ggujjula
16ff9d0133
Add documentation for option '--yymore' 2022-05-31 01:19:35 -05:00
Xiao Hanyu
7535b35bf1 fix some tiny doc error. 2022-05-26 21:00:47 +08:00
Will Estes
74a89fd6ab
Merge pull request #513 from ggujjula/issue_398
Issue 398; Documentation fix; Additional command-line options
2022-05-16 15:59:30 -04:00
Joseph Langley
2bacaef4cf doc(manual): Correct character class examples and special meaning discussion.
See Issue 521 and 478.
2022-05-11 17:41:53 -04:00
ggujjula
c947396cda
Replace mention of input() in documentation with yyinput() 2021-12-29 16:31:18 -06:00
Will Estes
83aaf1b4ce Merge branch 'doc_fix_typo' of git://github.com/houtanb/flex into houtanb-doc_fix_typo 2021-06-05 14:21:51 -04:00
Joseph Langley
5fa412a3d9 fix(build): Set texi2* include paths for VPATH.
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.
2021-06-04 00:37:59 -04:00
Eric S. Raymond
ab32ad65bb Repair some markup damage in the manual. 2020-11-10 19:56:39 -05:00
Eric S. Raymond
aa782b6233 Explain why 3 API functions don't have magic rewrite rules.
The functions are: yy_current_buffer(), yy_flush_current_buffer(), and
yy_set_interactive().
2020-11-09 04:26:56 -05:00
Eric S. Raymond
191d7068c3 Fully m4ize yymore() 2020-11-08 17:38:42 -05:00
Eric S. Raymond
9b27be4b2e YY_AT_BOL() -> yyatbol(), yy_set_bol() -> yysetbol(), and make them magic.
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.
2020-11-03 12:58:06 -05:00
Eric S. Raymond
2e6b59bb7a Documentation polishing. 2020-11-03 11:11:58 -05:00
Eric S. Raymond
35cdc7cabe Implement and document the rewrite/norewrite option. 2020-11-03 02:00:09 -05:00
Eric S. Raymond
f2f38557ee Pull two random flags into the ctrl structure.
Also, some documentation polishing.
2020-11-02 20:35:28 -05:00
Eric S. Raymond
3fe9c68941 m4ize handling of yyterminate, and translate another stray #define. 2020-10-31 05:15:37 -04:00
Eric S. Raymond
4cc8835d3c Add %option bufsize, required for testing under non-C targets...
...since we can't count on the C preprocessor to do it.
2020-10-29 20:34:14 -04:00
Eric S. Raymond
8bf1889ca7 More de-preprocessorization. 2020-10-29 17:19:47 -04:00
Eric S. Raymond
59c26779eb In C99, make --nounistd a no-op. Explain this in the manual. 2020-10-29 00:18:25 -04:00
Eric S. Raymond
baaaa45b40 A step towards getting rid of YY_FATAL_ERROR...
...because we can no longer depend on cpp to be in the pipeline.
2020-10-28 12:39:26 -04:00
Eric S. Raymond
d1dc1c0911 Sever a number of dependencies on cpp by adding rewrite rules...
...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.
2020-10-28 12:39:26 -04:00
Eric S. Raymond
7af5fa13bb Outside cpp #define doesn't work, so deprecate YY_FLEX_SUBMINOR_VERSION. 2020-10-28 12:39:26 -04:00
Eric S. Raymond
4a4cd247ca Polish documentation and fix up some uses of the old interface. 2020-10-25 22:34:23 -04:00
Daniel Brooks
ac97741a0b
Fix Next link in the Overview of the Retargeting section of the manual (#3) 2020-10-25 22:08:18 -04:00
Eric S. Raymond
683fa301a7 Documentation cleanup - fix a wrong assumption about tests.
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.
2020-10-22 19:50:54 -04:00
Eric S. Raymond
07440122ca Improve explanation of m4 quoting. 2020-10-17 14:13:12 -04:00
Eric S. Raymond
e858600158 Documentation polishing. 2020-10-17 10:19:36 -04:00
Eric S. Raymond
1c439cfab2 Finish up the simple-test set for C99. 2020-10-17 08:40:29 -04:00
Daniel Brooks
ff0f995851
quick editing pass over recent changes to documentation and comments (#2) 2020-10-16 14:27:46 -04:00
Eric S. Raymond
e6931c9f6c Docunent the -e/--emit backend switch and the new test convention. 2020-10-16 11:56:13 -04:00
Eric S. Raymond
0e32cd6ce3 Add and document machinery to choose a back end by name.
Back end is now reported in the metadata comments near the top of
generated files.

All is in readiness for the start of direct work on Go support.
2020-10-16 06:10:02 -04:00
Eric S. Raymond
65b508798f More documentation polishing. 2020-10-14 18:59:05 -04:00
Eric S. Raymond
f7f447793a Typo and markup fixes in the manual. 2020-10-14 13:58:29 -04:00
Eric S. Raymond
e740e500e2 Documentation polishing. 2020-10-14 13:16:44 -04:00
Eric S. Raymond
bcd8575897 Documentation polishing. 2020-10-13 09:29:24 -04:00