Differences between revisions 1 and 2
Revision 1 as of 2008-02-02 16:35:43
Size: 2806
Comment:
Revision 2 as of 2009-03-25 17:11:52
Size: 2806
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Symbol Types

  1. endogenous variables (appear in declaration, model, various initializations) (Type: eEndogenous)

  2. exogenous variables, deterministic with simul, stochastic with stoch_simul or estimation (appear in declaration, model, various initializations) (Type: eExogenous)

  3. deterministic variables, deterministic with stoch_simul (appear in declaration, model, various initializations) (Type: eExogenousDet)

  4. parameters (appear in declaration, value assignement, model, estim_params, coeff_trends) (Type: eParameter)

  5. local variables whose scope is the whole mod file except the model declaration (see below) (Type: eModFileLocalVariable)

  6. local variables whose scope is the model declaration (their declaration begins with a '#', see below) (Type: eModelLocalVariable)

  7. loop indexes (not yet implemented)
  8. unknown functions are function that are unknown by Dynare derivator and are a NAME that isn't a declared variable followed by (). The existence of such unknown functions should trigger numerical derivation rather than analytical. It will be necessary to provide an interface to declare the derivatives on a user function.

Local variables

In the mod file, it is possible to use variables which are never explicitely declared. We call them local variables.

There are two types of such variables:

  • those who are initialized inside the model block, with a pound (#) statement (type eModelLocalVariable). They can't be used outside the model block. They are interpreted and derived by the parser.

  • those who are used outside the model block without having ever been declared (type eModFileLocalVariable). They can't be used inside the model block. Since the parser can't interpret or evaluate them, they are simply copied as is in the output file.

Parsing

During the parsing process, when the parser encounters an unknown symbol outside the model block, it adds it to the symbol table with the eModFileLocalVariable type.

The parser currently distinguishes the following cases:

  • a Dynare statement starts with a Dynare keyword and is entirely parsed
  • a Dynare block start with a Dynare keyword and continue until "end;". It is entirely parsed.

  • a line beginning with a known symbol name which is not a ModFileLocalVariable. Such a line is assumed to be a parameter initialization, and is entirely parsed.

  • any other construct is assumed to be native language. It is copied to the output as is without any further parsing. Initializations of ModFileLocalVariables (of the form NAME = ...) fit into this category.

DynareWiki: SymbolTypes (last edited 2009-03-25 17:11:52 by localhost)