24 if (is_exclude_type(
node.get_node_type())) {
32 if (is_exclude_type(
node.get_node_type())) {
40 if (is_exclude_type(
node.get_node_type())) {
48 if (is_exclude_type(
node.get_node_type())) {
56 if (is_exclude_type(
node.get_node_type())) {
64 if (is_exclude_type(
node.get_node_type())) {
72 if (is_exclude_type(
node.get_node_type())) {
78 printer->add_element(ss.str());
85 if (is_exclude_type(
node.get_node_type())) {
89 if(
node.get_macro() ==
nullptr) {
95 if(
node.get_macro()) {
96 node.get_macro()->accept(*
this);
103 if (is_exclude_type(
node.get_node_type())) {
107 std::stringstream ss;
108 ss << std::setprecision(16);
110 printer->add_element(ss.str());
117 if (is_exclude_type(
node.get_node_type())) {
121 std::stringstream ss;
122 ss << std::setprecision(16);
124 printer->add_element(ss.str());
131 if (is_exclude_type(
node.get_node_type())) {
135 std::stringstream ss;
137 printer->add_element(ss.str());
144 if (is_exclude_type(
node.get_node_type())) {
149 node.get_value()->accept(*
this);
155 if (is_exclude_type(
node.get_node_type())) {
160 node.get_value()->accept(*
this);
164 const std::string symbol(
order,
'\'');
165 printer->add_element(symbol);
171 if (is_exclude_type(
node.get_node_type())) {
176 node.get_name()->accept(*
this);
179 printer->add_element(
"[");
180 node.get_length()->accept(*
this);
181 printer->add_element(
"]");
187 if (is_exclude_type(
node.get_node_type())) {
192 node.get_name()->accept(*
this);
196 printer->add_element(
"@");
197 node.get_at()->accept(*
this);
201 if(
node.get_index()) {
202 printer->add_element(
"[");
203 node.get_index()->accept(*
this);
204 printer->add_element(
"]");
211 if (is_exclude_type(
node.get_node_type())) {
216 node.get_name()->accept(*
this);
219 if(
node.get_unit()) {
220 node.get_unit()->accept(*
this);
227 if (is_exclude_type(
node.get_node_type())) {
232 if(
node.get_value()) {
233 printer->add_element(
" ");
234 node.get_value()->accept(*
this);
238 node.get_name()->accept(*
this);
244 if (is_exclude_type(
node.get_node_type())) {
249 node.get_name()->accept(*
this);
255 if (is_exclude_type(
node.get_node_type())) {
260 node.get_name()->accept(*
this);
266 if (is_exclude_type(
node.get_node_type())) {
271 node.get_name()->accept(*
this);
277 if (is_exclude_type(
node.get_node_type())) {
282 node.get_name()->accept(*
this);
288 if (is_exclude_type(
node.get_node_type())) {
293 node.get_name()->accept(*
this);
299 if (is_exclude_type(
node.get_node_type())) {
304 node.get_name()->accept(*
this);
310 if (is_exclude_type(
node.get_node_type())) {
315 node.get_name()->accept(*
this);
321 if (is_exclude_type(
node.get_node_type())) {
326 node.get_name()->accept(*
this);
332 if (is_exclude_type(
node.get_node_type())) {
337 node.get_name()->accept(*
this);
343 if (is_exclude_type(
node.get_node_type())) {
348 node.get_name()->accept(*
this);
354 if (is_exclude_type(
node.get_node_type())) {
357 printer->add_element(
"PARAMETER ");
359 printer->push_level();
361 visit_element(
node.get_statements(),
"",
false,
true);
364 printer->pop_level();
368 printer->add_element(
": INDEPENDENT block is deprecated and has no effect in the NEURON model. Skipped!");
369 return;
if (is_exclude_type(
node.get_node_type())) {
372 printer->add_element(
"INDEPENDENT ");
374 printer->push_level();
376 visit_element(
node.get_variables(),
" ",
false,
false);
379 printer->pop_level();
383 if (is_exclude_type(
node.get_node_type())) {
386 printer->add_element(
"ASSIGNED ");
388 printer->push_level();
390 visit_element(
node.get_definitions(),
"",
false,
true);
393 printer->pop_level();
397 if (is_exclude_type(
node.get_node_type())) {
400 printer->add_element(
"STATE ");
402 printer->push_level();
404 visit_element(
node.get_definitions(),
"",
false,
true);
407 printer->pop_level();
411 if (is_exclude_type(
node.get_node_type())) {
414 printer->add_element(
"INITIAL ");
417 if(
node.get_statement_block()) {
418 node.get_statement_block()->accept(*
this);
425 if (is_exclude_type(
node.get_node_type())) {
428 printer->add_element(
"CONSTRUCTOR ");
431 if(
node.get_statement_block()) {
432 node.get_statement_block()->accept(*
this);
439 if (is_exclude_type(
node.get_node_type())) {
442 printer->add_element(
"DESTRUCTOR ");
445 if(
node.get_statement_block()) {
446 node.get_statement_block()->accept(*
this);
453 if (is_exclude_type(
node.get_node_type())) {
457 printer->push_level();
459 visit_element(
node.get_statements(),
"",
false,
true);
462 printer->pop_level();
466 if (is_exclude_type(
node.get_node_type())) {
469 printer->add_element(
"DERIVATIVE ");
472 node.get_name()->accept(*
this);
473 printer->add_element(
" ");
476 if(
node.get_statement_block()) {
477 node.get_statement_block()->accept(*
this);
484 if (is_exclude_type(
node.get_node_type())) {
487 printer->add_element(
"LINEAR ");
490 node.get_name()->accept(*
this);
491 printer->add_element(
" ");
494 if (!
node.get_solvefor().empty()) {
495 printer->add_element(
" SOLVEFOR ");
496 visit_element(
node.get_solvefor(),
",",
false,
false);
500 if(
node.get_statement_block()) {
501 node.get_statement_block()->accept(*
this);
508 if (is_exclude_type(
node.get_node_type())) {
511 printer->add_element(
"NONLINEAR ");
514 node.get_name()->accept(*
this);
517 if (!
node.get_solvefor().empty()) {
518 printer->add_element(
" SOLVEFOR ");
519 visit_element(
node.get_solvefor(),
",",
false,
false);
521 printer->add_element(
" ");
523 if(
node.get_statement_block()) {
524 node.get_statement_block()->accept(*
this);
531 if (is_exclude_type(
node.get_node_type())) {
534 printer->add_element(
"DISCRETE ");
537 node.get_name()->accept(*
this);
538 printer->add_element(
" ");
541 if(
node.get_statement_block()) {
542 node.get_statement_block()->accept(*
this);
549 if (is_exclude_type(
node.get_node_type())) {
552 printer->add_element(
"FUNCTION_TABLE ");
555 node.get_name()->accept(*
this);
557 printer->add_element(
"(");
558 visit_element(
node.get_parameters(),
", ",
false,
false);
559 printer->add_element(
")");
561 if(
node.get_unit()) {
562 printer->add_element(
" ");
563 node.get_unit()->accept(*
this);
570 if (is_exclude_type(
node.get_node_type())) {
573 printer->add_element(
"FUNCTION ");
576 node.get_name()->accept(*
this);
578 printer->add_element(
"(");
579 visit_element(
node.get_parameters(),
", ",
false,
false);
580 printer->add_element(
")");
582 if(
node.get_unit()) {
583 printer->add_element(
" ");
584 node.get_unit()->accept(*
this);
586 printer->add_element(
" ");
588 if(
node.get_statement_block()) {
589 node.get_statement_block()->accept(*
this);
596 if (is_exclude_type(
node.get_node_type())) {
599 printer->add_element(
"PROCEDURE ");
602 node.get_name()->accept(*
this);
604 printer->add_element(
"(");
605 visit_element(
node.get_parameters(),
", ",
false,
false);
606 printer->add_element(
") ");
608 if(
node.get_unit()) {
609 node.get_unit()->accept(*
this);
613 if(
node.get_statement_block()) {
614 node.get_statement_block()->accept(*
this);
621 if (is_exclude_type(
node.get_node_type())) {
624 printer->add_element(
"NET_RECEIVE ");
626 printer->add_element(
"(");
627 visit_element(
node.get_parameters(),
", ",
false,
false);
628 printer->add_element(
") ");
630 if(
node.get_statement_block()) {
631 node.get_statement_block()->accept(*
this);
638 if (is_exclude_type(
node.get_node_type())) {
641 printer->add_element(
"SOLVE");
644 printer->add_element(
" ");
645 node.get_block_name()->accept(*
this);
648 if(
node.get_method()) {
649 printer->add_element(
" METHOD ");
650 node.get_method()->accept(*
this);
654 if(
node.get_steadystate()) {
655 printer->add_element(
" STEADYSTATE ");
656 node.get_steadystate()->accept(*
this);
663 if (is_exclude_type(
node.get_node_type())) {
666 printer->add_element(
"BREAKPOINT ");
669 if(
node.get_statement_block()) {
670 node.get_statement_block()->accept(*
this);
677 if (is_exclude_type(
node.get_node_type())) {
680 printer->add_element(
"BEFORE ");
683 node.get_bablock()->accept(*
this);
689 if (is_exclude_type(
node.get_node_type())) {
692 printer->add_element(
"AFTER ");
695 node.get_bablock()->accept(*
this);
701 if (is_exclude_type(
node.get_node_type())) {
706 node.get_type()->accept(*
this);
707 printer->add_element(
" ");
710 if(
node.get_statement_block()) {
711 node.get_statement_block()->accept(*
this);
718 if (is_exclude_type(
node.get_node_type())) {
721 printer->add_element(
"FOR_NETCONS ");
723 printer->add_element(
"(");
724 visit_element(
node.get_parameters(),
", ",
false,
false);
725 printer->add_element(
") ");
727 if(
node.get_statement_block()) {
728 node.get_statement_block()->accept(*
this);
735 if (is_exclude_type(
node.get_node_type())) {
738 printer->add_element(
"KINETIC ");
741 node.get_name()->accept(*
this);
742 printer->add_element(
" ");
745 visit_element(
node.get_solvefor(),
",",
false,
false);
748 if(
node.get_statement_block()) {
749 node.get_statement_block()->accept(*
this);
756 if (is_exclude_type(
node.get_node_type())) {
759 printer->add_element(
"UNITS ");
761 printer->push_level();
763 visit_element(
node.get_definitions(),
"",
false,
true);
766 printer->pop_level();
770 if (is_exclude_type(
node.get_node_type())) {
773 printer->add_element(
"CONSTANT ");
775 printer->push_level();
777 visit_element(
node.get_statements(),
"",
false,
true);
780 printer->pop_level();
784 if (is_exclude_type(
node.get_node_type())) {
787 printer->add_element(
"NEURON ");
790 if(
node.get_statement_block()) {
791 node.get_statement_block()->accept(*
this);
798 if (is_exclude_type(
node.get_node_type())) {
803 printer->add_element(
"(");
804 node.get_name()->accept(*
this);
805 printer->add_element(
")");
811 if (is_exclude_type(
node.get_node_type())) {
816 node.get_value()->accept(*
this);
819 if(
node.get_unit()) {
820 node.get_unit()->accept(*
this);
827 if (is_exclude_type(
node.get_node_type())) {
832 node.get_name()->accept(*
this);
838 if (is_exclude_type(
node.get_node_type())) {
843 printer->add_element(
"<");
844 node.get_min()->accept(*
this);
845 printer->add_element(
",");
848 node.get_max()->accept(*
this);
849 printer->add_element(
">");
855 if (is_exclude_type(
node.get_node_type())) {
860 printer->add_element(
"<");
861 node.get_min()->accept(*
this);
862 printer->add_element(
",");
865 node.get_max()->accept(*
this);
866 printer->add_element(
">");
872 if (is_exclude_type(
node.get_node_type())) {
877 node.get_name()->accept(*
this);
880 printer->add_element(
" = ");
881 node.get_value()->accept(*
this);
884 if(
node.get_unit()) {
885 printer->add_element(
" ");
886 node.get_unit()->accept(*
this);
893 if (is_exclude_type(
node.get_node_type())) {
897 std::stringstream ss;
899 printer->add_element(ss.str());
906 if (is_exclude_type(
node.get_node_type())) {
910 std::stringstream ss;
912 printer->add_element(ss.str());
919 if (is_exclude_type(
node.get_node_type())) {
923 std::stringstream ss;
925 printer->add_element(ss.str());
932 if (is_exclude_type(
node.get_node_type())) {
937 printer->add_element(
"(");
938 node.get_expression()->accept(*
this);
939 printer->add_element(
")");
945 if (is_exclude_type(
node.get_node_type())) {
950 node.get_lhs()->accept(*
this);
953 std::string op =
node.get_op().eval();
954 if(op ==
"=" || op ==
"&&" || op ==
"||" || op ==
"==")
956 printer->add_element(op);
959 node.get_rhs()->accept(*
this);
965 if (is_exclude_type(
node.get_node_type())) {
970 node.get_expression()->accept(*
this);
976 if (is_exclude_type(
node.get_node_type())) {
984 node.get_expression()->accept(*
this);
990 if (is_exclude_type(
node.get_node_type())) {
993 printer->add_element(
"~ ");
996 node.get_lhs()->accept(*
this);
997 printer->add_element(
" = ");
1000 node.get_rhs()->accept(*
this);
1006 if (is_exclude_type(
node.get_node_type())) {
1009 printer->add_element(
"~ ");
1012 node.get_lhs()->accept(*
this);
1013 printer->add_element(
" = ");
1016 node.get_rhs()->accept(*
this);
1022 if (is_exclude_type(
node.get_node_type())) {
1027 node.get_name()->accept(*
this);
1029 printer->add_element(
"(");
1030 visit_element(
node.get_arguments(),
", ",
false,
false);
1031 printer->add_element(
")");
1036 if (is_exclude_type(
node.get_node_type())) {
1041 printer->add_element(
"(");
1042 node.get_expression()->accept(*
this);
1043 printer->add_element(
")");
1046 printer->add_element(
" ");
1047 node.get_value()->accept(*
this);
1053 if (is_exclude_type(
node.get_node_type())) {
1057 std::stringstream ss;
1059 printer->add_element(ss.str());
1066 if (is_exclude_type(
node.get_node_type())) {
1071 node.get_unit1()->accept(*
this);
1074 printer->add_element(
" = ");
1075 node.get_unit2()->accept(*
this);
1081 if (is_exclude_type(
node.get_node_type())) {
1086 node.get_name()->accept(*
this);
1087 printer->add_element(
" =");
1090 if(
node.get_value()) {
1091 printer->add_element(
" ");
1092 node.get_value()->accept(*
this);
1096 printer->add_element(
" ");
1097 node.get_unit1()->accept(*
this);
1101 if(
node.get_gt()->eval()) {
1102 printer->add_element(
" ->");
1107 if(
node.get_unit2()) {
1108 printer->add_element(
" ");
1109 node.get_unit2()->accept(*
this);
1116 if (is_exclude_type(
node.get_node_type())) {
1121 printer->add_element(
" ");
1122 node.get_type()->accept(*
this);
1123 printer->add_element(
" ");
1126 node.get_value()->accept(*
this);
1132 if (is_exclude_type(
node.get_node_type())) {
1136 std::stringstream ss;
1138 printer->add_element(ss.str());
1145 if (is_exclude_type(
node.get_node_type())) {
1148 printer->add_element(
"LOCAL ");
1151 visit_element(
node.get_variables(),
", ",
false,
false);
1157 if (is_exclude_type(
node.get_node_type())) {
1160 printer->add_element(
"TITLE");
1163 node.get_title()->accept(*
this);
1169 if (is_exclude_type(
node.get_node_type())) {
1172 printer->add_element(
"DEFINE ");
1175 node.get_name()->accept(*
this);
1178 printer->add_element(
" ");
1179 node.get_value()->accept(*
this);
1185 if (is_exclude_type(
node.get_node_type())) {
1188 printer->add_element(
"INCLUDE ");
1191 node.get_filename()->accept(*
this);
1200 if (is_exclude_type(
node.get_node_type())) {
1205 node.get_name()->accept(*
this);
1208 if(
node.get_value()) {
1209 printer->add_element(
" = ");
1210 node.get_value()->accept(*
this);
1214 if(
node.get_unit()) {
1215 printer->add_element(
" ");
1216 node.get_unit()->accept(*
this);
1220 if(
node.get_limit()) {
1221 printer->add_element(
" ");
1222 node.get_limit()->accept(*
this);
1229 if (is_exclude_type(
node.get_node_type())) {
1234 node.get_name()->accept(*
this);
1237 if(
node.get_length()) {
1238 printer->add_element(
"[");
1239 node.get_length()->accept(*
this);
1240 printer->add_element(
"]");
1244 if(
node.get_from()) {
1245 printer->add_element(
" FROM ");
1246 node.get_from()->accept(*
this);
1251 printer->add_element(
" TO ");
1252 node.get_to()->accept(*
this);
1256 if(
node.get_start()) {
1257 printer->add_element(
" START ");
1258 node.get_start()->accept(*
this);
1262 if(
node.get_unit()) {
1263 printer->add_element(
" ");
1264 node.get_unit()->accept(*
this);
1268 if(
node.get_abstol()) {
1269 printer->add_element(
" <");
1270 node.get_abstol()->accept(*
this);
1271 printer->add_element(
">");
1278 if (is_exclude_type(
node.get_node_type())) {
1281 printer->add_element(
"CONDUCTANCE ");
1284 node.get_conductance()->accept(*
this);
1287 if(
node.get_ion()) {
1288 printer->add_element(
" USEION ");
1289 node.get_ion()->accept(*
this);
1296 if (is_exclude_type(
node.get_node_type())) {
1301 node.get_expression()->accept(*
this);
1307 if (is_exclude_type(
node.get_node_type())) {
1310 printer->add_element(
"PROTECT ");
1313 node.get_expression()->accept(*
this);
1319 if (is_exclude_type(
node.get_node_type())) {
1322 printer->add_element(
"FROM ");
1325 node.get_name()->accept(*
this);
1328 printer->add_element(
" = ");
1329 node.get_from()->accept(*
this);
1332 printer->add_element(
" TO ");
1333 node.get_to()->accept(*
this);
1336 if(
node.get_increment()) {
1337 printer->add_element(
" BY ");
1338 node.get_increment()->accept(*
this);
1340 printer->add_element(
" ");
1342 if(
node.get_statement_block()) {
1343 node.get_statement_block()->accept(*
this);
1350 if (is_exclude_type(
node.get_node_type())) {
1353 printer->add_element(
"WHILE ");
1356 printer->add_element(
"(");
1357 node.get_condition()->accept(*
this);
1358 printer->add_element(
") ");
1361 if(
node.get_statement_block()) {
1362 node.get_statement_block()->accept(*
this);
1369 if (is_exclude_type(
node.get_node_type())) {
1372 printer->add_element(
"IF ");
1375 printer->add_element(
"(");
1376 node.get_condition()->accept(*
this);
1377 printer->add_element(
") ");
1380 if(
node.get_statement_block()) {
1381 node.get_statement_block()->accept(*
this);
1385 visit_element(
node.get_elseifs(),
"",
false,
false);
1388 if(
node.get_elses()) {
1389 node.get_elses()->accept(*
this);
1396 if (is_exclude_type(
node.get_node_type())) {
1399 printer->add_element(
" ELSE IF ");
1402 printer->add_element(
"(");
1403 node.get_condition()->accept(*
this);
1404 printer->add_element(
") ");
1407 if(
node.get_statement_block()) {
1408 node.get_statement_block()->accept(*
this);
1415 if (is_exclude_type(
node.get_node_type())) {
1418 printer->add_element(
" ELSE ");
1421 if(
node.get_statement_block()) {
1422 node.get_statement_block()->accept(*
this);
1429 if (is_exclude_type(
node.get_node_type())) {
1432 printer->add_element(
"WATCH ");
1435 visit_element(
node.get_statements(),
",",
false,
false);
1441 if (is_exclude_type(
node.get_node_type())) {
1444 printer->add_element(
"MUTEXLOCK");
1450 if (is_exclude_type(
node.get_node_type())) {
1453 printer->add_element(
"MUTEXUNLOCK");
1459 if (is_exclude_type(
node.get_node_type())) {
1462 printer->add_element(
"CONSERVE");
1465 printer->add_element(
" ");
1466 node.get_react()->accept(*
this);
1469 printer->add_element(
" = ");
1470 node.get_expr()->accept(*
this);
1476 if (is_exclude_type(
node.get_node_type())) {
1479 printer->add_element(
"COMPARTMENT");
1482 if(
node.get_index_name()) {
1483 printer->add_element(
" ");
1484 node.get_index_name()->accept(*
this);
1485 printer->add_element(
",");
1489 printer->add_element(
" ");
1490 node.get_volume()->accept(*
this);
1493 if (!
node.get_species().empty()) {
1494 printer->add_element(
" {");
1495 visit_element(
node.get_species(),
" ",
false,
false);
1496 printer->add_element(
"}");
1503 if (is_exclude_type(
node.get_node_type())) {
1506 printer->add_element(
"LONGITUDINAL_DIFFUSION");
1509 if(
node.get_index_name()) {
1510 printer->add_element(
" ");
1511 node.get_index_name()->accept(*
this);
1512 printer->add_element(
",");
1516 printer->add_element(
" ");
1517 node.get_rate()->accept(*
this);
1520 if (!
node.get_species().empty()) {
1521 printer->add_element(
" {");
1522 visit_element(
node.get_species(),
" ",
false,
false);
1523 printer->add_element(
"}");
1530 if (is_exclude_type(
node.get_node_type())) {
1533 printer->add_element(
"~ ");
1536 node.get_reaction1()->accept(*
this);
1539 printer->add_element(
" ");
1543 if(
node.get_reaction2()) {
1544 printer->add_element(
" ");
1545 node.get_reaction2()->accept(*
this);
1549 printer->add_element(
" (");
1550 node.get_expression1()->accept(*
this);
1553 if(
node.get_expression2()) {
1554 printer->add_element(
", ");
1555 node.get_expression2()->accept(*
this);
1557 printer->add_element(
")");
1562 if (is_exclude_type(
node.get_node_type())) {
1565 printer->add_element(
"LAG ");
1568 node.get_name()->accept(*
this);
1571 printer->add_element(
" BY ");
1572 node.get_byname()->accept(*
this);
1578 if (is_exclude_type(
node.get_node_type())) {
1583 node.get_constant()->accept(*
this);
1589 if (is_exclude_type(
node.get_node_type())) {
1592 printer->add_element(
"TABLE ");
1595 visit_element(
node.get_table_vars(),
",",
false,
false);
1598 if (!
node.get_depend_vars().empty()) {
1599 printer->add_element(
" DEPEND ");
1600 visit_element(
node.get_depend_vars(),
",",
false,
false);
1604 printer->add_element(
" FROM ");
1605 node.get_from()->accept(*
this);
1608 printer->add_element(
" TO ");
1609 node.get_to()->accept(*
this);
1612 printer->add_element(
" WITH ");
1613 node.get_with()->accept(*
this);
1619 if (is_exclude_type(
node.get_node_type())) {
1624 node.get_type()->accept(*
this);
1625 printer->add_element(
" ");
1628 node.get_name()->accept(*
this);
1634 if (is_exclude_type(
node.get_node_type())) {
1637 printer->add_element(
"USEION ");
1640 node.get_name()->accept(*
this);
1643 if (!
node.get_readlist().empty()) {
1644 printer->add_element(
" READ ");
1645 visit_element(
node.get_readlist(),
", ",
false,
false);
1649 if (!
node.get_writelist().empty()) {
1650 printer->add_element(
" WRITE ");
1651 visit_element(
node.get_writelist(),
", ",
false,
false);
1655 if(
node.get_valence()) {
1656 node.get_valence()->accept(*
this);
1660 if(
node.get_ontology_id()) {
1661 printer->add_element(
" REPRESENTS ");
1662 node.get_ontology_id()->accept(*
this);
1669 if (is_exclude_type(
node.get_node_type())) {
1672 printer->add_element(
"NONSPECIFIC_CURRENT ");
1675 visit_element(
node.get_currents(),
", ",
false,
false);
1681 if (is_exclude_type(
node.get_node_type())) {
1684 printer->add_element(
"ELECTRODE_CURRENT ");
1687 visit_element(
node.get_currents(),
", ",
false,
false);
1693 if (is_exclude_type(
node.get_node_type())) {
1696 printer->add_element(
"RANGE ");
1699 visit_element(
node.get_variables(),
", ",
false,
false);
1705 if (is_exclude_type(
node.get_node_type())) {
1708 printer->add_element(
"GLOBAL ");
1711 visit_element(
node.get_variables(),
", ",
false,
false);
1717 if (is_exclude_type(
node.get_node_type())) {
1720 printer->add_element(
"RANDOM ");
1723 visit_element(
node.get_variables(),
", ",
false,
false);
1729 if (is_exclude_type(
node.get_node_type())) {
1732 printer->add_element(
"POINTER ");
1735 visit_element(
node.get_variables(),
", ",
false,
false);
1741 if (is_exclude_type(
node.get_node_type())) {
1744 printer->add_element(
"BBCOREPOINTER ");
1747 visit_element(
node.get_variables(),
", ",
false,
false);
1753 if (is_exclude_type(
node.get_node_type())) {
1756 printer->add_element(
"EXTERNAL ");
1759 visit_element(
node.get_variables(),
", ",
false,
false);
1765 if (is_exclude_type(
node.get_node_type())) {
1768 printer->add_element(
"THREADSAFE");
1774 if (is_exclude_type(
node.get_node_type())) {
1777 printer->add_element(
"VERBATIM");
1780 node.get_statement()->accept(*
this);
1781 printer->add_element(
"ENDVERBATIM");
1787 if (is_exclude_type(
node.get_node_type())) {
1792 node.get_statement()->accept(*
this);
1798 if (is_exclude_type(
node.get_node_type())) {
1801 printer->add_element(
"COMMENT");
1804 node.get_statement()->accept(*
this);
1805 printer->add_element(
"ENDCOMMENT");
1811 if (is_exclude_type(
node.get_node_type())) {
1814 printer->add_element(
"REPRESENTS ");
1817 node.get_ontology_id()->accept(*
this);
1823 if (is_exclude_type(
node.get_node_type())) {
1828 visit_element(
node.get_blocks(),
"",
true,
false);
1834 if (is_exclude_type(
node.get_node_type())) {
1837 printer->add_element(
"NRN_STATE ");
1840 visit_element(
node.get_solve_statements(),
"",
false,
true);
1846 if (is_exclude_type(
node.get_node_type())) {
1849 printer->add_element(
"EIGEN_NEWTON_SOLVE");
1852 printer->add_element(
"[");
1853 node.get_n_state_vars()->accept(*
this);
1854 printer->add_element(
"]");
1857 if(
node.get_variable_block()) {
1858 node.get_variable_block()->accept(*
this);
1862 if(
node.get_initialize_block()) {
1863 node.get_initialize_block()->accept(*
this);
1867 if(
node.get_setup_x_block()) {
1868 node.get_setup_x_block()->accept(*
this);
1872 if(
node.get_functor_block()) {
1873 node.get_functor_block()->accept(*
this);
1877 if(
node.get_update_states_block()) {
1878 node.get_update_states_block()->accept(*
this);
1882 if(
node.get_finalize_block()) {
1883 node.get_finalize_block()->accept(*
this);
1890 if (is_exclude_type(
node.get_node_type())) {
1893 printer->add_element(
"EIGEN_LINEAR_SOLVE");
1896 printer->add_element(
"[");
1897 node.get_n_state_vars()->accept(*
this);
1898 printer->add_element(
"]");
1901 if(
node.get_variable_block()) {
1902 node.get_variable_block()->accept(*
this);
1906 if(
node.get_initialize_block()) {
1907 node.get_initialize_block()->accept(*
this);
1911 if(
node.get_setup_x_block()) {
1912 node.get_setup_x_block()->accept(*
this);
1916 if(
node.get_update_states_block()) {
1917 node.get_update_states_block()->accept(*
this);
1921 if(
node.get_finalize_block()) {
1922 node.get_finalize_block()->accept(*
this);
1929 if (is_exclude_type(
node.get_node_type())) {
1932 printer->add_element(
"CVODE_BLOCK ");
1935 node.get_name()->accept(*
this);
1936 printer->add_element(
" ");
1939 printer->add_element(
"[");
1940 node.get_n_odes()->accept(*
this);
1941 printer->add_element(
"]");
1944 if(
node.get_non_stiff_block()) {
1945 node.get_non_stiff_block()->accept(*
this);
1949 if(
node.get_stiff_block()) {
1950 node.get_stiff_block()->accept(*
this);
1957 if (is_exclude_type(
node.get_node_type())) {
1960 printer->add_element(
"LONGITUDINAL_DIFFUSION_BLOCK");
1963 printer->add_element(
" ");
1964 node.get_name()->accept(*
this);
1965 printer->add_element(
" ");
1968 if(
node.get_longitudinal_diffusion_statements()) {
1969 node.get_longitudinal_diffusion_statements()->accept(*
this);
1973 if(
node.get_compartment_statements()) {
1974 node.get_compartment_statements()->accept(*
this);
1981 if (is_exclude_type(
node.get_node_type())) {
1986 node.get_expression()->accept(*
this);
1992 if (is_exclude_type(
node.get_node_type())) {
1997 node.get_node_to_solve()->accept(*
this);
2003 if (is_exclude_type(
node.get_node_type())) {
2008 node.get_solve_block()->accept(*
this);
2011 node.get_node_to_solve()->accept(*
this);
2017 if (is_exclude_type(
node.get_node_type())) {
2020 printer->add_element(
"dt");
2023 printer->add_element(
" = ");
2024 node.get_value()->accept(*
this);
Auto generated AST classes declaration.
Represents a AFTER block in NMODL.
Represents an argument to functions and procedures.
Represents a ASSIGNED block in the NMODL.
Represents a statement in ASSIGNED or STATE block.
Represents a block to be executed before or after another block.
Type to represent different block types for before/after block.
Represents BBCOREPOINTER statement in NMODL.
Represent a single variable of type BBCOREPOINTER.
Represents a BEFORE block in NMODL.
Represents binary expression in the NMODL.
Operator used in ast::BinaryExpression.
Base class for all block scoped nodes.
Represents a boolean variable.
Represents a BREAKPOINT block in NMODL.
Represent COMPARTMENT statement in NMODL.
Represents CONDUCTANCE statement in NMODL.
Represent CONSERVE statement in NMODL.
Represent CONSTANT block in the mod file.
Represent statement in CONSTANT block of NMODL.
Represents a variable in the ast::ConstantBlock.
Represents a CONSTRUCTOR block in the NMODL.
Represents a block used for variable timestep integration (CVODE) of DERIVATIVE blocks.
Represents a DEFINE statement in NMODL.
Represents DERIVATIVE block in the NMODL.
Represent a callback to NEURON's derivimplicit solver.
Represents a DESTRUCTOR block in the NMODL.
Represents differential equation in DERIVATIVE block.
Represents a double variable.
Represent linear solver solution block based on Eigen.
Represent newton solver solution block based on Eigen.
Represents ELECTRODE_CURRENT variables statement in NMODL.
Base class for all expressions in the NMODL.
This construct is deprecated and no longer supported in the NMODL.
Represents a float variable.
Represents GLOBAL statement in NMODL.
Base class for all identifiers.
Represents an INCLUDE statement in NMODL.
Represents a INDEPENDENT block in the NMODL.
Represents specific element of an array variable.
Represents a INITIAL block in the NMODL.
Represents an integer variable.
Represents a LAG statement in the mod file.
One equation in a system of equations tha collectively form a LINEAR block.
Represents LINEAR block in the NMODL.
Represent LONGITUDINAL_DIFFUSION statement in NMODL.
Extracts information required for LONGITUDINAL_DIFFUSION for each KINETIC block.
Represent MUTEXLOCK statement in NMODL.
Represent MUTEXUNLOCK statement in NMODL.
Represent NEURON block in the mod file.
Base class for all AST node.
One equation in a system of equations that collectively make a NONLINEAR block.
Represents NONLINEAR block in the NMODL.
Represents NONSPECIFIC_CURRENT variables statement in NMODL.
Represents the coreneuron nrn_state callback function.
Base class for all numbers.
Represents CURIE information in NMODL.
Represents a PARAMETER block in the NMODL.
Represents POINTER statement in NMODL.
Represents a prime variable (for ODE)
Represents top level AST node for whole NMODL input.
Single variable of type RANDOM.
Represents RANDOM statement in NMODL.
Represents RANGE variables statement in NMODL.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Represent solution of a block in the AST.
Represents a STATE block in the NMODL.
Represents block encapsulating list of statements.
Represents SUFFIX statement in NMODL.
Represents TABLE statement in NMODL.
Represents THREADSAFE statement in NMODL.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Statement to indicate a change in timestep in a given block.
Represents USEION statement in NMODL.
Represents a C code block.
Represent WATCH statement in NMODL.
Wrap any other expression type.
void visit_bbcore_pointer_var(const ast::BbcorePointerVar &node) override
visit node of type ast::BbcorePointerVar
void visit_define(const ast::Define &node) override
visit node of type ast::Define
void visit_expression(const ast::Expression &node) override
visit node of type ast::Expression
void visit_electrode_current(const ast::ElectrodeCurrent &node) override
visit node of type ast::ElectrodeCurrent
void visit_double(const ast::Double &node) override
visit node of type ast::Double
void visit_string(const ast::String &node) override
visit node of type ast::String
void visit_nonspecific(const ast::Nonspecific &node) override
visit node of type ast::Nonspecific
void visit_initial_block(const ast::InitialBlock &node) override
visit node of type ast::InitialBlock
void visit_protect_statement(const ast::ProtectStatement &node) override
visit node of type ast::ProtectStatement
void visit_random_var_list(const ast::RandomVarList &node) override
visit node of type ast::RandomVarList
void visit_read_ion_var(const ast::ReadIonVar &node) override
visit node of type ast::ReadIonVar
void visit_function_block(const ast::FunctionBlock &node) override
visit node of type ast::FunctionBlock
void visit_conserve(const ast::Conserve &node) override
visit node of type ast::Conserve
void visit_constant_statement(const ast::ConstantStatement &node) override
visit node of type ast::ConstantStatement
void visit_ba_block_type(const ast::BABlockType &node) override
visit node of type ast::BABlockType
void visit_while_statement(const ast::WhileStatement &node) override
visit node of type ast::WhileStatement
void visit_thread_safe(const ast::ThreadSafe &node) override
visit node of type ast::ThreadSafe
void visit_binary_operator(const ast::BinaryOperator &node) override
visit node of type ast::BinaryOperator
void visit_derivative_block(const ast::DerivativeBlock &node) override
visit node of type ast::DerivativeBlock
void visit_verbatim(const ast::Verbatim &node) override
visit node of type ast::Verbatim
void visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) override
visit node of type ast::EigenNewtonSolverBlock
void visit_random_var(const ast::RandomVar &node) override
visit node of type ast::RandomVar
void visit_mutex_unlock(const ast::MutexUnlock &node) override
visit node of type ast::MutexUnlock
void visit_unit_block(const ast::UnitBlock &node) override
visit node of type ast::UnitBlock
void visit_nonspecific_cur_var(const ast::NonspecificCurVar &node) override
visit node of type ast::NonspecificCurVar
void visit_conductance_hint(const ast::ConductanceHint &node) override
visit node of type ast::ConductanceHint
void visit_breakpoint_block(const ast::BreakpointBlock &node) override
visit node of type ast::BreakpointBlock
void visit_integer(const ast::Integer &node) override
visit node of type ast::Integer
void visit_ontology_statement(const ast::OntologyStatement &node) override
visit node of type ast::OntologyStatement
void visit_react_var_name(const ast::ReactVarName &node) override
visit node of type ast::ReactVarName
void visit_number(const ast::Number &node) override
visit node of type ast::Number
void visit_suffix(const ast::Suffix &node) override
visit node of type ast::Suffix
void visit_compartment(const ast::Compartment &node) override
visit node of type ast::Compartment
void visit_kinetic_block(const ast::KineticBlock &node) override
visit node of type ast::KineticBlock
void visit_indexed_name(const ast::IndexedName &node) override
visit node of type ast::IndexedName
void visit_identifier(const ast::Identifier &node) override
visit node of type ast::Identifier
void visit_paren_expression(const ast::ParenExpression &node) override
visit node of type ast::ParenExpression
void visit_before_block(const ast::BeforeBlock &node) override
visit node of type ast::BeforeBlock
void visit_watch_statement(const ast::WatchStatement &node) override
visit node of type ast::WatchStatement
void visit_bbcore_pointer(const ast::BbcorePointer &node) override
visit node of type ast::BbcorePointer
void visit_unit_state(const ast::UnitState &node) override
visit node of type ast::UnitState
void visit_after_block(const ast::AfterBlock &node) override
visit node of type ast::AfterBlock
void visit_write_ion_var(const ast::WriteIonVar &node) override
visit node of type ast::WriteIonVar
void visit_update_dt(const ast::UpdateDt &node) override
visit node of type ast::UpdateDt
void visit_lin_equation(const ast::LinEquation &node) override
visit node of type ast::LinEquation
void visit_argument(const ast::Argument &node) override
visit node of type ast::Argument
void visit_statement_block(const ast::StatementBlock &node) override
visit node of type ast::StatementBlock
void visit_factor_def(const ast::FactorDef &node) override
visit node of type ast::FactorDef
void visit_include(const ast::Include &node) override
visit node of type ast::Include
void visit_float(const ast::Float &node) override
visit node of type ast::Float
void visit_function_call(const ast::FunctionCall &node) override
visit node of type ast::FunctionCall
void visit_block(const ast::Block &node) override
visit node of type ast::Block
void visit_node(const ast::Node &node) override
visit node of type ast::Node
void visit_else_statement(const ast::ElseStatement &node) override
visit node of type ast::ElseStatement
void visit_program(const ast::Program &node) override
visit node of type ast::Program
void visit_external(const ast::External &node) override
visit node of type ast::External
void visit_unary_operator(const ast::UnaryOperator &node) override
visit node of type ast::UnaryOperator
void visit_var_name(const ast::VarName &node) override
visit node of type ast::VarName
void visit_for_netcon(const ast::ForNetcon &node) override
visit node of type ast::ForNetcon
void visit_constant_var(const ast::ConstantVar &node) override
visit node of type ast::ConstantVar
void visit_nrn_state_block(const ast::NrnStateBlock &node) override
visit node of type ast::NrnStateBlock
void visit_binary_expression(const ast::BinaryExpression &node) override
visit node of type ast::BinaryExpression
void visit_global_var(const ast::GlobalVar &node) override
visit node of type ast::GlobalVar
void visit_solve_block(const ast::SolveBlock &node) override
visit node of type ast::SolveBlock
void visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node) override
visit node of type ast::EigenLinearSolverBlock
void visit_lon_diffuse(const ast::LonDiffuse &node) override
visit node of type ast::LonDiffuse
void visit_pointer_var(const ast::PointerVar &node) override
visit node of type ast::PointerVar
void visit_solution_expression(const ast::SolutionExpression &node) override
visit node of type ast::SolutionExpression
void visit_global(const ast::Global &node) override
visit node of type ast::Global
void visit_unit_def(const ast::UnitDef &node) override
visit node of type ast::UnitDef
void visit_local_var(const ast::LocalVar &node) override
visit node of type ast::LocalVar
void visit_unit(const ast::Unit &node) override
visit node of type ast::Unit
void visit_if_statement(const ast::IfStatement &node) override
visit node of type ast::IfStatement
void visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) override
visit node of type ast::DerivimplicitCallback
void visit_assigned_definition(const ast::AssignedDefinition &node) override
visit node of type ast::AssignedDefinition
void visit_name(const ast::Name &node) override
visit node of type ast::Name
void visit_block_comment(const ast::BlockComment &node) override
visit node of type ast::BlockComment
void visit_from_statement(const ast::FromStatement &node) override
visit node of type ast::FromStatement
void visit_range(const ast::Range &node) override
visit node of type ast::Range
void visit_ba_block(const ast::BABlock &node) override
visit node of type ast::BABlock
void visit_reaction_statement(const ast::ReactionStatement &node) override
visit node of type ast::ReactionStatement
void visit_neuron_block(const ast::NeuronBlock &node) override
visit node of type ast::NeuronBlock
void visit_local_list_statement(const ast::LocalListStatement &node) override
visit node of type ast::LocalListStatement
void visit_extern_var(const ast::ExternVar &node) override
visit node of type ast::ExternVar
void visit_range_var(const ast::RangeVar &node) override
visit node of type ast::RangeVar
void visit_prime_name(const ast::PrimeName &node) override
visit node of type ast::PrimeName
void visit_double_unit(const ast::DoubleUnit &node) override
visit node of type ast::DoubleUnit
void visit_useion(const ast::Useion &node) override
visit node of type ast::Useion
void visit_procedure_block(const ast::ProcedureBlock &node) override
visit node of type ast::ProcedureBlock
void visit_unary_expression(const ast::UnaryExpression &node) override
visit node of type ast::UnaryExpression
void visit_line_comment(const ast::LineComment &node) override
visit node of type ast::LineComment
void visit_non_linear_block(const ast::NonLinearBlock &node) override
visit node of type ast::NonLinearBlock
void visit_constant_block(const ast::ConstantBlock &node) override
visit node of type ast::ConstantBlock
void visit_linear_block(const ast::LinearBlock &node) override
visit node of type ast::LinearBlock
void visit_non_lin_equation(const ast::NonLinEquation &node) override
visit node of type ast::NonLinEquation
void visit_destructor_block(const ast::DestructorBlock &node) override
visit node of type ast::DestructorBlock
void visit_wrapped_expression(const ast::WrappedExpression &node) override
visit node of type ast::WrappedExpression
void visit_valence(const ast::Valence &node) override
visit node of type ast::Valence
void visit_watch(const ast::Watch &node) override
visit node of type ast::Watch
void visit_longitudinal_diffusion_block(const ast::LongitudinalDiffusionBlock &node) override
visit node of type ast::LongitudinalDiffusionBlock
void visit_param_block(const ast::ParamBlock &node) override
visit node of type ast::ParamBlock
void visit_cvode_block(const ast::CvodeBlock &node) override
visit node of type ast::CvodeBlock
void visit_number_range(const ast::NumberRange &node) override
visit node of type ast::NumberRange
void visit_function_table_block(const ast::FunctionTableBlock &node) override
visit node of type ast::FunctionTableBlock
void visit_net_receive_block(const ast::NetReceiveBlock &node) override
visit node of type ast::NetReceiveBlock
void visit_electrode_cur_var(const ast::ElectrodeCurVar &node) override
visit node of type ast::ElectrodeCurVar
void visit_diff_eq_expression(const ast::DiffEqExpression &node) override
visit node of type ast::DiffEqExpression
void visit_limits(const ast::Limits &node) override
visit node of type ast::Limits
void visit_else_if_statement(const ast::ElseIfStatement &node) override
visit node of type ast::ElseIfStatement
void visit_reaction_operator(const ast::ReactionOperator &node) override
visit node of type ast::ReactionOperator
void visit_statement(const ast::Statement &node) override
visit node of type ast::Statement
void visit_mutex_lock(const ast::MutexLock &node) override
visit node of type ast::MutexLock
void visit_assigned_block(const ast::AssignedBlock &node) override
visit node of type ast::AssignedBlock
void visit_model(const ast::Model &node) override
visit node of type ast::Model
void visit_independent_block(const ast::IndependentBlock &node) override
visit node of type ast::IndependentBlock
void visit_state_block(const ast::StateBlock &node) override
visit node of type ast::StateBlock
void visit_lag_statement(const ast::LagStatement &node) override
visit node of type ast::LagStatement
void visit_expression_statement(const ast::ExpressionStatement &node) override
visit node of type ast::ExpressionStatement
void visit_constructor_block(const ast::ConstructorBlock &node) override
visit node of type ast::ConstructorBlock
void visit_boolean(const ast::Boolean &node) override
visit node of type ast::Boolean
void visit_table_statement(const ast::TableStatement &node) override
visit node of type ast::TableStatement
void visit_pointer(const ast::Pointer &node) override
visit node of type ast::Pointer
void visit_discrete_block(const ast::DiscreteBlock &node) override
visit node of type ast::DiscreteBlock
void visit_param_assign(const ast::ParamAssign &node) override
visit node of type ast::ParamAssign
static double order(void *v)
std::string to_string(const T &obj)
encapsulates code generation backend implementations
THIS FILE IS GENERATED AT BUILD TIME AND SHALL NOT BE EDITED.
static Node * node(Object *)