Skip to content

Commit

Permalink
Merge pull request #3379 from bollwyvl/gh-3350-py3-entry-point
Browse files Browse the repository at this point in the history
[Python3] rename pygrun, add entry_point
  • Loading branch information
parrt authored Dec 28, 2021
2 parents 6373bc4 + e8411fc commit 5b2beba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions contributors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -320,5 +320,6 @@ YYYY/MM/DD, github id, Full name, email
2021/10/19, jcking, Justin King, [email protected]
2021/10/31, skef, Skef Iterum, [email protected]
2021/10/31, hlstwizard, [email protected]
2021/11/30, bollwyvl, Nick Bollweg, [email protected]
2021/12/03, eneko, Eneko Alonso, [email protected]
2021/12/25, Tinker1024, Tinker1024, [email protected]
6 changes: 0 additions & 6 deletions runtime/Python3/bin/pygrun.bat

This file was deleted.

2 changes: 1 addition & 1 deletion runtime/Python3/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
license='BSD',
author='Eric Vergnaud, Terence Parr, Sam Harwell',
author_email='[email protected]',
scripts=["bin/pygrun"],
entry_points={'console_scripts': ['pygrun=antlr4._pygrun:main']},
description='ANTLR 4.9.3 runtime for Python 3.7'
)
6 changes: 5 additions & 1 deletion runtime/Python3/bin/pygrun → runtime/Python3/src/antlr4/_pygrun.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def beautify_lisp_string(in_string):
return out_string


if __name__ == '__main__':
def main():

#############################################################
# parse options
Expand Down Expand Up @@ -162,3 +162,7 @@ def process(input_stream, class_lexer, class_parser):
process(input_stream, class_lexer, class_parser)
else:
print("[ERROR] file {} not exist".format(os.path.normpath(file_name)))


if __name__ == '__main__':
main()

0 comments on commit 5b2beba

Please sign in to comment.