#NEWLINE# def test_ora_imm_with_binary( self ) : #NEWLINE# #INDENT# tokens = list ( lexical ( 'ORA #%00000100' ) ) #NEWLINE# self . assertEquals ( 2 , len ( tokens ) ) #NEWLINE# self . assertEquals ( 'T_INSTRUCTION' , tokens [ 0 ] [ 'type' ] ) #NEWLINE# self . assertEquals ( 'T_BINARY_NUMBER' , tokens [ 1 ] [ 'type' ] ) #NEWLINE# ast = syntax ( tokens ) #NEWLINE# self . assertEquals ( 1 , len ( ast ) ) #NEWLINE# self . assertEquals ( 'S_IMMEDIATE' , ast [ 0 ] [ 'type' ] ) #NEWLINE# code = semantic ( code ) #NEWLINE# self . assertEquals ( code , [ 9 , 4 ] )