-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyyc
More file actions
21 lines (19 loc) · 733 Bytes
/
pyyc
File metadata and controls
21 lines (19 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
#
# A shell script to call your compiler. Please edit as you like to invoke
# your compiler in the appropriate way.
#
# This script needs to be able to take one argument with the path to the
# input Python file and produce a file containing the output x86 file,
# except that the suffix should be replaced with the .s suffix. For example,
# executing
#
# $ ./pyyc mytests/test1.py
#
# should create an x86 assembly file tests/test1.s.
# THIS_DIR is bound to the directory that this script file is in.
# Use as needed.
THIS_DIR=$(cd $(dirname $0) && pwd)
# Example: A python script called src/pyyc/compile.py is passed
# the arguments that are passed to this script.
python3.10 ${THIS_DIR}/src/pyyc/compile.py $*