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

The yacc parser's tables are cached to improve build performance, and are
rebuilt by running blink_idl_parser.py directly, which simply initializes
the IDL parser and expects PLY (yacc.py) to write the cached tables as a
side-effect.

However, if the file containing the cached tables exists, then PLY will
instead try to load the stale cache. If that succeeds, it will disable
the rewriting, since there's no point in writing to the cache what was
just read from it.

Fix by always deleting the cache file whenever blink_idl_parser.py is
executed directly, before initializing the parser. This way, PLY will not
use cached tables, and will instead write the cache file.

BUG=387631

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176745 bbb929c8-8fbe-4397-9dbb-9b2b20218538
1 file changed
tree: ff82e05d06d3830b5fcaa5c5c863a75eceb35aa4
  1. third_party/