contrib/fsm-to-dot: add -h option to print basic instructions

Change-Id: I196033e44d50ebb73cf9b44cbdc94a2b8b4f98ce
This commit is contained in:
Neels Hofmeyr 2018-03-25 01:01:32 +01:00 committed by Neels Hofmeyr
parent 21946e8f5d
commit 167f808d76
1 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,10 @@ No proper C parsing is done here (pycparser sucked, unfortunately).
import sys, re, os
if '-h' in sys.argv or '--help' in sys.argv:
print(__doc__)
exit(0)
def err(msg):
sys.stderr.write(msg + '\n')