Visual language editors based on LR parsing techniques (original) (raw)

Towards Syntax-Aware Editors for Visual Languages

Electronic Notes in Theoretical Computer Science, 2005

Editors for visual languages should provide a user-friendly environment supporting end users in the composition of visual sentences in an effective way. Syntax-aware editors are a class of editors that prompt users into writing syntactically correct programs by exploiting information on the visual language syntax. In particular, they do not constrain users to enter only correct syntactic states in a visual sentence. They merely inform the user when visual objects are syntactically correct. This means detecting both syntax and potential semantic errors as early as possible and providing feedback on such errors in a non-intrusive way during editing. As a consequence, error handling strategies are an essential part of such editing style of visual sentences. In this work, we develop a strategy for the construction of syntax-aware visual language editors by integrating incremental subsentence parsers into free-hand editors. The parser combines the LR-based techniques for parsing visual languages with the more general incremental Generalized LR parsing techniques developed for string languages. Such approach has been profitably exploited for introducing a noncorrecting error recovery strategy, and for prompting during the editing the continuation of what the user is drawing.

The specification of visual language syntax

Journal of Visual Languages and Computing, 1990

Visual programming languages use pictures as programs. One approach to building a visual programming environment is to parameterlze a generic environment with a language specification. We describe a mechanism for specifying visual languages that can be used as the basis of a language-independent visual programming environment. Our mechanism is a new type of grammar, called a picture layout grammar. We show how this type of grammar can describe the two-dimensional syntax of a visual language and give an example of its use. A picture layout grammar permits the syntactic structure of visual program to be recovered by parsing. The parsing ability provides the basis of our visual programming environment.

A Parsing Methodology for the Implementation of Visual Systems

IEEE Transactions on Software Engineering, 1997

The Visual Language Compiler-Compiler (VLCC) is a grammar-based graphical system for the automatic generation of visual programming environments. In this paper the theoretical and algorithmic issues of VLCC are discussed in detail. The parsing methodology we present is based on the "positional grammar" model. Positional grammars naturally extend context-free grammars by considering new relations in addition to string concatenation. Thanks to this, most of the results from LR parsing can be extended to the positional grammars inheriting the well known LR technique efficiency. In particular, we provide algorithms to implement a YACC-like tool embedded in the VLCC system for automatic compiler generation of visual languages described by positional grammars.

Visual grammars and incremental parsing for interface languages

Proceedings of the 1990 IEEE Workshop on Visual Languages, 1990

In this aper we present a grammar formalism and parsing algordm for the purposes of defining and processing visually based langua es. Our work is currently set in the context of a wider $fort to process input sketched on interactive tablets and worksurfaces as well as to support interface dido es using these technologies. After outlining the particuc demands that these overall goals place on our.vlsual laneage component,.we pre.ynt a grammar formalism and an mcremental parsmg algonthm that uses mars. We then compare our approach to others

Building visual language parsers

Proceedings of the SIGCHI conference on Human factors in computing systems Reaching through technology - CHI '91, 1991

Notepad computers promise a new input paradigm where users communicate with computers in visual languages composed of handwritten text and diagrams. A key problem to be solved before such an interface can be realized is the efficient and accurate recognition (or parsing) of handwritten input. We present techniques for building visual language parsers based on a new formalism, constrained set grammars. Constrained set grammars provide a high-level and declarative specification of visuid languages and support the automatic generation of efficient parsers. These techniques have been used to build parsers for several representative visual languages.

Extended positional grammars: A formalism for describing and parsing visual languages

2007

Much recent research is focusing on formal methods for the definition and implementation of visual programming environments. Extended positional grammars (XPGs) naturally extend context-free grammars for string languages to grammars for visual languages by considering new relations in addition to string concatenation. Thanks to this analogy, most results from LR parsing can be extended to XPGs while preserving their well-known efficiency. XPGs include mechanisms for handling contextual information enabling us to model a broader class of visual languages, which includes the diagrammatic notations used in software engineering. Moreover, the XPG grammar formalism can be effectively used for modeling both visual and textual notations in a seamless way. The XPG model is the underlying formalism of the VLDesk system for the automatic generation of visual programming environments. VLDesk inherits and extends to the visual field, concepts, and techniques of compiler generation tools like YACC.

A Framework of Syntactic Models for the Implementation of Visual Languages

1997

We present a framework of syntactic models for the definition and implementation of visual languages. We analyze a wide range of existing visual languages and, for each of them, we propose a characterization according to a syntactic model. The framework has been implemented in the Visual Language Compiler-Compiler (VLCC) system. VLCC is a practical, flexible and extensible tool for the automatic generation of visual programming environments which allows to implement visual languages once they are modeled according to a syntactic model

Visual language parsing: If I had a hammer

Lecture Notes in Computer Science, 1998

Since the 1960s, grammatical formalisms and parsing methods developed originally for natural language strings have been extended to represent and process two-dimensional visual expressions such as mathematics notation and various kinds of diagrams. But despite all of the e ort, there has been negligible impact on human-computer interfaces to support visual modes of communication. Why? As with all tech transfer issues, some of the reasons may b e b e y ond a researcher's control. However, I believe that two of the contributing factors in the case of visual language VL parsing can and should be addressed by the research eld. First, the eld needs to consolidate and communicate its results. This is in fact not trivial for higher-dimensional visual language representation and parsing, and I will try to illustrate why. Second, researchers have to look harder for the right application domains. One of the obvious applications is the interpretation of visual language expressions constructed with GUIs. While grammatical representation and parsing may bring something to the table, the problem of interpretation may be solvable with simpler techniques. I'll discuss some other application areas and my experience with them: design support, smart screen layout for electronic publishing, and visual focusing for attributed graphs.

Exploiting XPG for Visual Languages Definition, Analysis and Development

Electronic Notes in Theoretical Computer Science, 2003

In this paper we present the approach based on the formalism of Extended Positional Grammars (XPG) for specifying, designing and implementing visual languages. Special emphasis is put on describing the benefits deriving from the use of such formalism. Indeed, it allows us to exploit the well-established theoretical background and techniques developed for string languages in the setting of visual languages. As a matter of fact, an efficient syntactic analysis of visual languages can be effectively perfomed by using a suitable extension of LR techniques. Moreover, syntax-direct translations can be used to verify properties of visual sentences during a semantic analysis phase. Finally, a visual environment for a target visual language can be automatically generated by exploiting a YACC-like tool based on XPG. 1

Grammatical abstraction and incremental syntax analysis in a language-based editor

Proceedings of the ACM SIGPLAN 1988 conference on Programming Language design and Implementation - PLDI '88, 1988

Processors for programming languages and other formal languages typically use a concrete syntax to describe the user's view of a program and an abstract syntax to represent language structures internally. Grammatical abstraction is defined as a relationship between two context-free grammars. It formalizes the notion of one syntax being "more abstract" than another. Two variants of abstraction are presented. Weak grammatical abstraction supports (i) the construction during LR parsing of an internal representation that is closely related to the abstract syntax and (ii) incremental LR parsing using that internal representation as its base, Strong grammatical abstraction tightens the correspondence so that top-down construction of incrementally-parsable internal representations is possible. These results arise from an investigation into language-based editing systems, but apply to any program that transforms a linguistic object from a representation in its concrete syntax to, a representation in its abstract syntax or vice versa.