From: Flavio Leonardo Cavalcanti de Moura <flavio@mat.unb.br>
To: <caml-list@inria.fr>
Subject: [Caml-list] parser error
Date: Sat, 18 Oct 2003 17:33:10 -0300 (ART) [thread overview]
Message-ID: <20031018172007.B54568-100000@mx1.mat.unb.br> (raw)
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
next reply other threads:[~2003-10-18 20:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-18 20:33 Flavio Leonardo Cavalcanti de Moura [this message]
2003-10-18 21:56 ` Damien Doligez
2003-10-20 10:46 ` Dmitry Bely
2003-10-20 11:02 ` Sven Luther
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=20031018172007.B54568-100000@mx1.mat.unb.br \
--to=flavio@mat.unb.br \
--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