Added a statement to check for end-of-file which was previously missing

ECA programs can no longer contain syntactical garbage at the end of a file