[PATCH] RE: J2 decorator grammar

Michael Sparks zathras at thwackety.com
Mon Aug 23 10:05:27 EDT 2004


On Sun, 22 Aug 2004, Michael Sparks wrote:

> Anthony Baxter wrote:
>
> > On Sun, 22 Aug 2004 15:01:39 +0100, Michael Sparks
> > <zathras at thwackety.com> wrote:
> >> It should be done sometime this afternoon though. (Bulk of the time taken
> >> up is on re-running the test suite unsuprisingly)
> >
> > One quick point - make sure you run the _full_ test suite (-uall arg
> > to regrtest,
> > or 'make testall'), otherwise things like the compiler tests won't get
> > run.
>
> Hmm... Didn't know about that version... Running that now and the following
> 2 tests fail:
>    * test_bsddb3
>    * test_ossaudiodev
>
> However, these fail for me when using a vanilla 2.4a2 so whilst not ideal
> these failures (probably) aren't due to my changes.
>
> Everything else passes.
>
> My next steps are this:
>    * Change keyword

Done. For ease of changing until I do the patch against the CVS tree I'm
using the token "SpanishInquisition" since it's simple to search and
replace. I intend to put "using" in it's place when put on SF.

>    * Do short/simple/single line form

80% Done. Grammar used is this:

decorator: dotted_name [ '(' [arglist] ')' ] NEWLINE
decorators: decorator+
funcdef: ['SpanishInquisition' ':' (decorator |NEWLINE INDENT decorators DEDENT) ] 'def' NAME parameters ':'suite

This is a bit ugly IMO, but it does the task required at present.

>    * Produce patch for CVS version.

In progress.


Michael.




More information about the Python-list mailing list