OK C++ gurus, I'd like a little advice with regards to what tool I should use to generate a quick parser. I need to parse a text file with a bunch of statements of the form
The values can always be assumed to be doubles and ultimately I will put the values into a hash table. I know that the standard library has a hash table I could use, but what about some lightweight parsing tools? I've done this kind of thing before in C using strtok(), but I assume that the standard library or maybe the boost library has something a little slicker?Quote:
var1 = 2.5
var2 = 3
thisvar = -42
My only requirement is that I don't need to incur brain damage to understand it. This has to be banged out in a couple of hours at most. I wrote something like this in Haskell that was elegant and concise but took me several days to understand the Haskell library that I used.