comp.lang.ada
 help / color / mirror / Atom feed
From: "Jerry" <lanceboyle@qwest.net>
Subject: Usage of \ in Ada
Date: 21 Aug 2006 01:03:31 -0700
Date: 2006-08-21T01:03:31-07:00	[thread overview]
Message-ID: <1156147411.215015.31110@i42g2000cwa.googlegroups.com> (raw)

I've suggested to the author of the most excellent OS X editor TextMate
that it is an error to always consider a \ in quoted text as an escape
character with respect to syntax coloring. He as asked for specific
examples and before I lead him wrong I want to check around. For
example, in the Ada snippet

    Put_Line("Hello, World");
    Put_Line("\");
    Put_Line("Hello again");

TextMate looks at the \ and says, oh--the next character, ", is
supposed to be escaped, and then proceeds to color the second half of
the second line and the first half of the third line as though it were
quoted text. It then colors the second half of the third line as though
it were _unquoted_ text--i.e., the \ causes a "quote parity" error in
the syntax coloring. The current work-around is to put a " in a comment
at the end of the second line.

At least one other editor, Xcode (Apple's own) handles this correctly
for all of C (treating the \ as the beginning of an escape sequence),
and Pascal and Ada (treating the \ as just another character).

Am I right in recommending that this behavior for Ada be such that \ is
never an escape character?

Jerry




             reply	other threads:[~2006-08-21  8:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-21  8:03 Jerry [this message]
2006-08-21  8:11 ` Usage of \ in Ada 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
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