summaryrefslogtreecommitdiff
path: root/examples/dump_ast.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dump_ast.py')
-rw-r--r--examples/dump_ast.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/dump_ast.py b/examples/dump_ast.py
index b7c3273..e82d038 100644
--- a/examples/dump_ast.py
+++ b/examples/dump_ast.py
@@ -18,7 +18,10 @@ from pycparser import parse_file
if __name__ == "__main__":
argparser = argparse.ArgumentParser('Dump AST')
- argparser.add_argument('filename', help='name of file to parse')
+ argparser.add_argument('filename',
+ default='examples/c_files/basic.c',
+ nargs='?',
+ help='name of file to parse')
argparser.add_argument('--coord', help='show coordinates in the dump',
action='store_true')
args = argparser.parse_args()