Generate rules for literals