i keep hitting the error Too many different token groups (17) to represent them as a 16-bit bitfield. i tried searching for it but i got 0 results for lezer related posts.
The parser generator automatically detects ambiguous tokens (that match the same input) and will, if they aren’t used in the same context, implicitly distinguish them by context. But the system used by this uses a 16-bit bitfield to store the set of contexts valid at a given parse position, and your grammar somehow causes it to produce more than sixteen different contextual token groups. This suggests you either have some highly ambiguous tokens, or you are using a bunch of different names for the same kind of token in different situations. If it’s the latter, consider using a single token type (possibly lower-cased) and wrapping it in nonterminals to tag it in a contextual way (i.e. VariableName { identifier }, TypeName { identifier }, etc).
… or just use the same upper-case token for these directly, since it may not be worth much to have different node names.
In general, it’s a good idea to not duplicate tokens. The ModWith/Ratio tokens could be defined unambiguously by stating that the Ratio always has precedence.