Commit f53b752f authored by Andrei Paskevich's avatar Andrei Paskevich

Parser: use "scope" instead of "namespace"

parent a04cd4da
......@@ -29,7 +29,7 @@ let debug_print_locs = Debug.register_info_flag "print_locs"
let iprinter,aprinter,tprinter,pprinter =
let bl = ["theory"; "type"; "constant"; "function"; "predicate"; "inductive";
"axiom"; "lemma"; "goal"; "use"; "clone"; "prop"; "meta";
"namespace"; "import"; "export"; "end";
"scope"; "import"; "export"; "end";
"forall"; "exists"; "not"; "true"; "false"; "if"; "then"; "else";
"let"; "in"; "match"; "with"; "as"; "epsilon" ] in
let isanitize = sanitizer char_to_alpha char_to_alnumus in
......
......@@ -46,7 +46,7 @@
"let", LET;
"match", MATCH;
"meta", META;
"namespace", NAMESPACE;
"scope", SCOPE;
"not", NOT;
"predicate", PREDICATE;
"prop", PROP;
......
......@@ -103,7 +103,7 @@
%token AS AXIOM CLONE COINDUCTIVE CONSTANT
%token ELSE END EPSILON EXISTS EXPORT FALSE FORALL FUNCTION
%token GOAL IF IMPORT IN INDUCTIVE LEMMA
%token LET MATCH META NAMESPACE NOT PROP PREDICATE
%token LET MATCH META NOT PREDICATE PROP SCOPE
%token THEN THEORY TRUE TYPE USE WITH
(* program keywords *)
......@@ -184,7 +184,7 @@ module_decl:
{ Typing.close_namespace (floc $startpos($1) $endpos($1)) ~import:$1 }
namespace_head:
| NAMESPACE boption(IMPORT) uident { Typing.open_namespace $3; $2 }
| SCOPE boption(IMPORT) uident { Typing.open_namespace $3; $2 }
(* Use and clone *)
......@@ -202,7 +202,7 @@ use:
{ { use_module = $2; use_import = None } }
clone_subst:
| NAMESPACE ns EQUAL ns { CSns (floc $startpos $endpos, $2,$4) }
| SCOPE ns EQUAL ns { CSns (floc $startpos $endpos, $2,$4) }
| TYPE qualid ty_var* EQUAL ty { CStsym (floc $startpos $endpos, $2,$3,$5) }
| CONSTANT qualid EQUAL qualid { CSfsym (floc $startpos $endpos, $2,$4) }
| FUNCTION qualid EQUAL qualid { CSfsym (floc $startpos $endpos, $2,$4) }
......
......@@ -23,7 +23,7 @@ open Theory
let iprinter,aprinter,tprinter,pprinter =
let bl = ["theory"; "type"; "function"; "predicate"; "inductive";
"axiom"; "lemma"; "goal"; "use"; "clone"; "prop"; "meta";
"namespace"; "import"; "export"; "end";
"scope"; "import"; "export"; "end";
"forall"; "exists"; "not"; "true"; "false"; "if"; "then"; "else";
"let"; "in"; "match"; "with"; "as"; "epsilon" ] in
let isanitize = sanitizer char_to_alpha char_to_alnumus in
......
......@@ -36,8 +36,8 @@
let is_keyword1 = make_table [ "as"; "axiom"; "clone"; "coinductive";
"constant"; "else"; "end"; "epsilon"; "exists"; "export"; "false";
"forall"; "function"; "goal"; "if"; "import"; "in"; "inductive";
"lemma"; "let"; "match"; "meta"; "namespace"; "not"; "predicate";
"prop"; "then"; "theory"; "true"; "type"; "use"; "with";
"lemma"; "let"; "match"; "meta"; "not"; "predicate"; "prop";
"scope"; "then"; "theory"; "true"; "type"; "use"; "with";
(* programs *) "abstract"; "any";
"begin"; "do"; "done"; "downto"; "exception";
"for"; "fun"; "ghost"; "loop"; "model"; "module";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment