Comments (5)
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.
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.
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.
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.
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)
- opam: required argument PACKAGES is missing HOT 5
- Automate release generation in CI
- PLCOpen N1: Avoid physical addresses
- False positive: PLCOpen CP1
- Set major versions of dependencies
- Rewrite test suite in OCaml
- unexpected result for 'dead-code.st' example on Windows HOT 2
- IEC61131-3 3 ed. parser for Structured Tex. Almost all IEC syntax constructions are supported excluding some user-defined types and OO features. HOT 4
- Support B&R .st HOT 4
- Twincat Support Would HOT 1
- Specify the Location of the OCaml Binary for `checker.py` HOT 2
- Support for SEL (Schweitzer Engineering Laboratories) XML Format HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iec-checker.