TT3: /home/abw/web/london/tt3/slides/examples/html_loopified.tt3
Source
Tokens
Tree
Variables
Output
Template Source
[?
HTML_CMDS
ul
li
a
?]
[%
ul
{
for
[
'Example One'
,
'Example Two'
'Example Three'
]
{
li
item
}
}
%]
--EOF--
Source Tokens
tag_start
@0
[?
whitespace
@2
control htmlcmds
@3
HTML_CMDS
whitespace
@12
variable
@13
ul
whitespace
@15
variable
@16
li
whitespace
@18
variable
@19
a
whitespace
@20
tag_end
@21
?]
text
@23
\n\n
tag_start
@25
[%
whitespace
@27
html ul
@28
ul
whitespace
@30
construct hash
@31
{
whitespace
@32
\n
command for
@38
for
whitespace
@41
construct list
@42
[
squote string
@43
'Example One'
separator
@56
,
whitespace
@57
squote string
@58
'Example Two'
whitespace
@71
squote string
@72
'Example Three'
terminator
@87
]
whitespace
@88
construct hash
@89
{
whitespace
@90
\n
html li
@98
li
whitespace
@100
variable
@101
item
whitespace
@105
\n
terminator
@112
}
whitespace
@113
\n
terminator
@117
}
whitespace
@118
\n
tag_end
@119
%]
text
@121
\n
eof
@122
Parse Tree
text
@23
\n\n
html keyword element
@28
ul
for keyword
@38
for
List
list expr
@42
[ 'Example One'; 'Example Two'; 'Example Three' ]
[
squote string element
@43
'Example One'
squote string element
@58
'Example Two'
squote string element
@72
'Example Three'
]
Then
html keyword element
@98
li
variable element
@101
item
text
@121
\n
Variables Used
item
Uses
@ line 5
li
item
Generated Output
<ul><li>Example One</li><li>Example Two</li><li>Example Three</li></ul>