#!/bin/bash # # Usage: # ./run.sh set -o nounset set -o pipefail set -o errexit # Wow 120 lines turns into 7060 lines. I guess it's because there's lots of # classes. build() { mkdir -p _tmp python3 asdl_c.py -c _tmp Python.asdl wc -l Python.asdl _tmp/*.c } tests() { python3 asdl_test.py } # Wow this is tiny! 376 lines. Need to replace the code gen. count() { wc -l *.py } # Original ASDL code generator? download-old() { wget --directory _tmp \ 'http://downloads.sourceforge.net/project/asdl/asdl/older%20distributions/asdlGen-1.2-2.x86-win32.zip?r=&ts=1459383751&use_mirror=master' } # Oh it's bootstrapped... asdl is in asdl I guess. # It includes CII! I guess Hanson influenced Appel or whatever. count-old() { find _tmp/asdlGen-1.2 -type f -a \ '(' -name '*.c' -o -name '*.h' -o -name '*.cxx' -o -name '*.hxx' ')' \ | xargs wc -l | sort -n } "$@"