caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* ocamlyacc/ocamllex problems
@ 2001-01-31 17:16 Laurent Reveillere
  2001-02-01 14:22 ` Xavier Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Reveillere @ 2001-01-31 17:16 UTC (permalink / raw)
  To: caml-list

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-02-02 15:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-31 17:16 ocamlyacc/ocamllex problems Laurent Reveillere
2001-02-01 14:22 ` Xavier Leroy

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).