#NEWLINE# def test_ldx_absy( self ) : #NEWLINE# #INDENT# tokens = list ( lexical ( 'LDX $1234,Y' ) ) #NEWLINE# self . assertEquals ( 4 , len ( tokens ) ) #NEWLINE# self . assertEquals ( 'T_INSTRUCTION' , tokens [ 0 ] [ 'type' ] ) #NEWLINE# self . assertEquals ( 'T_ADDRESS' , tokens [ 1 ] [ 'type' ] ) #NEWLINE# self . assertEquals ( 'T_SEPARATOR' , tokens [ 2 ] [ 'type' ] ) #NEWLINE# self . assertEquals ( 'T_REGISTER' , tokens [ 3 ] [ 'type' ] ) #NEWLINE# ast = syntax ( ast ) #NEWLINE# self . assertEquals ( 1 , len ( ast ) ) #NEWLINE# self . assertEquals ( 'S_ABSOLUTE_Y' , ast [ 0 ] [ 'type' ] ) #NEWLINE# code = semantic ( ast ) #NEWLINE# self . assertEquals ( code , [ 190 , 52 , 18 ] )