doc: more pointers to the examples
Akim Demaille <[email protected]> Fri, 6 Aug 2021 18:03:13 +0200
| Newsgroups | gmane.comp.parsers.bison.patches |
|---|---|
| Message-ID | <[email protected]> |
commit d4b195ece65e20e42be5cfec09cb58ed876c3be4 Author: Akim Demaille <[email protected]> Date: Thu Aug 5 07:57:59 2021 +0200 doc: more pointers to the examples * doc/bison.texi (Infix Calc): Here. diff --git a/doc/bison.texi b/doc/bison.texi index 7b77f328..beee6f92 100644 --- a/doc/bison.texi +++ b/doc/bison.texi @@ -2204,7 +2204,10 @@ @node Infix Calc @cindex @code{calc} @cindex calculator, infix notation -We now modify rpcalc to handle infix operators instead of postfix. Infix +We now modify rpcalc to handle infix operators instead of +postfix.@footnote{A similar example, but using an unambiguous grammar rather +than precedence and associativity annotations, is available as +@file{examples/c/calc}.} Infix notation involves the concept of operator precedence and the need for parentheses nested to arbitrary depth. Here is the Bison code for @file{calc.y}, an infix desk-top calculator. @@ -2560,12 +2563,12 @@ @node Multi-function Calc @cindex @code{mfcalc} @cindex calculator, multi-function -Now that the basics of Bison have been discussed, it is time to move on to -a more advanced problem.@footnote{The sources of @command{mfcalc} are available as -@file{examples/c/mfcalc}.} The above calculators provided only five -functions, @samp{+}, @samp{-}, @samp{*}, @samp{/} and @samp{^}. It would -be nice to have a calculator that provides other mathematical functions such -as @code{sin}, @code{cos}, etc. +Now that the basics of Bison have been discussed, it is time to move on to a +more advanced problem.@footnote{The sources of @command{mfcalc} are +available as @file{examples/c/mfcalc}.} The above calculators provided only +five functions, @samp{+}, @samp{-}, @samp{*}, @samp{/} and @samp{^}. It +would be nice to have a calculator that provides other mathematical +functions such as @code{sin}, @code{cos}, etc. It is easy to add new operators to the infix calculator as long as they are only single-character literals. The lexical analyzer @code{yylex} passes