public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Josh Stone <jistone@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: Canonical list of reserved words ?
Date: Thu, 01 Nov 2012 15:49:00 -0000	[thread overview]
Message-ID: <509299F6.30805@redhat.com> (raw)
In-Reply-To: <20121101144940.GE7059@redhat.com>

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

  parent reply	other threads:[~2012-11-01 15:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01 14:49 Daniel P. Berrange
2012-11-01 15:42 ` Frank Ch. Eigler
2012-11-01 15:49 ` Josh Stone [this message]
2012-11-01 15:53   ` Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=509299F6.30805@redhat.com \
    --to=jistone@redhat.com \
    --cc=berrange@redhat.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).