comp.lang.ada
 help / color / mirror / Atom feed
* Usage of \ in Ada
@ 2006-08-21  8:03 Jerry
  2006-08-21  8:11 ` Jacob Sparre Andersen
  2006-08-21 19:44 ` Jeffrey R. Carter
  0 siblings, 2 replies; 19+ messages in thread
From: Jerry @ 2006-08-21  8:03 UTC (permalink / 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




^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2006-08-24 17:16 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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