Let's stop parser Hell
Dmitry Olshansky
dmitry.olsh at gmail.com
Sat Jul 7 12:15:45 PDT 2012
On 07-Jul-12 22:25, Andrei Alexandrescu wrote:
> On 7/7/12 7:33 AM, Dmitry Olshansky wrote:
>> On 07-Jul-12 15:30, Roman D. Boiko wrote:
>>> On Saturday, 7 July 2012 at 10:26:39 UTC, Roman D. Boiko wrote:
>>>> I think that Pegged can be heavily optimized in performance, and there
>>>> are no
>>>> fundamental issues which would make it inherently slower than LALR or
>>>> a hand-written D-specific parser.
>>>
>>> Hmm... found an interesting article:
>>> http://www.antlr.org/papers/LL-star-PLDI11.pdf
>>>
>>> It describes some disadvantages of Packrat parsing, like problems with
>>> debugging and error recovery. These are important for DCT, so I'll have
>>> to perform additional research.
>>
>> Yup, LL(*) is my favorite so far.
>
> That's Terence Parr's discovery, right? I've always liked ANTLR, so if
> PEGs turn out to have issues LL(*) sounds like a promising alternative.
>
> How many semantics hacks does D's syntax need for a LL(*) parser?
>
I believe that it may need very few _semantic_ predicates. But there are
cases where infinite lookahead is a must. Can't recall which cases offhand.
>
> Andrei
>
>
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list