ktokens = tokens where
    tokens = spaces >> (end <|> more)
    more = (:) <$> (numToken <|> wordToken) <*> tokens
    end = eof >> return []

wordToken = do word <- many1 (noneOf " \t\r\n\f\v")
               case word of "def"    -> return KtDef
                            "extern" -> return KtExtern