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

Nested or inlined comments #1

Closed klauer closed 2 years ago

klauer commented 4 years ago

https://github.com/pcdshub/lcls-plc-kfe-xgmd-vac/blob/63b62d530f30cfcb8e0a8f88df11815d5948bd9a/plc/plc-kfe-xgmd-vac/plc_kfe_xgmd_vac/POUs/FB_VGP.TcPOU#L499-L516

Possible solution? https://stackoverflow.com/questions/462843/improving-fixing-a-regex-for-c-style-block-comments

klauer commented 2 years ago

The failure is due to the test suite running a different code path than the CLI blark parse. There are some comment pre-parsing fixes to be made, but overall it works.