1: // Reference ETL Parser for Java
     2: // Copyright (c) 2000-2009 Constantine A Plotnikov
     3: //
     4: // Permission is hereby granted, free of charge, to any person 
     5: // obtaining a copy of this software and associated documentation 
     6: // files (the "Software"), to deal in the Software without restriction,
     7: // including without limitation the rights to use, copy, modify, merge, 
     8: // publish, distribute, sublicense, and/or sell copies of the Software, 
     9: // and to permit persons to whom the Software is furnished to do so, 
    10: // subject to the following conditions:
    11: //
    12: // The above copyright notice and this permission notice shall be 
    13: // included in all copies or substantial portions of the Software.
    14: // 
    15: // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
    16: // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
    17: // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
    18: // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
    19: // BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 
    20: // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
    21: // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
    22: // SOFTWARE. 
    23: doctype public "-//IDN etl.sf.net//ETL//Grammar 0.2.1";
    24: 
    25: /// This is a default grammar. It is used if one of the following happened:
    26: /// <ul>
    27: ///   <li>Doctype directive is missing or it has invalid syntax and default 
    28: ///       grammar is not specified for parser.</li>
    29: ///   <li>Grammar referenced by doctype statement cannot be located.</li>
    30: ///   <li>Grammar is located but failed to be parsed because of IO error 
    31: ///       or it is invalid (some syntax or semantic errors).</li>
    32: /// </ul>
    33: ///
    34: /// Note that this grammar is hard-coded and it is provided here just for 
    35: /// informational purposes.
    36: ///
    37: /// <author>const</author>
    38: grammar net.sf.etl.grammars.DefaultGrammar {
    39: 	namespace default d = "http://etl.sf.net/etl/default/0.2.1";
    40: 
    41: 	/// The only context in this grammar
    42: 	context default DefaultContext {
    43: 
    44: 		/// Documentation mapping definition. 
    45: 		documentation DefaultDocumentation {
    46: 			@ documentation += doclines wrapper d:DefaultDocumentationLine.text;
    47: 		};	
    48: 		
    49: 		/// Default statement that matches anything
    50: 		statement DefaultStatement {
    51: 			@ content += {
    52: 				{
    53: 					^ d:DefaultBlock { @ content += block; };
    54: 				} | {
    55: 					^ d:DefaultTokens { @ values += token+; };
    56: 				};
    57: 			}*;
    58: 		};
    59: 	};
    60: };