Related articles |
---|
parser-generators for RRPGs dyck@cs.sfu.ca (Michael Dyck) (1993-01-28) |
EBNF Parser generator information (RRPG reply) thutt@MAIL.CASI.NASA.GOV (thutt) (1993-01-29) |
Re: parser-generators for RRPGs parrt@ecn.purdue.edu (1993-01-29) |
Re: EBNF Parser generator information (RRPG reply) reid@cherry.iss.nus.sg (1993-02-02) |
parser-generators for RRPGs: summary dyck@cs.sfu.ca (Michael Dyck) (1993-02-22) |
Re: parser-generators for RRPGs: summary schrod@iti.informatik.th-darmstadt.de (1993-02-25) |
Newsgroups: | comp.compilers |
From: | Michael Dyck <dyck@cs.sfu.ca> |
Organization: | Compilers Central |
Date: | Thu, 28 Jan 1993 02:02:26 GMT |
Keywords: | parse, tools, question, comment |
Regular right-part grammars (RRPGs) are a kind of phrase structure grammar
akin to context-free grammars (CFGs). In each production of an RRPG, the
LHS is a single non-terminal (as in a CFG), but the RHS is a regular
expression (or finite automaton) over the symbol set (rather than simply a
sequence of symbols, as in a CFG).
There are various notations for writing RRPGs (or slight restrictions
thereof), many called "extended BNF".
For example (from Modula-2):
if-statement = "IF" condition "THEN" statements
{ "ELSIF" condition "THEN" statements }
[ "ELSE" statements ]
"END"
It seems like most grammars presented for human consumption are RRPGs, but
most grammars presented for machine consumption are CFGs. What
parser-generators are available that accept some form of RRPG?
-Michael Dyck, dyck@cs.sfu.ca
[I've seen occasional references to something called eyacc, which appeared
to be an EBNF version of yacc. Is it not the case that RRPGs can be
mechanically translated to CFGs, in which case a preprocessor for a normal
parser generator might make sense? -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.