Class CLexer
Lexical analyzer for PDF content files. Adobe specifies no grammar, but it seems that it is a simple post-fix notation.
public class CLexer
- Inheritance
-
CLexer
- Inherited Members
Constructors
CLexer(byte[])
Initializes a new instance of the Lexer class.
public CLexer(byte[] content)
Parameters
content
byte[]
CLexer(MemoryStream)
Initializes a new instance of the Lexer class.
public CLexer(MemoryStream content)
Parameters
content
MemoryStream
Properties
ContLength
Gets the length of the content.
public int ContLength { get; }
Property Value
Position
Gets or sets the position in the content.
public int Position { get; set; }
Property Value
Symbol
Gets or sets the current symbol.
public CSymbol Symbol { get; set; }
Property Value
Token
Gets the current token.
public string Token { get; }
Property Value
Methods
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 char MoveToNonWhiteSpace()
Returns
ScanComment()
Scans a comment line. (Not yet used, comments are skipped by lexer.)
public CSymbol ScanComment()
Returns
ScanDictionary()
Scans the dictionary.
protected CSymbol ScanDictionary()
Returns
ScanHexadecimalString()
Scans a hexadecimal string.
public CSymbol ScanHexadecimalString()
Returns
ScanInlineImage()
Scans the bytes of an inline image. NYI: Just scans over it.
public CSymbol ScanInlineImage()
Returns
ScanLiteralString()
Scans a literal string.
public CSymbol ScanLiteralString()
Returns
ScanName()
Scans a name.
public CSymbol ScanName()
Returns
ScanNextToken()
Reads the next token and returns its type.
public CSymbol ScanNextToken()
Returns
ScanNumber()
Scans an integer or real number.
public CSymbol ScanNumber()
Returns
ScanOperator()
Scans an operator.
public CSymbol ScanOperator()