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

[postgresql] Method checkLA(int c) is not target agnostic. #4324

Closed
kaby76 opened this issue Nov 12, 2024 · 0 comments
Closed

[postgresql] Method checkLA(int c) is not target agnostic. #4324

kaby76 opened this issue Nov 12, 2024 · 0 comments

Comments

@kaby76
Copy link
Contributor

kaby76 commented Nov 12, 2024

I am now writing every port for the PostgreSQL grammar. But, I'm finding that the grammar is not Target Agnostic

In PostgreSQLLexer.g4, checkLA('-') cannot be target agnostic because not all languages can automatically cast a character literal (or string literal) '-' to an integer (e.g., JavaScript).

All actions in the .g4's must be parameterless method calls.

kaby76 added a commit to kaby76/grammars-v4 that referenced this issue Nov 13, 2024
teverett pushed a commit that referenced this issue Nov 17, 2024
* Fixes for #4321, #4322

* Update README.md

Warnings fixed.

* Fixes for #4324, adding ports.

* Fix Antlr4ng, CSharp, and Java ports. Change Deque to Stack to clarify port code.

* Add TypeScript port, fix symbol conflict for TypeScript port.

The TypeScript port generates `any_name._list()` accessor method for alts with multiple `any_name` references. This conflicts with the symbol reference `any_name_list`, which is another production.

* Fix Cpp target.

* Try to get Mac to behave.

* Not sure what happened. Try again.

* Try3.

* Add Dart target.

* Add Python3 target.

* Add JavaScript port.

* Fix Go port.

* Add blurb on target agnostic to readme.

* Clean up. Force rebuild of Macos Java.
@kaby76 kaby76 closed this as completed Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant