
there are two basic syntactic modes:

TeX mode:

* any letter is an identifier by itself

Program mode:

* sequences of letters (and possibly other characters)
  are collapsed into a single token. Id tokens are separated
  by any other character not included in one of the collapsing
  categories.

The mode is a property of the parser.

there are two basic semantic modes:

math mode:

* implicit operator is multiplication

program mode:

* implicit operator is function application
