Abstract

Most efforts have been made in the past APL conferences to propose new approaches to the analysis of APL, and introduce new features in the language. However, most of these proposals take very little in account the amount of work that has been made around syntax analysis in the 'main stream' of computer science. The proposed approach, as described in this paper, can therefore be considered as an old work. We first describe the fundamental syntactic devices of APL. Those devices are then arranged as a standard BNF. We can exhibit some properties of the language described, and consequently select from the literature an appropriate technique to perform the syntax analysis of APL expressions. The proposed method uses a push-down automaton. Although the language is shown to be not LR(k), an adaptation of this technique works well using backtracking. The whole process has been modelled in APL. A first application transforms a grammar expressed as a BNF in a set of tables. A second application uses these tables to perform the syntax analysis of APL statements. These last programs have been rewritten in C, integrated in an APL system, and used to test different dialects of APL, such as ISO-APL or APL2. Results show the influence of the cost of syntax analysis in the processing of APL expressions.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call