type token = LPAR | RPAR | LAPAR | RAPAR | LSPAR | RSPAR 
           | PLUS  
           | MID
           | PARAM of char list
           | NONTERM of char list
           | TERM of char list

val lexer : char Stream.t -> token Stream.t