发明名称 Source code translating method, recording medium containing source code translator program, and source code translator device
摘要 A source code translating method includes the steps of representing a particular source code in the form of an abstract syntax tree without using nodes representing expression statements, and converting such abstract syntax tree into a character string, wherein as the type of the root node in the abstract syntax tree being processed is if-statement (T71), a branch is taken to invoke the "procedure for producing if-statement" where a character string "if (" is first produced, and then, to produce "x==0" contained in the first occurrence of the subtree, the "procedure for outputting the abstract syntax tree as an expression" is recursively invoked, then a character string ")" is produced; to produce "y=0;" contained in the second occurrence of the subtree, the "procedure for outputting the abstract syntax tree as a statement" is recursively invoked, then a character string "else" is produced; and to produce "y=1;" contained in the third occurrence of the subtree (T72), the "procedure for outputting the abstract syntax tree as a statement" is recursively invoked, whereby a character string "if (x==0) y=0; else y=1;" is finally produced.
申请公布号 US6516461(B1) 申请公布日期 2003.02.04
申请号 US20000531938 申请日期 2000.03.21
申请人 SECRETARY OF AGENCY OF INDUSTRIAL SCIENCE & TECHNOLOGY;ICHISUGI YUUJI 发明人 ICHISUGI YUUJI
分类号 G06F9/44;G06F9/45;(IPC1-7):G06F9/45 主分类号 G06F9/44
代理机构 代理人
主权项
地址