#NEWLINE# def test_ora_abs( self ) : #NEWLINE# #INDENT# tokens = list ( lexical ( 'ORA $1234' ) ) #NEWLINE# self . assertEquals ( 2 , len ( tokens ) ) #NEWLINE# self . assertEquals ( 'T_INSTRUCTION' , tokens [ 0 ] [ 'type' ] ) #NEWLINE# self . assertEquals ( 'T_ADDRESS' , tokens [ 1 ] [ 'type' ] ) #NEWLINE# self . assertEquals ( '$1234' , tokens [ 1 ] [ 'value' ] ) #NEWLINE# ast = syntax ( tokens ) #NEWLINE# self . assertEquals ( 1 , len ( ast ) ) #NEWLINE# self . assertEquals ( 'S_ABSOLUTE' , ast [ 0 ] [ 'type' ] ) #NEWLINE# code = semantic ( ast ) #NEWLINE# self . assertEquals ( code , [ 13 , 52 , 18 ] )