<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://forge.codesys.com/tol/c2iec/home/Home/</link><description>Recent changes to Home</description><language>en</language><lastBuildDate>Tue, 30 Jun 2020 10:55:40 -0000</lastBuildDate><atom:link href="https://forge.codesys.com/tol/c2iec/home/Home/feed" rel="self" type="application/rss+xml"></atom:link><item><title>Home modified by Ingo</title><link>https://forge.codesys.com/tol/c2iec/home/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -35,4 +35,7 @@
 * Static variables or functions

 # Usage
-This project is in a proof-of-concept phase. So it can't be easily used, yet, nor would I try to encourage non-experienced people to use it in this state. If you understand the Makefile and the code you can give it try, though.
+This project is in a proof-of-concept phase. So it can't be easily used, yet, nor would I try to encourage non-experienced people to use it in this state.
+
+If your code is proberly pre processed, you can quickly try it with the [web-version](https://forge.codesys.com/download/tol,c2iec,code.git//example.html) of the transpiler.
+
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ingo</dc:creator><pubDate>Tue, 30 Jun 2020 10:55:40 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com808a0448758d6a2c02b098a1634149ce92cb7513</guid></item><item><title>Home modified by Ingo</title><link>https://forge.codesys.com/tol/c2iec/home/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -33,3 +33,6 @@
 * Function pointers
 * Pointer arithmetics
 * Static variables or functions
+
+# Usage
+This project is in a proof-of-concept phase. So it can't be easily used, yet, nor would I try to encourage non-experienced people to use it in this state. If you understand the Makefile and the code you can give it try, though.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ingo</dc:creator><pubDate>Sat, 28 Mar 2020 21:10:08 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.comfbb9e12172662bcc74e4820edb566feae0056b97</guid></item><item><title>Home modified by Ingo</title><link>https://forge.codesys.com/tol/c2iec/home/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -1,3 +1,5 @@
+[[img src=Logo-c2iec.png]]
+
 # Why
 ST is a very robust and easy to understand language. A good fit for industrial applications. But on the internet you find by far more example algorithms, applications and libraries written in C or other languages. The mission of this project is to make the step from a working C example code to a working ST code as small as possible.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ingo</dc:creator><pubDate>Sat, 28 Mar 2020 21:07:14 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com003f8790b544322e9369a8d5d66caf77a21699a3</guid></item><item><title>Home modified by Ingo</title><link>https://forge.codesys.com/tol/c2iec/home/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -22,7 +22,7 @@
 named structs / unions | struct test | TYPE test: STRUCT
 unnamed structs / unions |     union ...; | flattened as members into the type in which they are embedded
 typedef | typedef struct ... t_struct; | TYPE t_struct: Id2036658550;
-arrays | char arr2[ 1 ][ 2 ]; | arr2: ARRAY[ 0..(1-1), 0..(2-1) ] OF BYTE;
+arrays | char arr2[1][2]; | arr2: ARRAY[0..(1-1),0..(2-1)] OF BYTE;

 # Limitations
 The following features will definitely not be supported by this transpiler, because of its design.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ingo</dc:creator><pubDate>Sat, 28 Mar 2020 20:53:04 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com8e3a42e12f8c1cce6757e277019d5b2a9ed2490a</guid></item><item><title>Home modified by Ingo</title><link>https://forge.codesys.com/tol/c2iec/home/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -22,7 +22,7 @@
 named structs / unions | struct test | TYPE test: STRUCT
 unnamed structs / unions |     union ...; | flattened as members into the type in which they are embedded
 typedef | typedef struct ... t_struct; | TYPE t_struct: Id2036658550;
-arrays | char arr2[1][2]; | arr2: ARRAY[0..(1-1),0..(2-1)] OF BYTE;
+arrays | char arr2[ 1 ][ 2 ]; | arr2: ARRAY[ 0..(1-1), 0..(2-1) ] OF BYTE;

 # Limitations
 The following features will definitely not be supported by this transpiler, because of its design.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ingo</dc:creator><pubDate>Sat, 28 Mar 2020 20:52:22 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.comeae6728b238c08cdda0588860b80d7e06513a882</guid></item><item><title>Home modified by Ingo</title><link>https://forge.codesys.com/tol/c2iec/home/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,7 +1,33 @@
-Welcome to your wiki!
+# Why
+ST is a very robust and easy to understand language. A good fit for industrial applications. But on the internet you find by far more example algorithms, applications and libraries written in C or other languages. The mission of this project is to make the step from a working C example code to a working ST code as small as possible.

-This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].
+# Technique
+The transpiler is built using the very old but famous and solid compiler builder tools [flex](https://github.com/westes/flex) and [yacc / bison](https://www.gnu.org/software/bison/). So the code transformation consists only of two steps:

-The wiki uses [Markdown](/tol/c2iec/home/markdown_syntax/) syntax.
+* flex: tokenize the ANSI C code
+* bison: parse and transform the tokens to ST code

-[[members limit=20]]
+As the transformations from the tokens to the resulting ST code is done in just one step, we have to live with a few limitations, which can't be transformed as the ST language doesn't support those language constructs.
+
+# Features
+The following features are currently tested, and should work therefore:
+
+feature | C        | ST
+------------ | ---------- | ------------------
+expressions | a = b * (c + d) * e; | a := b * ( c + d ) * e;
+lvalues | c++; | ((c:=c+1)-1);
+case | switch (value) | CASE value OF
+for | for (i=0; i &amp;lt; 5; i++) | WHILE i &amp;lt; 5;
+while | while (x &amp;lt; 10) | WHILE x &amp;lt; 10 DO
+named structs / unions | struct test | TYPE test: STRUCT
+unnamed structs / unions |     union ...; | flattened as members into the type in which they are embedded
+typedef | typedef struct ... t_struct; | TYPE t_struct: Id2036658550;
+arrays | char arr2[1][2]; | arr2: ARRAY[0..(1-1),0..(2-1)] OF BYTE;
+
+# Limitations
+The following features will definitely not be supported by this transpiler, because of its design.
+
+* Explicit type conversions of user defined data types (e.g. structs)
+* Function pointers
+* Pointer arithmetics
+* Static variables or functions
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ingo</dc:creator><pubDate>Sat, 28 Mar 2020 20:51:35 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.coma79c4cbb1dfb7adf5ac2190fc7bc9fde173f5cc7</guid></item><item><title>Home modified by Ingo</title><link>https://forge.codesys.com/tol/c2iec/home/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Welcome to your wiki!&lt;/p&gt;
&lt;p&gt;This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: &lt;span&gt;[SamplePage]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The wiki uses &lt;a class="" href="/tol/c2iec/home/markdown_syntax/"&gt;Markdown&lt;/a&gt; syntax.&lt;/p&gt;
&lt;h6&gt;Project Members:&lt;/h6&gt;
	&lt;ul class="md-users-list"&gt;
		&lt;li&gt;&lt;a href="/u/ingo/"&gt;Ingo&lt;/a&gt; (admin)&lt;/li&gt;
		
	&lt;/ul&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ingo</dc:creator><pubDate>Sat, 28 Mar 2020 19:58:05 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.comfef838b20151f61d36b4963938ca6e4c61ba00ba</guid></item></channel></rss>