On Sun, 2008-03-16 at 18:51 +0100, Pierre THIERRY wrote: > Scribit Swaroop Sridhar dies 16/03/2008 hora 12:21: > > A top-level form in BitC must be a defining form. That is, one of > > define, defstruct, defunion, defrepr, deftypeclass, definstance. > > > > The parser is looking for one of these keywords, to begin a top-level > > form, which is why you are getting a syntax error after the end of the > > first word. > > I would be useful to get a more verbose error.
Yes. For a research compiler, BitC is quite good about errors after the parse stage. Generating good errors during parsing is a fairly black art, and Yacc/Bison aren't really very good tools for it. For a research compiler, this wasn't a priority, but for any production implementation it certainly should be. > I had to manually tell GCC which standard I want: > > $ gcc -O2 -I ../include -L ../lib -o bitc.out bitc.out.c -lbitc -lgc > --std=c99 > And it runs, too: > > $ ./bitc.out > Hello, world! > > The attached one-line patch seems to fix this. The second one is a > convenience: it adds an EOL after the output of GCC's invocation on > stderr. I just applied both of those. shap _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
