diff -r 829117ae2e55 Parser/parsetok.c --- a/Parser/parsetok.c Tue Jul 19 16:46:09 2016 -0500 +++ b/Parser/parsetok.c Fri Jul 22 00:08:00 2016 +1000 @@ -320,7 +320,10 @@ if (tok->buf != NULL) { size_t len; assert(tok->cur - tok->buf < INT_MAX); - err_ret->offset = (int)(tok->cur - tok->buf); + if (tok->start) + err_ret->offset = (int)(tok->start - tok->buf + 1); + else + err_ret->offset = (int)(tok->cur - tok->buf); len = tok->inp - tok->buf; err_ret->text = (char *) PyObject_MALLOC(len + 1); if (err_ret->text != NULL) {