# Feature Request: Official BNF for RouterOS Scripting

**URL:** <https://forum.mikrotik.com/t/feature-request-official-bnf-for-routeros-scripting/182433>\
**Category:** General\
**Created:** [March 4, 2025, 5:42pm UTC](https://forum.mikrotik.com/t/feature-request-official-bnf-for-routeros-scripting/182433 "2025-03-04T17:42:56Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Larsa](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/larsa/32/1542_2.png) [@Larsa](https://forum.mikrotik.com/u/Larsa)\
**Post date:** [March 4, 2025, 5:42pm UTC](https://forum.mikrotik.com/t/feature-request-official-bnf-for-routeros-scripting/182433/1 "2025-03-04T17:42:56Z")

</div>

**Background**  
Many developers and tools, including modern AI/LLM models, can now understand and process formal syntax definitions. Having an official BNF (Backus-Naur Form) for ROS scripting would make it much easier to analyze, validate, and generate scripts accurately.

**Why this would be useful**

- Better automation – A formal grammar would improve script generation and validation.
- Improved code analysis – It would help with building linters and better debugging tools.
- LLM support – AI-based assistants could provide accurate ROS scripting suggestions.
- More consistent reference materials – A formal grammar would ensure that documentation, tutorials, and syntax guides stay accurate and aligned with the actual scripting language.

If Mikrotik published an official BNF for ROS scripting, it would help developers and tools, including LLMs, better understand and work with the scripting language. This would lead to smoother implementations of automation tools for network management and monitoring, enable better code analysis in external IDEs, and provide more useful learning resources for the Mikrotik community.

**Technical perspective**  
If Mikrotik already uses Yacc/Bison or a similar parser generator internally, extracting a BNF shouldn’t be too much effort. Even if a different parsing approach is used, having a structured syntax definition would still be a valuable resource for the community.

## **Why should Mikrotik consider publishing an official BNF or EBNF for ROS scripting?** A formal grammar would make the language easier to work with, improve tooling support, and help AI-based tools provide more accurate assistance.

Would love to hear Mikrorik’s and the community’s thoughts on this!

---

_[View the full topic](https://forum.mikrotik.com/t/feature-request-official-bnf-for-routeros-scripting/182433)._
