I’m trying to write a regular expression engine. I’d like to write a recursive descent parser by hand. What would a context-free grammar without left recursion for the language of regular expressions (not the languages that can be described by regular expressions) look like? Would it be easiest to re-factor out the syntactic sugar, i.e. change a+ to aa* ? Thanks in advance!
I’m trying to write a regular expression engine. I’d like to write a recursive
Share
Left recursion:
Right recursion:
Ambiguous form: