comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Usage of \ in Ada
Date: Thu, 24 Aug 2006 11:53:59 +0200
Date: 2006-08-24T11:53:59+02:00	[thread overview]
Message-ID: <ko0eva2unykm.13dmm0nr0c6wp$.dlg@40tude.net> (raw)
In-Reply-To: 6gojce.g51.ln@hunter.axlog.fr

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



  reply	other threads:[~2006-08-24  9:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-21  8:03 Usage of \ in Ada Jerry
2006-08-21  8:11 ` Jacob Sparre Andersen
2006-08-21 19:44 ` Jeffrey R. Carter
2006-08-21 20:25   ` Dmitry A. Kazakov
2006-08-22  2:47     ` Jeffrey R. Carter
2006-08-22  7:42       ` Dmitry A. Kazakov
2006-08-22 18:13         ` Adam Beneschan
2006-08-23  8:35           ` Dmitry A. Kazakov
2006-08-23 17:31             ` Adam Beneschan
2006-08-23 20:25               ` Dmitry A. Kazakov
2006-08-24  0:22                 ` Adam Beneschan
2006-08-24  8:37                   ` Jean-Pierre Rosen
2006-08-24  9:53                     ` Dmitry A. Kazakov [this message]
2006-08-24 12:15                       ` Jean-Pierre Rosen
2006-08-24 14:43                         ` Dmitry A. Kazakov
2006-08-24 15:24                           ` Jean-Pierre Rosen
2006-08-24 17:16                       ` Adam Beneschan
2006-08-22 19:38         ` Jeffrey R. Carter
2006-08-22 21:29           ` Keith Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox