Analysing an Erlang file

Torben Hoffmann <>
Tue Jun 16 22:55:53 CEST 2009


I am trying to create a little tool that can answer things like "How many
function clauses are there in function <function name>?".

I have looked at xref, but that seems to hide arguments which makes good
sense since xref is for call graphs.

Then I applied my love to erl_scan and erl_parse, but I cannot get
erl_parse's functions to eat the input from erl_scan:string/1 where I have
applied erl_scan:string/1 on the full string for an Erlang file.
How do I convert the tokens from erl_scan:string/1 into something that
erl_syntax accepts?

Or should I approach this problem from a different angle?


More information about the erlang-questions mailing list