Module Ya2YAML::Constants
In: lib/ya2yaml.rb

Constants

UCS_0X85 = [0x85].pack('U')
UCS_0XA0 = [0xa0].pack('U')
UCS_0X2028 = [0x2028].pack('U')
UCS_0X2029 = [0x2029].pack('U')
ESCAPE_SEQ = { "\x00" => '\\0', "\x07" => '\\a', "\x08" => '\\b', "\x0b" => '\\v', "\x0c" => '\\f', "\x1b" => '\\e', "\"" => '\\"', "\\" => '\\\\', }   non-break characters
ESCAPE_SEQ_NS = { UCS_0XA0 => '\\_', }   non-breaking space
ESCAPE_SEQ_WS = { "\x09" => '\\t', " " => '\\x20', }   white spaces
ESCAPE_SEQ_LB = { "\x0a" => '\\n', "\x0d" => '\\r', UCS_0X85 => '\\N', UCS_0X2028 => '\\L', UCS_0X2029 => '\\P', }   line breaks
REX_LF = Regexp.escape("\x0a")   regexps for line breaks
REX_CR = Regexp.escape("\x0d")
REX_CRLF = Regexp.escape("\x0d\x0a")
REX_NEL = Regexp.escape(UCS_0X85)
REX_LS = Regexp.escape(UCS_0X2028)
REX_PS = Regexp.escape(UCS_0X2029)
REX_ANY_LB = /(#{REX_LF}|#{REX_CR}|#{REX_NEL}|#{REX_LS}|#{REX_PS})/
REX_NORMAL_LB = /(#{REX_LF}|#{REX_LS}|#{REX_PS})/
REX_BOOL = / y|Y|yes|Yes|YES|n|N|no|No|NO |true|True|TRUE|false|False|FALSE |on|On|ON|off|Off|OFF /x   regexps for language-Independent types for YAML1.1
REX_FLOAT = / [-+]?([0-9][0-9_]*)?\.[0-9.]*([eE][-+][0-9]+)? # (base 10) |[-+]?[0-9][0-9_]*(:[0-5]?[0-9])+\.[0-9_]* # (base 60) |[-+]?\.(inf|Inf|INF) # (infinity) |\.(nan|NaN|NAN) # (not a number) /x
REX_INT = / [-+]?0b[0-1_]+ # (base 2) |[-+]?0[0-7_]+ # (base 8) |[-+]?(0|[1-9][0-9_]*) # (base 10) |[-+]?0x[0-9a-fA-F_]+ # (base 16) |[-+]?[1-9][0-9_]*(:[0-5]?[0-9])+ # (base 60) /x
REX_MERGE = / << /x
REX_NULL = / ~ # (canonical) |null|Null|NULL # (English) | # (Empty) /x
REX_TIMESTAMP = / [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] # (ymd) |[0-9][0-9][0-9][0-9] # (year) -[0-9][0-9]? # (month) -[0-9][0-9]? # (day) ([Tt]|[ \t]+)[0-9][0-9]? # (hour) :[0-9][0-9] # (minute) :[0-9][0-9] # (second) (\.[0-9]*)? # (fraction) (([ \t]*)Z|[-+][0-9][0-9]?(:[0-9][0-9])?)? # (time zone) /x
REX_VALUE = / = /x

[Validate]