badarg in erl_recomment:recomment_forms

Tamas Patrovics <>
Thu Mar 24 12:29:48 CET 2005


I tried scanning all the .erl files in the Erlang distribution and
extract documentation from them. Generally it works fine, however if I
pass any of these files

otp_src_R10B-3/lib/kernel/src/error_handler.erl
otp_src_R10B-3/lib/compiler/src/beam_disasm.erl
otp_src_R10B-3/lib/compiler/src/sys_pre_expand.erl
otp_src_R10B-3/lib/compiler/src/v3_core.erl
otp_src_R10B-3/lib/compiler/src/beam_validator.erl
otp_src_R10B-3/lib/debugger/src/dbg_ieval.erl
otp_src_R10B-3/lib/hipe/cerl/cerl_typesig.erl
otp_src_R10B-3/lib/stdlib/src/erl_eval.erl
otp_src_R10B-3/lib/compiler/src/sys_core_fold.erl


to this simple module


-module(doc).
-export([start/1]).

start(Path) ->
    {ok, Source} = epp:parse_file(Path, [], []),
    Comments = erl_comment_scan:file(Path),
    erl_recomment:recomment_forms(Source, Comments).


then I get a badarg error like this one

Error in process <0.74.0> with exit value:
{{badarg,{try,723,[{call,723,{atom,723,apply},[{atom,723,erlang},{var,723,'Name'},{var,723,'As'}]}],[{clause,724,[{var,724,'Value'}],[[{op,724,'==',{var,724,'Lc'},{atom,724,true}}]],[{tuple,725,[{atom,725,value},{var,725,'Value'},{var,725,'Bs'}]}]},{clause,726,[{var,726,'Value'}],[],[{call,727,...


/Tamas



More information about the erlang-bugs mailing list