// remove comments // // run with "-wrp" //XXX this builds up stack, right-recursions needs to be optimized line_comment := "//[^\n]*" block_comment := "/\\*.*?\\*/" anything := "." whitespace := "[ \t\r]+" start -> line_comment start : 2 | x = block_comment y = start : #sx(string-concatenate (cons (string-filter #\newline (car x)) y)) | x = ("\n" | anything) y = start : #sx(string-concatenate (append x y)) | // success