Hello Youssef,
Thank you again for this interesting tool. I vendored it into one of my Softanza projects, and it has proved to be very valuable.
You may not have noticed it, so I wanted to remind you that I already opened an issue I found here:
https://github.com/ysdragon/tree-sitter-ring/issues/2
I hope this helps you assess the issue and, eventually, fix it.
All the best,
Mansour
Hello Youssef,
Your v1.1.1 fixes it. Re-measured over 10,233 Ring files — a full Ring 1.27 install plus my Softanza library tree — the files your grammar wrongly rejects went 18 → 11. Reproducers and numbers:
https://github.com/ysdragon/tree-sitter-ring/issues/2#issuecomment-5384766820
For the group, since this may look obscure:
What tree-sitter gives Ring. A real syntax tree with exact positions, which keeps parsing after a mistake instead of stopping at the first one. That is what lets a tool say "line 13, column 45" instead of "something is wrong". Ring's compiler is built to run programs, not to answer questions about them — so every editor, highlighter, formatter or analyser would otherwise reimplement Ring's syntax and slowly drift from it. Youssef's grammar means we write that once.
Why I use it. I am building static type checking for large Ring projects — the thing a serious team asks about before adopting a language at scale. It reads a whole project across load boundaries and catches, for instance, a function called with the wrong number of arguments, before the program runs. On Ring's own standard library it found two functions that have never worked.
The rule I would pass on: the grammar is a lens, never a judge. When it and Ring disagree, Ring is right and the grammar has a bug. That is how this one was found — the Youssef's grammar rejected
? Wrap(3Copies("x"))which Ring accepts. A digit-leading name was fine alone, and fine as a call, but not as an argument to another call.
Thank you, Youssef, again.
Mansour
--
---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ring-lang/f7266554-dd9d-483a-a382-9cafeb0259f7n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ring-lang/3ae35a1a-b506-4347-8e15-86d55ac774b4n%40googlegroups.com.