Relation between programming languages requiring declaration of variables before use and using the token class $\text{id}$ while parsing
In order for their example to work, the authors need identifiers to be of unlimited length. This is because the language
$$ \{ wcw : w \in \{a,b\}^*, |w| \leq n \} $$
is context-free (indeed, regular).
The syntax of a language like Pascal or Algol is context-free. This accomplished by waiving the requirement that an identifier be declared before its usage; this will be checked on-the-fly by the parser. This idea is implemented by representing identifiers as a single token in the grammar of Pascal or Algol.