[Pyparsing] C++ Comments and a Backslash at the End of the Line.
Brought to you by:
ptmcg
From: Ralph C. <ra...@in...> - 2006-10-03 19:20:59
|
Hi, Just looking at pyparsing-1.4.3's source and cppStyleComment = Regex(r"(\/\*[\s\S]*?\*\/)|(\/\/.*)").setName("C++ style comment") seems wrong. AIUI the // style of comment is terminated by the end of a line that is not preceeded with a backslash: $ cat x.c++ int a; \\ abc\ int b; \\ ghi $ g++ -E x.c++ # 1 "x.c++" # 1 "<built-in>" # 1 "<command line>" # 1 "x.c++" int a; \\ abcint b; \\ ghi $ I don't know about Java: javaStyleComment = cppStyleComment Cheers, Ralph. |