re2c: add a validation function for simple integers