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

From: Vardhan Varma (vardhanvarma@mailandnews.com)
Date: Tue Apr 11 2000 - 03:25:41 EST


        On subject of parsing, and genrating the text file:-
1. parsing and generating is easy, if syntax is regular-expression rather
        than CFG.
2. significance of white space - [ \t]
        just visually appeal
3. significance of new lines - [\n]
        putting all related info on a single line frees parser of a
        'state machine' . This may ease error recovery slightly

4. significance of noise chars [{}() ....]
        just visual appeal. Mostly they are noise. ( except in
        C when defining scopes ), since before first '{' you are
        putting a keyword which essentially defines what follows
        till '}'

        As long as it's RE, can be parsed with shell script too,
        just 'tr' off all noise chars, sed all spaces/tabs outside
        "" to newline, remove ^$'s, and get a little state machine
        in your script.

--Vardhan

On Tue, Apr 11, 2000 at 02:53:08AM -0500, Ed Carp wrote:
> George Bonser (grep@shorelink.com) writes:
> >
> > The logic to parse this should be very easy.
>
> In a shell script? I don't think so. Not nearly as easy as one-device-per-line.
>
> Oh, and your way is inefficient - more lines to read, and a lot of wasted space.
>

-
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:15 EST