Canonical list of reserved words ?
Frank Ch. Eigler
fche@redhat.com
Thu Nov 1 15:42:00 GMT 2012
"Daniel P. Berrange" <berrange@redhat.com> writes:
> We've had fairly frequent bugs in QEMU where generated tapsets contain
> variables clashing with systemd reserved words. [...]
> for name in e.args.names():
> # Append underscore to reserved keywords
> if name in ('limit', 'in', 'next', 'self', 'function'):
> name += '_'
> out(' %s = $arg%d;' % (name, i))
> i += 1
Right, that's inconvenient. Maybe prefix with them all with "q"?
("self" isn't a keyword fwiw.)
> To avoid this proper in future I'm looking for a full list of all
> systemtap reserved words. I've looked at the docs but not found a
> clear list yet, so can someone point me int he right direction
I don't see it in the docs, but the parser source code fesses up
thusly:
% grep keywords.insert parse.cxx
keywords.insert("probe");
keywords.insert("global");
keywords.insert("function");
keywords.insert("if");
keywords.insert("else");
keywords.insert("for");
keywords.insert("foreach");
keywords.insert("in");
keywords.insert("limit");
keywords.insert("return");
keywords.insert("delete");
keywords.insert("while");
keywords.insert("break");
keywords.insert("continue");
keywords.insert("next");
keywords.insert("string");
keywords.insert("long");
keywords.insert("try");
keywords.insert("catch");
- FChE
More information about the Systemtap
mailing list