diff --git a/data/test.mod b/data/test.mod index 9ab7868500498e2232327d7ec17fbda32ae3dc21..d7403c791f390dacf899fe6a32429ad4b5f4096d 100644 --- a/data/test.mod +++ b/data/test.mod @@ -1,4 +1,5 @@ : sample file +? another style of comments NEURON { THREADSAFE @@ -26,7 +27,7 @@ PARAMETER { gkbar = 0.1 (mho/cm2) celsius ek = -100 (mV) : must be explicitly def. in hoc - v (mV) + v (mV) ? another style of comment vhalfm =-43 (mV) km =8 vhalfh =-67 (mV) diff --git a/modcc/lexer.cpp b/modcc/lexer.cpp index b4b8ccf936b7d028f79353afbbb4c05864c4478b..ea371d104ea9c283a3dd47ca73636da18b2a7b65 100644 --- a/modcc/lexer.cpp +++ b/modcc/lexer.cpp @@ -78,8 +78,9 @@ Token Lexer::parse() { location_.line++; continue; // skip to next line - // comment (everything after : on a line is a comment) - case ':' : + // comment (everything after : or ? on a line is a comment) + case ':' : + case '?' : // strip characters until either end of file or end of line while( !is_eof(*current_) && *current_ != '\n') { ++current_;