NB: I just wanted to throw this out there, as my company does a fair amount of development of DSLs.
If you were to rewrite the parser using Xtext, you would get many things for free, including syntax-aware intelligent editors for both eclipse & JetBrains products, which include refactoring support (rename c/i/e/a, note, etc). Further, with the abstract model, you could offer quick fixes, best practice recommendations, etc.
Further, while I'm still fairly new to PlantUML (but have been a professional geek for >30 years), I feel like the current PlantUML syntax could be reenvisioned, with a particular focus on a couple of themes:
- separating rendering concerns from the diagram-independent model artifacts (like classes),
- providing optional places in the grammar for information beyond what UML allows (for example, specifiying the regex that governs valid values of a string field, etc) so that this extra information could be used by tools aware of those extensions, and
- stepping back and taking a holistic view of the syntax to see where it has evolved (or devolved) inconsistently.
We have an Apache 2.0-licensed open source product of our own (https://yaktor.io) that we have used with good success on several projects. Yaktor's domain model DSL, https://docs.yaktor.io/#yaktor-domain-modeling-dsl-reference, could be used as a head start for an Xtext-based PlantUML syntax. The source for the DSL is at https://github.com/SciSpike/yaktor-dsl-xtext.
Kick the idea around...