Elements of C / C++ Lexical Conventation
- Tokens:
- Tokens are separated by blank space , new lines,
tabs etc.
- C++ parsers processes the token like identifiers,
keyword/reserved word, comment and escape characters etc
- Comments:
- range comment : the character like /* ---*/
- single line comment : //
- Identifiers
- keyword / reserved word blank-space identifier
- class myClass
- enum Emp
- int variable
- Keywords
- These are reserved identifiers and can't be used in
your code.
- abstract, _abstract, bool, char ,class. const,
case etc.
- Constants
- String
- Punctuation and Special characters
- punctuation like !, \, ^,
- Operators
- + is addition
- * is multiplication
- *x1 a pointer
- = assignment and so on.
|