[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: custom error reporting with c++
From: |
r0ller |
Subject: |
Re: custom error reporting with c++ |
Date: |
Thu, 9 Jan 2025 20:12:24 +0000 (GMT) |
Hi Christian,You're right. That's an embarrassing mistake from me. Sorry for
the noise. I should have read this one instead:
https://www.gnu.org/software/bison/manual/html_node/C_002b_002b-Parser-Context.htmlBest
regards,r0ller-------- Eredeti levél --------Feladó: Christian Schoenebeck
<schoenebeck@crudebyte.com>Dátum: 2025 január 9 13:29:19Tárgy: Re: custom error
reporting with c++Címzett: help-bison@gnu.orgOn Wednesday, January 8, 2025
2:20:37 PM CET r0ller wrote: > Hi All,I'm trying to make use of custom error
reporting and define the > function yyreport_syntax_error() in the epilogue
based on the documentation > at
https://www.gnu.org/software/bison/manual/html_node/Syntax-Error->
Reporting-Function.htmlHowever, if I use '%language "c++"' then I get an >
error like there's no type named yypcontext_t and indeed if I search for > that
type in the generated parser source, I can't find it. If I use > '%language
"c"' then that type appears in the generated parser source. Does > anyone have
any hint on this?Thanks in advance,r0ller Well, you are actively asking for
the Bison C++ API. Then you should also use the C++ API, not the C API. ;-)
https://fossies.org/linux/bison/examples/c++/glr/c++-types.yy#l_110 /Christian