10.1.1 Tokens and identifiers
A token in formal language theory is a unit of text which is individisible, and which carries a specific meaning. For example, in natural language, words are usually taken to be tokens, but so are "commas", "semicolons" and "periods".
In Amine's CGs, tokens include:
All these are treated as units that each has a special meaning.
But what is an identifier?
An identifier is a token that consists of:
And further, the first two characters must be letters.
However, the following all fail to be identifiers. Can you spot why, given the above definition?
PrevLite: 10.1 CG syntax
NextLite: 10.1.2 Concepts
Prev: 10.1 CG syntax
Up: 10.1 CG syntax
Next: 10.1.2 Concepts