You must define the following in the user definitions section:%header (functor CalcLexFun(structure Tokens : Calc_TOKENS))
This is the type of position values for terminals. This type must be the same as the one declared in the specification for the grammar. Note, however, that this type is not available in the Tokens structure that parameterizes the lexer functor.type pos
These types are used to give lexers signatures.type svalue = Tokens.svalue type ('a,'b) token = ('a,'b) Tokens.token type lexresult = (svalue,pos) token