Oyster wrote:
> for example, a simple BASIC to C
> I am puzzled by, especially the expression like
> 1+2*sin(6)/(fun[1][2]-3)
> it seems that it needs a loop

I am not sure what you means by 'needs a loop'.

If you want to translate languages, you need to parse the source language 
(BASIC in your case), and after parsing, generate C text.

For parsing, you need to define the available tokens in BASIC (the elementary 
character sequences of BASIC) and a BASIC grammar.

I'd recommend that you read the PLY manual, and try to write a lexer and 
parser that reads BASIC text.

Once you have that working, you can think about generating C text.

Sincerely,
Albert

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ply-hack" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/ply-hack?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to