Bug 185599 - the c++ keyword "not" is not supported.
Summary: the c++ keyword "not" is not supported.
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-26 13:44 UTC by Christoph Bartoschek
Modified: 2013-03-31 00:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Bartoschek 2009-02-26 13:44:52 UTC
Version:            (using Devel)
Installed from:    Compiled sources

The "not" keyword is not known by the parser. Adding the following code:

if (not 1) {

}

This lets kdevelop underline the letter 'n'. In the problems section there is: Condition expected.

The C++ standard states in §2.11.2:

Furthermore, the alternative representations shown in Table 4 for certain operators and punctuators (2.5) are reserved and shall not be used otherwise:

Table 4 — alternative representations

and        and_eq      bitand     bitor
compl      not         not_eq     or
or_eq      xor         xor_eq       


$2.12 states:

1 The lexical representation of C++ programs includes a number of preprocessing tokens which are used in the syntax of the preprocessor or are converted into tokens for operators and punctuators:

preprocessing-op-or-punc: one of
{          }          [         ]          #          ##         (        )
<:         :>         <%        %>         %:         %:%:       ;        :     ...
new        delete     ?         ::         .          .*
+          -          *         /          %          ˆ          &        |     ˜
!          =          <         >          +=         -=         *=       /=    %=
ˆ=         &=         |=        <<         >>         >>=        <<=      ==    !=
<=         >=         &&        ||         ++         --         ,        ->*   ->
and        and_eq     bitand    bitor      compl      not        not_eq
or         or_eq      xor       xor_eq

Each preprocessing-op-or-punc is converted to a single token in translation phase 7 (2.1).
Comment 1 David Nolden 2009-02-27 01:49:00 UTC
Should be fixed
Comment 2 Aleix Pol 2013-03-31 00:45:01 UTC
Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively