Package: byacc Version: 20100216-1 Severity: wishlist Tags: patch bison allows for posix yacc emulation via a yacc directive in the yacc file, and also via a command line switch.
This patch turns the directive and command line option into noop's for byacc, since byacc is designed to be posix yacc compatible anyway. This allows for better compatibility with yacc sources written for bison. Note this patch applies after all the other patches I've submitted. -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages byacc depends on: ii libc6 2.11.1-2 Embedded GNU C Library: Shared lib byacc recommends no packages. byacc suggests no packages. -- no debconf information
Patch that implements noop for bison's yacc directive and command line option. --- byacc-20100216.orig/reader.c +++ byacc-20100216/reader.c @@ -283,6 +283,8 @@ keyword(void) return (PARSE_PARAM); if (strcmp(cache, "lex-param") == 0) return (LEX_PARAM); + if (strcmp(cache, "yacc") == 0) + return (POSIX_YACC); } else { @@ -1235,6 +1237,11 @@ read_declarations(void) case LEX_PARAM: copy_param(k); break; + + case POSIX_YACC: + /* noop for bison compatibility. byacc is already designed to be posix + * yacc compatible. */ + break; } } } --- byacc-20100216.orig/defs.h +++ byacc-20100216/defs.h @@ -95,6 +95,7 @@ #define PURE_PARSER 12 #define PARSE_PARAM 13 #define LEX_PARAM 14 +#define POSIX_YACC 15 /* symbol classes */ --- byacc-20100216.orig/main.c +++ byacc-20100216/main.c @@ -213,6 +213,11 @@ setflag(int ch) printf("%s - %s\n", myname, VERSION); exit(EXIT_SUCCESS); + case 'y': + /* noop for bison compatibility. byacc is already designed to be posix + * yacc compatible. */ + break; + default: usage(); }