def setName( self, name ):
self.name = name<EOL>self.errmsg = "<STR_LIT>" + self.name<EOL>if hasattr(self,"<STR_LIT>"):<EOL><INDENT>self.exception.msg = self.errmsg<EOL><DEDENT>return self<EOL>
Define name for this expression, makes debugging and exception messages clearer.

Example::

    Word(nums).parseString("ABC")  # -> Exception: Expected W:(0123...) (at char 0), (line:1, col:1)
    Word(nums).setName("integer").parseString("ABC")  # -> Exception: Expected integer (at char 0), (line:1, col:1)