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

[PLSQL] Single statement without ending semicolon #3556

Merged
merged 4 commits into from
Jul 20, 2023

Conversation

mfvitale
Copy link
Contributor

@mfvitale mfvitale commented Jun 26, 2023

In case of single statement without ending semicolon, do you think this should pass?

I think yes, since this query is valid. The statement should fail if is followed by another one.

@KvanTTT KvanTTT added plsql example New example of file(s) parsed by grammar-generated parser labels Jun 26, 2023
@mfvitale
Copy link
Contributor Author

mfvitale commented Jun 28, 2023

@KvanTTT To let single statement working without semicolon required lot of changes. Can I gently ask for a review?

@mfvitale mfvitale closed this Jun 30, 2023
@mfvitale mfvitale reopened this Jun 30, 2023
@mfvitale
Copy link
Contributor Author

mfvitale commented Jul 5, 2023

@KvanTTT Can you please help with

2023-06-30T09:02:35.6906590Z  Build 00:01:16
2023-06-30T09:05:54.3248377Z Parsing grammar /home/runner/work/grammars-v4/grammars-v4/sql/plsql/Generated-CSharp/PlSqlParser.g4
2023-06-30T09:10:52.9763475Z Process is taking longer than 300 seconds. Killing process.
2023-06-30T09:10:53.0751479Z Test failed.
2023-06-30T09:10:53.0776720Z  Test 00:08:18

I need some guidance on how to figure out the issue here. Thanks.

sql/plsql/PlSqlLexer.g4 Outdated Show resolved Hide resolved
sql/plsql/PlSqlParser.g4 Outdated Show resolved Hide resolved
@KvanTTT
Copy link
Member

KvanTTT commented Jul 19, 2023

I need some guidance on how to figure out the issue here. Thanks.

It looks like just a problem with CSharp test runner.

Co-authored-by: Ivan Kochurkin <kvanttt@gmail.com>
@mfvitale
Copy link
Contributor Author

@KvanTTT thanks for your suggestions. I have applied it.

@KvanTTT
Copy link
Member

KvanTTT commented Jul 19, 2023

@kaby76 it looks like there is a problem with coverage CI task. Could you investigate please?

@mfvitale
Copy link
Contributor Author

mfvitale commented Jul 19, 2023

@kaby76 it looks like there is a problem with coverage CI task. Could you investigate please?

Seems same issue with CSharp. Any suggestioni?

@kaby76
Copy link
Contributor

kaby76 commented Jul 20, 2023

I mentioned this for another PR. #3612 (comment)

And I opened an Issue for it. #3597

I will turn off voverage computations for now as this will require a change to trcover, and will take time to make sure it works.

@KvanTTT KvanTTT merged commit 0bad838 into antlr:master Jul 20, 2023
38 of 39 checks passed
@mfvitale mfvitale deleted the single_table branch July 20, 2023 09:18
rvrooman-codelogic pushed a commit to CodeLogicIncEngineering/grammars-v4-public-fork that referenced this pull request Jul 27, 2023
@Thracky
Copy link

Thracky commented Aug 21, 2023

I should probably open an issue for this but SQLPlus commands do not require a terminating semicolon at all. See section 4.6.1 of the SQLPlus user guide here: https://docs.oracle.com/en/database/oracle/oracle-database/23/sqpug/SQL-Plus-basics.html#GUID-4F029548-6DD2-468F-B6E1-E6D6AA59014B

So if you have a file that starts with:

WHENEVER SQLERROR EXIT

SET ECHO ON

CREATE OR REPLACE PACKAGE ...

These changes make the parser bail out immediately on the SET and it is perfectly legal syntax for SQLPlus commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example New example of file(s) parsed by grammar-generated parser plsql
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants