On Mon, Mar 17, 2008 at 11:43 PM, Antony Bowesman <[EMAIL PROTECTED]> wrote:

> Hi,
>
> The ContentTypeParser does not like boundary strings that only contain
> digits.


IIRC there are some test mails which use boundary string containing only
digits. if you are willing to contribute a unit test or two that
demonstrates the problem, it'd help a lot. please use
https://issues.apache.org/jira/browse/MIME4J


> My .jj is not so hot,


(mine neither but we usually manage to work it out in the end ;-)


> but I debugged the parser and it is returning 20 as the
> token.kind, whereas it seems to want 19 (QUOTEDSTRING) or 21 (ATOKEN).
>
> I guess 20 is 'DIGITS' and the definition of digits is before ATOKEN, so
> it is
> satisfied before ATOKEN.
>
> Should the fix be either
>
> String value() :
> {Token t;}
> {
> (       t=<ATOKEN>
> |       t=<DIGITS>
> |       t=<QUOTEDSTRING>
> )
>        { return t.image; }
> }
>
> or the ATOKEN definition be defined before DIGITS?


hmmm...

fiddling with the tokenisation seems more risky. so the first sounds like
the better solution to me. (hopefully people will jump in if this seems
wrong to them...)

- robert

Reply via email to