<div dir="ltr">I believe (but haven't checked) that if you feed your code through the preprocessor (which you should do because it may contain macros), then epp will handle the "dot at eof" problem for you.<div><br></div><div>best regards,</div><div>Vlad</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 18, 2015 at 4:33 AM, Sparr <span dir="ltr"><<a href="mailto:sparr0@gmail.com" target="_blank">sparr0@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I want to lint the file as-is, not modify it to make my parsing work. The preprocessor/compiler accepts it without a trailing newline, so should I.<span class=""><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 17, 2015 at 7:26 PM, Steve Vinoski <span dir="ltr"><<a href="mailto:vinoski@ieee.org" target="_blank">vinoski@ieee.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Thu, Dec 17, 2015 at 9:52 PM, Sparr <span dir="ltr"><<a href="mailto:sparr0@gmail.com" target="_blank">sparr0@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><p dir="ltr">Figured it out with help from #erlang on freenode. If hello.erl is missing the trailing newline then the last form gets missed. I'm going to try to figure out how to account for that.</p></blockquote><div><br></div></span><div>You don't need a newline specifically -- a space character will also work, for example. Just change this:</div><span><div><br></div><div>  Forms = scan(erl_scan:tokens([],binary_to_list(B),1),[]),<br></div><div><br></div></span><div>to this:</div><div><br></div><div>  Forms = scan(erl_scan:tokens([],binary_to_list(B)++" ",1),[]),</div></div></div></div></blockquote></div></div></span></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>