Category:Tcl: Difference between revisions
Content added Content deleted
(Added link to primary website to infobox) |
(Added pseudo-BNF for Tcl) |
||
Line 27: | Line 27: | ||
:''“I got the idea for Tcl while on sabbatical leave at DEC's Western Research Laboratory in the fall of 1987. I started actually implementing it when I got back to Berkeley in the spring of 1988; by summer of that year it was in use in some internal applications of ours, but there was no Tk. The first external releases of Tcl were in 1989, I believe. I started implementing Tk in 1989, and the first release of Tk was in 1991.”'' |
:''“I got the idea for Tcl while on sabbatical leave at DEC's Western Research Laboratory in the fall of 1987. I started actually implementing it when I got back to Berkeley in the spring of 1988; by summer of that year it was in use in some internal applications of ours, but there was no Tk. The first external releases of Tcl were in 1989, I believe. I started implementing Tk in 1989, and the first release of Tk was in 1991.”'' |
||
==Grammar== |
|||
Note that this is a simplified language grammar, and it is normal to think of the language at a higher level where these differences don't show. |
|||
<br clear=all> |
|||
script '''::=''' command'''? ((''' “''\n''” '''|''' “'';''” ''')''' script ''')''' |
|||
command '''::=''' “''#''” characters “''\n''” <span style="color:grey">/* comment */</span> |
|||
'''|''' word '''(''' space word ''')*''' <span style="color:grey">/* sequence of space-separated words; |
|||
* first is command name */</span> |
|||
'''|''' <span style="color:grey">/* empty */</span> |
|||
word '''::=''' “''{*}''”'''?''' “''{''” characters “''}''” <span style="color:grey">/* braces must be balanced */</span> |
|||
'''|''' “''{*}''”'''?''' “''"''” charSubsts “''"''” <span style="color:grey">/* double-quotes must be balanced */</span> |
|||
'''|''' “''{*}''”'''?''' charSubsts |
|||
charSubsts '''::=''' “''[''” script “'']''” charSubsts'''?''' <span style="color:grey">/* brackets must be balanced */</span> |
|||
'''|''' “''$''” varName charSubsts'''?''' |
|||
'''|''' “''${''” varName “''}''” charSubsts'''?''' |
|||
'''|''' “''\\''” escapeSequence charSubsts''?'' |
|||
'''|''' ordinaryChar charSubsts''?'' |
|||
==Language Value Model== |
==Language Value Model== |
||
Tcl's value model operates on two levels. |
Tcl's value model operates on two levels. |