Class ASpecialToken

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type ASpecialToken = class(ATokenFromSource)

Description

This class represents a special token, which is usually a delimiter or symbolic operator recognized by a parsed language. Special tokens differ from identifier tokens in that they normally need not be comprised of alphanumeric characters.

Hierarchy

Overview

Methods

Public function readFrom(const Source: AStream): TStreamIOSize; override;

Description

Methods

Public function readFrom(const Source: AStream): TStreamIOSize; override;

Read the token from the given source stream.

This method reads characters from Source until one is encountered that is not allowed to be part of a special token. It then checks to see whether the text accumulated represents a recognized delimiter or operator. If not, it sets the value of its opcode to TOKCAT_ERROR.

This method is written with the assumption that Source represents an instance of ATextInputStream. To read symbolic tokens from an intermediate code stream, an instance of ASymbolicToken should be used instead.

Returns

The total number of bytes read from Source.


Generated by PasDoc 0.13.0 on 2015-01-10 17:13:18