protected bool DoPass1()
{
// scan through Source string and build a token list using TokenInstructions
// this is a simple brute force lexical scanner/analyzer that also parses the formed
// token for proper semantics and context in one pass
currentLine = 1;
charPos = 0;
// reset position in Constants container
constants.Clear();
endOfSource = source.Length;
// start with a clean slate
tokenInstructions.Clear();
// tokenize and check semantics untill an error occurs or end of source is reached
// assume RootRulePath has pointer to rules so start at index + 1 for first rule path
// first rule token would be a rule definition so skip over it
bool passed = ProcessRulePath( 0 );
// if a symbol in source still exists then the end of source was not reached and there was a problem some where
if ( PositionToNextSymbol() )
{
passed = false;
}
return passed;
}