Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5838849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:30:42+00:00 2026-05-22T11:30:42+00:00

I’ve inherited a bunch of test scripts which look something like this: // make

  • 0

I’ve inherited a bunch of test scripts which look something like this:

// make connection on standard port (FD)
ot 11 02 00 0F FD
// wait for ACK
in 12 ackValue
// wait for connection confirmation
in 13 ackValue 09 88
//send 5 bytes of arbitary data
ot 21 ackValue 05 01 02 03 04 05

And so on.

I would like to write my own simpiler test scripts which are a layer above the above and which can be parsed to automatically produce the above script, such that my script looks something like this:

MAKE_STANDARD_CONNECTION
SEND_DATA (01,02,03,04,05)

So when MAKE_STANDARD_CONNECTION is parsed it will produce the first six lines in the former script. This will allow me to quickly update all scripts if standard port should change from 0xFD to something else…

I’m guessing that there are tools available to do this but what are they? I am a programmer so I can code this if neccessary with python being my language of choice.

Thanks for your help,

Barry

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:30:43+00:00Added an answer on May 22, 2026 at 11:30 am

    I recommend you to implement it as an internal DSL on top of Python. Make it:

    MAKE_STANDARD_CONNECTION()
    SEND_DATA('01','02','03','04','05')
    

    With it being real Python code that auto-generates your proprietary script. Python is very readable and comfortable to write, and by doing it as an internal DSL, you get all the power of Python at your disposal. For example, you can do:

    values = [somefunc(i) for i in range(5)]
    MAKE_STANDARD_CONNECTION()
    SEND_DATA(*values)
    

    With somefunc being an arbitrary computation. To implement this in an external DSL (i.e. a scripting language of your own) you’d have to implement loops and more constructs. Python gives you this for free, and this is just a small example of the capabilities.

    If this sounds interesting, google a bit for “external DSL” versus “internal DSL” to get a feel of what I’m talking about. There are enough weird, proprietary, poorly implemented “scripting languages” in this world. Giving birth to another one is usually a bad idea.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.