Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /trunk/slmml/Compiler.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 67 - (hide annotations) (download)
Sun Apr 26 13:48:12 2009 UTC (14 years, 11 months ago) by hikarin
File size: 2388 byte(s)
[ocmml/slmml] * added Dump method for SlMML's test
1 hikarin 58 /*
2     Copyright (c) 2009, hkrn All rights reserved.
3    
4     Redistribution and use in source and binary forms, with or without
5     modification, are permitted provided that the following conditions are met:
6    
7     Redistributions of source code must retain the above copyright notice, this
8     list of conditions and the following disclaimer. Redistributions in binary
9     form must reproduce the above copyright notice, this list of conditions and
10     the following disclaimer in the documentation and/or other materials
11     provided with the distribution. Neither the name of the hkrn nor
12     the names of its contributors may be used to endorse or promote products
13     derived from this software without specific prior written permission.
14    
15     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18     ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
19     ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20     DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23     LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24     OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
25     DAMAGE.
26     */
27    
28     //
29     // $Id$
30     //
31    
32     using System;
33 hikarin 37 using System.Collections.Generic;
34     using System.IO;
35     using System.Text;
36     using System.Windows.Controls;
37     using SlMML.Parsers;
38    
39     namespace SlMML
40     {
41     public class Compiler
42     {
43     #region ���������������������������
44     public static MediaElement Compile(string stringToParse)
45     {
46     MediaElement element = new MediaElement();
47     IParsable parser = new FlMMLStyleParser();
48 hikarin 51 element.Volume = 1;
49 hikarin 37 element.SetSource(parser.Parse(stringToParse));
50     return element;
51     }
52 hikarin 67 #if DEBUG
53     public static List<List<Dictionary<string, string>>> Dump(string stringToParse)
54     {
55     FlMMLStyleParser parser = new FlMMLStyleParser();
56     parser.Parse(stringToParse);
57     return parser.Dump();
58     }
59     #endif
60 hikarin 37 #endregion
61     }
62     }

Properties

Name Value
svn:keywords Id

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26