src/Pure/PIDE/markup.scala
author wenzelm
Tue Feb 18 16:34:02 2014 +0100 (2014-02-18 ago)
changeset 55552 bcc643ac071a
parent 55526 39708e59f4b0
child 55553 4a5f65df29fa
permissions -rw-r--r--
generic markup for embedded languages;
wenzelm@45670
     1
/*  Title:      Pure/PIDE/markup.scala
wenzelm@45673
     2
    Module:     PIDE
wenzelm@27958
     3
    Author:     Makarius
wenzelm@27958
     4
wenzelm@50201
     5
Isabelle-specific implementation of quasi-abstract markup elements.
wenzelm@27958
     6
*/
wenzelm@27958
     7
wenzelm@27958
     8
package isabelle
wenzelm@27958
     9
wenzelm@27970
    10
wenzelm@32450
    11
object Markup
wenzelm@32450
    12
{
wenzelm@45666
    13
  /* properties */
wenzelm@29184
    14
wenzelm@29184
    15
  val NAME = "name"
wenzelm@43780
    16
  val Name = new Properties.String(NAME)
wenzelm@42136
    17
wenzelm@29184
    18
  val KIND = "kind"
wenzelm@43780
    19
  val Kind = new Properties.String(KIND)
wenzelm@29184
    20
wenzelm@52854
    21
  val INSTANCE = "instance"
wenzelm@52854
    22
  val Instance = new Properties.String(INSTANCE)
wenzelm@52854
    23
wenzelm@29184
    24
wenzelm@50201
    25
  /* basic markup */
wenzelm@29184
    26
wenzelm@45666
    27
  val Empty = Markup("", Nil)
wenzelm@45666
    28
  val Broken = Markup("broken", Nil)
wenzelm@50201
    29
wenzelm@50201
    30
wenzelm@50201
    31
  /* formal entities */
wenzelm@50201
    32
wenzelm@50201
    33
  val BINDING = "binding"
wenzelm@50201
    34
  val ENTITY = "entity"
wenzelm@50201
    35
  val DEF = "def"
wenzelm@50201
    36
  val REF = "ref"
wenzelm@50201
    37
wenzelm@50201
    38
  object Entity
wenzelm@50201
    39
  {
wenzelm@50201
    40
    def unapply(markup: Markup): Option[(String, String)] =
wenzelm@50201
    41
      markup match {
wenzelm@50201
    42
        case Markup(ENTITY, props @ Kind(kind)) =>
wenzelm@50201
    43
          props match {
wenzelm@50201
    44
            case Name(name) => Some(kind, name)
wenzelm@50201
    45
            case _ => None
wenzelm@50201
    46
          }
wenzelm@50201
    47
        case _ => None
wenzelm@50201
    48
      }
wenzelm@50201
    49
  }
wenzelm@50201
    50
wenzelm@50201
    51
wenzelm@50201
    52
  /* position */
wenzelm@50201
    53
wenzelm@50201
    54
  val LINE = "line"
wenzelm@50201
    55
  val OFFSET = "offset"
wenzelm@50201
    56
  val END_OFFSET = "end_offset"
wenzelm@50201
    57
  val FILE = "file"
wenzelm@50201
    58
  val ID = "id"
wenzelm@50201
    59
wenzelm@50201
    60
  val DEF_LINE = "def_line"
wenzelm@50201
    61
  val DEF_OFFSET = "def_offset"
wenzelm@50201
    62
  val DEF_END_OFFSET = "def_end_offset"
wenzelm@50201
    63
  val DEF_FILE = "def_file"
wenzelm@50201
    64
  val DEF_ID = "def_id"
wenzelm@50201
    65
wenzelm@50201
    66
  val POSITION_PROPERTIES = Set(LINE, OFFSET, END_OFFSET, FILE, ID)
wenzelm@50201
    67
  val POSITION = "position"
wenzelm@50201
    68
wenzelm@50201
    69
wenzelm@55552
    70
  /* embedded languages */
wenzelm@55552
    71
wenzelm@55552
    72
  val LANGUAGE = "language"
wenzelm@55552
    73
wenzelm@55552
    74
  object Language
wenzelm@55552
    75
  {
wenzelm@55552
    76
    def unapply(markup: Markup): Option[String] =
wenzelm@55552
    77
      markup match {
wenzelm@55552
    78
        case Markup(LANGUAGE, Name(name)) => Some(name)
wenzelm@55552
    79
        case _ => None
wenzelm@55552
    80
      }
wenzelm@55552
    81
  }
wenzelm@55552
    82
wenzelm@55552
    83
wenzelm@54702
    84
  /* external resources */
wenzelm@50201
    85
wenzelm@50201
    86
  val PATH = "path"
wenzelm@50201
    87
wenzelm@50201
    88
  object Path
wenzelm@50201
    89
  {
wenzelm@50201
    90
    def unapply(markup: Markup): Option[String] =
wenzelm@50201
    91
      markup match {
wenzelm@50201
    92
        case Markup(PATH, Name(name)) => Some(name)
wenzelm@50201
    93
        case _ => None
wenzelm@50201
    94
      }
wenzelm@50201
    95
  }
wenzelm@50201
    96
wenzelm@54702
    97
  val URL = "url"
wenzelm@54702
    98
wenzelm@54702
    99
  object Url
wenzelm@54702
   100
  {
wenzelm@54702
   101
    def unapply(markup: Markup): Option[String] =
wenzelm@54702
   102
      markup match {
wenzelm@54702
   103
        case Markup(URL, Name(name)) => Some(name)
wenzelm@54702
   104
        case _ => None
wenzelm@54702
   105
      }
wenzelm@54702
   106
  }
wenzelm@54702
   107
wenzelm@50201
   108
wenzelm@50201
   109
  /* pretty printing */
wenzelm@50201
   110
wenzelm@50201
   111
  val Indent = new Properties.Int("indent")
wenzelm@50201
   112
  val BLOCK = "block"
wenzelm@51570
   113
wenzelm@50201
   114
  val Width = new Properties.Int("width")
wenzelm@50201
   115
  val BREAK = "break"
wenzelm@50201
   116
wenzelm@51570
   117
  val ITEM = "item"
wenzelm@51574
   118
  val BULLET = "bullet"
wenzelm@51570
   119
wenzelm@50201
   120
  val SEPARATOR = "separator"
wenzelm@50201
   121
wenzelm@50201
   122
wenzelm@50201
   123
  /* hidden text */
wenzelm@50201
   124
wenzelm@50201
   125
  val HIDDEN = "hidden"
wenzelm@50201
   126
wenzelm@50201
   127
wenzelm@50201
   128
  /* logical entities */
wenzelm@50201
   129
wenzelm@50201
   130
  val CLASS = "class"
wenzelm@50201
   131
  val TYPE_NAME = "type_name"
wenzelm@50201
   132
  val FIXED = "fixed"
wenzelm@53378
   133
  val CASE = "case"
wenzelm@50201
   134
  val CONSTANT = "constant"
wenzelm@50201
   135
  val DYNAMIC_FACT = "dynamic_fact"
wenzelm@50201
   136
wenzelm@50201
   137
wenzelm@50201
   138
  /* inner syntax */
wenzelm@50201
   139
wenzelm@50201
   140
  val TFREE = "tfree"
wenzelm@50201
   141
  val TVAR = "tvar"
wenzelm@50201
   142
  val FREE = "free"
wenzelm@50201
   143
  val SKOLEM = "skolem"
wenzelm@50201
   144
  val BOUND = "bound"
wenzelm@50201
   145
  val VAR = "var"
wenzelm@50201
   146
  val NUMERAL = "numeral"
wenzelm@50201
   147
  val LITERAL = "literal"
wenzelm@50201
   148
  val DELIMITER = "delimiter"
wenzelm@50201
   149
  val INNER_STRING = "inner_string"
wenzelm@55033
   150
  val INNER_CARTOUCHE = "inner_cartouche"
wenzelm@50201
   151
  val INNER_COMMENT = "inner_comment"
wenzelm@50201
   152
wenzelm@50201
   153
  val TOKEN_RANGE = "token_range"
wenzelm@50201
   154
wenzelm@50201
   155
  val SORTING = "sorting"
wenzelm@50201
   156
  val TYPING = "typing"
wenzelm@50201
   157
wenzelm@50201
   158
  val ATTRIBUTE = "attribute"
wenzelm@50201
   159
  val METHOD = "method"
wenzelm@50201
   160
wenzelm@50201
   161
wenzelm@55552
   162
  /* antiquotations */
wenzelm@50201
   163
wenzelm@55526
   164
  val ANTIQUOTED = "antiquoted"
wenzelm@55526
   165
  val ANTIQUOTE = "antiquote"
wenzelm@55526
   166
wenzelm@50201
   167
  val ML_ANTIQUOTATION = "ML_antiquotation"
wenzelm@50201
   168
  val DOCUMENT_ANTIQUOTATION = "document_antiquotation"
wenzelm@50201
   169
  val DOCUMENT_ANTIQUOTATION_OPTION = "document_antiquotation_option"
wenzelm@50201
   170
wenzelm@50201
   171
wenzelm@50201
   172
  /* text structure */
wenzelm@50201
   173
wenzelm@50201
   174
  val PARAGRAPH = "paragraph"
wenzelm@50545
   175
  val TEXT_FOLD = "text_fold"
wenzelm@50201
   176
wenzelm@50201
   177
wenzelm@50201
   178
  /* ML syntax */
wenzelm@50201
   179
wenzelm@55505
   180
  val ML_KEYWORD1 = "ML_keyword1"
wenzelm@55505
   181
  val ML_KEYWORD2 = "ML_keyword2"
wenzelm@55505
   182
  val ML_KEYWORD3 = "ML_keyword3"
wenzelm@50201
   183
  val ML_DELIMITER = "ML_delimiter"
wenzelm@50201
   184
  val ML_TVAR = "ML_tvar"
wenzelm@50201
   185
  val ML_NUMERAL = "ML_numeral"
wenzelm@50201
   186
  val ML_CHAR = "ML_char"
wenzelm@50201
   187
  val ML_STRING = "ML_string"
wenzelm@50201
   188
  val ML_COMMENT = "ML_comment"
wenzelm@50201
   189
wenzelm@50201
   190
  val ML_DEF = "ML_def"
wenzelm@50201
   191
  val ML_OPEN = "ML_open"
wenzelm@50201
   192
  val ML_STRUCT = "ML_struct"
wenzelm@50201
   193
  val ML_TYPING = "ML_typing"
wenzelm@50201
   194
wenzelm@50201
   195
wenzelm@50201
   196
  /* outer syntax */
wenzelm@50201
   197
wenzelm@50201
   198
  val KEYWORD = "keyword"
wenzelm@50201
   199
  val OPERATOR = "operator"
wenzelm@50201
   200
  val COMMAND = "command"
wenzelm@50201
   201
  val STRING = "string"
wenzelm@50201
   202
  val ALTSTRING = "altstring"
wenzelm@50201
   203
  val VERBATIM = "verbatim"
wenzelm@55033
   204
  val CARTOUCHE = "cartouche"
wenzelm@50201
   205
  val COMMENT = "comment"
wenzelm@50201
   206
  val CONTROL = "control"
wenzelm@50201
   207
wenzelm@50201
   208
  val KEYWORD1 = "keyword1"
wenzelm@50201
   209
  val KEYWORD2 = "keyword2"
wenzelm@50201
   210
wenzelm@50201
   211
wenzelm@50201
   212
  /* timing */
wenzelm@50201
   213
wenzelm@50781
   214
  val Elapsed = new Properties.Double("elapsed")
wenzelm@50781
   215
  val CPU = new Properties.Double("cpu")
wenzelm@50781
   216
  val GC = new Properties.Double("gc")
wenzelm@50781
   217
wenzelm@50781
   218
  object Timing_Properties
wenzelm@50781
   219
  {
wenzelm@50781
   220
    def apply(timing: isabelle.Timing): Properties.T =
wenzelm@50781
   221
      Elapsed(timing.elapsed.seconds) ::: CPU(timing.cpu.seconds) ::: GC(timing.gc.seconds)
wenzelm@51662
   222
wenzelm@50781
   223
    def unapply(props: Properties.T): Option[isabelle.Timing] =
wenzelm@50781
   224
      (props, props, props) match {
wenzelm@50781
   225
        case (Elapsed(elapsed), CPU(cpu), GC(gc)) =>
wenzelm@50781
   226
          Some(new isabelle.Timing(Time.seconds(elapsed), Time.seconds(cpu), Time.seconds(gc)))
wenzelm@50781
   227
        case _ => None
wenzelm@50781
   228
      }
wenzelm@50781
   229
  }
wenzelm@50781
   230
wenzelm@50201
   231
  val TIMING = "timing"
wenzelm@50201
   232
wenzelm@50201
   233
  object Timing
wenzelm@50201
   234
  {
wenzelm@50781
   235
    def apply(timing: isabelle.Timing): Markup = Markup(TIMING, Timing_Properties(timing))
wenzelm@51662
   236
wenzelm@50201
   237
    def unapply(markup: Markup): Option[isabelle.Timing] =
wenzelm@50201
   238
      markup match {
wenzelm@50781
   239
        case Markup(TIMING, Timing_Properties(timing)) => Some(timing)
wenzelm@50201
   240
        case _ => None
wenzelm@50201
   241
      }
wenzelm@50201
   242
  }
wenzelm@50201
   243
wenzelm@50201
   244
wenzelm@51662
   245
  /* command timing */
wenzelm@51662
   246
wenzelm@51818
   247
  val COMMAND_TIMING = "command_timing"
wenzelm@51662
   248
wenzelm@51662
   249
wenzelm@50201
   250
  /* toplevel */
wenzelm@50201
   251
wenzelm@50201
   252
  val SUBGOALS = "subgoals"
wenzelm@50201
   253
  val PROOF_STATE = "proof_state"
wenzelm@50201
   254
wenzelm@50201
   255
  val STATE = "state"
wenzelm@50543
   256
  val GOAL = "goal"
wenzelm@50201
   257
  val SUBGOAL = "subgoal"
wenzelm@50215
   258
wenzelm@50450
   259
wenzelm@50201
   260
  /* command status */
wenzelm@50201
   261
wenzelm@50201
   262
  val TASK = "task"
wenzelm@50201
   263
wenzelm@50201
   264
  val ACCEPTED = "accepted"
wenzelm@50201
   265
  val FORKED = "forked"
wenzelm@50201
   266
  val JOINED = "joined"
wenzelm@50201
   267
  val RUNNING = "running"
wenzelm@50201
   268
  val FINISHED = "finished"
wenzelm@50201
   269
  val FAILED = "failed"
wenzelm@50201
   270
wenzelm@50201
   271
wenzelm@50201
   272
  /* interactive documents */
wenzelm@50201
   273
wenzelm@50201
   274
  val VERSION = "version"
wenzelm@50201
   275
  val ASSIGN = "assign"
wenzelm@50201
   276
wenzelm@50201
   277
wenzelm@50201
   278
  /* prover process */
wenzelm@50201
   279
wenzelm@50201
   280
  val PROVER_COMMAND = "prover_command"
wenzelm@50201
   281
  val PROVER_ARG = "prover_arg"
wenzelm@50201
   282
wenzelm@50201
   283
wenzelm@50201
   284
  /* messages */
wenzelm@50201
   285
lars@55316
   286
  val SERIAL = "serial"
lars@55316
   287
  val Serial = new Properties.Long(SERIAL)
wenzelm@50201
   288
wenzelm@50201
   289
  val MESSAGE = "message"
wenzelm@50201
   290
wenzelm@50201
   291
  val INIT = "init"
wenzelm@50201
   292
  val STATUS = "status"
wenzelm@50201
   293
  val REPORT = "report"
wenzelm@50500
   294
  val RESULT = "result"
wenzelm@50201
   295
  val WRITELN = "writeln"
wenzelm@50201
   296
  val TRACING = "tracing"
wenzelm@50201
   297
  val WARNING = "warning"
wenzelm@50201
   298
  val ERROR = "error"
wenzelm@50201
   299
  val PROTOCOL = "protocol"
wenzelm@50201
   300
  val SYSTEM = "system"
wenzelm@50201
   301
  val STDOUT = "stdout"
wenzelm@50201
   302
  val STDERR = "stderr"
wenzelm@50201
   303
  val EXIT = "exit"
wenzelm@50201
   304
wenzelm@50201
   305
  val WRITELN_MESSAGE = "writeln_message"
wenzelm@50201
   306
  val TRACING_MESSAGE = "tracing_message"
wenzelm@50201
   307
  val WARNING_MESSAGE = "warning_message"
wenzelm@50201
   308
  val ERROR_MESSAGE = "error_message"
wenzelm@50201
   309
wenzelm@52876
   310
  val messages =
wenzelm@50201
   311
    Map(WRITELN -> WRITELN_MESSAGE, TRACING -> TRACING_MESSAGE,
wenzelm@52876
   312
        WARNING -> WARNING_MESSAGE, ERROR -> ERROR_MESSAGE)
wenzelm@52876
   313
  val message: String => String = messages.withDefault((s: String) => s)
wenzelm@50201
   314
wenzelm@50201
   315
  val Return_Code = new Properties.Int("return_code")
wenzelm@50201
   316
wenzelm@50201
   317
  val LEGACY = "legacy"
wenzelm@50201
   318
wenzelm@50201
   319
  val NO_REPORT = "no_report"
wenzelm@50201
   320
wenzelm@50201
   321
  val BAD = "bad"
wenzelm@50201
   322
wenzelm@50500
   323
  val INTENSIFY = "intensify"
wenzelm@52643
   324
  val INFORMATION = "information"
wenzelm@50500
   325
wenzelm@50500
   326
wenzelm@50500
   327
  /* active areas */
wenzelm@50500
   328
wenzelm@50715
   329
  val BROWSER = "browser"
wenzelm@50500
   330
  val GRAPHVIEW = "graphview"
wenzelm@50500
   331
wenzelm@50500
   332
  val SENDBACK = "sendback"
wenzelm@50500
   333
  val PADDING = "padding"
wenzelm@52697
   334
  val PADDING_LINE = (PADDING, "line")
wenzelm@52697
   335
  val PADDING_COMMAND = (PADDING, "command")
wenzelm@50500
   336
wenzelm@50500
   337
  val DIALOG = "dialog"
wenzelm@50503
   338
  val Result = new Properties.String(RESULT)
wenzelm@50500
   339
wenzelm@50201
   340
wenzelm@50201
   341
  /* protocol message functions */
wenzelm@50201
   342
wenzelm@50201
   343
  val FUNCTION = "function"
wenzelm@50201
   344
  val Function = new Properties.String(FUNCTION)
wenzelm@50201
   345
wenzelm@52800
   346
  val Flush: Properties.T = List((FUNCTION, "flush"))
wenzelm@52800
   347
wenzelm@52563
   348
  val Assign_Update: Properties.T = List((FUNCTION, "assign_update"))
wenzelm@50201
   349
  val Removed_Versions: Properties.T = List((FUNCTION, "removed_versions"))
wenzelm@50201
   350
wenzelm@52111
   351
  object Protocol_Handler
wenzelm@52111
   352
  {
wenzelm@52111
   353
    def unapply(props: Properties.T): Option[(String)] =
wenzelm@52111
   354
      props match {
wenzelm@52111
   355
        case List((FUNCTION, "protocol_handler"), (NAME, name)) => Some(name)
wenzelm@52111
   356
        case _ => None
wenzelm@52111
   357
      }
wenzelm@52111
   358
  }
wenzelm@52111
   359
wenzelm@52111
   360
  val INVOKE_SCALA = "invoke_scala"
wenzelm@50201
   361
  object Invoke_Scala
wenzelm@50201
   362
  {
wenzelm@50201
   363
    def unapply(props: Properties.T): Option[(String, String)] =
wenzelm@50201
   364
      props match {
wenzelm@52111
   365
        case List((FUNCTION, INVOKE_SCALA), (NAME, name), (ID, id)) => Some((name, id))
wenzelm@50201
   366
        case _ => None
wenzelm@50201
   367
      }
wenzelm@50201
   368
  }
wenzelm@52111
   369
wenzelm@52111
   370
  val CANCEL_SCALA = "cancel_scala"
wenzelm@50201
   371
  object Cancel_Scala
wenzelm@50201
   372
  {
wenzelm@50201
   373
    def unapply(props: Properties.T): Option[String] =
wenzelm@50201
   374
      props match {
wenzelm@52111
   375
        case List((FUNCTION, CANCEL_SCALA), (ID, id)) => Some(id)
wenzelm@50201
   376
        case _ => None
wenzelm@50201
   377
      }
wenzelm@50201
   378
  }
wenzelm@50255
   379
wenzelm@53055
   380
  val SLEDGEHAMMER_PROVERS = "sledgehammer_provers"
wenzelm@53055
   381
  val Sledgehammer_Provers: Properties.T = List((FUNCTION, SLEDGEHAMMER_PROVERS))
wenzelm@53055
   382
wenzelm@50255
   383
  object ML_Statistics
wenzelm@50255
   384
  {
wenzelm@50255
   385
    def unapply(props: Properties.T): Option[Properties.T] =
wenzelm@50255
   386
      props match {
wenzelm@50255
   387
        case (FUNCTION, "ML_statistics") :: stats => Some(stats)
wenzelm@50255
   388
        case _ => None
wenzelm@50255
   389
      }
wenzelm@50255
   390
  }
wenzelm@50975
   391
wenzelm@50975
   392
  object Task_Statistics
wenzelm@50975
   393
  {
wenzelm@50975
   394
    def unapply(props: Properties.T): Option[Properties.T] =
wenzelm@50975
   395
      props match {
wenzelm@50975
   396
        case (FUNCTION, "task_statistics") :: stats => Some(stats)
wenzelm@50975
   397
        case _ => None
wenzelm@50975
   398
      }
wenzelm@50975
   399
  }
lars@55316
   400
lars@55316
   401
  /* simplifier trace */
lars@55316
   402
lars@55316
   403
  val TEXT = "text"
lars@55316
   404
  val Text = new Properties.String(TEXT)
lars@55316
   405
lars@55316
   406
  val PARENT = "parent"
lars@55316
   407
  val Parent = new Properties.Long(PARENT)
lars@55316
   408
lars@55316
   409
  val SUCCESS = "success"
lars@55316
   410
  val Success = new Properties.Boolean(SUCCESS)
lars@55316
   411
lars@55390
   412
  val MEMORY = "memory"
lars@55390
   413
  val Memory = new Properties.Boolean(MEMORY)
lars@55390
   414
lars@55316
   415
  val CANCEL_SIMP_TRACE = "simp_trace_cancel"
lars@55316
   416
  object Cancel_Simp_Trace
lars@55316
   417
  {
lars@55316
   418
    def unapply(props: Properties.T): Option[Long] =
lars@55316
   419
      props match {
lars@55316
   420
        case (FUNCTION, CANCEL_SIMP_TRACE) :: Serial(id) => Some(id)
lars@55316
   421
        case _ => None
lars@55316
   422
      }
lars@55316
   423
  }
lars@55316
   424
lars@55316
   425
  val SIMP_TRACE = "simp_trace"
lars@55316
   426
  object Simp_Trace
lars@55316
   427
  {
lars@55316
   428
    def unapply(tree: XML.Tree): Option[(Long, Simplifier_Trace.Answer)] =
lars@55316
   429
      tree match {
lars@55316
   430
        case XML.Elem(Markup(SIMP_TRACE, props), _) =>
lars@55316
   431
          (props, props) match {
lars@55316
   432
            case (Serial(serial), Name(name)) =>
lars@55316
   433
              Simplifier_Trace.all_answers.find(_.name == name).map((serial, _))
lars@55316
   434
            case _ =>
lars@55316
   435
              None
lars@55316
   436
          }
lars@55316
   437
        case _ =>
lars@55316
   438
          None
lars@55316
   439
      }
lars@55316
   440
  }
lars@55316
   441
lars@55316
   442
  /* trace items from the prover */
lars@55316
   443
lars@55316
   444
  object Simp_Trace_Item
lars@55316
   445
  {
lars@55316
   446
lars@55316
   447
    def unapply(tree: XML.Tree): Option[(String, Data)] =
lars@55316
   448
      tree match {
lars@55316
   449
        case XML.Elem(Markup(RESULT, Serial(serial)), List(
lars@55316
   450
          XML.Elem(Markup(markup, props), content)
lars@55316
   451
        )) if markup.startsWith("simp_trace_") =>
lars@55316
   452
          (props, props) match {
lars@55316
   453
            case (Text(text), Parent(parent)) =>
lars@55316
   454
              Some((markup, Data(serial, markup, text, parent, props, content)))
lars@55316
   455
            case _ =>
lars@55316
   456
              None
lars@55316
   457
          }
lars@55316
   458
        case _ =>
lars@55316
   459
          None
lars@55316
   460
      }
lars@55316
   461
lars@55316
   462
    val LOG = "simp_trace_log"
lars@55316
   463
    val STEP = "simp_trace_step"
lars@55316
   464
    val RECURSE = "simp_trace_recurse"
lars@55316
   465
    val HINT = "simp_trace_hint"
lars@55316
   466
    val IGNORE = "simp_trace_ignore"
lars@55316
   467
lars@55316
   468
    case class Data(serial: Long, markup: String, text: String,
lars@55316
   469
                    parent: Long, props: Properties.T, content: XML.Body)
lars@55390
   470
    {
lars@55390
   471
      def memory: Boolean =
lars@55390
   472
        Memory.unapply(props) getOrElse true
lars@55390
   473
    }
lars@55316
   474
lars@55316
   475
  }
lars@55316
   476
wenzelm@45666
   477
}
wenzelm@43721
   478
wenzelm@43721
   479
wenzelm@45666
   480
sealed case class Markup(name: String, properties: Properties.T)
wenzelm@43748
   481