[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: sablecc-list@sable.mcgill.ca*Subject*: Translation of EBNF ops?*From*: Robert Feldt <feldt@ce.chalmers.se>*Date*: Wed, 21 Feb 2001 11:08:55 +0100 (MET)*Sender*: owner-sablecc-list@sable.mcgill.ca

Dear Etienne and other SableCC guru's, I'm interested in how SabelCC transforms the EBNF operators to BNF constructs. Its not totally clear to me after reading Etienne's thesis. From the numbered list on page 48 my impression is that: * a -> c b? d is translated to a -> c b d | c d * a -> c b+ d is translated to a -> c t d t -> t b | b * a -> c b* d is translated to a -> c t d | c d t -> t b | b Is this correct so that for example a -> b+ c? would be translated to a -> t c | t t -> t b | b ? But then I'm confused on the next page where it says: "We have learned, by experience, that the obvious implementation for (?), by creating a new production (temp = x | ;) causes more LALR(1) conflicts than our current implementation". But isn't that exactly what is done? Or do you mean that (a -> c b? d), in this latter scheme, would be translated to (a -> c t d) and (t -> b | ;)? Regards, Robert

**Follow-Ups**:**Re: Translation of EBNF ops?***From:*"Etienne M. Gagnon" <egagnon@j-meg.com>

- Prev by Date:
**about AST serialization** - Next by Date:
**Re: Translation of EBNF ops?** - Prev by thread:
**about AST serialization** - Next by thread:
**Re: Translation of EBNF ops?** - Index(es):