]> git.saurik.com Git - bison.git/commitdiff
doc: fix lalr1.cc documentation.
authorAkim Demaille <demaille@gostai.com>
Mon, 10 May 2010 08:27:23 +0000 (10:27 +0200)
committerAkim Demaille <demaille@gostai.com>
Mon, 10 May 2010 08:27:23 +0000 (10:27 +0200)
* doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
(C++ Bison Interface): Fix lalr1.cc skeleton name.
(C++ Parser Interface): Fix semantic_type and location_type names.
Document yy::parser::token.
Reported by Jerry Quinn.

ChangeLog
THANKS
doc/bison.texinfo

index 6dc0c02ae89763ee2b9a3b8fbb2ab6da7dadd2fa..398f39b2f5a68131819d9fe89f7e3fea688bb334 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-05-10  Akim Demaille  <demaille@gostai.com>
+
+       doc: fix lalr1.cc documentation.
+       * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
+       (C++ Bison Interface): Fix lalr1.cc skeleton name.
+       (C++ Parser Interface): Fix semantic_type and location_type names.
+       Document yy::parser::token.
+       Reported by Jerry Quinn.
+
 2010-05-07  Akim Demaille  <demaille@gostai.com>
 
        doc: fix typo.
 2010-05-07  Akim Demaille  <demaille@gostai.com>
 
        doc: fix typo.
diff --git a/THANKS b/THANKS
index 6efa2efa920267a562f08ce38272bf078cd12a6a..ae79e63d088be5a43f96be4bc3f9ea9b5b0c165c 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -44,6 +44,7 @@ Guido Trentalancia        trentalg@aston.ac.uk
 H. Merijn Brand           h.m.brand@hccnet.nl
 Hans Aberg                haberg@matematik.su.se
 Jan Nieuwenhuizen         janneke@gnu.org
 H. Merijn Brand           h.m.brand@hccnet.nl
 Hans Aberg                haberg@matematik.su.se
 Jan Nieuwenhuizen         janneke@gnu.org
+Jerry Quinn               jlquinn@optonline.net
 Jesse Thilo               jthilo@gnu.org
 Jim Kent                  jkent@arch.sel.sony.com
 Jim Meyering              jim@meyering.net
 Jesse Thilo               jthilo@gnu.org
 Jim Kent                  jkent@arch.sel.sony.com
 Jim Meyering              jim@meyering.net
index 6583dbddaa2fd41f5191e9dcefc4ab51c79574e4..b385e39865ed13ec264b3932931d89089e56e151 100644 (file)
@@ -8013,8 +8013,8 @@ int yyparse (void);
 @c - initial action
 
 The C++ @acronym{LALR}(1) parser is selected using the skeleton directive,
 @c - initial action
 
 The C++ @acronym{LALR}(1) parser is selected using the skeleton directive,
-@samp{%skeleton "lalr1.c"}, or the synonymous command-line option
-@option{--skeleton=lalr1.c}.
+@samp{%skeleton "lalr1.cc"}, or the synonymous command-line option
+@option{--skeleton=lalr1.cc}.
 @xref{Decl Summary}.
 
 When run, @command{bison} will create several entities in the @samp{yy}
 @xref{Decl Summary}.
 
 When run, @command{bison} will create several entities in the @samp{yy}
@@ -8163,11 +8163,19 @@ this class is detailed below.  It can be extended using the
 it describes an additional member of the parser class, and an
 additional argument for its constructor.
 
 it describes an additional member of the parser class, and an
 additional argument for its constructor.
 
-@defcv {Type} {parser} {semantic_value_type}
-@defcvx {Type} {parser} {location_value_type}
+@defcv {Type} {parser} {semantic_type}
+@defcvx {Type} {parser} {location_type}
 The types for semantics value and locations.
 @end defcv
 
 The types for semantics value and locations.
 @end defcv
 
+@defcv {Type} {parser} {token}
+A structure that contains (only) the definition of the tokens as the
+@code{yytokentype} enumeration.  To refer to the token @code{FOO}, the
+scanner should use @code{yy::parser::token::FOO}.  The scanner can use
+@samp{typedef yy::parser::token token;} to ``import'' the token enumeration
+(@pxref{Calc++ Scanner}).
+@end defcv
+
 @deftypemethod {parser} {} parser (@var{type1} @var{arg1}, ...)
 Build a new parser object.  There are no arguments by default, unless
 @samp{%parse-param @{@var{type1} @var{arg1}@}} was used.
 @deftypemethod {parser} {} parser (@var{type1} @var{arg1}, ...)
 Build a new parser object.  There are no arguments by default, unless
 @samp{%parse-param @{@var{type1} @var{arg1}@}} was used.
@@ -8206,7 +8214,7 @@ The parser invokes the scanner by calling @code{yylex}.  Contrary to C
 parsers, C++ parsers are always pure: there is no point in using the
 @code{%define api.pure} directive.  Therefore the interface is as follows.
 
 parsers, C++ parsers are always pure: there is no point in using the
 @code{%define api.pure} directive.  Therefore the interface is as follows.
 
-@deftypemethod {parser} {int} yylex (semantic_value_type& @var{yylval}, location_type& @var{yylloc}, @var{type1} @var{arg1}, ...)
+@deftypemethod {parser} {int} yylex (semantic_type* @var{yylval}, location_type* @var{yylloc}, @var{type1} @var{arg1}, ...)
 Return the next token.  Its type is the return value, its semantic
 value and location being @var{yylval} and @var{yylloc}.  Invocations of
 @samp{%lex-param @{@var{type1} @var{arg1}@}} yield additional arguments.
 Return the next token.  Its type is the return value, its semantic
 value and location being @var{yylval} and @var{yylloc}.  Invocations of
 @samp{%lex-param @{@var{type1} @var{arg1}@}} yield additional arguments.
@@ -8850,7 +8858,7 @@ The first, inclusive, position of the range, and the first beyond.
 @end deftypeivar
 
 @deftypeop {Constructor} {Location} {} Location (Position @var{loc})
 @end deftypeivar
 
 @deftypeop {Constructor} {Location} {} Location (Position @var{loc})
-Create a @code{Location} denoting an empty range located at a given point. 
+Create a @code{Location} denoting an empty range located at a given point.
 @end deftypeop
 
 @deftypeop {Constructor} {Location} {} Location (Position @var{begin}, Position @var{end})
 @end deftypeop
 
 @deftypeop {Constructor} {Location} {} Location (Position @var{begin}, Position @var{end})
@@ -9064,7 +9072,7 @@ Return immediately from the parser, indicating success.
 @end deffn
 
 @deffn {Statement} {return YYERROR;}
 @end deffn
 
 @deffn {Statement} {return YYERROR;}
-Start error recovery without printing an error message. 
+Start error recovery without printing an error message.
 @xref{Error Recovery}.
 @end deffn
 
 @xref{Error Recovery}.
 @end deffn