Parsing TCL?

Harald Kirsch kirschh at lionbioscience.com
Fri Jul 20 02:54:56 EDT 2001


Skip Montanaro <skip at pobox.com> writes:

>     Roy> I know this is probably a strange request, but does anybody know of
>     Roy> a python module which parses TCL files?
> 
> No, but isn't Tcl essentially just
> 
>     command arg arg arg arg
> 
Except that arg may be "arg" or {arg} or [arg] or $arg and those special
characters as well as backslash and some others have to be treated
within. In fact even command may be "command" or [command] or
{command} or $command, but this is not for beginners:-)

> ?  I thought it was designed to be extremely easy to parse.  Shouldn't be
> hard to write a parser for it I wouldn't think.

Nevertheless you are right. The whole syntax *plus evaluation
semantics* is described in 11 points in a man-page of 208 lines.

  Harald Kirsch

-- 
----------------+------------------------------------------------------
Harald Kirsch   | kirschh at lionbioscience.com | "How old is the epsilon?"
LION bioscience | +49 6221 4038 172          |        -- Paul Erdös
       *** Please do not send me copies of your posts. ***



More information about the Python-list mailing list