1 |
|
/* |
2 |
|
* DotGNU Yaml implementation |
3 |
|
* |
4 |
|
* Copyright (C) 2003 DotGNU Project |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
8 |
|
* the Free Software Foundation; either version 2 of the License, or |
9 |
|
* (at your option) any later version. |
10 |
|
* |
11 |
|
* This program is distributed in the hope that it will be useful, |
12 |
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
|
* GNU General Public License for more details. |
15 |
|
* |
16 |
|
* You should have received a copy of the GNU General Public License |
17 |
|
* along with this program; if not, write to the Free Software |
18 |
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
19 |
|
* |
20 |
|
* $Revision$ $Date$ |
21 |
|
* |
22 |
|
* -------------------------------------------------------------------------- |
23 |
|
* Authors: |
24 |
|
* Nicolai P Guba |
25 |
|
*/ |
26 |
|
|
27 |
|
namespace DotGNU.DGEE |
28 |
|
{ |
29 |
|
public class YamlReader |
30 |
|
{ |
31 |
|
enum State |
32 |
|
{ |
33 |
|
c_sequence_entry, /* ::= '-' indicates a sequence entry */ |
34 |
|
c_mapping_entry, /* ::= ':' separates a key from its value */ |
35 |
|
c_sequence_start, /* ::= '[' starts a flow sequence collection */ |
36 |
|
c_sequence_end, /* ::= ']' ends a flow sequence collection */ |
37 |
|
c_mapping_start, /* ::= '{' starts a flow mapping collection */ |
38 |
|
c_mapping_end, /* ::= '}' ends a flow mapping collection */ |
39 |
|
c_collect_entry, /* ::= ',' separates flow collection entries */ |
40 |
|
c_top_key, /* ::= '?' indicates a complex key */ |
41 |
|
c_alias, /* ::= '*' indicates an alias node */ |
42 |
|
c_anchor, /* ::= '&' indicates an anchor-name property */ |
43 |
|
c_transfer, /* ::= '!' indicates a transfer method property */ |
44 |
|
c_literal, /* ::= '|' indicates a literal scalar */ |
45 |
|
c_folded, /* ::= '>' indicates a folded scalar */ |
46 |
|
c_single_quote, /* ::= ''' indicates a single quoted scalar */ |
47 |
|
c_double_quote, /* ::= '"' indicates a double quoted scalar */ |
48 |
|
c_throwaway, /* ::= '#' indicates a throwaway comment */ |
49 |
|
c_directive, /* ::= '%' indicates a directive */ |
50 |
|
c_reserved /* ::= '@' | '`' reserved for future use */ |
51 |
|
} |
52 |
|
|
53 |
|
public YamlReader( string text ) |
54 |
|
{ |
55 |
|
// set up initial state |
56 |
|
State state = state.c_throwaway; |
57 |
|
|
58 |
|
// parse the character stream |
59 |
|
} |
60 |
|
|
61 |
|
public static void Main( string[] args ) |
62 |
|
{ |
63 |
|
} |
64 |
|
} |
65 |
|
} |