Below is the grammar for valid PowerForms documents.
In the grammar `*' indicates zero or more repetitions, `+' indicates one or more repetitions, and `|' indicates a choice. Attributes enclosed in `[' and `]' are optional.
powerforms | ::= |
<powerforms> ( regexp-def | constraint | status | initialization | autocomplete )* </powerforms> |
constraint | ::= |
<constraint
[form=form]
[field=field]
[id=id]> constraint-body </constraint> |
constraint-body | ::= |
<if> expression <then> constraint-body </then> <else> constraint-body </else> </if> |
| | <ignore/> | |
| | regexp | |
| | expression | |
expression | ::= | <count number=int /> |
| | <count min=int max=int /> | |
| | <equal field=field [value=value] /> | |
| |
<equal> field+ </equal> |
|
| | <less-than field=field [value=value] [type=type] /> | |
| |
<less-than
[type=type]> field+ </less-than> |
|
| |
<match
field=field
> regexp </match> |
|
| |
<not> expression* </not> |
|
| |
<and> expression* </and> |
|
| |
<or> expression* </or> |
|
field | ::= | <field name=name /> |
regexp | ::= | <empty /> |
| | <anychar /> | |
| | <anything /> | |
| | <const value=string /> | |
| | <charset value=string /> | |
| | <charrange low=char high=char /> | |
| | <interval low=int high=int [width=int] [radix=int] /> | |
| |
<repeat
count=int> regexp </repeat> |
|
| |
<repeat
[min=int]
[max=int]> regexp </repeat> |
|
| |
<complement> regexp </complement> |
|
| |
<optional> regexp </optional> |
|
| |
<plus> regexp </plus> |
|
| |
<intersection> regexp+ </intersection> |
|
| |
<union> regexp+ </union> |
|
| |
<concat> regexp+ </concat> |
|
| | <regexp pattern=pattern /> | |
| | <regexp url=url /> | |
| | <regexp idref=idref /> | |
regexp-def | ::= |
<regexp
id=id> regexp </regexp> |
status | ::= | <status [type=type] [red=red] [yellow=yellow] [green=green] [na=na] /> |
initialization | ::= | <init [form=form] field=field value=value /> |
autocomplete | ::= | <autocomplete constraint=id [type=type] [image=url] [na=url] /> |
Updated 22 April 2002 by Mikkel Ricky |
|