The Community for Technology Leaders
Green Image
Issue No. 04 - April (1988 vol. 14)
ISSN: 0098-5589
pp: 498-511
<p>The language of universal algebras is used as an alternative approach for programming language specification. BNF rules are employed for specifying the signature of the language algebra instead of the context free syntax. The algorithm for program parsing is inductively defined by the following universal algebraic construction: Any function defined on the generators of a free algebra taking values in the carrier of another similar algebra can he uniquely extended to a homomorphism between the two algebras. Any conventional programming language can be specified by a finite set of BNF rules and its algebra of symbols is generated by a finite set of generator classes. Thus any function defined on the finite set of generators offers an algebraic mechanism for a universal algorithm for source language program parsing. The right-hand side of the BNF rules are the patterns searched by the algorithm in the source text of the program. The essential feature of this algorithm is that it can be used as a driver for code generation and optimization in a translator. This driver recognizes source language constructs in the source text. The code generator evaluates them into the target language regenerating the source language program inductively as a target language program. Therefore this parser is also called a program evaluator.</p>
Algebraic model, algorithm, BNF-rule, compiler, complexity, language, pattern matching, program evaluation, programming language, program parsing, specification mechanism.

T. Rus, "Parsing Languages by Pattern Matching," in IEEE Transactions on Software Engineering, vol. 14, no. , pp. 498-511, 1988.
92 ms
(Ver 3.3 (11022016))