Automatic recursion engineering of reduction incorporated parsers

Adrian Johnstone, Elizabeth Scott
2007 Science of Computer Programming  
Reduction Incorporated (RI) parsers deliver high performance by suppressing the stack activity except for those rules that generate embedded recursion. Automaton constructions for RI parsing have been presented by ] but both can yield very large tables. An unusual aspect of the RI automaton is that the degree of stack activity suppression can be varied in a fine-grained way by choosing different grammar terminalisation sets, and this provides a large family of potential RI automata for real
more » ... ramming languages, some of which have manageable table size but still show high performance. In this paper we describe automatic construction of minimal grammar terminalisation sets, giving examples drawn from ANSI-C, Cobol and Pascal; we describe the use of profiling to inform the choice of RI automaton; we investigate the use of RI parsers for scannerless parsing; and we explain some of the phenomena that influence the time/space trade-off for RI parsers.
doi:10.1016/j.scico.2006.04.011 fatcat:4sz6b2k66bcydblea4g5pjckca