Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Berke Durak <obdurak@free.fr>
To: james woodyatt <jhw@wetware.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] ocamllex problem
Date: Fri, 5 Aug 2005 11:15:14 +0200	[thread overview]
Message-ID: <20050805091513.GC4076@ara.zapto.org> (raw)
In-Reply-To: <A885EC6D-313A-4938-9590-F31D773B8D5D@wetware.com>

On Thu, Aug 04, 2005 at 11:15:48PM -0700, james woodyatt wrote:
> One thing: the pattern [':'((letter|' ')* as s)] is interesting.   
> You're definitely right that something non-trivial is happening  
> inside the DFA.  My [Cf_dfa] module does not keep a stack of  
> backtracking sequences because I did something else to resolve the  
> problem.  Look at the ( $@ ) operators, which allow you to use a  
> parser monad on the recognized input sequence to obtain the result of  
> a lexical rule.  Using this, you can implement something like the  
> feature you're interested in by defining a nested hierarchy of parsers.

You may also wish to have a look at :

  Thomas Reps, "Maximal-Munch" Tokenization in Linear Time, ACM Trans.
  Program. Lang. Syst., vol. 20, num. 2, 1998, pp.259-273
  http://www.cs.wisc.edu/wpis/papers/toplas98b.pdf

-- 
Berke Durak


  parent reply	other threads:[~2005-08-05  9:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-04 23:12 Jonathan Roewen
2005-08-04 23:53 ` Jonathan Roewen
2005-08-05  1:03   ` skaller
2005-08-05  5:11     ` Alain Frisch
2005-08-05  6:15     ` james woodyatt
2005-08-05  8:35       ` skaller
2005-08-05  9:15       ` Berke Durak [this message]
2005-08-05 11:05         ` skaller
2005-08-05 12:21           ` Jonathan Bryant
2005-08-05 12:39             ` David MENTRE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050805091513.GC4076@ara.zapto.org \
    --to=obdurak@free.fr \
    --cc=caml-list@inria.fr \
    --cc=jhw@wetware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox