Help: Is Python suitable?

Discussion in 'Python' started by Tran Tuan Anh, Feb 23, 2004.

  1. 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.
     
    Tran Tuan Anh, Feb 23, 2004
    #1
    1. Advertising

  2. Tran Tuan Anh

    Terry Reedy Guest

    Re: Is Python suitable?

    "Tran Tuan Anh" <> wrote in message
    news:...
    > 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
     
    Terry Reedy, Feb 23, 2004
    #2
    1. Advertising

  3. Tran Tuan Anh

    Alan Gauld Guest

    On 22 Feb 2004 22:21:47 -0800, (Tran Tuan Anh)
    wrote:
    > 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
     
    Alan Gauld, Feb 23, 2004
    #3
  4. Tran Tuan Anh

    Paul Prescod Guest

    Tran Tuan Anh wrote:

    > 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
     
    Paul Prescod, Feb 23, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. pc
    Replies:
    2
    Views:
    362
    Allan Bruce
    Mar 31, 2005
  2. Sanjay Minni
    Replies:
    3
    Views:
    396
  3. john67
    Replies:
    58
    Views:
    1,046
    Dieter Maurer
    May 27, 2005
  4. Rob Cowie
    Replies:
    9
    Views:
    332
    John J. Lee
    May 29, 2005
  5. rbt
    Replies:
    19
    Views:
    656
    John Machin
    Jun 17, 2005
Loading...

Share This Page