Scala: How to combine parser combinators from different objects
- by eed3si9n
Given a family of objects that implement parser combinators, how do I combine the parsers? Since Parsers.Parser is an inner class, and in Scala inner classes are bound to the outer object, the story becomes slightly complicated.
Here's an example that attempts to combine two parsers from different objects.
import scala.util.parsing.combinator._
…