error in yacc



Hai All!

I am new to lex and yacc..

I compile one yacc program , but it tells errors...

10 Rules never reduced..

how to debug the code.. just i am giving my yacc sample code...

%%
design_unit
: context_clause
library_unit
;

library_unit
: primary_unit
| secondary_unit
| error
;

I am not doing any actions..

Thanx

.



Relevant Pages

  • Re: ZX Spectrum BASIC Compiler just released
    ... yacc: Warning. ... Try to compile that file, ... Since pack the Windows version importing from a Linux machine, ...
    (comp.sys.sinclair)
  • Re: Using Flex and Bison
    ... > on the Lex file first, then the YACC file, and compile? ... I have read many tutorials, and some of the do it the other ... Just compile the file you have edited, be it the .l or the .y ...
    (comp.compilers)
  • Re: What is the main advantage of macros over functions?
    ... What do lex and yacc do? ... generate C code (as a precompile step) that then gets compiled into ... Lisp macros execute at compile time, ...
    (comp.lang.lisp)
  • yacc error
    ... I compile one yacc program, ... how to debug the code.. ...
    (comp.programming)
  • Re: Lex and Yacc
    ... > I am new to Linux Programming.... ... > can anyone tell me how to debug the following error in yacc .. ... handle shift/reduce and reduce/reduce problems. ...
    (comp.unix.programmer)