Support defining lexers in Python files with a magic coding comment.  This works by using  to get the already decoding source lines rather than opening the source file directly using .
Do the same treatment for magic coding comments on yacc
Merge pull request #1096 from mdboom/misc/ply-unicode-file-patch

PLY parsers don't load on Python 3 when the source file contains Unicode and the locale is ascii