+
+ // Returns substr of tek up to the next occurence of plop that isn't escaped with '\'
+ std::string next_esc(std::string plop) {
+ size_t n, realp;
+
+ if (p >= tek.size())
+ return "";
+
+ realp = p;
+ do {
+ n = tek.find(plop, p);
+ if (n == std::string::npos || plop == "")
+ n = tek.length();
+ p = n + plop.length();
+ } while (n > 0 && tek[n - 1] == '\\');
+
+ return tek.substr(realp, n - realp);
+ }
+
+ void skip_over(std::string chars){
+ while(p < tek.size()){
+ bool is = false;
+ for(unsigned int i=0; i<chars.size(); i++){
+ if(chars[i] == tek[p]){
+ is = true;
+ break;
+ }
+ }
+ if(!is) break;
+ p++;
+ }
+ }