Giter VIP home page Giter VIP logo

Comments (5)

jubnzv avatar jubnzv commented on June 23, 2024 1

I'm curious if there are ways that more unique error messages could be developed?

Yes, we can modify the parser to get better error messages, but I'm not sure we need this. The point is that this tool is a standalone static analyzer, so we expect that the input code was recognized as valid by some compiler. If iec-checker returns ParserError, it means that the problem is in this tool, not in the user code. So these errors only exists for the developers of the static analyzer to fix the parser.

I also want to note that in some places I intentionally violate the IEC61131-3 standard in the parser to make this tool compatible with some compilers that don't follow the standard. For example, I allow to use VAR_GLOBAL in any POU, not only in CONFIGURATION and RESOURCE entries. And in the future, if we refine the number of supported compilers, the number of violations of the standard in the parser will increase.

So I'm not in a hurry to add more readable error messages yet. Usually I can understand the meaning of ParserError based on the source code of the user.

from iec-checker.

engineerjoe440 avatar engineerjoe440 commented on June 23, 2024 1

Thanks again! I'm going to do some exploratory work with this tool, and I'll report any issues I run into!

from iec-checker.

jubnzv avatar jubnzv commented on June 23, 2024

Hi, Joe, thank you for reporting this.

I'd like to ask you, what IDE/compiler do you use? Does it allow the use of such syntax?

As far as I know, the access specifiers like PRIVATE can only be used with the class methods, not with function blocks. What is the point of using PRIVATE in your example?

from iec-checker.

engineerjoe440 avatar engineerjoe440 commented on June 23, 2024

Ah! You know.... That's a good point! I guess I wasn't thinking about the limitations of which objects could use the PRIVATE declaration.

Having only just started looking at this project, I'm curious if there are ways that more unique error messages could be developed? That way dummies such as myself wouldn't be so dumbfounded at first :P I have no idea what sort of complexity that would require, but I would imagine that more information in the error messages would always be more useful!

Thanks again for your work on this project, this looks fantastic!

from iec-checker.

jubnzv avatar jubnzv commented on June 23, 2024

Feel free to open new issues, if something doesn't work. I am primarily focused on supporting the matiec compiler and the compiler being developed in our company, so the parser may get stuck on some input data.

from iec-checker.

Related Issues (13)

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.