diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2023-01-24 19:21:20 +0000 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2023-01-24 19:21:20 +0000 |
commit | 96fd01679011379d6da0777e435078212c6bb325 (patch) | |
tree | 8f0b186c25fc0f5f613607158b9f673c20b3f3b0 /gcc/gcc.cc | |
parent | b061fc94d70dc82f554eeb94434cf03cd5af03f7 (diff) | |
download | gcc-96fd01679011379d6da0777e435078212c6bb325.zip gcc-96fd01679011379d6da0777e435078212c6bb325.tar.gz gcc-96fd01679011379d6da0777e435078212c6bb325.tar.bz2 |
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>
Diffstat (limited to 'gcc/gcc.cc')
0 files changed, 0 insertions, 0 deletions