发明名称 CONFIGURATION-PRESERVING PREPROCESSOR
摘要 Methods, systems, and apparatuses, including computer programs encoded on computer readable media, for generating a plurality of tokens from one or more source files. The one or more source files include source code in a first programming language. The source code includes one or more static conditionals that include a conditional expression and branch code that is operative when the conditional expression is true. Various configurations are possible based upon the conditionals. A first static conditional that includes one or more nested static conditionals within the branch code associated with the first static conditional is determined. Each of the one or more nested static conditionals is hoisted to a beginning of the branch code associated with the first static conditional. Each innermost branch code does not contain a static conditional, and each possible configuration is preserved.
申请公布号 US2014365995(A1) 申请公布日期 2014.12.11
申请号 US201414316159 申请日期 2014.06.26
申请人 GAZZILLO PAUL;Grimm Robert 发明人 GAZZILLO PAUL;Grimm Robert
分类号 G06F9/44 主分类号 G06F9/44
代理机构 代理人
主权项 1. A system comprising: a lexer configured to generate a plurality of tokens from one or more source files, the one or more source files including source code in a first programming language, the source code comprising one or more static conditionals that include a conditional expression and branch code that is operative when the conditional expression is true, and wherein various configurations are possible based upon the conditionals; and a configuration-preserving preprocessor configured to: determine that a first static conditional includes one or more nested static conditionals within the branch code associated with the first static conditional; andhoist each of the one or more nested static conditionals to a beginning of the branch code associated with the first static conditional, wherein each innermost branch code does not contain a static conditional, and wherein each possible configuration is preserved.
地址 Titusville NJ US