summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'frontend')
-rw-r--r--frontend/lexer.mll6
1 files changed, 6 insertions, 0 deletions
diff --git a/frontend/lexer.mll b/frontend/lexer.mll
index ef40aa7..837ee75 100644
--- a/frontend/lexer.mll
+++ b/frontend/lexer.mll
@@ -88,6 +88,7 @@ rule token = parse
| const_real as c { REALVAL c }
(* spaces, comments *)
| "(*" { comment lexbuf; token lexbuf }
+ | "/*" { cppcomment lexbuf; token lexbuf }
| "--" [^ '\n' '\r']* { token lexbuf }
| newline { new_line lexbuf; token lexbuf }
| space { token lexbuf }
@@ -98,3 +99,8 @@ and comment = parse
| "*)" { () }
| [^ '\n' '\r'] { comment lexbuf }
| newline { new_line lexbuf; comment lexbuf }
+
+and cppcomment = parse
+ | "*/" { () }
+ | [^ '\n' '\r'] { cppcomment lexbuf }
+ | newline { new_line lexbuf; cppcomment lexbuf }