Greetings, On Thu Mar 15 06:32:28 2007, particle wrote: > On 3/14/07, Nuno Carvalho via RT <[EMAIL PROTECTED]> > wrote: > > Greetings, > > > > here are some examples running the changed lexer: > > > > $ cat 1.pir > > .sub main :main > > .macro SpinForever (Count) > > .local $LOOP: dec .COUNT # ".local $LOOP" defines a local > label. > > branch .$LOOP # Jump to said label. > > .endm > > .end > > $ ./parrot 1.pir > > $ > > $ cat 2.pir > > .sub main :main > > print $AA > > .end > > $ ./parrot 2.pir > > error:imcc:'$AA' is not a valid register name > > in file '2.pir' line 2 > > $ cat 3.pir > > .sub main :main > > $I = 5 > > .end > > $ ./parrot 3.pir > > error:imcc:'$I' is not a valid register name > > in file '3.pir' line 2 > > $ cat 4.pir > > .sub main :main > > print "$A" > > .end > > $ ./parrot 4.pir > > $A > > $ cat 5.pir > > .sub main :main > > print $2 > > .end > > $ ./parrot 5.pir > > error:imcc:'$2' is not a valid register name > > in file '5.pir' line 2 > > > > With the new lexer the result of running 'make test' is the same, > except > > for 't/compilers/imcc/syn/errors.t' because now we have a different > > error message. I attached a patch with the new lexer and the > corrected test. > > > > More tests/comments welcome! > > > the above examples should be converted to tests. please place them in > t/compilers/imcc/syn/macro.t, and resubmit. that should allow us to do > a partial apply (tests only), see the failures, then apply the source, > rebuild, test, and see the failures disappear, with no other failures. > ~jerry >
I added a new file 't/compilers/imcc/syn/symbols.t' in r17571 with tests similar to those i pasted here. Tests are tagged todo until the actual lexer patch is applied. I also added a couple of tests for macros, these ones are passing. Best regards, ./smash