diff --git a/Text/Yaml/Reference.bnf b/Text/Yaml/Reference.bnf
--- a/Text/Yaml/Reference.bnf
+++ b/Text/Yaml/Reference.bnf
@@ -9,127 +9,121 @@
                       / '\x85' / ('\xA0', '\xD7FF') / ('\xE000', '\xFFFD')
                       / ('\x10000', '\x10FFFF')
 
+c_json {- 2 -} = '\x9' / '\xA' / '\xD' / ('\x20', '\x10ffff')
+
 -- 5.2 Character Encodings
 
-c_byte_order_mark {- 2 -} = '\xFEFF' & detect_utf_encoding
+c_byte_order_mark {- 3 -} = '\xFEFF' & detect_utf_encoding
 
 -- 5.3 Indicator Characters
 
-c_sequence_entry {-  3 -} = indicator '-'
-c_mapping_key    {-  4 -} = indicator '?'
-c_mapping_value  {-  5 -} = indicator ':'
+c_sequence_entry {-  4 -} = indicator '-'
+c_mapping_key    {-  5 -} = indicator '?'
+c_mapping_value  {-  6 -} = indicator ':'
 
-c_collect_entry  {-  6 -} = indicator ','
-c_sequence_start {-  7 -} = indicator '['
-c_sequence_end   {-  8 -} = indicator ']'
-c_mapping_start  {-  9 -} = indicator '{'
-c_mapping_end    {- 10 -} = indicator '}'
+c_collect_entry  {-  7 -} = indicator ','
+c_sequence_start {-  8 -} = indicator '['
+c_sequence_end   {-  9 -} = indicator ']'
+c_mapping_start  {- 10 -} = indicator '{'
+c_mapping_end    {- 11 -} = indicator '}'
 
-c_comment        {- 11 -} = indicator '#'
+c_comment        {- 12 -} = indicator '#'
 
-c_anchor         {- 12 -} = indicator '&'
-c_alias          {- 13 -} = indicator '*'
-c_tag            {- 14 -} = indicator '!'
+c_anchor         {- 13 -} = indicator '&'
+c_alias          {- 14 -} = indicator '*'
+c_tag            {- 15 -} = indicator '!'
 
-c_literal        {- 15 -} = indicator '|'
-c_folded         {- 16 -} = indicator '>'
+c_literal        {- 16 -} = indicator '|'
+c_folded         {- 17 -} = indicator '>'
 
-c_single_quote   {- 17 -} = indicator '\''
-c_double_quote   {- 18 -} = indicator '"'
+c_single_quote   {- 18 -} = indicator '\''
+c_double_quote   {- 19 -} = indicator '"'
 
-c_directive      {- 19 -} = indicator '%'
+c_directive      {- 20 -} = indicator '%'
 
-c_reserved       {- 20 -} = indicator ( '@' /  '`' )
+c_reserved       {- 21 -} = indicator ( '@' /  '`' )
 
-c_indicator {- 21 -} = c_sequence_entry / c_mapping_key / c_mapping_value / c_collect_entry
+c_indicator {- 22 -} = c_sequence_entry / c_mapping_key / c_mapping_value / c_collect_entry
                      / c_sequence_start / c_sequence_end / c_mapping_start / c_mapping_end
                      / c_comment / c_anchor / c_alias / c_tag
                      / c_literal / c_folded / c_single_quote / c_double_quote
                      / c_directive / c_reserved
 
-c_flow_indicator {- 22 -} = c_collect_entry / c_sequence_start / c_sequence_end / c_mapping_start  / c_mapping_end
+c_flow_indicator {- 23 -} = c_collect_entry / c_sequence_start / c_sequence_end / c_mapping_start  / c_mapping_end
 
 -- 5.4 Line Break Characters
 
-b_line_feed           {- 23 -} = '\xA'
-b_carriage_return     {- 24 -} = '\xD'
-b_next_line           {- 25 -} = '\x85'
-b_line_separator      {- 26 -} = '\x2028'
-b_paragraph_separator {- 27 -} = '\x2029'
-
-b_char {- 28 -} = b_line_feed / b_carriage_return / b_next_line
-                / b_line_separator / b_paragraph_separator
+b_line_feed           {- 24 -} = '\xA'
+b_carriage_return     {- 25 -} = '\xD'
 
-nb_char {- 29 -} = c_printable - b_char
+b_char {- 26 -} = b_line_feed / b_carriage_return
 
-b_specific {- 30 -} = ( b_line_separator / b_paragraph_separator )
-                    & nextLine
+nb_char {- 27 -} = c_printable - b_char
 
-b_generic {- 31 -} = ( b_carriage_return & b_line_feed
-                     / b_carriage_return
-                     / b_line_feed
-                     / b_next_line )
-                   & nextLine
+nb_json {- 28 -} = c_json - b_char
 
-b_as_line_feed {- 32 -} = token LineFeed b_generic
-b_normalized   {- 33 -} = b_as_line_feed / token Break b_specific
+b_break {- 29 -} = ( b_carriage_return & b_line_feed
+                   / b_carriage_return
+                   / b_line_feed )
+                 & nextLine
 
-b_non_content_generic {- 34 -} = token Continue b_generic
+b_as_line_feed {- 30 -} = token LineFeed b_break
 
-b_non_content_any {- 35 -} = b_non_content_generic / token Continue b_specific
+b_non_content {- 31 -} = token Continue b_break
 
 -- 5.5 White Space Characters
 
-s_space {- 36 -} = '\x20'
-s_tab   {- 37 -} = '\x9'
-s_white {- 38 -} = s_space / s_tab
+s_space {- 32 -} = '\x20'
+s_tab   {- 33 -} = '\x9'
+s_white {- 34 -} = s_space / s_tab
 
-ns_char {- 39 -} = nb_char - s_white
+ns_char {- 35 -} = nb_char - s_white
 
 -- 5.6 Miscellaneous Characters
 
-ns_dec_digit {- 40 -} = ('\x30', '\x39')
+ns_dec_digit {- 36 -} = ('\x30', '\x39')
 
-ns_hex_digit {- 41 -} = ns_dec_digit
+ns_hex_digit {- 37 -} = ns_dec_digit
                       / ('\x41', '\x46') / ('\x61', '\x66')
 
-ns_ascii_letter {- 42 -} = ('\x41', '\x5A') / ('\x61', '\x7A')
+ns_ascii_letter {- 38 -} = ('\x41', '\x5A') / ('\x61', '\x7A')
 
-ns_word_char {- 43 -} = ns_dec_digit / ns_ascii_letter / '-'
+ns_word_char {- 39 -} = ns_dec_digit / ns_ascii_letter / '-'
 
-ns_uri_char {- 44 -} = "escape"
+ns_uri_char {- 40 -} = "escape"
                      ^ ( ns_word_char
                        / '%' ! "escape" & ns_hex_digit & ns_hex_digit
                        / ';' / '/' / '?' / ':' / '@' / '&'  / '=' / '+' / '$' / ','
                        / '_' / '.' / '!' / '~' / '*' / '\'' / '(' / ')' / '[' / ']' )
 
-ns_tag_char {- 45 -} = ns_uri_char - c_tag - c_flow_indicator
+ns_tag_char {- 41 -} = ns_uri_char - c_tag - c_flow_indicator
 
 -- 5.7 Escaped Characters
 
-c_escape {- 46 -} = indicator '\\'
+c_escape {- 42 -} = indicator '\\'
 
-ns_esc_null                {- 47 -} = meta '0'
-ns_esc_bell                {- 48 -} = meta 'a'
-ns_esc_backspace           {- 49 -} = meta 'b'
-ns_esc_horizontal_tab      {- 50 -} = meta ( 't' / '\x9' )
-ns_esc_line_feed           {- 51 -} = meta 'n'
-ns_esc_vertical_tab        {- 52 -} = meta 'v'
-ns_esc_form_feed           {- 53 -} = meta 'f'
-ns_esc_carriage_return     {- 54 -} = meta 'r'
-ns_esc_escape              {- 55 -} = meta 'e'
-ns_esc_space               {- 56 -} = meta '\x20'
-ns_esc_double_quote        {- 57 -} = meta '"'
-ns_esc_backslash           {- 58 -} = meta '\\'
-ns_esc_next_line           {- 59 -} = meta 'N'
-ns_esc_non_breaking_space  {- 60 -} = meta '_'
-ns_esc_line_separator      {- 61 -} = meta 'L'
-ns_esc_paragraph_separator {- 62 -} = meta 'P'
-ns_esc_8_bit               {- 63 -} = indicator 'x' ! "escaped" & meta ( ns_hex_digit % 2 )
-ns_esc_16_bit              {- 64 -} = indicator 'u' ! "escaped" & meta ( ns_hex_digit % 4 )
-ns_esc_32_bit              {- 65 -} = indicator 'U' ! "escaped" & meta ( ns_hex_digit % 8 )
+ns_esc_null                {- 43 -} = meta '0'
+ns_esc_bell                {- 44 -} = meta 'a'
+ns_esc_backspace           {- 45 -} = meta 'b'
+ns_esc_horizontal_tab      {- 46 -} = meta ( 't' / '\x9' )
+ns_esc_line_feed           {- 47 -} = meta 'n'
+ns_esc_vertical_tab        {- 48 -} = meta 'v'
+ns_esc_form_feed           {- 49 -} = meta 'f'
+ns_esc_carriage_return     {- 50 -} = meta 'r'
+ns_esc_escape              {- 51 -} = meta 'e'
+ns_esc_space               {- 52 -} = meta '\x20'
+ns_esc_double_quote        {- 53 -} = meta '"'
+ns_esc_slash               {- 54 -} = meta '/'
+ns_esc_backslash           {- 55 -} = meta '\\'
+ns_esc_next_line           {- 56 -} = meta 'N'
+ns_esc_non_breaking_space  {- 57 -} = meta '_'
+ns_esc_line_separator      {- 58 -} = meta 'L'
+ns_esc_paragraph_separator {- 59 -} = meta 'P'
+ns_esc_8_bit               {- 60 -} = indicator 'x' ! "escaped" & meta ( ns_hex_digit % 2 )
+ns_esc_16_bit              {- 61 -} = indicator 'u' ! "escaped" & meta ( ns_hex_digit % 4 )
+ns_esc_32_bit              {- 62 -} = indicator 'U' ! "escaped" & meta ( ns_hex_digit % 8 )
 
