Hello, No Itisnt <theseaisinh...@gmail.com> writes:
> On Mon, Jul 5, 2010 at 6:59 PM, Michael Lucy <michaelgl...@gmail.com> wrote: >> On Mon, Jul 5, 2010 at 5:40 PM, Ludovic Courtès <l...@gnu.org> wrote: >>> Michael Lucy <michaelgl...@gmail.com> writes: >>> >>>> Files I've added so far: >>>> guile/modules/ice-9/peg.scm (I assume this is the right place to put this?) >>> >>> No, it should rather go under ‘module/language/peg.scm’, for the sake of >>> consistency with other compiler front-ends. But see below. >> >> I'm not quite sure how this qualifies as a compiler front-end. The >> functionality is mostly done (if unoptimized), so it shouldn't be too >> hard to turn it into one if that's what you want, but the original >> thought was just to build a compiling parser. E.g.: >> >> (use-modules (ice-9 peg)) >> (peg-find "'b'+" "aabbcc") >> --> (2 4 "bb") [...] >>>> PEG compiler: Works for all the grammars I've tested, no known bugs. >>>> Currently compiles to Scheme code rather than Tree-IL for debugging. >>> >>> It should rather compiler to tree-IL, like other front-ends, which is >>> very close to Scheme anyway. > > I think you are both misunderstanding eachother: > > - The PEG functions, useful in their own right, would be exposed as (ice-9 > peg). > - There is an additional syntax for expressing grammars, so it can be > better used as a parser generator. That would go in as (language peg). OK, I understand now. Sorry for the confusion! Ludo’.