Using a parser generator in next generation VCL compiler
Knut Aksel Røysland
knutroy at linpro.no
Fri Dec 22 17:16:01 CET 2006
* Poul-Henning Kamp
>[...]
> I deliberately didn't use lex/yacc in v1 because the VCL language
> is so simple but mostly because I wanted strong error handling.
Thanks for clearing up. Being a newcomer, it can be hard to determine
the level of deliberate design which lies behind each part of the source.
> YACC generated grammers and LEX generated lexers have horrible
> error detection and reporting.
>[...]
Certainly, good error reporting should not be sacrificed. But having VCL
abstracted into some kind of BNF'ish representation, appears attractive
to me. Maybe this representation could be mixed with doc-strings, to
form the basis for generating a 100% accurate VCL reference manual? This
is AFAIK outside the scope of YACC anyway, but maybe there are more
"modern" parser generators out there, also having better error reporting?
But if the grammar is not going to become much more complex than today,
I guess this might be overkill.
--
Knut Aksel Røysland (off for Christmas holiday)
Linpro AS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20061222/41063e68/attachment-0003.pgp>
More information about the varnish-dev
mailing list