Re: More PEG

2011-09-19 Thread Noah Lavine
As promised, the 'wip-peg-fixed' branch now has an updated S-expression representation for PEG grammars, and updated documentation for it. As I understand it, the next thing to do before merging (and possibly the last thing!) is to think about what things should be named, so they can be easy for

Re: More PEG

2011-09-17 Thread Noah Lavine
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

Re: More PEG

2011-09-10 Thread Ludovic Courtès
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?

Re: More PEG

2011-09-09 Thread Noah Lavine
Hello, The syntactic changes you propose all make sense to me, FWIW. Great! Then I will push an implementation soon unless someone else objects. A more general question about PEG: how do you bind a variable to the result of a pattern?  For instance, if you want the result of (* a) to be

More PEG

2011-09-08 Thread Noah Lavine
Hello all, It looks to me like the last thing needed before the peg branch can be used is to change some of the S-expression representations of the components. Here are the five that I think need changing, taken from the manual, with suggested replacements. -- PEG Pattern: zero or more a