39 parser(std::istream& input);
160 template<
class OutputIterator>
172 void get_string(std::string& result,
char delimiter);
213 void parse_loop(std::istream& input, std::ostream& output);
215 template<
class OutputIterator>
223 throw syntax_error{
"expected function parameter, got " + token};
232 throw syntax_error{
"expected comma in function paramter list, got " + token};
235 throw syntax_error{
"unexpected end of line in function parameter list"};
void get_string(std::string &result, char delimiter)
void parse_loop(std::istream &input, std::ostream &output)
bool isprint(char c) const
bool get_expr(node &result)
parser(std::istream &input)
void get_identifier(std::string &identifier)
std::string charify(char c)
void get_definition(std::string &name, identifier_list ¶meters, node &definition)
void push_back(std::string const &token, kind k)
bool get_statement(std::ostream &output)
bool get_integer(std::string const &token, node &result)
bool get_primary(node &result)
std::vector< std::string > identifier_list
A sequence of identifiers (e.g., parameter names).
OutputIterator get_namelist(OutputIterator output)
bool get_unary(node &result)
bool isalpha(char c) const
kind get_token(std::string &token)
std::string token_
One token push-back.
bool get_float(std::string const &token, node &result)
std::istream & input_
Share the input stream.
kind kind_
The kind of token that was pushed back.
std::vector< node > node_list
A sequence of nodes.
std::ctype< char > const & ctype_
Cache the ctype facet for checking character categories.
bool get_mul_expr(node &result)
bool get_add_expr(node &result)
void get_expr_list(node_list &result)
bool isalnum(char c) const
void get_escape(std::string &str)
bool isdigit(char c) const