Giter Site home page Giter Site logo

Analysis stuck about zpa HOT 6 CLOSED

felipebz avatar felipebz commented on May 17, 2024
Analysis stuck

from zpa.

Comments (6)

felipebz avatar felipebz commented on May 17, 2024

@nmorais do you already know what file is causing the problem in the analysis, right?

Could you open the problematic file in the sslr-plsql-toolkit and parse it, please?

If I broke the parser, the sslr-plsql-tookit will get stuck too.

from zpa.

nmorais avatar nmorais commented on May 17, 2024

@felipebz, sslr-plsql-toolkit got stuck too.

I have found what was freezing it in the file. After cutting several parts of the file, i have found that a subquery inside an EXISTS clause was the problem.

In previous commits, the parser simply failed because a AT as table alias. I dont know how the parser does not failed again, but moving the AT keyword to non reserved solved the problem.

As I have thousands of ATs used as table alias in my code, I have to support it anyway.

Finally, as it is supported, I'm making pull request #13 to move it to non reserved.

from zpa.

felipebz avatar felipebz commented on May 17, 2024

@nmorais just to be clear, the cause of the freezing is the use "AT" as a table alias? Or the problem with the subquery inside an EXISTS clause that you mentioned is another situation?

Anyway, you made me realize that I made a wrong assumption in the PlSqlKeyword class.

Actually there are two sets of reserved keywords:

"AT" is a reserved keyword in PL/SQL (we can't declare a "PROCEDURE AT(...)"), but it isn't reserved in SQL. Thanks for the pull request, I'll review it soon.

from zpa.

nmorais avatar nmorais commented on May 17, 2024

@felipebz, I have found that the cause was the AT keyword itself. This file has 1k+ lines and the keyword appears dozens of times. Parsing runned instantly after replacing the AT keyword for other alias.

from zpa.

nmorais avatar nmorais commented on May 17, 2024

Hi @felipebz!

I think this issue can be closed.

This problem surfaced again in the same file last week. It was related to a issue in  a CASE statement. When the implementation the the CASE statement was fixed, the filed parsed fast.

It seems a problem that can appear when parser fails in complex files, not a bug of this plugin.

Since 98% of my code base is parsing successfully, I hope this problem never appear again! :)   

from zpa.

felipebz avatar felipebz commented on May 17, 2024

Since it can't be reproduced anymore, I will close this issue. ;-)

from zpa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.