Packrat Parsing: Simple, Powerful, Lazy, Linear Time [pdf]
pdos.csail.mit.edu
Packrat Parsing: Simple, Powerful, Lazy, Linear Time [pdf]
1–10 of 25 posts
Re: Packrat Parsing: Simple, Powerful, Lazy, Linear Time [pdf]
#2But I still think it's a pretty good idea.
Re: Packrat Parsing: Simple, Powerful, Lazy, Linear Time [pdf]
#3Packrat Parsing: Simple, Powerful, Lazy, Linear Time, Unlimited Memory But I still think it's a pretty good idea.
Re: Packrat Parsing: Simple, Powerful, Lazy, Linear Time [pdf]
#4Packrat Parsing: Simple, Powerful, Lazy, Linear Time, Unlimited Memory But I still think it's a pretty good idea.
Memory usage is linear too. It’s bounded by length of input * number of rules in the grammar.
The mathematical function doesn't matter as much as the practical overhead.
I mean... the clue's in the name, right?
(I worked on PEG and Packrat for my MEng.)
Re: Packrat Parsing: Simple, Powerful, Lazy, Linear Time [pdf]
#5Packrat Parsing: Simple, Powerful, Lazy, Linear Time, Unlimited Memory But I still think it's a pretty good idea.
But, seriously, it's called "packrat parsing," because it saves all the things. You have to expect it's going to use a bit of memory.
Re: Packrat Parsing: Simple, Powerful, Lazy, Linear Time [pdf]
#6Re: Packrat Parsing: Simple, Powerful, Lazy, Linear Time [pdf]
#7Re: Packrat Parsing: Simple, Powerful, Lazy, Linear Time [pdf]
#8Packrat Parsing: Simple, Powerful, Lazy, Linear Time, Unlimited Memory But I still think it's a pretty good idea.
It turns out that, in practice, it's better to be selective about where you apply the packrat mechanism.
Re: Packrat Parsing: Simple, Powerful, Lazy, Linear Time [pdf]
#9Packrat Parsing: Simple, Powerful, Lazy, Linear Time, Unlimited Memory But I still think it's a pretty good idea.
Re: Packrat Parsing: Simple, Powerful, Lazy, Linear Time [pdf]
#10Proposal to use PEG parser in python https://www.python.org/dev/peps/pep-0617/
Python PEG grammar https://github.com/python/cpython/blob/3.9/Grammar/python.gr...