C source viewer/mapper?
John Thingstad
john.thingstad at chello.no
Fri Dec 20 11:44:22 EST 2002
My advice. Don't
The reason no such utillity exists is because it is damn near impossible to
create such a mapping.
The C language is a context free grammar (LR(1)) while a flow chart is a
regular grammar.
The grammars that can be expessed by a context free grammar are a superset
of the grammars that can be expessed be a regular grammar.
This means there is no general mapping from one to the other. The other way
from flow chart to C works fine.
Altso forget translating C into python.
Instead figure out what the program does.
Write a spec of behaviour and write the python program from scratch using
this.
On Fri, 20 Dec 2002 04:50:57 -0500, noc <bkd at graphnet.com> wrote:
> I have a c program that I want to replace with a python script.
>
> So I guess that means roll my own, which means building a c interpreter,
> by
> which time I'll have relearnt enough c to read the code in the first
> place,
> but producing code is much cooler than simply reading code.
>
> So, does anybody have any hints or pointers to hints that would help on
> this
> mad errand?
>
> Thanks
> Bruce
>
>
>
John Thingstad
More information about the Python-list
mailing list