Skip to content

Conversation

@kaby76
Copy link
Contributor

@kaby76 kaby76 commented Sep 6, 2023

This is a fix for #3125 -- the PHP target is not being tested.

Testing of the PHP target was removed long ago, and never added back. In this PR, I added testing for the PHP target to the build. The driver templates for testing were updated so that the version of the Antlr tool is extracted from composer.json. Both Bash and Pwsh templates work, but I only added testing in Github Actions only for the Bash. After all, why duplicate testing and waste more money?

Attached is the test for the PHP target against the entire repo. Only python/python3 and sql/snowflake failed.
out.txt

In the case of python3, the problem is that there is no port for PHP. For snowflake, the grammar contains a symbol collision (PHP id's are case insensitive). But, even renaming one of the symbols, REFRESH_ON_CREATE, the grammar is so slow as to be unusable.

Because I touched python/python3/ to remove PHP testing for it, the TypeScript target broke. That's because there was a change (really a fix) to the Antlr4 TypeScript target runtime API for the constructor of CommonToken. I fixed the code and reset the desc.xml to make sure people know only Antlr 4.13.1 can be used with the grammar.

Update build script to extract runtime version from composer.json, then find the tool version from online sources. Add in PHP testing.
@kaby76 kaby76 changed the title Fix for #3125 Fix for #3125 -- Add Antlr4 PHP target testing Sep 11, 2023
@kaby76 kaby76 marked this pull request as ready for review September 13, 2023 23:14
@teverett
Copy link
Member

@kaby76 thanks!

@teverett teverett merged commit 9b7ae73 into antlr:master Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants