initial commit to our tree.
reference python-ply.
sync with upstream.
sync with upstream.
sync with upstream.