Clean up SP_RETURN_ERROR a bit
Remove unneeded last_mode variable.
Handle no-value field at EOD.
Fix ignored last_char state.
Compress the parsing loop a bit.
Add Java implementation of Sparse parser.