TT3: /home/abw/web/london/tt3/slides/examples/numerical_operators.tt3
Source
Tokens
Tree
Variables
Output
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
@41
a
whitespace
@42
number equal
@43
==
whitespace
@45
variable
@46
b
whitespace
@47
\n
variable
@52
a
whitespace
@53
number notequal
@54
!=
whitespace
@56
variable
@57
b
whitespace
@58
\n
variable
@63
a
whitespace
@64
number lessthan
@65
<
whitespace
@66
variable
@67
b
whitespace
@68
\n
variable
@73
a
whitespace
@74
number morethan
@75
>
whitespace
@76
variable
@77
b
whitespace
@78
\n
variable
@83
a
whitespace
@84
number lessequal
@85
<=
whitespace
@87
variable
@88
b
whitespace
@89
\n
variable
@94
a
whitespace
@95
number moreequal
@96
>=
whitespace
@98
variable
@99
b
whitespace
@100
\n
variable
@105
a
whitespace
@106
number compare
@107
<=>
whitespace
@110
variable
@111
b
whitespace
@112
\n
tag_end
@113
%]
text
@115
\n\n
eof
@117
Parse Tree
binary expr
@43
a == b
variable element
@41
a
==
variable element
@46
b
binary expr
@54
a != b
variable element
@52
a
!=
variable element
@57
b
binary expr
@65
a < b
variable element
@63
a
<
variable element
@67
b
binary expr
@75
a > b
variable element
@73
a
>
variable element
@77
b
binary expr
@85
a <= b
variable element
@83
a
<=
variable element
@88
b
binary expr
@96
a >= b
variable element
@94
a
>=
variable element
@99
b
binary expr
@107
a <=> b
variable element
@105
a
<=>
variable element
@111
b
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