Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!hsdndev!spdcc!iecc!compilers-sender From: pg@bsg.com (Peter Garst) Newsgroups: comp.compilers Subject: Parsing one sentence at a time Keywords: yacc, debug, ydb Message-ID: <1991Mar19.160026.10471@iecc.cambridge.ma.us> Date: 18 Mar 91 19:18:42 GMT References: <1991Mar15.164557.12439@infonode.ingr.com> Sender: compilers-sender@iecc.cambridge.ma.us Reply-To: pg@bsg.com (Peter Garst) Organization: Compilers Central Lines: 17 Approved: compilers@iecc.cambridge.ma.us Thomas Vaught asks: > Is there a way in which I can use yacc to parse a grammar > one sentence, a production which makes up a sentence, at a time? Our product, ydb, is a 100% backward compatible upgrade to yacc which does this, among other things. You can call return from any action, and continue the parse by calling yyparse() again. For example, we did a C preprocessor this way; each time you call yyparse() it returns one token in the input stream. Peter Garst P.O. Box 390018, Mountain View CA 94039 USA -- Send compilers articles to compilers@iecc.cambridge.ma.us or {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.