Shi-Kuo Chang


pdf bib
Parsing 2-D Languages with Positional Grammars
Gennaro Costagliola | Shi-Kuo Chang
Proceedings of the Second International Workshop on Parsing Technologies

In this paper we will present a way to parse two-dimensional languages using LR parsing tables. To do this we describe two-dimensional (positional) grammars as a generalization of the context-free string grammars. The main idea behind this is to allow a traditional LR parser to choose the next symbol to parse from a two-dimensional space. Cases of ambiguity are analyzed and some ways to avoid them are presented. Finally, we construct a parser for the two-dimensional arithmetic expression language and implement it by using the tool Yacc.