The widespread use of diagrammatic languages has motivated the need for grammar-based tools to support designers in the definition and implementation of graphical environments. The effective use of such systems requires efficient parsing techniques. In previous years, many approaches have been devised and one of them is based on the extension of the LR parsing methodology from traditional string languages to visual languages generated by the so-called Positional Grammars. The technique, named pLR parsing, is a deterministic technique able to automatically generate an efficient LR-like parser for many interesting and practical visual languages such as flowcharts, statecharts, automata, UML notations, and others. However, differently from the traditional string case, there exist particular positional grammars whose generated pLR parsing table does not present conflicts but are, however, not pLR parsable because, due to their two-dimensional nature, they can produce run- time conflicts. In this paper, we introduce an algorithm that statically verifies the pLR parsability of a positional grammar by detecting whether the pLR parser built on it may produce run-time conflicts. Such an algorithm is of importance during the implementation of a diagrammatic language since it is able to inform the language de- signer about the pLR parsability of the designed grammar and to detect the (possible) places where the grammar should be modified.

Run-time conflict detection in visual language parsing

Costagliola, G.;Deufemia, V.;Ferrucci, F.;Gravino, C.
2020-01-01

Abstract

The widespread use of diagrammatic languages has motivated the need for grammar-based tools to support designers in the definition and implementation of graphical environments. The effective use of such systems requires efficient parsing techniques. In previous years, many approaches have been devised and one of them is based on the extension of the LR parsing methodology from traditional string languages to visual languages generated by the so-called Positional Grammars. The technique, named pLR parsing, is a deterministic technique able to automatically generate an efficient LR-like parser for many interesting and practical visual languages such as flowcharts, statecharts, automata, UML notations, and others. However, differently from the traditional string case, there exist particular positional grammars whose generated pLR parsing table does not present conflicts but are, however, not pLR parsable because, due to their two-dimensional nature, they can produce run- time conflicts. In this paper, we introduce an algorithm that statically verifies the pLR parsability of a positional grammar by detecting whether the pLR parser built on it may produce run-time conflicts. Such an algorithm is of importance during the implementation of a diagrammatic language since it is able to inform the language de- signer about the pLR parsability of the designed grammar and to detect the (possible) places where the grammar should be modified.
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11386/4735040
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? 0
social impact