Prev: Bug in Tk 8.6? Cannot use pack & grid?
Next: Tcl C Help
From: Georgios Petasis on 1 Jul 2010 12:19 Hi all, Is there a package/code/command that will help me parse a piece of tcl code, without executing it? What I want to do is to locate all commands inside a piece of code, and add a prefix infront of each command (also inside if/for/foreach/switch, etc.) George
From: Robert Heller on 1 Jul 2010 12:39 At Thu, 01 Jul 2010 19:19:43 +0300 Georgios Petasis <petasis(a)iit.demokritos.gr> wrote: > > Hi all, > > Is there a package/code/command that will help me parse a piece of tcl > code, without executing it? > What I want to do is to locate all commands inside a piece of code, and > add a prefix infront of each command (also inside if/for/foreach/switch, > etc.) > > George 'info complete' is your friend. I am not sure it really makes sense to 'parse' Tcl code. There is a package available called 'nagelfar' that checks for balenced braces, etc. It might be possible to hack this code to do what you want. > -- Robert Heller -- Get the Deepwoods Software FireFox Toolbar! Deepwoods Software -- Linux Installation and Administration http://www.deepsoft.com/ -- Web Hosting, with CGI and Database heller(a)deepsoft.com -- Contract Programming: C/C++, Tcl/Tk
From: Don Porter on 1 Jul 2010 12:45 Georgios Petasis wrote: > Is there a package/code/command that will help me parse a piece of tcl > code, without executing it? > What I want to do is to locate all commands inside a piece of code, and > add a prefix infront of each command (also inside if/for/foreach/switch, > etc.) http://wiki.tcl.tk/cmdsplit -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter(a)nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |______________________________________________________________________|
|
Pages: 1 Prev: Bug in Tk 8.6? Cannot use pack & grid? Next: Tcl C Help |