c l a s s   V a l u e E x p r e s s i o n 
 
 { 
 
         t o k e n   c o n t e n t ; 
 
 } 
 
 
 
 c l a s s   C o n d i t i o n E x p r e s s i o n 
 
 { 
 
         e n u m   C o n d i t i o n O p e r a t o r 
 
         { 
 
                 L T , 
 
                 L E , 
 
                 G T , 
 
                 G E , 
 
                 E Q , 
 
                 N E , 
 
         } 
 
 
 
         V a l u e E x p r e s s i o n   l e f t O p e r a n d ; 
 
         V a l u e E x p r e s s i o n   r i g h t O p e r a n d ; 
 
         C o n d i t i o n O p e r a t o r   c o n d i t i o n O p e r a t o r ; 
 
 } 
 
 
 
 c l a s s   S t a t e m e n t 
 
 { 
 
 } 
 
 
 
 c l a s s   I f E l s e S t a t e m e n t   :   S t a t e m e n t 
 
 { 
 
         C o n d i t i o n E x p r e s s i o n   c o n d i t i o n ; 
 
         S t a t e m e n t   t r u e S t a t e m e n t ; 
 
         S t a t e m e n t   f a l s e S t a t e m e n t ; 
 
 } 
 
 
 
 c l a s s   A s s i g n S t a t e m e n t   :   S t a t e m e n t 
 
 { 
 
         V a l u e E x p r e s s i o n   l e f t O p e r a n d ; 
 
         V a l u e E x p r e s s i o n   r i g h t O p e r a n d ; 
 
 } 
 
 
 
 c l a s s   R e t u r n S t a t e m e n t   :   S t a t e m e n t 
 
 { 
 
         V a l u e E x p r e s s i o n   r e s u l t ; 
 
 } 
 
 
 
 c l a s s   B l o c k S t a t e m e n t   :   S t a t e m e n t 
 
 { 
 
         S t a t e m e n t [ ]   s t a t e m e n t s ; 
 
 } 
 
 
 
 t o k e n   I F   =   " i f " ; 
 
 t o k e n   T H E N   =   " t h e n " ; 
 
 t o k e n   E L S E   =   " e l s e " ; 
 
 t o k e n   R E T U R N   =   " r e t u r n " ; 
 
 t o k e n   O P E N   =   " / { " ; 
 
 t o k e n   C L O S E   =   " / } " ; 
 
 t o k e n   L T   =   " / < " ; 
 
 t o k e n   L E   =   " / < / = " ; 
 
 t o k e n   G T   =   " / > " ; 
 
 t o k e n   G E   =   " / > / = " ; 
 
 t o k e n   E Q   =   " / = / = " ; 
 
 t o k e n   N E   =   " / ! / = " ; 
 
 t o k e n   A S S I G N   =   " / = " ; 
 
 t o k e n   V A L U E   =   " [ a - z A - Z _ ] / w * " ; 
 
 d i s c a r d t o k e n   S P A C E   =   " / s + " ; 
 
 
 
 r u l e   V a l u e E x p r e s s i o n   V a l u e 
 
                 =   V A L U E   :   c o n t e n t   a s   V a l u e E x p r e s s i o n 
 
                 ; 
 
 r u l e   C o n d i t i o n E x p r e s s i o n   C o n d i t i o n 
 
                 =   V a l u e   :   l e f t O p e r a n d   " < "   V a l u e   :   r i g h t O p e r a n d   a s   C o n d i t i o n E x p r e s s i o n   w i t h   {   c o n d i t i o n O p e r a t o r   =   " L T "   } 
 
                 =   V a l u e   :   l e f t O p e r a n d   " < = "   V a l u e   :   r i g h t O p e r a n d   a s   C o n d i t i o n E x p r e s s i o n   w i t h   {   c o n d i t i o n O p e r a t o r   =   " L E "   } 
 
                 =   V a l u e   :   l e f t O p e r a n d   " > "   V a l u e   :   r i g h t O p e r a n d   a s   C o n d i t i o n E x p r e s s i o n   w i t h   {   c o n d i t i o n O p e r a t o r   =   " G T "   } 
 
                 =   V a l u e   :   l e f t O p e r a n d   " > = "   V a l u e   :   r i g h t O p e r a n d   a s   C o n d i t i o n E x p r e s s i o n   w i t h   {   c o n d i t i o n O p e r a t o r   =   " G E "   } 
 
                 =   V a l u e   :   l e f t O p e r a n d   " = = "   V a l u e   :   r i g h t O p e r a n d   a s   C o n d i t i o n E x p r e s s i o n   w i t h   {   c o n d i t i o n O p e r a t o r   =   " E Q "   } 
 
                 =   V a l u e   :   l e f t O p e r a n d   " ! = "   V a l u e   :   r i g h t O p e r a n d   a s   C o n d i t i o n E x p r e s s i o n   w i t h   {   c o n d i t i o n O p e r a t o r   =   " N E "   } 
 
                 ; 
 
 r u l e   A s s i g n S t a t e m e n t   A s s i g n 
 
                 =   V a l u e   :   l e f t O p e r a n d   " = "   V a l u e   :   r i g h t O p e r a n d   a s   A s s i g n S t a t e m e n t 
 
                 ; 
 
 r u l e   R e t u r n S t a t e m e n t   R e t u r n 
 
                 =   " r e t u r n "   V a l u e   :   r e s u l t   a s   R e t u r n S t a t e m e n t 
 
                 ; 
 
 r u l e   B l o c k S t a t e m e n t   B l o c k 
 
                 =   " { "   {   S t a t   :   s t a t e m e n t s   }   " } "   a s   B l o c k S t a t e m e n t 
 
                 ; 
 
 r u l e   I f E l s e S t a t e m e n t   I f E l s e 
 
                 =   " i f "   C o n d i t i o n   :   c o n d i t i o n   " t h e n "   S t a t   :   t r u e S t a t e m e n t   [   " e l s e "   S t a t   :   f a l s e S t a t e m e n t   ]   a s   I f E l s e S t a t e m e n t 
 
                 ; 
 
 r u l e   S t a t e m e n t   S t a t 
 
                 =   ! A s s i g n   |   ! R e t u r n   |   ! B l o c k   |   ! I f E l s e 
 
                 ; 
 
 