caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Michael Leary <leary@nwlink.com>
To: caml <caml-list@inria.fr>
Subject: [Caml-list] lexer disambiguation?
Date: Fri, 31 Aug 2001 14:09:25 -0700	[thread overview]
Message-ID: <20010831140925.U2959@ip178.usw22.rb1.bel.nwlink.com> (raw)

since the lexer looks like an ordinary ocaml function (more or less), does
the disambiguation boil down to:

1. the longest series of bytes that matches a single rule
2. match the first rule in the function that matches #1

and mechanically, if the input looks like:

some series of bytes ¥99¢  @#%#@$  \r with newlines

does it do a pattern match on (assuming whitespace is a token):

s(* match some rule *)
so(* match some rule *)
som(* match some rule *)
some(* match some rule *)
some (* match some rule, and also the whitespace rule, so do the some rule,
then repeat matching starting with the concatenation of the leftover ' '
and the next byte *)



-- 
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


             reply	other threads:[~2001-08-31 21:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-31 21:09 Michael Leary [this message]
2001-09-10 15:31 ` Xavier Leroy

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=20010831140925.U2959@ip178.usw22.rb1.bel.nwlink.com \
    --to=leary@nwlink.com \
    --cc=caml-list@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).