发明名称 Code converting method, program, and system
摘要 A computer-implemented method, system, and article of manufacture for processing a programming language, which is able to describe data conversion of data input by an iterator. The method includes: converting iterator code of the programming language to a generator code in an intermediate language that includes a generator as an operator; reading a consumer side code; and overwriting code by inline substitution between the consumer side code and the generator code.
申请公布号 US9280332(B2) 申请公布日期 2016.03.08
申请号 US201313835849 申请日期 2013.03.15
申请人 International Business Machines Corporation 发明人 Koseki Akira;Tozawa Akihiko
分类号 G06F9/44;G06F9/45 主分类号 G06F9/44
代理机构 Cantor Colburn LLP 代理人 Cantor Colburn LLP
主权项 1. A computer-implemented method for processing a programming language able to describe data conversion of data input by an iterator, said method comprising: converting iterator code of the programming language to a generator code in an intermediate programming language including a generator as an operator, wherein the intermediate programming language differs from the programming language, and wherein the generator code comprises one or more yield statements, and wherein the conversion comprises recursively processing a subexpression of said iterator code; reading a consumer code in the programming language; selecting at least a part of the consumer code to be overwritten by the generator code in response to the at least a part of the consumer code comprising a series of operators that are linked; overwriting the at least a part of the consumer code by substitution with said generator code converted from the iterator code, wherein one or more states embedded in the iterator are mapped to one or more program points of a program obtained from the overwriting; and compiling the program obtained from the overwriting, wherein said generator code is compiled using a compiler for the intermediate programming language, which is different from a compiler for the programming language for optimization of the generator code.
地址 Armonk NY US
您可能感兴趣的专利