From: mirian@... (Mirian Crzig Lennox) Date: 2001-05-31T09:23:20+09:00 Subject: [ruby-talk:16065] Re: java based interpreter and regexes In article , Stefan Matthias Aust wrote: > >I wasn't really successful. Most parsers, including javacc are LL(1) >or LL(k) parsers. Unfortunately, Ruby can't be expressed as LL(k) >grammar, so these parsers aren't powerful enough to be used without >modification. >I think, you has to use at least an LALR(k) parser, BYACC or CUP for >example. Unfortunately, Ruby isn't also LALR(k), not even LR(k) or >any context free grammar. I'm intrigued. What issues in Ruby prevent it from being expressible in either LL(k) or LR(k), for sufficiently high values of 'k'? I wouldn't have expected there to be that many areas of semantic ambiguity in the grammar (but admittedly I haven't attempted to implement it). --Mirian