klauer / blark

Beckhoff TwinCAT ST (IEC 61131-3) code parsing in Python using Lark (Earley)
https://klauer.github.io/blark/
GNU General Public License v2.0
42 stars 5 forks source link

Consider trying the OpenPLC grammar #7

Closed klauer closed 1 year ago

klauer commented 3 years ago

OpenPLC's matiec is a working compiler which has a grammar based on flex/yacc https://github.com/thiagoralves/OpenPLC_v3/blob/master/utils/matiec_src/stage1_2/iec_bison.yy

It's similar to the one blark is currently based on, but likely better tested. It may make sense to give porting it a try at some point.

klauer commented 2 years ago

With #9 I think I'll stick with what I have here, as it parses all Beckhoff PLC code I have. It could be a good reference, so I may leave this open just as a reminder / for further discussion if needed.

klauer commented 1 year ago

Joe added this in the README in #51 - I'll close this now.