From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id EC439820A1 for ; Tue, 6 Aug 2013 12:52:51 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of dra-news@metastack.com) identity=pra; client-ip=81.103.221.48; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible Received-SPF: Neutral (mail2-smtp-roc.national.inria.fr: domain of dra-news@metastack.com does not assert whether or not 81.103.221.48 is permitted sender) identity=mailfrom; client-ip=81.103.221.48; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mtaout02-winn.ispmail.ntl.com) identity=helo; client-ip=81.103.221.48; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="postmaster@mtaout02-winn.ispmail.ntl.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkYBAPLUAFJRZ90wlGdsb2JhbABBGoJlVlC+fYEdFg4BAQEBBw0JCRQDJYIkAQEBAwF+CwIBCBgKJDIXAQ0CBBMIiAIHAwgytXCPaTiDGnQDiHOOboEqkzuCKg X-IPAS-Result: AkYBAPLUAFJRZ90wlGdsb2JhbABBGoJlVlC+fYEdFg4BAQEBBw0JCRQDJYIkAQEBAwF+CwIBCBgKJDIXAQ0CBBMIiAIHAwgytXCPaTiDGnQDiHOOboEqkzuCKg X-IronPort-AV: E=Sophos;i="4.89,825,1367964000"; d="scan'208";a="28623108" Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]) by mail2-smtp-roc.national.inria.fr with ESMTP; 06 Aug 2013 12:52:50 +0200 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20130806105250.QFH23282.mtaout02-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com> for ; Tue, 6 Aug 2013 11:52:50 +0100 Received: from romulus.metastack.com ([81.98.252.242]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20130806105250.MFFT6472.aamtaout02-winn.ispmail.ntl.com@romulus.metastack.com> for ; Tue, 6 Aug 2013 11:52:50 +0100 Received: from remus.metastack.local (remus.metastack.com [172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id r76AqliH010186 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 6 Aug 2013 11:52:47 +0100 Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%10]) with mapi id 14.03.0123.003; Tue, 6 Aug 2013 11:52:47 +0100 From: David Allsopp To: "caml-list@inria.fr" Thread-Topic: [Caml-list] character syntax error '^M' Thread-Index: AQHOkgIXzdQp2CFLNUqQ0nOssQheTZmG4SqugAAdTYCAAPw2UA== Date: Tue, 6 Aug 2013 10:52:45 +0000 Message-ID: References: ,<851017912.242111224.1375724069423.JavaMail.root@zimbra27-e5.priv.proxad.net> <520009B7.8040307@libertysurf.fr> In-Reply-To: <520009B7.8040307@libertysurf.fr> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.0.18] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Cloudmark-Analysis: v=1.1 cv=GaEGOwq9FwezmTggA+b6yC6zDZF2HYaK6RN/tSqdnVA= c=1 sm=0 a=IXlcok0kcmcA:10 a=orLt7dbH6nAA:10 a=cTs9vV391PwA:10 a=8nJEP1OIZ-IA:10 a=xqWC_Br6kY4A:10 a=ZOzjf2MOAAAA:8 a=M9Tu5yLPfKfzV_xw18QA:9 a=wPNLvfGTeEIA:10 a=aT1-9OCzH6wA:10 a=H1paHlvfXV0A:10 a=nzcZB7l7v8Bl-AIO:21 a=HIvbXD1OKeLZCg4w:21 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Subject: RE: [Caml-list] character syntax error '^M' William R wrote: > On 08/05/2013 07:38 PM, David Allsopp wrote: > Use \r or \x0d?=A0http://caml.inria.fr/pub/docs/manual-ocaml/lex.html >=20 > On 5 Aug 2013, at 18:34, "r.3@libertysurf.fr" wrote: > Dear list, >=20 > I got a new error with trunk version of ocaml. >=20 > I have in a module a code that appears like that in emacs (which is used = to convert files from dos to unix) : > String.get s (String.length s -1) =3D '^M' > The thing is that '^M' is actually the return character of windows (RET) This is not strictly true. The return *sequence* of Windows is \r\n (0x0d f= ollowed by 0x0a). It's logical only if you imagine you're on a typewriter... > This works with ocaml 4.00, but now, with trunk version of ocaml, it tells > me this is a "syntax error". The support for '^M' was removed as part of PR#5598 (http://caml.inria.fr/m= antis/view.php?id=3D5598) in R12420 for parsing/lexer.mll. I'm not very goo= d at interpreting subversion changelogs (for branches), but it looks like t= he fix may have only been applied to trunk (by mistake?) as it's certainly = not in 4.00 or 4.00.1. However, I think looking at it that 4.01 does contai= n that patch (i.e. behaves the same way as trunk). David