C
I have thrown together a structured text translator which produces FORTRAN code (err... the task at hand required FORTRAN, please don't ask reason why).
I was thinking I might convert the internal routines to produce "C" code and then dump it into the LinuxPLC forum. The core of the current program is a medium sized Bison script (261 rules, 4162 lines long).
I will need to strip out some platform specific stuff of the core engine (specifically accessing physical IO, perhaps also MODBUS memory address referencing since this would not conform to the original standard).
The current code compiles under the following platforms:
Linux
VMS (again, don't ask why)
Cygwin (GCC tools for WinNT)
MS Visual C++ 6.0
Current limitations of the code is that "short" variants of INT and REAL variables are treated as "long" variants. This is to deal with the problem of FORTRAN not support function prototypes, this creates problems when passing constants or inline expressions (eg: is "3.14" a single or double precision floating point number?)
The handling of DATE/TIME variables needs some work. I have just laid my hands on the 1998 draft standard so hopefully I can clean this up (or with some assistance, I would prefer to release the code and then tidy up the rough edges later).
I have personally had a manic week so it might be Monday or Tuesday next week before I can complete the conversion of FORTRAN to "C" generation routines.
Comments anyone? Do I bother wasting my time or is there something similar in LinuxPLC already?
David Campbell
_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
I was thinking I might convert the internal routines to produce "C" code and then dump it into the LinuxPLC forum. The core of the current program is a medium sized Bison script (261 rules, 4162 lines long).
I will need to strip out some platform specific stuff of the core engine (specifically accessing physical IO, perhaps also MODBUS memory address referencing since this would not conform to the original standard).
The current code compiles under the following platforms:
Linux
VMS (again, don't ask why)
Cygwin (GCC tools for WinNT)
MS Visual C++ 6.0
Current limitations of the code is that "short" variants of INT and REAL variables are treated as "long" variants. This is to deal with the problem of FORTRAN not support function prototypes, this creates problems when passing constants or inline expressions (eg: is "3.14" a single or double precision floating point number?)
The handling of DATE/TIME variables needs some work. I have just laid my hands on the 1998 draft standard so hopefully I can clean this up (or with some assistance, I would prefer to release the code and then tidy up the rough edges later).
I have personally had a manic week so it might be Monday or Tuesday next week before I can complete the conversion of FORTRAN to "C" generation routines.
Comments anyone? Do I bother wasting my time or is there something similar in LinuxPLC already?
David Campbell
_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc