Often our applications have to be able to interpret small application specific languages. Parsing is an essential first step in this process and there are many tools which help in the task. Outside of the functional programming world these tools are typically based on external parsing DSLs and have heavyweight runtime infrastructure which can be excessive relative to small scale parsing tasks. By contrast, functional programming languages make the construction of parsers by way of higher-order function combinators straightforward and lightweight, allowing parsers to be written in the same language as the rest of the application and make use of all the capabilities of that language.
In this presentation
Miles Sabin will show how this approach works out in Scala, a multi-paradigm progamming language for the Java Virtual Machine which blends object-oriented and functional idioms seamlessly. As well as an overview of the combinator parser library which is included in Scala's standard library I will introduce the Scala language constructs which support the design of an internal DSL of this form.