Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::VFFParser Class Reference

A class used for parsing VFF files, at this moment (8/25/2001) meant for internal use only. More...

#include <vcf/FoundationKit/VFFParser.h>

Inheritance diagram for VCF::VFFParser:

VCF::Object List of all members.

Public Types

enum  {
  PARSE_BUF_SIZE = 4096, TO_EOF = 0, TO_SYMBOL, TO_STRING,
  TO_INTEGER, TO_FLOAT, TO_COMMENT
}

Public Member Functions

 VFFParser (InputStream *is)
virtual ~VFFParser ()
void resetStream ()
void checkToken (const VCFChar &T)
void checkTokenSymbol (const String &s)
void error (const String &Ident)
void errorStr (const String &Message)
VCFChar nextToken ()
int32 sourcePos ()
String tokenComponentIdent ()
double tokenFloat ()
int32 tokenInt ()
String tokenString ()
bool tokenSymbolIs (const String &s)
int32 getSourceLine ()
VCFChar getToken ()
String binHexToString ()
void savePosition ()
void restorePosition ()

Protected Member Functions

void skipBlanks ()

Protected Attributes

InputStreamstream_
int32 origin_
VCFCharbuffer_
VCFCharbufPtr_
VCFCharbufEnd_
ParsePosition current_
ParsePosition saved_

Detailed Description

A class used for parsing VFF files, at this moment (8/25/2001) meant for internal use only.

The Visual Form File (VFF) is a text based format used to store components. The syntax can be represented in Backus-Naur format:

component-decl ::= "object" component-id component-properties 
    *(component-decl) component-delegates  "end"
component-id ::= component-name component-class ["," component-classid]

component-name ::= id
id ::= ALPHA *(ALPHA | DIGIT | '_' )
component-class ::= ALPHA *(ALPHA | DIGIT | '_' | "::" )
component-classid ::= ''' 1*(ALPHA | DIGIT | '-' ) '''

component-properties ::= 1*component-property
component-property ::= property-name '=' property-value
property-name ::= id | property-object-name
property-object-name ::= property-name '.' property-name
property-value ::= property-string | property-number | 
    property-component-ref | property-enum |
    property-enum-mask | property-binary | property-bool

property-string ::= ''' *(ALPHA | DIGIT | 'any printable unicode char' )  '''
property-number ::= 1*DIGIT ['.' 1*(DIGIT) ]
property-component-ref ::= ('@' component-name) | "null"
property-enum ::= id
property-enum-mask ::= '[' property-enum *[',' property-enum]  ']'
property-binary ::= '{'  binary-data  '}'
binary-data ::=  1*(binary-byte)
binary-byte ::= (DIGIT | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' ) 
    (DIGIT | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' )
property-bool ::=  "true" | "false"

component-delegates ::= "delegates"  *(component-delegate-decl) "end"
component-delegate-decl ::= delegate-name '=' delegate-array
delegate-name ::= id
delegate-array ::= '[' 1*(event-handler-ref)  ']'
event-handler-ref ::= component-instance '@' component-callback-method
component-instance ::= id
component-callback-method ::= component-classname "::" component-methodname
component-classname ::= id
component-methodname ::= id


Member Enumeration Documentation

anonymous enum
 

Enumerator:
PARSE_BUF_SIZE 
TO_EOF 
TO_SYMBOL 
TO_STRING 
TO_INTEGER 
TO_FLOAT 
TO_COMMENT 


Constructor & Destructor Documentation

VCF::VFFParser::VFFParser InputStream is  ) 
 

virtual VCF::VFFParser::~VFFParser  )  [virtual]
 


Member Function Documentation

String VCF::VFFParser::binHexToString  ) 
 

void VCF::VFFParser::checkToken const VCFChar T  ) 
 

void VCF::VFFParser::checkTokenSymbol const String s  ) 
 

void VCF::VFFParser::error const String Ident  ) 
 

void VCF::VFFParser::errorStr const String Message  ) 
 

int32 VCF::VFFParser::getSourceLine  )  [inline]
 

VCFChar VCF::VFFParser::getToken  )  [inline]
 

VCFChar VCF::VFFParser::nextToken  ) 
 

void VCF::VFFParser::resetStream  ) 
 

void VCF::VFFParser::restorePosition  ) 
 

void VCF::VFFParser::savePosition  ) 
 

void VCF::VFFParser::skipBlanks  )  [protected]
 

int32 VCF::VFFParser::sourcePos  ) 
 

String VCF::VFFParser::tokenComponentIdent  ) 
 

double VCF::VFFParser::tokenFloat  ) 
 

int32 VCF::VFFParser::tokenInt  ) 
 

String VCF::VFFParser::tokenString  ) 
 

bool VCF::VFFParser::tokenSymbolIs const String s  ) 
 


Member Data Documentation

VCFChar* VCF::VFFParser::bufEnd_ [protected]
 

VCFChar* VCF::VFFParser::buffer_ [protected]
 

VCFChar* VCF::VFFParser::bufPtr_ [protected]
 

ParsePosition VCF::VFFParser::current_ [protected]
 

int32 VCF::VFFParser::origin_ [protected]
 

ParsePosition VCF::VFFParser::saved_ [protected]
 

InputStream* VCF::VFFParser::stream_ [protected]
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information