From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA18629; Fri, 31 Aug 2001 23:09:43 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 XAA18659 for ; Fri, 31 Aug 2001 23:09:42 +0200 (MET DST) Received: from smtp.nwlink.com (smtp.nwlink.com [209.20.130.57]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f7VL9fv27041 for ; Fri, 31 Aug 2001 23:09:41 +0200 (MET DST) Received: from ip178.usw22.rb1.bel.nwlink.com (ip178.usw22.rb1.bel.nwlink.com [207.202.195.178]) by smtp.nwlink.com (8.9.3/8.9.1) with SMTP id OAA12682 for ; Fri, 31 Aug 2001 14:07:52 -0700 (PDT) Received: (qmail 3753 invoked by uid 500); 31 Aug 2001 21:09:25 -0000 Date: Fri, 31 Aug 2001 14:09:25 -0700 From: Michael Leary To: caml Subject: [Caml-list] lexer disambiguation? Message-ID: <20010831140925.U2959@ip178.usw22.rb1.bel.nwlink.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk since the lexer looks like an ordinary ocaml function (more or less), does the disambiguation boil down to: 1. the longest series of bytes that matches a single rule 2. match the first rule in the function that matches #1 and mechanically, if the input looks like: some series of bytes ¥99¢ @#%#@$ with newlines does it do a pattern match on (assuming whitespace is a token): s(* match some rule *) so(* match some rule *) som(* match some rule *) some(* match some rule *) some (* match some rule, and also the whitespace rule, so do the some rule, then repeat matching starting with the concatenation of the leftover ' ' and the next byte *) -- ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr