2014-06-15 05:13:25 +00:00
|
|
|
/*
|
|
|
|
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
|
|
|
Author: Leonardo de Moura
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "kernel/environment.h"
|
2014-06-17 17:12:04 +00:00
|
|
|
#include "frontends/lean/parser_config.h"
|
2014-06-15 05:13:25 +00:00
|
|
|
namespace lean {
|
|
|
|
class parser;
|
2014-06-17 17:12:04 +00:00
|
|
|
|
2014-06-15 05:13:25 +00:00
|
|
|
environment precedence_cmd(parser & p);
|
2014-06-15 18:50:41 +00:00
|
|
|
environment notation_cmd_core(parser & p, bool overload);
|
|
|
|
environment infixl_cmd_core(parser & p, bool overload);
|
|
|
|
environment infixr_cmd_core(parser & p, bool overload);
|
|
|
|
environment postfix_cmd_core(parser & p, bool overload);
|
|
|
|
inline environment notation_cmd(parser & p) { return notation_cmd_core(p, true); }
|
|
|
|
inline environment infixl_cmd(parser & p) { return infixl_cmd_core(p, true); }
|
|
|
|
inline environment infixr_cmd(parser & p) { return infixr_cmd_core(p, true); }
|
|
|
|
inline environment postfix_cmd(parser & p) { return postfix_cmd_core(p, true); }
|
2014-06-17 17:12:04 +00:00
|
|
|
|
|
|
|
/** \brief Return true iff the current token is a notation declaration */
|
|
|
|
bool curr_is_notation_decl(parser & p);
|
|
|
|
/** \brief Parse a notation declaration, throws an error if the current token is not a "notation declaration". */
|
|
|
|
notation_entry parse_notation(parser & p, bool overload, buffer<token_entry> & new_tokens);
|
2014-06-15 05:13:25 +00:00
|
|
|
}
|