Help: Is Python suitable?

T

Tran Tuan Anh

Hi,

I have an programming assignment, and would like to try out Python.

I need to read in a simple textual language (does Python have a
scanner, and parser?), and do some processing. After that, generate
some codes in an other language. Basically, the program generates code
for another program based on some textual input.

I can do it in Java of course. However, it will be quite cumbersome.

I wonder if Python is more suitable for this kind of job?

Hope someone could enlighten me on this matter?

Thanks a lot!
Tuan Anh

P/S: I knew Java, Pascal very well. I also touch a bit on C/C++,
Scheme, SML.
 
T

Terry Reedy

Tran Tuan Anh said:
Hi,

I have an programming assignment, and would like to try out Python.

I need to read in a simple textual language (does Python have a
scanner, and parser?),

Yes. Several options have been listed and discussed here within the last 2
weeks or a month. There is also a book on text processing with Python.

tjr
 
A

Alan Gauld

I need to read in a simple textual language (does Python have a
scanner, and parser?),

Yes, it has several and a framework for building custom ones.
I wonder if Python is more suitable for this kind of job?

It can certainly do what you ask.
Hope someone could enlighten me on this matter?

If you haven't done so set asifde a few hours to whiz through the
official Python tutorial, it will be your best bet for getting up
to speed on Python.

THen check out the parser modules in the standard PYthon library
(documentation online or downloadable). Also for this kind of
thing search out David Mertz's online book "Text Processing
in Python" (or buy the paper version!)

Alan G.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld
 
P

Paul Prescod

Tran said:
Hi,

I have an programming assignment, and would like to try out Python.

I need to read in a simple textual language (does Python have a
scanner, and parser?), and do some processing. After that, generate
some codes in an other language. Basically, the program generates code
for another program based on some textual input.

http://www.python.org/sigs/parser-sig/

Paul Prescod
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top