From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id D1D97BC3D for ; Mon, 8 Aug 2005 06:23:44 +0200 (CEST) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.205]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j784NidP028669 for ; Mon, 8 Aug 2005 06:23:44 +0200 Received: by rproxy.gmail.com with SMTP id a36so1171400rnf for ; Sun, 07 Aug 2005 21:23:43 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pVPHH2PpDx1S+GExnPvLBpzE7aU0AfEHwbL9NaogbCB7G45Z5zOP0znE5gmML3q+GP6RVknLY5SN/wdTcR5YLMhiGgVIa+gGG8n70wviblgFQ8Z8+WF/6u/kCvK3bj2TOdMF4NCL/BuJ2KKCIaEOEXsbR47Hs/Cx5UsRLXPAdWg= Received: by 10.39.2.69 with SMTP id e69mr2425183rni; Sun, 07 Aug 2005 21:23:43 -0700 (PDT) Received: by 10.38.209.44 with HTTP; Sun, 7 Aug 2005 21:23:43 -0700 (PDT) Message-ID: Date: Mon, 8 Aug 2005 16:23:43 +1200 From: Jonathan Roewen To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ocamllex+ocamlyacc and not parsing properly In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200508080058.12357.jon@ffconsultancy.com> X-Miltered: at nez-perce with ID 42F6DE50.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamllex:01 ocamlyacc:01 parsing:01 ocamllex:01 token:01 token:01 lexer:01 parsing:01 lexeme:01 parsed:01 spaces:01 matched:01 variable:06 arguments:07 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 Is there any way to call another rule based on some variable in ocamllex? I see you can pass arguments to a rule, but what use are these except in the actions part? I have two cases: if (and only if) it's the first token, ':' starts a token with no spaces. and if (and only if) it's the last token, ':' starts a token that consumes the rest of the input line. I'm completely lost how to do this in light of the fact that the lexer starts at the first rule for each parsed token =3D( Is it possible to restart parsing from the start of the matched lexeme using an action? Jonathan