![]() ![]() As with parentheses, it needs to be able to distinguish quotes that are part of macro code from those that are part of data step code and also those that are part of literal strings such as O'Riley and %nrstr(%'%") and not count them, but pattern matching can handle that too. It also starts counting single and double quotes from the start of the program and identifies whether the count of each such symbol it encounters is odd or even. If the level of nesting goes negative, it is a clue that the problem may be nearby. It needs to be able to distinguish parentheses that are part of macro functions from those that are part of data step functions, including %sysfunc calls that reside in the macro environment but make calls to data step functions (must also do similar for %syscall macro function invocations), but that is doable through regular expressions. ![]() ![]() With things like parentheses, which can be embedded, it prints the level of nesting at the beginning of every line. I wrote a perl program that reads through any given SAS program and keeps track of things that should come in pairs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |