From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,20c75acdaea028c3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Usage of \ in Ada Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1156147411.215015.31110@i42g2000cwa.googlegroups.com> <17jicmx6si17i.1wwvf6cafw7u1.dlg@40tude.net> <1thd8agjty9cr.dyp1m8yqb4xd$.dlg@40tude.net> <1156270408.443763.15680@h48g2000cwc.googlegroups.com> <1156354284.975163.174490@b28g2000cwb.googlegroups.com> <1j9zi3r2docoq$.5gnvkzmffdxu.dlg@40tude.net> <1156378961.270464.303590@75g2000cwc.googlegroups.com> <6gojce.g51.ln@hunter.axlog.fr> Date: Thu, 24 Aug 2006 11:53:59 +0200 Message-ID: NNTP-Posting-Date: 24 Aug 2006 11:53:59 CEST NNTP-Posting-Host: eee3e0a7.newsspool2.arcor-online.net X-Trace: DXC=_08fiV;W=WfEB;5>eE0T7mA9EHlD;3Ycb4Fo<]lROoRa4nDHegD_]Re1hgQkTmm9kdDNcfSJ;bb[eFCTGGVUmh?dN\HXHJ4e80n[jldiPZ@:5i X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6334 Date: 2006-08-24T11:53:59+02:00 List-Id: On Thu, 24 Aug 2006 10:37:21 +0200, Jean-Pierre Rosen wrote: > Adam Beneschan a �crit : >> It's probably to prevent stupid errors. If you have a string literal >> with an LF in it, it's far more likely (using a fairly traditional >> representation of the source) that you've forgotten a closing quote >> than that you intended to put a linefeed in the literal. And if the >> language did try to allow a line separator in a string literal (even if >> it were represented as something like \n in the representation) > > And of course, if you really need an LF in a character string, just use > Ada.Characters.Latin_1.LF .... Sure, but that is not the point. The problem is which code positions are illegal (non-graphic_character). Consider it from the position of the designer of a compiler/parser/scanner. (That was the OP question all about) The same question arises for the designer of an automated code generator tool. Which encoding-legal code positions can be safely put into string literals? ARM 2.1(17) reads "Every code position of ISO 10646 BMP that is not reserved for a control function is defined to be a graphic_character by this International Standard. This includes all code positions other than 0000 - 001F, 007F - 009F, and FFFE - FFFF." I am not a native English speaker, so it is difficult to me to decipher the above. Let S be the set of code positions 0..1F U 7F..9F U FFFE..FFFF. My question to language lawyers is about the relation between S and graphic_character: 1. Can some x of S be graphic_character? (do S and graphic_character intersect) 2. Is any y outside S graphic_character? (is complement of S a subset of graphic_character) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de