From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] parsing: old and new ways
Date: Fri, 14 Dec 2001 21:57:05 +0100 [thread overview]
Message-ID: <20011214215705.A12178@verdot.inria.fr> (raw)
In-Reply-To: <3C1A569B.3E718623@wanadoo.fr>; from philippe.esperet@wanadoo.fr on Fri, Dec 14, 2001 at 08:44:27PM +0100
Hi,
On Fri, Dec 14, 2001 at 08:44:27PM +0100, Philippe Esperet wrote:
> # Grammar.Entry.parse mirror (Stream.of_string "abcba");;
> Exception:
> Stdpp.Exc_located ((0, 5), Stream.Error "illegal begin of mirror").
>
> What am I missing?
The problem is the lexer you use. You took "Plexer.make ()" which
considers "abcba" as a token, therefore not matching the keywords
"a", "b" or "c".
To get the same result you should give the string "a b c b a" as
input...
... or use another lexer, not "Plexer.make ()", which would return
each input character as token. It should be easy. If you need help
to write it, ask me.
--
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
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
prev parent reply other threads:[~2001-12-14 20:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-14 19:44 Philippe Esperet
2001-12-14 20:57 ` Daniel de Rauglaudre [this message]
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=20011214215705.A12178@verdot.inria.fr \
--to=daniel.de_rauglaudre@inria.fr \
--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