Re: [Pyparsing] C++ Comments and a Backslash at the End of the Line.
Brought to you by:
ptmcg
From: Ralph C. <ra...@in...> - 2006-10-05 12:39:06
|
Hi Paul, > > AIUI the // style of comment is terminated by > > the end of a line that is not preceeded with a backslash: > > Does this look better? > > cppStyleComment = > Regex(r"(\/\*[\s\S]*?\*\/)|(\/\/(\\\n|.)*)").setName("C++ style comment") > > It seems to test out okay. I'll put it in the next update. Yes, thanks. Would you accept suggestions for equivalent regexps that execute faster? I'm thinking of parsing many C++ files frequently and could use the speed. Cheers, Ralph. |