[prog] Yacc - double errors (EOF detection)

Sue Stones suzo at spin.net.au
Wed Feb 11 12:48:33 EST 2004


Messages were taking so long to get through that I didn't get your reply 
yesterday.

After lots of trial and error, including <<EOF>>  basically all day yesterday, 
and until 3am.  Eventually it worked.  Problem is I don't know what it was 
that caused the change. So realy I am no wiser.  But at lest I can fo on to 
the next step.  

I have a week and a half before uni goes back, so I hope I can finish the 
compiler before then.  I have about 8 months worth of 'jobs around the house' 
to do in tht week and a half, as well as some job applications.

I still feel no wiser about why I would want to use yacc though, so I may not 
do any more after this is done.

sue


On Wed, 11 Feb 2004 10:36 am, Jimen Ching wrote:
> On Tue, 10 Feb 2004, Sue Stones wrote:
> >My Yacc program keeps on trying to process things after it gets an end of
> >file.  It even processes the EOF but just doesn't stop.
>
> This is a common problem.  Most of the books I've read didn't have a
> portable solution.  The solution I used is in the lexer.  The flex lexer
> contains a special token <<EOF>> that you can detect.  I don't think
> there's anything in yacc that will help here.
>
> If you find a portable solution that consistently works, let me know.
> Thanks.
>
> --jc



More information about the Programming mailing list