Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

CTBxmlLexer Class Reference

XML lexical analyser **. More...

#include "CTBxmlLexer.hxx"

List of all members.

Public Types

enum  mode {
  tagordata, tagattr, attrval, valsquote,
  valdquote
}

Public Methods

 CTBxmlLexer ()
void Get (istream &is, CTBxmlLexerToken &lt)
void Clear ()
int NLine () const
int NColumn () const
void Mode (int i_mode)
int Mode () const
void Dump (int i_indent=0, ostream &os=cout, const char *p_text=0) const

Private Methods

int GetChar (istream &is)
void GetEntity (istream &is, CTBxmlLexerToken &lt)
void GetWhite (istream &is, CTBxmlLexerToken &lt)
void GetName (istream &is, CTBxmlLexerToken &lt)

Private Attributes

int mi_mode
int mi_nline_t
int mi_ncolumn_t
int mi_nline_s
int mi_ncolumn_s


Detailed Description

XML lexical analyser **.

Definition at line 20 of file CTBxmlLexer.hxx.


Member Enumeration Documentation

enum CTBxmlLexer::mode
 

Lexer mode.

Enumeration values:
tagordata   look for tags or data.
tagattr   look for tag attributes.
attrval   look for attribute value.
valsquote   look for rest of '...' value.
valdquote   look for rest of "..." value.

Definition at line 22 of file CTBxmlLexer.hxx.


Constructor & Destructor Documentation

CTBxmlLexer::CTBxmlLexer
 

Default constructor.

Definition at line 36 of file CTBxmlLexer.cxx.


Member Function Documentation

void CTBxmlLexer::Get istream & is,
CTBxmlLexerToken & lt
 

Extract lext token lt from stream is.

Definition at line 49 of file CTBxmlLexer.cxx.

Referenced by CTBxmlIStream::GetLexerToken().

void CTBxmlLexer::Clear
 

Reset lexer context.

Definition at line 272 of file CTBxmlLexer.cxx.

int CTBxmlLexer::NLine const [inline]
 

Returns line number at begin of last token (1 based).

Definition at line 18 of file CTBxmlLexer.icc.

Referenced by CTBxmlIStream::ToStream().

int CTBxmlLexer::NColumn const [inline]
 

Returns column number at begin of last token (1 based).

Definition at line 26 of file CTBxmlLexer.icc.

Referenced by CTBxmlIStream::ToStream().

void CTBxmlLexer::Mode int i_mode [inline]
 

Set lexer mode to i_mode.

The set of tokens recognized by the lexer is determined by the `mode' given as one of the values of CTBxmlLexer::mode :

tagordata
  • tagopen
  • etagopen
  • defopen
  • comment
  • piopen
  • charref
  • entref
  • white
  • data
tagattr
  • tagclose
  • etagclose
  • piclose
  • white
  • name
attrval
  • equal
  • squote
  • dquote
  • white
  • name
valsquote
  • squote
  • charref
  • entref
  • white
  • data
valdquote
  • dquote
  • charref
  • entref
  • white
  • data

Definition at line 93 of file CTBxmlLexer.icc.

Referenced by CTBxmlIStream::GetLexerToken().

int CTBxmlLexer::Mode const [inline]
 

Returns lexer mode.

Definition at line 102 of file CTBxmlLexer.icc.

void CTBxmlLexer::Dump int i_indent = 0,
ostream & os = cout,
const char * p_text = 0
const
 

Dump.

Definition at line 286 of file CTBxmlLexer.cxx.

Referenced by CTBxmlIStream::Dump().

int CTBxmlLexer::GetChar istream & is [private]
 

Get next character from stream is.

Definition at line 306 of file CTBxmlLexer.cxx.

Referenced by Get(), GetEntity(), GetName(), and GetWhite().

void CTBxmlLexer::GetEntity istream & is,
CTBxmlLexerToken & lt
[private]
 

Get rest of an entity.

Definition at line 325 of file CTBxmlLexer.cxx.

Referenced by Get().

void CTBxmlLexer::GetWhite istream & is,
CTBxmlLexerToken & lt
[private]
 

Get rest of white space.

Definition at line 353 of file CTBxmlLexer.cxx.

Referenced by Get().

void CTBxmlLexer::GetName istream & is,
CTBxmlLexerToken & lt
[private]
 

Get rest of name.

Definition at line 367 of file CTBxmlLexer.cxx.

Referenced by Get().


Member Data Documentation

int CTBxmlLexer::mi_mode [private]
 

lexer mode, mask of enabled.

Definition at line 50 of file CTBxmlLexer.hxx.

int CTBxmlLexer::mi_nline_t [private]
 

current line number (token).

Definition at line 51 of file CTBxmlLexer.hxx.

int CTBxmlLexer::mi_ncolumn_t [private]
 

current column number (token).

Definition at line 52 of file CTBxmlLexer.hxx.

int CTBxmlLexer::mi_nline_s [private]
 

current line number (stream).

Definition at line 53 of file CTBxmlLexer.hxx.

int CTBxmlLexer::mi_ncolumn_s [private]
 

current column number (stream).

Definition at line 54 of file CTBxmlLexer.hxx.


The documentation for this class was generated from the following files:
Generated at Fri Oct 24 18:14:14 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001