[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bison patch to support the "yacc" command
From: |
Paul Eggert |
Subject: |
Bison patch to support the "yacc" command |
Date: |
Fri, 13 Dec 2002 04:19:37 -0800 (PST) |
POSIX requires a "yacc" command, and it's easy, so we might as well
ship one. I installed this patch.
2002-12-13 Paul Eggert <address@hidden>
POSIX requires a "yacc" command.
* src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
(MOSTLYCLEANFILES): Add yacc.
(yacc): New rule.
* doc/bison.texinfo (Invocation, Bison Options): Mention yacc
as an alias for bison y.
Index: src/Makefile.am
===================================================================
RCS file: /cvsroot/bison/bison/src/Makefile.am,v
retrieving revision 1.58
diff -p -u -r1.58 Makefile.am
--- src/Makefile.am 11 Dec 2002 05:30:26 -0000 1.58
+++ src/Makefile.am 13 Dec 2002 12:07:41 -0000
@@ -29,6 +29,7 @@ INCLUDES = -I$(top_builddir) \
LDADD = ../lib/libbison.a $(LIBINTL)
bin_PROGRAMS = bison
+bin_SCRIPTS = yacc
bison_SOURCES = \
LR0.c LR0.h \
@@ -64,6 +65,13 @@ bison_SOURCES = \
vcg_defaults.h
BUILT_SOURCES = scan-skel.c scan-gram.c parse-gram.c parse-gram.h
+
+MOSTLYCLEANFILES = yacc
+
+yacc:
+ echo '#! /bin/sh' >$@
+ echo 'exec $(bindir)/bison -y "$$@"' >>$@
+ chmod a+x $@
echo:
echo $(bison_SOURCES) $(noinst_HEADERS)
Index: doc/bison.texinfo
===================================================================
RCS file: /cvsroot/bison/bison/doc/bison.texinfo,v
retrieving revision 1.90
diff -p -u -r1.90 bison.texinfo
--- doc/bison.texinfo 7 Dec 2002 05:50:45 -0000 1.90
+++ doc/bison.texinfo 13 Dec 2002 12:07:43 -0000
@@ -6082,6 +6082,10 @@ bison -d -o @var{output.c++} @var{infile
@noindent
will produce @file{output.c++} and @file{outfile.h++}.
+For compatibility with @acronym{POSIX}, the standard Bison
+distribution also contains a shell script called @command{yacc} that
+invokes Bison with the @option{-y} option.
+
@menu
* Bison Options:: All the options described in detail,
in alphabetical order by short options.
@@ -6122,10 +6126,12 @@ Equivalent to @samp{-o y.tab.c}; the par
@file{y.tab.c}, and the other outputs are called @file{y.output} and
@file{y.tab.h}. The purpose of this option is to imitate Yacc's output
file name conventions. Thus, the following shell script can substitute
-for Yacc:
+for Yacc, and the Bison distribution contains such a script for
+compatibility with @acronym{POSIX}:
@example
-bison -y $*
+#! /bin/sh
+bison -y "$@"
@end example
@end table
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bison patch to support the "yacc" command,
Paul Eggert <=