Init
This commit is contained in:
34
cppdraft/lex/operators.md
Normal file
34
cppdraft/lex/operators.md
Normal file
@@ -0,0 +1,34 @@
|
||||
[lex.operators]
|
||||
|
||||
# 5 Lexical conventions [[lex]](./#lex)
|
||||
|
||||
## 5.8 Operators and punctuators [lex.operators]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lex.tex#L774)
|
||||
|
||||
The lexical representation of C++ programs includes a number of
|
||||
preprocessing tokens that are used in the syntax of the preprocessor or
|
||||
are converted into tokens for operators and punctuators:
|
||||
|
||||
[preprocessing-op-or-punc:](#nt:preprocessing-op-or-punc "5.8 Operators and punctuators [lex.operators]")
|
||||
[*preprocessing-operator*](#nt:preprocessing-operator "5.8 Operators and punctuators [lex.operators]")
|
||||
[*operator-or-punctuator*](#nt:operator-or-punctuator "5.8 Operators and punctuators [lex.operators]")
|
||||
|
||||
[preprocessing-operator:](#nt:preprocessing-operator "5.8 Operators and punctuators [lex.operators]") one of
|
||||
# ## %: %:%:
|
||||
|
||||
[operator-or-punctuator:](#nt:operator-or-punctuator "5.8 Operators and punctuators [lex.operators]") one of
|
||||
{ } [ ] ( ) [: :]
|
||||
<% %> <: :> ; : ...
|
||||
? :: . .* -> ->* ^^ ~
|
||||
! + - * / % ^ & |
|
||||
= += -= *= /= %= ^= &= |=
|
||||
== != < > <= >= <=> && ||
|
||||
<< >> <<= >>= ++ -- ,
|
||||
and or xor not bitand bitor compl
|
||||
and_eq or_eq xor_eq not_eq
|
||||
|
||||
Each [*operator-or-punctuator*](#nt:operator-or-punctuator "5.8 Operators and punctuators [lex.operators]") is converted to a single token
|
||||
in translation phase 7 ([[lex.phases]](lex.phases "5.2 Phases of translation"))[.](#1.sentence-2)
|
||||
Reference in New Issue
Block a user