mirror of
https://github.com/rosenpass/rosenpass.git
synced 2025-12-12 15:49:22 -08:00
feat: move awk prep call to Python
Co-Authored-By: Anja Rabich <a.rabich@uni-luebeck.de>
This commit is contained in:
@@ -41,6 +41,17 @@ def cpp(file, cpp_prep):
|
||||
params = ["cpp", "-P", f"-I{cwd}/{dirname}", file, "-o", cpp_prep]
|
||||
return exc(params, stderr=pkgs.sys.stderr)
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.argument("cpp_prep")
|
||||
@click.argument("awk_prep")
|
||||
def awk_prep(cpp_prep, awk_prep):
|
||||
params = ["awk", "-f", "marzipan/marzipan.awk", cpp_prep]
|
||||
with open(awk_prep, 'w') as file:
|
||||
exc(params, stderr=pkgs.sys.stderr, stdout=file)
|
||||
file.write("\nprocess main")
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.argument("prefix")
|
||||
@click.argument("mark")
|
||||
@@ -96,5 +107,6 @@ main.add_command(analyze)
|
||||
main.add_command(clean)
|
||||
main.add_command(run_proverif)
|
||||
main.add_command(cpp)
|
||||
main.add_command(awk_prep)
|
||||
main.add_command(pretty_output_line)
|
||||
main.add_command(clean_warnings)
|
||||
|
||||
@@ -99,17 +99,10 @@ metaverif() {
|
||||
local name; name="$(echo "${file}" | grep -Po '[^/]*(?=\.mpv)')"
|
||||
|
||||
local cpp_prep; cpp_prep="${tmpdir}/${name}.i.pv"
|
||||
|
||||
echo "internal metaverif"
|
||||
local awk_prep; awk_prep="${tmpdir}/${name}.o.pv"
|
||||
|
||||
exc rosenpass-marzipan cpp ${file} ${cpp_prep}
|
||||
|
||||
|
||||
local awk_prep; awk_prep="${tmpdir}/${name}.o.pv"
|
||||
{
|
||||
exc awk -f marzipan/marzipan.awk "${cpp_prep}"
|
||||
echo -e "\nprocess main"
|
||||
} > "${awk_prep}"
|
||||
exc rosenpass-marzipan awk-prep ${cpp_prep} ${awk_prep}
|
||||
|
||||
local log; log="${tmpdir}/${name}.log"
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user