org.pdfclown.util.parsers.PostScriptParser Class Reference

PostScript (non-procedural subset) parser [PS]. More...

Inheritance diagram for org.pdfclown.util.parsers.PostScriptParser:
org.pdfclown.documents.contents.fonts.CMapParser org.pdfclown.tokens.BaseParser org.pdfclown.documents.contents.tokens.ContentParser org.pdfclown.tokens.FileParser

List of all members.

Public Types

enum  TokenTypeEnum {
  Keyword, Boolean, Integer, Real,
  Literal, Hex, Name, Comment,
  ArrayBegin, ArrayEnd, DictionaryBegin, DictionaryEnd,
  Null
}

Public Member Functions

void Dispose ()
override int GetHashCode ()
object GetToken (int offset)
 Gets a token after moving to the given offset.
virtual bool MoveNext ()
 Moves the pointer to the next token.
bool MoveNext (int offset)
 Moves the pointer to the next token.
 PostScriptParser (byte[] data)
 PostScriptParser (IInputStream stream)
void Seek (long offset)
 Moves the pointer to the given absolute byte position.
void Skip (long offset)
 Moves the pointer to the given relative byte position.
bool SkipEOL ()
 Moves the pointer before the next non-EOL character after the current position.
bool SkipWhitespace ()
 Moves the pointer before the next non-whitespace character after the current position.

Properties

long Length [get]
long Position [get]
IInputStream Stream [get]
object Token [get, set]
 Gets the currently-parsed token.
TokenTypeEnum TokenType [get, set]
 Gets the currently-parsed token type.

PostScript (non-procedural subset) parser [PS].


Member Enumeration Documentation

Enumerator:
Keyword 
Boolean 
Integer 
Real 
Literal 
Hex 
Name 
Comment 
ArrayBegin 
ArrayEnd 
DictionaryBegin 
DictionaryEnd 
Null 

Constructor & Destructor Documentation

org.pdfclown.util.parsers.PostScriptParser.PostScriptParser ( IInputStream  stream  ) 
org.pdfclown.util.parsers.PostScriptParser.PostScriptParser ( byte[]  data  ) 

Member Function Documentation

void org.pdfclown.util.parsers.PostScriptParser.Dispose (  ) 
override int org.pdfclown.util.parsers.PostScriptParser.GetHashCode (  ) 
object org.pdfclown.util.parsers.PostScriptParser.GetToken ( int  offset  ) 

Gets a token after moving to the given offset.

Parameters:
offset Number of tokens to skip before reaching the intended one.
See also:
Token
virtual bool org.pdfclown.util.parsers.PostScriptParser.MoveNext (  )  [virtual]

Moves the pointer to the next token.

To properly parse the current token, the pointer MUST be just before its starting (leading whitespaces are ignored). When this method terminates, the pointer IS at the last byte of the current token.

Returns:
Whether a new token was found.

Reimplemented in org.pdfclown.tokens.BaseParser, and org.pdfclown.tokens.FileParser.

bool org.pdfclown.util.parsers.PostScriptParser.MoveNext ( int  offset  ) 

Moves the pointer to the next token.

Parameters:
offset Number of tokens to skip before reaching the intended one.
void org.pdfclown.util.parsers.PostScriptParser.Seek ( long  offset  ) 

Moves the pointer to the given absolute byte position.

void org.pdfclown.util.parsers.PostScriptParser.Skip ( long  offset  ) 

Moves the pointer to the given relative byte position.

bool org.pdfclown.util.parsers.PostScriptParser.SkipEOL (  ) 

Moves the pointer before the next non-EOL character after the current position.

Returns:
Whether the stream can be further read.
bool org.pdfclown.util.parsers.PostScriptParser.SkipWhitespace (  ) 

Moves the pointer before the next non-whitespace character after the current position.

Returns:
Whether the stream can be further read.

Property Documentation

long org.pdfclown.util.parsers.PostScriptParser.Length [get]
long org.pdfclown.util.parsers.PostScriptParser.Position [get]
IInputStream org.pdfclown.util.parsers.PostScriptParser.Stream [get]
object org.pdfclown.util.parsers.PostScriptParser.Token [get, set]

Gets the currently-parsed token.

TokenTypeEnum org.pdfclown.util.parsers.PostScriptParser.TokenType [get, set]

Gets the currently-parsed token type.

Copyright 2006-2013 Stefano Chizzolini. For more information, please visit PDF Clown home page.

Generated on Sat Feb 9 21:08:41 2013 for PDF Clown 0.1.2 by  doxygen 1.6.3