import sys import string # Run it as grep token lexers/* | python scripts/token_abbrevs.py def abbr(line): return "".join(c for c in line if c in string.ascii_uppercase).lower() abbrevs = {} tokens = set([]) for line in sys.stdin: if " "{v}",') print("}")