This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

34
cppdraft/lex/operators.md Normal file
View 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.8Operators and punctuators[lex.operators]")
[*preprocessing-operator*](#nt:preprocessing-operator "5.8Operators and punctuators[lex.operators]")
[*operator-or-punctuator*](#nt:operator-or-punctuator "5.8Operators and punctuators[lex.operators]")
[preprocessing-operator:](#nt:preprocessing-operator "5.8Operators and punctuators[lex.operators]") one of
# ## %: %:%:
[operator-or-punctuator:](#nt:operator-or-punctuator "5.8Operators 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.8Operators and punctuators[lex.operators]") is converted to a single token
in translation phase 7 ([[lex.phases]](lex.phases "5.2Phases of translation"))[.](#1.sentence-2)