Index: mttroot/mtt/cc/parse_m2cc.cc ================================================================== --- mttroot/mtt/cc/parse_m2cc.cc +++ mttroot/mtt/cc/parse_m2cc.cc @@ -1,7 +1,10 @@ /* $Id$ * $Log$ + * Revision 1.3 2001/07/13 04:54:04 geraint + * Branch merge: numerical-algebraic-solution back to main. + * * Revision 1.2.2.1 2001/06/30 03:26:17 geraint * gcc-3.0 compatibility. * * Revision 1.2 2001/03/19 02:28:53 geraint * Branch merge: merging-ode2odes-exe back to MAIN. @@ -302,10 +305,11 @@ } cout << buf; } buf = ""; break; + case ';': case '\n': if (keyword [buf]) { /* * keyword found, call function @@ -325,10 +329,35 @@ << indent () << ';' << endl << indent (); } buf = ""; break; + case '#': + if (keyword [buf]) + { + /* + * keyword found, call function + */ + keyword [buf] (); + } + else + { + cout << buf + /* + * keep newline in case this line has an EOL-comment + */ + << endl + /* + * EOL is end-of-statement in Octave, add ; + */ + << indent () << ';' << endl + << indent (); + } + keyword ["#"] (); + buf = ""; + break; + case '\\': cin >> c; if ('\n' == c) { buf += '\n';