C# Class 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.
Afficher le fichier Open project: DavidS/MigraDoc Class Usage Examples

Private Properties

Свойство Type Description
AppendAndScanNextChar char
IsDelimiter bool
IsOperatorChar bool
IsWhiteSpace bool
ScanNextChar char

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

CLexer() public méthode

Initializes a new instance of the Lexer class.
public CLexer ( byte content ) : System
content byte
Résultat System

ClearToken() public méthode

Resets the current token to the empty string.
public ClearToken ( ) : void
Résultat void

MoveToNonWhiteSpace() public méthode

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
Résultat char

ScanComment() public méthode

Scans a comment line. (Not yet used, comments are skipped by lexer.)
public ScanComment ( ) : CSymbol
Résultat CSymbol

ScanHexadecimalString() public méthode

public ScanHexadecimalString ( ) : CSymbol
Résultat CSymbol

ScanInlineImage() public méthode

Scans the bytes of an inline image
public ScanInlineImage ( ) : CSymbol
Résultat CSymbol

ScanLiteralString() public méthode

public ScanLiteralString ( ) : CSymbol
Résultat CSymbol

ScanName() public méthode

Scans a name.
public ScanName ( ) : CSymbol
Résultat CSymbol

ScanNextToken() public méthode

Reads the next token and returns its type.
public ScanNextToken ( ) : CSymbol
Résultat CSymbol

ScanNumber() public méthode

Scans an integer or real number.
public ScanNumber ( ) : CSymbol
Résultat CSymbol

ScanOperator() public méthode

Scans an operator.
public ScanOperator ( ) : CSymbol
Résultat CSymbol