Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamllex regexp problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michael Wohlwend <micha-1@f...>
Subject: Re: [Caml-list] ocamllex regexp problem
Am Mittwoch, 19. März 2008 03:03:25 schrieb Jake Donham:
> Hi list,
>   rule token = parse
>   [...]


I think the longest match rule eats the whole input.
maybe you want:

   rule token = parse
   [...]

           | "<![CDATA["  { cdata lexbuf }

   [...]

  and cdata = shortest
   | (_* as d)  "]]>" {  Printf.printf "found data:'%s'\n" d; }



 Michael