skip to main content

SciTech ConnectSciTech Connect

Title: Obtaining correct compile results by absorbing mismatches between data types representations

Methods and a system are provided. A method includes implementing a function, which a compiler for a first language does not have, using a compiler for a second language. The implementing step includes generating, by the compiler for the first language, a first abstract syntax tree. The implementing step further includes converting, by a converter, the first abstract syntax tree to a second abstract syntax tree of the compiler for the second language using a conversion table from data representation types in the first language to data representation types in the second language. When a compilation error occurs, the implementing step also includes generating a special node for error processing in the second abstract syntax tree and storing an error token in the special node. When unparsing, the implementing step additionally includes outputting the error token, in the form of source code written in the first language.
Authors:
; ; ;
Publication Date:
OSTI Identifier:
1327917
Report Number(s):
9,459,848
14/725,219
DOE Contract Number:
SC0008923
Resource Type:
Patent
Resource Relation:
Patent File Date: 2015 May 29
Research Org:
International Business Machines Corporation, Armonk, NY (United States)
Sponsoring Org:
USDOE
Country of Publication:
United States
Language:
English
Subject:
97 MATHEMATICS AND COMPUTING