Hello,

Thanks for all the replies.
We have so far discovered the following suggetions for the parsing Problem:
Using: 
    o a tokenizer/parser is too much overhead for such a simple task
    o strchr, memchr is too low-level and not elegant enough
    o strtok would not even parse (tokenize) this simple example
    o a regexp library: How would you solve the problem with a regexp lib ?

Criteria:
    o Receive the value of <resource>
    o Check the Environment: Is <resource> really sourrounded by 'GET ' and
      'HTTP/1.1' ?!

I need a function which accepts BNF-style rules.
E.g.:
    char resource [512];

    ret = bnfparse (request, "GET %s HTTP/1.1", resource);

Ret would be $(NUMBER OF FORMAT SPECIFIERS, successfully handled) +env.
Env would be 1 if the Environment passes, and 0 is not.

Any comments ?
Best regards,
Martin


_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to