Christian Heimes added the comment: Thanks for the link plural.y! I was looking for a C file, not a YACC file.
The AST approach has advantages over tokenizing. The tokenizer returns just symbols but the AST has also context information. It makes it much easier to distinguish between unary - and binary -. Gettext supports substraction but doesn't allow negative numbers. Python's gettext is not as strict as GNU gettext. For 3.4 I like to forbid oct and hex numbers, too. ---------- Added file: http://bugs.python.org/file30725/18317_gettext2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18317> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com