Streamify the loader

It's no longer needed to load the whole input into a string and then
parse from the string. Instead, the input is read as needed from
a string or file.
This commit is contained in:
Petri Lehtinen
2009-07-13 11:01:20 +03:00
parent 4c414bdd6d
commit 625f50f916
4 changed files with 268 additions and 136 deletions

14
test/testdata/invalid vendored
View File

@@ -10,7 +10,7 @@ null
{
====
2
'}' expected near end of file
string or '}' expected near end of file
========
[
====
@@ -45,17 +45,17 @@ invalid token near '''
{,
====
1
string expected near ','
string or '}' expected near ','
========
{"
====
1
string expected near '"'
string or '}' expected near '"'
========
{"a
====
1
string expected near '"a'
string or '}' expected near '"a'
========
{"a"
====
@@ -65,7 +65,7 @@ string expected near '"a'
{'a'
====
1
string expected near '''
string or '}' expected near '''
========
{"a":
====
@@ -80,12 +80,12 @@ invalid token near '"a'
{[
====
1
string expected near '['
string or '}' expected near '['
========
[{
====
2
'}' expected near end of file
string or '}' expected near end of file
========
[{}
====