[Cl-yacc-ebnf-devel] Parser for parsers
Plato Wu
gtalk000 at gmail.com
Thu Jan 21 13:15:39 UTC 2010
Mikhail Novikov <freiksenet at gmail.com> writes:
> Hello!
>
> Pushed my changes. I think this is a nice base for how this parser-parser
> should work, but some usability changes would be really nice and I am a bit
> stuck at that.
>
> Thanks for your help, Mikhail
>
> On 01/04/2010 03:40 PM, Plato Wu wrote:
>> Mikhail Novikov <freiksenet at gmail.com> writes:
>>
>>> Hello!
>>>
>>> I hope you had nice and happy holidays :)
>>>
>>> As you all know, the ebnf part of the cl-yacc is fully implemented and
> working
>>> and now there is a need to make parser for normal style ebnf grammar. As
> there
>>> are many modifications of ebnf grammar (standard, CLHS, extended) I though
> that
>>> it would be nice to have an abstraction layer on top of cl-yacc that allows
> to
>>> define grammar types in easy way. Basically, user provides cl-yacc grammar
> for
>>> the grammar type (like ebnf) and then it gets a closure which outputs a
> parser
>>> each time it receives actual grammar in previously given style. I have done
>>> this part, but now the problem is that it is very hard to generalize grammar
>>> styles, so definition of new grammar types is as tedious as normal parser
>>> grammar definition.
>>>
>>> I wonder if anyone have good ideas on how to abstract this kind of thing
>>> efficiently.
>>>
>>> Cheers, Mikhail
>>>
>>> _______________________________________________
>>> Cl-yacc-ebnf-devel mailing list
>>> Cl-yacc-ebnf-devel at common-lisp.net
>>> http://common-lisp.net/cgi-bin/mailman/listinfo/cl-yacc-ebnf-devel
>>
>> Could you push the part which you have finished first? Thank you!
>
>
> _______________________________________________
> Cl-yacc-ebnf-devel mailing list
> Cl-yacc-ebnf-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/cl-yacc-ebnf-devel
Sorry, I don't full understand what is the meaning of grammar-grammar
and parser-parser.
1. User input text like:
"S := '-'? D+ ('.' D+)?
D := '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'"
and get *expression-ebnf-parser* by our parser-parser.
2. User input production like:
(:or ...) (:repeat (:or ...)) ...
and get define-ebnf-parser closure.
Which way is correct ?
More information about the cl-yacc-ebnf-devel
mailing list