Re: Question about token stack

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
Hi Ervin,

> Le 30 août 2020 à 20:21, Hegedüs Ervin <[email protected]> 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.
So in case of doubt:

*Don't exit from yyerror*.  How can you expect the parser to clean
up anything if you exit?

Read again the calling conventions for yyparse.

Cheers!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.