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

Update antlr version to 4.11.1 #368

Merged
merged 6 commits into from
Sep 13, 2023
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
8 changes: 6 additions & 2 deletions cf_units/_udunits2_parser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ the multi-mode tokenizer of the UDUNITS-2 grammar.
The [parser](udunits2Parser.g4) defines the grammar of the tokens, along with
a number of convenient lexical elements.


### Generating the parser from the grammar

Once the Jinja2 template has been expanded, the
Expand All @@ -23,8 +22,13 @@ deployment and testing (we know it isn't ideal, but it really does make things e
Please commit the changed parser at the same time as any
changes to the grammar being proposed so that the two can remain in synch.

### Updating the ANTLR version

The above script downloads a Java Jar which needs updating to the same version
as antlr4-python3-runtime specified in the python requirements. Once these have
been updated, run [the script](compile.py) to regenerate the parser.

### Testing the gammar
### Testing the grammar

An extensive set of tests exist to confirm that the parser produces equivalent results
to the UDUNITS-2 reference implementation.
Expand Down
2 changes: 1 addition & 1 deletion cf_units/_udunits2_parser/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
raise ImportError("Jinja2 needed to compile the grammar.")


JAR_NAME = "antlr-4.7.2-complete.jar"
JAR_NAME = "antlr-4.11.1-complete.jar"
JAR_URL = f"https://www.antlr.org/download/{JAR_NAME}"
HERE = Path(__file__).resolve().parent

Expand Down
5,867 changes: 5,569 additions & 298 deletions cf_units/_udunits2_parser/parser/udunits2Lexer.py

Large diffs are not rendered by default.

Loading