Parsing and preserving comments

Discussion in 'Perl Misc' started by Woland99, Oct 9, 2006.

  1. Woland99

    Woland99 Guest

    Hi - I need to parse proprietary language (very Java-like syntax) in
    order
    to automate population of data. It would not be a problem if those
    source
    files were entirely generated by a scrript - converting spreadsheet
    into
    source code. Problem is that when they maintained them by hand they
    introduced a lot of comments inside the source code. And they want to
    keep making changes by hand if necessary. So I need to parse it but
    preserve comments and their position before script would add any new
    data or modify current attributes of objects. Does anybody have any
    suggestions beyond piling up a lot of pattern matching and hoping to
    cover all the corner cases?

    JT
     
    Woland99, Oct 9, 2006
    #1
    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. Replies:
    0
    Views:
    1,135
  2. TTroy
    Replies:
    16
    Views:
    795
    Peter Nilsson
    Jan 31, 2005
  3. Monk
    Replies:
    10
    Views:
    1,478
    Michael Wojcik
    Apr 20, 2005
  4. Replies:
    4
    Views:
    529
  5. Michal Kwiatkowski

    Python AST preserving whitespace and comments

    Michal Kwiatkowski, Aug 28, 2008, in forum: Python
    Replies:
    1
    Views:
    1,181
    Terry Reedy
    Aug 28, 2008
Loading...

Share This Page