[comp.lang.c] Re^2: Want a way to strip comments from a

maart@cs.vu.nl (Maarten Litmaath) (03/23/89)

leo@philmds.UUCP (Leo de Wit) writes:
\Appearances are deceptive, it won't handle trigraphs. For instance, try:
\??' (trigraph for ^) and your code thinks it is in_char.

My sed script can easily be fixed to handle that case too: just add another
state to the FSM :-)
-- 
 Modeless editors and strong typing:   |Maarten Litmaath @ VU Amsterdam:
   both for people with weak memories. |maart@cs.vu.nl, mcvax!botter!maart

maart@cs.vu.nl (Maarten Litmaath) (03/30/89)

stil@nikhefh.hep.nl (Gertjan Stil) writes:
\What about the following command in vi:  :%s/\/\*[.|\n]*\*\///g

\This will work for multi-line comments.

Really? Try it yourself (before posting)!
-- 
 Modeless editors and strong typing:   |Maarten Litmaath @ VU Amsterdam:
   both for people with weak memories. |maart@cs.vu.nl, mcvax!botter!maart