LKToken class documentation

Authors

Generated by builder

Software documentation for the LKToken class

LKToken : NSString

Declared in:
LKToken.h

LKToken implements a token for use in parsers. A token is a symbol or word in a source program. The LKToken class stores this as a range and a pointer to the source program, allowing it to be easily mapped back to the original.


Instance Variables

Method summary

tokenWithRange: inSource: 

+ (LKToken*) tokenWithRange: (NSRange)aRange inSource: (NSString*)aString;

Create a token from a range in the specified source string.


sourceDocument 

- (NSString*) sourceDocument;

Returns the source code string from which this token was generated.


sourceLocation 

- (NSRange) sourceLocation;

Returns the location in the original program of this token.




Instance Variables for LKToken Class

charAtIndex

@protected unichar(* charAtIndex;

IMP used for looking up the character at the specified index in the source string.


range

@protected NSRange range;

Range within the source string


source

@protected NSString* source;

Source string.