Neutralization of Syntax Errors in the Compiler of the Functional-Imperative Language El

Maliavko A.A
{"title":"Neutralization of Syntax Errors in the Compiler of the Functional-Imperative Language El","authors":"Maliavko A.A","doi":"10.1109/FarEastCon.2019.8934697","DOIUrl":null,"url":null,"abstract":"This article discusses the problem of neutralizing syntax errors in relation to the development of the compiler of the new functional-imperative programming language El. Solving this problem implies the need to choose such a variant for correcting the program being processed, in which it is possible to continue its syntactic analysis in order to detect the maximum possible number of non-induced errors. A neutralization method is proposed that effectively uses the features of the deterministic syntactic parsing algorithm of the compiler, implemented as a stack automaton controlled by an input token and a symbol from the top of the stack. The method is based on a complete enumeration of all valid tokens for modifying one error token – alternately inserting, replacing, and deleting to select that parser restart parameters at which the next syntax error is detected at the maximum distance from the neutralized one. If no modification of a single erroneous token leads to successful neutralization, then one character is alternately discarded from the top of the stored stack or the position of the current token in the input stream advances. After that, all attempts to modify the current token are repeated. The absence of a panic mode can reduce the number of unparsed tokens. This neutralization algorithm combines with “rules for typical errors”, which are included in the grammar for such possible situations when, in order to successfully neutralize the error, you need to insert (replace) not one, but two or three tokens. Such errors are possible in programs in the El language, their effective neutralization by other means seems to be very difficult.","PeriodicalId":395247,"journal":{"name":"2019 International Multi-Conference on Industrial Engineering and Modern Technologies (FarEastCon)","volume":"16 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2019 International Multi-Conference on Industrial Engineering and Modern Technologies (FarEastCon)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/FarEastCon.2019.8934697","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

This article discusses the problem of neutralizing syntax errors in relation to the development of the compiler of the new functional-imperative programming language El. Solving this problem implies the need to choose such a variant for correcting the program being processed, in which it is possible to continue its syntactic analysis in order to detect the maximum possible number of non-induced errors. A neutralization method is proposed that effectively uses the features of the deterministic syntactic parsing algorithm of the compiler, implemented as a stack automaton controlled by an input token and a symbol from the top of the stack. The method is based on a complete enumeration of all valid tokens for modifying one error token – alternately inserting, replacing, and deleting to select that parser restart parameters at which the next syntax error is detected at the maximum distance from the neutralized one. If no modification of a single erroneous token leads to successful neutralization, then one character is alternately discarded from the top of the stored stack or the position of the current token in the input stream advances. After that, all attempts to modify the current token are repeated. The absence of a panic mode can reduce the number of unparsed tokens. This neutralization algorithm combines with “rules for typical errors”, which are included in the grammar for such possible situations when, in order to successfully neutralize the error, you need to insert (replace) not one, but two or three tokens. Such errors are possible in programs in the El language, their effective neutralization by other means seems to be very difficult.
函数式命令式语言编译器中语法错误的中和[j]
本文讨论了与新的函数式命令式编程语言El的编译器开发相关的语法错误的中和问题。解决这个问题意味着需要选择这样一种变体来纠正正在处理的程序,在这种变体中,它可以继续其语法分析,以检测最大可能数量的非诱导错误。提出了一种有效利用编译器确定性语法解析算法特点的中和方法,实现为由输入令牌和堆栈顶部的符号控制的堆栈自动机。该方法基于用于修改一个错误标记的所有有效标记的完整枚举—交替插入、替换和删除以选择解析器重启参数,在该参数处,下一个语法错误将在距离消除的语法错误的最大距离处检测到。如果没有修改单个错误标记导致成功消除,则从存储堆栈的顶部交替丢弃一个字符,或者在输入流中前进当前标记的位置。之后,将重复修改当前令牌的所有尝试。没有紧急模式可以减少未解析令牌的数量。这种中和算法与“典型错误规则”结合在一起,这些规则包含在语法中,用于这样一种可能的情况:为了成功地中和错误,您需要插入(替换)不是一个,而是两个或三个标记。这种错误在El语言的程序中是可能存在的,但用其他方法有效地消除这些错误似乎非常困难。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信