From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 116ABBBCA for ; Wed, 14 May 2008 06:29:19 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvYCAOIHKkhDWxLCbmdsb2JhbACBU5BGm2k X-IronPort-AV: E=Sophos;i="4.27,483,1204498800"; d="scan'208";a="12208143" Received: from ip67-91-18-194.z18-91-67.customer.algx.net (HELO server1.bertec.net) ([67.91.18.194]) by mail1-smtp-roc.national.inria.fr with ESMTP; 14 May 2008 06:29:18 +0200 Received: from kuba.bertec.net (kuba.bertec.net [192.168.2.16]) by server1.bertec.net (Postfix) with ESMTP id 8498FCDFB6 for ; Wed, 14 May 2008 00:29:17 -0400 (EDT) From: Kuba Ober To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: Why OCaml sucks Date: Wed, 14 May 2008 00:29:16 -0400 User-Agent: KMail/1.9.9 References: <200805090139.54870.jon@ffconsultancy.com> <48299C67.1010905@fischerventure.com> <48299F46.5030906@janestcapital.com> In-Reply-To: <48299F46.5030906@janestcapital.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805140029.16818.ober.14@osu.edu> X-Spam: no; 0.00; ocaml:01 parsers:01 lexers:01 lexer:01 cheers:01 lexical:01 caml-list:01 writting:01 expression:02 finite:02 automata:02 library:03 size:95 size:95 problem:05 > The problem, as I understand it, is in writting parsers. Your standard > finite automata based regular expression library or lexical analyzer is > based, at it's heart, on a table lookup- you have a 2D array, whose size > is the number of input characters times the number of states. This is just silly. This table can be usually trivially degenerated into hardcoded compare-and-jumps, for most lexers I've dealt with this will astronomically reduce the size and increase speed. The fact that the lexer generator you're using is dumb doesn't help, but please don't assume that this dumbassedness is somehow a universal constant and given upon us by $DEITY. Cheers, Kuba