Re: custom error reporting with c++
r0ller <[email protected]> Thu, 9 Jan 2025 20:12:24 +0000 (GMT)
| Newsgroups | gmane.comp.parsers.bison.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Christian,You're right. That's an embarrassing mistake from me. Sorry fo= r the noise. I should have read this one instead: https://www.gnu.org/softw= are/bison/manual/html_node/C_002b_002b-Parser-Context.htmlBest regards,r0ll= er-------- Eredeti lev=C3=A9l --------Felad=C3=B3: Christian Schoenebeck <s= [email protected]>D=C3=A1tum: 2025 janu=C3=A1r 9 13:29:19T=C3=A1rgy:= Re: custom error reporting with c++C=C3=ADmzett: [email protected] Wedn= esday, 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_synta= x_error() in the epilogue based on the documentation > at https://www.gnu.o= rg/software/bison/manual/html_node/Syntax-Error-> Reporting-Function.htmlHo= wever, if I use '%language "c++"' then I get an > error like there's no typ= e named yypcontext_t and indeed if I search for > that type in the generate= d 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 thi= s?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://fos= sies.org/linux/bison/examples/c++/glr/c++-types.yy#l_110 /Christian