Maximum entries in symbol table (i.e. constants, labels, goto/gosub, etc.) and error
Zoot
Posts: 2,227
OK, I've been programming AVRs, SXes, Stamps, etc. for years w/o too much trouble. But I've got a program for the Stamp BS2p40 that errored on tokenizing today and while I've solved the basic problem, I have a technical question.
It appears that there is some undocumented maximum number of entries in the "symbol table". In my tests, these entries include constants, labels, gosubs. Variables count as well, I think, but I haven't had a chance to test that yet.
In any case, I had a program that tokenized and ran just fine. But I made some edits and mostly added constants and now it won't tokenize -- error "symbol table full". Removing labels and or constant declarations eventually let the whole thing tokenize.
So... what's the upper limit so I can plan for it? And what is included in that table? I'm also really, really surprised that constants count towards the total -- they should be resolved in the compiler before tokenizing. Labels and gosubs and variables I understand because of the way the jump tables and expression stack and such work.
See also this thread, which poses the same question -- w/o a clear answer.
http://forums.parallax.com/showthread.php?82739
It appears that there is some undocumented maximum number of entries in the "symbol table". In my tests, these entries include constants, labels, gosubs. Variables count as well, I think, but I haven't had a chance to test that yet.
In any case, I had a program that tokenized and ran just fine. But I made some edits and mostly added constants and now it won't tokenize -- error "symbol table full". Removing labels and or constant declarations eventually let the whole thing tokenize.
So... what's the upper limit so I can plan for it? And what is included in that table? I'm also really, really surprised that constants count towards the total -- they should be resolved in the compiler before tokenizing. Labels and gosubs and variables I understand because of the way the jump tables and expression stack and such work.
See also this thread, which poses the same question -- w/o a clear answer.
http://forums.parallax.com/showthread.php?82739