The word token
refers to a part of a program that plays much the same role as a word in a sentenc: in some sense it means the same thing every time it appears.
The part of a compiler that breaks a program up into tokens is often called a lexical analyzer
.
inadvertently
: 실수로, without intention; accidentally.'apparently
: 보기에, as far as one knows or one see.plain
: 명백한,count on
: 기대다.inadvertent
: 부주의bite off
: 물어뜯다.colloquially
: 구어체로maximal munch
: 우적우적 먹다.constitude
: 구성하다, be (a part) of a whole.archaic
: 낡은sort
: 종류near-ambiguity
: 모호함gobble
: 펠라티오, 칠면조의 울음소리, 게걸스럽게 먹다, 울음소리를 내다.prohibit
: 금지하다, formally forbid (something) by law, rule, or ther authority.collating
: 대조collate
: 함께 함치다. 대조하다. 페이지 순서를 맞추다, 성직에 임명하다, collect and combine (texts, information, or sets of figures) in porper order.diagnostic
: 특수 증상, 진단 상의, 특징적인coincidental
: 동시에 일어나는, 일치하는, 부합하는, resulting from a coincidence; done or happening by chance.coincedence
: 우연의 일치=
is not ==
The title says it all.
&
and |
are not &&
or ||
The title says it all.
Greedy lexical analysis
The way to convert a C program to tokens is to move from left to right, taking the longest possible token each time. This strategy is also sometimes referred to as greedy
, or, more colloquially, as the maximal munch
strategy.
Many C compilers accept 8
and 9
as "octal" digits without complaint. The meaning of this strange construct follows from the definition of octal numbers. For instance, 0195
means , which is equivalent to 141
(decimal) or 0215
(octal).
Important:
ANSI C
prohibits it.
Because an integer is usually large enough to hold several characters, some C compilers permit multiple characters in a character constant as well as a string constant. This means that writing 'yes' instead of "yes" may well go undetected.
Interesting...
https://www.mythos-git.com/Cruzer-S/CTAP/-/tree/main/Chapter01
[Book] C Traps and Pitfalls (Andrew Koenig)