-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parser failing for array of TypeName
#123
Comments
Similar also for:
giving: What I expected to get is a vector of class names containing all Example models of the MSL, but: |
Looks like the lexer has some trouble tokenizing the super long string that contains all the MSL models: "{[...],Modelica.Mechanics.Rotational.Sensors.RelAngleSensor,Modelica.Mechanics.Rotational.Sensors.RelSpeedSensor,Modelica.Mechanics.Rotational.Sensors.RelAccSensor,Modelica.Mechanics.Rotational.Sensors.TorqueSensor,Modelica.Mechanics.Rotational.Sensors.PowerSensor,Modelica.Mechanics.Rotational.Sensors.MultiSensor,Modelica.Mechanics.Rotational.Sources,Modelica.Mechanics.Rotational.Sources.Position,Modelica.Mechanics.Rotational.Sources.Speed,[...]}" that is returned by omc. I guess it's simply too long. Unfortunately I have no idea how the lexer is working. It is some machine generated file, and I don't know where it is coming from. |
I tried the |
@olivleno I think this error is related to OMJulia parser, can you just add
|
Okay, I got a minimal example to showcase the error: julia> import OMJulia
julia> OMJulia.Parser.parseOM("{A.M1,B.M2}")
ERROR: OMJulia.Parser.LexerError("Error while lexing"}") So it's not the length but that it's not a type we previously could parse. It's an array of MetaModelica type |
TypeName
No. parsed=false doesn't solve the issue. I tried the following:
|
OMJulia.API.getClassNames(omc;class_="Modelica")
works fine.OMJulia.API.getClassNames(omc;class_="Modelica", recursive=true)
gives:
ERROR: OMJulia.Parser.LexerError("Error while lexing")
The text was updated successfully, but these errors were encountered: