doc: style changes

* doc/bison.texi (Bibliography): Add [Corbett 1984] and [Johnson
1978].
(History): Use them.
And other minor changes.
This commit is contained in:
Akim Demaille
2019-02-17 12:20:40 +01:00
parent 93371999ee
commit cbf213915c

View File

@@ -379,7 +379,7 @@ Java Parsers
A Brief History of the Greater Ungulates A Brief History of the Greater Ungulates
* Yacc:: The original Yacc * Yacc:: The original Yacc
* yacchack:: An obscure early implementation of re-entrancy * yacchack:: An obscure early implementation of reentrancy
* Byacc:: Berkeley Yacc * Byacc:: Berkeley Yacc
* Bison:: This program * Bison:: This program
* Other ungulates:: Similar programs * Other ungulates:: Similar programs
@@ -13010,20 +13010,21 @@ The exceptions thrown by user-supplied parser actions and
@node Yacc @node Yacc
@section The ancestral Yacc @section The ancestral Yacc
Bison originated as a workalike of a program called Yacc - Yet Another Bison originated as a workalike of a program called Yacc --- Yet Another
Compiler Compiler.@footnote{(Because of the acronym, the name is sometimes Compiler Compiler.@footnote{Because of the acronym, the name is sometimes
given as ``YACC'', but Johnson used ``Yacc'' in the descriptive paper given as ``YACC'', but Johnson used ``Yacc'' in the descriptive paper
included in the included in the
@url{https://s3.amazonaws.com/plan9-bell-labs/7thEdMan/v7vol2b.pdf, Version @url{https://s3.amazonaws.com/plan9-bell-labs/7thEdMan/v7vol2b.pdf, Version
7 Unix Manual}} Yacc was written at Bell Labs as part of the very early 7 Unix Manual}.} Yacc was written at Bell Labs as part of the very early
development of Unix; one of its first uses was to develop the original development of Unix; one of its first uses was to develop the original
Portable C Compiler. The same person, Steven C. Johnson, wrote Yacc and the Portable C Compiler, pcc. The same person, Steven C. Johnson, wrote Yacc and
original pcc. the original pcc.
According to the author, Yacc was first invented in 1971 and reached a According to the author
form recognizably similar to the C version in 1973. Johnson published @footnote{@url{https://lists.gnu.org/archive/html/bison-patches/2019-02/msg00061.html}},
@url{https://dx.doi.org/10.1145/512760.512771, A Portable Compiler: Theory Yacc was first invented in 1971 and reached a form recognizably similar to
and Practice} in the Proceedings of the 5th ACM POPL Symposium in 1978. the C version in 1973. Johnson published @cite{A Portable Compiler: Theory
and Practice} (@pxref{Bibliography,,Johnson 1978}).
Yacc was not itself originally written in C but in its predecessor language, Yacc was not itself originally written in C but in its predecessor language,
B. This goes far to explain its odd interface, which exposes a large number B. This goes far to explain its odd interface, which exposes a large number
@@ -13052,17 +13053,16 @@ became available a few years later.
@node Byacc @node Byacc
@section Berkeley Yacc @section Berkeley Yacc
Berkeley Yacc was originated in 1985 by Berkeley Yacc was originated in 1985 by Robert Corbett
@url{https://apps.dtic.mil/dtic/tr/fulltext/u2/a611756.pdf, Robert Corbett}. (@pxref{Bibliography,,Corbett 1984}). It was originally named ``zoo'', but
It was originally named ``zoo'', but by October 1989 it became known as by October 1989 it became known as Berkeley Yacc or byacc.
Berkeley Yacc or byacc.
Berkeley Yacc had three advantages over the ancestral Yacc: it generated Berkeley Yacc had three advantages over the ancestral Yacc: it generated
faster parsers, it could generate reentrant parsers, and the source cade faster parsers, it could generate reentrant parsers, and the source code
was released to the public domain rather than being under an AT&T was released to the public domain rather than being under an AT&T
proprietary license. The better performance game from implementing proprietary license. The better performance came from implementing
techniques from DeRemer and Penello's seminal 1982 paper on LALR parsing; techniques from DeRemer and Penello's seminal paper on LALR parsing
more on this in the next entry. (@pxref{Bibliography,,DeRemer 1982}).
Use of byacc spread rapidly due to its public domain license. However, once Use of byacc spread rapidly due to its public domain license. However, once
Bison became available, byacc itself passed out of general use. Bison became available, byacc itself passed out of general use.
@@ -13071,41 +13071,39 @@ Bison became available, byacc itself passed out of general use.
@section Bison @section Bison
Robert Corbett actually wrote two (closely related) LALR parsers in 1985, Robert Corbett actually wrote two (closely related) LALR parsers in 1985,
both using the DeRemer/Penello techniques. One was zoo, the other was both using the DeRemer/Penello techniques. One was ``zoo'', the other was
``Byson''. In 1987 Richard Stallman began working on Byson; the name changed ``Byson''. In 1987 Richard Stallman began working on Byson; the name changed
to Bison and the interface became Yacc-compatible. to Bison and the interface became Yacc-compatible.
The main visible difference between Yacc and Byson/Bison at the time of The main visible difference between Yacc and Byson/Bison at the time of
Byson's fiest release is that Byson supported the @@N construction (giving Byson's first release is that Byson supported the @code{@@@var{n}} construct
access to the starting and ending line number and character number (giving access to the starting and ending line number and character number
associated with any of the symbols in the current rule). associated with any of the symbols in the current rule).
There was also the command '%expect N' which said not to mention There was also the command @samp{%expect @var{n}} which said not to mention the
the conflicts if there are N shift/reduce conflicts and no reduce/reduce conflicts if there are @var{n} shift/reduce conflicts and no reduce/reduce
conflicts. In more recent versions of Bison, %expect and an %expect-rr conflicts. In more recent versions of Bison, @code{%expect} and its
variant for reduce-reduce conficts can be applied to individual rules. @code{%expect-rr} variant for reduce-reduce conflicts can be applied to
individual rules.
Later version of Bison added nany more new features. Later versions of Bison added many more new features.
Bison error reporting has been improved in various ways. Notably. ancestral Bison error reporting has been improved in various ways. Notably. ancestral
Yacc and Byson did not have carets in error messages. Yacc and Byson did not have carets in error messages.
Compared to Yacc Bison uses a faster but less space-efficient encoding for Compared to Yacc Bison uses a faster but less space-efficient encoding for
the parse tables (see Corbett's PhD thesis from Berkeley, ``Static Semantics the parse tables (@pxref{Bibliography,,Corbett 1984}), and more modern
in Compiler Error Recovery'', June 1985, Report No. UCB/CSD 85/251), and techniques for generating the lookahead sets (@pxref{Bibliography,,DeRemer
more modern technique for generating the lookahead sets. See Frank DeRemer 1982}). This approach is the standard one since then.
and Thomas Pennello, @url{https://dx.doi.org/10.1145/69622.357187, Efficient
Computation of LALR(1) Look-Ahead Sets}, ACM Transactions on Programming
Languages and Systems (TOPLAS) 4, 4 (October 1982), 615-649. Their
technique has been the standard one since .
(It has also been plausibly alleged the differences in the algorithms stem (It has also been plausibly alleged the differences in the algorithms stem
mainly from the horrible kludges that Johnson had to perpetrate to make mainly from the horrible kludges that Johnson had to perpetrate to make
the original Yacc fit in a PDP-11.) the original Yacc fit in a PDP-11.)
Named references, semantic predicates, %locations, %glr-parser, %printer, Named references, semantic predicates, @code{%locations},
%destructor, dumps to DOT, %parse-param, %lex-param, and dumps to XSLT, LAC, @code{%glr-parser}, @code{%printer}, %destructor, dumps to DOT,
and IELR(1) generation are new in Bison. @code{%parse-param}, @code{%lex-param}, and dumps to XSLT, LAC, and IELR(1)
generation are new in Bison.
Bison also has many features to support C++ that were not present in the Bison also has many features to support C++ that were not present in the
ancestral Yacc or Byson. ancestral Yacc or Byson.
@@ -14303,7 +14301,24 @@ resolution. @xref{Unreachable States}.
@node Bibliography @node Bibliography
@unnumbered Bibliography @unnumbered Bibliography
@c Please follow the followint canvas to add more references.
@table @asis @table @asis
@item [Corbett 1984]
@c author
Robert Paul Corbett,
@c title
Static Semantics in Compiler Error Recovery
@c in
Ph.D. Dissertation, Report No. UCB/CSD 85/251,
@c where
Departement of Electrical Engineering and Computer Science, Compute Science
Division, University of California, Berkeley, California
@c when
(June 1985).
@c url
@uref{http://xtf.lib.berkeley.edu/reports/TRWebData/accessPages/CSD-85-251.html}
@item [Denny 2008] @item [Denny 2008]
Joel E. Denny and Brian A. Malloy, IELR(1): Practical LR(1) Parser Tables Joel E. Denny and Brian A. Malloy, IELR(1): Practical LR(1) Parser Tables
for Non-LR(1) Grammars with Conflict Resolution, in @cite{Proceedings of the for Non-LR(1) Grammars with Conflict Resolution, in @cite{Proceedings of the
@@ -14328,6 +14343,14 @@ Look-Ahead Sets, in @cite{ACM Transactions on Programming Languages and
Systems}, Vol.@: 4, No.@: 4 (October 1982), pp.@: Systems}, Vol.@: 4, No.@: 4 (October 1982), pp.@:
615--649. @uref{http://dx.doi.org/10.1145/69622.357187} 615--649. @uref{http://dx.doi.org/10.1145/69622.357187}
@item [Johnson 1978]
Steven C. Johnson,
A portable compiler: theory and practice,
in @cite{Proceedings of the 5th ACM SIGACT-SIGPLAN symposium on
Principles of programming languages} (POPL '78),
pp.@: 97--104.
@uref{https://dx.doi.org/10.1145/512760.512771}.
@item [Knuth 1965] @item [Knuth 1965]
Donald E. Knuth, On the Translation of Languages from Left to Right, in Donald E. Knuth, On the Translation of Languages from Left to Right, in
@cite{Information and Control}, Vol.@: 8, Issue 6 (December 1965), pp.@: @cite{Information and Control}, Vol.@: 8, Issue 6 (December 1965), pp.@:
@@ -14360,8 +14383,8 @@ London, Department of Computer Science, TR-00-12 (December 2000).
@c LocalWords: NUM exp subsubsection kbd Ctrl ctype EOF getchar isdigit nonfree @c LocalWords: NUM exp subsubsection kbd Ctrl ctype EOF getchar isdigit nonfree
@c LocalWords: ungetc stdin scanf sc calc ulator ls lm cc NEG prec yyerrok rr @c LocalWords: ungetc stdin scanf sc calc ulator ls lm cc NEG prec yyerrok rr
@c LocalWords: longjmp fprintf stderr yylloc YYLTYPE cos ln Stallman Destructor @c LocalWords: longjmp fprintf stderr yylloc YYLTYPE cos ln Stallman Destructor
@c LocalWords: symrec val tptr FUN func struct sym enum IEC syntaxes @c LocalWords: symrec val tptr FUN func struct sym enum IEC syntaxes Byacc
@c LocalWords: fun putsym getsym arith funs atan ptr malloc sizeof Lex @c LocalWords: fun putsym getsym arith funs atan ptr malloc sizeof Lex pcc
@c LocalWords: strlen strcpy fctn strcmp isalpha symbuf realloc isalnum DOTDOT @c LocalWords: strlen strcpy fctn strcmp isalpha symbuf realloc isalnum DOTDOT
@c LocalWords: ptypes itype YYPRINT trigraphs yytname expseq vindex dtype Unary @c LocalWords: ptypes itype YYPRINT trigraphs yytname expseq vindex dtype Unary
@c LocalWords: Rhs YYRHSLOC LE nonassoc op deffn typeless yynerrs nonterminal @c LocalWords: Rhs YYRHSLOC LE nonassoc op deffn typeless yynerrs nonterminal
@@ -14410,7 +14433,11 @@ London, Department of Computer Science, TR-00-12 (December 2000).
@c LocalWords: fdiagnostics setlocale nullptr ast srcdir copyable iff drv @c LocalWords: fdiagnostics setlocale nullptr ast srcdir copyable iff drv
@c LocalWords: deftypefunx pragma Wnull dereference Wdocumentation elif ish @c LocalWords: deftypefunx pragma Wnull dereference Wdocumentation elif ish
@c LocalWords: Wdeprecated Wregister noinput yyloc yypos PODs sstream Wsign @c LocalWords: Wdeprecated Wregister noinput yyloc yypos PODs sstream Wsign
@c LocalWords: typename emplace Wconversion Wshorten @c LocalWords: typename emplace Wconversion Wshorten yacchack reentrancy
@c LocalWords: Relocatability exprs fixit Wyacc parseable fixits ffixit
@c LocalWords: DNDEBUG cstring Wzero workalike POPL workalikes byacc UCB
@c LocalWords: Penello's Penello Byson Byson's Corbett's CSD TOPLAS PDP
@c LocalWords: Beazley's goyacc ocamlyacc
@c Local Variables: @c Local Variables:
@c ispell-dictionary: "american" @c ispell-dictionary: "american"