Effective translation for LL(1)-grammar in the example of a~programming language
Prikladnaâ diskretnaâ matematika, no. 3 (2017), pp. 90-99.

Voir la notice de l'article provenant de la source Math-Net.Ru

Top-down analysis algorithms are the most useful for implementing translators for programming languages. The analysis methods based on the LL(1)-grammar assume that the generating rules of the grammar are previously transformed into a non-strict normal Greibach form. The transformed generating rules are written in an analyzer table. To convert an input string of characters to an object language, a special program for generating individual elements of the object language should be created for each generating rule. The development of the set of such programs is rather a complex and voluminous task when a translator is created. In this article, we propose a method for constructing semantic programs implementing the generation of elements of the object language when each semantic program is associated with the separate symbols in the generating rule but not with the generating rule as a whole. As a result, the semantic programs are extremely simple and convenient to be implemented. The method is described for an exemplifying programming language which is translated into a reverse Polish notation.
Keywords: translation, reverse Polish notation, programming language.
Mots-clés : LL(1) grammar
@article{PDM_2017_3_a6,
     author = {Yu. L. Kostyuk},
     title = {Effective translation for {LL(1)-grammar} in the example of a~programming language},
     journal = {Prikladna\^a diskretna\^a matematika},
     pages = {90--99},
     publisher = {mathdoc},
     number = {3},
     year = {2017},
     language = {ru},
     url = {http://geodesic.mathdoc.fr/item/PDM_2017_3_a6/}
}
TY  - JOUR
AU  - Yu. L. Kostyuk
TI  - Effective translation for LL(1)-grammar in the example of a~programming language
JO  - Prikladnaâ diskretnaâ matematika
PY  - 2017
SP  - 90
EP  - 99
IS  - 3
PB  - mathdoc
UR  - http://geodesic.mathdoc.fr/item/PDM_2017_3_a6/
LA  - ru
ID  - PDM_2017_3_a6
ER  - 
%0 Journal Article
%A Yu. L. Kostyuk
%T Effective translation for LL(1)-grammar in the example of a~programming language
%J Prikladnaâ diskretnaâ matematika
%D 2017
%P 90-99
%N 3
%I mathdoc
%U http://geodesic.mathdoc.fr/item/PDM_2017_3_a6/
%G ru
%F PDM_2017_3_a6
Yu. L. Kostyuk. Effective translation for LL(1)-grammar in the example of a~programming language. Prikladnaâ diskretnaâ matematika, no. 3 (2017), pp. 90-99. http://geodesic.mathdoc.fr/item/PDM_2017_3_a6/

[1] Aho V. A., Lam M. S., Sethi R., Ullman J. D., Compilers: Principles, Techniques, and Tools, Pearson Education, Boston, 2007

[2] Mogensen T. A., Introduction to Compiler Design, Springer, 2011, 225 pp.

[3] Virt N., Theory and Techniques of Compiler Construction, Addison-Wesley, Reading, 1996

[4] Kostyuk Yu. L., “The tabular method of generating reverse Polish notation for LL(1) grammars”, Proc. ITMM-2015, Pt. 1, TSU Publ., Tomsk, 2015, 190–195 (in Russian)