2014-06-18 17:36:21 +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 "util/buffer.h"
|
|
|
|
#include "kernel/expr.h"
|
|
|
|
#include "frontends/lean/cmd_table.h"
|
|
|
|
namespace lean {
|
|
|
|
class parser;
|
2014-06-18 20:55:48 +00:00
|
|
|
/**
|
|
|
|
\brief Parse (optional) universe parameters <tt>'.{' l_1 ... l_k '}'</tt>
|
|
|
|
Store the result in \c ps.
|
|
|
|
Return true when levels were provided.
|
|
|
|
*/
|
|
|
|
bool parse_univ_params(parser & p, buffer<name> & ps);
|
2015-01-10 18:11:13 +00:00
|
|
|
expr parse_match(parser & p, unsigned, expr const *, pos_info const & pos);
|
2015-03-07 03:04:09 +00:00
|
|
|
expr parse_local_equations(parser & p, expr const & fn);
|
|
|
|
|
2015-05-25 22:24:56 +00:00
|
|
|
/** \brief Return true iff \c n is the auxiliary name used to elaborate match-expressions. */
|
|
|
|
bool is_match_binder_name(name const & n);
|
|
|
|
|
2015-01-26 19:31:12 +00:00
|
|
|
/** \brief Add universe levels from \c found_ls to \c ls_buffer (only the levels that do not already occur in \c ls_buffer are added).
|
2014-06-18 20:55:48 +00:00
|
|
|
Then sort \c ls_buffer (using the order in which the universe levels were declared).
|
|
|
|
*/
|
|
|
|
void update_univ_parameters(buffer<name> & ls_buffer, name_set const & found_ls, parser const & p);
|
2015-01-26 19:31:12 +00:00
|
|
|
|
2015-02-11 01:31:40 +00:00
|
|
|
/** \brief Parse a local abbreviation command */
|
|
|
|
environment local_abbreviation_cmd(parser & p);
|
|
|
|
|
2015-01-26 19:31:12 +00:00
|
|
|
/** \brief Parse a local attribute command */
|
|
|
|
environment local_attribute_cmd(parser & p);
|
2014-06-18 17:36:21 +00:00
|
|
|
void register_decl_cmds(cmd_table & r);
|
2015-05-25 22:24:56 +00:00
|
|
|
|
|
|
|
void initialize_decl_cmds();
|
|
|
|
void finalize_decl_cmds();
|
2014-06-18 17:36:21 +00:00
|
|
|
}
|