@kentzo, Perhaps comment in my LSP thread with some examples?. i.e. I didn't mean to hijack the thread._ But some example(s) help sort out what you think should be findable via regex (or centrs). It's currently using a DB with :parse and request=highlight, by version, for a larger set of rextended/eworm/tangentsoft/my-own scripts, and compare "on-line" results against the offline parser results to squeeze out detection of everything possible. (e.g. one high-level goal for agents is get the token offline to match token online, so working on that dimension current). But my current test cases are mostly valid scripts to find syntax various elements/styles/etc.
To be honest, I have not look as much at invalid cases as much yet (other than there are some unit tests with syntactic bad examples). Although you already caused me to find one where centrs offline thinks this valid /ip/address add interface=ether1 /ip/route add gateway=192.168.88.1 with "/ip/address"/"add" being a positional argument, and gateway= associated with the /ip/address. Online this is currently detected, but as example where the invalid cases be useful. _Seemingly being a rule that / cannot start an attribute name... but also case where a richer static dataset (like known attributes names) be helpful but centrs explain is not using a full set from the cliref or inspect.json data which also like see the combined command.
Anyway it's tricky business parsing RouterOS script. But VSCode showing RouterOS variables in its "Symbols" view and/or content menu support for "Go to definition"/etc be very useful IMO. And the LSP knowing the actual "folding blocks" help a ton with mismatched parens I suspect. But there is this pesky problem that something has to parse routeros script.