Powered by OpenAIRE graph
Found an issue? Give us feedback
image/svg+xml art designer at PLoS, modified by Wikipedia users Nina, Beao, JakobVoss, and AnonMoos Open Access logo, converted into svg, designed by PLoS. This version with transparent background. http://commons.wikimedia.org/wiki/File:Open_Access_logo_PLoS_white.svg art designer at PLoS, modified by Wikipedia users Nina, Beao, JakobVoss, and AnonMoos http://www.plos.org/ Universidade Federal...arrow_drop_down
image/svg+xml art designer at PLoS, modified by Wikipedia users Nina, Beao, JakobVoss, and AnonMoos Open Access logo, converted into svg, designed by PLoS. This version with transparent background. http://commons.wikimedia.org/wiki/File:Open_Access_logo_PLoS_white.svg art designer at PLoS, modified by Wikipedia users Nina, Beao, JakobVoss, and AnonMoos http://www.plos.org/
image/svg+xml Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao Closed Access logo, derived from PLoS Open Access logo. This version with transparent background. http://commons.wikimedia.org/wiki/File:Closed_Access_logo_transparent.svg Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao
Journal of Visual Languages & Computing
Article . 2018 . Peer-reviewed
License: Elsevier TDM
Data sources: Crossref
https://dx.doi.org/10.60692/mf...
Other literature type . 2018
Data sources: Datacite
https://dx.doi.org/10.60692/m9...
Other literature type . 2018
Data sources: Datacite
DBLP
Article
Data sources: DBLP
versions View all 4 versions
addClaim

This Research product is the result of merged Research products in OpenAIRE.

You have already added 0 works in your ORCID record related to the merged Research product.

Error recovery in parsing expression grammars through labeled failures and its implementation based on a parsing machine

استعادة الخطأ في تحليل قواعد التعبير من خلال الفشل المسمى وتنفيذه على أساس آلة التحليل
Authors: Sérgio Queiroz de Medeiros; Fabio Mascarenhas;

Error recovery in parsing expression grammars through labeled failures and its implementation based on a parsing machine

Abstract

Les grammaires d'expression d'analyse (PEG) sont un formalisme utilisé pour décrire les analyseurs top-down avec retour arrière. Comme les PEG ne fournissent pas un bon mécanisme de récupération des erreurs, les analyseurs PEG ne récupèrent généralement pas les erreurs de syntaxe dans l'entrée, ou ne récupèrent pas les erreurs de syntaxe à l'aide de fonctionnalités ad hoc spécifiques à la mise en œuvre. L'absence de récupération d'erreur appropriée rend les analyseurs PEG inadaptés à une utilisation avec des environnements de développement intégrés (IDE), qui doivent construire des arbres syntaxiques même pour des programmes incomplets et syntaxiquement invalides. Nous discutons d'une extension conservatrice, basée sur les PEG avec des échecs étiquetés, qui ajoute un mécanisme de récupération des erreurs de syntaxe pour les PEG. Cette extension associe des expressions de récupération à des étiquettes, où une étiquette signale non seulement une erreur de syntaxe, mais utilise également cette expression de récupération pour atteindre un point de synchronisation dans l'analyse d'entrée et de reprise. Nous donnons une sémantique opérationnelle des PEG avec ce mécanisme de récupération, ainsi qu'une sémantique opérationnelle pour une machine d'analyse que nous pouvons traduire les PEG étiquetés avec récupération d'erreur et prouver l'exactitude de cette traduction. Nous utilisons une implémentation de PEG étiquetés avec récupération des erreurs via une machine d'analyse pour construire des analyseurs robustes, qui utilisent différentes stratégies de récupération, pour le langage Lua. Nous évaluons l'efficacité de ces analyseurs, seuls et en comparaison avec un analyseur Lua avec récupération automatique des erreurs généré par ANTLR, un générateur d'analyseur populaire.

Las gramáticas de expresión de análisis (PEG) son un formalismo utilizado para describir los analizadores de arriba hacia abajo con retroceso. Como los PEG no proporcionan un buen mecanismo de recuperación de errores, los analizadores basados en PEG generalmente no se recuperan de los errores de sintaxis en la entrada, o se recuperan de los errores de sintaxis utilizando características ad-hoc específicas de la implementación. La falta de una recuperación de errores adecuada hace que los analizadores PEG no sean adecuados para su uso con entornos de desarrollo integrados (IDE), que necesitan construir árboles sintácticos incluso para programas incompletos y sintácticamente inválidos. Discutimos una extensión conservadora, basada en PEG con fallas etiquetadas, que añade un mecanismo de recuperación de errores de sintaxis para PEG. Esta extensión asocia expresiones de recuperación a etiquetas, donde una etiqueta ahora no solo informa un error de sintaxis, sino que también usa esta expresión de recuperación para alcanzar un punto de sincronización en el análisis de entrada y reanudación. Damos una semántica operativa de PEG con este mecanismo de recuperación, así como una semántica operativa para una máquina de análisis sintáctico que podemos traducir PEG etiquetados con recuperación de errores y demostrar la corrección de esta traducción. Utilizamos una implementación de PEG etiquetados con recuperación de errores a través de una máquina de análisis para construir analizadores robustos, que utilizan diferentes estrategias de recuperación, para el lenguaje Lua. Evaluamos la efectividad de estos analizadores, solos y en comparación con un analizador Lua con recuperación automática de errores generado por ANTLR, un generador de analizadores popular.

