1 require 'rbyaml/emitter'
2 require 'rbyaml/serializer'
3 require 'rbyaml/representer'
4 require 'rbyaml/resolver'
11 SUPPORTED_YAML_VERSIONS = ['1.0','1.1']
13 LINE_BR_REG = /[\n\x85]|(?:\r[^\n])/
14 NON_PRINTABLE_RE = /[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\xFF]/
16 ENDING = /^---[\0 \t\r\n\x85]$/
17 START = /^\.\.\.[\0 \t\r\n\x85]$/
18 NULL_OR_OTHER = "\0 \t\r\n\x85"
19 # BEG = /^([^\0 \t\r\n\x85\-?:,\[\]{}#&*!|>'"%@`]|([\-?:][^\0 \t\r\n\x85]))/ #Since current SYCK handles this one wrong, we have to allow backtick right now.
20 BEG = /^([^\0 \t\r\n\x85\-?:,\[\]{}#&*!|>'"%@]|([\-?:][^\0 \t\r\n\x85]))/
21 NULL_OR_LINEBR = "\0\r\n\x85"
22 ALPHA_REG = /[-0-9A-Za-z_]/
23 NULL_BL_LINEBR = "\0 \r\n\x85"
24 NULL_BL_T_LINEBR = NULL_OR_OTHER
25 NON_ALPHA = /[^-0-9A-Za-z_]/
26 NON_ALPHA_OR_NUM = "\0 \t\r\n\x85?:,]}%@`"
27 NULL_T_BL_LINEBR = NULL_OR_OTHER
30 BLANK_OR_LINEBR = " \r\n\x85"
31 FULL_LINEBR = "\r\n\x85"
55 ESCAPE_REPLACEMENTS = {
71 SPACES_AND_STUFF = "'\"\\\0 \t\r\n\x85"
73 NOT_HEXA = /[^0-9A-Fa-f]/
74 R_flowzero = /[\0 \t\r\n\x85]|(:[\0 \t\r\n\x28])/
75 R_flownonzero = /[\0 \t\r\n\x85\[\]{},:?]/
76 S4 = "\0 \t\r\n\x28[]{}"
77 END_OR_START = /^(---|\.\.\.)[\0 \t\r\n\x85]$/
78 STRANGE_CHR = /[\]\[\-';\/?:@&=+$,.!~*()%\w]/
79 HEXA_REG = /[0-9A-Fa-f]/
85 :Indent => 2, :UseHeader => false, :UseVersion => false, :Version => '1.1',
86 :ExplicitStart => true, :ExplicitEnd => false,
87 :SortKeys => false, :AnchorFormat => 'id%03d', :ExplicitTypes => false,
89 :WidthType => 'absolute', :BestWidth => 80,
90 :UseBlock => false, :UseFold => false, :Encoding => :None,
91 :UsePlain => false, :UseSingle => false, :UseDouble => false,
92 :Emitter => RbYAML::Emitter, :Serializer => RbYAML::Serializer,
93 :Representer => RbYAML::Representer, :Resolver => RbYAML::Resolver