EBNF definition of mrScriptMetadata
The following defines the syntax of mrScriptMetadata in Extended Backus-Naur Form (EBNF). See also
Syntax conventions.
Syntax
<metadata> ::= Metadata ( <parameters> )
<field-list>
End Metadata
<parameters> ::= [Language] [, [Context] [, [LabelType] [, [DataSource] ]]]
[ <named-parameters> ]
<named-parameters> ::= ([,] <name> = <value> ) (, <name> = <value> )*
<field-list> ::= <field> (; <field> )* [;]
<field> ::= <name> ( ( <label-props> )* [ <type-info> ] | <area-code> )
<area-code> ::= AreaName lcl
( [Language] [, [Context] [, [LabelType] ]] )
<type-info> ::= <variable-type>
| define <categories>
| [ info ]
| loop ( <range> | <categories> ) <fields>
[ <field-modifiers> ] [ <loop-modifier> ]
| grid <categories> <fields>
[ <field-modifiers> ] [ <loop-modifier> ]
| compound <categories> <fields> [ row | column ]
[ nonamespace ]
| [ block ] <fields>
| page <pagefields>
<variable-type> ::= ( long | double | date | boolean )
[ <range> ] [ <precision> ] [ <scale> ]
[ <categories> ] [ <codes> ]
[ <field-modifiers> ]
| text [ <incl-range> ] [ <categories> ]
[ <validation> ]
[ <codes> ] [ <field-modifiers> ])
| categorical [ <incl-range> ]
[ <categories> ] [ <field-modifiers> ]
<fields> ::= fields ( [ <field-list> ] )
<name> ::= <identifier> | Text
<categories> ::= { <category> (, <category> )* }
[ <category-order> ] [ fix ] [ namespace ]
| [ <dbdefine> ] [ <category-order> ] [ fix ]
[ namespace ]
<category> ::= ( <name> | - )
( [ use <name> [ sublist [ <category-order> ] ] ] | [ inline ] )
( <label-props> )*
[ <categories> | <cat-modifier> ] [fix]
[ nofilter ])
<category-order> ::= rot[ate] | ran[domize] | rev[erse]
| asc[ending] | desc[ending]
<dbdefine> ::= db
(
ConnectionString = "connection_string_value",
Table = "table_value",
[MinAnswers = min_answers_value]
[MaxAnswers = max_answers_value]
[SQLFilter = sqlfilter_string]
[CacheTimeout = cache_timeout_value]
[CacheConnection = true | false]
[IteratorIDType = [text | double | long | date]]
Columns (
ID = "id_column_name",
Label = "label_column_name"
[KeyCode = "keycode_column_name"]
[File = "file_column_name"]
[AnalysisValue = "analysis_value_column_name"]
[Fixed = "fixed_column_name"]
[Exclusive = "exclusive_column_name"]
)
)
<field-modifiers> ::= <field-modifier> ( <field-modifier> )*
<field-modifier> ::= <expression> | nocasedata | <helperfields>
| <usage-type> | <axis>
| <initialanswer> | <defaultanswer>
| unversioned
<deriveelements> ::= TRUE | FALSE | noderive[elements] | derive[elements]
<cat-modifier> ::= [ exclusive ] [ <factor> ] [ <expression> ] [ <element-type> ]
[ other | <multiplier> | <dk> | <ref> | <na> ]
<pagefields> ::= ( <name> (, <name> )* )
<loop-modifier> ::= row | column | expand | grid | noexpand
<initialanswer> ::= initialanswer ( <answervalue> )
<defaultanswer> ::= defaultanswer ( <answervalue> )
<expression> ::= expression ( Text [, <deriveelements> ] )
<helperfields> ::= helperfields ( <field-list> )
<validation> ::= validation ( Text )
<precision> ::= precision ( <value> )
<scale> ::= scale ( <value> )
<axis> ::= axis ( Text )
<factor> ::= factor ( <value> )
<codes> ::= codes ( <categories> | use <name> )
<other> ::= other [ <simplefield> ]
<dk> ::= DK | Dontknow<ref> ::= REF | Refused
<na> ::= NA | Noanswer
<multiplier> ::= multiplier <simplefield>
<simplefield> ::= ( use <name> | (<name> ( <label-props> )*
[<variable-type>]) )
<element-type> ::= elementtype ( <type-value> )
<type-value> ::= AnalysisBase | AnalysisMaximum | AnalysisMean
| AnalysisMinimum | AnalysisSampleVariance
| AnalysisStdDev | AnalysisStdErr
| AnalysisSubheading | AnalysisSubTotal
| AnalysisSummaryData | AnalysisTotal
<usage-type> ::= usagetype (" <usage-value> (, <usage-value>)* ")
<usage-value> ::= Filter | Weight | Multiplier | Coding
| SourceFile | OtherSpecify | HelperField
<incl-range> ::= [ [ <pstvlong> ] [.. [ <pstvlong> ]] ]
<pstvlong> ::= Any positive integer value
<range> ::= [ <range_item> (, <range_item> )* ]
<range_item> ::= [ ^ ] ( <range_val>
| [ <range_val> ] [.. [ <range_val> ]]
[ step <range_val> ] )
<range-val> ::= ( [ - ] Integer ) | ( [ - ] Double ) | Date
<label-props> ::= [ AreaName: ] ( [ Text ][ [ <properties> ] ]
[ <style> ][ <labelstyle> ][ <templates> ] ) | -
<properties> ::= <property> (, <property> )*
<property> ::= <identifier> ( ( = <value> ) | ( <properties> ) )
<style> ::= style ( <properties> )
<labelstyle> ::= labelstyle (<properties> )
<templates> ::= template[s] ( ( <value> | <identifier> = <value> )+ )
<value> ::= ( [ - ] Integer ) | ( [ - ] Double ) | Text | <identifier>
| true | false | null
<identifier> ::= A regular identifier name
<answervalue> ::= <value> | { ( <value> )* }
Literals by example (numeric literals are not negative):
Double : 1.2 2.0 0.0 0.2 2.3e4 2.0E-3 ...
Integer : 0 1 2 3 ...
Text : "" "hello" "City: ""London""" ... -- Escape double quotes
by repeating them
Comments by example
A single line comment
'! A block comment
can contain
line breaks !'
See also