Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Parser to read configuration file

Reply
Thread Tools

Parser to read configuration file

 
 
Martin Gregorie
Guest
Posts: n/a
 
      05-14-2010
On Fri, 14 May 2010 00:49:04 +0000, Stefan Ram wrote:

> Arne Vajhøj <(E-Mail Removed)> writes:
>>It is not possible to evaluate the complexity based on the information
>>given.

>
> customer: Could you write a parser for us? I: Ok, just send me the
> grammar.
> customer: The what?
> I: Some kind of EBNF or so.
> customer: Well, I can't write EBNF. Could you write the grammar, too?
> We'll send you some examples of the language. I: Ok.
> (time passes.)
> I: So here is the grammar. You just need to read it and sign this
> confirmation that it really describes the language you want me to
> write the parser for, then I can go on and write the actual parser.
> customer: But I can't read EBNF!
>
> What then?


Write a few examples of realistic configurations that match your grammar,
preferably examples of:
- a really simple configuration
- what you expect a typical configuration would look like.
- the most complex configuration the client might want


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      05-14-2010
markspace wrote:
> That's kinda a good question. What do you do when the customer can't
> evaluate the product they are buying? I only see two choices
>
> 1. They're going to have to trust you when you tell them something is
> correct.
>
> 2. They're going to have to hire a second technologist or business
> analyst who can advise them on what is best for their company.
>
> On a slightly more practical level, you might have to demonstrate, or
> give assurances in writing, that the grammar you provide will parse
> certain examples which they can review.


Clearly you are defining the conditions of satisfaction incorrectly in this case.

The client should not sign off on the implementation, e.g., the parsing
grammar. The client should sign off on the behavior, within the universe of
discourse of their business, e.g., that the business transaction confers the
proper information/cash/results.

I don't care whether you take a plane, train, or automobile as long as you're
in Albequerque for the meeting on time and under budget.

--
Lew
 
Reply With Quote
 
 
 
 
Tom Anderson
Guest
Posts: n/a
 
      05-14-2010
On Fri, 14 May 2010, Stefan Ram wrote:

> Arne Vajh?j <(E-Mail Removed)> writes:
>> It is not possible to evaluate the complexity based on the
>> information given.

>
> customer: Could you write a parser for us?
> I: Ok, just send me the grammar.
> customer: The what?
> I: Some kind of EBNF or so.
> customer: Well, I can't write EBNF. Could you write the grammar, too?
> We'll send you some examples of the language.
> I: Ok.
> (time passes.)
> I: So here is the grammar. You just need to read it and sign this
> confirmation that it really describes the language you want me
> to write the parser for, then I can go on and write the actual parser.
> customer: But I can't read EBNF!


You write the parser, ship it to them, charge them for maintenance when it
breaks, and tell the anecdote afterwards on usenet"

tom

--
inspired by forty-rod whiskey
 
Reply With Quote
 
markspace
Guest
Posts: n/a
 
      05-14-2010
Lew wrote:

>
> The client should not sign off on the implementation, e.g., the parsing
> grammar. The client should sign off on the behavior, within the
> universe of discourse of their business, e.g., that the business
> transaction confers the proper information/cash/results.



Well, I agree, but how do you get the client to understand what it is
they are actually getting?

At this point you might have to write a users' manual for the product,
which should contain examples of the config file and how it works, with
some do's an don't's. That might satisfy the customer, with out
specifying the grammar. But this sort of "examples" is what I was
trying to get at in the post you replied to.
 
Reply With Quote
 
Tech Id
Guest
Posts: n/a
 
      05-23-2010
I tried my hands on JavaCC after fiddling with some crashes on ANTLR
And it worked really well.

Thanks to an Eclipse plug-in, My work is pertty much done!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File.read(fname) vs. File.read(fname,File.size(fname)) Alex Dowad Ruby 4 05-01-2010 08:20 AM
configuration file parser like Config::General for perl Tammo Tjarks Ruby 3 09-05-2007 10:39 AM
Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicK Mike ASP .Net 5 08-15-2007 08:57 AM
configuration file parser library Damiano G. Preatoni C++ 4 05-05-2005 05:04 PM
XMLparser: Difference between parser.setErrorHandler() vs. parser.setContentHandler() Bernd Oninger Java 0 06-09-2004 01:26 AM



Advertisments