Open HubertGaravel opened 1 week ago
We follow the Prism syntax here (see documentation) which does not allow identifiers to start with a digit. This is also common in many programming languages. I agree that the error output could be improved here to better indicate the underlying issue.
Well, Storm already extends the Prism language in several ways, so it could generalize formula names.
It is true that many programming languages require identifiers to start with a letter, but surrounding identifiers by double quotes precisely suggests that this constraint is lifted, e.g. in Ada:
function F (S : String) return Integer; function "+" (Left, Right: Tree) return Tree; function "=" (X, Y: Node) return Boolean;
This is a minor point, but easily doable IMHO.
Although property names are enclosed between quotes (which logically means that they could accept any character), they cannot start with a digit. This goes against the intuition.
This is annoying when properties are referred to by numbers. The user is forced to insert a meaningless prefix such as prop1, prop2, etc.
Moreover, the error message emitted by Storm in such case is confusing, and lets the user think that the formula itself is incorrect, while the problem lies in the identifier of the formula.
Example: