The conflict comes from the grammar being ambiguous. If you have a PARAM_LIST that is
WORD = NUM NUM is that one PARAM (a WORD = VALUES with 2 NUMs) or two (a WORD = VALUES with one NUM followed by a bare NUM param?
The default "prefer shift" resolution will treat it as the former -- basically any VALUES will absorb as many NUM tokens as it can, leaving none to be stand-alone params. If that is the preferred resolution, then you can just leave it as that, but if you really want to shuwshut up the "warning" message, you can either:
Add precedence rules to shut it up: a
%right NUMis all you actually need (prefer You want shifting aNUMtoken to reducing ahave higher precedence that the rule with aNUMtoken likeVALUESPARAM: VALUESWORD NUMEQUAL VALUES.) The only real danger here islatter will get the precedence of theEQUALtoken, so that if you later add more rules usingneeds to have higher precedence thanNUMthis. The main danger in using the precedence mightrules is in overspecifying them and having them trigger when you don't expect it (hiding. This might hide a conflict thatif you would prefer to resolve a different way).have any other rules that use the tokensNUMorEQUALRefactor the grammar to make the ambiguity go away. Something like
NUM_PARAMS: NUM | NUM_PARAMS NUM ; WORD_PARAM: WORD EQUALSEQUAL VALUES ; WORD_PARAMS: WORD_PARAM | WORD_PARAMS WORD_PARAM ; PARAM_LIST: NUM_PARAMS WORD_PARAMS | NUM_PARAMS | WORD_PARAMS ;
This makes it clear that when you have both params that are bare NUMs and params that are WORD = VALUES all the bare NUMs must come first.
If, on the other hand, you would rather have the ambiguity resolved the other way (so that the trailing NUM is a separate param), the easiest fix is probably just to change the WORD EQUAL VALUES to WORD EQUALS NUM.