changed: now in SpaceParser 'split_single' and utf8 are default

removed: some errors checking at the end of a line
         now we can have in the same line: value="option" value2="option2"



git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@408 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2012-05-12 14:54:19 +00:00
parent e620c8f95d
commit e195145394
1 changed files with 3 additions and 12 deletions

View File

@ -75,10 +75,10 @@ void SpaceParser::SetDefault()
list_start = '(';
list_end = ')';
list_delimiter = ',';
split_single = false;
split_single = true;
skip_empty = false;
use_escape_char = true;
input_as_utf8 = false;
input_as_utf8 = true;
}
@ -262,9 +262,6 @@ void SpaceParser::SpaceEnds()
space = space->parent;
ReadChar(); // skipping closing space character ')'
SkipWhite();
if( lastc != -1 && lastc != '\n' )
status = syntax_error;
}
}
@ -413,6 +410,7 @@ void SpaceParser::ReadTokenSingle(bool white_delimit, bool new_line_delimit, int
SkipLine();
if( lastc == -1 ||
lastc == list_end ||
(delimit1 != -1 && lastc == delimit1) ||
(delimit2 != -1 && lastc == delimit2) ||
(white_delimit && IsWhite(lastc)) ||
@ -473,10 +471,6 @@ void SpaceParser::ReadValueList()
{
ReadChar(); // skipping the last list character ')'
SkipWhite();
// there cannot be anything after ')' character
if( lastc != -1 && lastc != '\n' )
status = syntax_error;
}
else
{
@ -491,9 +485,6 @@ void SpaceParser::ReadValueSingle()
ReadToken(false, true, -1, -1);
value.push_back(token);
SkipWhite();
if( lastc != -1 && lastc != '\n' )
status = syntax_error;
}