caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Laurent Reveillere <Laurent.Reveillere@labri.u-bordeaux.fr>
To: caml-list@inria.fr
Subject: ocamlyacc/ocamllex problems
Date: Wed, 31 Jan 2001 18:16:19 +0100	[thread overview]
Message-ID: <3A784863.78765C0@labri.u-bordeaux.fr> (raw)

I am writing a parser that uses Parsing.rhs_start and Parsing.rhs_end in
a rule.
The problem is the following,

1) If I use a simple rule in the lexer that matches a token all is fine.
ex:
    |   "'" ['0' '1' '*' '.']+ "'"  { ... }

2) If I use an automata in the lexer for matching the same token, the
results of Parsing.rhs_start and Parsing.rhs_end are wrong.
ex:	
    | "'"  { ... bits lexbuf ... }
and bits = parse
    | '\'' { ... }
    | ['0' '1' '.' '*' ] { ... }
    | eof  { ... }
    | _    { ... }

	
Here is the ouput of a debug printf for rhs_start and rhs_end values
case 1) Debug: pats='1..00000'       at (964,965)
case 2) Debug: pats='1..00000'       at (955,965)


I am not sure to undertand the reasons of my problem?


-- 
Laurent



             reply	other threads:[~2001-02-01  7:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-31 17:16 Laurent Reveillere [this message]
2001-02-01 14:22 ` 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=3A784863.78765C0@labri.u-bordeaux.fr \
    --to=laurent.reveillere@labri.u-bordeaux.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;
as well as URLs for NNTP newsgroup(s).