From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA07453 for caml-redistribution; Fri, 11 Jul 1997 21:01:53 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA28639 for ; Thu, 10 Jul 1997 16:42:58 +0200 (MET DST) Received: from infbssys.ips.cs.tu-bs.de (root@infbssys.ips.cs.tu-bs.de [134.169.32.1]) by concorde.inria.fr (8.8.5/8.7.3) with ESMTP id QAA08023 for ; Thu, 10 Jul 1997 16:42:54 +0200 (MET DST) Received: from infbsst5.ips.cs.tu-bs.de (lindig@infbsst5.ips.cs.tu-bs.de [134.169.32.70]) by infbssys.ips.cs.tu-bs.de with ESMTP id QAA25402 (8.8.5/IDA-1.6 for ); Thu, 10 Jul 1997 16:42:53 +0200 Date: Thu, 10 Jul 1997 16:42:52 +0200 (MET DST) Message-Id: <199707101442.QAA15363@infbsst5.ips.cs.tu-bs.de> From: Christian Lindig To: caml-list@pauillac.inria.fr Subject: scanning and parsing short strings Sender: weis [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