Understanding a parser.

Rishi Bhatt bhatt.rishi062 at gmail.com
Sat Mar 18 20:17:22 UTC 2017


Hi,
Well i am currently understanding how to implement a parser,so i am
starting with the simple ones first i.e umask.c,readahead.c,mount.c.

What i know about the implementation of parser:
What we do in these are use the tcb struct(u_arg[]) to get the values that
are passed in as arguments,i am not going into that detail for now (or
should i go?),i guess for now i should just accept it.

Now taking an example of a parser lets say mount.c:
arguments of mount:source,target,filesystem,mountflags and data.

So if i am implementing a mount parser i have to get the values that is
being passed in this syscall that i can get from registers(somehow),also
the return value and error values.Also we have to consider printing the
appropriate things with appropriate wrappers like if we are printing source
and target in mount.c we are using printpath and if address ,it is prinnted
by printaddr and etc.

And we have to first know what can be value of a specific parameter in
different condition,like in mount.c we are printing "mount_filesystem" as a
address or as string.(ignore_type)

So this should be the info to start implementing a parser?

So please fill me up with more detail if i am missing something or i am
interpreting something in a wrong way,and if possible can you give me some
small parser related thing to implement so i can understand it better.So i
can try to start implementing a parser.

P.S: so that i can write something in my gsoc proposal. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170319/f710c84c/attachment.html>


More information about the Strace-devel mailing list