caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] parser error
@ 2003-10-18 20:33 Flavio Leonardo Cavalcanti de Moura
  2003-10-18 21:56 ` Damien Doligez
  0 siblings, 1 reply; 4+ messages in thread
From: Flavio Leonardo Cavalcanti de Moura @ 2003-10-18 20:33 UTC (permalink / raw)
  To: caml-list

I wrote a parser originally in ocaml 3.02 and it works well. It was a
suprise for me to receive an error message when I tryed to compile it in
ocaml 3.07. The error message I receive is:

File "selexerlse.ml", line 21, characters 6-8:
Syntax error
File "selexerls.ml", line 27, characters 6-8:
Syntax error
File "selexersus.ml", line 74, characters 6-8:
Syntax error
File "subsexpl.ml", line 129, characters 45-47:
Warning: Illegal backslash escape in string
make: ** [depend] Erro 2

The error occurs exactly at the same string in three files (selexerlse.ml,
selexerls.ml and selexersus.ml) above. It in
the first occurrence of [< in the code below:

let rec  parse_expr1 = parser
      [< 'Ident s >] -> (Vr s)
    | [< 'Int 1 >] -> (One)
    | [< 'Int n >] -> (convertN(n))
    | [< 'Kwd "A";  'Kwd "("; e1 = parse_expr1; 'Kwd ","; e2 =
parse_expr1; 'Kwd ")" >] -> A(e1,e2)
    | [< 'Kwd "L"; 'Kwd "("; e1 = parse_expr1;  'Kwd ")" >] -> L(e1)
    | [< 'Kwd "Sb"; 'Kwd "("; e1 = parse_expr1 ;  'Kwd ","; sb =
parse_subs; 'Kwd ")" >] -> Sb(e1,sb)
and
parse_subs = parser
  [< 'Kwd "Id" >] -> (Id)
| [< 'Kwd "Up" >] -> (Up)
| [< 'Kwd "Pt"; 'Kwd "("; e1 = parse_expr1 ;  'Kwd ","; sb = parse_subs;
'Kwd ")" >] -> Pt(e1,sb)
| [< 'Kwd "Cp"; 'Kwd "("; s1 = parse_subs ;  'Kwd ","; s2 = parse_subs ;
'Kwd ")" >] -> Cp(s1,s2)
 ;;

Does anyone know what is the problem?

Best Regards,

  	Flávio Leonardo Cavalcanti de Moura
   		flavio@mat.unb.br      ^v^
	     www.mat.unb.br/~flavio   /(_)\
                 Use GNU/Linux!        ^ ^

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

end of thread, other threads:[~2003-10-20 11:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-18 20:33 [Caml-list] parser error Flavio Leonardo Cavalcanti de Moura
2003-10-18 21:56 ` Damien Doligez
2003-10-20 10:46   ` Dmitry Bely
2003-10-20 11:02     ` Sven Luther

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