38 parser(std::istream& input);
148 template<
class OutputIterator>
190 void parse_loop(std::istream& input, std::ostream& output);
192 template<
class OutputIterator>
200 throw syntax_error{
"expected function parameter, got " + token};
209 throw syntax_error{
"expected comma in function paramter list, got " + token};
212 throw syntax_error{
"unexpected end of line in function parameter list"};
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_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.
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.
bool get_number(std::string const &token, node &result)
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
bool isdigit(char c) const