Underuse

The original BNF used for early ALGOL, did not yet borrow Kleene star (x* for zero or more xs) and Kleene cross (x+ for one or more) from regular expressions, and early parser specification notations were just as limited. Grammars written with those notations in mind (not necessarily for using them!), suffer from “yaccification”, when all repetitions are written out explicitly as additional left-recursive nonterminals. This pattern is well-known to be harmful since it reduces grammar’s both readability (being basically an encoding move, not a modelling one) and portability (a left-recursive grammar is often useless or suboptimal for top-down parsing).

Reference

Mats Stijlaart and Vadim Zaytsev. 2017. Towards a taxonomy of grammar smells. In Proceedings of the 10th ACM SIGPLAN International Conference on Software Language Engineering (SLE 2017). ACM, New York, NY, USA, 43-54.


Notation Smells

Home

All rights reserved (c) Tushar Sharma 2017-23.