toy parser committed to cvs
William Cohen
wcohen@redhat.com
Tue Feb 15 13:10:00 GMT 2005
Frank Ch. Eigler wrote:
> Hi -
>
> The beginnings of a possible parser for systemtap are now in
> CVS (module "src"). Some of the grammar is taken from awk,
> though the outer "probe" level wrapping is new. It's fairly
> tame hand-written C++.
>
> I intend to start adding some semantic checking next, as a
> guideline to the elaboration/translation phases, plus some
> syntax to let the dtr-flavoured jprobes declarations through.
>
> - FChE
LL(1) parsers are good. They are much easier to debug than LR parsers
generated by YACC. Meaningful error messages are also easier to produce.
Is there any particular reason that tools such as antlr are not being
used to generate the parser?
In dtr there were declarations for the original functions. What are you
thinking about for the syntax for the jprobes systemtap probes?
Explicitly listing the arguments passed into the function and hide this
in the elaboration for common cases?
kernel:function("function_to_instrument"):
arguments(type1 arg1, type2 arg2,...)
{
/* probe code */
}
As far as code generation, it looks like there would be some differences
in the wrapper around the probe code depending on the instrumentation
scheme, e.g. difference end of probe whether jprobe or kprobe.
-Will
More information about the Systemtap
mailing list