On Sat, Oct 16, 2010 at 4:53 PM, .alyn.post.
<alyn.post@lodockikumazvati.org> wrote:
On Sat, Oct 16, 2010 at 04:04:21PM -0600, Jonathan Jones wrote:
> Does it have to use PEG? .camxes. uses a RATS! parser, maybe that is less
> of a "black box" and would work better for this? I'm only guessing, as I
> don't know thing 2 about parsers in general.
>
I believe RATS! is a particular implementation of PEG parsing. So
PEG parsing is a parsing technique, and Rats! is one of the
implementations of that technique.
Robin talks about this issue as it pertains to Lojban with some depth
here:
http://www.digitalkingdom.org/~rlpowell/hobbies/lojban/grammar/
Bryan Ford's Master's Thesis on Packrat Parsers is suprisingly
accessible, including what makes PG (Parsing Grammars) more
expressive than CFG's (Context-free Grammars):
http://pdos.csail.mit.edu/~baford/packrat/thesis/
He does make the assumption you're familiar with parsers in general.
The Abstract on that page is a great summary of what trade-offs you
make with packrat parsers vs Yacc-style parsers.
The book I learned parsing from is the "Dragon Book": _Compilers:
Principles, Techniques, and Tools_. There may be a better book these
days, but I won't be surprised if there isn't.
-Alan
--
.i ko djuno fi le do sevzi