return ch.isalpha() or ch.isdigit() or ch == ' ' or ch == '_' input1 = """ x = "abc" func main() { x = x + 2.0 y == x } """ input2 = """ """ input3 = """ """ if __name__ == "__main__": input_file = sys.argv[1] l = Lexer(token_definition, FileUtils.read_file(input_file)) #l = Lexer(token_definition, input1) #print l.parse_result #print l.symbol_table #print l.program_structure FileUtils.write_symbol_table(l.symbol_table) FileUtils.write_fip(l.program_structure)