[Cl-yacc-ebnf-devel] Parser for parsers

Plato Wu gtalk000 at gmail.com
Fri Jan 22 11:54:55 UTC 2010


Mikhail Novikov <freiksenet at gmail.com> writes:

> Hello!
>
> My idea was to complement version number 2 with possibility to input alternate
> grammar types and get closure to which text in version number 1 can go to get
> parsed.
>
> So user uses make-grammar-grammar with something like:
>
> (grammar (expression (:repeat expression))
> (expression (rule-name (production))
> ....
>
> and defines grammatical structure of, for example, ebnf. The he can pass
> grammar rules in normal ebnf to make-grammar-maker and grammar maker returns a
> parser that he can use to parse stuff.
>
> I guess I overcomplicated terminology, lol :)
>
> The current thing seems to work, but it is pain in the arse to define
> grammar-grammar with tools that we provide, but I can't think of generalization
> that is good enough for defining grammar structures of grammars. :/
>
> Thanks, Mikhail
>
>> 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 ?

I'm not familiar with other modifications of ebnf grammar, but I
observe that EBNF's foundation is opreation or, so maybe other
variants can also build on it.

PS: Do you use Gtalk? Maybe we can discuss it in IM.




More information about the cl-yacc-ebnf-devel mailing list