~ubuntu-branches/ubuntu/hardy/tagsoup/hardy

« back to all changes in this revision

Viewing changes to stml/stml.rnc

  • Committer: Bazaar Package Importer
  • Author(s): Paul Cager
  • Date: 2006-11-18 23:12:15 UTC
  • Revision ID: james.westby@ubuntu.com-20061118231215-twg704c4xxj79cad
Tags: upstream-1.0.1
ImportĀ upstreamĀ versionĀ 1.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This file is part of TagSoup.
 
2
 
3
# This program is free software; you can redistribute it and/or modify
 
4
# it under the terms of the GNU General Public License as published by
 
5
# the Free Software Foundation; either version 2 of the License, or
 
6
# (at your option) any later version.  You may also distribute
 
7
# and/or modify it under version 2.1 of the Academic Free License.
 
8
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
 
12
 
 
13
# State Table Markup Language
 
14
default namespace = "http://www.ccil.org/~cowan/XML/tagsoup/stml"
 
15
start = statetable
 
16
 
 
17
## Root element
 
18
statetable = element statetable {
 
19
        attribute version {"1.0"},
 
20
        attribute id {xsd:ID}?,
 
21
        symbol*,
 
22
        action+,
 
23
        state+
 
24
        }
 
25
 
 
26
## A symbol specifies a non-character input to the state machine
 
27
symbol = element symbol {
 
28
        attribute id {xsd:ID}
 
29
        }
 
30
 
 
31
## An action is the name for what the state machine does
 
32
action = element action {
 
33
        attribute id {xsd:ID}
 
34
        }
 
35
 
 
36
## A state specifies an internal state of the machine
 
37
state = element state {
 
38
        attribute id {xsd:ID},
 
39
        tr*
 
40
        }
 
41
 
 
42
## A tr specifies a state transition
 
43
tr = element tr {
 
44
        (attribute symbol {xsd:IDREF} |
 
45
                attribute char {xsd:string {length = "1"}}),
 
46
        attribute action {xsd:IDREF},
 
47
        attribute newstate {xsd:IDREF}
 
48
        }