help-bison
[Top][All Lists]
Advanced

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

How do i use the %printer feature?


From: Adam Smalin
Subject: How do i use the %printer feature?
Date: Thu, 24 Feb 2011 02:37:38 -0500

I am using `%glr-parser` and the code below. I figure i would 1) See the
printf message or 2) Might be able to get a breakpoint on print_token_value
if i debug with an IDE. I see neither message or stop on my breakpoint. So
it appears %printer isnt ran or that i am using it incorrectly.

How do i use %printer correctly? one reason i want to use it is to debug
error tokens as suggested
http://lists.gnu.org/archive/html/help-bison/2011-02/msg00016.html

%glr-parser
%{
    ...
    static void print_token_value();
%}

%printer { print_token_value(123); printf
("helllllllllllllllllllllllllllooooooooooooooooooooooo %d", $$); } <*> <>

%token INTEGER ...
...


reply via email to

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