ST2C Environment, an “high level” DSL

ST2C Environment is an example of what can be realized with the Eclipse Project XText, which provides an environment for achieving DSLs (Domain Specific Languages). Through the definition of a grammar, you can get a specific editor integrated with all features provided with Eclipse editors.

In this case, XText has been used to realize a development environment for programming language Structured Text (ST), which is one of languages defined by IEC 61131-3 standard.

ST is an high level language, block-structured and designated for PLCs (Programmable Logic Controllers) programming .

ST2C Environment provides the users an editor to write their own ST sources, with the following characteristics:

  • Recognition and highlighting of language constructs
  • Content Assistant, which guides you in writing the code indicating the possible choises in every moment
  • Syntactic checker
  • Semantic checker: an accurate validation mechanism ensures the compilation of written sources (validation of names, references, complex type checking, expressions and function calls checking…)

Another component that characterized ST2C Environment is the C code generator that allows you to translate the program written in ST in an equivalent program wirtten in standard C. Moreover, the generation is easily editable and can be adapted to comply with any specification.

The output of ST2C Environment is a C program that is compilable and executable in any device with a standard C compiler.

For more information and support please send an email to st2c@rcp-vision.com

Share