THRIFT-3501 Forward slash in comment causes compiler error
Client: Compiler (general)
Patch: Jens Geyer
diff --git a/compiler/cpp/src/thriftl.ll b/compiler/cpp/src/thriftl.ll
index e3cf3e0..93ebc8e 100644
--- a/compiler/cpp/src/thriftl.ll
+++ b/compiler/cpp/src/thriftl.ll
@@ -111,8 +111,8 @@
 identifier    ([a-zA-Z_](\.[a-zA-Z_0-9]|[a-zA-Z_0-9])*)
 whitespace    ([ \t\r\n]*)
 sillycomm     ("/*""*"*"*/")
-multicomm     ("/*"[^*]"/"*([^*/]|[^*]"/"|"*"[^/])*"*"*"*/")
-doctext       ("/**"([^*/]|[^*]"/"|"*"[^/])*"*"*"*/")
+multicomm     ("/*"[^*]([^*]|"*"[^/])*"*/")
+doctext       ("/**"([^*]|"*"[^/])*"*/")
 comment       ("//"[^\n]*)
 unixcomment   ("#"[^\n]*)
 symbol        ([:;\,\{\}\(\)\=<>\[\]])
diff --git a/test/DocTest.thrift b/test/DocTest.thrift
index 9d19855..5d205b7 100644
--- a/test/DocTest.thrift
+++ b/test/DocTest.thrift
@@ -246,4 +246,12 @@
 
 /**no room for newline here*/
 
+/* * / */
+typedef i32 TestFor3501a
+
+/**
+ * /
+ */
+typedef i32 TestFor3501b
+
 /* THE END */