On Sun, Mar 16, 2008 at 11:04 PM, chromatic <[EMAIL PROTECTED]> wrote: > On Saturday 23 February 2008 14:23:19 Klaas-Jan Stol wrote: > > > On Sat, Feb 23, 2008 at 5:00 PM, Ron Blaschke <[EMAIL PROTECTED]> wrote: > > > > The issue seems to be caused by languages/c99/src/preamble, where: > > > > > > .local $iter_loop: > > > > > > Consider this test program. > > > > > > $cat m.pir > > > .macro test > > > .local $iter_loop: > > > .endm > > > > > > $ parrot -o m.pbc --output-pbc m.pir > > > compilers/imcc/imcc.l:992: failed assertion 'valp->s' > > > > > > (Remove the colon and it parses again.) > > > > that makes sense, now i see this: .local is not valid anymore to declare > > labels, you should use .label. > > Can we somehow make this an error in IMCC? I poked at the LOCAL and LABEL > rules slightly, but didn't figure it out. > > -- c >
I think that macro definitions are slurped, not parsed. In other words, it gets tricky to check for that (Only macro expansions are parsed.) (FYI, the 3-phase PIR compiler pirc/new + pirc/macro separates the macro stuff from pure PIR; the macro processor is really a parser there, which would be able to do this in a nicer way. The future of pirc is unclear, though; currently it's a lot of work to do a replacement for imcc) kjs