[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison patches
From: |
Paul Eggert |
Subject: |
Re: Bison patches |
Date: |
05 Oct 2003 00:38:50 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Akim Demaille <address@hidden> writes:
> I'm not fond of contexts, and that's what this patch installs
> (actually that's also why I didn't not answer before, I did not think
> it would be included for the next release)
Well, perhaps it should not be documented, since it is so close to a
release. For now, I installed the patch enclosed below.
The points you raise about associativity and partial orders for
precedences are good ones, but it seems to me that they are somewhat
orthogonal. They would affect how precedences behave when invoked,
but %no-default-prec affects how the precedences are assigned to rules.
2003-10-05 Paul Eggert <address@hidden>
* NEWS: Don't document %no-default-prec, as it's still
too experimental.
* doc/bison.texinfo: Document %no-default-prec only if
the defaultprec flag is set. Normally it's not.
Index: NEWS
===================================================================
RCS file: /cvsroot/bison/bison/NEWS,v
retrieving revision 1.98
diff -p -u -r1.98 NEWS
--- NEWS 1 Oct 2003 21:33:23 -0000 1.98
+++ NEWS 5 Oct 2003 07:30:45 -0000
@@ -3,9 +3,6 @@ Bison News
Changes in version 1.875c:
-* New %no-default-prec declaration, to disable default rule precedences.
- New %default-prec declaration, to reestablish the default.
-
Changes in version 1.875b, 2003-06-17:
* GLR grammars now support locations.
Index: doc/bison.texinfo
===================================================================
RCS file: /cvsroot/bison/bison/doc/bison.texinfo,v
retrieving revision 1.114
diff -p -u -r1.114 bison.texinfo
--- doc/bison.texinfo 5 Oct 2003 06:46:53 -0000 1.114
+++ doc/bison.texinfo 5 Oct 2003 07:30:51 -0000
@@ -16,6 +16,10 @@
@c @clear shorttitlepage-enabled
@c @set shorttitlepage-enabled
address@hidden Set following if you want to document %default-prec and
%no-default-prec.
address@hidden This feature is experimental and may change in future Bison
versions.
address@hidden @set defaultprec
+
@c ISPELL CHECK: done, 14 Jan 1993 --bob
@c Check COPYRIGHT dates. should be updated in the titlepage, ifinfo
@@ -3684,10 +3688,12 @@ Declare a terminal symbol (token type na
Using it in a way that would be associative is a syntax error.
@end deffn
address@hidden defaultprec
@deffn {Directive} %default-prec
Assign a precedence to rules lacking an explicit @code{%prec} modifier
(@pxref{Contextual Precedence, ,Context-Dependent Precedence}).
@end deffn
address@hidden ifset
@deffn {Directive} %type
Declare the type of semantic values for a nonterminal symbol
@@ -3759,11 +3765,13 @@ and so on. @xref{Multiple Parsers, ,Mul
Program}.
@end deffn
address@hidden defaultprec
@deffn {Directive} %no-default-prec
Do not assign a precedence to rules lacking an explicit @code{%prec}
modifier (@pxref{Contextual Precedence, ,Context-Dependent
Precedence}).
@end deffn
address@hidden ifset
@deffn {Directive} %no-parser
Do not include any C code in the parser file; generate tables only. The
@@ -4863,6 +4871,7 @@ exp: @dots{}
@end group
@end example
address@hidden defaultprec
If you forget to append @code{%prec UMINUS} to the rule for unary
minus, Bison silently assumes that minus has its usual precedence.
This kind of problem can be tricky to debug, since one typically
@@ -4882,6 +4891,7 @@ grammar, but it helps to protect against
The effect of @code{%no-default-prec;} can be reversed by giving
@code{%default-prec;}, which is the default.
address@hidden ifset
@node Parser States
@section Parser States
@@ -6814,11 +6824,13 @@ parsing. @xref{Parser Function, ,The Pa
Equip the parser for debugging. @xref{Decl Summary}.
@end deffn
address@hidden defaultprec
@deffn {Directive} %default-prec
Assign a precedence to rules that lack an explicit @samp{%prec}
modifier. @xref{Contextual Precedence, ,Context-Dependent
Precedence}.
@end deffn
address@hidden ifset
@deffn {Directive} %defines
Bison declaration to create a header file meant for the scanner.
@@ -6873,11 +6885,13 @@ function is applied to the two semantic
Bison declaration to rename the external symbols. @xref{Decl Summary}.
@end deffn
address@hidden defaultprec
@deffn {Directive} %no-default-prec
Do not assign a precedence to rules that lack an explicit @samp{%prec}
modifier. @xref{Contextual Precedence, ,Context-Dependent
Precedence}.
@end deffn
address@hidden ifset
@deffn {Directive} %no-lines
Bison declaration to avoid generating @code{#line} directives in the