concept function application in category dsl
appears as: function application

This is an excerpt from Manning's book DSLs in Action.
The Scala library has a few combinators for function application that you can use to transform the result of a successful parse. These function application combinators help you integrate your semantic model with your parsing rules. With these combinators, you can parse your DSL script and also build up the domain model incrementally by applying one of these combinators. Instead of the default return values of your DSL parsers (which I provided in listing 8.2), your parsers can return attributes of your semantic model. This way, when you complete the parsing process, you’ve effectively built the whole semantic model as the AST.