lkml.org 
[lkml]   [2001]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PROPOSAL: dot-proc interface [was: /proc stuff]
Stephen Satchell wrote:
>
> At 12:23 PM 11/5/01 +0100, Martin Dalecki wrote:
> >Every BASTARD out there telling the world, that parsing ASCII formatted
> >files
> >is easy should be punished to providing a BNF definition of it's syntax.
> >Otherwise I won't trust him. Having a struct {} with a version field,
> >indicating
> >possible semantical changes wil always be easier faster more immune
> >to errors to use in user level programs.
>
> I would love for the people who write the code that generates the /proc
> info to be required to document the layout of the information. The best
> place for that documentation is the source, and in English or other
> accepted human language, in a comment block. Not in "header lines" or
> other such nonsense. I don't need no stinkin' BNF, just a reasonable

I don't agree. BNF is basically the only proper and efficient way for a
nice formal descrition of a LR parsable language. No accident most
programming
languages out there are defined in some sort of BNF.

> description of what each field is would suffice. I would go so far as to
> say there needs to be a standard established in how /proc data is formatted
> so that we can create templates for the standard tools.
>
> (I have to ask, have you ever used flex? I used to hand-code scanners, but
> I find that flex is so much easier and generates smaller faster code than I
> can do by hand. Changes are easy, too)

Short answer: yes I know them, yacc bison pure flex and lex whatever,
and
I used to use them for job projects not just toys. Trust me they are
the only proper practical way to define the syntax of something parsable
and beeing complete about it. Unless you wan't to reach the stability of
the usual perl-web hackkery.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:12    [W:0.167 / U:3.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site