m-m-m / util

Mature Modular Meta-Framework
http://m-m-m.sourceforge.net
Apache License 2.0
10 stars 5 forks source link

Add CharReaderScanner #233

Closed hohwille closed 7 years ago

hohwille commented 7 years ago

There is CharStreamScanner with an implementation CharSequenceScanner for CharSequences. We need a new implementation CharReaderScanner for Reader instances (in util-io or in the same base package in util-core - tbd). Further it will make sense to extract an abstract super-class for both implementations. Finally the method getCurrentIndex() shall be removed from CharStreamScanner as it makes no sense there. Otherwise the return type would need to be changed to long but this would only cause overhead with almost no use.

hohwille commented 7 years ago

~Maybe also methods like expectStrict need to be moved from interface to CharSequenceScanner.~

Solved with smart lookahead.

hohwille commented 7 years ago

Done and merged.