Adding EOF and BOF markers for patterns
Updating input pattern with EOF and BOF markers