Bug 318950 - Add support for di- and trigraphs
Summary: Add support for di- and trigraphs
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 7.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
: 329154 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-05 22:05 EDT by Ted Shaneyfelt CLA
Modified: 2020-09-04 15:17 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ted Shaneyfelt CLA 2010-07-05 22:05:09 EDT
Build Identifier: M20100211-1343

Trigraphs should work identically to their respective equivalent characters:

ANSI C standard states in section 2.2.1.1 Trigraph sequences that

   "All occurrences in a source file of the following sequences of
three characters (called trigraph sequences) are replaced with the
corresponding single character.

         ??=      #
         ??(      [
         ??/      \
         ??)      ]
         ??'      ^
         ??<      {
         ??!      |
         ??>      }
         ??-      ~
"


Reproducible: Always

Steps to Reproduce:
1.Enter code opening a block of code with trigraphs   ??<   or  ??(   in place of   {   or   [   respectively
2.Close the blocks using trigraphs  ??>   or   ??)   on a following line in place of   }   or   ]   respectively
3.Edit -> Format

The indentation in the code does not properly line up.
Comment 1 Anton Leherbauer CLA 2010-11-02 03:47:46 EDT
*** Bug 329154 has been marked as a duplicate of this bug. ***
Comment 2 Ted Shaneyfelt CLA 2014-02-15 19:21:01 EST
(In reply to Anton Leherbauer from comment #1)
> *** Bug 329154 has been marked as a duplicate of this bug. ***

Although both bugs have to do with trigraphs, the highlighting of that bug and the indentation of this bug are not necessarily the same bug, depending on how it gets fixed. 

Another note: You should also look at digraphs for C++, as well as trigraphs.

for  [ ]  digraphs  <:  :>   in addition to trigraphs   ??(    ??)
for  { }  digraphs  <%  %>   in addition to trigraphs   ??<    ??>
for  #    digraph   %:       in addition to trigraph    ??=
for  ##   the double-digraph  %:%: