next up previous
Next: Unparsing Up: Transforming COBOL Systems Previous: Transforming COBOL Systems

Parsing

Although the standardization of programming languages has a long history, it turns out that every new customer of a renovation factory brings its own language dialect, even for mainstream languages like COBOL. This is caused by the use of non-standard, compiler-specific, language features or even by the use of home-grown dialects. Mainstream (LR) parser generator technology breaks down in such cases since the continuous stream of grammar modifications needed to support all these dialects leads to unsurmountable maintenance problems.

These problems do not occur when Generalized LR parser technology is used. The key property of GLR parsers is that they can parse the complete class of context-free languages. As a result, the composition of two grammars (an essential operation for modular structuring) can again be parsed by a GLR parser. In other words, GLR parsing is essential for parsing modular grammars.

Modular grammars make it possible to place dialect specific parts of a language in separate modules. When we need them we can use them at will, without creating a maintenance problem. We can also easily add new grammar rules to existing ones without having to solve conflicts: they are solved by the GLR algorithm.

In Section 6.2 we give a more detailed description of GLR parsing. Parsing technology in reengineering and its problems are further discussed in [18].


next up previous
Next: Unparsing Up: Transforming COBOL Systems Previous: Transforming COBOL Systems
Paul Klint 2001-06-12