concept parser in category sbt

This is an excerpt from Manning's book sbt in Action.
Remember the parser defined in section 7.1 for reading in a SQL query? Let’s look at it again:
val queryParser: Parser[String] = { import complete.DefaultParsers._ token(any.* map (_.mkString)) }Parsers are able to take an input stream and attempt to see if that string matches their expectations. If it does, the parser return a value, denoted in its type. For example, the query parser has the type Parser[String], denoting that if it successfully parses a query, it will return a String.
The sbt completion library provides a core set of parsers within the DefaultParsers object that you can use to build up more-complex parsers. The queryParser uses the any parser, which is defined to accept any one character of input and return it as a result. The type of the any parser is Parser[Char], because it just returns the value it parsed. This parser then has the * method applied to it. This method converts the underlying parser to a new parser that accepts the underlying parser zero or more times (similar to regular expression usage). The new any.* parser has type Parser[Seq [Char]], denoting that it returns a sequence of results from the underlying any parser; see figure 7.1.
The final piece of the queryParser is the map (_.mkString) method call. The map method is used to take the result of a parser, if it parsed successfully, and convert it into another return value. If the parser failed to parse the value, an error message is returned instead and the map is not run. In the queryParser case, the map method calls mkString on a Seq[Char] to convert the parsed set of characters into a unified String when the parser successfully parses a string.