You might find you can use an existing pure-Python library and run it directly. Have you tried running PLY directly in MicroPython? You might need to change a couple of things or provide some missing functions, but for the most part it's "just Python".

Lark might be another good option.

One of the main constraints is likely the RAM/ROM of the device you're running on. Which board/chip are you using?

For the current project, I found that making state machine in one-page hand-coded function looks much simpler than external libs (FORTH-like language for a few literal types). But maybe somebody in my team will want to use the more complex syntax. As a fallback variant, I has ragel and C module.