Felipeasg / matiec_examples

Simple examples about how to use MATIEC compiler for IEC 61131-3
31 stars 22 forks source link

Can I get abstract syntax tree (AST) by using matiec? #4

Open zeyuid opened 4 years ago

jubnzv commented 4 years ago

No.

But this is possible using my tool: https://github.com/jubnzv/iec-checker.

Install it according to README and use something like this:

iec_checker path/to/file.st -dump true

This will generate an AST dump in JSON format in path/to/file.st.dump.json.

zeyuid commented 3 years ago

No.

But this is possible using my tool: https://github.com/jubnzv/iec-checker.

Install it according to README and use something like this:

iec_checker path/to/file.st -dump true

This will generate an AST dump in JSON format in path/to/file.st.dump.json.

Thanks! I saw that the IEC-checker give a test demo about .st file. Does it support the IL standard language?

jubnzv commented 3 years ago

Does it support the IL standard language?

No, it doesn't support IL. But it will work well with ST used in matiec.

I'm not actively working on this utility right now, because I have encountered the following problem. There are a lot of non-standard extensions of IEC syntax in popular commercial IDEs (Beckhoff, CodeSyS, etc.). Without these syntax derivatives, IEC checker can't be used of lots of users. Adding the new syntax is a difficult and time-consuming job with an unknown result for me. So, I'm not interested in continuing working on it.

Feel free to reuse and extend existing source code of checker, according to it free license.

zeyuid commented 3 years ago

Does it support the IL standard language?

No, it doesn't support IL. But it will work well with ST used in matiec.

I'm not actively working on this utility right now, because I have encountered the following problem. There are a lot of non-standard extensions of IEC syntax in popular commercial IDEs (Beckhoff, CodeSyS, etc.). Without these syntax derivatives, IEC checker can't be used of lots of users. Adding the new syntax is a difficult and time-consuming job with an unknown result for me. So, I'm not interested in continuing working on it.

Feel free to reuse and extend existing source code of checker, according to it free license.

Yes, this problem does exist. Thanks for your information!