Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Help with 'Parser error: Unexpected token'

Help with 'Parser error: Unexpected token'

I am having difficulty with running an example on my HP notebook with Windows XP, the latest Modelica, and OMNotebook.

I am going through the user manual and I have input the bouncing ball model:
model BouncingBall
parameter Real e=0.7 "coefficient of restitution";
...<snip>
reinit(v, v_new);
end when;
end BouncingBall;

And saved it in a folder 'My exercizes' where I have stored and executed other examples.  This folder is at the same level as bin and lib. 

When I try to run:
simulate(BouncingBall, start=0, end=5s);
I get:
[<interactive>:1:0-1:7:writable] Error: Parser error: Unexpected token near: simulate (IDENT)

From this description, what process should I go through to identify the problem?

Thanks,
ray

Re: Help with 'Parser error: Unexpected token'

Well, it doesn't parse so look for parse errors.


simulate(BouncingBall, start=0, end=5s);

5s is not a Modelica token.

Re: Help with 'Parser error: Unexpected token'

Also, note that correct is:
simulate(Model, startTime=0, stopTime=0)
not with start/end.

Cheers,
Adrian Pop/

Re: Help with 'Parser error: Unexpected token'

Thank you.  I used stoptime and it works. 

The example came right out of the user guide.  Please suggest how I might provide feedback so this may be addressed by the authors.

With appreciation,
ray

Re: Help with 'Parser error: Unexpected token'

What page? I can fix it myself so at next build we can have a correct version.
You can report bugs/errors in these places:
- here on the forum
- in our Bug tracker:
  https://openmodelica.org:8443/cb/proj/t … acker_id=1
- via email to openmodelica@ida.liu.se


Cheers,
Adrian Pop/

Re: Help with 'Parser error: Unexpected token'

Found it and fixed it in revision 7905. Thanks for pointing it out.

Cheers,
Adrian Pop/

There are 0 guests and 0 other users also viewing this topic
You are here: