J2 decorator grammar

Robert Brewer fumanchu at amor.org
Fri Aug 20 23:25:10 EDT 2004


Michael Sparks wrote:

> decorator: dotted_name [ '(' [arglist] ')' ]
> funcdef: ['decorate' ':' NEWLINE INDENT decorators DEDENT ] 'def' NAME
parameters ':' suite

Would you consider this instead?

decorator_suite: expression_stmt | NEWLINE INDENT expression_stmt+
DEDENT
funcdef: ['decorate' ':' decorator_suite] 'def' NAME parameters ':'
suite

Also, where's the most recent copy of your implementation?


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org




More information about the Python-list mailing list