Parsing TCL?
Cameron Laird
claird at starbase.neosoft.com
Mon Jul 23 11:34:52 EDT 2001
In article <yv24rs82ipr.fsf at lionsp093.lion-ag.de>,
Harald Kirsch <kirschh at lionbioscience.com> wrote:
>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.
.
.
.
Does someone seriously want to pursue this? A
quick fix would be to use one of the Tcl-Python
combinations, and let the Tcl part do the pars-
ing (or lexification, as one might argue is
closer to the point).
--
Cameron Laird <claird at NeoSoft.com>
Business: http://www.Phaseit.net
Personal: http://starbase.neosoft.com/~claird/home.html
More information about the Python-list
mailing list