User Tools

Site Tools


syntax

This is an old revision of the document!


XCend File Syntax

A XCend file consists mainly of a pattern, which has to be an element at the root:

element <name> {
  <body>
}

In general a pattern is a sequence of element and attribute declarations:

element <name> (?|*|+)? {
  <body>
}
 
# and
 
attribute <name> (?)? {
  <body>
}

Elements can be optional, repeated or repeated but have to appear at least once. Attributes can only be optional.

A body can either be empty, pattern, type or enumeration declaration:

element types {
}
 
# and
 
element types {
  string | integer | ident
}
 
# and
 
element enumeration {
  "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday"
}
syntax.1317023606.txt.gz · Last modified: 2011/09/26 09:53 by Patrick Michel