Choose Nodes> Node Dictionary> C++Text from the menu bar to access the C++Text node dictionary. In this chapter:
Brackets include parentheses, squares, and curly brackets:
(Left parenthesis. In the following example, the left parenthesis has a body with a
)Right parenthesis. In the following example, the right parenthesis is directly next to the left parenthesis, which is in turn directly n ext to the
[Left square bracket. In the following example, the left square bracket has a body with
]Right square bracket. In the following example, the right square bracket is directly next to the left square bracket, which is in turn directly next to
{Left curly bracket. In the following example, the left curly bracket has a body with function's
}Right curly bracket. In the following example, the right curly bracket is directly next to the left curly bracket, which is in turn directly next to the right parenthesis. All statements in function's
|
C and C++ style comments:
/*C style comment. For example:
//C++ style comment. For example:
|
The following constant expressions are included:
Char ConstantConstant char expression. For example:
|
static string msgQuit = "Quit message"; // Identifiers Constant: "static", "string", "msgQuit" |
Constant Numerical expression. For example:
int one = 1; // Number Constant "1" double pi = 3.14; // Number Constant "3.14" |
Constant string expression. For example:
char* one = "number one"; // String Constant " "number one" " string simpleText = "This is simple text"; // String Constant " "This is simple text" " |
Alternative token representations for some operators and punctuators.
%:Alternative token for
%>Alternative token for
:>Alternative token for
<%Alternative token for
<:Alternative token for
|
Includes all types of expression nodes.
AssignmentAssignment expressions include the following operators: %=Mod-equals operator. For example:
&=Bitwise-and-equals operator. For example:
*=Multiply-equals operator. For example:
++Increment operator. For example:
+=Plus-equals operator. For example:
--Decrement operator. For example:
-=Minus-equals operator. For example:
/=Divide-equals operator. For example:
<<=Left-shift-equals operator. For example:
=Assignment operator. For example:
>>=Right-shift-equals operator. For example:
^=Bitwise-xor-equals operator. For example:
|=Bitwise-or-equals operator. For example:
BitwiseThe following bitwise operators are included: &Bitwise 'AND' operator. For example:
^Bitwise 'XOR' operator. For example:
|Bitwise 'OR' operator. For example:
~Bitwise 'NOT' operator. For example:
ComparisonThe following comparison operators are included: !='Not-equal' operator. For example:
<'Less than' operator. For example:
<='Less than or equals' operator. For example:
=='Equality' operator. For example:
>'Greater than' operator. For example:
>='Greater than or equals' operator. For example:
LogicalThe following logical operator expressions are included: !Logical 'NOT' operator. For example:
&&Logical 'AND' operator. For example:
||Logical 'OR' expression. For example:
MiscellaneousThe following miscellaneous expressions are included: ->Dereference operator. For example:
|
class Foo { public: void func(); }; typedef void(Foo::*mpf)(); void bar(Foo *f) { mpf ampf = &Foo::func; (f->*ampf)(); // Arrow-star operator "->*" } |
Dot operator. For example:
class A { public: int foo; } [...] a.foo = 1; //Dot operator. |
Double colon operator. For example:
class A { int foo(); }; int A::foo() { // Double colon operator (A::foo()) return 1; } |
Ternary operator. For example:
bool func(int x) { return x ? true : false; // Ternary operator "?" } |
Pointer-to-member operator. For example:
class A { public: void foo(); }; typedef void (A::*PtrToMember)(); void bar(A& a, PtrToMember ptr) { (a.*ptr)(); // ".*" operator } |
Ellipsis. For example:
void foo(...); /* ellipsis */
The following numerical expressions are included:
Mod operator. For example:
int j = 11; int i = j % 2; //Mod operator (j % 2) |
Asterisk operator. For example:
int plus1 = 2 * 2; //Asterisk operator (multiplication) int *plus2 = &plus1; //Asterisk operator (pointer type) |
Plus operator. For example:
int j = 2; int plus1 = 1 + j; //Plus operator (addition) int plus2 = +1; //Plus operator (meaningless) |
Minus operator. For example:
int j = 2; int minus1 = 1 - j; //Minus operator (substraction) int minus2 = -1; //Minus operator (negation) |
Division operator. For example:
float f = 3; float r = f / 2; //Division operator |
Binary shift-left operator. For example:
int i = 2; int j = i << 1; //shift-left operator (i << 1) |
Binary shift-right operator. For example:
int i = 2; int j = i >> 1; //shift-right operator (i >> 1) |
General nodes
File containing source code.
General line nodes.
Single line. For example:
//first line (#line = 1) //third line (as second is empty) //access this comment using "All" line's property |
The following preprocessor directives are included.
#defineThe
#elifThe
#elseThe
#endifThe
#ifThe
#ifdef"#ifdef" preprocessor directive. For example:
#ifndefThe
#includeThe
#pragmaThe
#undefThe
|
General node of all types of statements.
break
case
catch
continue
default
do
else
for
goto
if
return
switch
try
while
|
Tokens are basic language elements.
This is a basic lexical object recognized by lexer. Example statement:
int Table[10]; // this is statement
The following tokens are objects in this example statement:
int
Table
[
10
]
;
// this is statement.
Notice that the comment (// this is statement
) is a single token.
Trigraphs are special sequences of three characters. Trigraphs are replaced with a corresponding single character when they appear in a source file.
??/Trigraph sequence replaced with
??)Trigraph sequence replaced with
??'Trigraph sequence replaced with
??<Trigraph sequence replaced with
??!Trigraph sequence replaced with
??>Trigraph sequence replaced with
??-Trigraph sequence replaced with
|
Various nodes not fitting in other categories.
,Comma operator. For example:
:Colon operator. For example:
;Semicolon operator. For example:
\Backslash. For example:
|
Whitespace
Tab and space characters.
Space character. For example:
do_something( ); /* The call above has single space at start of line and single space in parentheses body */ |
Tab character. For example:
int i = 1; /* The statement above has a single tab at start of line */ |