Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Method for runtime expressions cpp?

Name: Anonymous 2012-01-29 21:55

Hey I'm looking for a light and portable lib or something that'll let me parse simple expressions at runtime with a syntax similar to c++. I need loops and conditionals, but no advanced object manip and stuff. Example:
for(i=0; i < 20; i++) {  if(i < 12) { V[i] = A*B; } else { V[i] = 0; } }

I've looked at v8, lua (though syntax is bonkers). I feel like both are also overkill. Any suggestions?

Name: Anonymous 2012-01-29 22:14

Its definitely a weird use case. I'm working on this parser that takes a bytestream from a device and converts it to a meaningful value. The expression to convert the data isn't definitive though -- it varies between between devices by make and model so I can't hardcode all the interpretations and forget about it.

I need people who aren't programmers to be able to add interpretations without compiling in an easy manner so they can support their device with minimal effort.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List