[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

How to retrieve all values from yacc/bison grammar keeps in value stack when error occurs?

Asked by anton_shiban in C Programming Language, Parsers

Tags: C

Hi,
  I have written a simple bison grammar which gets inut from local file and send the ouput as it is with out modifying anything to another file. If any input from file has different format from bison grammar, then bison grammar failes to match input tokens and calls yyerror() function. This case I lost the inputs and bison will not take further inputs from file also(execution stoped). I want handle something, when  error occur on grammar, bison should flush all values to output so that same input copied to ouput and then start taking next input from ex for further grammar check.

Thanks in advance.
 
[+][-]10/20/08 02:37 AM, ID: 22756107Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_2_20070628