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-17 20:39:44 +00:00
|
|
|
#include "frontends/lean/cmd_table.h"
|
2014-06-15 05:13:25 +00:00
|
|
|
namespace lean {
|
|
|
|
class parser;
|
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);
|
2014-10-11 23:38:55 +00:00
|
|
|
/** \brief Parse a notation declaration, throws an error if the current token is not a "notation declaration".
|
|
|
|
If allow_local is true, then notation may contain reference to local constants.
|
|
|
|
*/
|
|
|
|
notation_entry parse_notation(parser & p, bool overload, buffer<token_entry> & new_tokens, bool allow_local);
|
2014-06-17 20:39:44 +00:00
|
|
|
|
2015-01-26 19:31:12 +00:00
|
|
|
/** \brief Parse local notation */
|
|
|
|
environment local_notation_cmd(parser & p);
|
|
|
|
|
2014-06-17 20:39:44 +00:00
|
|
|
void register_notation_cmds(cmd_table & r);
|
2014-06-15 05:13:25 +00:00
|
|
|
}
|