OpenModelica


Forgot password? | Forgot username? | Register

The identifier at start and end are different

The identifier at start and end are different

Hi,

I run OpenModelica 1.13.0 still.

When I start OMEdit and do Open Modelica/Library Files(s) and choose  one file - then I get the error message

Parse error: The identifier at start and end are different

I get it repeatedly of several different files that I can without problem run independently in JModelica.
Still older files I have moved from JModelica to OpenModelica works as usual.
(And I use the same editor TexMate - out in the Mac - while OM is a VM with Linux from downloaded from your homepage)

Any idea of what the problem can be?

Jan Peter

Edited by: janpeter - Mar-14-19 08:43:48
Administrator has disabled public posting. Please login or register in order to proceed.

Re: The identifier at start and end are different

Is it possible to share the model?

best regards

Administrator has disabled public posting. Please login or register in order to proceed.

Re: The identifier at start and end are different

It is quite a long file - but perhaps I can cut it down and still keep the problem.

Is there no general ideas of how to trouble-shoot this?

Jan Peter

Administrator has disabled public posting. Please login or register in order to proceed.

Re: The identifier at start and end are different

It seems like somewhere in your code you have,

Code:


model A
end B;

In such cases you have the error The identifier at start and end are different.
Usually you end up with such errors when you manually try to edit the models.

Adeel.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: The identifier at start and end are different

I have checked for this error and it is not that.
But I worried for that "hidden" symbols can come in that the editor do not show.
How do I check for such things?

Other ideas?

Administrator has disabled public posting. Please login or register in order to proceed.

Re: The identifier at start and end are different

Right click and choose "Expand All".

Adeel.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: The identifier at start and end are different

In what context should I right click and "Expand all"?

I work in Linux and use Mouspad - there is not that option when I right click.
Out in the file system I can choose the (closed) file and right click but no such option as "Expand all" there either.

Jan Peter

Administrator has disabled public posting. Please login or register in order to proceed.

Re: The identifier at start and end are different

I think we both are on different tracks. I am a bit lost actually.

Just to understand your problem again. You are having problems loading your models in OMEdit. So basically you just get the error and nothing is loaded, right? If yes then usually such error also points you to the exact file and line.

If you can't share your model then at least try to make a minimal model that depicts the problem. Unfortunately its very hard for us to solve the issue without the source code.

Adeel.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: The identifier at start and end are different

I have cut down the model now and it still has the same problem.
When I load I just get a read error line as described above and nothing is really loaded.
So it is some very, very basic problem.

The problem has come this week.
But I have also managed this week to do very small models that do work.

Enclosed the file.

Jan Peter

Administrator has disabled public posting. Please login or register in order to proceed.

Re: The identifier at start and end are different

Hi,
on line 26 to 30

Code:


connector LiquidCon
         replaceable package medium=Medium;
           medium.Concentration c                                   "Concentration";
        flow Real F (unit="L/h")                                 "Flow rate";
     end LiquiCon;

you forget the D....  current/tongue

Administrator has disabled public posting. Please login or register in order to proceed.

Re: The identifier at start and end are different

Great!
You saved my day, if not the whole week.
Jan Peter

PS It is somewhat interesting how "forgiving" the JModelica compiler is compared to the OpenModelica compiler.

PS2. And I take away the file when now the problem is solved.

Edited by: janpeter - Mar-14-19 15:26:52
Administrator has disabled public posting. Please login or register in order to proceed.

Re: The identifier at start and end are different

NP! And your welcome...

I have not worked with JModelica, so i dont know how it works. OMEdit check your syntax and i think its a great thing. If you use OM Connection Editor and a syntax error comes up, it usually tell you at which line the error occur.

Maybe JModelica only check the keyword "end" after you declare a model or connection w/o checking the identifier. But I think i doesn't make any sense.

Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests and 0 other users also viewing this topic
You are here: