added outer_keyword.scala: Isar command keyword classification;
authorwenzelm
Sun, 11 Jan 2009 20:40:09 +0100
changeset 29449 6e7745d35a30
parent 29448 34b9652b2f45
child 29450 ac7f67be7f1f
added outer_keyword.scala: Isar command keyword classification;
src/Pure/IsaMakefile
src/Pure/Isar/outer_keyword.scala
--- a/src/Pure/IsaMakefile	Sun Jan 11 18:18:35 2009 +0100
+++ b/src/Pure/IsaMakefile	Sun Jan 11 20:40:09 2009 +0100
@@ -26,37 +26,37 @@
   Concurrent/par_list_dummy.ML Concurrent/simple_thread.ML		\
   Concurrent/synchronized.ML Concurrent/task_queue.ML General/ROOT.ML	\
   General/alist.ML General/balanced_tree.ML General/basics.ML		\
-  General/binding.ML							\
-  General/buffer.ML General/file.ML General/graph.ML General/heap.ML	\
-  General/integer.ML General/lazy.ML General/markup.ML			\
-  General/name_space.ML General/ord_list.ML General/output.ML		\
-  General/path.ML General/position.ML General/pretty.ML			\
-  General/print_mode.ML General/properties.ML General/queue.ML		\
-  General/scan.ML General/secure.ML General/seq.ML General/source.ML	\
-  General/stack.ML General/symbol.ML General/symbol_pos.ML		\
-  General/table.ML General/url.ML General/xml.ML General/yxml.ML	\
-  Isar/ROOT.ML Isar/antiquote.ML Isar/args.ML Isar/attrib.ML		\
-  Isar/auto_bind.ML Isar/calculation.ML Isar/class.ML Isar/class_target.ML Isar/code.ML	\
-  Isar/code_unit.ML Isar/constdefs.ML Isar/context_rules.ML		\
-  Isar/element.ML Isar/expression.ML Isar/find_theorems.ML		\
-  Isar/isar.ML Isar/isar_cmd.ML Isar/isar_syn.ML	\
-  Isar/local_defs.ML Isar/local_syntax.ML Isar/local_theory.ML		\
-  Isar/locale.ML Isar/method.ML Isar/net_rules.ML Isar/old_locale.ML	\
+  General/binding.ML General/buffer.ML General/file.ML			\
+  General/graph.ML General/heap.ML General/integer.ML General/lazy.ML	\
+  General/markup.ML General/name_space.ML General/ord_list.ML		\
+  General/output.ML General/path.ML General/position.ML			\
+  General/pretty.ML General/print_mode.ML General/properties.ML		\
+  General/queue.ML General/scan.ML General/secure.ML General/seq.ML	\
+  General/source.ML General/stack.ML General/symbol.ML			\
+  General/symbol_pos.ML General/table.ML General/url.ML General/xml.ML	\
+  General/yxml.ML Isar/ROOT.ML Isar/antiquote.ML Isar/args.ML		\
+  Isar/attrib.ML Isar/auto_bind.ML Isar/calculation.ML Isar/class.ML	\
+  Isar/class_target.ML Isar/code.ML Isar/code_unit.ML			\
+  Isar/constdefs.ML Isar/context_rules.ML Isar/element.ML		\
+  Isar/expression.ML Isar/find_theorems.ML Isar/isar.ML			\
+  Isar/isar_cmd.ML Isar/isar_syn.ML Isar/local_defs.ML			\
+  Isar/local_syntax.ML Isar/local_theory.ML Isar/locale.ML		\
+  Isar/method.ML Isar/net_rules.ML Isar/old_locale.ML			\
   Isar/object_logic.ML Isar/obtain.ML Isar/outer_keyword.ML		\
   Isar/outer_lex.ML Isar/outer_parse.ML Isar/outer_syntax.ML		\
   Isar/overloading.ML Isar/proof.ML Isar/proof_context.ML		\
   Isar/proof_display.ML Isar/proof_node.ML Isar/rule_cases.ML		\
   Isar/rule_insts.ML Isar/session.ML Isar/skip_proof.ML			\
