[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PEG Parser
From: |
Noah Lavine |
Subject: |
Re: PEG Parser |
Date: |
Thu, 27 Jan 2011 22:25:50 -0500 |
Hello again,
I've run into another issue with the parser that should be addressed
in the documentation (or the code?).
How do you match a character that is used in the PEG grammar, like
"["? Can you only define such matchers via s-expressions?
Noah
On Thu, Jan 27, 2011 at 12:17 AM, Noah Lavine <address@hidden> wrote:
> Hi,
>
>> It flattens until you have a list where each element either:
>> 1. Is an atom.
>> or 2. Is a list whose first element is in the list of keywords.
>>
>> So the car of the argument will change if it's a list that doesn't
>> start with the right keyword. E.g.:
>> (keyword-flatten '(a) '((c (a b)) (a b) (b a))) ->
>> (c (a b) (a b) b a)
>
> I see.
>
>> That's odd. Could you paste in the lambda expression it generates?
>
> Wait, actually, I realized it was my own error. My test function was
> using nonterminals, but I had only done (define grammar-string ....),
> not (define-grammar grammar-string). I think the generated code tried
> to call the nonterminals that should have been there, and threw an
> error when it didn't find them.
>
> The peg matcher is really awesome. I am glad to be able to use it soon.
>
> Noah
>
- Re: PEG Parser, (continued)
- Re: PEG Parser, Ludovic Courtès, 2011/01/17
- Re: PEG Parser, Noah Lavine, 2011/01/21
- Re: PEG Parser, Ludovic Courtès, 2011/01/22
- Re: PEG Parser, Noah Lavine, 2011/01/23
- Re: PEG Parser, Ludovic Courtès, 2011/01/24
- Re: PEG Parser, Noah Lavine, 2011/01/26
- Re: PEG Parser, Michael Lucy, 2011/01/26
- Re: PEG Parser, Noah Lavine, 2011/01/26
- Re: PEG Parser, Michael Lucy, 2011/01/26
- Re: PEG Parser, Noah Lavine, 2011/01/27
- Re: PEG Parser,
Noah Lavine <=
- Re: PEG Parser, Michael Lucy, 2011/01/28
- Re: PEG Parser, Andy Wingo, 2011/01/28
- Re: PEG Parser, Noah Lavine, 2011/01/28
- Re: PEG Parser, Michael Lucy, 2011/01/28
- Re: PEG Parser, Andy Wingo, 2011/01/29
- Re: PEG Parser, Noah Lavine, 2011/01/29
- Re: PEG Parser, Andy Wingo, 2011/01/30
- Re: PEG Parser, Andy Wingo, 2011/01/29