NEURON
nmodl.yaml
Go to the documentation of this file.
1 # Copyright 2023 Blue Brain Project, EPFL.
2 # See the top-level LICENSE file for details.
3 #
4 # SPDX-License-Identifier: Apache-2.0
5 
6 ######################### NMODL Abstract Language Definition ##############################
7 #
8 # PURPOSE
9 # =======
10 #
11 # Lot of information about language constructs is necessary at various stages
12 # like AST definitions, visitors implementation, source-to-source transformations
13 # etc. In case of small changes in grammar or AST definition, especially
14 # during development stage, we have to re-write considerable part of the code.
15 # The idea of "abstract" language definition is to define framework that can automatically
16 # generate part of this "mechanical" code. This approach has been used in some open source
17 # projects (e.g. compiler design courses, TableGen format in LLVM).
18 #
19 # During first prototyping phase we defined simple text rules inspired by compiler course
20 # assignment available at jazariethach/project6_CS160.git (no longer available on github).
21 #
22 # The basic format of the every construct specification was:
23 #
24 # BaseType:ChildType => MemberType<member_name>
25 #
26 # Here "ChildType" is a new AST class that we are defining. "ParentType" is the base class,
27 # "MemberType" is the type of member variable with variable name "member_name". The name is
28 # specified in the angle braces "< >". This will generate C++ class definition like :
29 #
30 # class ChildType : public BaseType {
31 # private:
32 # MemberType member_name;
33 # };
34 #
35 # This specification format was sufficient for first AST design but as we started
36 # implementing more features and compiler passes, we need to add more information to language
37 # definition. For example, we need to make certain members vector, some are optional, some need
38 # specific method (getter/setter) etc. In the future we may need to make certain members private.
39 # Above text definition is limiting if we have to accomodate future enhancements.
40 #
41 # To overcome above limitation, we are moving to YAML definition format. This allows easy
42 # extension to language construct. For example, new properties could be easily added to
43 # exisiting specification.
44 #
45 #
46 # NOTE
47 # ====
48 #
49 # Old text specification has been converted to YAML format. The old documentation has information
50 # about how/why specific types were choosen for AST. You can find that documentation in the older
51 # commits of this file (e.g. a0a20e277ccf26752af4f648c245b4e06a44af20).
52 #
53 # YAML BASED RULE SPECIFICATION
54 # =============================
55 #
56 # Text based specification described above is very limiting in terms adding extra properties.
57 # YAML based specification allows easy addition of new properties. Below are some comments
58 # about the properties and specification :
59 #
60 # 1. Every key in YAML specification is AST node
61 # 2. The hierarchy defines parent-child class relationship
62 # 3. members is an array of member variables of the class
63 # 4. optional : indicates if variable is optional in bison specification (i.e. pointer)
64 # 5. type : type of the member
65 # 6. vector : if member variable is std::vector type
66 # 7. prefix/suffix :
67 # value : indicates the value (i.e. string here) of prefix/suffix itself
68 # force : print value always even if member if null pointer itself (e.g. arguments)
69 # 8. separator : for the vector data type, the separator for prinitng elements
70 # 9. node_name : add get_node_name() method to class and return corresponding value as name
71 # 10. add : need to have addMemberType method for corresponding variable (todo : remove this)
72 # 11. order of the members is important and determines how constructors/nmodl visitor get
73 # defined from python code generators.
74 #
75 # TODO : Add detailed information about YAML specification by porting old text based rule
76 # specification
77 
78 ## @package nmodl_yaml
79 # Specification of NMODL in YAML format
80 #
81 
82 - Ast:
83  brief: "Top level AST base class"
84  description: |
85  Ast is a top level, abstract base class defining the interface
86  for all nodes of Abstract Syntax Tree (AST).
87 
88  children:
89 
90  - Node:
91  brief: "Base class for all AST node"
92  description: |
93  Base class for all nodes in the AST. This can replace ast::Ast in
94  the next refactoring.
95 
96  children:
97 
98  - Expression:
99  brief: "Base class for all expressions in the NMODL"
100  description: |
101  Base class for all expression types. This is one of the top level node
102  in the AST representing higher level expression constructs. %Expressions
103  can be a variable itself or complex binary expressions.
104 
105  \sa ast::Statement
106 
107  children:
108 
109  - String:
110  members:
111  - value:
112  brief: "Value of string"
113  type: std::string
114  brief: "Represents a string"
115  description: |
116  All statements encapsulating text block are stored in the AST as ast::String.
117  For example, nodes like ast::LineComment and ast::Verbatim block use ast::String::value
118  to store the underlying text:
119 
120  \code{.mod}
121  COMMENT
122  This text is stored as String
123  ENDCOMMENT
124 
125  VERBATIM
126  int *x;
127  *x = ...
128  ENDVERBATIM
129  \endcode
130 
131  - Number:
132  brief: "Base class for all numbers"
133  description: |
134  Base class for all number types like ast::Integer, ast::Float and ast::Double.
135 
136  children:
137 
138  - Integer:
139  members:
140  - value:
141  brief: "Value of integer"
142  type: int
143  - macro:
144  brief: "if integer is a macro then it's name"
145  type: Name
146  optional: true
147  brief: "Represents an integer variable"
148  description: |
149  Non floating value in the mod file is parsed as an integer. For example,
150  in the below code, integer literals like `0` and `11` are stored as ast::Integer
151  in the AST :
152 
153  \code{.mod}
154  FROM i=0 TO N {
155  tau = X[i] + 11
156  }
157  \endcode
158 
159  \sa ast::Float ast::Double
160 
161  - Float:
162  members:
163  - value:
164  brief: "Value of float"
165  type: std::string
166  brief: "Represents a float variable"
167  description: |
168  Single precision float value in the mod file can be represented by ast::Float.
169 
170  \note Currently every float variable in the NMODL is stored as ast::Double and hence
171  this type is note used. This will be changed soon for variables like ast::ParamAssign.
172 
173  \sa ast::Integer ast::Double
174 
175  - Double:
176  members:
177  - value:
178  brief: "Value of double"
179  type: std::string
180  brief: "Represents a double variable"
181  description: |
182  %Double precision float value in the mod file is represented by ast::Double.
183  For example, float literals like `0.1` in the mod file are parsed as double
184  and stored using ast::Double::value :
185 
186  \code{.mod}
187  PROCEDURE foo() {
188  LOCAL x
189  x = 0.1 + tau
190  }
191  \endcode
192 
193  Note that the variables are not classified ast integer or float in the AST. The
194  decision about variable types is done by code generation backends.
195 
196  \sa ast::Integer ast::Float
197 
198  - Boolean:
199  members:
200  - value:
201  brief: "Value of boolean"
202  type: int
203  brief: "Represents a boolean variable"
204  description: |
205  %Boolean values in the mod file can be represented by ast::Boolean.
206 
207  \note Currently this type is used as only flag in some of the AST nodes. Similar to ast::Float,
208  this type was introduced for data type specific code generation support in the future.
209 
210  - Identifier:
211  brief: "Base class for all identifiers"
212  description: |
213  Base class for all variable types like ast::Name, ast::PrimeName and ast::Argument.
214 
215  \sa ast::Number
216 
217  children:
218 
219  - Name:
220  members:
221  - value:
222  brief: "Value of name"
223  type: String
224  node_name: true
225  brief: "Represents a name"
226  description: |
227  Whenever lexer encounters string variable, it returns a ast::Name
228  type. So, along with ast::Integer, ast::Double ast::String and ast::PrimeName,
229  ast::Name is one of the fundamental type in the AST. Many other variable types
230  (e.g. ast::GlobalVar, ast::RangeVar) have underlying value stored as ast::Name.
231 
232  \note This node should be able to use std::string as value type instead of ast::String
233 
234  - PrimeName:
235  members:
236  - value:
237  brief: "Name of prime variable"
238  type: String
239  node_name: true
240  - order:
241  brief: "order of ODE"
242  type: Integer
243  brief: "Represents a prime variable (for ODE)"
244  description: |
245  In case of ODE specification, all state variables appearing on LHS
246  with \` as suffix are parsed by lexer as ast::PrimeName. For example,
247  in below NMODL construct, m\` is stored as ast::PrimeName with `m` as a
248  ast::PrimeName::value and `1` as an ast::PrimeName::order.
249 
250  \code
251  DERIVATIVE states {
252  m` = m + h
253  }
254  \endcode
255 
256  - IndexedName:
257  members:
258  - name:
259  brief: "Name of array variable"
260  type: Identifier
261  node_name: true
262  - length:
263  brief: "length of an array or index position"
264  type: Expression
265  prefix: {value: "["}
266  suffix: {value: "]"}
267  brief: "Represents specific element of an array variable"
268  description: |
269  If variable is declared as an array or when array element is accessed,
270  it is stored in the ast as ast::IndexedName. For example, in below NMODL,
271  construct `m[4]` is stored as ast::IndexedName with `m` as ast::IndexedName::name
272  and `4` as ast::IndexedName::length.
273 
274  \code
275  STATE {
276  m[4]
277  }
278  \endcode
279 
280  - VarName:
281  members:
282  - name:
283  brief: "Name of variable"
284  type: Identifier
285  node_name: true
286  - at:
287  brief: "Value specified with `@`"
288  type: Integer
289  optional: true
290  prefix: {value: "@"}
291  - index:
292  brief: "index value in case of array"
293  type: Expression
294  optional: true
295  prefix: {value: "["}
296  suffix: {value: "]"}
297  brief: "Represents a variable"
298  description: |
299  This type was introduced to store variables of different types like
300  ast::Name or ast::IndexedName in the AST.
301 
302  \note With ast::Identifier as top level base class, this type can be
303  removed in the future refactoring.
304 
305  - Argument:
306  members:
307  - name:
308  brief: "Name of the argument"
309  type: Identifier
310  node_name: true
311  - unit:
312  brief: "Unit of the argument"
313  type: Unit
314  optional: true
315  brief: "Represents an argument to functions and procedures"
316  description: |
317  In case of function definitions from different ast nodes like ast::FunctionBlock,
318  ast::ProcedureBlock, the arguments are store in the ast::Argument. For example,
319  in below NMODL construct, `weight` is stored as ast::Argument::name and `uS` is
320  stored as ast::Argument::unit:
321 
322  \code {.mod}
323  NET_RECEIVE(weight (uS)) {
324  g = g + weight
325  }
326  \endcode
327 
328  - ReactVarName:
329  brief: "TODO"
330  members:
331  - value:
332  brief: "TODO"
333  type: Integer
334  optional: true
335  prefix: {value: " "}
336  - name:
337  brief: "TODO"
338  type: VarName
339  node_name: true
340 
341  - ReadIonVar:
342  brief: "TODO"
343  members:
344  - name:
345  brief: "TODO"
346  type: Name
347  node_name: true
348 
349  - WriteIonVar:
350  brief: "TODO"
351  members:
352  - name:
353  brief: "TODO"
354  type: Name
355  node_name: true
356 
357  - NonspecificCurVar:
358  brief: "TODO"
359  members:
360  - name:
361  brief: "TODO"
362  type: Name
363  node_name: true
364 
365  - ElectrodeCurVar:
366  brief: "TODO"
367  members:
368  - name:
369  brief: "TODO"
370  type: Name
371  node_name: true
372 
373  - RangeVar:
374  brief: "TODO"
375  members:
376  - name:
377  brief: "TODO"
378  type: Name
379  node_name: true
380 
381  - GlobalVar:
382  brief: "TODO"
383  members:
384  - name:
385  brief: "TODO"
386  type: Name
387  node_name: true
388 
389  - PointerVar:
390  brief: "TODO"
391  members:
392  - name:
393  brief: "TODO"
394  type: Name
395  node_name: true
396 
397  - RandomVar:
398  brief: "Single variable of type RANDOM. pointer to a nrnran123_State"
399  members:
400  - name:
401  brief: "Name of the a RANDOM variable"
402  type: Name
403  node_name: true
404 
405  - BbcorePointerVar:
406  members:
407  - name:
408  brief: "Variable name"
409  type: Name
410  node_name: true
411  brief: "Represent a single variable of type BBCOREPOINTER"
412  description: |
413  See ast::BbcorePointer for an example.
414 
415  - ExternVar:
416  brief: "TODO"
417  members:
418  - name:
419  brief: "TODO"
420  type: Name
421  node_name: true
422 
423  - Block:
424  brief: "Base class for all block scoped nodes"
425  description: |
426  NMODL has different local and globals block scoped nodes like
427  ast::NeuronBlock, ast::ParamBlock, ast::IfStatement etc. Ast::Block
428  is base class and defines common interface for these nodes.
429 
430  children:
431 
432  - ParamBlock:
433  nmodl: "PARAMETER "
434  members:
435  - statements:
436  brief: "Vector of parameters"
437  type: ParamAssign
438  vector: true
439  brief: "Represents a `PARAMETER` block in the NMODL"
440  description: |
441  Variables whose values are normally specified by the user are parameters
442  and are declared in a `PARAMETER` block. Here is an example :
443 
444  \code{.mod}
445  PARAMETER {
446  gkbar=.01 (mho/cm2) : Maximum Permeability
447  d1 = .84
448  k2 = .13e-6 (mM)
449  abar = .28 (/ms)
450  lcai (mV)
451  }
452  \endcode
453 
454  All parameters are stored in the ast::ParamBlock::statements as vector.
455 
456  - IndependentBlock:
457  nmodl: "INDEPENDENT "
458  members:
459  - variables:
460  brief: "List of variable that should be independent"
461  type: Name
462  vector: true
463  separator: " "
464  brief: "Represents a `INDEPENDENT` block in the NMODL"
465  description: |
466  `INDEPENDENT` has following form in the NMODL specification :
467 
468  \code{.mod}
469  INDEPENDENT {
470  t FROM 0 TO 1 WITH 1 (ms)
471  }
472  \endcode
473 
474  - AssignedBlock:
475  nmodl: "ASSIGNED "
476  members:
477  - definitions:
478  brief: "Vector of assigned variables"
479  type: AssignedDefinition
480  vector: true
481  add: true
482  brief: "Represents a `ASSIGNED` block in the NMODL"
483  description: |
484  The `ASSIGNED` block is used for declaring two kinds of variables :
485  - those that are given values outside the mod files
486  - those that appear on the left hand side of assignment statements within
487  the mod file
488 
489  Below is an example of `ASSIGNED` block in the mod file:
490 
491  \code{.mod}
492  ASSIGNED {
493  ina (mA/cm2)
494  gna (pS/um2)
495  mtau (ms) htau (ms)
496  tadj
497  }
498  \endcode
499 
500  - StateBlock:
501  nmodl: "STATE "
502  members:
503  - definitions:
504  brief: "Vector of state variables"
505  type: AssignedDefinition
506  vector: true
507  brief: "Represents a `STATE` block in the NMODL"
508  description: |
509  If a model involves differential equations, families of algebraic equations,
510  or kinetic reaction schemes, their dependent variables or unknowns are to be
511  listed in the `STATE` block. Below is an example of `STATE`:
512 
513  \code{.mod}
514  STATE {
515  m
516  h
517  }
518  \endcode
519 
520  Note that the state variable specification has form of ast::AssignedDefinition and
521  hence can have associated unit specification.
522 
523  - InitialBlock:
524  nmodl: "INITIAL "
525  members:
526  - statement_block:
527  brief: "Block with statements vector"
528  type: StatementBlock
529  getter: {override: true}
530  brief: "Represents a `INITIAL` block in the NMODL"
531  description: |
532  The code in the `INITIAL` block is executed when the hoc function `finitialize()`
533  is called. Here is an example :
534 
535  \code{.mod}
536  INITIAL {
537  rates(v+vshift)
538  m = minf
539  h = hinf
540  tadj = q10^((celsius - temp)/10)
541  }
542  \endcode
543 
544  - ConstructorBlock:
545  nmodl: "CONSTRUCTOR "
546  members:
547  - statement_block:
548  brief: "Block with statements vector"
549  type: StatementBlock
550  getter: {override: true}
551  brief: "Represents a `CONSTRUCTOR` block in the NMODL"
552  description: |
553  The code in the `CONSTRUCTOR` is called when the channel is instantiated. Like any
554  other global block, `CONSTRUCTOR` block can have any statements. It often used with
555  `VERBATIM` block for initialization purpose :
556 
557  \code{.mod}
558  CONSTRUCTOR {
559  VERBATIM
560  if (ifarg(1)) { id= *getarg(1); } else { id= -1; }
561  ENDVERBATIM
562  }
563  \endcode
564 
565  \sa ast::DestructorBlock
566 
567  - DestructorBlock:
568  nmodl: "DESTRUCTOR "
569  members:
570  - statement_block:
571  brief: "Block with statements vector"
572  type: StatementBlock
573  getter: {override: true}
574  brief: "Represents a `DESTRUCTOR` block in the NMODL"
575  description: |
576  The code in the `DESTRUCTOR` is called when the channel instance is deleted. It often
577  used with `VERBATIM` block for finalization purpose :
578 
579  \code{.mod}
580  DESTRUCTOR {
581  VERBATIM {
582  nsyn = maxsyn = 0;
583  free(PRECAST);
584  link = 0;
585  }
586  ENDVERBATIM
587  }
588  \endcode
589 
590  \sa ast::ConstructorBlock
591 
592  - StatementBlock:
593  members:
594  - statements:
595  brief: "Vector of statements"
596  type: Statement
597  vector: true
598  add: true
599  brief: "Represents block encapsulating list of statements"
600  description: |
601  Statement block is used to hold list of statements between `{ }`. This
602  represents a new block scope in the mod file and has following form :
603 
604  \code{.mod}
605  {
606  statement1
607  {
608  statement2
609  }
610  }
611  \endcode
612 
613  Note that the statement blocks can be nested where inner block will
614  be wrapped as statement with ast::ExpressionStatement.
615 
616  - DerivativeBlock:
617  nmodl: "DERIVATIVE "
618  members:
619  - name:
620  brief: "Name of the derivative block"
621  type: Name
622  node_name: true
623  suffix: {value: " "}
624  - statement_block:
625  brief: "Block with statements vector"
626  type: StatementBlock
627  getter: {override: true}
628  brief: "Represents `DERIVATIVE` block in the NMODL"
629  description: |
630  This block is used to assign values to the derivatives of those
631  `STATE`s that are described by differential equations. The statements
632  in this block are of the form \f$y' = expr\f$. Here is an example :
633 
634  \code{.mod}
635  DERIVATIVE states {
636  rates(v)
637  m' = (minf-m)/mtau
638  h' = (hinf-h)/htau
639  }
640  \endcode
641 
642  - LinearBlock:
643  nmodl: "LINEAR "
644  members:
645  - name:
646  brief: "Name of the linear block"
647  type: Name
648  node_name: true
649  suffix: {value: " "}
650  - solvefor:
651  brief: "TODO"
652  type: Name
653  vector: true
654  separator: ","
655  prefix: {value: " SOLVEFOR "}
656  - statement_block:
657  brief: "Block with statements vector"
658  type: StatementBlock
659  getter: {override: true}
660  brief: "Represents `LINEAR` block in the NMODL"
661  description: |
662 
663  A set of simultaneous equations can be specified in a `LINEAR` block.
664  Here is an example :
665 
666  \code{.mod}
667  LINEAR clamp {
668  LOCAL t1, t2
669  t1 = tau1/dt
670  t2 = tau2/dt
671  ~ vi = v + fac*vo - fac*v
672  ~ t2*vo - t2*vo0 + vo = -gain * e
673  ~ -stim - e + vi - e + t1*vi - t1*e - t1*(vi0 - e0) = 0
674  }
675  \endcode
676 
677  - NonLinearBlock:
678  nmodl: "NONLINEAR "
679  members:
680  - name:
681  brief: "Name of the non-linear block"
682  type: Name
683  node_name: true
684  - solvefor:
685  brief: "Name of the integration method"
686  type: Name
687  vector: true
688  separator: ","
689  prefix: {value: " SOLVEFOR "}
690  suffix: {value: " ", force: true}
691  - statement_block:
692  brief: "Block with statements vector"
693  type: StatementBlock
694  getter: {override: true}
695  brief: "Represents `NONLINEAR` block in the NMODL"
696  description: |
697 
698  A set of simultaneous equations can be specified in a `NONLINEAR` block.
699  Here is an example :
700 
701  \code{.mod}
702  NONLINEAR nonlin {
703  ~ s[0] = 1
704  ~ s[1] = 3
705  ~ s[2] + s[1] = s[0]
706  }
707  \endcode
708 
709  - DiscreteBlock:
710  brief: "TODO"
711  nmodl: "DISCRETE "
712  members:
713  - name:
714  brief: "Name of the discrete block"
715  type: Name
716  node_name: true
717  suffix: {value: " "}
718  - statement_block:
719  brief: "Block with statements vector"
720  type: StatementBlock
721  getter: {override: true}
722 
723  - FunctionTableBlock:
724  brief: "TODO"
725  nmodl: "FUNCTION_TABLE "
726  members:
727  - name:
728  brief: "Name of the function table block"
729  type: Name
730  node_name: true
731  - parameters:
732  brief: "Vector of the parameters"
733  type: Argument
734  vector: true
735  prefix: {value: "(", force: true}
736  suffix: {value: ")", force: true}
737  separator: ", "
738  getter: {override: true}
739  - unit:
740  brief: "Unit if specified"
741  type: Unit
742  optional: true
743  prefix: {value: " "}
744 
745  - FunctionBlock:
746  brief: "TODO"
747  nmodl: "FUNCTION "
748  members:
749  - name:
750  brief: "Name of the function"
751  type: Name
752  node_name: true
753  - parameters:
754  brief: "Vector of the parameters"
755  type: Argument
756  vector: true
757  prefix: {value: "(", force: true}
758  suffix: {value: ")", force: true}
759  separator: ", "
760  getter: {override: true}
761  - unit:
762  brief: "Unit if specified"
763  type: Unit
764  optional: true
765  prefix: {value: " "}
766  suffix: {value: " ", force: true}
767  - statement_block:
768  brief: "Block with statements vector"
769  type: StatementBlock
770  getter: {override: true}
771 
772  - ProcedureBlock:
773  brief: "TODO"
774  nmodl: "PROCEDURE "
775  members:
776  - name:
777  brief: "Name of the procedure"
778  type: Name
779  node_name: true
780  - parameters:
781  brief: "Vector of the parameters"
782  type: Argument
783  vector: true
784  prefix: {value: "(", force: true}
785  suffix: {value: ") ", force: true}
786  separator: ", "
787  getter: {override: true}
788  - unit:
789  brief: "Unit if specified"
790  type: Unit
791  optional: true
792  - statement_block:
793  brief: "Block with statements vector"
794  type: StatementBlock
795  getter: {override: true}
796 
797  - NetReceiveBlock:
798  brief: "TODO"
799  nmodl: "NET_RECEIVE "
800  members:
801  - parameters:
802  brief: "Parameters to the net receive block"
803  type: Argument
804  vector: true
805  prefix: {value: "(", force: true}
806  suffix: {value: ") ", force: true}
807  separator: ", "
808  getter: {override: true}
809  - statement_block:
810  brief: "Block with statements vector"
811  type: StatementBlock
812  getter: {override: true}
813 
814  - SolveBlock:
815  brief: "TODO"
816  nmodl: SOLVE
817  members:
818  - block_name:
819  brief: "Name of the block to solve"
820  type: Name
821  prefix: {value: " "}
822  - method:
823  brief: "Name of the integration method"
824  type: Name
825  optional: true
826  prefix: {value: " METHOD "}
827  - steadystate:
828  brief: "Name of the integration method"
829  type: Name
830  optional: true
831  prefix: {value: " STEADYSTATE "}
832 
833  - BreakpointBlock:
834  nmodl: "BREAKPOINT "
835  members:
836  - statement_block:
837  brief: "Block with statements vector"
838  type: StatementBlock
839  getter: {override: true}
840  brief: "Represents a `BREAKPOINT` block in NMODL"
841  description: |
842  The `BREAKPOINT` block is used to update current and conductance.
843  at each time step. Here is an example of `BREAKPOINT` :
844 
845  \code{.mod}
846  BREAKPOINT {
847  SOLVE states METHOD cnexp
848  gna = gnabar*m*m*m*h
849  ina = gna*(v - ena)
850  gk = gkbar*n*n*n*n
851  ik = gk*(v - ek)
852  il = gl*(v - el)
853  }
854  \endcode
855 
856  \sa ast::DerivativeBlock ast::InitialBlock
857 
858  - BeforeBlock:
859  nmodl: "BEFORE "
860  members:
861  - bablock:
862  brief: "Block to be called before"
863  type: BABlock
864  brief: "Represents a `BEFORE` block in NMODL"
865 
866  - AfterBlock:
867  nmodl: "AFTER "
868  members:
869  - bablock:
870  brief: "Block to be called after"
871  type: BABlock
872  brief: "Represents a `AFTER` block in NMODL"
873  description: |
874  This represents a block to be executed before another block.
875  Here is an example of `BEFORE` :
876 
877  \code{.mod}
878  BEFORE STEP {
879  if (mode==1) {
880  if (ica<imax) {
881  imax = ica
882  timax = t
883  }
884  }
885  }
886  \endcode
887 
888  - BABlock:
889  members:
890  - type:
891  brief: "Type of NMODL block"
892  type: BABlockType
893  suffix: {value: " "}
894  - statement_block:
895  brief: "Block with statements vector"
896  type: StatementBlock
897  getter: {override: true}
898  brief: "Represents a block to be executed before or after another block"
899  description: |
900  This represents a block to be executed before or after another
901  block in NMODL. See ast::BeforeBlock and ast::AfterBlock for usage.
902 
903  - ForNetcon:
904  brief: "TODO"
905  nmodl: "FOR_NETCONS "
906  members:
907  - parameters:
908  brief: "Arguments to the for netcon block"
909  type: Argument
910  vector: true
911  prefix: {value: "(", force: true}
912  suffix: {value: ") ", force: true}
913  separator: ", "
914  getter: {override: true}
915  - statement_block:
916  brief: "Block with statements vector"
917  type: StatementBlock
918  getter: {override: true}
919 
920  - KineticBlock:
921  brief: "TODO"
922  nmodl: "KINETIC "
923  members:
924  - name:
925  brief: "Name of the kinetic block"
926  type: Name
927  node_name: true
928  suffix: {value: " "}
929  - solvefor:
930  brief: "Solve for specification (TODO)"
931  type: Name
932  vector: true
933  separator: ","
934  - statement_block:
935  brief: "Block with statements vector"
936  type: StatementBlock
937  getter: {override: true}
938 
939  - UnitBlock:
940  brief: "TODO"
941  nmodl: "UNITS "
942  members:
943  - definitions:
944  brief: "Vector of unit statements"
945  type: Expression
946  vector: true
947 
948  - ConstantBlock:
949  nmodl: "CONSTANT "
950  members:
951  - statements:
952  brief: "Vector of constant statements"
953  type: ConstantStatement
954  vector: true
955  brief: "Represent `CONSTANT` block in the mod file"
956  description: |
957  Here is an example of `CONSTANT` block in mod file:
958 
959  \code{.mod}
960  CONSTANT {
961  q10 = 3
962 
963  cvm = 28.9 (mV)
964  ckm = 6.2 (mV)
965  ctm = 0.000505 (s)
966  }
967  \endcode
968 
969  - NeuronBlock:
970  nmodl: "NEURON "
971  members:
972  - statement_block:
973  brief: "Block with statements vector"
974  type: StatementBlock
975  getter: {override: true}
976  brief: "Represent `NEURON` block in the mod file"
977  description: |
978  The keyword `NEURON` introduces a special block which contains statements
979  that tell NMODL how to organize the variables for access at the NEURON user
980  level. Here is an example of `NEURON` block from `HH` channel:
981 
982  \code{.mod}
983  NEURON {
984  SUFFIX hh
985  USEION na READ ena WRITE ina
986  USEION k READ ek WRITE ik
987  NONSPECIFIC_CURRENT il
988  RANGE gnabar, gkbar, gl, el, gna, gk
989  RANGE minf, hinf, ninf, mtau, htau, ntau
990  THREADSAFE
991  }
992  \endcode
993 
994  url: "https://www.neuron.yale.edu/neuron/static/py_doc/modelspec/programmatic/mechanisms/nmodl2.html#neuron"
995 
996  - Unit:
997  brief: "TODO"
998  members:
999  - name:
1000  brief: "TODO"
1001  type: String
1002  node_name: true
1003  prefix: {value: "("}
1004  suffix: {value: ")"}
1005 
1006  - DoubleUnit:
1007  brief: "TODO"
1008  members:
1009  - value:
1010  brief: "TODO"
1011  type: Double
1012  - unit:
1013  brief: "TODO"
1014  type: Unit
1015  optional: true
1016 
1017  - LocalVar:
1018  brief: "TODO"
1019  members:
1020  - name:
1021  brief: "TODO"
1022  type: Identifier
1023  node_name: true
1024 
1025  - Limits:
1026  brief: "TODO"
1027  members:
1028  - min:
1029  brief: "TODO"
1030  type: Number
1031  prefix: {value: "<"}
1032  suffix: {value: ","}
1033  - max:
1034  brief: "TODO"
1035  type: Number
1036  suffix: {value: ">"}
1037 
1038  - NumberRange:
1039  brief: "TODO"
1040  members:
1041  - min:
1042  brief: "TODO"
1043  type: Number
1044  prefix: {value: "<"}
1045  suffix: {value: ","}
1046  - max:
1047  brief: "TODO"
1048  type: Number
1049  suffix: {value: ">"}
1050 
1051  - ConstantVar:
1052  members:
1053  - name:
1054  brief: "Name of the variable"
1055  type: Name
1056  node_name: true
1057  - value:
1058  brief: "Value of the constant"
1059  type: Number
1060  prefix: {value: " = "}
1061  - unit:
1062  brief: "Unit for the variable"
1063  type: Unit
1064  optional: true
1065  prefix: {value: " "}
1066  brief: "Represents a variable in the ast::ConstantBlock"
1067 
1068  - BinaryOperator:
1069  members:
1070  - value:
1071  brief: "Operator"
1072  type: BinaryOp
1073  brief: "Operator used in ast::BinaryExpression"
1074 
1075  - UnaryOperator:
1076  brief: "TODO"
1077  members:
1078  - value:
1079  brief: "TODO"
1080  type: UnaryOp
1081 
1082  - ReactionOperator:
1083  brief: "TODO"
1084  members:
1085  - value:
1086  brief: "TODO"
1087  type: ReactionOp
1088 
1089  - ParenExpression:
1090  brief: "TODO"
1091  members:
1092  - expression:
1093  brief: "TODO"
1094  type: Expression
1095  prefix: {value: "("}
1096  suffix: {value: ")"}
1097 
1098  - BinaryExpression:
1099  members:
1100  - lhs:
1101  brief: "LHS of the binary expression"
1102  type: Expression
1103  - op:
1104  brief: "Operator"
1105  type: BinaryOperator
1106  - rhs:
1107  brief: "RHS of the binary expression"
1108  type: Expression
1109  brief: "Represents binary expression in the NMODL"
1110  description: |
1111  Any binary expression in the mod file is represented by this node type.
1112  For example, in below example, there are three binary expressions :
1113 
1114  \code{.mod}
1115  BREAKPOINT {
1116  SOLVE states METHOD cnexp
1117  ina = gna*(v - ena)
1118  }
1119  \endcode
1120 
1121  Note that the statement itself is stored in another type ast::ExpressionStatement.
1122 
1123  \sa ast::ExpressionStatement
1124 
1125  - DiffEqExpression:
1126  brief: "Represents differential equation in DERIVATIVE block"
1127  members:
1128  - expression:
1129  brief: "Differential Expression"
1130  type: BinaryExpression
1131 
1132  - UnaryExpression:
1133  brief: "TODO"
1134  members:
1135  - op:
1136  brief: "TODO"
1137  type: UnaryOperator
1138  - expression:
1139  brief: "TODO"
1140  type: Expression
1141 
1142  - NonLinEquation:
1143  brief: "One equation in a system of equations that collectively make a NONLINEAR block."
1144  nmodl: "~ "
1145  members:
1146  - lhs:
1147  brief: "Left-hand-side of the equation."
1148  type: Expression
1149  suffix: {value: " = "}
1150  - rhs:
1151  brief: "Right-hand-side of the equation."
1152  type: Expression
1153 
1154  - LinEquation:
1155  brief: "One equation in a system of equations tha collectively form a LINEAR block."
1156  nmodl: "~ "
1157  members:
1158  - lhs:
1159  brief: "Left-hand-side of the equation."
1160  type: Expression
1161  suffix: {value: " = "}
1162  - rhs:
1163  brief: "Right-hand-side of the equation."
1164  type: Expression
1165 
1166  - FunctionCall:
1167  brief: "TODO"
1168  members:
1169  - name:
1170  brief: "TODO"
1171  type: Name
1172  node_name: true
1173  - arguments:
1174  brief: "TODO"
1175  type: Expression
1176  vector: true
1177  separator: ", "
1178  prefix: {value: "(", force: true}
1179  suffix: {value: ")", force: true}
1180 
1181  - Watch:
1182  brief: "TODO"
1183  members:
1184  - expression:
1185  brief: "TODO"
1186  type: Expression
1187  prefix: {value: "("}
1188  suffix: {value: ")"}
1189  - value:
1190  brief: "TODO"
1191  type: Expression
1192  prefix: {value: " "}
1193 
1194  - BABlockType:
1195  members:
1196  - value:
1197  brief: "block type"
1198  type: BAType
1199  brief: "Type to represent different block types for before/after block"
1200  description: |
1201  Different NMODL blocks can be used with ast::BeforeBlock and ast::AfterBlock.
1202  This type is used to represent such block types.
1203 
1204  \sa ast::BeforeBlock as::AfterBlock
1205  - UnitDef:
1206  brief: "TODO"
1207  members:
1208  - unit1:
1209  brief: "TODO"
1210  type: Unit
1211  node_name: true
1212  - unit2:
1213  brief: "TODO"
1214  type: Unit
1215  prefix: {value: " = "}
1216  - FactorDef:
1217  brief: "TODO"
1218  members:
1219  - name:
1220  brief: "TODO"
1221  type: Name
1222  node_name: true
1223  suffix: {value: " ="}
1224  - value:
1225  brief: "TODO"
1226  type: Double
1227  optional: true
1228  prefix: {value: " "}
1229  - unit1:
1230  brief: "TODO"
1231  type: Unit
1232  prefix: {value: " "}
1233  - gt:
1234  brief: "Todo: Michael : rename variable gt as well"
1235  type: Boolean
1236  nmodl: " ->"
1237  optional: true
1238  - unit2:
1239  brief: "TODO"
1240  type: Unit
1241  optional: true
1242  prefix: {value: " "}
1243  - Valence:
1244  brief: "TODO"
1245  members:
1246  - type:
1247  type: Name
1248  brief: "TODO"
1249  prefix: {value: " "}
1250  suffix: {value: " "}
1251  - value:
1252  brief: "TODO"
1253  type: Double
1254 
1255  - Statement:
1256  brief: "TODO"
1257  children:
1258  - UnitState:
1259  brief: "TODO"
1260  members:
1261  - value:
1262  brief: "TODO"
1263  type: UnitStateType
1264 
1265  - LocalListStatement:
1266  brief: "TODO"
1267  nmodl: "LOCAL "
1268  members:
1269  - variables:
1270  brief: "TODO"
1271  type: LocalVar
1272  vector: true
1273  separator: ", "
1274  add: true
1275 
1276  - Model:
1277  brief: "TODO"
1278  nmodl: TITLE
1279  members:
1280  - title:
1281  brief: "TODO"
1282  type: String
1283 
1284  - Define:
1285  nmodl: "DEFINE "
1286  members:
1287  - name:
1288  brief: "Name of the macro"
1289  type: Name
1290  node_name: true
1291  - value:
1292  brief: "Value of the macro"
1293  type: Integer
1294  prefix: {value: " "}
1295  brief: "Represents a `DEFINE` statement in NMODL"
1296 
1297  - Include:
1298  brief: "Represents an `INCLUDE` statement in NMODL"
1299  nmodl: "INCLUDE "
1300  members:
1301  - filename:
1302  brief: "path to the file to include"
1303  type: String
1304  - blocks:
1305  brief: "AST of the included file"
1306  type: Node
1307  vector: true
1308 
1309  - ParamAssign:
1310  brief: "TODO"
1311  members:
1312  - name:
1313  brief: "TODO"
1314  type: Identifier
1315  node_name: true
1316  - value:
1317  brief: "TODO"
1318  type: Number
1319  optional: true
1320  prefix: {value: " = "}
1321  - unit:
1322  brief: "TODO"
1323  type: Unit
1324  optional: true
1325  prefix: {value: " "}
1326  - limit:
1327  brief: "TODO"
1328  type: Limits
1329  optional: true
1330  prefix: {value: " "}
1331 
1332  - AssignedDefinition:
1333  members:
1334  - name:
1335  brief: "Name of the variable"
1336  type: Identifier
1337  node_name: true
1338  - length:
1339  brief: "Length in case of array"
1340  type: Integer
1341  optional: true
1342  prefix: {value: "["}
1343  suffix: {value: "]"}
1344  - from:
1345  brief: "TODO"
1346  type: Number
1347  prefix: {value: " FROM "}
1348  optional: true
1349  - to:
1350  brief: "TODO"
1351  type: Number
1352  prefix: {value: " TO "}
1353  optional: true
1354  - start:
1355  brief: "TODO"
1356  type: Number
1357  prefix: {value: " START "}
1358  optional: true
1359  - unit:
1360  brief: "TODO"
1361  type: Unit
1362  optional: true
1363  prefix: {value: " "}
1364  - abstol:
1365  brief: "TODO"
1366  type: Double
1367  prefix: {value: " <"}
1368  suffix: {value: ">"}
1369  optional: true
1370  brief: "Represents a statement in `ASSIGNED` or `STATE` block"
1371 
1372  - ConductanceHint:
1373  nmodl: "CONDUCTANCE "
1374  members:
1375  - conductance:
1376  brief: "Conductance variable"
1377  type: Name
1378  - ion:
1379  brief: "Ion name"
1380  type: Name
1381  optional: true
1382  prefix: {value: " USEION "}
1383  brief: "Represents `CONDUCTANCE` statement in NMODL"
1384  description: |
1385  If `I/V` relation in the `BREAKPOINT` block is ohomic then one can
1386  specify `CONDUCTANCE` hint for optimised code generation:
1387 
1388  \code{.mod}
1389  CONDUCTANCE g USEION I
1390  \endcode
1391 
1392  \sa nmodl::visitor::SympyConductanceVisitor
1393 
1394  - ExpressionStatement:
1395  brief: "TODO"
1396  members:
1397  - expression:
1398  brief: "TODO"
1399  type: Expression
1400 
1401  - ProtectStatement:
1402  brief: "TODO"
1403  nmodl: "PROTECT "
1404  members:
1405  - expression:
1406  brief: "TODO"
1407  type: Expression
1408 
1409  - FromStatement:
1410  brief: "TODO"
1411  nmodl: "FROM "
1412  members:
1413  - name:
1414  brief: "TODO"
1415  type: Name
1416  node_name: true
1417  - from:
1418  brief: "TODO"
1419  type: Expression
1420  prefix: {value: " = "}
1421  - to:
1422  brief: "TODO"
1423  type: Expression
1424  prefix: {value: " TO "}
1425  - increment:
1426  brief: "TODO"
1427  type: Expression
1428  prefix: {value: " BY "}
1429  suffix: {value: " ", force: true}
1430  optional: true
1431  - statement_block:
1432  brief: "TODO"
1433  type: StatementBlock
1434  getter: {override: true}
1435 
1436  - WhileStatement:
1437  brief: "TODO"
1438  nmodl: "WHILE "
1439  members:
1440  - condition:
1441  brief: "TODO"
1442  type: Expression
1443  prefix: {value: "("}
1444  suffix: {value: ") "}
1445  - statement_block:
1446  brief: "TODO"
1447  type: StatementBlock
1448  getter: {override: true}
1449 
1450  - IfStatement:
1451  brief: "TODO"
1452  nmodl: "IF "
1453  members:
1454  - condition:
1455  brief: "TODO"
1456  type: Expression
1457  prefix: {value: "("}
1458  suffix: {value: ") "}
1459  - statement_block:
1460  brief: "TODO"
1461  type: StatementBlock
1462  getter: {override: true}
1463  - elseifs:
1464  brief: "TODO"
1465  type: ElseIfStatement
1466  vector: true
1467  - elses:
1468  brief: "TODO"
1469  type: ElseStatement
1470  optional: true
1471 
1472  - ElseIfStatement:
1473  brief: "TODO"
1474  nmodl: " ELSE IF "
1475  members:
1476  - condition:
1477  brief: "TODO"
1478  type: Expression
1479  prefix: {value: "("}
1480  suffix: {value: ") "}
1481  - statement_block:
1482  brief: "TODO"
1483  type: StatementBlock
1484  getter: {override: true}
1485 
1486  - ElseStatement:
1487  brief: "TODO"
1488  nmodl: " ELSE "
1489  members:
1490  - statement_block:
1491  brief: "TODO"
1492  type: StatementBlock
1493  getter: {override: true}
1494 
1495  - WatchStatement:
1496  nmodl: "WATCH "
1497  members:
1498  - statements:
1499  brief: "Vector of watch statements"
1500  type: Watch
1501  vector: true
1502  separator: ","
1503  add: true
1504  brief: "Represent WATCH statement in NMODL"
1505 
1506  - MutexLock:
1507  nmodl: MUTEXLOCK
1508  brief: "Represent MUTEXLOCK statement in NMODL"
1509 
1510  - MutexUnlock:
1511  nmodl: MUTEXUNLOCK
1512  brief: "Represent MUTEXUNLOCK statement in NMODL"
1513 
1514  - Conserve:
1515  nmodl: CONSERVE
1516  members:
1517  - react:
1518  brief: "TODO"
1519  type: Expression
1520  prefix: {value: " "}
1521  - expr:
1522  brief: "TODO"
1523  type: Expression
1524  prefix: {value: " = "}
1525  brief: "Represent CONSERVE statement in NMODL"
1526 
1527  - Compartment:
1528  nmodl: COMPARTMENT
1529  members:
1530  - index_name:
1531  brief: "Name of the index variable in volume expression"
1532  type: Name
1533  optional: true
1534  prefix: {value: " "}
1535  suffix: {value: ","}
1536  - volume:
1537  brief: "The volume of the compartment"
1538  type: Expression
1539  prefix: {value: " "}
1540  - species:
1541  brief: "The names of the species that reside in this compartment"
1542  type: Name
1543  vector: true
1544  prefix: {value: " {"}
1545  suffix: {value: "}"}
1546  separator: " "
1547  brief: "Represent COMPARTMENT statement in NMODL"
1548 
1549  - LonDiffuse:
1550  nmodl: LONGITUDINAL_DIFFUSION
1551  members:
1552  - index_name:
1553  brief: "Index variable name"
1554  type: Name
1555  optional: true
1556  prefix: {value: " "}
1557  suffix: {value: ","}
1558  - rate:
1559  brief: "Diffusion coefficient/rate"
1560  type: Expression
1561  prefix: {value: " "}
1562  - species:
1563  brief: "Names of the diffusing species"
1564  type: Name
1565  vector: true
1566  prefix: {value: " {"}
1567  suffix: {value: "}"}
1568  separator: " "
1569  brief: "Represent LONGITUDINAL_DIFFUSION statement in NMODL"
1570 
1571 
1572  - ReactionStatement:
1573  brief: "TODO"
1574  nmodl: "~ "
1575  members:
1576  - reaction1:
1577  brief: "TODO"
1578  type: Expression
1579  - op:
1580  brief: "TODO"
1581  type: ReactionOperator
1582  prefix: {value: " "}
1583  - reaction2:
1584  brief: "TODO"
1585  type: Expression
1586  prefix: {value: " "}
1587  optional: true
1588  - expression1:
1589  brief: "TODO"
1590  type: Expression
1591  prefix: {value: " ("}
1592  - expression2:
1593  brief: "TODO"
1594  type: Expression
1595  prefix: {value: ", "}
1596  suffix: {value: ")", force: true}
1597  optional: true
1598 
1599  - LagStatement:
1600  nmodl: "LAG "
1601  members:
1602  - name:
1603  brief: "Name of the variable (TODO)"
1604  type: Identifier
1605  - byname:
1606  brief: "Name of the variable (TODO)"
1607  type: Name
1608  prefix: {value: " BY "}
1609  brief: "Represents a LAG statement in the mod file"
1610  description: |
1611  An example of LAG statement usage:
1612 
1613  \code{.mod}
1614  PROCEDURE lates() {
1615  LAG ina BY tau
1616  neo = lag_ina_tau
1617  if (ena < 70) {ena = 70}
1618  }
1619  \endcode
1620 
1621  - ConstantStatement:
1622  members:
1623  - constant:
1624  brief: "single constant variable"
1625  type: ConstantVar
1626  brief: "Represent statement in CONSTANT block of NMODL"
1627  description: |
1628  \todo As ConstantStatement wraps a single ConstantVar,
1629  this or ast::ConstantVar can be redundant in the future.
1630 
1631  - TableStatement:
1632  nmodl: "TABLE "
1633  members:
1634  - table_vars:
1635  brief: "Variables in the table"
1636  type: Name
1637  vector: true
1638  separator: ","
1639  - depend_vars:
1640  brief: "dependent variables"
1641  type: Name
1642  vector: true
1643  prefix: {value: " DEPEND "}
1644  separator: ","
1645  - from:
1646  brief: "from value"
1647  type: Expression
1648  prefix: {value: " FROM "}
1649  - to:
1650  brief: "to values"
1651  type: Expression
1652  prefix: {value: " TO "}
1653  - with:
1654  brief: "an increment factor"
1655  type: Integer
1656  prefix: {value: " WITH "}
1657  brief: "Represents TABLE statement in NMODL"
1658 
1659  - Suffix:
1660  members:
1661  - type:
1662  brief: "type of channel"
1663  type: Name
1664  suffix: {value: " "}
1665  - name:
1666  brief: "Name of the channel"
1667  type: Name
1668  node_name: true
1669  brief: "Represents SUFFIX statement in NMODL"
1670 
1671  - Useion:
1672  nmodl: "USEION "
1673  members:
1674  - name:
1675  brief: "Name of ion"
1676  type: Name
1677  node_name: true
1678  - readlist:
1679  brief: "Variables being read"
1680  type: ReadIonVar
1681  vector: true
1682  prefix: {value: " READ "}
1683  separator: ", "
1684  - writelist:
1685  brief: "Variables being written"
1686  type: WriteIonVar
1687  vector: true
1688  prefix: {value: " WRITE "}
1689  separator: ", "
1690  - valence:
1691  brief: "(TODO)"
1692  type: Valence
1693  optional: true
1694  - ontology_id:
1695  brief: "Ontology to indicate the chemical ion"
1696  type: String
1697  optional: true
1698  prefix: {value: " REPRESENTS "}
1699  brief: "Represents USEION statement in NMODL"
1700 
1701  - Nonspecific:
1702  nmodl: "NONSPECIFIC_CURRENT "
1703  members:
1704  - currents:
1705  brief: "Vector of non specific variables"
1706  type: NonspecificCurVar
1707  vector: true
1708  separator: ", "
1709  brief: "Represents NONSPECIFIC_CURRENT variables statement in NMODL"
1710 
1711  - ElectrodeCurrent:
1712  nmodl: "ELECTRODE_CURRENT "
1713  members:
1714  - currents:
1715  brief: "Vector of electrode current variables"
1716  type: ElectrodeCurVar
1717  vector: true
1718  separator: ", "
1719  brief: "Represents ELECTRODE_CURRENT variables statement in NMODL"
1720 
1721  - Range:
1722  nmodl: "RANGE "
1723  members:
1724  - variables:
1725  brief: "Vector of range variables"
1726  type: RangeVar
1727  vector: true
1728  separator: ", "
1729  brief: "Represents RANGE variables statement in NMODL"
1730 
1731  - Global:
1732  brief: "TODO"
1733  nmodl: "GLOBAL "
1734  members:
1735  - variables:
1736  brief: "Vector of global variables"
1737  type: GlobalVar
1738  vector: true
1739  add: true
1740  separator: ", "
1741  brief: "Represents GLOBAL statement in NMODL"
1742 
1743  - RandomVarList:
1744  brief: "Represents RANDOM statement in NMODL"
1745  nmodl: "RANDOM "
1746  members:
1747  - variables:
1748  brief: "Vector of random variables"
1749  type: RandomVar
1750  vector: true
1751  separator: ", "
1752  description: |
1753  Here is an example of RANDOM statement
1754 
1755  \code{.mod}
1756  NEURON {
1757  THREADSAFE
1758  POINT_PROCESS NetStim
1759  RANDOM ranvar
1760  \endcode
1761 
1762  - Pointer:
1763  nmodl: "POINTER "
1764  members:
1765  - variables:
1766  brief: "Vector of pointer variables"
1767  type: PointerVar
1768  vector: true
1769  add: true
1770  separator: ", "
1771  brief: "Represents POINTER statement in NMODL"
1772 
1773  - BbcorePointer:
1774  nmodl: "BBCOREPOINTER "
1775  members:
1776  - variables:
1777  brief: "Vector of bbcore pointer variables"
1778  type: BbcorePointerVar
1779  vector: true
1780  separator: ", "
1781  brief: "Represents BBCOREPOINTER statement in NMODL"
1782  description: |
1783  Here is an example of BBCOREPOINTER statement:
1784 
1785  \code{.mod}
1786  NEURON {
1787  THREADSAFE
1788  POINT_PROCESS ProbAMPANMDA_EMS
1789  BBCOREPOINTER rng, data
1790  \endcode
1791 
1792  - External:
1793  nmodl: "EXTERNAL "
1794  members:
1795  - variables:
1796  brief: "Vector of external variables"
1797  type: ExternVar
1798  vector: true
1799  separator: ", "
1800  brief: "This construct is deprecated and no longer supported in the NMODL"
1801 
1802  - ThreadSafe:
1803  nmodl: THREADSAFE
1804  brief: "Represents THREADSAFE statement in NMODL"
1805 
1806  - Verbatim:
1807  brief: "Represents a C code block"
1808  nmodl: VERBATIM
1809  members:
1810  - statement:
1811  brief: "C code as a string"
1812  type: String
1813  suffix: {value: "ENDVERBATIM"}
1814 
1815  - LineComment:
1816  brief: "Represents a one line comment in NMODL"
1817  members:
1818  - statement:
1819  brief: "comment text"
1820  type: String
1821 
1822  - BlockComment:
1823  brief: "Represents a multi-line comment in NMODL"
1824  nmodl: COMMENT
1825  members:
1826  - statement:
1827  brief: "comment text"
1828  type: String
1829  suffix: {value: "ENDCOMMENT"}
1830 
1831  - OntologyStatement:
1832  nmodl: "REPRESENTS "
1833  members:
1834  - ontology_id:
1835  brief: "Ontology name"
1836  type: String
1837  brief: "Represents CURIE information in NMODL"
1838 
1839 - Program:
1840  brief: "Represents top level AST node for whole NMODL input"
1841  members:
1842  - blocks:
1843  brief: "Vector of top level blocks in the mod file"
1844  type: Node
1845  vector: true
1846  add: true
1847  # public: true
void finitialize(void)
Definition: fadvance.cpp:940
#define getarg
Definition: hocdec.h:17
for(i=0;i< n;i++)
int ifarg(int)
Definition: code.cpp:1607