src/HOL/HoareParallel/Quote_Antiquote.thy
author wenzelm
Sat, 29 May 2004 16:47:06 +0200
changeset 14846 b1fcade3880b
parent 13020 791e3b4c4039
child 16417 9bc16273c2d4
permissions -rw-r--r--
\<^bsub>/\<^esub> syntax: unbreakable block;


header {* \section{Concrete Syntax} *}

theory Quote_Antiquote = Main:

syntax
  "_quote"     :: "'b \<Rightarrow> ('a \<Rightarrow> 'b)"                ("(\<guillemotleft>_\<guillemotright>)" [0] 1000)
  "_antiquote" :: "('a \<Rightarrow> 'b) \<Rightarrow> 'b"                ("\<acute>_" [1000] 1000)
  "_Assert"    :: "'a \<Rightarrow> 'a set"                    ("(.{_}.)" [0] 1000)

syntax (xsymbols)
  "_Assert"    :: "'a \<Rightarrow> 'a set"            ("(\<lbrace>_\<rbrace>)" [0] 1000)

translations
  ".{b}." \<rightharpoonup> "Collect \<guillemotleft>b\<guillemotright>"

parse_translation {*
  let
    fun quote_tr [t] = Syntax.quote_tr "_antiquote" t
      | quote_tr ts = raise TERM ("quote_tr", ts);
  in [("_quote", quote_tr)] end
*}

end