On Dec 16, 1:48 am, Torsten Mohr <tm...@s.netic.de> wrote: > Hi, > > i found some examples when googling for the subject but nothing really > matched. > > Is there a standard module available that lets me parse a syntax like "C" > with numbers, operators, braces, variables and function calls? > > I'd like to use this to parse an own kind of configuration language > and preferred would be just standard modules. Is there something > available that is maybe based on shlex? > > Thanks for any hints, > Torsten.
Sorry for the "shameless plug", but pycparser (http://code.google.com/ p/pycparser/) is exactly what you're looking for. It's a complete, pure-Python parser for ANSI C. Eli -- http://mail.python.org/mailman/listinfo/python-list