Does instaparse support special symbols for EOF and/or BOF?
Hm, first experiments give hint that having <EOF> = <#'\\Z'> in my grammar works.
<EOF> = <#'\\Z'>
You could use the regex symbol for end of string, #"$" I believe