On Dec 21, 2007 7:25 AM, <[EMAIL PROTECTED]> wrote: > > > John Machin wrote: > > Use a proper lexer written by somebody who knows what they are doing, > > as has already been recommended to you. > > My lexer returns a MALFORMED_NUMBER token on '0x' or '0x '. Try that > in Python. >
Is there some reason that you think Python is incapable of implementing lexers that do this, just because Python lexer accepts it? Note that if you're using your lexer to mark up or pretty print or whatever Python source, it's wrong - 0x is (rightly or not) a valid Python literal. -- http://mail.python.org/mailman/listinfo/python-list