Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python3] rename pygrun, add entry_point #3379

Merged
merged 3 commits into from
Dec 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()