Lexer ClassTerminal Works - PDF Printing.Net Library
Lexical analyzer for PDF files. Technically a PDF file is a stream of bytes. Some chunks of bytes represent strings in several encodings. The actual encoding depends on the context where the string is used. Therefore the bytes are 'raw encoded' into characters, i.e. a character or token read by the lexer has always character values in the range from 0 to 255.
Inheritance Hierarchy

SystemObject
  PdfEdit.Pdf.IOLexer

Namespace: PdfEdit.Pdf.IO
Assembly: PdfPrintingNet (in PdfPrintingNet.dll) Version: 5.2.1.0 (5.2.1.0)
Syntax

public class Lexer

The Lexer type exposes the following members.

Constructors

  NameDescription
Public methodLexer
Initializes a new instance of the Lexer class.
Top
Methods

  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMoveToNonWhiteSpace
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 methodReadRawString
Reads a string in raw encoding.
Public methodReadStream
Reads the raw content of a stream.
Public methodScanComment
Scans a comment line.
Public methodScanHexadecimalString
Public methodScanKeyword
Scans a keyword.
Public methodScanLiteralString
Scans a literal string, contained between "(" and ")".
Public methodScanName
Scans a name.
Public methodScanNextToken
Reads the next token and returns its type. If the token starts with a digit, the parameter testReference specifies how to treat it. If it is false, the lexer scans for a single integer. If it is true, the lexer checks if the digit is the prefix of a reference. If it is a reference, the token is set to the object ID followed by the generation number separated by a blank (the 'R' is omitted from the token).
Public methodScanNumber
Scans a number.
Public methodScanNumberOrReference
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Properties

  NameDescription
Public propertyPdfLength
Gets the length of the PDF output.
Public propertyPosition
Gets or sets the position within the PDF stream.
Public propertySymbol
Gets the current symbol.
Public propertyToken
Gets the current token.
Public propertyTokenToBoolean
Interprets current token as boolean literal.
Public propertyTokenToInteger
Interprets current token as integer literal.
Public propertyTokenToObjectID
Interprets current token as object ID.
Public propertyTokenToReal
Interprets current token as real or integer literal.
Public propertyTokenToUInteger
Interprets current token as unsigned integer literal.
Top
See Also

Reference