The TCL Interpreter
My TCL Interpreter is not proper TCL for starters. It is based loosely on the TCL 7.6 standard with some of the commands implemented.
Command Stuff
Built-in commands:
- set
- proc
- puts
- putpixel
- prntstack
- putsdbg
- fillcolor
- asarray
- sleep
- time
- setpixsz
- keyin
- if
- while
- break
- uplevel
- return
- list
- expr
Standard library commands:
- pow
- factorial
- sqrt
- arctan
- PI
- PI2
- sin
- cos
- tan
- incr
- decr
- trunc
- rand
Language Constructs
Language constructs in my language are similar to the real TCL.
Command substitution in brackets []
Escaped character sequences in braces {}
Quotes with some substitution "
Arrays with ()
Variable substitution with $
Some backslash \ supported
And every construct is based on a fixed command, with a mildly ambiguous grammar.