Package ZestyParser :: Module Parser :: Class CallbackFor
[show private | hide private]
[frames | no frames]

Class CallbackFor


Function decorator indicating that the function should be set as the callback of the given token; returns the token instead of the function.

Example:
       @CallbackFor(Token('([0-9]+)'))
       def T_INT(r):
               print r
This is equivalent to:
       def T_INT(r):
               print r
       T_INT = Token('([0-9]+)', callback=T_INT)

Method Summary
  __init__(self, token)
  __call__(self, func)

Generated by Epydoc 2.1 on Thu Jan 11 23:26:09 2007 http://epydoc.sf.net