Subj : Re: Parsing regular languages To : comp.programming From : Flavius Vespasianus Date : Thu Aug 04 2005 04:02 pm Omri Barel wrote in news:brbIe.87498$Pf3.36361 @fe2.news.blueyonder.co.uk: > > However, what happens if I have something that looks like a context free > grammar, but the language it describes is regular? In my case it's even > easier - the grammar is not recursive. So I have something like: Done all the time > > As you can see, I can simply expand the entire thing, because it's not > recursive: > Note that although there's no left-recursion problem (it's not > recursive), I'm trying to avoid any left-factoring, due to memory > requirements and processing time. So, if my grammar is: Right recursion causes more wasted memory in an LR parser. LL parsers can't handle it. .