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

Overview

The CPNumberToken class reperesents a number appearing in the input.

These tokens return @"Number" as their name.

Tasks

Creating and Initialising a Number Token

Configuring a Number Token

  •   number

    The number found in the input stream.

    property

Other Methods

Properties

number

The number found in the input stream.

@property (readwrite, copy) NSNumber *number

Discussion

The number found in the input stream.

Declared In

CPNumberToken.h

Class Methods

tokenWithNumber:

Creates a number token with the number found in the input.

+ (id)tokenWithNumber:(NSNumber *)number

Parameters

number

The number found in the input stream.

Return Value

Returns a CPNumberToken representing the specified number.

Discussion

Creates a number token with the number found in the input.

Declared In

CPNumberToken.h

Instance Methods

initWithNumber:

Initialises a number token with the number found in the input.

- (id)initWithNumber:(NSNumber *)number

Parameters

number

The number found in the input stream.

Return Value

Returns a CPNumberToken representing the specified number.

Discussion

Initialises a number token with the number found in the input.

Declared In

CPNumberToken.h

name

The token name.

- (NSString *)name

Discussion

The token name.

Declared In

CPToken.h