Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I'm not sure how well this would work, but it seems as though you could implement some sort of "multi-pass compiler" type solution.

By that I mean, have your script go through the VB script a couple of times. The first pass does what (I think) stephen is suggesting, having your script try and determine what each variable type is on any given line (or, per statement, really) and returning the reply in some sort of unique markup language that is internal to your compiler. The second pass goes through and compares the VBscript to your newly generated first pass document, and makes sure the actual sigils $, @, %, etc match what the vb script is actually doing at that point. (In fact, it might be a good idea to number each statement of the vb script as you go through it, and put the corresponding number at the beginning of the perl script line, to make sure that the compiler can determine which statements are supposed to correlate.) The third pass would go through the final perl script and clean up all of your internal stuff.

I'm certainly no expert on writing compilers/translators, so don't take my suggestion as gospel, but it sounds like it could work.

-il cylic

In reply to Re: A Tricky Problem with Context by ilcylic
in thread A Tricky Problem with Context by tlhf

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2021-10-26 16:20 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (90 votes). Check out past polls.