Perl it is carried out as the main translator written in C, together with the big collection of the units written in Perl and C. The translator has 150 000 lines of code C and collects to 1 MB, that is fulfilled on the typical machine architecture. Alternatively, the translator can be collected in link library, and can be enclosed in other programs. There are almost 500 units in allocation, switching on 200 000 lines Perl and additional 350 000 lines of code C. (The Most part of code C in units consists of the character coding desktops).
The translator has an architecture oriented to the object. All units of language scalars Perl, sets, mashes, files are presented in translator C structs. Operations on these structs are defined by the big collection of a macrodefinition, standard differentiations and functions; they make Perl C API. Perl API can be amazing for uninitiated, but its items of an input follow the consecutive circuit of the denotation which gives representation by that who uses it actively.
Performance of program Perl shares on two phases: collecting single and execution time. During collective time the translator assorts the program text as a syntax tree. The text is developed only once, and the syntax tree is an optimisation subject before it will be fulfilled, thus the performance phase is rather effective. Collecting of single optimisation on a syntax tree switches on constant turning and context distribution, but eye optimisation also is fulfilled thus.
For Perl there is a context-dependent grammar which can be mentioned the code fulfilled during an unstable phase in execution time. Therefore Perl cannot be disassembled direct Lex/Yacc lexer/parser combinations. Instead the translator carries out its own lexer, which introduces with the changed analyzer of a bison of the GNU to solve doublemeanings in language. It is told, that "only perl can disassemble Perl". It means, that only translator Perl (perl) can disassemble language Perl (Perl). The truth is testified by constant disadvantages of other programs which undertake to disassemble Perl, such as the source text analyzers and auto-indenters which should struggle not only with many ways of expression of unambiguous syntactic constructions, but also and with the facts, that Perl cannot be disassembled generally.
Perl it is distributed approximately on 120 000 functional tests. Developers Perl rely on functional tests to guarantee, that changes do not enter to the translator of an error; on the contrary, for users Perl who see, that the translator passes its functional tests for their system, there can be a high degree of confidence, that it works properly.
For these years service of translator Perl became more and more difficult. The code basis was in continuous development, since 1994. The code has been optimised for job at the expense of simplicity, clearness and strong internal interfaces. The size and complexity of the translator is that barrier to developers which they wish to effect.
|