lean4-htt/tests/compiler/foreign/relative.py
Leonardo de Moura 2a1d9a0285 test: simple demo mixing C/C++ and Lean
@dselsam @kha
I did not have to create a new shared library.
The main limitation of this approach is that the new `extern`
functions are only available in compile code. That is, we cannot use
them with `#eval`.
2020-04-06 16:16:49 -07:00

14 lines
462 B
Python

# Copyright (c) 2018 Microsoft Corporation. All rights reserved.
# Released under Apache 2.0 license as described in the file LICENSE.
# Authors: Simon Hudon, Sebastian Ullrich
import sys
import os
import re
for x in sys.stdin:
# HACK: rewrite Windows path to mingw path
x = re.sub(r"^(\w):", lambda m: "/" + m[1].lower(), x).replace('\\', '/').strip()
curr = os.path.realpath(os.curdir)
curr = os.path.normpath(curr)
print(os.path.relpath(x, curr))