string-parsing

I have to parse a complicated string format. Is implementing an automaton a sensible approach?

I am currently struggling with a particularly obnoxious string format that I have to parse. The strings can contain substrings that denote a variable property that has to be resolved. Imagine something like "ThisExampleStringContainsA[VARIABLE_PROPERTY]". Also, these properties can be arbitrarily nested and also they can have different m...

Split textual script into substrings by pattern

Consider following script (it's total nonsense in pseudo-language): if (Request.hostMatch("asfasfasf.com") && someString.existsIn(new String[] {"brr", "hrr"})) { if (Requqest.clientIp("10.0.x.x")) { somevar = "1"; } somevar = "2"; } else { somevar = "first"; } string foo = "foo"; // etc. etc. How would you gr...

Javascript math parser library

Is there a good math parser in Javascript? I want to be able to parse something like: LOG(3.14)+5^2+POW(2,LN(X*2,Y)) Thanks, ...