========Introduction========
  words_list is an object that takes a string and breaks it into words using certain rules.

  Its primary purpose is to be able to parse lines of the form used in FreeBasic programs;
for example, the string
        Dim As String myString = "Hello, World!"
is split into the words
        "Dim", "As", "String", "myString", "=", and """Hello, World!"""
  Normally words are split by whitespace (one or more spaces) but when things are inside
double quotation marks, everything inside the quotation marks (including any whitespace
at all) is automatically included in the word).  Comments using ' are also supported, they are
simply left out.

  It's actually written very specifically as part of the fbvmfb compiler, but it could be used
for parsing FreeBasic code or fbvmfb code.  In fact, it can probably be modified to parse almost
any language fairly easily.

  words_list is intended to take a single line from a source file and break it into words by the
method described above.  It does not actually modify the line itself in any way;  it stores the
unmodified line as a string internally.  When the string is broken up into words, words_list
simply stores a descriptor with the (0-based) index where the word starts and the length of
the word.  Thus, the whitespace, comments, etc. are still in the string - but they are not included
in the words returned by getWord().


========Usage========
  To use words_list, simply declare one and be sure to construct it!  words_list objects may not
be used until their Constructor has been called:
        Dim As words_list myList = words_list()
  Once it has been created, you can set its string:
        myList.setString (stringToParse)
  This can be done as many times as you like, although of course each time you set it to a new string the old string is destroyed and all the word descriptors associated with it, as a new
string is parsed and new word descriptors are created.  If at any time you need to find out what
the original string is, use myList.getString().
  When you set the string, words_list immediately creates the word descriptors.  A word descriptor simply tells where each word starts and ends.  You never even see the word descriptors, they're just for getWord() to figure out what part of the string to return.
  To get a word, simply call getWord() with the index of the word - 0 is the first word, 1 is the
second word, etc.  If you pass a value outside the range of existing words (for example if there
are only 3 words and you request the fourth word), a blank string will be returned.  To find the
length of a word, you can call getWord() and use Len() on the resulting string, but probably faster is to call wordLength() with the index of the word you want, as that accesses the word
descriptor directly without bothering to create the word string.  Once again, if there is no word with that index, 0 is returned as the length.  To find out how many words are actually in the string, you can access the property numWords, which returns the number of words in the words_list.
        Print myList.getString
        Print "Number of words: " & myList.numWords
        For i = 0 to myList.numWords - 1
          Print ""
          Print "Length of this word: " & myList.wordLength(i)
          Print "This word: "myList.getWord(i)
        Next i
This simple example prints the original string, the number of words in the string, then the length of each word followed by the word itself.

Finally, if you want to reset everything to null but leave it so you can still use a words_list, use the reuse() method of the list.  Incidentally, this is what is called by setString when you set the
string after it's already been set.

========License========
I'm not sure this will be useful to anyone except perhaps for learning purposes, especially
because it's a bit hackish (not very elegant, since it follows set rules and the only way to control
*how* it breaks things into words is by modifying the original code yourself, which furthermore
is not that easy), so if you want to use it you may.  I'd like credit if you use it for anything major,
but I doubt you will, so there's no requirement.  If you find any bugs, do report them!  And if
you find it useful, I wouldn't mind hearing from you.  There aren't really any requirements other
than that, just remember if you use it and it does something bad to your or your computer, I'm
not responsible!

It's not perfect;  not everything is consistent or perfectly as it should be, but it does the job
and that's what it's for.  I don't plan to update it, though since I'll be using it I'll update if I
find any bugs or add any new things to it.

========Contact Information========
My e-mail address:  TheMysteriousStrangerFromMars@yahoo.com
My home page where you can get this and other things:  http://notthecheatr.phatcode.net/
On the forums, I'm known as notthecheatr.