2022 Volume 39 Issue 4 Pages 4_38-4_48
We propose a method to automatically correct erroneous control statements written in C, PHP, JavaScript, Python, and Ruby, in case statements are written according to the grammar of another language or mixed grammar of multiple languages. Such kinds of errors are likely to be made when a programmer learns multiple programming languages. In order to support the correction of such errors, we propose a method to analyze a grammatical erroneous code fragment with expression level syntax analysis, and to convert the code through a common model of control statements.