<div>Hey Roberto,</div><div><br></div><div>Try epp_dodger:parse_file(Module), I think that should do it.</div><div><br></div><div>--Andrew<br><br><div class="gmail_quote">On Sun, May 13, 2012 at 11:03 AM, Roberto Ostinelli <span dir="ltr"><<a href="mailto:roberto@widetag.com" target="_blank">roberto@widetag.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div class="im">On Fri, May 11, 2012 at 6:33 PM, Andrew Berman <span dir="ltr"><<a href="mailto:rexxe98@gmail.com" target="_blank">rexxe98@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What about this?<br><br>Comments = erl_comment_scan:string(Text),<br>{ok, Form, _} = erl_scan:string(Text),<br>{ok, Tree} = erl_parse:parse_form(Form), <br>{Tree2, _} = erl_recomment:recomment_tree(Tree, Comments),<div>erl_prettypr:format(Tree2).<span><font color="#888888"><div>


</div></font></span></div></blockquote><div><br></div></div><div>hello andrew,</div><div><br></div><div>this looks interesting, though i cannot find a way to parse a whole mudule:</div><div><br></div><div><br></div><div>

%%%%%%%%%%%%%%%%%%%%%%%%%%</div>
<div><div>-module(pretty).</div><div>-compile(export_all).</div><div><br></div><div>start() -></div><div><span style="white-space:pre-wrap">       </span>Code = "-module(start).</div><div><span style="white-space:pre-wrap">     </span>-export([start/0]).</div>


<div><br></div><div><span style="white-space:pre-wrap"> </span>start() ->ok.</div><div><br></div><div><span style="white-space:pre-wrap">        </span>% a comment here.",</div><div><span style="white-space:pre-wrap"> </span>Comments = erl_comment_scan:string(Code),</div>


<div><span style="white-space:pre-wrap">  </span>{ok, Form, _} = erl_scan:string(Code),</div><div class="im"><div><span style="white-space:pre-wrap">   </span>{ok, Tree} = erl_parse:parse_form(Form), </div>
<div><span style="white-space:pre-wrap">  </span>{Tree2, _} = erl_recomment:recomment_tree(Tree, Comments),</div><div><span style="white-space:pre-wrap">       </span>erl_prettypr:format(Tree2).</div>
</div></div><div>%%%%%%%%%%%%%%%%%%%%%%%%%%</div><div><br></div><div><br></div><div><div>1> pretty:start().</div><div>** exception error: no match of right hand side value {error,{2,erl_parse,["syntax error before: ","'-'"]}}</div>


<div>     in function  pretty:start/0 (pretty.erl, line 13)</div></div><div><br></div><div>any ideas?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>r.</div></font></span></div>
</blockquote></div><br></div>