pep8ify regex.py
fix some bugs reported by pylint
pep8ify syntax.py

* TODO: refactor some things, move behaviour to Syntax and split the
  class cleanly, especially factoring out the symbol table part