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

Fail to Parse Array of Arrays #65

Closed engineerjoe440 closed 1 year ago

engineerjoe440 commented 1 year ago

More "in the wild" findings, yesterday! 😄

Seems that TwinCAT supports Arrays of Arrays, that is:

VAR
    someData : ARRAY [1..5, 6..9] OF ARRAY [0 .. 10] OF INT;
END_VAR

Or as Beckhoff documents.... https://infosys.beckhoff.com/english.php?content=../content/1033/tc3_plc_intro/8825255691.html&id=

I think this should be a relatively easy fix (I think). I'll have a PR inbound shortly.