procedure grepeat: reduce grid to smallest repeat
The following command line option is supported: -p assume partial repeats may occur at edges of pattern; default complete repeats