get() and value()

new topic     » topic index » view thread      » older message » newer message

Since no one has made any comment on this for the last 8 days or perhaps more,
I'm going to proceed...

* get() and value() will keep returning a 2 element sequence.
* get() and value() accept embedded comments in sequence - they crash in
official Eu, which some don't see as a bug;
* get() and value() ignore leading top level comments. Commments start by "--"
and end a a \n or \r character, or at end of input;
* a new value_from(sequence s,integer starting_point) will allow to scan a
sequence from a starting point between 1 and length(s). This function returns a 4
element sequence: first two as value(), total character read, leading whitespace.
* There's no symmetric get_from(), as it would reduce to a possibly inefficient
sequence of seek() and get(), unless there's some demand for it.

Additionally, the possibility exists for all of the above to return a new error
code when no value is read and end of input is reached, as opposed to having read
an unfinished value string. Currently, GET_EOF is returned in both case. Adding
the extra error code would remove 4-5 lines of code from get.e. Is this to be
considered?

I'll update the whole thing tonight (4pm now).

CChris

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu