Abstract

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 designer about the pLR parsability of the designed grammar and to detect the (possible) places where the grammar should be modified.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call