Parsing 2-D Languages with Positional Grammars

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.

[1]  Tsuyoshi Yamamoto,et al.  A new parsing scheme for plex grammars , 1990, Pattern Recognit..

[2]  Shi-Kuo Chang,et al.  Iconic Indexing by 2-D Strings , 1987, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[3]  R. Narasimhan,et al.  Syntax-directed interpretation of classes of pictures , 1966, CACM.

[4]  T. Kawashima,et al.  Attribute expansive graph grammar for pattern description and its problem-reduction based processing , 1988 .

[5]  Azriel Rosenfeld,et al.  Picture languages: Formal models for picture recognition , 1979 .

[6]  Rani Siromoney,et al.  Array Grammars and Kolam , 1974, Comput. Graph. Image Process..

[7]  Murray Hill,et al.  Yacc: Yet Another Compiler-Compiler , 1978 .

[8]  S. K. Chang,et al.  A Visual Language Compiler , 1987, IEEE Trans. Software Eng..

[9]  Jay Earley,et al.  An efficient context-free parsing algorithm , 1970, Commun. ACM.

[10]  King-Sun Fu,et al.  Parsing and Translation of (Attributed) Expansive Graph Languages for Scene Analysis , 1983, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[11]  Eric J. Golin,et al.  The specification of visual language syntax , 1990, J. Vis. Lang. Comput..

[12]  Alan C. Shaw,et al.  A Formal Picture Description Scheme as a Basis for Picture Processing Systems , 1969, Inf. Control..

[13]  Shi-Kuo Chang,et al.  Picture processing grammar and its applications , 1971, Inf. Sci..

[14]  King-Sun Fu,et al.  Efficient error-correcting parsing for (attributed and stochastic) tree grammars , 1982, Inf. Sci..

[15]  Bharat K. Bhargava,et al.  Tree Systems for Syntactic Pattern Recognition , 1973, IEEE Transactions on Computers.

[16]  King-sun Fu,et al.  Error-Correcting Tree Automata for Syntactic Pattern Recognition , 1978, IEEE Transactions on Computers.

[17]  Genny Tortora,et al.  A Unifying Approach to Iconic Indexing for 2-D and 3-D Scences , 1992, IEEE Trans. Knowl. Data Eng..

[18]  Jerome Feder,et al.  Plex languages , 1971, Inf. Sci..

[19]  Azriel Rosenfeld,et al.  Web Grammars , 1969, IJCAI.

[20]  Mariusz Flasiński Characteristics of edNLC-graph grammar for syntactic pattern recognition , 1989, Comput. Vis. Graph. Image Process..

[21]  William C. Rounds,et al.  Context-free grammars on trees , 1969, STOC.

[22]  Patrick Shen-Pei Wang Recognition of two-dimensional patterns , 1977, ACM '77.

[23]  John L. Pfaltz,et al.  Web grammars and picture description , 1972, Comput. Graph. Image Process..

[24]  Shi-Kuo Chang,et al.  A method for the structural analysis of two-dimensional mathematical expressions , 1970, Inf. Sci..

[25]  Azriel Rosenfeld,et al.  Array Automata and Array Grammars , 1971, IFIP Congress.