summaryrefslogtreecommitdiffstats
path: root/third_party/stp/bison.py
diff options
context:
space:
mode:
authormdempsky <mdempsky@chromium.org>2014-12-01 16:26:33 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-02 00:26:54 +0000
commit6b5854d2b4b32c32c039bbad94356c76fc08b397 (patch)
tree6e6c5d0fe223636bf200595e909ee404a8becc95 /third_party/stp/bison.py
parentb199254f481c5db36d56e83fce40594b06d2b81f (diff)
downloadchromium_src-6b5854d2b4b32c32c039bbad94356c76fc08b397.zip
chromium_src-6b5854d2b4b32c32c039bbad94356c76fc08b397.tar.gz
chromium_src-6b5854d2b4b32c32c039bbad94356c76fc08b397.tar.bz2
Add STP to third_party
BUG=414363 Review URL: https://codereview.chromium.org/656373002 Cr-Commit-Position: refs/heads/master@{#306306}
Diffstat (limited to 'third_party/stp/bison.py')
-rw-r--r--third_party/stp/bison.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/third_party/stp/bison.py b/third_party/stp/bison.py
new file mode 100644
index 0000000..947ea3f
--- /dev/null
+++ b/third_party/stp/bison.py
@@ -0,0 +1,18 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import subprocess
+import sys
+
+(source, name, out,) = sys.argv[1:]
+
+subprocess.check_call([
+ "bison",
+ "--debug",
+ "-Wnone",
+ "-o", out + ".cpp",
+ "--defines=" + out + ".hpp",
+ "-p", name,
+ source,
+])