Canonical list of reserved words ?
Josh Stone
jistone@redhat.com
Thu Nov 1 15:49:00 GMT 2012
On 11/01/2012 07:49 AM, Daniel P. Berrange wrote:
> We've had fairly frequent bugs in QEMU where generated tapsets contain
> variables clashing with systemd reserved words. eg
>
> https://bugzilla.redhat.com/show_bug.cgi?id=871286
>
> Currently QEMU's generator does this
>
> 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
>
>
> 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
If it's not in the docs, we should probably add it.
In the source, the list of keywords is populated here:
http://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=blob;f=parse.cxx#l1329
probe global function if else for foreach in limit return delete
while break continue next string long try catch
Your list includes "self", which isn't actually significant in stap, but
that's typical enough that maybe you should just leave it in, and we'll
feel free to add that one later. :)
Josh
More information about the Systemtap
mailing list