-c_ns_esc_char {- 66 -} = nest BeginEscape
+c_ns_esc_char {- 63 -} = nest BeginEscape
               & c_escape ! "escape"
               & "escaped"
               ^ ( ns_esc_null
@@ -143,6 +137,7 @@
                 / ns_esc_escape
                 / ns_esc_space
                 / ns_esc_double_quote
+                / ns_esc_slash
                 / ns_esc_backslash
                 / ns_esc_next_line
                 / ns_esc_non_breaking_space
@@ -155,129 +150,126 @@
 
 -- 6.1 Indentation Spaces
 
-s_indent    n {- 67 -} = token Indent ( s_space % n )
+s_indent    n {- 64 -} = token Indent ( s_space % n )
 
-s_indent_lt n {- 68 -} = token Indent ( s_space <% n )
-s_indent_le n {- 69 -} = token Indent ( s_space <% (n .+ 1) )
+s_indent_lt n {- 65 -} = token Indent ( s_space <% n )
+s_indent_le n {- 66 -} = token Indent ( s_space <% (n .+ 1) )
 
 -- 6.2 Separation Spaces
 
-s_separate_in_line {- 70 -} = token White ( s_white +) / sol
+s_separate_in_line {- 67 -} = token White ( s_white +) / sol
 
 -- 6.3 Line Prefixes
 
-s_line_prefix n c {- 71 -} = case c of
+s_line_prefix n c {- 68 -} = case c of
                                   BlockOut -> s_block_line_prefix n
                                   BlockIn  -> s_block_line_prefix n
                                   FlowOut  -> s_flow_line_prefix n
                                   FlowIn   -> s_flow_line_prefix n
 
-s_block_line_prefix n {- 72 -} = s_indent n
-s_flow_line_prefix  n {- 73 -} = s_indent n & ( s_separate_in_line ?)
+s_block_line_prefix n {- 69 -} = s_indent n
+s_flow_line_prefix  n {- 70 -} = s_indent n & ( s_separate_in_line ?)
 
 -- 6.4 Empty Lines
 
-l_empty n c {- 74 -} = ( s_line_prefix n c / s_indent_lt n )
-                     & b_normalized
+l_empty n c {- 71 -} = ( s_line_prefix n c / s_indent_lt n )
+                     & b_as_line_feed
 
--- 6.5 Comments
+-- 6.5 Line Folding
 
-c_nb_comment_text {- 75 -} = nest BeginComment
+b_l_trimmed  n c {- 72 -} = b_non_content & ( l_empty n c +)
+
+b_as_space {- 73 -} = token LineFold b_break
+
+b_l_folded n c  {- 74 -} = b_l_trimmed n c / b_as_space
+
+s_s_flow_folded n {- 75 -} = ( s_separate_in_line ?) & b_l_folded n FlowIn
+                           & s_line_prefix n FlowIn
+
+-- 6.6 Comments
+
+c_nb_comment_text {- 76 -} = nest BeginComment
                            & c_comment & meta ( nb_char *)
                            & nest EndComment
 
-s_b_comment {- 76 -} = ( s_separate_in_line & ( c_nb_comment_text ?) ?)
-                     & b_non_content_any
+s_b_comment {- 77 -} = ( s_separate_in_line & ( c_nb_comment_text ?) ?)
+                     & b_non_content
 
-l_comment {- 77 -} = s_separate_in_line & ( c_nb_comment_text ?) & b_non_content_any
+l_comment {- 78 -} = s_separate_in_line & ( c_nb_comment_text ?) & b_non_content
 
-s_l_comments {- 78 -} = ( s_b_comment / sol )
+s_l_comments {- 79 -} = ( s_b_comment / sol )
                       & ( l_comment *)
 
--- 6.6 Separation Lines
+-- 6.7 Separation Lines
 
-s_separate n c      {- 79 -} = case c of
+s_separate n c      {- 80 -} = case c of
                                     BlockOut -> s_separate_lines n
                                     BlockIn  -> s_separate_lines n
                                     FlowOut  -> s_separate_lines n
                                     FlowIn   -> s_separate_lines n
                                     FlowKey  -> s_separate_in_line
-s_separate_lines n {- 80 -} = s_l_comments & s_flow_line_prefix n
+s_separate_lines n {- 81 -} = s_l_comments & s_flow_line_prefix n
                             / s_separate_in_line
 
--- 6.7 Line Folding
-
-b_l_folded_specific n c {- 81 -} = token Break b_specific & ( l_empty n c *)
-
-b_l_folded_trimmed  n c {- 82 -} = b_non_content_generic & ( l_empty n c +)
-
-b_l_folded_as_space {-  83 -} = token LineFold b_generic
-
-b_l_folded_any n c  {-  84 -} = b_l_folded_specific n c
-                              / b_l_folded_trimmed n c
-                              / b_l_folded_as_space
-
-s_l_flow_folded n {-  85 -} = ( s_separate_in_line ?) & b_l_folded_any n FlowIn
-
 -- 6.8 Directives
 
-l_directive {-  86 -} = nest BeginDirective
-                      & c_directive
-                      & "directive"
-                      ^ ( ns_yaml_directive
-                        / ns_tag_directive
-                        / ns_reserved_directive )
-                      & nest EndDirective
-                      & s_l_comments
+l_directive {- 82 -} = nest BeginDirective
+                     & c_directive
+                     & "directive"
+                     ^ ( ns_yaml_directive
+                       / ns_tag_directive
+                       / ns_reserved_directive )
+                     & nest EndDirective
+                     & s_l_comments
 
-ns_reserved_directive  {-  87 -} = ns_directive_name
-                                 & ( s_separate_in_line & ns_directive_parameter *)
-ns_directive_name      {-  88 -} = meta ( ns_char +)
-ns_directive_parameter {-  89 -} = meta ( ns_char +)
+ns_reserved_directive  {- 83 -} = ns_directive_name
+                                & ( s_separate_in_line & ns_directive_parameter *)
+ns_directive_name      {- 84 -} = meta ( ns_char +)
+ns_directive_parameter {- 85 -} = meta ( ns_char +)
 
 -- 6.8.1 Yaml Directives
 
-ns_yaml_directive {-  90 -} = meta [ 'Y', 'A', 'M', 'L' ] ! "directive"
-                            & s_separate_in_line & ns_yaml_version
-ns_yaml_version   {-  91 -} = meta ( ( ns_dec_digit +) & '.' & ( ns_dec_digit +) )
+ns_yaml_directive {- 86 -} = meta [ 'Y', 'A', 'M', 'L' ] ! "directive"
+                           & s_separate_in_line & ns_yaml_version
+ns_yaml_version   {- 87 -} = meta ( ( ns_dec_digit +) & '.' & ( ns_dec_digit +) )
 
 -- 6.8.2 Tag Directives
 
-ns_tag_directive {-  92 -} = meta [ 'T', 'A', 'G' ] ! "directive"
-                           & s_separate_in_line & c_tag_handle
+ns_tag_directive {- 88 -} = meta [ 'T', 'A', 'G' ] ! "directive"
+                          & s_separate_in_line & c_tag_handle
                            & s_separate_in_line & ns_tag_prefix
 
 -- 6.8.2.1 Tag Handles
 
-c_tag_handle {-  93 -} = c_named_tag_handle
-                       / c_secondary_tag_handle
-                       / c_primary_tag_handle
+c_tag_handle {- 89 -} = c_named_tag_handle
+                      / c_secondary_tag_handle
+                      / c_primary_tag_handle
 
-c_primary_tag_handle   {-  94 -} = nest BeginHandle
-                                 & c_tag
-                                 & nest EndHandle
+c_primary_tag_handle   {- 90 -} = nest BeginHandle
+                                & c_tag
+                                & nest EndHandle
 
-c_secondary_tag_handle {-  95 -} = nest BeginHandle
-                                 & c_tag & c_tag
-                                 & nest EndHandle
+c_secondary_tag_handle {- 91 -} = nest BeginHandle
+                                & c_tag & c_tag
+                                & nest EndHandle
 
-c_named_tag_handle     {-  96 -} = nest BeginHandle
+c_named_tag_handle     {- 92 -} = nest BeginHandle
                                  & c_tag & meta ( ns_word_char +) & c_tag
                                  & nest EndHandle
 
 -- 6.8.2.2 Tag Prefixes
 
-ns_tag_prefix {-  97 -} = nest BeginTag
-                        & ( c_ns_local_tag_prefix / ns_global_tag_prefix )
-                        & nest EndTag
+ns_tag_prefix {- 93 -} = nest BeginTag
+                       & ( c_ns_local_tag_prefix / ns_global_tag_prefix )
+                       & nest EndTag
 
-c_ns_local_tag_prefix {-  98 -} = c_tag & meta ( ns_uri_char *)
+c_ns_local_tag_prefix {- 94 -} = c_tag & meta ( ns_uri_char *)
 
-ns_global_tag_prefix  {-  99 -} = meta ( ns_tag_char & ( ns_uri_char *) )
+ns_global_tag_prefix  {- 95 -} = meta ( ns_tag_char & ( ns_uri_char *) )
 
 -- 6.9 Node Properties
 
-c_ns_properties n c {-  100 -} = nest BeginProperties
+c_ns_properties n c {- 96 -} = nest BeginProperties
                               & ( ( c_ns_tag_property
                                   & ( s_separate n c & c_ns_anchor_property ?) )
                                 / ( c_ns_anchor_property
@@ -286,187 +278,185 @@
 
 -- 6.9.1 Node Tags
 
-c_ns_tag_property {- 101 -} = nest BeginTag
+c_ns_tag_property {- 97 -} = nest BeginTag
                             & ( c_verbatim_tag
                               / c_ns_shorthand_tag
                               / c_non_specific_tag )
                             & nest EndTag
 
-c_verbatim_tag     {- 102 -} = c_tag & indicator '<' & meta ( ns_uri_char +) & indicator '>'
+c_verbatim_tag     {- 98 -} = c_tag & indicator '<' & meta ( ns_uri_char +) & indicator '>'
 
-c_ns_shorthand_tag {- 103 -} = c_named_tag_handle & meta ( ns_tag_char +)
+c_ns_shorthand_tag {- 99 -} = c_named_tag_handle & meta ( ns_tag_char +)
                              / c_secondary_tag_handle & meta ( ns_tag_char +)
                              / c_primary_tag_handle & meta ( ns_tag_char +)
 
-c_non_specific_tag {- 104 -} = c_tag
+c_non_specific_tag {- 100 -} = c_tag
 
 -- 6.9.2 Node Anchors
 
-c_ns_anchor_property {- 105 -} = nest BeginAnchor
+c_ns_anchor_property {- 101 -} = nest BeginAnchor
                                & c_anchor & ns_anchor_name
                                & nest EndAnchor
 
-ns_anchor_char {- 106 -} = ns_char - c_flow_indicator
-ns_anchor_name {- 107 -} = meta ( ns_anchor_char +)
+ns_anchor_char {- 102 -} = ns_char - c_flow_indicator
+ns_anchor_name {- 103 -} = meta ( ns_anchor_char +)
 
 -- 7.1 Alias Nodes
 
-c_ns_alias_node {- 108 -} = nest BeginAlias
+c_ns_alias_node {- 104 -} = nest BeginAlias
                           & c_alias ! "node" & ns_anchor_name
                           & nest EndAlias
 
 -- 7.2 Empty Nodes
 
-e_scalar {- 109 -} = nest BeginScalar & nest EndScalar
+e_scalar {- 105 -} = nest BeginScalar & nest EndScalar
 
-e_node {- 110 -} = nest BeginNode & e_scalar & nest EndNode
+e_node {- 106 -} = nest BeginNode & e_scalar & nest EndNode
 
 -- 7.3.1 Double Quoted Style
 
-nb_double_char {- 111 -} = "escape" ^ ( nb_char - c_escape - c_double_quote / c_ns_esc_char )
-ns_double_char {- 112 -} = nb_double_char - s_white
+nb_double_char {- 107 -} = "escape" ^ ( nb_json - c_escape - c_double_quote / c_ns_esc_char )
+ns_double_char {- 108 -} = nb_double_char - s_white
 
-c_double_quoted n c {- 113 -} = nest BeginScalar
+c_double_quoted n c {- 109 -} = nest BeginScalar
                               & c_double_quote ! "node" & text ( nb_double_text n c ) & c_double_quote
                               & nest EndScalar
-nb_double_text n c  {- 114 -} = case c of
+nb_double_text n c  {- 110 -} = case c of
                                      FlowOut -> nb_double_multi_line n
                                      FlowIn  -> nb_double_multi_line n
                                      FlowKey -> nb_double_one_line
-nb_double_one_line  {- 115 -} = ( nb_double_char *)
+nb_double_one_line  {- 111 -} = ( nb_double_char *)
 
-s_l_double_escaped n {- 116 -} = ( s_white *)
+s_s_double_escaped n {- 112 -} = ( s_white *)
                                & nest BeginEscape
-                               & c_escape ! "escape" & b_non_content_any
+                               & c_escape ! "escape" & b_non_content
                                & nest EndEscape
                                & ( l_empty n FlowIn *)
-s_l_double_any n     {- 117 -} = "escape" ^ ( s_l_double_escaped n / s_l_flow_folded n )
+                               & s_line_prefix n FlowIn
+s_s_double_break n   {- 113 -} = "escape" ^ ( s_s_double_escaped n / s_s_flow_folded n )
 
-nb_ns_double_in_line    {- 118 -} = ( ( s_white *) & ns_double_char *)
-s_ns_double_next_line n {- 119 -} = s_l_double_any n
-                                  & s_flow_line_prefix n
+nb_ns_double_in_line    {- 114 -} = ( ( s_white *) & ns_double_char *)
+s_ns_double_next_line n {- 115 -} = s_s_double_break n
                                   & ns_double_char & nb_ns_double_in_line
-nb_double_multi_line n  {- 120 -} = nb_ns_double_in_line
+nb_double_multi_line n  {- 116 -} = nb_ns_double_in_line
                                   & ( s_ns_double_next_line n *)
                                   & ( s_white *)
 
 -- 7.3.2 Single Quoted Style
 
-c_quoted_quote {- 121 -} = nest BeginEscape
+c_quoted_quote {- 117 -} = nest BeginEscape
                          & c_single_quote ! "escape" & meta '\''
                          & nest EndEscape
-nb_single_char {- 122 -} = "escape" ^ ( nb_char - c_single_quote / c_quoted_quote )
-ns_single_char {- 123 -} = nb_single_char - s_white
+nb_single_char {- 118 -} = "escape" ^ ( nb_json - c_single_quote / c_quoted_quote )
+ns_single_char {- 119 -} = nb_single_char - s_white
 
-c_single_quoted  n c {- 124 -}= nest BeginScalar
+c_single_quoted  n c {- 120 -}= nest BeginScalar
                               & c_single_quote & text ( nb_single_text n c ) & c_single_quote
                               & nest EndScalar
-nb_single_text n c {- 125 -} = case c of
+nb_single_text n c {- 121 -} = case c of
                                     FlowOut -> nb_single_multi_line n
                                     FlowIn  -> nb_single_multi_line n
                                     FlowKey -> nb_single_one_line
-nb_single_one_line {- 126 -} = ( nb_single_char *)
+nb_single_one_line {- 122 -} = ( nb_single_char *)
 
-nb_ns_single_in_line    {- 127 -} = ( ( s_white *) & ns_single_char *)
-s_ns_single_next_line n {- 128 -} = s_l_flow_folded n
-                                  & s_flow_line_prefix n
+nb_ns_single_in_line    {- 123 -} = ( ( s_white *) & ns_single_char *)
+s_ns_single_next_line n {- 124 -} = s_s_flow_folded n
                                   & ns_single_char & nb_ns_single_in_line
-nb_single_multi_line n  {- 129 -} = ( nb_ns_single_in_line *)
+nb_single_multi_line n  {- 125 -} = ( nb_ns_single_in_line *)
                                   & ( s_ns_single_next_line n *)
                                   & ( s_white *)
 
 -- 7.3.3 Plain Style
 
-ns_plain_first c  {- 130 -} = ns_char - c_indicator
+ns_plain_first c  {- 126 -} = ns_char - c_indicator
                             / ( ':' / '?' / '-' ) & ( ns_char >?)
 
-ns_plain_safe c   {- 131 -} = case c of
+ns_plain_safe c   {- 127 -} = case c of
                                    FlowOut -> ns_plain_safe_out
                                    FlowIn  -> ns_plain_safe_in
                                    FlowKey -> ns_plain_safe_in
-ns_plain_safe_out {- 132 -} = ns_char - c_mapping_value - c_comment
-ns_plain_safe_in   {- 133 -}= ns_plain_safe_out - c_flow_indicator
-ns_plain_char c   {- 134 -} = ns_plain_safe c
+ns_plain_safe_out {- 128 -} = ns_char - c_mapping_value - c_comment
+ns_plain_safe_in  {- 129 -} = ns_plain_safe_out - c_flow_indicator
+ns_plain_char c   {- 130 -} = ns_plain_safe c
                             / ( ns_char <?) & '#'
                             / ':' & ( ns_char >?)
-nb_plain_char c   {- 135 -} = s_white / ns_plain_char c
+nb_plain_char c   {- 131 -} = s_white / ns_plain_char c
 
-ns_plain n c          {- 136 -} = nest BeginScalar
+ns_plain n c          {- 132 -} = nest BeginScalar
                                 & text (case c of
                                               FlowOut -> ns_plain_multi_line n c
                                               FlowIn  -> ns_plain_multi_line n c
                                               FlowKey -> ns_plain_one_line c)
                                 & nest EndScalar
-nb_ns_plain_in_line c {- 137 -} = ( ( s_white *) & ns_plain_char c *)
-ns_plain_one_line c   {- 138 -} = ns_plain_first c ! "node" & nb_ns_plain_in_line c
+nb_ns_plain_in_line c {- 133 -} = ( ( s_white *) & ns_plain_char c *)
+ns_plain_one_line c   {- 134 -} = ns_plain_first c ! "node" & nb_ns_plain_in_line c
 
-s_ns_plain_next_line n c {- 139 -} = s_l_flow_folded n
-                                   & s_flow_line_prefix n
+s_ns_plain_next_line n c {- 135 -} = s_s_flow_folded n
                                    & ns_plain_char c & nb_ns_plain_in_line c
-ns_plain_multi_line n c  {- 140 -} = ns_plain_one_line c & ( s_ns_plain_next_line n c *)
+ns_plain_multi_line n c  {- 136 -} = ns_plain_one_line c & ( s_ns_plain_next_line n c *)
 
 -- 7.4 Flow Collection Styles
 
-in_flow c {- 141 -} = case c of
+in_flow c {- 137 -} = case c of
                            FlowOut -> FlowIn
                            FlowIn  -> FlowIn
                            FlowKey -> FlowKey
 
 -- 7.4.1 Flow Sequences
 
-c_flow_sequence n c {- 142 -} = nest BeginSequence
+c_flow_sequence n c {- 138 -} = nest BeginSequence
                               & c_sequence_start ! "node" & ( s_separate n c ?)
                               & ( ns_s_flow_seq_entries n (in_flow c) ?) & c_sequence_end
                               & nest EndSequence
 
-ns_s_flow_seq_entries n c {- 143 -} = ns_flow_seq_entry n c & ( s_separate n c ?)
+ns_s_flow_seq_entries n c {- 139 -} = ns_flow_seq_entry n c & ( s_separate n c ?)
                                     & ( c_collect_entry & ( s_separate n c ?)
                                       & ( ns_s_flow_seq_entries n c ?) ?)
 
-ns_flow_seq_entry n c {- 144 -} = "pair" ^ ( ns_flow_pair n c / "node" ^ ns_flow_node n c )
+ns_flow_seq_entry n c {- 140 -} = "pair" ^ ( ns_flow_pair n c / "node" ^ ns_flow_node n c )
 
 -- 7.4.2 Flow Mappings
 
-c_flow_mapping n c        {- 145 -} = nest BeginMapping
+c_flow_mapping n c        {- 141 -} = nest BeginMapping
                                     & c_mapping_start ! "node" & ( s_separate n c ?)
                                     & ( ns_s_flow_map_entries n (in_flow c) ?) & c_mapping_end
                                     & nest EndMapping
-ns_s_flow_map_entries n c {- 146 -} = ns_flow_map_entry n c & ( s_separate n c ?)
+ns_s_flow_map_entries n c {- 142 -} = ns_flow_map_entry n c & ( s_separate n c ?)
                                     & ( c_collect_entry & ( s_separate n c ?)
                                       & ( ns_s_flow_map_entries n c ?) ?)
 
-ns_flow_map_entry n c {- 147 -}          = nest BeginPair
+ns_flow_map_entry n c {- 143 -}          = nest BeginPair
                                          & "key" ^ ( c_mapping_key ! "key" & s_separate n c
                                                    & ns_flow_map_explicit_entry n c
                                          / ns_flow_map_implicit_entry n c )
                                          & nest EndPair
-ns_flow_map_explicit_entry n c {- 148 -} = ns_flow_map_implicit_entry n c
+ns_flow_map_explicit_entry n c {- 144 -} = ns_flow_map_implicit_entry n c
                                          / e_node
                                          & e_node
 
-ns_flow_map_implicit_entry n c {- 149 -}    = "pair"
+ns_flow_map_implicit_entry n c {- 145 -}    = "pair"
                                             ^ ( ns_flow_map_yaml_key_entry n c
                                               / c_ns_flow_map_empty_key_entry n c
                                               / c_ns_flow_map_json_key_entry n c )
-ns_flow_map_yaml_key_entry n c {- 150 -}    = ( "node" ^ ns_flow_yaml_node n c ) ! "pair"
+ns_flow_map_yaml_key_entry n c {- 146 -}    = ( "node" ^ ns_flow_yaml_node n c ) ! "pair"
                                             & (   ( s_separate n c ?)
                                                 & c_ns_flow_map_separate_value n c
                                               / e_node )
-c_ns_flow_map_empty_key_entry n c {- 151 -} = e_node
+c_ns_flow_map_empty_key_entry n c {- 147 -} = e_node
                                             & c_ns_flow_map_separate_value n c
-c_ns_flow_map_separate_value n c {- 152 -}  = c_mapping_value ! "pair"
+c_ns_flow_map_separate_value n c {- 148 -}  = c_mapping_value ! "pair"
                                             & ( s_separate n c & ns_flow_node n c
                                               / e_node )
 
-c_ns_flow_map_json_key_entry n c {- 153 -} = ( "node" ^ c_flow_json_node n c ) ! "pair"
+c_ns_flow_map_json_key_entry n c {- 149 -} = ( "node" ^ c_flow_json_node n c ) ! "pair"
                                            & (   ( s_separate n c ?)
                                                & c_ns_flow_map_adjacent_value n c
                                              / e_node )
-c_ns_flow_map_adjacent_value n c {- 154 -} = c_mapping_value ! "pair" & (   ( s_separate n c ?)
+c_ns_flow_map_adjacent_value n c {- 150 -} = c_mapping_value ! "pair" & (   ( s_separate n c ?)
                                                                           & ns_flow_node n c
                                                                         / e_node )
 
-ns_flow_pair n c {- 155 -} = nest BeginMapping
+ns_flow_pair n c {- 151 -} = nest BeginMapping
                            & nest BeginPair
                            & ( c_mapping_key ! "pair" & s_separate n c
                              & ns_flow_map_explicit_entry n c
@@ -474,40 +464,40 @@
                            & nest EndPair
                            & nest EndMapping
 
-ns_flow_pair_entry n c            {- 156 -} = "entry"
+ns_flow_pair_entry n c            {- 152 -} = "entry"
                                             ^ ( ns_flow_pair_yaml_key_entry n c
                                               / c_ns_flow_map_empty_key_entry n c
                                               / c_ns_flow_pair_json_key_entry n c )
-ns_flow_pair_yaml_key_entry n c   {- 157 -} = ns_s_implicit_yaml_key
+ns_flow_pair_yaml_key_entry n c   {- 153 -} = ns_s_implicit_yaml_key
                                             & c_ns_flow_map_separate_value n c
-c_ns_flow_pair_json_key_entry n c {- 158 -} = c_s_implicit_json_key
+c_ns_flow_pair_json_key_entry n c {- 154 -} = c_s_implicit_json_key
                                             & c_ns_flow_map_adjacent_value n c
-ns_s_implicit_yaml_key            {- 159 -} = ( "node" ^ ( ns_flow_yaml_node na FlowKey )
+ns_s_implicit_yaml_key            {- 155 -} = ( "node" ^ ( ns_flow_yaml_node na FlowKey )
                                               & ( s_separate_in_line ?) )
                                             `limitedTo` 1024
-c_s_implicit_json_key             {- 160 -} = ( "node" ^ ( c_flow_json_node  na FlowKey )
+c_s_implicit_json_key             {- 156 -} = ( "node" ^ ( c_flow_json_node  na FlowKey )
                                               & ( s_separate_in_line ?) )
                                             `limitedTo` 1024
 
 -- 7.5 Flow Nodes
 
-ns_flow_yaml_content n c {- 161 -} = ns_plain n c
-c_flow_json_content n c  {- 162 -} = c_flow_sequence n c / c_flow_mapping n c
+ns_flow_yaml_content n c {- 157 -} = ns_plain n c
+c_flow_json_content n c  {- 158 -} = c_flow_sequence n c / c_flow_mapping n c
                                    / c_single_quoted n c / c_double_quoted n c
-ns_flow_content n c      {- 163 -} = ns_flow_yaml_content n c / c_flow_json_content n c
+ns_flow_content n c      {- 159 -} = ns_flow_yaml_content n c / c_flow_json_content n c
 
-ns_flow_yaml_node n c {- 164 -} = nest BeginNode
+ns_flow_yaml_node n c {- 160 -} = nest BeginNode
                                 & ( c_ns_alias_node
                                   / ns_flow_yaml_content n c
                                   / ( c_ns_properties n c
                                     & ( s_separate n c & ns_flow_yaml_content n c
                                       / e_scalar ) ) )
                                 & nest EndNode
-c_flow_json_node n c  {- 165 -} = nest BeginNode
+c_flow_json_node n c  {- 161 -} = nest BeginNode
                                 & ( c_ns_properties n c & s_separate n c ?)
                                 & c_flow_json_content n c
                                 & nest EndNode
-ns_flow_node n c      {- 166 -} = nest BeginNode
+ns_flow_node n c      {- 162 -} = nest BeginNode
                                 & ( c_ns_alias_node
                                   / ns_flow_content n c
                                   / ( c_ns_properties n c
@@ -517,7 +507,7 @@
 
 -- 8.1.1 Block Scalar Headers
 
-c_b_block_header n {- 167 -} = "header"
+c_b_block_header n {- 163 -} = "header"
                              ^ ( do m <- c_indentation_indicator n
                                     t <- c_chomping_indicator
                                     ( s_white / b_char ) ?! "header"
@@ -530,11 +520,11 @@
 
 -- 8.1.1.1 Block Indentation Indicator
 
-c_indentation_indicator n {- 168 -} = indicator ( ns_dec_digit - '0' ) & asInteger
+c_indentation_indicator n {- 164 -} = indicator ( ns_dec_digit - '0' ) & asInteger
                                     / detect_scalar_indentation n
 
 detect_scalar_indentation n = peek $ ( nb_char *)
-                                   & ( b_non_content_any & ( l_empty n BlockIn *) ?)
+                                   & ( b_non_content & ( l_empty n BlockIn *) ?)
                                    & count_spaces (-n)
 
 count_spaces n  = (s_space & count_spaces (n .+ 1))
@@ -542,67 +532,67 @@
 
 -- 8.1.1.2 Chomping Indicator
 
-c_chomping_indicator {- 169 -} = indicator '-' & result Strip
+c_chomping_indicator {- 165 -} = indicator '-' & result Strip
                                / indicator '+' ! "header" & result Keep
                                / result Clip
 
-b_chomped_last t {- 170 -} = case t of
-                                  Strip -> nest EndScalar & b_non_content_any
-                                  Clip  -> b_normalized & nest EndScalar
-                                  Keep  -> b_normalized
+b_chomped_last t {- 166 -} = case t of
+                                  Strip -> nest EndScalar & b_non_content
+                                  Clip  -> b_as_line_feed & nest EndScalar
+                                  Keep  -> b_as_line_feed
 
-l_chomped_empty n t {- 171 -} = case t of
+l_chomped_empty n t {- 167 -} = case t of
                                      Strip -> l_strip_empty n
                                      Clip  -> l_strip_empty n
                                      Keep  -> l_keep_empty n
-l_strip_empty n     {- 172 -} = ( s_indent_le n & b_non_content_any *)
+l_strip_empty n     {- 168 -} = ( s_indent_le n & b_non_content *)
                               & ( l_trail_comments n ?)
-l_keep_empty n      {- 173 -} = ( l_empty n BlockIn *)
+l_keep_empty n      {- 169 -} = ( l_empty n BlockIn *)
                               & nest EndScalar
                               & ( l_trail_comments n ?)
 
-l_trail_comments n {- 174 -} = s_indent_lt n & c_nb_comment_text & b_non_content_any
+l_trail_comments n {- 170 -} = s_indent_lt n & c_nb_comment_text & b_non_content
                              & ( l_comment *)
 
 -- 8.1.2 Literal Style
 
-c_l__literal n {- 175 -} = do nest BeginScalar
+c_l__literal n {- 171 -} = do nest BeginScalar
                               indicator '|'
                               (m, t) <- c_b_block_header n
                               text ( l_literal_content (n .+ m) t )
 
-l_nb_literal_text n   {- 176 -} = ( l_empty n BlockIn *)
+l_nb_literal_text n   {- 172 -} = ( l_empty n BlockIn *)
                                 & s_indent n & ( nb_char +)
-b_nb_literal_next n   {- 177 -} = b_normalized
+b_nb_literal_next n   {- 173 -} = b_as_line_feed
                                 & l_nb_literal_text n
-l_literal_content n t {- 178 -} = ( l_nb_literal_text n & ( b_nb_literal_next n *)
+l_literal_content n t {- 174 -} = ( l_nb_literal_text n & ( b_nb_literal_next n *)
                                   & b_chomped_last t ?)
                                 & l_chomped_empty n t
 
 -- 8.1.3 Folded Style
 
-c_l__folded n {- 179 -} = do nest BeginScalar
+c_l__folded n {- 175 -} = do nest BeginScalar
                              indicator '>'
                              (m, t) <- c_b_block_header n
                              text ( l_folded_content (n .+ m) t )
 
-s_nb_folded_text n  {- 180 -} = s_indent n & ns_char ! "fold" & ( nb_char *)
-l_nb_folded_lines n {- 181 -} = s_nb_folded_text n
-                              & ( b_l_folded_any n BlockIn & s_nb_folded_text n *)
+s_nb_folded_text n  {- 176 -} = s_indent n & ns_char ! "fold" & ( nb_char *)
+l_nb_folded_lines n {- 177 -} = s_nb_folded_text n
+                              & ( b_l_folded n BlockIn & s_nb_folded_text n *)
 
-s_nb_spaced_text n  {- 182 -} = s_indent n & s_white ! "fold" & ( nb_char *)
-b_l_spaced        n {- 183 -} = b_normalized
+s_nb_spaced_text n  {- 178 -} = s_indent n & s_white ! "fold" & ( nb_char *)
+b_l_spaced        n {- 179 -} = b_as_line_feed
                               & ( l_empty n BlockIn *)
-l_nb_spaced_lines n {- 184 -} = s_nb_spaced_text n
+l_nb_spaced_lines n {- 180 -} = s_nb_spaced_text n
                               & ( b_l_spaced n & s_nb_spaced_text n *)
 
-l_nb_same_lines n {- 185 -} = ( l_empty n BlockIn *)
+l_nb_same_lines n {- 181 -} = ( l_empty n BlockIn *)
                             & "fold" ^ ( l_nb_folded_lines n / l_nb_spaced_lines n )
 
-l_nb_diff_lines n {- 186 -} = l_nb_same_lines n
-                            & ( b_normalized & l_nb_same_lines n *)
+l_nb_diff_lines n {- 182 -} = l_nb_same_lines n
+                            & ( b_as_line_feed & l_nb_same_lines n *)
 
-l_folded_content n t {- 187 -} = ( l_nb_diff_lines n & b_chomped_last t ?)
+l_folded_content n t {- 183 -} = ( l_nb_diff_lines n & b_chomped_last t ?)
                                & l_chomped_empty n t
 
 -- 8.2.1 Block Sequences
@@ -610,21 +600,21 @@
 detect_collection_indentation n = peek $ ( l_comment* ) & count_spaces (-n)
 detect_inline_indentation       = peek $ count_spaces 0
 
-l__block_sequence n   {- 188 -} = do m  <- detect_collection_indentation n
+l__block_sequence n   {- 184 -} = do m  <- detect_collection_indentation n
                                      (   nest BeginSequence
                                        & ( s_indent (n .+ m) & c_l_block_seq_entry (n .+ m) +)
                                        & nest EndSequence )
-c_l_block_seq_entry n {- 189 -} = c_sequence_entry & ( ns_char >!) ! "node"
+c_l_block_seq_entry n {- 185 -} = c_sequence_entry & ( ns_char >!) ! "node"
                                 & s_l__block_indented n BlockIn
 
-s_l__block_indented n c {- 190 -} = do m <- detect_inline_indentation
+s_l__block_indented n c {- 186 -} = do m <- detect_inline_indentation
                                        (   s_indent m
                                          & "node"
                                          ^ ( ns_l_in_line_sequence (n .+ 1 .+ m)
                                            / ns_l_in_line_mapping (n .+ 1 .+ m) ) )
                                        / s_l__block_node n c
                                        / e_node & s_l_comments
-ns_l_in_line_sequence n {- 191 -} = nest BeginNode
+ns_l_in_line_sequence n {- 187 -} = nest BeginNode
                                   & nest BeginSequence
                                   & c_l_block_seq_entry n
                                   & ( s_indent n & c_l_block_seq_entry n *)
@@ -633,29 +623,29 @@
 
 -- 8.2.2 Block Mappings
 
-l__block_mapping n = {- 192 -} do m <- detect_collection_indentation n
+l__block_mapping n = {- 188 -} do m <- detect_collection_indentation n
                                   (   nest BeginMapping
                                     & ( s_indent (n .+ m) & ns_l_block_map_entry (n .+ m) +)
                                     & nest EndMapping )
 
-ns_l_block_map_entry n {- 193 -} = nest BeginPair
+ns_l_block_map_entry n {- 189 -} = nest BeginPair
                                  & ( c_l_block_map_explicit_entry n
                                    / ns_l_block_map_implicit_entry n )
                                  & nest EndPair
-c_l_block_map_explicit_entry n {- 194 -} = c_l_block_map_explicit_key n
+c_l_block_map_explicit_entry n {- 190 -} = c_l_block_map_explicit_key n
                                          & ( l_block_map_explicit_value n
                                          / e_node )
-c_l_block_map_explicit_key n   {- 195 -} = c_mapping_key ! "node" & s_l__block_indented n BlockOut
-l_block_map_explicit_value n   {- 196 -} = s_indent n & c_mapping_value & s_l__block_indented n BlockOut
+c_l_block_map_explicit_key n   {- 191 -} = c_mapping_key ! "node" & s_l__block_indented n BlockOut
+l_block_map_explicit_value n   {- 192 -} = s_indent n & c_mapping_value & s_l__block_indented n BlockOut
 
-ns_l_block_map_implicit_entry n {- 197 -} = ( ns_s_block_map_implicit_key
+ns_l_block_map_implicit_entry n {- 193 -} = ( ns_s_block_map_implicit_key
                                             / e_node )
                                           & c_l_block_map_implicit_value n
-ns_s_block_map_implicit_key     {- 198 -} = c_s_implicit_json_key / ns_s_implicit_yaml_key
-c_l_block_map_implicit_value n  {- 199 -} = c_mapping_value ! "node" & ( s_l__block_node n BlockOut
+ns_s_block_map_implicit_key     {- 194 -} = c_s_implicit_json_key / ns_s_implicit_yaml_key
+c_l_block_map_implicit_value n  {- 195 -} = c_mapping_value ! "node" & ( s_l__block_node n BlockOut
                                                                      / e_node & s_l_comments )
 
-ns_l_in_line_mapping n {-198 -} = nest BeginNode
+ns_l_in_line_mapping n {- 196 -} = nest BeginNode
                                  & nest BeginMapping
                                  & ns_l_block_map_entry n
                                  & ( s_indent n & ns_l_block_map_entry n *)
@@ -664,60 +654,60 @@
 
 -- 8.2.3 Block Nodes
 
-s_l__block_node n c  {- 201 -} = s_l__block_in_block n c / s_l__flow_in_block n
-s_l__flow_in_block n {- 202 -} = s_separate (n .+ 1) FlowOut
+s_l__block_node n c  {- 197 -} = s_l__block_in_block n c / s_l__flow_in_block n
+s_l__flow_in_block n {- 198 -} = s_separate (n .+ 1) FlowOut
                                & ns_flow_node (n .+ 1) FlowOut & s_l_comments
 
-s_l__block_in_block n c {- 203 -} = nest BeginNode
+s_l__block_in_block n c {- 199 -} = nest BeginNode
                                   & ( s_l__block_scalar n c / s_l__block_collection n c )
                                   & nest EndNode
-s_l__block_scalar n c   {- 204 -} = s_separate (n .+ 1) c
+s_l__block_scalar n c   {- 200 -} = s_separate (n .+ 1) c
                                   & ( c_ns_properties (n .+ 1) c & s_separate (n .+ 1) c ?)
                                   & ( c_l__literal n / c_l__folded n )
 
-s_l__block_collection n c {- 205 -} = ( s_separate (n .+ 1) c & c_ns_properties (n .+ 1) c & ( s_l_comments >?) ?)
+s_l__block_collection n c {- 201 -} = ( s_separate (n .+ 1) c & c_ns_properties (n .+ 1) c & ( s_l_comments >?) ?)
                                     & s_l_comments
                                     & ( l__block_sequence (seq_spaces n c)
                                     / l__block_mapping n )
-seq_spaces n c            {- 206 -} = case c of
+seq_spaces n c            {- 202 -} = case c of
                                            BlockOut -> n .- 1
                                            BlockIn  -> n
 
 -- Document:
 
-c_document_start {- 207 -} = token DocumentStart [ '-', '-', '-' ]
-c_document_end   {- 208 -} = token DocumentEnd [ '.', '.', '.' ]
-c_forbidden      {- 209 -} = sol
+c_document_start {- 203 -} = token DocumentStart [ '-', '-', '-' ]
+c_document_end   {- 204 -} = token DocumentEnd [ '.', '.', '.' ]
+c_forbidden      {- 205 -} = sol
                            & ( c_document_start / c_document_end )
                            & ( b_char / s_white / eof )
 
-l_document_prefix {- 210 -} = ( c_byte_order_mark ?) & ( l_comment *)
-l_document_suffix {- 211 -} = c_document_end & s_l_comments
+l_document_prefix {- 206 -} = ( c_byte_order_mark ?) & ( l_comment *)
+l_document_suffix {- 207 -} = c_document_end & s_l_comments
 
-l_implicit_document {- 212 -} = nest BeginDocument
+l_implicit_document {- 208 -} = nest BeginDocument
                               & s_l__block_node (-1) BlockIn
                                 `forbidding` c_forbidden
                               & nest EndDocument
-l_explicit_document {- 213 -} =  nest BeginDocument
+l_explicit_document {- 209 -} =  nest BeginDocument
                               & ( l_directive ! "doc" *)
                               & c_document_start ! "doc"
                               & "node" ^ ( l_implicit_document
                                          / e_node & s_l_comments )
                               & nest EndDocument
 
-l_leading_document   {- 214 -} = l_document_prefix
+l_leading_document   {- 210 -} = l_document_prefix
                                & "doc" ^ ( l_explicit_document
                                          / "node" ^ ( l_implicit_document
                                                     / empty ) )
-l_following_document {- 215 -} = l_document_prefix
+l_following_document {- 211 -} = l_document_prefix
                                & "doc" ^ ( l_explicit_document
                                          / empty )
 
 -- Stream:
 
-l_documents   {- 216 -} = l_leading_document
+l_documents   {- 212 -} = l_leading_document
                         & ( l_following_document *)
-l_yaml_stream {- 217 -} = nest BeginStream
+l_yaml_stream {- 213 -} = nest BeginStream
                         & l_documents
                         & ( l_document_suffix & l_documents *)
                         & nest EndStream
diff --git a/Text/Yaml/Reference.hs b/Text/Yaml/Reference.hs
--- a/Text/Yaml/Reference.hs
+++ b/Text/Yaml/Reference.hs
@@ -98,22 +98,31 @@
 data Encoding = UTF8    -- ^ UTF-8 encoding (or ASCII)
               | UTF16LE -- ^ UTF-16 little endian
               | UTF16BE -- ^ UTF-16 big endian
+              | UTF32LE -- ^ UTF-32 little endian
+              | UTF32BE -- ^ UTF-32 big endian
     deriving Show
 
 -- | @decode bytes@ automatically detects the 'Encoding' used and converts the
 -- /bytes/ to Unicode characters.
 decode :: C.ByteString -> (Encoding, [Char])
 decode text = (encoding, undoEncoding encoding text)
-  where encoding = detectEncoding $ C.unpack $ C.take 2 text
+  where encoding = detectEncoding $ C.unpack $ C.take 4 text
 
 -- | @detectEncoding text@ examines the first few chars (bytes) of the /text/
 -- to deduce the Unicode encoding used according to the YAML spec.
 detectEncoding :: [Char] -> Encoding
 detectEncoding text =
   case text of
-    '\xFF':'\xFE':_ -> UTF16LE
-    '\xFE':'\xFF':_ -> UTF16BE
-    _               -> UTF8
+    '\x00' : '\x00' : '\xFE' : '\xFF' : _ -> UTF32BE
+    '\x00' : '\x00' : '\x00' : _      : _ -> UTF32BE
+    '\xFF' : '\xFE' : '\x00' : '\x00' : _ -> UTF32LE
+    _      : '\x00' : '\x00' : '\x00' : _ -> UTF32LE
+    '\xFE' : '\xFF' : _                   -> UTF16BE
+    '\x00' : _      : _                   -> UTF16BE
+    '\xFF' : '\xFE' : _                   -> UTF16LE
+    _      : '\x00' : _                   -> UTF16LE
+    '\xEF' : '\xBB' : '\xBF' : _          -> UTF8
+    _                                     -> UTF8
 
 -- | @undoEncoding encoding bytes@ converts a /bytes/ stream to Unicode
 -- characters according to the /encoding/.
@@ -123,7 +132,54 @@
     UTF8    -> undoUTF8 bytes
     UTF16LE -> combinePairs $ undoUTF16LE bytes
     UTF16BE -> combinePairs $ undoUTF16BE bytes
+    UTF32LE -> combinePairs $ undoUTF32LE bytes
+    UTF32BE -> combinePairs $ undoUTF32BE bytes
 
+-- ** UTF-32 decoding
+
+-- | @hasFewerThan bytes n@ checks whether there are fewer than /n/ /bytes/
+-- left to read.
+hasFewerThan :: Int -> C.ByteString -> Bool
+hasFewerThan n bytes
+  | n == 1 = C.null bytes
+  | n > 1  = C.null bytes || hasFewerThan (n .- 1) (C.tail bytes)
+
+-- | @undoUTF32LE bytes@ decoded a UTF-32-LE /bytes/ stream to Unicode chars.
+undoUTF32LE :: C.ByteString -> [Char]
+undoUTF32LE bytes
+  | C.null bytes = []
+  | hasFewerThan 4 bytes = error "UTF-32-LE input contains invalid number of bytes"
+  | otherwise = let first    = C.head bytes
+                    bytes'   = C.tail bytes
+                    second   = C.head bytes'
+                    bytes''  = C.tail bytes'
+                    third    = C.head bytes''
+                    bytes''' = C.tail bytes''
+                    fourth   = C.head bytes'''
+                    rest     = C.tail bytes'''
+                in (chr $ (ord first)
+                        .+ 256 .* ((ord second)
+                        .+ 256 .* ((ord third)
+                        .+ 256 .* ((ord fourth))))):(undoUTF32LE rest)
+
+-- | @undoUTF32BE bytes@ decoded a UTF-32-BE /bytes/ stream to Unicode chars.
+undoUTF32BE :: C.ByteString -> [Char]
+undoUTF32BE bytes
+  | C.null bytes = []
+  | hasFewerThan 4 bytes = error "UTF-32-BE input contains invalid number of bytes"
+  | otherwise = let first    = C.head bytes
+                    bytes'   = C.tail bytes
+                    second   = C.head bytes'
+                    bytes''  = C.tail bytes'
+                    third    = C.head bytes''
+                    bytes''' = C.tail bytes''
+                    fourth   = C.head bytes'''
+                    rest     = C.tail bytes'''
+                in (chr $ (ord fourth)
+                        .+ 256 .* ((ord third)
+                        .+ 256 .* ((ord second)
+                        .+ 256 .* ((ord first))))):(undoUTF32BE rest)
+
 -- ** UTF-16 decoding
 
 -- | @combinePairs chars@ converts each pair of UTF-16 surrogate characters to a
@@ -153,34 +209,27 @@
 combineSurrogates :: Char -> Char -> Char
 combineSurrogates lead trail = chr $ (ord lead) .* 1024 .+ (ord trail) .+ surrogateOffset
 
--- | @hasFewerThan bytes n@ checks whether there are fewer than /n/ /bytes/
--- left to read.
-hasFewerThan :: Int -> C.ByteString -> Bool
-hasFewerThan n bytes
-  | n == 1 = C.null bytes
-  | n > 1  = C.null bytes || hasFewerThan (n .- 1) (C.tail bytes)
-
 -- | @undoUTF18LE bytes@ decoded a UTF-16-LE /bytes/ stream to Unicode chars.
 undoUTF16LE :: C.ByteString -> [Char]
 undoUTF16LE bytes
   | C.null bytes = []
   | hasFewerThan 2 bytes = error "UTF-16-LE input contains odd number of bytes"
-  | otherwise = let low = C.head bytes
+  | otherwise = let low    = C.head bytes
                     bytes' = C.tail bytes
-                    high = C.head bytes'
-                    rest = C.tail bytes'
-                in (chr $ (ord high) .* 256 .+ (ord low)):(undoUTF16LE rest)
+                    high   = C.head bytes'
+                    rest   = C.tail bytes'
+                in (chr $ (ord low) .+ (ord high) .* 256):(undoUTF16LE rest)
 
 -- | @undoUTF18BE bytes@ decoded a UTF-16-BE /bytes/ stream to Unicode chars.
 undoUTF16BE :: C.ByteString -> [Char]
 undoUTF16BE bytes
   | C.null bytes = []
   | hasFewerThan 2 bytes = error "UTF-16-BE input contains odd number of bytes"
-  | otherwise = let high = C.head bytes
+  | otherwise = let high   = C.head bytes
                     bytes' = C.tail bytes
-                    low = C.head bytes'
-                    rest = C.tail bytes'
-                in (chr $ (ord high) .* 256 .+ (ord low)):(undoUTF16BE rest)
+                    low    = C.head bytes'
+                    rest   = C.tail bytes'
+                in (chr $ (ord low) .+ (ord high) .* 256):(undoUTF16BE rest)
 
 -- ** UTF-8 decoding
 
@@ -189,7 +238,7 @@
 undoUTF8 bytes
   | C.null bytes = []
   | otherwise = let first = C.head bytes
-                    rest = C.tail bytes
+                    rest  = C.tail bytes
                 in case () of
                       _ | first < '\x80' -> first:(undoUTF8 rest)
                         | first < '\xC0' -> error "UTF-8 input contains invalid first byte"
@@ -205,7 +254,7 @@
 decodeTwoUTF8 first bytes
   | C.null bytes = error "UTF-8 double byte char is missing second byte at eof"
   | otherwise = let second = C.head bytes
-                    rest = C.tail bytes
+                    rest   = C.tail bytes
                 in case () of
                       _ | second < '\x80' || '\xBF' < second -> error "UTF-8 double byte char has invalid second byte"
                         | otherwise                          -> (combineTwoUTF8 first second):(undoUTF8 rest)
@@ -224,8 +273,8 @@
   | hasFewerThan 2 bytes = error "UTF-8 triple byte char is missing bytes at eof"
   | otherwise = let second = C.head bytes
                     bytes' = C.tail bytes
-                    third = C.head bytes'
-                    rest = C.tail bytes'
+                    third  = C.head bytes'
+                    rest   = C.tail bytes'
                 in case () of
                       _ | second < '\x80' || '\xBF' < second -> error "UTF-8 triple byte char has invalid second byte"
                         | third < '\x80' || '\xBF' < third   -> error "UTF-8 triple byte char has invalid third byte"
@@ -244,12 +293,12 @@
 decodeFourUTF8 :: Char -> C.ByteString -> [Char]
 decodeFourUTF8 first bytes
   | hasFewerThan 3 bytes = error "UTF-8 quad byte char is missing bytes at eof"
-  | otherwise = let second = C.head bytes
-                    bytes' = C.tail bytes
-                    third = C.head bytes'
+  | otherwise = let second  = C.head bytes
+                    bytes'  = C.tail bytes
+                    third   = C.head bytes'
                     bytes'' = C.tail bytes'
-                    fourth = C.head bytes''
-                    rest = C.tail bytes''
+                    fourth  = C.head bytes''
+                    rest    = C.tail bytes''
                 in case () of
                       _ | second < '\x80' || '\xBF' < second -> error "UTF-8 quad byte char has invalid second byte"
                         | third < '\x80' || '\xBF' < third   -> error "UTF-8 quad byte char has invalid third byte"
@@ -272,7 +321,7 @@
 -- for further processing.
 
 -- | 'Token' codes.
-data Code = Bom             -- ^ BOM, contains \"@TF8@\", \"@TF16LE@\" or \"@TF16BE@\".
+data Code = Bom             -- ^ BOM, contains \"@TF8@\", \"@TF16LE@\", \"@TF32BE@\", etc.
           | Text            -- ^ Content text characters.
           | Meta            -- ^ Non-content (meta) text characters.
           | Break           -- ^ Line break preserved in content.
@@ -1145,18 +1194,11 @@
 tokenizers = PAR(c_chomping_indicator) "t"
            $ PAC(detect_inline_indentation) "m"
            $ PAT(b_as_line_feed)
+           $ PAT(b_as_space)
            $ PAT(b_carriage_return)
            $ PAT(b_char)
-           $ PAT(b_generic)
-           $ PAT(b_l_folded_as_space)
            $ PAT(b_line_feed)
-           $ PAT(b_line_separator)
-           $ PAT(b_next_line)
-           $ PAT(b_non_content_any)
-           $ PAT(b_non_content_generic)
-           $ PAT(b_normalized)
-           $ PAT(b_paragraph_separator)
-           $ PAT(b_specific)
+           $ PAT(b_non_content)
            $ PAT(c_alias)
            $ PAT(c_anchor)
            $ PAT(c_byte_order_mark)
@@ -1171,6 +1213,7 @@
            $ PAT(c_folded)
            $ PAT(c_forbidden)
            $ PAT(c_indicator)
+           $ PAT(c_json)
            $ PAT(c_literal)
            $ PAT(c_mapping_end)
            $ PAT(c_mapping_key)
@@ -1213,6 +1256,7 @@
            $ PAT(nb_char)
            $ PAT(nb_double_char)
            $ PAT(nb_double_one_line)
+           $ PAT(nb_json)
            $ PAT(nb_ns_double_in_line)
            $ PAT(nb_ns_single_in_line)
            $ PAT(nb_single_char)
@@ -1242,6 +1286,7 @@
            $ PAT(ns_esc_non_breaking_space)
            $ PAT(ns_esc_null)
            $ PAT(ns_esc_paragraph_separator)
+           $ PAT(ns_esc_slash)
            $ PAT(ns_esc_space)
            $ PAT(ns_esc_vertical_tab)
            $ PAT(ns_global_tag_prefix)
@@ -1313,15 +1358,15 @@
                 $ PAT(s_indent)
                 $ PAT(s_indent_le)
                 $ PAT(s_indent_lt)
-                $ PAT(s_l_double_any)
-                $ PAT(s_l_double_escaped)
-                $ PAT(s_l_flow_folded)
                 $ PAT(s_l__flow_in_block)
                 $ PAT(s_nb_folded_text)
                 $ PAT(s_nb_spaced_text)
                 $ PAT(s_ns_double_next_line)
                 $ PAT(s_ns_single_next_line)
+                $ PAT(s_s_double_break)
+                $ PAT(s_s_double_escaped)
                 $ PAT(s_separate_lines)
+                $ PAT(s_s_flow_folded)
                 $ Map.empty
   where pat name pattern     = Map.insert (pName name) (\ n -> patternTokenizer     (match   $ pattern n))
         par name parser what = Map.insert (pName name) (\ n -> parserTokenizer what (match   $ parser  n))
@@ -1376,9 +1421,8 @@
 -- | @tokenizersWithNC@ returns a mapping from a production name to a
 -- production tokenizer (that requires /n/ and /c/ arguments).
 tokenizersWithNC :: Map.Map String (Int -> Context -> Tokenizer)
-tokenizersWithNC = PAT(b_l_folded_any)
-                 $ PAT(b_l_folded_specific)
-                 $ PAT(b_l_folded_trimmed)
+tokenizersWithNC = PAT(b_l_folded)
+                 $ PAT(b_l_trimmed)
                  $ PAT(c_double_quoted)
                  $ PAT(c_flow_json_content)
                  $ PAT(c_flow_json_node)
@@ -1468,6 +1512,8 @@
                                                           UTF8    -> "TF8"
                                                           UTF16LE -> "TF16LE"
                                                           UTF16BE -> "TF16BE"
+                                                          UTF32LE -> "TF32LE"
+                                                          UTF32BE -> "TF32BE"
                                               Parser parser = fake Bom text
                                           in  parser state { sColumn = state|>sColumn .- 1 }
 
diff --git a/YamlReference.cabal b/YamlReference.cabal
--- a/YamlReference.cabal
+++ b/YamlReference.cabal
@@ -1,5 +1,5 @@
 Name:                YamlReference
-Version:             0.9.1
+Version:             0.9.2
 Cabal-Version:       >= 1.2
 License:             LGPL
 License-File:        lgpl.txt
@@ -8,7 +8,7 @@
 Maintainer:          yaml-oren@ben-kiki.org
 Stability:           alpha
 Homepage:            http://www.ben-kiki.org/oren/YamlReference
-Package-Url:         http://www.ben-kiki.org/oren/YamlReference/YamlReference-0.9.1.tar.gz
+Package-Url:         http://www.ben-kiki.org/oren/YamlReference/YamlReference-0.9.2.tar.gz
 Category:            Text
 Synopsis:            YAML reference implementation
 Build-Type:          Custom
@@ -23,17 +23,16 @@
                      the @yeast2html@ YAML syntax visualizer (contained in this
                      package), pretty printers, etc. This is a streaming parser
                      that will \"immediately\" begin to generate output. Updated
-                     to be compatible with the April 12, 2008 working draft.
+                     to be compatible with the May 11, 2008 working draft.
 Extra-Source-Files:  Text/Yaml/Reference.bnf yeast2html yaml2yeast.css
                      tests/b-as-line-feed.input tests/b-as-line-feed.output
+                     tests/b-as-space.input tests/b-as-space.invalid.input
+                     tests/b-as-space.invalid.output tests/b-as-space.output
                      tests/b-carriage-return.input
                      tests/b-carriage-return.output tests/b-char.cr.input
                      tests/b-char.cr.output tests/b-char.invalid.input
                      tests/b-char.invalid.output tests/b-char.lf.input
-                     tests/b-char.lf.output tests/b-char.ls.input
-                     tests/b-char.ls.output tests/b-char.nl.input
-                     tests/b-char.nl.output tests/b-char.ps.input
-                     tests/b-char.ps.output tests/b-chomped-last.t=clip.input
+                     tests/b-char.lf.output tests/b-chomped-last.t=clip.input
                      tests/b-chomped-last.t=clip.invalid.input
                      tests/b-chomped-last.t=clip.invalid.output
                      tests/b-chomped-last.t=clip.output
@@ -41,65 +40,29 @@
                      tests/b-chomped-last.t=keep.output
                      tests/b-chomped-last.t=strip.input
                      tests/b-chomped-last.t=strip.output
-                     tests/b-generic.cr.input tests/b-generic.crlf.input
-                     tests/b-generic.crlf.output tests/b-generic.cr.output
-                     tests/b-generic.invalid.input
-                     tests/b-generic.invalid.output tests/b-generic.lf.input
-                     tests/b-generic.lf.output tests/b-generic.nl.input
-                     tests/b-generic.nl.output
-                     tests/b-l-folded-any.n=4.c=flow-in.as-space.input
-                     tests/b-l-folded-any.n=4.c=flow-in.as-space.output
-                     tests/b-l-folded-any.n=4.c=flow-in.invalid.input
-                     tests/b-l-folded-any.n=4.c=flow-in.invalid.output
-                     tests/b-l-folded-any.n=4.c=flow-in.specific.input
-                     tests/b-l-folded-any.n=4.c=flow-in.specific.output
-                     tests/b-l-folded-any.n=4.c=flow-in.trimmed.input
-                     tests/b-l-folded-any.n=4.c=flow-in.trimmed.output
-                     tests/b-l-folded-as-space.input
-                     tests/b-l-folded-as-space.invalid.input
-                     tests/b-l-folded-as-space.invalid.output
-                     tests/b-l-folded-as-space.output
-                     tests/b-l-folded-specific.n=4.c=flow-in.invalid.input
-                     tests/b-l-folded-specific.n=4.c=flow-in.invalid.output
-                     tests/b-l-folded-specific.n=4.c=flow-in.ls.input
-                     tests/b-l-folded-specific.n=4.c=flow-in.ls-lf-ls.input
-                     tests/b-l-folded-specific.n=4.c=flow-in.ls-lf-ls.output
-                     tests/b-l-folded-specific.n=4.c=flow-in.ls.output
-                     tests/b-l-folded-trimmed.n=4.c=flow-in.invalid.input
-                     tests/b-l-folded-trimmed.n=4.c=flow-in.invalid.output
-                     tests/b-l-folded-trimmed.n=4.c=flow-in.lf-ls-lf.input
-                     tests/b-l-folded-trimmed.n=4.c=flow-in.lf-ls-lf.output
+                     tests/b-l-folded.n=4.c=flow-in.as-space.input
+                     tests/b-l-folded.n=4.c=flow-in.as-space.output
+                     tests/b-l-folded.n=4.c=flow-in.invalid.input
+                     tests/b-l-folded.n=4.c=flow-in.invalid.output
+                     tests/b-l-folded.n=4.c=flow-in.trimmed.input
+                     tests/b-l-folded.n=4.c=flow-in.trimmed.output
                      tests/b-line-feed.input tests/b-line-feed.output
-                     tests/b-line-separator.input tests/b-line-separator.output
                      tests/b-l-spaced.n=4.input
                      tests/b-l-spaced.n=4.invalid.input
                      tests/b-l-spaced.n=4.invalid.output
                      tests/b-l-spaced.n=4.output
+                     tests/b-l-trimmed.n=4.c=flow-in.invalid.input
+                     tests/b-l-trimmed.n=4.c=flow-in.invalid.output
                      tests/b-nb-literal-next.n=4.input
                      tests/b-nb-literal-next.n=4.invalid.input
                      tests/b-nb-literal-next.n=4.invalid.output
-                     tests/b-nb-literal-next.n=4.output tests/b-next-line.input
-                     tests/b-next-line.output
-                     tests/b-non-content-any.invalid.input
-                     tests/b-non-content-any.invalid.output
-                     tests/b-non-content-any.lf.input
-                     tests/b-non-content-any.lf.output
-                     tests/b-non-content-any.ls.input
-                     tests/b-non-content-any.ls.output
-                     tests/b-non-content-generic.input
-                     tests/b-non-content-generic.output
-                     tests/b-normalized.invalid.input
-                     tests/b-normalized.invalid.output
-                     tests/b-normalized.lf.input tests/b-normalized.lf.output
-                     tests/b-normalized.ls.input tests/b-normalized.ls.output
-                     tests/b-paragraph-separator.input
-                     tests/b-paragraph-separator.output
-                     tests/b-specific.invalid.input
-                     tests/b-specific.invalid.output tests/b-specific.ls.input
-                     tests/b-specific.ls.output tests/b-specific.ps.input
-                     tests/b-specific.ps.output tests/c-alias.input
-                     tests/c-alias.output tests/c-anchor.input
-                     tests/c-anchor.output tests/c-b-block-header.n=2.e.input
+                     tests/b-nb-literal-next.n=4.output
+                     tests/b-non-content.invalid.input
+                     tests/b-non-content.invalid.output
+                     tests/b-non-content.lf.input tests/b-non-content.lf.output
+                     tests/c-alias.input tests/c-alias.output
+                     tests/c-anchor.input tests/c-anchor.output
+                     tests/c-b-block-header.n=2.e.input
                      tests/c-b-block-header.n=2.e.output
                      tests/c-b-block-header.n=2.im.input
                      tests/c-b-block-header.n=2.im.output
@@ -115,6 +78,10 @@
                      tests/c-byte-order-mark.utf16be.output
                      tests/c-byte-order-mark.utf16le.input
                      tests/c-byte-order-mark.utf16le.output
+                     tests/c-byte-order-mark.utf32be.input
+                     tests/c-byte-order-mark.utf32be.output
+                     tests/c-byte-order-mark.utf32le.input
+                     tests/c-byte-order-mark.utf32le.output
                      tests/c-byte-order-mark.utf8.input
                      tests/c-byte-order-mark.utf8.output
                      tests/c-chomping-indicator.empty.input
@@ -234,6 +201,20 @@
                      tests/c-indicator.single-quote.input
                      tests/c-indicator.single-quote.output
                      tests/c-indicator.tag.input tests/c-indicator.tag.output
+                     tests/c-json.10000.input tests/c-json.10000.output
+                     tests/c-json.10ffff.input tests/c-json.10ffff.output
+                     tests/c-json.cr.input tests/c-json.cr.output
+                     tests/c-json.d7ff.input tests/c-json.d7ff.output
+                     tests/c-json.e000.input tests/c-json.e000.output
+                     tests/c-json.fffd.input tests/c-json.fffd.output
+                     tests/c-json.ff.input tests/c-json.ff.output
+                     tests/c-json.invalid.input tests/c-json.invalid.output
+                     tests/c-json.lf.input tests/c-json.lf.output
+                     tests/c-json.nbsp.input tests/c-json.nbsp.output
+                     tests/c-json.nel.input tests/c-json.nel.output
+                     tests/c-json.sp.input tests/c-json.sp.output
+                     tests/c-json.tab.input tests/c-json.tab.output
+                     tests/c-json.tilde.input tests/c-json.tilde.output
                      tests/c-l-block-map-explicit-entry.n=2.input
                      tests/c-l-block-map-explicit-entry.n=2.invalid.input
                      tests/c-l-block-map-explicit-entry.n=2.invalid.output
@@ -459,7 +440,7 @@
                      tests/detect-scalar-indentation.n=2.input
                      tests/detect-scalar-indentation.n=2.output
                      tests/e-node.input tests/e-node.output
-                     tests/e-scalar.input tests/e-scalar.output
+                     tests/e-scalar.input tests/e-scalar.output tests/junk
                      tests/l-block-map-explicit-value.n=2.input
                      tests/l-block-map-explicit-value.n=2.invalid.input
                      tests/l-block-map-explicit-value.n=2.invalid.output
@@ -619,6 +600,8 @@
                      tests/nb-double-text.n=4.c=flow-key.output
                      tests/nb-double-text.n=4.c=flow-out.input
                      tests/nb-double-text.n=4.c=flow-out.output
+                     tests/nb-json.input tests/nb-json.invalid.input
+                     tests/nb-json.invalid.output tests/nb-json.output
                      tests/nb-ns-double-in-line.input
                      tests/nb-ns-double-in-line.invalid.input
                      tests/nb-ns-double-in-line.invalid.output
@@ -720,6 +703,7 @@
                      tests/ns-esc-null.input tests/ns-esc-null.output
                      tests/ns-esc-paragraph-separator.input
                      tests/ns-esc-paragraph-separator.output
+                     tests/ns-esc-slash.input tests/ns-esc-slash.output
                      tests/ns-esc-space.input tests/ns-esc-space.output
                      tests/ns-esc-vertical-tab.input
                      tests/ns-esc-vertical-tab.output
@@ -1142,22 +1126,6 @@
                      tests/s-l-comments.multi.input
                      tests/s-l-comments.multi.output
                      tests/s-l-comments.sol.input tests/s-l-comments.sol.output
-                     tests/s-l-double-any.n=4.escaped.input
-                     tests/s-l-double-any.n=4.escaped.output
-                     tests/s-l-double-any.n=4.folded.input
-                     tests/s-l-double-any.n=4.folded.output
-                     tests/s-l-double-any.n=4.invalid.input
-                     tests/s-l-double-any.n=4.invalid.output
-                     tests/s-l-double-escaped.n=2.input
-                     tests/s-l-double-escaped.n=2.invalid.input
-                     tests/s-l-double-escaped.n=2.invalid.output
-                     tests/s-l-double-escaped.n=2.output
-                     tests/s-l-flow-folded.n=4.invalid.input
-                     tests/s-l-flow-folded.n=4.invalid.output
-                     tests/s-l-flow-folded.n=4.lf.input
-                     tests/s-l-flow-folded.n=4.lf.output
-                     tests/s-l-flow-folded.n=4.sp-lf-lf.input
-                     tests/s-l-flow-folded.n=4.sp-lf-lf.output
                      tests/s-l+flow-in-block.n=2.input
                      tests/s-l+flow-in-block.n=2.invalid.input
                      tests/s-l+flow-in-block.n=2.invalid.output
@@ -1190,6 +1158,16 @@
                      tests/s-ns-single-next-line.n=4.invalid.input
                      tests/s-ns-single-next-line.n=4.invalid.output
                      tests/s-ns-single-next-line.n=4.output
+                     tests/s-s-double-break.n=4.escaped.input
+                     tests/s-s-double-break.n=4.escaped.output
+                     tests/s-s-double-break.n=4.folded.input
+                     tests/s-s-double-break.n=4.folded.output
+                     tests/s-s-double-break.n=4.invalid.input
+                     tests/s-s-double-break.n=4.invalid.output
+                     tests/s-s-double-escaped.n=2.input
+                     tests/s-s-double-escaped.n=2.invalid.input
+                     tests/s-s-double-escaped.n=2.invalid.output
+                     tests/s-s-double-escaped.n=2.output
                      tests/s-separate-in-line.invalid.input
                      tests/s-separate-in-line.invalid.output
                      tests/s-separate-in-line.sol.input
@@ -1216,6 +1194,14 @@
                      tests/s-separate.n=4.c=flow-out.line.output
                      tests/s-separate.n=4.c=flow-out.sp.input
                      tests/s-separate.n=4.c=flow-out.sp.output
+                     tests/s-s-flow-folded.n=2.input
+                     tests/s-s-flow-folded.n=2.output
+                     tests/s-s-flow-folded.n=4.invalid.input
+                     tests/s-s-flow-folded.n=4.invalid.output
+                     tests/s-s-flow-folded.n=4.lf.input
+                     tests/s-s-flow-folded.n=4.lf.output
+                     tests/s-s-flow-folded.n=4.sp-lf-lf.input
+                     tests/s-s-flow-folded.n=4.sp-lf-lf.output
                      tests/s-space.input tests/s-space.invalid.input
                      tests/s-space.invalid.output tests/s-space.output
                      tests/s-tab.input tests/s-tab.invalid.input
@@ -1223,7 +1209,6 @@
                      tests/s-white.invalid.input tests/s-white.invalid.output
                      tests/s-white.sp.input tests/s-white.sp.output
                      tests/s-white.tab.input tests/s-white.tab.output
-
 Flag small_base
     Description:         Choose the new smaller, split-up base package.
 
diff --git a/tests/b-as-space.input b/tests/b-as-space.input
new file mode 100644
--- /dev/null
+++ b/tests/b-as-space.input
@@ -0,0 +1,1 @@
+
diff --git a/tests/b-as-space.invalid.input b/tests/b-as-space.invalid.input
new file mode 100644
--- /dev/null
+++ b/tests/b-as-space.invalid.input
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tests/b-as-space.invalid.output b/tests/b-as-space.invalid.output
new file mode 100644
--- /dev/null
+++ b/tests/b-as-space.invalid.output
@@ -0,0 +1,2 @@
+l\x0a
+!$InputFile$: line 2: column 0: Expected end of input
diff --git a/tests/b-as-space.output b/tests/b-as-space.output
new file mode 100644
--- /dev/null
+++ b/tests/b-as-space.output
@@ -0,0 +1,1 @@
+l\x0a
diff --git a/tests/b-char.ls.input b/tests/b-char.ls.input
deleted file mode 100644
--- a/tests/b-char.ls.input
+++ /dev/null
@@ -1,1 +0,0 @@
- 
diff --git a/tests/b-char.ls.output b/tests/b-char.ls.output
deleted file mode 100644
--- a/tests/b-char.ls.output
+++ /dev/null
@@ -1,1 +0,0 @@
-?\u2028
diff --git a/tests/b-char.nl.input b/tests/b-char.nl.input
deleted file mode 100644
--- a/tests/b-char.nl.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/b-char.nl.output b/tests/b-char.nl.output
deleted file mode 100644
--- a/tests/b-char.nl.output
+++ /dev/null
@@ -1,1 +0,0 @@
-?\x85
diff --git a/tests/b-char.ps.input b/tests/b-char.ps.input
deleted file mode 100644
--- a/tests/b-char.ps.input
+++ /dev/null
@@ -1,1 +0,0 @@
- 
diff --git a/tests/b-char.ps.output b/tests/b-char.ps.output
deleted file mode 100644
--- a/tests/b-char.ps.output
+++ /dev/null
@@ -1,1 +0,0 @@
-?\u2029
diff --git a/tests/b-generic.cr.input b/tests/b-generic.cr.input
deleted file mode 100644
--- a/tests/b-generic.cr.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/b-generic.cr.output b/tests/b-generic.cr.output
deleted file mode 100644
--- a/tests/b-generic.cr.output
+++ /dev/null
@@ -1,1 +0,0 @@
-?\x0d
diff --git a/tests/b-generic.crlf.input b/tests/b-generic.crlf.input
deleted file mode 100644
--- a/tests/b-generic.crlf.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/b-generic.crlf.output b/tests/b-generic.crlf.output
deleted file mode 100644
--- a/tests/b-generic.crlf.output
+++ /dev/null
@@ -1,1 +0,0 @@
-?\x0d\x0a
diff --git a/tests/b-generic.invalid.input b/tests/b-generic.invalid.input
deleted file mode 100644
--- a/tests/b-generic.invalid.input
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/tests/b-generic.invalid.output b/tests/b-generic.invalid.output
deleted file mode 100644
--- a/tests/b-generic.invalid.output
+++ /dev/null
@@ -1,2 +0,0 @@
-?\x0a
-!$InputFile$: line 2: column 0: Expected end of input
diff --git a/tests/b-generic.lf.input b/tests/b-generic.lf.input
deleted file mode 100644
--- a/tests/b-generic.lf.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/b-generic.lf.output b/tests/b-generic.lf.output
deleted file mode 100644
--- a/tests/b-generic.lf.output
+++ /dev/null
@@ -1,1 +0,0 @@
-?\x0a
diff --git a/tests/b-generic.nl.input b/tests/b-generic.nl.input
deleted file mode 100644
--- a/tests/b-generic.nl.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/b-generic.nl.output b/tests/b-generic.nl.output
deleted file mode 100644
--- a/tests/b-generic.nl.output
+++ /dev/null
@@ -1,1 +0,0 @@
-?\x85
diff --git a/tests/b-l-folded-any.n=4.c=flow-in.as-space.input b/tests/b-l-folded-any.n=4.c=flow-in.as-space.input
deleted file mode 100644
--- a/tests/b-l-folded-any.n=4.c=flow-in.as-space.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/b-l-folded-any.n=4.c=flow-in.as-space.output b/tests/b-l-folded-any.n=4.c=flow-in.as-space.output
deleted file mode 100644
--- a/tests/b-l-folded-any.n=4.c=flow-in.as-space.output
+++ /dev/null
@@ -1,1 +0,0 @@
-l\x0a
diff --git a/tests/b-l-folded-any.n=4.c=flow-in.invalid.input b/tests/b-l-folded-any.n=4.c=flow-in.invalid.input
deleted file mode 100644
--- a/tests/b-l-folded-any.n=4.c=flow-in.invalid.input
+++ /dev/null
@@ -1,1 +0,0 @@
-a
diff --git a/tests/b-l-folded-any.n=4.c=flow-in.invalid.output b/tests/b-l-folded-any.n=4.c=flow-in.invalid.output
deleted file mode 100644
--- a/tests/b-l-folded-any.n=4.c=flow-in.invalid.output
+++ /dev/null
@@ -1,1 +0,0 @@
-!$InputFile$: line 1: column 0: Unexpected 'a'
diff --git a/tests/b-l-folded-any.n=4.c=flow-in.specific.input b/tests/b-l-folded-any.n=4.c=flow-in.specific.input
deleted file mode 100644
--- a/tests/b-l-folded-any.n=4.c=flow-in.specific.input
+++ /dev/null
@@ -1,2 +0,0 @@
- 
- 
diff --git a/tests/b-l-folded-any.n=4.c=flow-in.specific.output b/tests/b-l-folded-any.n=4.c=flow-in.specific.output
deleted file mode 100644
--- a/tests/b-l-folded-any.n=4.c=flow-in.specific.output
+++ /dev/null
@@ -1,3 +0,0 @@
-B\u2028
-L\x0a
-B\u2028
diff --git a/tests/b-l-folded-any.n=4.c=flow-in.trimmed.input b/tests/b-l-folded-any.n=4.c=flow-in.trimmed.input
deleted file mode 100644
--- a/tests/b-l-folded-any.n=4.c=flow-in.trimmed.input
+++ /dev/null
@@ -1,2 +0,0 @@
-
- 
diff --git a/tests/b-l-folded-any.n=4.c=flow-in.trimmed.output b/tests/b-l-folded-any.n=4.c=flow-in.trimmed.output
deleted file mode 100644
--- a/tests/b-l-folded-any.n=4.c=flow-in.trimmed.output
+++ /dev/null
@@ -1,3 +0,0 @@
-b\x0a
-B\u2028
-L\x0a
diff --git a/tests/b-l-folded-as-space.input b/tests/b-l-folded-as-space.input
deleted file mode 100644
--- a/tests/b-l-folded-as-space.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/b-l-folded-as-space.invalid.input b/tests/b-l-folded-as-space.invalid.input
deleted file mode 100644
--- a/tests/b-l-folded-as-space.invalid.input
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/tests/b-l-folded-as-space.invalid.output b/tests/b-l-folded-as-space.invalid.output
deleted file mode 100644
--- a/tests/b-l-folded-as-space.invalid.output
+++ /dev/null
@@ -1,2 +0,0 @@
-l\x0a
-!$InputFile$: line 2: column 0: Expected end of input
diff --git a/tests/b-l-folded-as-space.output b/tests/b-l-folded-as-space.output
deleted file mode 100644
--- a/tests/b-l-folded-as-space.output
+++ /dev/null
@@ -1,1 +0,0 @@
-l\x0a
diff --git a/tests/b-l-folded-specific.n=4.c=flow-in.invalid.input b/tests/b-l-folded-specific.n=4.c=flow-in.invalid.input
deleted file mode 100644
--- a/tests/b-l-folded-specific.n=4.c=flow-in.invalid.input
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/tests/b-l-folded-specific.n=4.c=flow-in.invalid.output b/tests/b-l-folded-specific.n=4.c=flow-in.invalid.output
deleted file mode 100644
--- a/tests/b-l-folded-specific.n=4.c=flow-in.invalid.output
+++ /dev/null
@@ -1,1 +0,0 @@
-!$InputFile$: line 1: column 0: Unexpected '\x0a'
diff --git a/tests/b-l-folded-specific.n=4.c=flow-in.ls-lf-ls.input b/tests/b-l-folded-specific.n=4.c=flow-in.ls-lf-ls.input
deleted file mode 100644
--- a/tests/b-l-folded-specific.n=4.c=flow-in.ls-lf-ls.input
+++ /dev/null
@@ -1,2 +0,0 @@
- 
- 
diff --git a/tests/b-l-folded-specific.n=4.c=flow-in.ls-lf-ls.output b/tests/b-l-folded-specific.n=4.c=flow-in.ls-lf-ls.output
deleted file mode 100644
--- a/tests/b-l-folded-specific.n=4.c=flow-in.ls-lf-ls.output
+++ /dev/null
@@ -1,3 +0,0 @@
-B\u2028
-L\x0a
-B\u2028
diff --git a/tests/b-l-folded-specific.n=4.c=flow-in.ls.input b/tests/b-l-folded-specific.n=4.c=flow-in.ls.input
deleted file mode 100644
--- a/tests/b-l-folded-specific.n=4.c=flow-in.ls.input
+++ /dev/null
@@ -1,1 +0,0 @@
- 
diff --git a/tests/b-l-folded-specific.n=4.c=flow-in.ls.output b/tests/b-l-folded-specific.n=4.c=flow-in.ls.output
deleted file mode 100644
--- a/tests/b-l-folded-specific.n=4.c=flow-in.ls.output
+++ /dev/null
@@ -1,1 +0,0 @@
-B\u2028
diff --git a/tests/b-l-folded-trimmed.n=4.c=flow-in.invalid.input b/tests/b-l-folded-trimmed.n=4.c=flow-in.invalid.input
deleted file mode 100644
--- a/tests/b-l-folded-trimmed.n=4.c=flow-in.invalid.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/b-l-folded-trimmed.n=4.c=flow-in.invalid.output b/tests/b-l-folded-trimmed.n=4.c=flow-in.invalid.output
deleted file mode 100644
--- a/tests/b-l-folded-trimmed.n=4.c=flow-in.invalid.output
+++ /dev/null
@@ -1,2 +0,0 @@
-b\x0a
-!$InputFile$: line 2: column 0: Unexpected end of input
diff --git a/tests/b-l-folded-trimmed.n=4.c=flow-in.lf-ls-lf.input b/tests/b-l-folded-trimmed.n=4.c=flow-in.lf-ls-lf.input
deleted file mode 100644
--- a/tests/b-l-folded-trimmed.n=4.c=flow-in.lf-ls-lf.input
+++ /dev/null
@@ -1,2 +0,0 @@
-
- 
diff --git a/tests/b-l-folded-trimmed.n=4.c=flow-in.lf-ls-lf.output b/tests/b-l-folded-trimmed.n=4.c=flow-in.lf-ls-lf.output
deleted file mode 100644
--- a/tests/b-l-folded-trimmed.n=4.c=flow-in.lf-ls-lf.output
+++ /dev/null
@@ -1,3 +0,0 @@
-b\x0a
-B\u2028
-L\x0a
diff --git a/tests/b-l-folded.n=4.c=flow-in.as-space.input b/tests/b-l-folded.n=4.c=flow-in.as-space.input
new file mode 100644
--- /dev/null
+++ b/tests/b-l-folded.n=4.c=flow-in.as-space.input
@@ -0,0 +1,1 @@
+
diff --git a/tests/b-l-folded.n=4.c=flow-in.as-space.output b/tests/b-l-folded.n=4.c=flow-in.as-space.output
new file mode 100644
--- /dev/null
+++ b/tests/b-l-folded.n=4.c=flow-in.as-space.output
@@ -0,0 +1,1 @@
+l\x0a
diff --git a/tests/b-l-folded.n=4.c=flow-in.invalid.input b/tests/b-l-folded.n=4.c=flow-in.invalid.input
new file mode 100644
--- /dev/null
+++ b/tests/b-l-folded.n=4.c=flow-in.invalid.input
@@ -0,0 +1,1 @@
+a
diff --git a/tests/b-l-folded.n=4.c=flow-in.invalid.output b/tests/b-l-folded.n=4.c=flow-in.invalid.output
new file mode 100644
--- /dev/null
+++ b/tests/b-l-folded.n=4.c=flow-in.invalid.output
@@ -0,0 +1,1 @@
+!$InputFile$: line 1: column 0: Unexpected 'a'
diff --git a/tests/b-l-folded.n=4.c=flow-in.trimmed.input b/tests/b-l-folded.n=4.c=flow-in.trimmed.input
new file mode 100644
--- /dev/null
+++ b/tests/b-l-folded.n=4.c=flow-in.trimmed.input
@@ -0,0 +1,2 @@
+
+
diff --git a/tests/b-l-folded.n=4.c=flow-in.trimmed.output b/tests/b-l-folded.n=4.c=flow-in.trimmed.output
new file mode 100644
--- /dev/null
+++ b/tests/b-l-folded.n=4.c=flow-in.trimmed.output
@@ -0,0 +1,2 @@
+b\x0a
+L\x0a
diff --git a/tests/b-l-trimmed.n=4.c=flow-in.invalid.input b/tests/b-l-trimmed.n=4.c=flow-in.invalid.input
new file mode 100644
--- /dev/null
+++ b/tests/b-l-trimmed.n=4.c=flow-in.invalid.input
@@ -0,0 +1,1 @@
+
diff --git a/tests/b-l-trimmed.n=4.c=flow-in.invalid.output b/tests/b-l-trimmed.n=4.c=flow-in.invalid.output
new file mode 100644
--- /dev/null
+++ b/tests/b-l-trimmed.n=4.c=flow-in.invalid.output
@@ -0,0 +1,2 @@
+b\x0a
+!$InputFile$: line 2: column 0: Unexpected end of input
diff --git a/tests/b-line-separator.input b/tests/b-line-separator.input
deleted file mode 100644
--- a/tests/b-line-separator.input
+++ /dev/null
@@ -1,1 +0,0 @@
- 
diff --git a/tests/b-line-separator.output b/tests/b-line-separator.output
deleted file mode 100644
--- a/tests/b-line-separator.output
+++ /dev/null
@@ -1,1 +0,0 @@
-?\u2028
diff --git a/tests/b-next-line.input b/tests/b-next-line.input
deleted file mode 100644
--- a/tests/b-next-line.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/b-next-line.output b/tests/b-next-line.output
deleted file mode 100644
--- a/tests/b-next-line.output
+++ /dev/null
@@ -1,1 +0,0 @@
-?\x85
diff --git a/tests/b-non-content-any.invalid.input b/tests/b-non-content-any.invalid.input
deleted file mode 100644
--- a/tests/b-non-content-any.invalid.input
+++ /dev/null
@@ -1,1 +0,0 @@
-a
diff --git a/tests/b-non-content-any.invalid.output b/tests/b-non-content-any.invalid.output
deleted file mode 100644
--- a/tests/b-non-content-any.invalid.output
+++ /dev/null
@@ -1,1 +0,0 @@
-!$InputFile$: line 1: column 0: Unexpected 'a'
diff --git a/tests/b-non-content-any.lf.input b/tests/b-non-content-any.lf.input
deleted file mode 100644
--- a/tests/b-non-content-any.lf.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/b-non-content-any.lf.output b/tests/b-non-content-any.lf.output
deleted file mode 100644
--- a/tests/b-non-content-any.lf.output
+++ /dev/null
@@ -1,1 +0,0 @@
-b\x0a
diff --git a/tests/b-non-content-any.ls.input b/tests/b-non-content-any.ls.input
deleted file mode 100644
--- a/tests/b-non-content-any.ls.input
+++ /dev/null
@@ -1,1 +0,0 @@
- 
diff --git a/tests/b-non-content-any.ls.output b/tests/b-non-content-any.ls.output
deleted file mode 100644
--- a/tests/b-non-content-any.ls.output
+++ /dev/null
@@ -1,1 +0,0 @@
-b\u2028
diff --git a/tests/b-non-content-generic.input b/tests/b-non-content-generic.input
deleted file mode 100644
--- a/tests/b-non-content-generic.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/b-non-content-generic.output b/tests/b-non-content-generic.output
deleted file mode 100644
--- a/tests/b-non-content-generic.output
+++ /dev/null
@@ -1,1 +0,0 @@
-b\x0a
diff --git a/tests/b-non-content.invalid.input b/tests/b-non-content.invalid.input
new file mode 100644
--- /dev/null
+++ b/tests/b-non-content.invalid.input
@@ -0,0 +1,1 @@
+a
diff --git a/tests/b-non-content.invalid.output b/tests/b-non-content.invalid.output
new file mode 100644
--- /dev/null
+++ b/tests/b-non-content.invalid.output
@@ -0,0 +1,1 @@
+!$InputFile$: line 1: column 0: Unexpected 'a'
diff --git a/tests/b-non-content.lf.input b/tests/b-non-content.lf.input
new file mode 100644
--- /dev/null
+++ b/tests/b-non-content.lf.input
@@ -0,0 +1,1 @@
+
diff --git a/tests/b-non-content.lf.output b/tests/b-non-content.lf.output
new file mode 100644
--- /dev/null
+++ b/tests/b-non-content.lf.output
@@ -0,0 +1,1 @@
+b\x0a
diff --git a/tests/b-normalized.invalid.input b/tests/b-normalized.invalid.input
deleted file mode 100644
--- a/tests/b-normalized.invalid.input
+++ /dev/null
@@ -1,1 +0,0 @@
-a
diff --git a/tests/b-normalized.invalid.output b/tests/b-normalized.invalid.output
deleted file mode 100644
--- a/tests/b-normalized.invalid.output
+++ /dev/null
@@ -1,1 +0,0 @@
-!$InputFile$: line 1: column 0: Unexpected 'a'
diff --git a/tests/b-normalized.lf.input b/tests/b-normalized.lf.input
deleted file mode 100644
--- a/tests/b-normalized.lf.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/b-normalized.lf.output b/tests/b-normalized.lf.output
deleted file mode 100644
--- a/tests/b-normalized.lf.output
+++ /dev/null
@@ -1,1 +0,0 @@
-L\x0a
diff --git a/tests/b-normalized.ls.input b/tests/b-normalized.ls.input
deleted file mode 100644
--- a/tests/b-normalized.ls.input
+++ /dev/null
@@ -1,1 +0,0 @@
- 
diff --git a/tests/b-normalized.ls.output b/tests/b-normalized.ls.output
deleted file mode 100644
--- a/tests/b-normalized.ls.output
+++ /dev/null
@@ -1,1 +0,0 @@
-B\u2028
diff --git a/tests/b-paragraph-separator.input b/tests/b-paragraph-separator.input
deleted file mode 100644
--- a/tests/b-paragraph-separator.input
+++ /dev/null
@@ -1,1 +0,0 @@
- 
diff --git a/tests/b-paragraph-separator.output b/tests/b-paragraph-separator.output
deleted file mode 100644
--- a/tests/b-paragraph-separator.output
+++ /dev/null
@@ -1,1 +0,0 @@
-?\u2029
diff --git a/tests/b-specific.invalid.input b/tests/b-specific.invalid.input
deleted file mode 100644
--- a/tests/b-specific.invalid.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/b-specific.invalid.output b/tests/b-specific.invalid.output
deleted file mode 100644
--- a/tests/b-specific.invalid.output
+++ /dev/null
@@ -1,1 +0,0 @@
-!$InputFile$: line 1: column 0: Unexpected '\x0a'
diff --git a/tests/b-specific.ls.input b/tests/b-specific.ls.input
deleted file mode 100644
--- a/tests/b-specific.ls.input
+++ /dev/null
@@ -1,1 +0,0 @@
- 
diff --git a/tests/b-specific.ls.output b/tests/b-specific.ls.output
deleted file mode 100644
--- a/tests/b-specific.ls.output
+++ /dev/null
@@ -1,1 +0,0 @@
-?\u2028
diff --git a/tests/b-specific.ps.input b/tests/b-specific.ps.input
deleted file mode 100644
--- a/tests/b-specific.ps.input
+++ /dev/null
@@ -1,1 +0,0 @@
- 
diff --git a/tests/b-specific.ps.output b/tests/b-specific.ps.output
deleted file mode 100644
--- a/tests/b-specific.ps.output
+++ /dev/null
@@ -1,1 +0,0 @@
-?\u2029
diff --git a/tests/c-byte-order-mark.utf32be.input b/tests/c-byte-order-mark.utf32be.input
new file mode 100644
Binary files /dev/null and b/tests/c-byte-order-mark.utf32be.input differ
diff --git a/tests/c-byte-order-mark.utf32be.output b/tests/c-byte-order-mark.utf32be.output
new file mode 100644
--- /dev/null
+++ b/tests/c-byte-order-mark.utf32be.output
@@ -0,0 +1,1 @@
+UTF32BE
diff --git a/tests/c-byte-order-mark.utf32le.input b/tests/c-byte-order-mark.utf32le.input
new file mode 100644
Binary files /dev/null and b/tests/c-byte-order-mark.utf32le.input differ
diff --git a/tests/c-byte-order-mark.utf32le.output b/tests/c-byte-order-mark.utf32le.output
new file mode 100644
--- /dev/null
+++ b/tests/c-byte-order-mark.utf32le.output
@@ -0,0 +1,1 @@
+UTF32LE
diff --git a/tests/c-json.10000.input b/tests/c-json.10000.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.10000.input
@@ -0,0 +1,1 @@
+𐀀
diff --git a/tests/c-json.10000.output b/tests/c-json.10000.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.10000.output
@@ -0,0 +1,1 @@
+?\U00010000
diff --git a/tests/c-json.10ffff.input b/tests/c-json.10ffff.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.10ffff.input
@@ -0,0 +1,1 @@
+􏿿
diff --git a/tests/c-json.10ffff.output b/tests/c-json.10ffff.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.10ffff.output
@@ -0,0 +1,1 @@
+?\U0010ffff
diff --git a/tests/c-json.cr.input b/tests/c-json.cr.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.cr.input
@@ -0,0 +1,1 @@
+
diff --git a/tests/c-json.cr.output b/tests/c-json.cr.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.cr.output
@@ -0,0 +1,1 @@
+?\x0d
diff --git a/tests/c-json.d7ff.input b/tests/c-json.d7ff.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.d7ff.input
@@ -0,0 +1,1 @@
+퟿
diff --git a/tests/c-json.d7ff.output b/tests/c-json.d7ff.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.d7ff.output
@@ -0,0 +1,1 @@
+?\ud7ff
diff --git a/tests/c-json.e000.input b/tests/c-json.e000.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.e000.input
@@ -0,0 +1,1 @@
+
diff --git a/tests/c-json.e000.output b/tests/c-json.e000.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.e000.output
@@ -0,0 +1,1 @@
+?\ue000
diff --git a/tests/c-json.ff.input b/tests/c-json.ff.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.ff.input
@@ -0,0 +1,1 @@
+ÿ
diff --git a/tests/c-json.ff.output b/tests/c-json.ff.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.ff.output
@@ -0,0 +1,1 @@
+?\xff
diff --git a/tests/c-json.fffd.input b/tests/c-json.fffd.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.fffd.input
@@ -0,0 +1,1 @@
+�
diff --git a/tests/c-json.fffd.output b/tests/c-json.fffd.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.fffd.output
@@ -0,0 +1,1 @@
+?\ufffd
diff --git a/tests/c-json.invalid.input b/tests/c-json.invalid.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.invalid.input
@@ -0,0 +1,1 @@
+
diff --git a/tests/c-json.invalid.output b/tests/c-json.invalid.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.invalid.output
@@ -0,0 +1,1 @@
+!$InputFile$: line 1: column 0: Unexpected '\x01'
diff --git a/tests/c-json.lf.input b/tests/c-json.lf.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.lf.input
@@ -0,0 +1,1 @@
+
diff --git a/tests/c-json.lf.output b/tests/c-json.lf.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.lf.output
@@ -0,0 +1,1 @@
+?\x0a
diff --git a/tests/c-json.nbsp.input b/tests/c-json.nbsp.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.nbsp.input
@@ -0,0 +1,1 @@
+ 
diff --git a/tests/c-json.nbsp.output b/tests/c-json.nbsp.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.nbsp.output
@@ -0,0 +1,1 @@
+?\xa0
diff --git a/tests/c-json.nel.input b/tests/c-json.nel.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.nel.input
@@ -0,0 +1,1 @@
+
diff --git a/tests/c-json.nel.output b/tests/c-json.nel.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.nel.output
@@ -0,0 +1,1 @@
+?\x85
diff --git a/tests/c-json.sp.input b/tests/c-json.sp.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.sp.input
@@ -0,0 +1,1 @@
+ 
diff --git a/tests/c-json.sp.output b/tests/c-json.sp.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.sp.output
@@ -0,0 +1,1 @@
+? 
diff --git a/tests/c-json.tab.input b/tests/c-json.tab.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.tab.input
@@ -0,0 +1,1 @@
+	
diff --git a/tests/c-json.tab.output b/tests/c-json.tab.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.tab.output
@@ -0,0 +1,1 @@
+?\x09
diff --git a/tests/c-json.tilde.input b/tests/c-json.tilde.input
new file mode 100644
--- /dev/null
+++ b/tests/c-json.tilde.input
@@ -0,0 +1,1 @@
+~
diff --git a/tests/c-json.tilde.output b/tests/c-json.tilde.output
new file mode 100644
--- /dev/null
+++ b/tests/c-json.tilde.output
@@ -0,0 +1,1 @@
+?~
diff --git a/tests/c-printable.invalid.input b/tests/c-printable.invalid.input
--- a/tests/c-printable.invalid.input
+++ b/tests/c-printable.invalid.input
@@ -1,1 +1,1 @@
-
+ÿ
diff --git a/tests/c-printable.invalid.output b/tests/c-printable.invalid.output
--- a/tests/c-printable.invalid.output
+++ b/tests/c-printable.invalid.output
@@ -1,1 +1,1 @@
-!$InputFile$: line 1: column 0: Unexpected '\x01'
+?\xff
diff --git a/tests/junk b/tests/junk
new file mode 100644
--- /dev/null
+++ b/tests/junk
@@ -0,0 +1,1 @@
+ÿ
diff --git a/tests/nb-json.input b/tests/nb-json.input
new file mode 100644
--- /dev/null
+++ b/tests/nb-json.input
@@ -0,0 +1,1 @@
+a
diff --git a/tests/nb-json.invalid.input b/tests/nb-json.invalid.input
new file mode 100644
--- /dev/null
+++ b/tests/nb-json.invalid.input
@@ -0,0 +1,1 @@
+
diff --git a/tests/nb-json.invalid.output b/tests/nb-json.invalid.output
new file mode 100644
--- /dev/null
+++ b/tests/nb-json.invalid.output
@@ -0,0 +1,1 @@
+!$InputFile$: line 1: column 0: Unexpected '\x0a'
diff --git a/tests/nb-json.output b/tests/nb-json.output
new file mode 100644
--- /dev/null
+++ b/tests/nb-json.output
@@ -0,0 +1,1 @@
+?a
diff --git a/tests/ns-esc-slash.input b/tests/ns-esc-slash.input
new file mode 100644
--- /dev/null
+++ b/tests/ns-esc-slash.input
@@ -0,0 +1,1 @@
+/
diff --git a/tests/ns-esc-slash.output b/tests/ns-esc-slash.output
new file mode 100644
--- /dev/null
+++ b/tests/ns-esc-slash.output
@@ -0,0 +1,1 @@
+t/
diff --git a/tests/s-l-double-any.n=4.escaped.input b/tests/s-l-double-any.n=4.escaped.input
deleted file mode 100644
--- a/tests/s-l-double-any.n=4.escaped.input
+++ /dev/null
@@ -1,1 +0,0 @@
- \
diff --git a/tests/s-l-double-any.n=4.escaped.output b/tests/s-l-double-any.n=4.escaped.output
deleted file mode 100644
--- a/tests/s-l-double-any.n=4.escaped.output
+++ /dev/null
@@ -1,5 +0,0 @@
-? 
-E
-I\x5c
-b\x0a
-e
diff --git a/tests/s-l-double-any.n=4.folded.input b/tests/s-l-double-any.n=4.folded.input
deleted file mode 100644
--- a/tests/s-l-double-any.n=4.folded.input
+++ /dev/null
@@ -1,2 +0,0 @@
- 
-
diff --git a/tests/s-l-double-any.n=4.folded.output b/tests/s-l-double-any.n=4.folded.output
deleted file mode 100644
--- a/tests/s-l-double-any.n=4.folded.output
+++ /dev/null
@@ -1,3 +0,0 @@
-w 
-b\x0a
-L\x0a
diff --git a/tests/s-l-double-any.n=4.invalid.input b/tests/s-l-double-any.n=4.invalid.input
deleted file mode 100644
--- a/tests/s-l-double-any.n=4.invalid.input
+++ /dev/null
@@ -1,1 +0,0 @@
-a
diff --git a/tests/s-l-double-any.n=4.invalid.output b/tests/s-l-double-any.n=4.invalid.output
deleted file mode 100644
--- a/tests/s-l-double-any.n=4.invalid.output
+++ /dev/null
@@ -1,1 +0,0 @@
-!$InputFile$: line 1: column 0: Unexpected 'a'
diff --git a/tests/s-l-double-escaped.n=2.input b/tests/s-l-double-escaped.n=2.input
deleted file mode 100644
--- a/tests/s-l-double-escaped.n=2.input
+++ /dev/null
@@ -1,2 +0,0 @@
- \
-
diff --git a/tests/s-l-double-escaped.n=2.invalid.input b/tests/s-l-double-escaped.n=2.invalid.input
deleted file mode 100644
--- a/tests/s-l-double-escaped.n=2.invalid.input
+++ /dev/null
@@ -1,1 +0,0 @@
-a
diff --git a/tests/s-l-double-escaped.n=2.invalid.output b/tests/s-l-double-escaped.n=2.invalid.output
deleted file mode 100644
--- a/tests/s-l-double-escaped.n=2.invalid.output
+++ /dev/null
@@ -1,2 +0,0 @@
-E
-!$InputFile$: line 1: column 0: Unexpected 'a'
diff --git a/tests/s-l-double-escaped.n=2.output b/tests/s-l-double-escaped.n=2.output
deleted file mode 100644
--- a/tests/s-l-double-escaped.n=2.output
+++ /dev/null
@@ -1,7 +0,0 @@
-? 
-E
-I\x5c
-!Commit to 'escape' was made outside it
-b\x0a
-e
-L\x0a
diff --git a/tests/s-l-flow-folded.n=4.invalid.input b/tests/s-l-flow-folded.n=4.invalid.input
deleted file mode 100644
--- a/tests/s-l-flow-folded.n=4.invalid.input
+++ /dev/null
@@ -1,1 +0,0 @@
-a
diff --git a/tests/s-l-flow-folded.n=4.invalid.output b/tests/s-l-flow-folded.n=4.invalid.output
deleted file mode 100644
--- a/tests/s-l-flow-folded.n=4.invalid.output
+++ /dev/null
@@ -1,1 +0,0 @@
-!$InputFile$: line 1: column 0: Unexpected 'a'
diff --git a/tests/s-l-flow-folded.n=4.lf.input b/tests/s-l-flow-folded.n=4.lf.input
deleted file mode 100644
--- a/tests/s-l-flow-folded.n=4.lf.input
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/tests/s-l-flow-folded.n=4.lf.output b/tests/s-l-flow-folded.n=4.lf.output
deleted file mode 100644
--- a/tests/s-l-flow-folded.n=4.lf.output
+++ /dev/null
@@ -1,1 +0,0 @@
-l\x0a
diff --git a/tests/s-l-flow-folded.n=4.sp-lf-lf.input b/tests/s-l-flow-folded.n=4.sp-lf-lf.input
deleted file mode 100644
--- a/tests/s-l-flow-folded.n=4.sp-lf-lf.input
+++ /dev/null
@@ -1,2 +0,0 @@
- 
-
diff --git a/tests/s-l-flow-folded.n=4.sp-lf-lf.output b/tests/s-l-flow-folded.n=4.sp-lf-lf.output
deleted file mode 100644
--- a/tests/s-l-flow-folded.n=4.sp-lf-lf.output
+++ /dev/null
@@ -1,3 +0,0 @@
-w 
-b\x0a
-L\x0a
diff --git a/tests/s-s-double-break.n=4.escaped.input b/tests/s-s-double-break.n=4.escaped.input
new file mode 100644
--- /dev/null
+++ b/tests/s-s-double-break.n=4.escaped.input
@@ -0,0 +1,2 @@
+ \
+     
diff --git a/tests/s-s-double-break.n=4.escaped.output b/tests/s-s-double-break.n=4.escaped.output
new file mode 100644
--- /dev/null
+++ b/tests/s-s-double-break.n=4.escaped.output
@@ -0,0 +1,7 @@
+? 
+E
+I\x5c
+b\x0a
+e
+i    
+w 
diff --git a/tests/s-s-double-break.n=4.folded.input b/tests/s-s-double-break.n=4.folded.input
new file mode 100644
--- /dev/null
+++ b/tests/s-s-double-break.n=4.folded.input
@@ -0,0 +1,3 @@
+ 
+
+     
diff --git a/tests/s-s-double-break.n=4.folded.output b/tests/s-s-double-break.n=4.folded.output
new file mode 100644
--- /dev/null
+++ b/tests/s-s-double-break.n=4.folded.output
@@ -0,0 +1,5 @@
+w 
+b\x0a
+L\x0a
+i    
+w 
diff --git a/tests/s-s-double-break.n=4.invalid.input b/tests/s-s-double-break.n=4.invalid.input
new file mode 100644
--- /dev/null
+++ b/tests/s-s-double-break.n=4.invalid.input
@@ -0,0 +1,1 @@
+a
diff --git a/tests/s-s-double-break.n=4.invalid.output b/tests/s-s-double-break.n=4.invalid.output
new file mode 100644
--- /dev/null
+++ b/tests/s-s-double-break.n=4.invalid.output
@@ -0,0 +1,1 @@
+!$InputFile$: line 1: column 0: Unexpected 'a'
diff --git a/tests/s-s-double-escaped.n=2.input b/tests/s-s-double-escaped.n=2.input
new file mode 100644
--- /dev/null
+++ b/tests/s-s-double-escaped.n=2.input
@@ -0,0 +1,3 @@
+ \
+
+   
diff --git a/tests/s-s-double-escaped.n=2.invalid.input b/tests/s-s-double-escaped.n=2.invalid.input
new file mode 100644
--- /dev/null
+++ b/tests/s-s-double-escaped.n=2.invalid.input
@@ -0,0 +1,1 @@
+a
diff --git a/tests/s-s-double-escaped.n=2.invalid.output b/tests/s-s-double-escaped.n=2.invalid.output
new file mode 100644
--- /dev/null
+++ b/tests/s-s-double-escaped.n=2.invalid.output
@@ -0,0 +1,2 @@
+E
+!$InputFile$: line 1: column 0: Unexpected 'a'
diff --git a/tests/s-s-double-escaped.n=2.output b/tests/s-s-double-escaped.n=2.output
new file mode 100644
--- /dev/null
+++ b/tests/s-s-double-escaped.n=2.output
@@ -0,0 +1,9 @@
+? 
+E
+I\x5c
+!Commit to 'escape' was made outside it
+b\x0a
+e
+L\x0a
+i  
+w 
diff --git a/tests/s-s-flow-folded.n=2.input b/tests/s-s-flow-folded.n=2.input
new file mode 100644
--- /dev/null
+++ b/tests/s-s-flow-folded.n=2.input
@@ -0,0 +1,2 @@
+  
+  	
diff --git a/tests/s-s-flow-folded.n=2.output b/tests/s-s-flow-folded.n=2.output
new file mode 100644
--- /dev/null
+++ b/tests/s-s-flow-folded.n=2.output
@@ -0,0 +1,4 @@
+w  
+l\x0a
+i  
+w\x09
diff --git a/tests/s-s-flow-folded.n=4.invalid.input b/tests/s-s-flow-folded.n=4.invalid.input
new file mode 100644
--- /dev/null
+++ b/tests/s-s-flow-folded.n=4.invalid.input
@@ -0,0 +1,1 @@
+a
diff --git a/tests/s-s-flow-folded.n=4.invalid.output b/tests/s-s-flow-folded.n=4.invalid.output
new file mode 100644
--- /dev/null
+++ b/tests/s-s-flow-folded.n=4.invalid.output
@@ -0,0 +1,1 @@
+!$InputFile$: line 1: column 0: Unexpected 'a'
diff --git a/tests/s-s-flow-folded.n=4.lf.input b/tests/s-s-flow-folded.n=4.lf.input
new file mode 100644
--- /dev/null
+++ b/tests/s-s-flow-folded.n=4.lf.input
@@ -0,0 +1,2 @@
+
+    	
diff --git a/tests/s-s-flow-folded.n=4.lf.output b/tests/s-s-flow-folded.n=4.lf.output
new file mode 100644
--- /dev/null
+++ b/tests/s-s-flow-folded.n=4.lf.output
@@ -0,0 +1,3 @@
+l\x0a
+i    
+w\x09
diff --git a/tests/s-s-flow-folded.n=4.sp-lf-lf.input b/tests/s-s-flow-folded.n=4.sp-lf-lf.input
new file mode 100644
--- /dev/null
+++ b/tests/s-s-flow-folded.n=4.sp-lf-lf.input
@@ -0,0 +1,3 @@
+ 
+
+    	
diff --git a/tests/s-s-flow-folded.n=4.sp-lf-lf.output b/tests/s-s-flow-folded.n=4.sp-lf-lf.output
new file mode 100644
--- /dev/null
+++ b/tests/s-s-flow-folded.n=4.sp-lf-lf.output
@@ -0,0 +1,5 @@
+w 
+b\x0a
+L\x0a
+i    
+w\x09
