From: Eric Mahurin Date: 2008-02-09T09:40:36+09:00 Subject: Re: [SUMMARY] Parsing JSON (#155) ------=_Part_30063_10168610.1202517644113 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Feb 8, 2008 5:59 PM, Clifford Heath wrote: > James Gray wrote: > > On Feb 8, 2008, at 12:27 PM, Eric Mahurin wrote: > >>> Treetop was definitely the most popular > >> But not nearly the fastest... > > That's true, but I think the need for raw speed in parsers is seldom > > the top priority. > > I was frankly amazed how much of the discussion was about speed. > Besides, there's an awful lot of useful languages that you can't > do with LL(1). Including Ruby and C... There are techniques to convert LL(k) and LR(k) grammars to LL(1) and LR(1) (factoring, left-recursion removal), but they can make the grammar get large and can make the actions difficult. C shouldn't be an issue. Ruby is definitely a beast to parse. Starting with the YACC spec, (almost) any LL/recursive-descent/packrat parser will have a hard time dealing with the left-recursion. Not to mention all of the lexer states. Starting from scratch is probably a better choice for many LL/recursive-descent/packrat in handling LR grammars (with left-recursion). That being said, I have a way of handling left-recursion directly in my development LL(1/*) parser generator. I haven't seen any other LL parsers do it. ------=_Part_30063_10168610.1202517644113--