Version française
Home     About     Download     Resources     Contact us    
Browse thread
scanning and parsing short strings
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christian Lindig <lindig@i...>
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