Implement First-function

Also: remove use of IToken type for tokens. A grammar-type is now
completely parameterized.

Every use of the grammar type puts a either a comparison contraint or
equality constraint on the type-parameter.