K
kj
I've programmed C for many years, but I confess I don't even know
where to begin with this one...
I have a parser that proceeds down the text being parsed, and
generates a syntax tree for a potentially deeply nested structure.
This parser works fine, but it requires receiving all the input
text at once in one string.
But there are situations in which it would be nice if the input
string could be fed to the parser in smaller sequential chunks.
Here's where I draw a blank. It seems to me that for this to work
I'd need some way to have the parser save the states of the call
stack and the input buffer, and then restore it once it is called
again with the next chunk of input...
Assuming that this is even remotely on the right track, is there
a way for C code to save and restore the callstack? Can someone
point me to where I can learn more about how to do this?
TIA!
Kynn
where to begin with this one...
I have a parser that proceeds down the text being parsed, and
generates a syntax tree for a potentially deeply nested structure.
This parser works fine, but it requires receiving all the input
text at once in one string.
But there are situations in which it would be nice if the input
string could be fed to the parser in smaller sequential chunks.
Here's where I draw a blank. It seems to me that for this to work
I'd need some way to have the parser save the states of the call
stack and the input buffer, and then restore it once it is called
again with the next chunk of input...
Assuming that this is even remotely on the right track, is there
a way for C code to save and restore the callstack? Can someone
point me to where I can learn more about how to do this?
TIA!
Kynn