utah-parser
utah-parser copied to clipboard
Exposing a proper iterator in "com.sonalake.utah.Parser"
In order to integrate with Apache FreeMarker I implemented an iterator (see https://github.com/apache/freemarker-generator/blob/master/freemarker-generator-tools/src/main/java/org/apache/freemarker/generator/tools/utahparser/impl/ParserWrapper.java)
Does it make sense to expose a Parser#iterator method out-of-the-box?
Looks nice; if you wanted to issue a PR with this and some tests we can include it in the next release.
Please have a look at https://github.com/sgoeschl/utah-parser/tree/UTAHPARSER-29
- Deprecating "Parser#next"? Mixing that with an iterator will cause problems ...
- Enforcing a single iterator only for a given Parser instance?
We'll ponder this a little