PageRenderTime 21ms CodeModel.GetById 1ms app.highlight 12ms RepoModel.GetById 2ms app.codeStats 0ms

/framework/vendor/spyc/lib/spyc.yaml

http://zoop.googlecode.com/
YAML | 196 lines | 111 code | 53 blank | 32 comment | 0 complexity | 84b6bd1b9bc0921e25622e836b0bd9c3 MD5 | raw file
  1#
  2#    S P Y C
  3#      a simple php yaml class
  4#
  5# authors: [vlad andersen (vlad.andersen@gmail.com), chris wanstrath (chris@ozmm.org)]
  6# websites: [http://www.yaml.org, http://spyc.sourceforge.net/]
  7# license: [MIT License, http://www.opensource.org/licenses/mit-license.php]
  8# copyright: (c) 2005-2006 Chris Wanstrath, 2006-2009 Vlad Andersen
  9#
 10# spyc.yml - A file containing the YAML that Spyc understands.
 11
 12---
 13
 14# Mappings - with proper types
 15String: Anyone's name, really.
 16Int: 13
 17True: true
 18False: false
 19Zero: 0
 20Null: NULL
 21Float: 5.34
 22
 23# A sequence
 24- PHP Class
 25- Basic YAML Loader
 26- Very Basic YAML Dumper
 27
 28# A sequence of a sequence
 29-
 30  - YAML is so easy to learn.
 31  - Your config files will never be the same.
 32
 33# Sequence of mappings
 34-
 35  cpu: 1.5ghz
 36  ram: 1 gig
 37  os : os x 10.4.1
 38
 39# Mapped sequence
 40domains:
 41  - yaml.org
 42  - php.net
 43
 44# A sequence like this.
 45- program: Adium
 46  platform: OS X
 47  type: Chat Client
 48
 49# A folded block as a mapped value
 50no time: >
 51  There isn't any time
 52  for your tricks!
 53
 54  Do you understand?  
 55
 56# A literal block as a mapped value
 57some time: |
 58  There is nothing but time
 59  for your tricks.  
 60
 61# Crazy combinations
 62databases:
 63  - name: spartan
 64    notes:
 65      - Needs to be backed up
 66      - Needs to be normalized
 67    type: mysql
 68
 69# You can be a bit tricky
 70"if: you'd": like
 71
 72# Inline sequences
 73- [One, Two, Three, Four]
 74
 75# Nested Inline Sequences
 76- [One, [Two, And, Three], Four, Five]
 77
 78# Nested Nested Inline Sequences
 79- [This, [Is, Getting, [Ridiculous, Guys]], Seriously, [Show, Mercy]]
 80
 81# Inline mappings
 82- {name: chris, age: young, brand: lucky strike}
 83
 84# Nested inline mappings
 85- {name: mark, age: older than chris, brand: [marlboro, lucky strike]}
 86
 87# References -- they're shaky, but functional
 88dynamic languages: &DLANGS
 89  - Perl
 90  - Python
 91  - PHP
 92  - Ruby
 93compiled languages: &CLANGS
 94  - C/C++
 95  - Java
 96all languages:
 97  - *DLANGS
 98  - *CLANGS
 99
100# Added in .2.2: Escaped quotes
101- you know, this shouldn't work.  but it does.
102- 'that''s my value.'
103- 'again, that\'s my value.'
104- "here's to \"quotes\", boss."
105
106# added in .2.3
107- {name: "Foo, Bar's", age: 20}
108
109# Added in .2.4: bug [ 1418193 ] Quote Values in Nested Arrays
110- [a, ['1', "2"], b]
111
112# Added in .2.4: malformed YAML
113all
114  javascripts:     [dom1.js, dom.js]
115
116# Added in .2
1171040: Ooo, a numeric key! # And working comments? Wow! Colons in comments: a menace (0.3).
118
119hash_1: Hash #and a comment
120hash_2: "Hash #and a comment"
121"hash#3": "Hash (#) can appear in key too"
122
123float_test: 1.0
124float_test_with_quotes: '1.0'
125float_inverse_test: 001
126
127a_really_large_number: 115792089237316195423570985008687907853269984665640564039457584007913129639936 # 2^256
128
129int array: [ 1, 2, 3 ]
130
131array on several lines:
132  [ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,
133    10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]
134
135morelesskey: "<value>"
136
137array_of_zero: [0]
138sophisticated_array_of_zero: {rx: {tx: [0]} }
139
140switches:
141  - { row: 0, col: 0, func: {tx: [0, 1]} }
142
143empty_sequence: [ ]
144empty_hash: { }
145
146special_characters: "[{]]{{]]"
147
148asterisks: "*"
149
150empty_key:
151  :
152    key: value
153
154trailing_colon: "foo:"
155
156multiline_items:
157  - type: SomeItem
158    values: [blah, blah, blah,
159      blah]
160    ints: [2, 54, 12,
161      2143]
162
163many_lines: |
164  A quick
165  fox
166
167
168  jumped
169  over
170
171
172
173
174
175  a lazy
176
177
178
179  dog  
180
181
182werte:
183  1: nummer 1
184  0: Stunde 0
185
186noindent_records:
187- record1: value1
188- record2: value2
189
190"a:1": [1000]
191"a:2":
192  - 2000
193
194# [Endloop]
195endloop: |
196    Does this line in the end indeed make Spyc go to an infinite loop?