summaryrefslogtreecommitdiff
path: root/utils/codegen/ipc/parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/codegen/ipc/parser.py')
-rwxr-xr-xutils/codegen/ipc/parser.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/codegen/ipc/parser.py b/utils/codegen/ipc/parser.py
new file mode 100755
index 00000000..8e70322d
--- /dev/null
+++ b/utils/codegen/ipc/parser.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (C) 2020, Google Inc.
+#
+# Author: Paul Elder <paul.elder@ideasonboard.com>
+#
+# Run mojo parser with python3
+
+import os
+import sys
+
+# Make sure that mojom_parser.py can import mojom
+sys.path.insert(0, f'{os.path.dirname(__file__)}/mojo/public/tools/mojom')
+
+import mojo.public.tools.mojom.mojom_parser as parser
+
+parser.Run(sys.argv[1:])