[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to enable trace in bison C++ parser
From: |
Gvnaena Pura |
Subject: |
Re: how to enable trace in bison C++ parser |
Date: |
Fri, 24 Aug 2007 13:35:41 -0700 |
User-agent: |
G2/1.0 |
On Aug 23, 9:50 am, "Martin Jost" <Martin.J...@siemens.com> wrote:
> "Gvnaena Pura" <tianran.c...@gmail.com> schrieb im
> Newsbeitrag1187804675.890164.195980@x40g2000prg.googlegroups.com">news:1187804675.890164.195980@x40g2000prg.googlegroups.com...
>
> > Hi,
>
> > I know for C parsers, one can simply #define YYDEBUG to be 1, and set
> > yydebug=1 somewhere, and then the parser will print trace information
> > at each step. But how can I do this for C++ parser? I
> > used ::set_debug_level and ::set_debug_stream, and there is no effect
> > at all. How can I do this? Thanks in advance.
>
> According to my notes, this should do the trick. But I had my share of
> trouble here.
> Two notes:
> - Try option -t to bison
> - If you changed the prefix from yy to something else ('%name-prefix="..."'
> or '-p' to bison), you need to change it too on yydebug.
Yes, that was the problem. Thanks!