Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
preprocessor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
preprocessor
Merge requests
!94
preprocessor.tex: add slides on verbatim block and command line options
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
preprocessor.tex: add slides on verbatim block and command line options
JohannesPfeifer/preprocessor:doc
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Johannes Pfeifer
requested to merge
JohannesPfeifer/preprocessor:doc
into
master
1 year ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
09a9a4e9
1 commit,
1 year ago
1 file
+
53
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
doc/preprocessor/preprocessor.tex
+
53
−
0
Options
@@ -107,6 +107,26 @@
@@ -107,6 +107,26 @@
\end{witemize}
\end{witemize}
\end{frame}
\end{frame}
\begin{frame}
[fragile]
\frametitle
{
Command line options in the mod-file
}
\begin{witemize}
\item
Command line options can alternatively be defined in the first line of the .mod file
\item
Avoids to always have to invoke an option at the command line
\\
$
\rightarrow
$
particularly useful for the
\texttt
{
nostrict
}
option during the development phase of a model
\item
Definition must be
\begin{itemize}
\item
a one-line Dynare comment, i.e. begin //
\item
the options must be enclosed in
\texttt
{
----+ options:
}
and
\texttt
{
+----
}
and must be whitespace separated
\item
As in the command line, if an option admits a value, the equal symbol must not be surrounded by spaces
\end{itemize}
\begin{block}
{
Example
}
\begin{verbatim}
// --+ options: json=compute, stochastic, nostrict +--
\end{verbatim}
\end{block}
\end{witemize}
\end{frame}
\section
{
Macro processing
}
\section
{
Macro processing
}
\begin{frame}
\begin{frame}
@@ -136,6 +156,39 @@
@@ -136,6 +156,39 @@
\end{witemize}
\end{witemize}
\end{frame}
\end{frame}
\begin{frame}
[fragile]
\frametitle
{
Undesired Parsing
}
\begin{witemize}
\item
Dynare will try to parse all tokens it recognizes
\item
Code not recognized by the parser is directly passed to the preprocessor output
\\
$
\rightarrow
$
allows using MATLAB/Octave commands directly in the mod-file
\item
Causes problems when one wants to invoke commands containing recognized tokens
\end{witemize}
\end{frame}
\begin{frame}
[fragile]
\frametitle
{
Bypassing the parsing
}
\begin{witemize}
\item
The
\texttt
{
verbatim
}
block instructs Dynare not to parse text contained in it
\item
In the following example,
\texttt
{
stoch
\_
simul
}
would otherwise be recognized as a Dynare command during parsing
\end{witemize}
\begin{block}
{
Verbatim example
}
\begin{verbatim}
verbatim;
rhos = [ 0.8, 0.9, 1];
for iter = 1:length(rhos)
set
_
param
_
value('rho',rhos(iter));
[info, oo
_
, options
_
, M
_
] = stoch
_
simul(M
_
, options
_
, oo
_
, var
_
list
_
)
if info(1)~=0
error('Simulation failed for parameter draw')
end
end
end;
\end{verbatim}
\end{block}
\end{frame}
\begin{frame}
\begin{frame}
\frametitle
{
1.
\
Lexical analysis
}
\frametitle
{
1.
\
Lexical analysis
}
\begin{witemize}
\begin{witemize}
Loading