From: Paul Jakma (paul at domain clubi.ie)
Date: Mon 22 Jul 2002 - 17:26:25 IST
right... the person kevin is poking fun at is me.
secondly: i mailed him about lex + yacc being very cute tools.
thirdly: to illustrate i gave lex + yacc examples (slightly extended
versions of examples from a HOWTO on the net) to parse, eg:
zone "foo" {
master "bar.foo";
slave bongle-dongle 45.67.8.9;
slave floyd.foo;
type whatever;
file "/foo/bar";
include "/foo/doo/hosts.txt";
include /foo/doo/cnames.txt;
};
etc..
On Mon, 22 Jul 2002, John P. Looney wrote:
> domain: "bing.com"
> hosts: www mail arse smeg twitter
> ttl: 20000
>
> and then using lex & yacc, they could write a program that
> converts between that config file, and the tedious bind configs,
> and maybe even auto-generate a reverse DNS config file while they
> are at it.
the idea is to maintain one file, eg like the above, and have it
generate all the configs - and any entries that may be gleaned from
this config file. (eg SOA and NS).
> Personally, I think they are demented. It's much more a job for
> something simple like Sed or Awk.
ah.. no. sed - you'll only substitute stuff, not powerful enough. awk
doesnt have the data structures. i've looked.
then i sat down and started in perl, but the tedious parsing makes me
cry. so i thought, there must be stuff that makes parsing less
painful..
> People using lex & yacc just because they can make baby jesus cry.
well, i mailed kevin cause i was amazed how good these tools are.
lex is a doddle. yacc can seem pretty difficult, but it isnt once you
get your head round it. i'm just amazed how easy they make it to
parse complex (but well structured) text.
> Kate
regards,
-- Paul Jakma paul at domain clubi.ie paul at domain jakma.org Key ID: 64A2FF6A Fortune: Trust everybody, but cut the cards. -- Finlay Peter Dunne, "Mr. Dooley's Philosophy"
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:18:00 GMT