Hello, > Can you give an example of what ‘peg-parse’ and ‘peg:tree’ return?
'peg-parse' returns a match record, which contains the string that was parsed, the substring that actually matched, and the tree structure produced by the matching. 'peg:tree' gets the tree structure out of a match record. I hadn't really looked at this part of the module, but it looks to me now like the names aren't descriptive enough. Maybe we should change them before putting this in a release. Noah On Sat, Sep 10, 2011 at 5:35 PM, Ludovic Courtès <l...@gnu.org> wrote: > Hi! > > Noah Lavine <noah.b.lav...@gmail.com> skribis: > >> Right now I think you could get the same thing by running match on the >> output of the peg - something like >> >> (match (peg:tree (peg-parse <pattern> <tree>)) >> ((list-of-as) ...)). > > Can you give an example of what ‘peg-parse’ and ‘peg:tree’ return? > > Ludo’. > > PS: I would suggest removing the ‘peg-’ and ‘peg:’ prefixes. Users can > still use a renamer if the names clash. > > >