# ERROR: syntax error, unexpected $end

**URL:** <https://forum.dynare.org/t/error-syntax-error-unexpected-end/3186>\
**Category:** Dynare help (legacy posts)\
**Created:** [23 May 2013 21:13 UTC](https://forum.dynare.org/t/error-syntax-error-unexpected-end/3186 "2013-05-23T21:13:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gitte](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/b19c9b/32.png) [@Gitte](https://forum.dynare.org/u/Gitte)\
**Post date:** [23 May 2013 21:13 UTC](https://forum.dynare.org/t/error-syntax-error-unexpected-end/3186/1 "2013-05-23T21:13:33Z")

</div>

Hi,

I am trying to run my model in dynare version 4.3.0, but I keep getting the error message below.

[quote]  
Starting preprocessing of the model file …  
ERROR: rot.mod:1.1: syntax error, unexpected $end

Error using dynare (line 114)  
DYNARE: preprocessing failed[/quote]

I am confused if this has to do with an error related to a missing/inapropriate “end;” or if it has something to do with the first line (as it says 1.1:syntax error)?  
I have spent hours looking through the code trying to find the error, so I am desperately hoping that one of you can tell me what is wrong??

Thank you in advance,  
Gitte  
[rot.mod](https://forum.dynare.org/uploads/default/original/2X/0/04a17593b3c193c78f8c84b35bdec9b51975f868.mod) (6.97 KB)

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [24 May 2013 14:12 UTC](https://forum.dynare.org/t/error-syntax-error-unexpected-end/3186/2 "2013-05-24T14:12:32Z")

</div>

Try upgrading Dynare. Your mod-file runs on my machine, except for the later problem that

[quote]The following endogenous variables aren’t present at the current period in the model:  
pi\_f\_hat  
t\_hat [/quote]

---

<div class="post-metadata">

**Author:** ![selima](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/a6a055/32.png) [@selima](https://forum.dynare.org/u/selima)\
**Post date:** [7 August 2013 12:36 UTC](https://forum.dynare.org/t/error-syntax-error-unexpected-end/3186/3 "2013-08-07T12:36:26Z")

</div>

Good morning I have dynare 4.3.2 but I have the same error  
ERROR: NKKtaylord.mod:217.1: syntax error, unexpected $end

??? Error using ==\> dynare at 114  
DYNARE: preprocessing failed  
please can you tell me what is the problem? thank you very much  
[NKKtaylord.mod](https://forum.dynare.org/uploads/default/original/2X/9/9236253a81efd08030e4979b9b49ba37f429c2ff.mod) (6.3 KB)

---

<div class="post-metadata">

**Author:** ![donihue](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@donihue](https://forum.dynare.org/u/donihue)\
**Post date:** [7 August 2013 17:29 UTC](https://forum.dynare.org/t/error-syntax-error-unexpected-end/3186/4 "2013-08-07T17:29:04Z")

</div>

You have made three small mistakes:

- you failed to match “/_" with a "_/” at end of definitions
- you fogot to include “rhoee” in the list of parameters
- you have 2 equations for “zeta”; you need to eliminate one of them  
If you correct these, the model runs

Regards  
Donihue

---

<div class="post-metadata">

**Author:** ![Gitte](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/b19c9b/32.png) [@Gitte](https://forum.dynare.org/u/Gitte)\
**Post date:** [30 August 2013 14:28 UTC](https://forum.dynare.org/t/error-syntax-error-unexpected-end/3186/5 "2013-08-30T14:28:17Z")

</div>

> [@jpfeifer](#):
>
> Try upgrading Dynare. Your mod-file runs on my machine, except for the later problem that
> 
> The following endogenous variables aren’t present at the current period in the model:  
> pi\_f\_hat  
> t\_hat

Thank you for your reply!

---

<div class="post-metadata">

**Author:** ![mahboob](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mahboob](https://forum.dynare.org/u/mahboob)\
**Post date:** [20 August 2017 13:00 UTC](https://forum.dynare.org/t/error-syntax-error-unexpected-end/3186/6 "2017-08-20T13:00:37Z")

</div>

Hi,

I ran my model in dynare version 4.5.1, but I keep getting the error message below.

ERROR: …: line 140, cols1-0 : syntax error, unexpected $end  
in my .mod file, i have no code in line 140!!

I cant find any problem through the codes, can you tell me what is wrong??

Thank you in advance,

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [21 August 2017 08:56 UTC](https://forum.dynare.org/t/error-syntax-error-unexpected-end/3186/7 "2017-08-21T08:56:44Z")

</div>

Usually that means that in the previous line there is something missing like a semicolon. Without the file it is impossible to tell.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [3 September 2017 10:43 UTC](https://forum.dynare.org/t/error-syntax-error-unexpected-end/3186/8 "2017-09-03T10:43:01Z")

</div>

Split this topic on 3 September 2017 10:43 UTC

7 posts were split to a new topic: [Replicating Adjemian et al (2010) `Evaluation de la politique monétaire dans un modèle DSGE pour la zone Euro"](https://forum.dynare.org/t/replicating-adjemian-et-al-2010-evaluation-de-la-politique-monetaire-dans-un-modele-dsge-pour-la-zone-euro/10682)
