Let's stop parser Hell

deadalnix deadalnix at gmail.com
Sat Jul 7 18:22:15 PDT 2012


On 07/07/2012 21:17, Dmitry Olshansky wrote:
> On 07-Jul-12 22:23, Andrei Alexandrescu wrote:
>> On 7/7/12 6:24 AM, Roman D. Boiko wrote:
>>> On Saturday, 7 July 2012 at 09:06:57 UTC, Roman D. Boiko wrote:
>>>> http://stackoverflow.com/questions/11373644/performance-of-parsers-peg-vs-lalr1-or-llk
>>>>
>>>>
>>>>
>>>
>>> So far it looks like LALR parsers may have lower constant factors than
>>> Packrat.
>>>
>>> The difference could be minimized by paying attention to parsing of
>>> terminal symbols, which was in my plans already. It is not necessary to
>>> strictly follow Packrat parsing algorithm.
>>>
>>> The benefits of Pegged, in my view, are its support of Parsing
>>> Expression Grammar (PEG) and compile-time evaluation. It is easily
>>> extensible and modifiable.
>>
>> Isn't also the fact that lexing and parsing are integrated? With
>> traditional LALR you need a separate tokenizer.
>>
>
> I'll have to point out that the whole point about integrated lexing is
> moot. It's more of liability then benefit. At very least it's just
> implementation curiosity not advantage.
>

Many usages only need a lexer.


More information about the Digitalmars-d mailing list