Talk:Strip comments from a string: Difference between revisions

m (→‎29 of 36 languages were incorrect?: added whitespace and increased indentation of a table.)
Line 28:
:So far, it seems like comments may contain comment characters, but that the non-comment text cannot quote or escape comment characters. This does not seem very useful. On the other hand, normally comment stripping happens inside of a parser which has mechanics to ignore comment characters when they appear in the wrong context. So the interesting task here is probably [[Parse_EBNF]]. --[[User:Rdm|Rdm]] 17:37, 27 July 2011 (UTC)
::Except [[Parse_EBNF]] task is a little ''too'' elaborate. Here we want a parser based on some BNF, while that task requires ''creating'' a parser based on some BNF, a program writing a program sort of thing. --[[User:Ledrug|Ledrug]] 18:53, 27 July 2011 (UTC)
:::Jump over strings is easy. Get start position of each delimiter and take the lowest one. Test if the count of the string-delimiters on the left side is odd - than the string is open - and search for the closing delimiter. After that point start searching again.--[[User:MichaelWodrich|MichaelWodrich]] ([[User talk:MichaelWodrich|talk]]) 00:01, 29 October 2020 (UTC)
 
== White space ==