Talk:Strip block comments: Difference between revisions

→‎State Machine: Full comment stripping is trickier than it appears
(→‎State Machine: Certainly, but here's why I was thinking that...)
(→‎State Machine: Full comment stripping is trickier than it appears)
Line 14:
:::::: Yet they would be doing totally different things. Some languages only have block comments, some only have to-end-of-line comments, some have both. Some even have neither (or at least it's non-trivial to determine what is really a comment with something like [[SNUSP]]…) –[[User:Dkf|Donal Fellows]] 16:35, 11 November 2010 (UTC)
::::::: Certainly. Hm. I think my goal in such a task is more to describe the nature of comments in the language by creating machinery to recognize those comments. Similar to [[Quine]] in that it's about comprehension of self's language, but with a focus on comments. It's not as consistent as recognizing specific classes of comments. --[[User:Short Circuit|Michael Mol]] 17:55, 11 November 2010 (UTC)
:::::::: Still, it's a different task to this one (which turns out to be a nice application of a modern RE engine), and for some languages, comment stripping could be rather difficult (classic [[BASIC]]'s <tt>REM</tt> for example). It's also tricky when a language has several different comment formats (modern [[C]], [[C++]], [[Java]] to name a few) because they can interact (and can interact with the language's string syntax too), which requires going to the power of at least some sort of lexer… –[[User:Dkf|Donal Fellows]] 20:40, 11 November 2010 (UTC)
 
== Definition of delimiters? ==
Anonymous user