Re: Labels broken on new ccscript ??
David Sugar <[email protected]> Tue, 12 Sep 2006 18:09:07 -0400
| Newsgroups | gmane.comp.gnu.bayonne.devel |
|---|---|
| Message-ID | <[email protected]> |
There were originally several different ways to do labels in ccscript; either in the ::xx or xx: form, explicitly as private and/or public xx targets, as well as "function" xx. In ccscript3, the older forms were dropped. Hence we retained private/public xx for direct labels for goto and/or gosub, and function xx exclusively as a target of call. Test Bayonne wrote: > When trying to use a label with ccscript3-1.0.9 (used in Bayonne2), it > seems that it doesn't work anymore (was fine with the version used for > Bayonne1) > > ex: test7.scr > echo "start script test6" > goto ::alpha > > ::alpha > echo "alpha" > exit > > When using the builtin testscript application in directory tests > ./testscript test7 > compiled test7; 5 steps > start script test6 > ccscript: test7.scr(2): script test7::alpha missing > ccscript: test7.scr(4): script alpha missing > alpha > exiting... > > In the previous version, the corresponding line for the label was stored > in an entry of the "index" array when compiling, it isn't true anymore > (the index array just contains one entry with the name of the script). > With the previous version, in > int ScriptImage::compile(istream *str, char *name, const char *scrname) > when we identify a label (if(!strncmp(token, "::", 2)),), we break the > current loop and go to the compile label. > With the new version, we set token to "call" and pretoken to "alpha" but > we don't go back to the label compile. > Should we use the labels diffently ? or is it indeed a bug and could we > have a patch (the code changed too much to understand what we are > supposed to do) ? > Thanks > > > > > _______________________________________________ > Bayonne-devel mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/bayonne-devel _______________________________________________ Bayonne-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bayonne-devel