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:
parent
e620c8f95d
commit
e195145394
|
@ -75,10 +75,10 @@ void SpaceParser::SetDefault()
|
||||||
list_start = '(';
|
list_start = '(';
|
||||||
list_end = ')';
|
list_end = ')';
|
||||||
list_delimiter = ',';
|
list_delimiter = ',';
|
||||||
split_single = false;
|
split_single = true;
|
||||||
skip_empty = false;
|
skip_empty = false;
|
||||||
use_escape_char = true;
|
use_escape_char = true;
|
||||||
input_as_utf8 = false;
|
input_as_utf8 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -262,9 +262,6 @@ void SpaceParser::SpaceEnds()
|
||||||
space = space->parent;
|
space = space->parent;
|
||||||
ReadChar(); // skipping closing space character ')'
|
ReadChar(); // skipping closing space character ')'
|
||||||
SkipWhite();
|
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();
|
SkipLine();
|
||||||
|
|
||||||
if( lastc == -1 ||
|
if( lastc == -1 ||
|
||||||
|
lastc == list_end ||
|
||||||
(delimit1 != -1 && lastc == delimit1) ||
|
(delimit1 != -1 && lastc == delimit1) ||
|
||||||
(delimit2 != -1 && lastc == delimit2) ||
|
(delimit2 != -1 && lastc == delimit2) ||
|
||||||
(white_delimit && IsWhite(lastc)) ||
|
(white_delimit && IsWhite(lastc)) ||
|
||||||
|
@ -473,10 +471,6 @@ void SpaceParser::ReadValueList()
|
||||||
{
|
{
|
||||||
ReadChar(); // skipping the last list character ')'
|
ReadChar(); // skipping the last list character ')'
|
||||||
SkipWhite();
|
SkipWhite();
|
||||||
|
|
||||||
// there cannot be anything after ')' character
|
|
||||||
if( lastc != -1 && lastc != '\n' )
|
|
||||||
status = syntax_error;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -491,9 +485,6 @@ void SpaceParser::ReadValueSingle()
|
||||||
ReadToken(false, true, -1, -1);
|
ReadToken(false, true, -1, -1);
|
||||||
value.push_back(token);
|
value.push_back(token);
|
||||||
SkipWhite();
|
SkipWhite();
|
||||||
|
|
||||||
if( lastc != -1 && lastc != '\n' )
|
|
||||||
status = syntax_error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue