Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 19. Parsing > What Exactly Are Parsers?

19.10. What Exactly Are Parsers?

Technically, a Parser[T] is a function with one argument, of type Reader[Elem], and a return value of type ParseResult[T]. In this section, we will have a closer look at these types.

The type Elem is an abstract type of the Parsers trait. (See Section 18.12, “Abstract Types,” on page 257 for more information about abstract types.) The RegexParsers trait defines Elem as Char, and the StdTokenParsers trait defines Elem as Token. (We will have a look at token-based parsing in Section 19.12, “Token-Based Parsers,” on page 283.)


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint