Structured text compiler.

Mar 02, 2004 3 Replies

Hi Group,



I am planning to write a structured text (PLC programming language) compiler as my Masters Project. I would greatly appreciate some comments, thoughts and advice on how realistic my goal is. Also, links to any websites that shed light on this issue would be great!



Thanks much.



BS.


Check out mat.sf.net. It features an open-source soft PLC that has a compiler for some of IEC 61131-3 languages. Maybe you would like to improve / enhance that rather than beginning from scratch.

Andrey

It really depends on how ambitious you are, what your training is and what you're trying to achieve. Most computor science programs require their undergrads to take a compilers class that includes writing a simple compiler, so it can be done. I'm _not_ sure that writing a compiler is really relavent, unless the language that you're proposing has some unique feature, and even then it may be better to work that feature into an existing language, either with a preprocessor or by modifying an existing compiler, as suggested by the other post.

PLC Open

formatting link
has some documentation. They used to have a file that listed the grammar for several 1131 languages including ST.

I had started a project using Visual Parse by Sandstone to write a compiler, but it is unfinished at this point. As described, their grammar had some ambiguities that requires the parser use a symbol table to determine what production should be used.

If you can't find the document let me know and I'll look for it on my c-drive.

Tom

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required