Change m2 lexical analysis to optionally consume C comments.
This patch allows a subsequent patch to turn on/off the consuming
of C comments.
gcc/m2/ChangeLog:
* m2.flex (cpreprocessor): Add temporary variable
which is initialized to 0.
(commentCLevel): New variable.
(endOfCComment): New function.
(splitSlashStar): New function to split /* into / and *
tokens.
(COMMENTC): New flex state.
("/*"): New rule to test whether we should treat /*
as a single token or as two tokens.
(<COMMENTC>.): New rule to skip a character.
(<COMMENTC>\n.*): New rule to consume the line.
(<COMMENTC>"*/"): New rule to call endOfCComment.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>