38 parser(std::istream& input);
151 template<
class OutputIterator>
163 void get_string(std::string& result,
char delimiter);
204 void parse_loop(std::istream& input, std::ostream& output);
206 template<
class OutputIterator>
214 throw syntax_error{
"expected function parameter, got " + token};
223 throw syntax_error{
"expected comma in function paramter list, got " + token};
226 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_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
void get_escape(std::string &str)
bool isdigit(char c) const