aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar notin <notin@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-10-23 13:02:56 +0000
committerGravatar notin <notin@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-10-23 13:02:56 +0000
commit3516168ef6732dfb5fe8154f5e899645b7b2161f (patch)
treea2d46811f85fedb57deb5a4fd351747581c1288e
parent699c507995fb9ede2eb752a01f90cf6d8caad4de (diff)
Ajout de mots clés pour Coqdoc (bug #1732)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10248 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--tools/coqdoc/output.ml7
-rw-r--r--tools/coqdoc/pretty.mll36
2 files changed, 24 insertions, 19 deletions
diff --git a/tools/coqdoc/output.ml b/tools/coqdoc/output.ml
index 9b823bca8..1cbee6046 100644
--- a/tools/coqdoc/output.ml
+++ b/tools/coqdoc/output.ml
@@ -41,8 +41,11 @@ let is_keyword =
"Mutual"; "Parameter"; "Parameters"; "Print"; "Proof"; "Qed";
"Record"; "Recursive"; "Remark"; "Require"; "Save"; "Scheme";
"Section"; "Show"; "Structure"; "Syntactic"; "Syntax"; "Tactic"; "Theorem";
- "Unset"; "Variable"; "Variables";
- "Notation";
+ "Set"; "Unset"; "Variable"; "Variables";
+ "Notation"; "Reserved Notation"; "Tactic Notation";
+ "Delimit"; "Bind"; "Open"; "Scope";
+ "Boxed"; "Unboxed";
+ "Arguments";
(* Program *)
"Program Definition"; "Program Fixpoint"; "Program Lemma";
"Obligation"; "Obligations"; "Solve"; "using"; "Next Obligation"; "Next";
diff --git a/tools/coqdoc/pretty.mll b/tools/coqdoc/pretty.mll
index 2763cb181..6d088a70a 100644
--- a/tools/coqdoc/pretty.mll
+++ b/tools/coqdoc/pretty.mll
@@ -229,7 +229,7 @@ let decl_token =
let gallina_ext =
"Module"
- | "Declare"
+ | "Declare" space+ "Module"
| "Transparent"
| "Opaque"
| "Canonical"
@@ -338,26 +338,28 @@ rule coq_bol = parse
{ end_show (); coq_bol lexbuf }
| space* gallina_kw_to_hide
{ let s = lexeme lexbuf in
- if !light && section_or_end s then begin
- skip_to_dot lexbuf;
- coq_bol lexbuf
- end else begin
- let s = lexeme lexbuf in
- let nbsp = count_spaces s in
- indentation nbsp;
- let s = String.sub s nbsp (String.length s - nbsp) in
- ident s (lexeme_start lexbuf + nbsp);
- let eol= body lexbuf in
- if eol then coq_bol lexbuf else coq lexbuf
- end }
+ if !light && section_or_end s then
+ begin
+ skip_to_dot lexbuf;
+ coq_bol lexbuf
+ end
+ else
+ begin
+ let nbsp = count_spaces s in
+ indentation nbsp;
+ let s = String.sub s nbsp (String.length s - nbsp) in
+ ident s (lexeme_start lexbuf + nbsp);
+ let eol = body lexbuf in
+ if eol then coq_bol lexbuf else coq lexbuf
+ end }
| space* gallina_kw
{ let s = lexeme lexbuf in
let nbsp = count_spaces s in
+ let s = String.sub s nbsp (String.length s - nbsp) in
indentation nbsp;
- let s = String.sub s nbsp (String.length s - nbsp) in
- ident s (lexeme_start lexbuf + nbsp);
- let eol= body lexbuf in
- if eol then coq_bol lexbuf else coq lexbuf }
+ ident s (lexeme_start lexbuf + nbsp);
+ let eol= body lexbuf in
+ if eol then coq_bol lexbuf else coq lexbuf }
| space* prog_kw
{ let s = lexeme lexbuf in
let nbsp = count_spaces s in