Loading ...
Sorry, an error occurred while loading the content.

Re: "ocaml_beginners"::[] greediness in lexer rules

Expand Messages
  • Martin Jambon
    ... Right, I didn t realize that. Martin -- http://wink.com/profile/mjambon http://mjambon.com/
    Message 1 of 4 , Jul 8 7:50 AM
    • 0 Attachment
      On Tue, 8 Jul 2008, citromatik wrote:

      >
      >
      > Martin Jambon wrote:
      >>
      >> On Tue, 8 Jul 2008, citromatik wrote:
      >>
      >>
      >> Please check by yourself, but I think you can use "shortest" instead of
      >> "parse". This would apply to the whole rule.
      >>
      >
      > Yes, "shortests" works perfectly on this. Thanks a lot for the tip, I
      > overlooked that from the docs.
      >
      >
      >
      >> Alternatively, you can use [^'\n']* instead of _*.
      >>
      > hmmm, I don't agree. The OCaml manual says that "_" matches any character,
      > but "[^'\n']*" matches any character except a newline. Note that the records
      > I want to match are multi-line.

      Right, I didn't realize that.


      Martin

      --
      http://wink.com/profile/mjambon
      http://mjambon.com/
    Your message has been successfully submitted and would be delivered to recipients shortly.