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 7195107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:30:43+00:00 2026-05-28T20:30:43+00:00

I have an app that needs to read in and evaluate expressions from a

  • 0

I have an app that needs to read in and evaluate expressions from a source file. I’ve been using muParser to do this so far. But now I’ve run into a case where I need simple loop support in the expression. I don’t need the ability to call functions from the scripting language, or any other advanced functionality, literally just:

  • mathematical expressions (+,-,/,*,&, |, ~, etc)
  • logical expressions (!, ||, &&, etc)
  • conditionals (if,else..)
  • loops (for)

With muParser I parsed the expressions after reading them in, assigning variables as needed and then solving:

expr="[0] + [1]*256 - 40"

In the above example, I’d replace [0] and [1] with their corresponding variables, and could then solve. Now, I need something like this:

expr="for(i=0; i < 10; i+=2) {  if(i<=6) { [0] + [i]*256 -40; }  }"

All I’m doing in reality is parsing a bytestream. In the script, I refer to bytes as [byte] and bits as [byte][bit]. Could someone suggest what a good framework/scripting launguage would let me do something like this?

  • 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-28T20:30:44+00:00Added an answer on May 28, 2026 at 8:30 pm

    Even though you don’t seem to strictly need a full-blown scripting language, you’re getting so close to it that this might be the easiest route to victory. Both Lua and Python are pretty easy to embed and call from a C(++) program, Lua slightly easier than Python.

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

Sidebar

Related Questions

I have an app that needs to read a PDF file from the file
I have a Rails app that needs to expose values from a database as
I have a app that needs to be both read and write compatible with
I have a Django app that needs to pull the follower_count information from several
So I'm making this android application, that needs to read data from user-provided CSV
I have a flash app that needs to download a file, whose name contains
I have an app that needs to open a new window (in the same
I have an app that needs to handle very large strings between a SQL
I have an app that needs to check a database table every minute. The
We have an app that needs to access network resources. It's written in VB.Net.

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.