allow '//' comments in xspice code models
This commit is contained in:
parent
d18caa4fe1
commit
b6aef04d26
|
|
@ -1,3 +1,9 @@
|
|||
2011-08-07 Robert Larice
|
||||
* src/xspice/cmpp/mod_lex.l :
|
||||
allow '//' comments in xspice code models
|
||||
Bugs item #3387331 `Be careful when using "//" in codemodel sources'
|
||||
https://sourceforge.net/tracker/?func=detail&atid=423915&aid=3387331&group_id=38962
|
||||
|
||||
2011-08-07 Robert Larice
|
||||
* src/frontend/shyu.c :
|
||||
fix a `strict-aliasing' warning
|
||||
|
|
|
|||
|
|
@ -71,6 +71,23 @@ Z [0-9A-Za-z_]
|
|||
} while (!((last_ch == '*') && (ch == '/')));
|
||||
}
|
||||
|
||||
"//" {int ch;
|
||||
ECHO; /* a comment - repeat it */
|
||||
do {
|
||||
#ifdef __cplusplus
|
||||
ch = yyinput();
|
||||
#else
|
||||
ch = input();
|
||||
#endif
|
||||
if(ch == EOF) {
|
||||
mod_yyerror ("Unterminated comment");
|
||||
break;
|
||||
}
|
||||
|
||||
fputc(ch, mod_yyout);
|
||||
} while (ch != '\n');
|
||||
}
|
||||
|
||||
ARGS {return TOK_ARGS;}
|
||||
INIT {return TOK_INIT;}
|
||||
ANALYSIS {return TOK_ANALYSIS;}
|
||||
|
|
|
|||
Loading…
Reference in New Issue