-  Isar/spec_parse.ML Isar/specification.ML		\
-  Isar/theory_target.ML Isar/toplevel.ML Isar/value_parse.ML		\
-  ML-Systems/alice.ML ML-Systems/exn.ML					\
-  ML-Systems/install_pp_polyml.ML ML-Systems/ml_name_space.ML		\
-  ML-Systems/multithreading.ML ML-Systems/mosml.ML			\
-  ML-Systems/multithreading_polyml.ML ML-Systems/overloading_smlnj.ML	\
-  ML-Systems/polyml-4.1.3.ML ML-Systems/polyml-4.1.4.ML			\
-  ML-Systems/polyml-4.2.0.ML ML-Systems/polyml-5.0.ML			\
-  ML-Systems/polyml-5.1.ML ML-Systems/polyml_common.ML			\
-  ML-Systems/polyml.ML ML-Systems/polyml_old_compiler4.ML		\
+  Isar/spec_parse.ML Isar/specification.ML Isar/theory_target.ML	\
+  Isar/toplevel.ML Isar/value_parse.ML ML-Systems/alice.ML		\
+  ML-Systems/exn.ML ML-Systems/install_pp_polyml.ML			\
+  ML-Systems/ml_name_space.ML ML-Systems/multithreading.ML		\
+  ML-Systems/mosml.ML ML-Systems/multithreading_polyml.ML		\
+  ML-Systems/overloading_smlnj.ML ML-Systems/polyml-4.1.3.ML		\
+  ML-Systems/polyml-4.1.4.ML ML-Systems/polyml-4.2.0.ML			\
+  ML-Systems/polyml-5.0.ML ML-Systems/polyml-5.1.ML			\
+  ML-Systems/polyml_common.ML ML-Systems/polyml.ML			\
+  ML-Systems/polyml_old_compiler4.ML					\
   ML-Systems/polyml_old_compiler5.ML ML-Systems/proper_int.ML		\
   ML-Systems/smlnj.ML ML-Systems/system_shell.ML			\
   ML-Systems/time_limit.ML ML-Systems/thread_dummy.ML			\
@@ -126,8 +126,9 @@
 SCALA_FILES = General/event_bus.scala General/markup.scala		\
   General/position.scala General/swing.scala General/symbol.scala	\
   General/xml.scala General/yxml.scala Isar/isar.scala			\
-  Thy/thy_header.scala Tools/isabelle_process.scala			\
-  Tools/isabelle_syntax.scala Tools/isabelle_system.scala
+  Isar/outer_keyword.scala Thy/thy_header.scala				\
+  Tools/isabelle_process.scala Tools/isabelle_syntax.scala		\
+  Tools/isabelle_system.scala
 
 
 SCALA_TARGET = $(ISABELLE_HOME)/lib/classes/Pure.jar
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Pure/Isar/outer_keyword.scala	Sun Jan 11 20:40:09 2009 +0100
@@ -0,0 +1,46 @@
+/*  Title:      Pure/Isar/outer_keyword.scala
+    Author:     Makarius
+
+Isar command keyword classification.
+*/
+
+package isabelle
+
+object OuterKeyword {
+
+  val MINOR = "minor"
+  val CONTROL = "control"
+  val DIAG = "diag"
+  val THY_BEGIN = "theory-begin"
+  val THY_SWITCH = "theory-switch"
+  val THY_END = "theory-end"
+  val THY_HEADING = "theory-heading"
+  val THY_DECL = "theory-decl"
+  val THY_SCRIPT = "theory-script"
+  val THY_GOAL = "theory-goal"
+  val QED = "qed"
+  val QED_BLOCK = "qed-block"
+  val QED_GLOBAL = "qed-global"
+  val PRF_HEADING = "proof-heading"
+  val PRF_GOAL = "proof-goal"
+  val PRF_BLOCK = "proof-block"
+  val PRF_OPEN = "proof-open"
+  val PRF_CLOSE = "proof-close"
+  val PRF_CHAIN = "proof-chain"
+  val PRF_DECL = "proof-decl"
+  val PRF_ASM = "proof-asm"
+  val PRF_ASM_GOAL = "proof-asm-goal"
+  val PRF_SCRIPT = "proof-script"
+
+  val minor = Set(MINOR)
+  val control = Set(CONTROL)
+  val diag = Set(DIAG)
+  val theory0 = Set(THY_BEGIN, THY_SWITCH, THY_END)
+  val theory1 = Set(THY_HEADING)
+  val theory2 = Set(THY_DECL, THY_GOAL)
+  val proof1 = Set(QED, QED_BLOCK, QED_GLOBAL, PRF_HEADING, PRF_GOAL, PRF_BLOCK, PRF_OPEN,
+    PRF_CLOSE, PRF_CHAIN, PRF_DECL)
+  val proof2 = Set(PRF_ASM, PRF_ASM_GOAL)
+  val improper = Set(THY_SCRIPT, PRF_SCRIPT)
+}
+