Related articles |
---|
Re: Parsing single sentences with yacc++ bz@compres.uucp (1991-03-19) |
Newsgroups: | comp.compilers |
From: | bz@compres.uucp (Barbara Zino) |
Posted-Date: | Tue, 19 Mar 91 09:51:59 EST |
Keywords: | parse, yacc |
Organization: | Compilers Central |
References: | <1991Mar15.164557.12439@infonode.ingr.com> |
Date: | Tue, 19 Mar 91 09:51:59 EST |
> 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?
There is a newly released lexer and parser generator named Yacc++ which
contains built-in features to solve your problem. Yacc++ generates lexer
and parser objects instead of monolithic lexer and parser programs.
1) Lexer and parser objects created by Yacc++ can operate in a
"call-back mode" which retain the state of the parser between
calls. Call-back objects are reentrant. This enables the parser to
pick up where it last left off. This also enables "back and forth"
parsing of multiple files.
2) Parser objects can have multiple entry points into the parse tree.
This allows parsing of a subset of the language that was defined.
You can parse branches of the parse tree, not just the entire tree.
3) Yacc++ provides a "remove" declaration which gives you control of what
stays on the parse stack.
Yacc++ was recently announced on comp.newprod. It is currently being shipped
on Sun-3 and Sun-4's. A single user license is priced at $995.
Porting to other platforms is available.
Barbara Zino voice: (508) 435-5016
Compiler Resources, Inc. fax: (508) 435-4847
3 Proctor Street email: primerd!compres!bz
Hopkinton, MA 01748 crackers!compres!bz
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.