TT3: /home/abw/web/london/tt3/slides/examples/text_operators.tt3

Template Source

[% # text comparison operators a eq b a ne b a lt b a gt b a le b a ge b a cmp b -%] --EOF--

Source Tokens

tag_start@0[%
whitespace@2 # text comparison operators\n
variable@36a
whitespace@37
text equal@38eq
whitespace@40
variable@41b
whitespace@42\n
variable@47a
whitespace@48
text notequal@49ne
whitespace@51
variable@52b
whitespace@53\n
variable@58a
whitespace@59
text lessthan@60lt
whitespace@62
variable@63b
whitespace@64\n
variable@69a
whitespace@70
text morethan@71gt
whitespace@73
variable@74b
whitespace@75\n
variable@80a
whitespace@81
text lessequal@82le
whitespace@84
variable@85b
whitespace@86\n
variable@91a
whitespace@92
text moreequal@93ge
whitespace@95
variable@96b
whitespace@97\n
variable@102a
whitespace@103
text compare@104cmp
whitespace@107
variable@108b
whitespace@109\n
tag_end@110-%]
whitespace@113\n
eof@114

Parse Tree

binary expr@38a eq b
variable element@36a
eq
variable element@41b
binary expr@49a ne b
variable element@47a
ne
variable element@52b
binary expr@60a lt b
variable element@58a
lt
variable element@63b
binary expr@71a gt b
variable element@69a
gt
variable element@74b
binary expr@82a le b
variable element@80a
le
variable element@85b
binary expr@93a ge b
variable element@91a
ge
variable element@96b
binary expr@104a cmp b
variable element@102a
cmp
variable element@108b

Variables Used

a
Uses
@ line 2 a eq b
@ line 3 a ne b
@ line 4 a lt b
@ line 5 a gt b
@ line 6 a le b
@ line 7 a ge b
@ line 8 a cmp b
b
Uses
@ line 2 a eq b
@ line 3 a ne b
@ line 4 a lt b
@ line 5 a gt b
@ line 6 a le b
@ line 7 a ge b
@ line 8 a cmp b

Generated Output

TT3 undefined data error at line 2 of /home/abw/web/london/tt3/slides/examples/text_operators.tt3:
Error: Undefined value returned by expression: a
Source: a eq b
^ here