Unit PasDoc_Scanner

Description

Simple Pascal scanner.

The scanner object TScanner returns tokens from a Pascal language character input stream. It uses the PasDoc_Tokenizer unit to get tokens, regarding conditional directives that might lead to including another files or will add or delete conditional symbols. Also handles FPC macros (when HandleMacros is true). So, this scanner is a combined tokenizer and pre-processor.

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class ETokenizerStreamEnd  
Class EInvalidIfCondition  
Class TScanner This class scans one unit using one or more TTokenizer objects to scan the unit and all nested include files.

Types

TUpperCaseLetter = 'A'..'Z';
TSwitchOptions = array[TUpperCaseLetter] of Boolean;
TDirectiveType = (...);

Constants

MAX_TOKENIZERS = 32;

Description

Types

TUpperCaseLetter = 'A'..'Z';

subrange type that has the 26 lower case letters from a to z

TSwitchOptions = array[TUpperCaseLetter] of Boolean;

an array of boolean values, index type is TUpperCaseLetter

TDirectiveType = (...);

All directives a scanner is going to regard.

Values
  • DT_UNKNOWN
  • DT_DEFINE
  • DT_ELSE
  • DT_ENDIF
  • DT_IFDEF
  • DT_IFNDEF
  • DT_IFOPT
  • DT_INCLUDE_FILE
  • DT_UNDEF
  • DT_INCLUDE_FILE_2
  • DT_IF
  • DT_ELSEIF
  • DT_IFEND

Constants

MAX_TOKENIZERS = 32;

maximum number of streams we can recurse into; first one is the unit stream, any other stream an include file; current value is 32, increase this if you have more include files recursively including others

Authors


Generated by PasDoc 0.16.0.