One piece to mind is
DiceExpression.jj. I wrote it some time back to parse simple dice roll expressions such as 2d6+3. To wit, Maven provides a JavaCC plugin but the documentation is rather sparse. I can tease most of it out from the
plugin.jelly for JavaCC, however a working example is always easier.
Happily, Howard Lewis Ship provides one ironically named Moving Away from Maven. Thank you, Howard.