C# Класс PdfSharp.Pdf.Content.CLexer

Lexical analyzer for PDF content files. Adobe specifies no grammar, but it seems that it is a simple post-fix notation.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AppendAndScanNextChar char
IsDelimiter bool
IsOperatorChar bool
IsWhiteSpace bool
ScanNextChar char

Открытые методы

Метод Описание
CLexer ( byte content ) : System

Initializes a new instance of the Lexer class.

ClearToken ( ) : void

Resets the current token to the empty string.

MoveToNonWhiteSpace ( ) : char

If the current character is not a white space, the function immediately returns it. Otherwise the PDF cursor is moved forward to the first non-white space or EOF. White spaces are NUL, HT, LF, FF, CR, and SP.

ScanComment ( ) : CSymbol

Scans a comment line. (Not yet used, comments are skipped by lexer.)

ScanHexadecimalString ( ) : CSymbol
ScanInlineImage ( ) : CSymbol

Scans the bytes of an inline image

ScanLiteralString ( ) : CSymbol
ScanName ( ) : CSymbol

Scans a name.

ScanNextToken ( ) : CSymbol

Reads the next token and returns its type.

ScanNumber ( ) : CSymbol

Scans an integer or real number.

ScanOperator ( ) : CSymbol

Scans an operator.

Приватные методы

Метод Описание
AppendAndScanNextChar ( ) : char

Appends current character to the token and reads next one.

IsDelimiter ( char ch ) : bool

Indicates whether the specified character is a PDF delimiter character.

IsOperatorChar ( char ch ) : bool

Indicates whether the specified character is an content operator character.

IsWhiteSpace ( char ch ) : bool

Indicates whether the specified character is a content stream white-space character.

ScanNextChar ( ) : char

Move current position one character further in content stream.

Описание методов

CLexer() публичный Метод

Initializes a new instance of the Lexer class.
public CLexer ( byte content ) : System
content byte
Результат System

ClearToken() публичный Метод

Resets the current token to the empty string.
public ClearToken ( ) : void
Результат void

MoveToNonWhiteSpace() публичный Метод

If the current character is not a white space, the function immediately returns it. Otherwise the PDF cursor is moved forward to the first non-white space or EOF. White spaces are NUL, HT, LF, FF, CR, and SP.
public MoveToNonWhiteSpace ( ) : char
Результат char

ScanComment() публичный Метод

Scans a comment line. (Not yet used, comments are skipped by lexer.)
public ScanComment ( ) : CSymbol
Результат CSymbol

ScanHexadecimalString() публичный Метод

public ScanHexadecimalString ( ) : CSymbol
Результат CSymbol

ScanInlineImage() публичный Метод

Scans the bytes of an inline image
public ScanInlineImage ( ) : CSymbol
Результат CSymbol

ScanLiteralString() публичный Метод

public ScanLiteralString ( ) : CSymbol
Результат CSymbol

ScanName() публичный Метод

Scans a name.
public ScanName ( ) : CSymbol
Результат CSymbol

ScanNextToken() публичный Метод

Reads the next token and returns its type.
public ScanNextToken ( ) : CSymbol
Результат CSymbol

ScanNumber() публичный Метод

Scans an integer or real number.
public ScanNumber ( ) : CSymbol
Результат CSymbol

ScanOperator() публичный Метод

Scans an operator.
public ScanOperator ( ) : CSymbol
Результат CSymbol