5.3.11. PreprocessorLexSymbol

[<<<] [>>>]

This entry point is used when the lexer finds a symbol that is alphanumeric but is not predefined by ScriptBasic. These are the variables and symbols (like the statement OPEN opening modes.)

When this entry point is called the pointer p points to a pointer that point to a pointer pointing to the last processed lexeme. This seems to be quite complex and uselessly complex to pass such a pointer at the firstglance. However it is not.

When the lexer builds the list of the lexemes reading the characters it creates a linked list of structures of type Lexeme. The lexer object field pLexResult points to the first element of this list. The lexer code uses a local variable named plexLastLexeme that first points to this pointer, and later it always points to the forward link pointer of the last element of the list.

When the preprocessor is called using this entry point this variable passed in the argument p "by value". Through this pointer you can

The function has to return zero or the error code and should set the parameter *pCmd to PreprocessorContinue, PreprocessorDone, or PreprocessorUnload.

[<<<] [>>>]