fix -Wsign-compare warnings in several grammars