[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: yylval is pointer

From: Akim Demaille
Subject: Re: yylval is pointer
Date: Tue, 3 Mar 2015 16:58:54 +0100

> Le 3 mars 2015 à 16:32, Akim Demaille <address@hidden> a écrit :
>> Le 24 févr. 2015 à 20:12, Askar Safin <address@hidden> a écrit :
>> Another bug in the same section We see the declaration "int yylex 
>> (semantic_type* yylval, location_type* yylloc, type1 arg1, ...)", i. e. 
>> yylval is a pointer. And then we see "yylval.build<int>()". It seems 
>> "yylval->build<int>()" should be. CC me.
> Hi Askar,
> You are right again.
> I'll apply the following patch.
> commit 75fbe357c896d84b9dedff98c8b0d43ca536bc95
> Author: Akim Demaille <address@hidden>
> Date:   Tue Mar 3 16:10:30 2015 +0100
>    doc: fixes in the C++ part
>    Reported by Askar Safin.
>    http://lists.gnu.org/archive/html/bug-bison/2015-02/msg00018.html
>    http://lists.gnu.org/archive/html/bug-bison/2015-02/msg00019.html
>    * doc/bison.texi (Split Symbols): Fix access to token types.
>    yylval is a pointer, so use ->.
>    Fix coding style issues: space before paren.

And then, I'll apply the following one.

commit baa423bd59767a687ad742adc66a5b7428a41dee
Author: Akim Demaille <address@hidden>
Date:   Tue Mar 3 16:47:58 2015 +0100

    doc: improve html and pdf rendering
    * doc/bison.texi: Help html conversion to understand where the
    function names end.
    Beware of PDF width.

diff --git a/doc/bison.texi b/doc/bison.texi
index 41c0c2b..737a119 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -10962,8 +10962,8 @@ it is still possible to give an integer as semantic 
value for a string.
 So for each token type, Bison generates named constructors as follows.
address@hidden {symbol_type} {} address@hidden (const @var{value_type}& 
@var{value}, const location_type& @var{location})
address@hidden {symbol_type} {} address@hidden (const location_type& 
address@hidden {symbol_type} {} address@hidden (const @var{value_type}& 
@var{value}, const location_type& @var{location})
address@hidden {symbol_type} {} address@hidden (const location_type& 
 Build a complete terminal symbol for the token type @var{token} (not
 including the @code{api.token.prefix}) whose possible semantic value is
 @var{value} of adequate @var{value_type}.  If location tracking is enabled,
@@ -10983,9 +10983,9 @@ For instance, given the following declarations:
 Bison generates the following functions:
-symbol_type make_IDENTIFIER (const std::string& v, const location_type& loc);
-symbol_type make_INTEGER (const int& v, const location_type& loc);
-symbol_type make_COLON (const location_type& loc);
+symbol_type make_IDENTIFIER (const std::string&, const location_type&);
+symbol_type make_INTEGER (const int&, const location_type&);
+symbol_type make_COLON (const location_type&);
 @end example

reply via email to

[Prev in Thread] Current Thread [Next in Thread]