summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2020-02-09 15:33:21 +0100
committerAkim Demaille <akim.demaille@gmail.com>2020-02-13 08:18:11 +0100
commit47850d4f581c337f71d20432867d8b13c66f5d60 (patch)
tree7fbc2e87a556a81f37cdf6db3f2fdf2f50435977 /doc
parent57b035a242b15409643a6a8d2ceded5f9380a2cb (diff)
downloadbison-47850d4f581c337f71d20432867d8b13c66f5d60.tar.gz
doc: clearly state that %yacc only makes sense with yacc.c
* doc/bison.texi: here.
Diffstat (limited to 'doc')
-rw-r--r--doc/bison.texi20
1 files changed, 11 insertions, 9 deletions
diff --git a/doc/bison.texi b/doc/bison.texi
index b4052417..7cf45189 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -5841,7 +5841,10 @@ states and what is done for each type of lookahead token in that state.
@deffn {Directive} %yacc
Pretend the option @option{--yacc} was given, i.e., imitate Yacc, including
-its naming conventions. @xref{Tuning the Parser}, for more.
+its naming conventions. Only makes sense with the @file{yacc.c}
+skeleton. @xref{Tuning the Parser}, for more.
+
+Of course @code{%yacc} is a Bison extension@dots{}
@end deffn
@@ -10857,11 +10860,10 @@ different diagnostics to be generated (it implies @option{-Wyacc}), and may
change behavior in other minor ways. Most importantly, imitate Yacc's
output file name conventions, so that the parser implementation file is
called @file{y.tab.c}, and the other outputs are called @file{y.output} and
-@file{y.tab.h}. Also, if generating a deterministic parser in C, generate
-@code{#define} statements in addition to an @code{enum} to associate token
-numbers with token names. Thus, the following shell script can substitute
-for Yacc, and the Bison distribution contains such a script for
-compatibility with POSIX:
+@file{y.tab.h}. Also, generate @code{#define} statements in addition to an
+@code{enum} to associate token numbers with token names. Thus, the
+following shell script can substitute for Yacc, and the Bison distribution
+contains such a script for compatibility with POSIX:
@example
#! /bin/sh
@@ -10869,9 +10871,9 @@ bison -y "$@@"
@end example
The @option{-y}/@option{--yacc} option is intended for use with traditional
-Yacc grammars. If your grammar uses Bison extensions like
-@samp{%glr-parser}, Bison might not be Yacc-compatible even if this option
-is specified.
+Yacc grammars. This option only makes sense for the default C skeleton,
+@file{yacc.c}. If your grammar uses Bison extensions Bison cannot be
+Yacc-compatible, even if this option is specified.
@end table
@node Output Files