Parsing Expression Grammars (PEGs) are a formalism used to describe top-down parsers with backtracking. As PEGs do not provide a good error recovery mechanism, PEG-based parsers usually do not recover from syntax errors in the input, or recover from syntax errors using ad-hoc, implementation-specific features. The lack of proper error recovery makes PEG parsers unsuitable for use with Integrated Development Environments (IDEs), which need to build syntactic trees even for incomplete, syntactically invalid programs. We discuss a conservative extension, based on PEGs with labeled failures, that adds a syntax error recovery mechanism for PEGs. This extension associates recovery expressionsto labels, where a label now not only reports a syntax error but also uses this recovery expression to reach a synchronization point in the input and resume parsing. We give an operational semantics of PEGs with this recovery mechanism, as well as an operational semantics for a parsing machinethat we can translate labeled PEGs with error recovery to, and prove the correctness of this translation. We use an implementation of labeled PEGs with error recovery via a parsing machine to build robust parsers, which use different recovery strategies, for the Lua language. We evaluate the effectiveness of these parsers, alone and in comparison with a Lua parser with automatic error recovery generated by ANTLR, a popular parser generator .

تحليل قواعد التعبير (PEGs) هي شكلية تستخدم لوصف التحليل من أعلى إلى أسفل مع التراجع. نظرًا لأن PEGs لا توفر آلية جيدة لاسترداد الأخطاء، فإن المحللين المعتمدين على PEG لا يتعافون عادةً من أخطاء بناء الجملة في الإدخال، أو يتعافون من أخطاء بناء الجملة باستخدام ميزات مخصصة خاصة بالتنفيذ. إن الافتقار إلى الاسترداد المناسب للأخطاء يجعل محللو PEG غير مناسبين للاستخدام مع بيئات التطوير المتكاملة (IDEs)، والتي تحتاج إلى بناء أشجار نحوية حتى بالنسبة للبرامج غير المكتملة وغير الصالحة من الناحية النحوية. نناقش تمديدًا متحفظًا، استنادًا إلى PEGs مع حالات الفشل المسماة، والتي تضيف آلية استرداد الخطأ النحوي لـ PEGs. يربط هذا الملحق تعبيرات الاسترداد بالتسميات، حيث لا تقوم التسمية الآن بالإبلاغ عن خطأ في بناء الجملة فحسب، بل تستخدم أيضًا تعبير الاسترداد هذا للوصول إلى نقطة مزامنة في الإدخال واستئناف التحليل. نعطي دلالات تشغيلية لـ PEGs مع آلية الاسترداد هذه، بالإضافة إلى دلالات تشغيلية لآلة التحليل التي يمكننا ترجمتها إلى PEGs المسمى مع استرداد الخطأ، وإثبات صحة هذه الترجمة. نحن نستخدم تطبيق PEGs المسمى مع استرداد الأخطاء عبر آلة تحليل لبناء محلل قوي، والذي يستخدم استراتيجيات استرداد مختلفة، للغة لوا. نقوم بتقييم فعالية هذه المحاليل، بمفردها وبالمقارنة مع محلل لوا مع الاسترداد التلقائي للخطأ الذي تم إنشاؤه بواسطة ANTLR، وهو مولد محلل شهير.

Country
Brazil
Related Organizations
Keywords

FOS: Computer and information sciences, Artificial intelligence, S-attributed grammar, Program Repair, Parsing expression grammar, Error recovery, L-attributed grammar, Artificial Intelligence, Programming Language Semantics, Natural semantics, Context-free grammar, Expression (computer science), Parsing, Parsing machine, Automated Software Testing Techniques, Natural language processing, Bottom-up parsing, Computer science, Rule-based machine translation, 004, Programming language, Top-down parsing, Computer Science, Physical Sciences, Parsing expression grammars, Program Analysis and Verification Techniques, Software, Empirical Studies in Software Engineering, Information Systems

  • BIP!
    Impact byBIP!
    selected citations
    These citations are derived from selected sources.
    This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
    4
    popularity
    This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network.
    Average
    influence
    This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
    Average
    impulse
    This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network.
    Average
Powered by OpenAIRE graph
Found an issue? Give us feedback
selected citations
These citations are derived from selected sources.
This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
BIP!Citations provided by BIP!
popularity
This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network.
BIP!Popularity provided by BIP!
influence
This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
BIP!Influence provided by BIP!
impulse
This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network.
BIP!Impulse provided by BIP!
4
Average
Average
Average
Green