antlr/ANTLRUtil.hpp File Reference

#include <antlr/config.hpp>
#include <iostream>
Include dependency graph for ANTLRUtil.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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)

Function Documentation

std ::istream& eatwhite ( std::istream &  is  ) 

Eat whitespace from the input stream

Parameters:
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.

Parameters:
in the istream to read from.
attribute string the attribute name is put in
value string the value of the attribute is put in
Exceptions:
ios_base::failure if something is fishy. E.g. malformed quoting or missing '='

Read a attribute="value" thing. Leading whitespace is skipped. Between attribute and '=' no whitespace is allowed. After the '=' it is permitted.

Parameters:
in the istream to read from.
attribute string the attribute name is put in
value string the value of the attribute is put in
Exceptions:
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.

Parameters:
in the istream to read from.
Returns:
the string read from file exclusive the ''
Exceptions:
ios_base::failure if string is badly formatted

Read a string enclosed by '"' from a stream. Also handles escaping of \". Skips leading whitespace.

Parameters:
in the istream to read from.
Returns:
the string read from file exclusive the ''
Exceptions:
IOException if string is badly formatted
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on 16 Nov 2015 for ANTLR Support Libraries 2.7.1+ by  doxygen 1.6.1