Internal representation (by NeoCortex)
Hi, I played with LDmicro for some time and I am now planning to build an Ladder logic editor of my own.
Even if my own editor is not meant for microcontrollers in general, but I would love if it fould be possible ti open LDmicro files in my editor too. I am planning to transform the ladder logic into an intermediate representation, so I can apply optimisations to it and export it back to ld files.
So do you have any docs on how you parse and generate these files?
Also I am struggeling with the representation of the ld program as code, so I would be really grateful if you could talk a little about your problems, challenges and maybe the way you represented the program in LDmicro.
To be clear: I am in no way looking to replace LDmicro or be in direct competition to you. I simply have a friend that loves LDmicro and is verry bad at writing ld code. this usually looks like he writes 300 rungs worth of code without testing, it doesn't work, he gives up and passes the project on to me.So I wanted to write my own refactoring and optimisation tool.