Opened 11 years ago
Closed 11 years ago
#2656 closed defect (invalid)
val(x.break.y, 0) does not work - the parsing of the script containing it fails
Reported by: | Adrian Pop | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.1 |
Component: | Parser | Version: | trunk |
Keywords: | Cc: |
Description
You get a message like:
Error: No viable alternative near token: break
I assume all the tokens have issues in component references or name paths.
I guess $Code.* in ModelicaBuiltin.mo should allow for String also as
TypeName, VariableName so one can write "x.break.y".
Maybe we should not allow VariableName/TypeName at all, but use strings always in all the APIs.
Change History (2)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Is normal that break cannot be used as variable or class name.
I made a typo in my script, it should have been "brake" instead of "break".
Closing this now!
Still, allowing String to be automatically translated to VarName/TypeName might be a good idea.
Well. Is "break" a valid identififer in Modelica? It breaks loops and is a statement...