#acl DynareWriterGroup:read,write,delete,revert DynareTeamGroup:read,write,delete,revert,admin All:read = 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}}}) 6. loop indexes (not yet implemented) 7. 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 {{{ModFileLocalVariable}}}s (of the form {{{NAME = ...}}}) fit into this category.