IDL parser: fix rebuilding of (stale) cached lexer tables

The PLY lexer caches its table as a Python module (lextab.py). The
cache is loaded by attempting to import the module, which succeeds
if there's a lextab.py{,c,o} anywhere in the Python path. If the
import succeeds, the cache is assumed by PLY to be up-to-date, so
to update the cache, we need to remove those files before calling
PLY to initialize the lexer.

This patch makes blink_idl_lexer.main() do just that. It also
extends blink_idl_parser.main() to call the former, since the GYP
(and GN) build systems only actually call the latter script.

BUG=397909

Review URL: https://codereview.chromium.org/425953002

git-svn-id: svn://svn.chromium.org/blink/trunk@179129 bbb929c8-8fbe-4397-9dbb-9b2b20218538
2 files changed
tree: 5a4e4958aaa00eef012f660e5f6603b571211537
  1. third_party/