diff -r 2c0f76090372 -r f08abacb46c9 scriptreader.cxx --- a/scriptreader.cxx Sat Jul 14 15:44:38 2012 +0300 +++ b/scriptreader.cxx Sat Jul 14 15:58:50 2012 +0300 @@ -54,7 +54,6 @@ } ScriptReader::ScriptReader (str path) { - extdelimeters = false; atnewline = false; filepath = path; if (!(fp = fopen (path, "r"))) { @@ -94,32 +93,23 @@ // true if was found, false if not. bool ScriptReader::Next () { str tmp = ""; - bool dontreadnext = false; while (!feof (fp)) { c = ReadChar (); - // Extended delimeters: basically any non-alnum characters. - // These delimeters break the word too. If there was prior data, - // the delimeter pushes the cursor back so that the next character - // will be the same delimeter. If there isn't, the delimeter itself - // is included (and thus becomes a token itself.) - bool shouldBreak = false; - if (extdelimeters) { - if ((c >= 33 && c <= 47) || - (c >= 58 && c <= 64) || - // underscore isn't a delimeter - (c >= 91 && c <= 96 && c != 95) || - (c >= 123 && c <= 126)) { - if (tmp.len()) - fseek (fp, ftell (fp) - 1, SEEK_SET); - else - tmp += c; - shouldBreak = true; - break; - } + // Non-alphanumber characters (sans underscore) break the word too. + // If there was prior data, the delimeter pushes the cursor back so + // that the next character will be the same delimeter. If there isn't, + // the delimeter itself is included (and thus becomes a token itself.) + if ((c >= 33 && c <= 47) || + (c >= 58 && c <= 64) || + (c >= 91 && c <= 96 && c != '_') || + (c >= 123 && c <= 126)) { + if (tmp.len()) + fseek (fp, ftell (fp) - 1, SEEK_SET); + else + tmp += c; + break; } - if (shouldBreak) - break; if (IsDelimeter (c)) { // Don't break if we haven't gathered anything yet. @@ -207,9 +197,6 @@ // I guess this should be a void function putting the return value into token? str ScriptReader::MustGetString () { - if (!extdelimeters) - ParserError ("MustGetString doesn't work with parsers not using extended delimeters!"); - MustNext ("\""); str string;