Hi,
IMCC appears to choke on comments after "setline", especially if they
contain digits. Is the lexer expecting /setline +[0-9]+\s*$/ ? Should
this be fixed? It appears to break pirate, which puts comments on every
line.
===========================================================
$ cat test.imc
sub __main__
setline 1 # THIS IS JUST A COMMENT 1
end
.end
$ ./parrot test.imc
error:imcc:parse error, unexpected END, expecting '['
in file 'test.imc' line 3
# THIS IS JUST A COMMENT
$ sed -n '134,140p' imcc.l
<*>setline{SP}+ { prev_state = YYSTATE; BEGIN(cmt1); }
<cmt1>{DIGITS} {
valp->t = atoi(yytext);
BEGIN(cmt4);
return LINECOMMENT;
}
<cmt4>{WS}*{EOL} { BEGIN(prev_state) ; line++; }
===========================================================
Thanks,
David
--
$_=".--- ..- ... - .- -. --- - .... . .-. .--. . .-. .-.. .... .- -.-.".
" -.- . .-.\n";s!([.-]+) ?!$_=$1;y/-./10/;$_=chr(-1+ord pack"B*","01".0 x(5
-length)."1$_");y/DWYKAQMOCVLSFENU\\IGBHPJXZ[~nfb`_ow{}/a-z0-9/;$_!ge;print