help-bison
[Top][All Lists]
Advanced

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

Re: Question about token stack


From: Ervin Hegedüs
Subject: Re: Question about token stack
Date: Tue, 1 Sep 2020 08:20:50 +0200
User-agent: NeoMutt/20171215

Hi Akim,

On Tue, Sep 01, 2020 at 07:38:57AM +0200, Akim Demaille wrote:
> > Le 30 août 2020 à 20:21, Hegedüs Ervin <airween@gmail.com> a écrit :
> > 
> > oh my... thanks, now it's clear.
> > 
> > Here is the result:
> > 
> > Starting parse
> > [...]
> > Entering state 1
> > Stack now 0 1
> > Reading a token
> > Next token is token T_CONFIG_DIRECTIVE_ARGUMENT ()
> > Parse error: syntax error in file badconf1.conf, line 1
> 
> It's not clear to me if you finally understood what's going on here.

which part do you think about?

> So in case of doubt:
> 
> *Don't exit from yyerror*.  How can you expect the parser to clean
> up anything if you exit?

I'ld try to clean up everything before exit - that's my goal. I
can call the other (custom) cleanup methods from yyerror, only
the symbol stack which isn't empty.
 
> Read again the calling conventions for yyparse.

thanks, I'll do.


Thanks again,


a.
 



reply via email to

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