scanning and parsing short strings

From: Christian Lindig (
Date: Thu Jul 10 1997 - 16:42:52 MET DST

Date: Thu, 10 Jul 1997 16:42:52 +0200 (MET DST)
Message-Id: <>
From: Christian Lindig <>
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


 Christian Lindig

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