Class DObjcTokenizer

Inherits from:
Object
Declared in:
DObjcTokenizer.h

Class Hierarchy

    Object
      |
      +---DObjcTokenizer

Class Description

The class DObjcTokenizer implements an Objective-C lexical scanner. The tokenizer scans a text stream for whitespace, strings, keywords, comments, operators, numbers, predefined types, names, character constants, etc. There are two methods: nextToken and checkToken. The first method checks for a token and if there is a match, the scanner location is moved to the next location in the source. The second method only returns the result of the match, the client must call the 'next' method to move the scanner location.

Last modified:
23-Jul-2006 (DObjcTokenizer.h)

Instance Variables

private DList *_sources
the stack with the sources
private DSource *_source
the source for the tokenizer
private DText *_text
the last scanned, processed text
private DText *_raw
the last scanned, unprocessed text
private BOOL _eoff
is end of file reached ?
private BOOL _eofl
is end of line reached ?
private BOOL _sofl
is start of line active ?
private BOOL _comment
is (block) comment active ?
private unsigned _scanned
the length of the scanned text
private BOOL _skipWhiteSpace
should whitespace be skipped ? (def. YES)
private const char *_scanLine
the current line for the scanner
private int _currIndex
the current index in the scanner line
private int _nextIndex
the next index in the scanner line
private int _thrdIndex
the third index in the scanner line
private char _currChar
the current character from the scanner line
private char _nextChar
the next character from the scanner line
private char _thrdChar
the third character from the scanner line
private BOOL _currEsc
is the current character escaped ?
private BOOL _nextEsc
is the next character escaped ?
private BOOL _thrdEsc
is the third character escaped ?

Method Index


generated 25-Jul-2006 by ObjcDoc 3.0.0