On Fri, Mar 25, 2005 at 07:14:15AM +0200, Shachar Shemesh wrote:
> Shaul Karl wrote:
> 
> > Don't you want a parser for a simple language? libc? lex+bison?
> > 
> >
> libc? What does it have to do with anything?


  If all you want is get(PermitRootLogin) and you are willing to deal
with fscanf hassles you might use:


  while (fscanf(/etc/ssh/sshd_config, token))
    if (strcmp(token, "PermitRootLogin") == 0) {
        fscanf(/etc/ssh/sshd_config, token);
        return;
    }
  strcpy(token, "No");
  return;


> 
> lex+bison are great. Really. However, they seem way too complex for 
> such a purpose.

  
  lex+bison seems to me well suited for the job because we are dealing
with a set of simple languages. 


> All I want is a standard library that will do the work for me.


  As of now, there is none because all the suggested solutions are not
considered standard. You will probably have to build the data base for
one on the target system as part of installing your application.


> Using lex+bison incures too much human overhead to be considered a
> "time saving" solution.
> 


  Since any one of the proposed solutions are not considered standard at
this time you'll have to decide whether you put the time in it and in
building the data base on the target system or use lex+bison.

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to