Octal codes are sometimes interpreted as back-references. I didn't know how to
separate octal codes from the back-references in the grammar since it seems to
be context sensitive, so I combined them into one production. The extra
characters are other ways of referring to back-references.