type Token = (SourcePos,Tok) data Tok = Production String | Terminal String scanner :: [Char] -> ([Token],[String]) main =