Sourcecode Listing of

http://purl.oclc.org/NEUMES/ref/NEUMES_grammar.xml





Color Key :   [•] XML code      [•] XML code annotation      [•] XML comment   

Line
0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <!--
0003 *   NEUMES grammar file (Entities of Regular Expressions) generated on 30 August 2005.
0004 *   Filename: http://purl.oclc.org/NEUMES/ref/NEUMES_grammar.xml
0005 *   Version: 2.3.a, beta-test.
0006 *   Owner: The NEUMES Project (Neumed and Ecphonetic Universal Manuscript Encoding Standard)
0007 *   For details see, http://purl.oclc.org/SCRIBE/NEUMES/
0008 *   Author: Louis W. G. Barton.
0009 *   Type: XML Entity definitions file.
0010 -->
0011 
0012 <!--   NEUMES grammar
0013    This is a set of expressions that implements the NEUMES regular grammar
0014    for the NEUMES character Entity set. It is used  for constraining strings
0015    of NEUMES characters in the NeumesXML Schema 2.3 by a Regular Expression.
0016    NeumesXML is an XML application for transcribing medieval chant manuscript
0017    sources to digital data, and capturing both their structure and content.
0018 
0019    Protected by law under one or more of the following copyrights:
0020    Copyright 2005, The University of Oxford.
0021    Copyright 2003-2005, Louis W. G. Barton.
0022    Copyright 2002-2003, The President and Fellows of Harvard College; contains
0023    software or other intellectual property licensed from Louis W. G. Barton,
0024    copyright 1995-2001 by Louis W. G. Barton.
0025 
0026    The copyright holders grant royalty-free license to transmit, display,
0027    perform and/or distribute without modification the NeumeXML version 2
0028    Schema and its accompanying documentation for non-commercial educational,
0029    cultural, and charitable uses, provided that the above copyright notice
0030    and this paragraph appear in all copies. The copyright holders make no
0031    representation about the suitability of the Schema and its accompanying
0032    documentation for any purpose. It is provided "as is" without expressed
0033    or implied warranty.
0034 
0035    All occurrences of the word "Unicode" herein should be understood as
0036    "Unicode[TM]," a trademark of Unicode, Inc.
0037 -->
0038 
0039 
0040 <!-- Programmer's notes:
0041 * Cf., the Context-Free Grammar of the _Interim Project Report_.
0042 * This file depends on the file "NEUMES_characters.xml" for the Entity literals.
0043 * Terminal Entities must be declared first to avoid forward references, and Non-terminal
0044   Entities must be declared in reverse referential order.
0045 * The Entity literals contain XML Schema regular expression operators.
0046 * Character selectors "[ ]" by default (not followed by "{}") select just one character.
0047 * Do not insert blanks into regular expressions.
0048 * Rule: fully parenthesize expressions.
0049 * Operator Precedence:
0050   1. repetition ('*' or '+')
0051   2. concatenation (simply placing one item after another)
0052   3. alternation ('|')
0053 * General Entities (GE) are used instead of Parameter Entities. (Usually parameter
0054   entities are used to hold markup declarations, content models, or parts of attribute
0055   lists.) Each GE defined here (except "NEUMES" and "RUBRICS") begins with 'cfg_' to
0056   avoid potential naming conflicts with XML files that use this grammar.
0057 * Character ranges are used instead of 'Long strings', as numerical calculation is faster.
0058 * To do: expand composed_neume_form.
0059 * Q: Allow CFs on Composition characters?
0060 * Q: Add qualifiers to *rubrical_symbol* (eg, for italic pitch letters)?
0061 * Q: Insert here a split between 1-, 2-, 3-, and 3+ - tone neume forms?
0062 If so, then child branches would also need to be ramified.
0063 ENTITY neumatic_symbol   "&neumatic_symbol_1_tone; |
0064                &neumatic_symbol_2_tone; |
0065                &neumatic_symbol_3_tone; |
0066                &neumatic_symbol_3plus_tone;"
0067 ENTITY neumatic_symbol_1_tone   "&neume_form_1_tone;?&neume_descriptor_list_1_tone;"
0068 * Reference from NeumesXML_main.xsd:
0069    <xsd:simpleType name="neume">
0070       <xsd:restriction base="xsd:string">
0071          <xsd:pattern value="&NEUMES;"/>
0072       </xsd:restriction>
0073    </xsd:simpleType>
0074 
0075 [End, Programmer's Notes] -->
0076 
0077 
0078 <!-- *************** CHARACTER RANGES: *************** -->
0079 
0080 <!--   A *certainty_factor* is any one character in the range of Certainty Factors.
0081 -->
0082    <!ENTITY cfg_certainty_factor
0083    "[&CF_p10;-&CF_n10;]" >
0084 
0085 
0086 <!--   An *tonal_movement* is a single character in the range of Tonal Movements.
0087 -->
0088    <!ENTITY cfg_tonal_movement
0089    "[&no_tone;-&dn_undiff9;]" >
0090 
0091 
0092 <!--   A *pitch* is a single character in the range of Pitches.
0093 -->
0094    <!ENTITY cfg_pitch
0095    "[&ton_ut;-&ton_gg;]" >
0096 
0097 
0098 <!--   A *qualifier* is a single character in the range of Western and Eastern Qualifiers.
0099 -->
0100    <!ENTITY cfg_qualifier
0101    "[&liquescent;-&long_stroke;&haple;-&piasma;]" >
0102 
0103 
0104 <!--   A *local_color* is a single character in the range of Local Ink Colors.
0105 -->
0106    <!ENTITY cfg_local_color
0107    "[&local_no_color;-&local_color_yellow;]" >
0108 
0109 
0110 <!--   An *AlignmentSpecifiers* is a single character in the range of Alignment Specifiers.
0111 -->
0112    <!ENTITY cfg_alignment_specifier
0113    "[&position_0;-&position_20;]" >
0114 
0115 
0116 <!--   A *substitute_style* is a single character in the range of Substitute Styles.
0117 -->
0118    <!ENTITY cfg_substitute_style
0119    "[&subst2;-&subst6;]" >
0120 
0121 
0122 <!--   An *simple_neume_form_east* is any one character in the Byzantine Neume Form range.
0123 -->
0124    <!ENTITY cfg_simple_neume_form_east
0125    "[&ison;-&chamele;&bareia;-&apostrophos_dipli_ekphon;]" >
0126 
0127 
0128 <!--   An *simple_neume_form_west* is any one character in the Latin Neume Form range.
0129 -->
0130    <!ENTITY cfg_simple_neume_form_west
0131    "[&apostropha;-&scandicus_flexus;]" >
0132 
0133 
0134 <!--   A RUBRICAL CHARACTER EAST is a single character in range of NEUMES rubrical
0135    symbols for Eastern sources.
0136 -->
0137    <!ENTITY cfg_rubrical_character_east
0138    "[&glyphs_no_color;-&glyphs_color_yellow;&barys;-&martyria_plagios_deuteros;]" >
0139 
0140 
0141 <!--   A RUBRICAL CHARACTER WEST is a single character in range of NEUMES rubrical
0142    symbols for Western sources.
0143 -->
0144    <!ENTITY cfg_rubrical_character_west
0145    "[&glyphs_no_color;-&glyphs_color_yellow;&antiphon;-&ut_supra;&equaliter;-&perf_t_elongated;]" >
0146 
0147 
0148 <!--   A CLEF CHARACTER is a single character in range of NEUMES clef signs.
0149 -->
0150    <!ENTITY cfg_clef_character
0151    "[&no_clef;-&f_clef;]" >
0152 
0153 
0154 <!--   A CLEF POSITION CHARACTER is a single character in range of NEUMES clef positions.
0155 -->
0156    <!ENTITY cfg_clef_position_character
0157    "[&line1;-&line6;]" >
0158 
0159 
0160 <!-- *************** GRAMMAR DECOMPOSITION: *************** -->
0161 
0162 <!--   A QUALIFIER LIST is a non-empty sequence, where each item in the sequence consists
0163    of: an optional *substitute_style*; followed by an optional *local_color*; followed
0164    by an optional subsequence, where each item of the subsequence consists of a
0165    *qualifier*, followed by an optional *certainty_factor*.
0166 -->
0167    <!ENTITY cfg_qualifier_list
0168    "&cfg_substitute_style;?&cfg_local_color;?((&cfg_qualifier;&cfg_certainty_factor;?)+)?" >
0169 
0170 
0171 <!--   A TONAL MOVEMENT is an *tonal_movement*, followed by an optional *certainty_factor*.
0172 -->
0173    <!ENTITY cfg_tonal_movement
0174    "&cfg_tonal_movement;&cfg_certainty_factor;?" >
0175 
0176 
0177 <!--   A SIMPLE NEUME FORM is: a *simple_neume_form_east* or a *simple_neume_form_west*;
0178    followed by an optional *certainty_factor*; followed by an optional *qualifier_list*.
0179 -->
0180    <!ENTITY cfg_simple_neume_form
0181 "(&cfg_simple_neume_form_east;|&cfg_simple_neume_form_west;)&cfg_certainty_factor;?(&cfg_qualifier_list;)?" >
0182 
0183 
0184 <!--   A COMPOSITE NEUME FORM consists of: a Start Compose character;
0185    followed by a *simple_neume_form*; followed by a Subordinate character;
0186    followed by a *simple_neume_form*; followed by an End Compose character.
0187 -->
0188    <!ENTITY cfg_composite_neume_form
0189 "&STA_compose;(&cfg_simple_neume_form;)&subordinate;(&cfg_simple_neume_form;)&END_compose;" >
0190 
0191 
0192 <!--   A NEUME DESCRIPTOR LIST is a non-empty sequence, where each item in the sequence
0193    consists of: an optional *pitch* (followed optionally by a *certainty_factor*);
0194    followed by a required *tonal_movement*; followed by an optional *certainty_factor*;
0195    followed by an optional Ligation character.
0196 -->
0197    <!ENTITY cfg_neume_descriptor_list
0198 "((&cfg_pitch;&cfg_certainty_factor;?)?&cfg_tonal_movement;&cfg_certainty_factor;?[&LIG;]?)+" >
0199 
0200 
0201 <!--   A NEUMATIC SYMBOL consists of: an optional *simple_neume_form* or
0202    *composite_neume_form*; followed by a required *neume_descriptor_list*.
0203 -->
0204    <!ENTITY cfg_neumatic_symbol
0205 "((&cfg_simple_neume_form;)|(&cfg_composite_neume_form;))?(&cfg_neume_descriptor_list;)" >
0206 
0207 
0208 <!--   NEUMATIC SEQUENCE
0209 [blank]
0210 -->
0211 
0212 
0213 <!--   A RUBRICAL SYMBOL EAST is a sequence consisting of: a *rubrical_character_east*;
0214    followed by an optional *substitute_style*; followed by an optional *local_color*.
0215 -->
0216    <!ENTITY cfg_rubrical_symbol_east
0217    "&cfg_rubrical_character_east;&cfg_substitute_style;?&cfg_local_color;?" >
0218 
0219 
0220 <!--   A RUBRICAL SYMBOL WEST is a sequence consisting of: a *rubrical_character_west*;
0221    followed by an optional *local_color*; followed by an optional *pitch*; followed by an
0222    optional *tonal_movement*; followed by an optional *certainty_factor*.
0223 -->
0224    <!ENTITY cfg_rubrical_symbol_west
0225 "&cfg_rubrical_character_west;&cfg_substitute_style;?&cfg_local_color;?&cfg_pitch;?&cfg_tonal_movement;?&cfg_certainty_factor;?" >
0226 
0227 
0228 <!--   A CLEF SYMBOL is an *clef_character*, followed by an optional *clef_position_character*.
0229 -->
0230    <!ENTITY cfg_clef_symbol
0231    "&cfg_clef_character;&cfg_substitute_style;?&cfg_local_color;?&cfg_clef_position_character;?" >
0232 
0233 
0234 <!-- A COMMENT consists of a left-angle bracket, "comment", an ASCII string, then "/>".
0235 -->
0236    <!ENTITY cfg_comment
0237 "&lt;comment content=(&quot;[\p{IsBasicLatin}^&quot;]+&quot;)|(&apos;[\p{IsBasicLatin}^&apos;]+&apos;)/>" >
0238 
0239 
0240 <!-- A CLEF consists of an optional comment, followed by the STArt character,
0241 followed by one *cfg_clef_symbol*, followed by the END character.
0242 -->
0243    <!ENTITY cfg_clef
0244    "(&cfg_comment;)?&STA;&cfg_clef_symbol;&END;">
0245 
0246 
0247 <!-- A RUBRIC WEST consists of an optional comment, followed by the STArt character,
0248 followed by one or more *rubrical_symbol_west*s, followed by the END character.
0249 -->
0250    <!ENTITY cfg_rubric_west
0251    "(&cfg_comment;)?&STA;(&cfg_rubrical_symbol_west;)+&END;">
0252 
0253 
0254 <!-- A RUBRIC EAST consists of an optional comment, followed by the STArt character,
0255 followed by one or more *rubrical_symbol_east*s, followed by the END character.
0256 -->
0257    <!ENTITY cfg_rubric_east
0258    "(&cfg_comment;)?&STA;(&cfg_rubrical_symbol_east;)+&END;">
0259 
0260 
0261 <!-- *************** THE RUBRICS ENTITY: *************** -->
0262 <!--   The RUBRICS Entity is a non-empty sequence of Unicode Private Use Area characters
0263    declared in the NEUMES data representation codespace (cf, NEUMES_characters.xml).
0264    Items in the sequence are all of one type, either: (a) one or more *rubric_east*;
0265    or (b) one or more *rubric_west*; or (c) exactly one *clef*.
0266 -->
0267    <!ENTITY RUBRICS
0268    "&cfg_rubric_east;+|&cfg_rubric_west;+|&cfg_clef;" >
0269 
0270 
0271 <!-- *************** THE NEUMES ENTITY: *************** -->
0272 <!--   The NEUMES Entity is a non-empty sequence of Unicode Private Use Area characters
0273    declared in the NEUMES data representation codespace (cf, NEUMES_characters.xml).
0274    Each item in the sequence consists of: an optional *comment*; followed by the STArt
0275    character; followed by one or more *neumatic_symbol*; followed by the END character.
0276 -->
0277    <!ENTITY NEUMES
0278    "((&cfg_comment;)?&STA;(&cfg_neumatic_symbol;)+&END;)+" >
0279 
0280 <!-- END, NEUMES_grammar.xml -->
= END LISTING =