Hi Marco,

>Yes, perhaps the best approach is to detect context

I agree on this :-)    "Context" is the keyword ...

>C code, to "parse out" comments and strings, then handling the remaining
>portions with regular expressions (if not with a dedicated tokenizer,
>especially if speed is a concern).

I don't think that the routine will be simple.  If you want to do _simple_ matching of 
c comments then yes, it will be simple (it's easier to hardcode a routine to make a 
routine generic).  But think about it - if you solve this problem you should be able 
to implement "folded functions" easily (another high hitter on my top ten list :-)

I think that a dedicated parser taking the input of a list of delimiters is the way to 
go :-)  (As you also suggest - but not necessarily for speed reasons :-)

Kind regards,
Brian

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to