Re: Suggested dual human/binary interface for proc/devfs

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Wed Apr 12 2000 - 19:21:42 EST


Olaf Titz wrote:
> > On subject of parsing, and genrating the text file:-
> > 1. parsing and generating is easy, if syntax is regular-expression rather
> > than CFG.
>
> Exactly. And make it as simple RE as possible.
>
> Olaf
>
> (PS. to the one who asked: CFG=context-free grammar - the difference
> is that CFG allows for arbitrarily nested grouping while RE does not,
> and it follows that RE is much easier to parse with common tools like sed.)

Will just use a different common tool that can parse CFGs using an
RE-like syntax. Oh, there don't seem to be any except Perl 5.000latest :-)

Anyway, it's been pointed out that the CFG and non-CFG suggestions are
in fact identical apart from a few character substitutions. If you have
nesting, you need a state machine with your sed RE whatever the file
format.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:20 EST