ANTLR Support Libraries 2.7.1+
|
#include <antlr/config.hpp>
#include <antlr/IOException.hpp>
#include <iostream>
#include <cctype>
#include <string>
Functions | |
std ::istream & | eatwhite (std ::istream &is) |
std ::string | read_string (std ::istream &in) |
std ::string | read_identifier (std ::istream &in) |
void | read_AttributeNValue (std ::istream &in, std ::string &attribute, std ::string &value) |
std ::istream& eatwhite | ( | std ::istream & | is | ) |
Eat whitespace from the input stream
is | the stream to read from |
void read_AttributeNValue | ( | std ::istream & | in, |
std ::string & | attribute, | ||
std ::string & | value | ||
) |
Read a attribute="value" thing. Leading whitespace is skipped. Between attribute and '=' no whitespace is allowed. After the '=' it is permitted.
in | the istream to read from. |
attribute | string the attribute name is put in |
value | string the value of the attribute is put in |
IOException | if something is fishy. E.g. malformed quoting or missing '=' |
std ::string read_identifier | ( | std ::istream & | in | ) |
std ::string read_string | ( | std ::istream & | in | ) |
Read a string enclosed by '"' from a stream. Also handles escaping of ". Skips leading whitespace.
in | the istream to read from. |
IOException | if string is badly formatted |