[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: %destructor support for lalr1.cc
From: |
Akim Demaille |
Subject: |
Re: %destructor support for lalr1.cc |
Date: |
Mon, 09 Feb 2004 14:40:00 +0100 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
> After some testing with error recovery in my grammar, I've found
> that one of my error_start_ assignments was misplaced. This new
> patch corrects this (basically error_start_ assignments appear
> in lalr1.cc where yylerrsp increments occur in yacc.c).
> 2003-12-30 Alexandre Duret-Lutz <address@hidden>
> %destructor support and merge of error locations in lalr1.cc.
> * data/lalr1.cc (b4_cxx_destruct_def): New macro.
> (Parser::stos_): Define unconditionally.
> (Parser::destruct_): New method. Generate its body with
> b4_yydestruct_generate.
> (Parser::error_start_): New attribute.
> (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
> token which are discarded.
> (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
> error_start_ when erroneous token are discarded.
> (Parser::parse) <yyerrlab1>: Compute the location of the error
> token so that it covers all the discarded tokens.
> * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
> it can be called with `%skeleton "lalr1.cc"', and do that.
This looks good to me. Please, install!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: %destructor support for lalr1.cc,
Akim Demaille <=