miho / VMF-Text

Powerful Grammar-based Language Modeling Framework
Apache License 2.0
10 stars 0 forks source link

Simplify Formatter API #3

Closed miho closed 5 years ago

miho commented 6 years ago

The current formatter API provides pre() and post() methods. To render an element by the formatter without using the generated unparser, we have to declare the element as being consumed. This is overly complicated. We should replace the pre()and post() methods with just one method that can decide wether to emit text from the unparser or not.

miho commented 5 years ago

We introduced a render() method which provides full control over the rendering which was complicated with the old api. pre() and post() remain however.