#!/usr/bin/env bash # # make_tptp_parser - Runs ML-Yacc to generate TPTP parser and makes it # Isabelle-friendly. # # This code is based on that used in src/Tools/Metis to adapt Metis for # use in Isabelle. INTERMEDIATE_FILES="tptp.yacc.sig tptp.lex.sml tptp.yacc.sml" echo "Cleaning" rm -f tptp_lexyacc.ML echo "Generating lexer and parser" ml-lex tptp.lex && ml-yacc tptp.yacc echo "Generating tptp_lexyacc.ML" ( cat < tptp_lexyacc.ML rm -f $INTERMEDIATE_FILES tptp.yacc.desc