summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJohn Millaway <john43@users.sourceforge.net>2003-03-27 04:02:15 +0000
committerJohn Millaway <john43@users.sourceforge.net>2003-03-27 04:02:15 +0000
commit6fe6068dee3020caf4bd93c2c7d71c675df3201d (patch)
treee0a8ac0cab651dd80e88ad8655b214790edaa163 /doc
parent19f4f24507c4dbec6a5cd841d59c4b813ab4be73 (diff)
Documented the m4 dependency.
Diffstat (limited to 'doc')
-rw-r--r--doc/flex.texi29
1 files changed, 28 insertions, 1 deletions
diff --git a/doc/flex.texi b/doc/flex.texi
index 9824d08..f299338 100644
--- a/doc/flex.texi
+++ b/doc/flex.texi
@@ -261,6 +261,7 @@ Appendices
* Makefiles and Flex::
* Bison Bridge::
+* M4 Dependency::
Indices
@@ -7987,6 +7988,7 @@ then the problem is that the last rule needs to be "{whitespace}" !
@menu
* Makefiles and Flex::
* Bison Bridge::
+* M4 Dependency::
@end menu
@node Makefiles and Flex, Bison Bridge, Appendices, Appendices
@@ -8098,7 +8100,7 @@ with your specific implementation of @command{make}.
For more details on writing Makefiles, see @ref{Top, , , make, The
GNU Make Manual}.
-@node Bison Bridge, , Makefiles and Flex, Appendices
+@node Bison Bridge, M4 Dependency, Makefiles and Flex, Appendices
@section C Scanners with Bison Parsers
@cindex bison, bridging with flex
@@ -8200,6 +8202,31 @@ As you can see, there really is no magic here. We just use
@end verbatim
@end example
+@node M4 Dependency, , Bison Bridge, Appendices
+@section M4 Dependency
+@cindex m4
+
+The macro processor @code{m4}@footnote{The use of m4 is subject to change in
+future revisions of flex.} must be installed wherever flex is installed.
+@code{flex} invokes @samp{m4}, found by searching the directories in the
+@code{PATH} environment variable. Any code you place in section 1 or in the
+actions will be sent through m4. Please follow these rules to protect your
+code from unwanted @code{m4} processing.
+
+@itemize
+
+@item Do not use symbols that begin with, @samp{m4_}, such as, @samp{m4_define},
+or @samp{m4_include}, since those are reserved for @code{m4} macro names.
+
+@item Do not use the strings @samp{[[} or @samp{]]} anywhere in your code. The
+former is not valid in C, except within comments, but the latter is valid in
+code such as @code{x[y[z]]}.
+
+@end itemize
+
+@code{m4} is only required at the time you run @code{flex}. The generated
+scanner is ordinary C or C++, and does @emph{not} require @code{m4}.
+
@node Indices, , Appendices, Top
@unnumbered Indices