]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hwdb: enable diagnostic switches
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 26 Nov 2020 20:59:56 +0000 (05:59 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 26 Nov 2020 20:59:56 +0000 (05:59 +0900)
hwdb.d/parse_hwdb.py

index ed07224b3ccb8fcd559a74d33d9a7a79c5f3416b..52f881623cc49d5442b80d17d63a40484c3d0a6a 100755 (executable)
@@ -33,7 +33,7 @@ try:
                            OneOrMore, Combine, Or, Optional, Suppress, Group,
                            nums, alphanums, printables,
                            stringEnd, pythonStyleComment,
-                           ParseBaseException)
+                           ParseBaseException, __diag__)
 except ImportError:
     print('pyparsing is not available')
     sys.exit(77)
@@ -50,6 +50,12 @@ except ImportError:
     # don't do caching on old python
     lru_cache = lambda: (lambda f: f)
 
+__diag__.warn_multiple_tokens_in_named_alternation = True
+__diag__.warn_ungrouped_named_tokens_in_collection = True
+__diag__.warn_name_set_on_empty_Forward = True
+__diag__.warn_on_multiple_string_args_to_oneof = True
+__diag__.enable_debug_on_named_expressions = True
+
 EOL = LineEnd().suppress()
 EMPTYLINE = LineEnd()
 COMMENTLINE = pythonStyleComment + EOL