Inherits from CPToken : NSObject
Declared in CPKeywordToken.h
CPKeywordToken.m

Overview

The CPKeywordToken class reperesents a keyword appearing in the input.

These tokens can be used to return both language keywords and predetermined operators amongst other things.

These tokens return the keyword name as their name.

Tasks

Creating and Initialising a Keyword Token

Configuring a Keyword Token

Other Methods

Properties

keyword

The name of the keyword found in the input stream.

@property (readwrite, copy) NSString *keyword

Discussion

The name of the keyword found in the input stream.

Declared In

CPKeywordToken.h

Class Methods

tokenWithKeyword:

Creates a keyword token with a certain name.

+ (id)tokenWithKeyword:(NSString *)keyword

Parameters

keyword

The name of the keyword found in the input stream.

Return Value

Returns a CPKeywordToken representing the specified keyword.

Discussion

Creates a keyword token with a certain name.

Declared In

CPKeywordToken.h

Instance Methods

initWithKeyword:

Initialises a keyword token with a certain name.

- (id)initWithKeyword:(NSString *)keyword

Parameters

keyword

The name of the keyword found in the input stream.

Return Value

Returns a CPKeywordToken representing the specified keyword.

Discussion

Initialises a keyword token with a certain name.

Declared In

CPKeywordToken.h

name

The token name.

- (NSString *)name

Discussion

The token name.

Declared In

CPToken.h