RE: [Infrastructures] new parser for Isconf

"Stephen Schaefer" <[email protected]>
Newsgroups gmane.comp.sysutils.isconf.devel
Message-ID <[email protected]>
Thanks for explaining.  I'm now using:

bezukhov: sunos_base

Next: I'm using the types file from your CVS.  In vi, I just did

:%/^[^#]*:/s/	/ /g

i.e., on any target line not containing a colon, turn all tabs into
spaces.
Now I get:

$ perl -I../lib/perl5 ../bin/ischeck
Checking hosts...up to date.
Checking types...
using Isconf::Parse
types:164: parse error

Annotated using vi's :set nu, that appears in

   161
   162  cognos_server: sun_server
   163          cognos_service_user
   164          pkg/add__java__1.4.1
   165

That happens to be the first pkg/ line containing a ".", and you said
there were new restrictions on the use of "." and "-".  I suppose I'm
going to have to read the grammar.
But if you could post an example of a grammatically correct types file,
it would help.  Thanks,

    - Stephen

-----Original Message-----
From: Luke A. Kanies [mailto:[email protected]] 
Sent: Tuesday, February 11, 2003 2:03 PM
To: Stephen Schaefer
Cc: [email protected]
Subject: RE: [Infrastructures] new parser for Isconf


On Tue, 11 Feb 2003, Stephen Schaefer wrote:

> So I blasted ahead with the questionable ParseLex-2.15 module, and 
> things are not improving.  My hosts file is entirely commented out 
> except for the line
>
> bezukhov :				sunos_base
>
> Now I get:
>
> $ perl -I../lib/perl5 ../bin/ischeck
> using Isconf::Parse
> hosts:26: parse error
> Checking hosts...$
>
> Bezukhov is indeed on line 26.  It is followed by an empty line.  In 
> case intermediariess obscure it, the bezukhov is followed by a single 
> space, and there are three tabs between the colon and sunos_base.
>
> Suggestions?

Yeah, change the tabs to spaces.

I couldn't find a good way to do this using the new parser, so now
spaces are ignored on a given line (i.e., you can have as many as you
like) but tabs should only ever occur at the beginning of a line,
signaling indentation.

If you'd like to look at the grammar and lexer and figure a way around
that, fine, but I figured it was a worthy sacrifice for the extra speed,
and actually makes more sense, anyway.  More restrictive, but more
consistent.

-- 
"A computer lets you make more mistakes faster than any invention in
human history--with the possible exceptions of handguns and tequila."
                -- Mitch Ratcliffe


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.