To noweb , any string of nonwhite characters can be an identifier. If an identifier begins with an alphanumeric, it must be delimited on the left by a symbol or a delimiter. If it begins with a symbol, it must be delimited on the left by an alphanumeric or a delimiter. If it begins with a delimiter, there are no restrictions on the character immediately to the left.
Similar rules apply on the right-hand side.
This trick works surprisingly well, but it does not prevent noweb from spotting identifiers in comments or string literals. I have, however, found it very useful to write simple filters that attempt to identify global definitions automatically. Filters for Icon, TeX, and yacc all take about 30 lines of Icon code and are included in the noweb distribution. Recognizing definitions in C is somewhat more complicated, but a reasonable recognizer for C is also included. Contributions for other languages are encouraged.