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

Template Source

[% # numerical comparison operators a == b a != b a < b a > b a <= b a >= b a <=> b %] --EOF--

Source Tokens

tag_start@0[%
whitespace@2 # numerical comparison operators\n
variable@41a
whitespace@42
number equal@43==
whitespace@45
variable@46b
whitespace@47\n
variable@52a
whitespace@53
number notequal@54!=
whitespace@56
variable@57b
whitespace@58\n
variable@63a
whitespace@64
number lessthan@65<
whitespace@66
variable@67b
whitespace@68\n
variable@73a
whitespace@74
number morethan@75>
whitespace@76
variable@77b
whitespace@78\n
variable@83a
whitespace@84
number lessequal@85<=
whitespace@87
variable@88b
whitespace@89\n
variable@94a
whitespace@95
number moreequal@96>=
whitespace@98
variable@99b
whitespace@100\n
variable@105a
whitespace@106
number compare@107<=>
whitespace@110
variable@111b
whitespace@112\n
tag_end@113%]
text@115\n\n
eof@117

Parse Tree

binary expr@43a == b
variable element@41a
==
variable element@46b
binary expr@54a != b
variable element@52a
!=
variable element@57b
binary expr@65a < b
variable element@63a
<
variable element@67b
binary expr@75a > b
variable element@73a
>
variable element@77b
binary expr@85a <= b
variable element@83a
<=
variable element@88b
binary expr@96a >= b
variable element@94a
>=
variable element@99b
binary expr@107a <=> b
variable element@105a
<=>
variable element@111b
text@115\n\n

Variables Used

a
Uses
@ line 2 a == b
@ line 3 a != b
@ line 4 a < b
@ line 5 a > b
@ line 6 a <= b
@ line 7 a >= b
@ line 8 a <=> b
b
Uses
@ line 2 a == b
@ line 3 a != b
@ line 4 a < b
@ line 5 a > b
@ line 6 a <= b
@ line 7 a >= b
@ line 8 a <=> b

Generated Output

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