Simple Recursive Decent Parser question

typingcat@gmail.com
6 Oct 2006 17:12:00 -0400

          From comp.compilers

Related articles
Simple Recursive Decent Parser question typingcat@gmail.com (2006-10-06)
Re: Simple Recursive Decent Parser question DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-10-07)
| List of all articles for this month |
From: typingcat@gmail.com
Newsgroups: comp.compilers
Date: 6 Oct 2006 17:12:00 -0400
Organization: Compilers Central
Keywords: parse, LL(1)
Posted-Date: 06 Oct 2006 17:12:00 EDT

I'm writing a recursive decent parser for a language called c- for a
school project. Is it OK to merge two or more EBNF rules into one rule
(to reduce the number of functions)? This question looks (a little bit
| very) dumb but I wonder if it causes some kind of associativity
problem or something.


For example,
2. declaration-list->{declaration}+
3. declaration->var-declaration | fun-declaration


declaration-list->{var-declaration | fun-declaration}+


Thank you in advance.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.