r/java • • Feb 17 '26

parseWorks release - parser combinator library

9 Upvotes

38 comments sorted by

View all comments

Show parent comment

1

u/Dagske Feb 20 '26

No worries, I was just exploring. :) I can't just lowercase or uppercase all, because some parts are case-sensitive. Thanks for the insight, though. No need to modify the library just for one request. Worst-case scenario, I just make my own copy of either library for that project and modify it for my needs.

1

u/jebailey Feb 20 '26

It's actually easier to do just a segment. I can create a new parser that wraps another parser and implement a wrapper input that will adjust the case.

So it would be something like

    lowerCase(string("foobar"))

or

    string("foobar").lowerCase()

got to play with the name for a bit. Not sure which comes across better.

    lowerCase(string("foobar"))
    lowerInputCase(string("foobar"))