3 ms·
>keywords can also be used as variable names (thus you can define variables IF, ELSE, THEN and have a legal SAS statement like “IF ELSE=IF THEN IF=ELSE ELSE THE
by yesenadam 7y ago
>keywords can also be used as variable names (thus you can define variables IF, ELSE, THEN and have a legal SAS statement like “IF ELSE=IF THEN IF=ELSE ELSE THEN=IF;”)
OK, so have a preprocessor check for variables[0] with keyword names and change them to an unused name. Problem solved.
[0] e.g. an X or Y in "X=Y"
- eesmith 7y agoIf your preprocessor is clever enough to disambiguate things then you can use the same logic directly in your parser.