Skip to content

Instantly share code, notes, and snippets.

@anlun
Created March 10, 2021 06:39
Show Gist options
  • Save anlun/1f98a705e532aeb1029c5af34361228f to your computer and use it in GitHub Desktop.
Save anlun/1f98a705e532aeb1029c5af34361228f to your computer and use it in GitHub Desktop.
A script to transform "X.(Y)" to "(Y X)" in Coq files
#!/bin/bash
sed -i "s|\([a-zA-Z0-9\'\_]\+\)\.(\([a-zA-Z0-9\_\.\']\+\))\.(\([a-zA-Z0-9\_\.\']\+\))|(\3 (\2 \1))|g" src/*/*.v
sed -i "s|\([a-zA-Z0-9\'\_]\+\)\.(\([a-zA-Z0-9\_\.\']\+\))|(\2 \1)|g" src/*/*.v
sed -i "s|\(([a-zA-Z0-9\'\_\.\ ]\+)\)\.(\([a-zA-Z0-9\_\.\']\+\))|(\2 \1)|g" src/*/*.v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment