On 08-Jul-12 00:19, Roman D. Boiko wrote:
On Saturday, 7 July 2012 at 20:09:56 UTC, Andrei Alexandrescu wrote:
On 7/7/12 3:17 PM, Dmitry Olshansky wrote:
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.

Interesting. I'll have to ask for more details on why.

Andrei

+1. Personally I associate PEG with a parser that includes a
__distributed__ lexer inside,


Well put yet it's still lexer. And most horribly it's not optimized to DFAs most of the time last time I've checked papers.

 which gives the advantage of having to
check less alternatives at each step (that's similar to deterministic
parsing). If lexer is separate, it seems to be more difficult to scan
for only a subset of possible tokens.

And given the backtracking nature of PEGs you'll do your distributed thing many times over or ... spend a lot of RAM to remember not to redo it. I recall lexing takes even more then parsing itself.

--
Dmitry Olshansky


Reply via email to