hwdb: fix parser to work with newer pyparsing
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 29 Mar 2022 10:17:51 +0000 (12:17 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 Apr 2022 17:39:01 +0000 (19:39 +0200)
commit1fe496fc3bd581947698b483fc044bcf08ef2a55
tree752254d451e8e715e7016d5a137eb137a02a7eac
parent32e7c65372945f0d3aa5d378dd1e832d62c51949
hwdb: fix parser to work with newer pyparsing

The handling of whitespace in pyparsing is a bother. There's some
global state, and per-element state, and it's hard to get a handle on
things. With python3-pyparsing-2.4.7-10.fc36.noarch the grammar would
not match. After handling of tabs was fixed to not accept duplicate tabs,
the grammar passes.

It seems that the entry for usb:v8087p8087*
was generated incorrectly because we treated the interface line
(with two TABs) as a device line (with one TAB).

(cherry picked from commit f73d6895872cb9caffc523e1eddc53c9b98cfdec)
hwdb.d/20-usb-vendor-model.hwdb
hwdb.d/ids_parser.py