erlc (R9C) hangs when last line is is a comment missing EOL
Thu Sep 18 19:18:05 CEST 2003
On Thu, 18 Sep 2003 06:46:59 +0100
Peter-Henry Mander <erlang@REDACTED> wrote:
> I've seen this on SuSE 8.2 linux too. There's an easy work-around (-:
How very pragmatic of you to suggest that :)
There are similar errors on these types of files with file:consult/1,
file:eval/1, and erl_scan:string/1.
I think I located the problem: erl_scan:scan_comment/6 doesn't have a
clause for when the first argument is just 'eof'. I added one that
calls done(Eof, , Toks, Pos, eos), but it only has limited success
(erl_scan:string/1 no longer crashes, but the other still do.)
> Chris Pressey wrote:
> > Try this:
> > -module(blah).
> > %%% BEGIN blah %%%
> > -export([foo/0]).
> > foo() -> bar.
> > %%% END of blah %%%
> > ^ do not include an EOL here.
> > # erlc foo.erl
> > <<indefinate hang>>
> > This happens for me both on FreeBSD-4.9 PRERELEASE and Windows 98.
> > (Also, I can't seem to gracefully kill erlc on Windows 98 when this
> > happens - Ctrl-C gives me the menu, but the 'a' option doesn't
> > work.)
> > This only seems to happen when the last line is a comment AND is
> > missing an EOL.
> > -Chris
More information about the erlang-questions