Ipelib

ipe::Lex Class Reference

Lexical analyser. Seeded with a string. More...

#include <ipebase.h>

List of all members.

Public Member Functions


Detailed Description

Lexical analyser. Seeded with a string.


Constructor & Destructor Documentation

Lex::Lex ( String  str) [explicit]

Construct lexical analyzer from a string.


Member Function Documentation

String Lex::token ( )

Return NextToken, but without extracting it.

String Lex::nextToken ( )

Extract next token.

Skips any whitespace before the token. Returns empty string if end of string is reached.

int Lex::getInt ( )

Extract integer token (skipping whitespace).

int Lex::getHexByte ( )

Extract byte in hex (skipping whitespace).

Fixed Lex::getFixed ( )

Extract Fixed token (skipping whitespace).

unsigned long int Lex::getHexNumber ( )

Extract hexadecimal token (skipping whitespace).

double Lex::getDouble ( )

Extract double token (skipping whitespace).

char ipe::Lex::getChar ( ) [inline]

Extract next character (not skipping anything).

void Lex::skipWhitespace ( )

Skip over whitespace.

Lex& ipe::Lex::operator>> ( int &  i) [inline]

Operator syntax for getInt().

Lex& ipe::Lex::operator>> ( double &  d) [inline]

Operator syntax for getDouble().

Lex& ipe::Lex::operator>> ( Fixed d) [inline]

Operator syntax for getFixed().

void ipe::Lex::mark ( ) [inline]

Mark the current position.

void ipe::Lex::fromMark ( ) [inline]

Reset reader to the marked position.

bool ipe::Lex::eos ( ) const [inline]

Return true if at end of string (not even whitespace left).


The documentation for this class was generated from the following files: