Ipelib
|
#include <ipebase.h>
Public Member Functions | |
Lex (String str) | |
String | token () |
String | nextToken () |
int | getInt () |
int | getHexByte () |
Fixed | getFixed () |
unsigned long int | getHexNumber () |
double | getDouble () |
char | getChar () |
void | skipWhitespace () |
Lex & | operator>> (int &i) |
Lex & | operator>> (double &d) |
Lex & | operator>> (Fixed &d) |
void | mark () |
void | fromMark () |
bool | eos () const |
Lexical analyser. Seeded with a string.
|
explicit |
Construct lexical analyzer from a string.
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).
unsigned long int Lex::getHexNumber | ( | ) |
Extract hexadecimal token (skipping whitespace).
double Lex::getDouble | ( | ) |
Extract double token (skipping whitespace).
|
inline |
Extract next character (not skipping anything).
void Lex::skipWhitespace | ( | ) |
Skip over whitespace.
|
inline |
Operator syntax for getDouble().
Operator syntax for getFixed().
|
inline |
Mark the current position.
|
inline |
Reset reader to the marked position.
|
inline |
Return true if at end of string (not even whitespace left).