scanning and parsing short strings

From: Christian Lindig (lindig@ips.cs.tu-bs.de)
Date: Thu Jul 10 1997 - 16:42:52 MET DST


Date: Thu, 10 Jul 1997 16:42:52 +0200 (MET DST)
Message-Id: <199707101442.QAA15363@infbsst5.ips.cs.tu-bs.de>
From: Christian Lindig <lindig@ips.cs.tu-bs.de>
To: caml-list@pauillac.inria.fr
Subject: scanning and parsing short strings

[sorry - no french version]

Dear Caml enthusiasts,

many applications rely on protocols which they must parse. This can
be either done ad hoc using regular expressions or scanner/parser
generated by Camllex/yacc. Which method is advisable when the scanned
items are relative short strings (< 100 Bytes)? In general I would
prefer to use Camllex/yacc specifications in order not distribute the
different parsers over the whole application. On the other hand start-up
time of the scanner/lexer may be too high when used for small strings
(Lexing.from_string). Any advice?

The background of my question: I like to implement a CGI library. There
are many headers that are passed to a CGI application that need to
be parsed. I already took a look at the MMM code which uses a mixed
approach.

Christian

--
 Christian Lindig
 lindig@ips.cs.tu-bs.de
                         



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:11 MET