[Cl-yacc-ebnf-devel] Parser for parsers
Mikhail Novikov
freiksenet at gmail.com
Thu Jan 21 13:26:37 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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 ?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAktYVg0ACgkQPHyh4sfuKrmf1gCfXtqJZjKRusWFKPLtTa7E1BNm
4i0AoISTtHPltQeKrJ2GyszPxIBAjgjP
=797g
-----END PGP SIGNATURE-----
More information about the cl-yacc-ebnf-devel
mailing list