[threeten-dev] Review for parsing 2 to 4 years #218

roger riggs roger.riggs at oracle.com
Fri Apr 26 12:32:25 PDT 2013


Hi,

Start with a hard one.  "yyMMdd" in the case where ReducedValue/NumberPP 
is set to lenient.

"76321" could be parsed as (76, 3, 21) or (76, 32, 1)
"765432" could be parsed several ways.  (76, 5, 432) (76, 54, 32), etc.

The subsequentWidth mechanism only works for fixed fields
following a variable width field.  If the parsing is set to lenient
then what was a fixed field is now variable but the static mechanism
for lookahead can't anticipate that.

The current mechanism works fine as long as fixed width fields
have the same width whether lenient or strict.  I think it is unnecessary
and too big a change to modify NumberPP to extend lenient parsing to
fixed width fields.

Roger



On 4/26/2013 2:13 PM, Stephen Colebourne wrote:
> On 26 April 2013 16:14, roger riggs <roger.riggs at oracle.com> wrote:
>> Suggestions?
> I think we should start with a set of test cases we agree on. Then
> whatever code needs to be changed will have to be changed. It sounds
> like the adjacent value parsing mechanism will need some tweaking.
>
> Stephen



More information about the threeten-dev mailing list