RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TParser Class

TParser allows DFM files to be parsed.

Pascal
TParser = class(TObject);
C++
class TParser : public TObject;

Classes

The TParser is principally used internally in RAD Studio to parse (tokenise) VCL Form files (which have a .dfm extension on Win32, and .nfm on .NET). However, it can potentially be used as a more general parser.  

A VCL form file contains the description of the properties of the form and the components it owns. Each form file represents a single form, which usually corresponds to a window or dialog box in an application.  

The parsing dissects the form text into a set of symbol strings, and value strings. Values may be string representations of strings, widestrings, integers, or floating point numbers.  

Navigation is performed by repeatedly using the NextToken method to retrieve a sequence of tokens (symobols and values). The value of each retrieved token is obtained using the TParser methods :

Method 
Returns 
Token(s) 
Float  
TokenInteger  
Integer  
String  
WideString  

 

toEOF is the token returned when the form navigation is complete. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!